1. Person to grants was creating wrong models for each person. Fixed.

This commit is contained in:
cdtank 2011-03-21 19:34:37 +00:00
parent aee1d00801
commit daa9d61d04
3 changed files with 517 additions and 513 deletions

View file

@ -174,7 +174,7 @@ public class TemporalGrantVisualizationRequestHandler implements
if (organizationWithAssociatedPeople.getSubEntities() != null) {
grantURIForAssociatedPeopleToVO = SelectOnModelUtilities
.getPublicationsForAssociatedPeople(dataset, organizationWithAssociatedPeople.getSubEntities());
.getGrantsForAssociatedPeople(dataset, organizationWithAssociatedPeople.getSubEntities());
organizationEntity = EntityComparisonUtilityFunctions.mergeEntityIfShareSameURI(
organizationEntity,

View file

@ -53,7 +53,7 @@ private Set<String> constructPersonGrantsQueryTemplate(String constructProperty,
+ " "
+ " } "
+ " WHERE { "
+ " ?Person core:" + roleTypeProperty + " ?Role . "
+ " <" + personURI + "> core:" + roleTypeProperty + " ?Role . "
+ " ?Role core:roleIn ?Grant . "
+ " ?Grant rdfs:label ?grantLabel . "
+ " "
@ -68,7 +68,7 @@ private Set<String> constructPersonGrantsQueryTemplate(String constructProperty,
+ " "
+ " } "
+ " WHERE { "
+ " ?Person core:" + roleTypeProperty + " ?Role . "
+ " <" + personURI + "> core:" + roleTypeProperty + " ?Role . "
+ " ?Role core:roleIn ?Grant . "
+ " "
+ " ?Grant core:dateTimeInterval ?dateTimeIntervalValueForGrant . "
@ -91,7 +91,7 @@ private Set<String> constructPersonGrantsQueryTemplate(String constructProperty,
// + " ?Grant vivosocnet:endDateTimeOnRole ?endDateTimeValue . "
+ " } "
+ " WHERE { "
+ " ?Person core:" + roleTypeProperty + " ?Role . "
+ " <" + personURI + "> core:" + roleTypeProperty + " ?Role . "
+ " ?Role core:roleIn ?Grant . "
+ " "
+ " ?Role core:dateTimeInterval ?dateTimeIntervalValue . "
@ -139,6 +139,7 @@ private Set<String> constructPersonGrantsQueryTemplate(String constructProperty,
for (String currentQuery : constructQueries) {
Query query = null;
try {
@ -149,6 +150,7 @@ private Set<String> constructPersonGrantsQueryTemplate(String constructProperty,
log.error(currentQuery);
}
QueryExecution qe = QueryExecutionFactory.create(query, dataset);
try {

View file

@ -488,7 +488,9 @@ public class SelectOnModelUtilities {
person.addActivities(getPublicationForEntity(
personPublicationsQuery.getQueryResult(),
allDocumentURIToVOs));
}
return allDocumentURIToVOs;
}
}