updates for VIVO-401 and VIVO-418 which were related issues

This commit is contained in:
tworrall 2013-10-25 16:35:44 -04:00
parent 55f43cfd0e
commit f1abafa3aa
2 changed files with 9 additions and 13 deletions

View file

@ -25,25 +25,22 @@
?role a ?objectType .
?role vitro:mostSpecificType ?roleSubclass
OPTIONAL { ?role <http://purl.obolibrary.org/obo/BFO_0000054> ?activity
LET (?activityName := afn:localname(?activity))
OPTIONAL { ?activity rdfs:label ?activityLabel }
OPTIONAL { ?role <http://purl.obolibrary.org/obo/BFO_0000054> ?activity .
?activity rdfs:label ?activityLabel
<collated>
?activity vitro:mostSpecificType ?subclass
</collated>
}
OPTIONAL { ?role core:relates ?activity
LET (?activityName := afn:localname(?activity))
OPTIONAL { ?activity rdfs:label ?activityLabel }
OPTIONAL { ?role core:relates ?activity .
?activity rdfs:label ?activityLabel
<collated>
?activity vitro:mostSpecificType ?subclass
</collated>
}
OPTIONAL { ?role core:roleContributesTo ?activity
LET (?activityName := afn:localname(?activity))
OPTIONAL { ?activity rdfs:label ?activityLabel }
OPTIONAL { ?role core:roleContributesTo ?activity .
?activity rdfs:label ?activityLabel
<collated>
?activity vitro:mostSpecificType ?subclass
@ -51,8 +48,7 @@
}
<!-- for research activities where the activity involves a grant -->
OPTIONAL { ?role core:relatedBy ?activity .
LET (?activityName := afn:localname(?activity))
OPTIONAL { ?activity rdfs:label ?activityLabel }
?activity rdfs:label ?activityLabel
<collated>
?activity vitro:mostSpecificType ?subclass
@ -68,7 +64,7 @@
?dateTimeEndValue core:dateTime ?dateTimeEnd
}
}
FILTER ( bound(?activity) &amp;&amp; ?objectType = ?roleSubclass )
FILTER ( ?objectType = ?roleSubclass )
} ORDER BY <collated>?subclass</collated> DESC(?dateTimeEnd) DESC(?dateTimeStart) ?activityLabel ?activityName
</query-select>

View file

@ -148,7 +148,7 @@ public class UtilitiesRequestHandler implements VisualizationRequestHandler {
Map<String, String> fieldLabelToOutputFieldLabel = new HashMap<String, String>();
String aggregationRules = "(count(DISTINCT ?Grant) AS ?numOfGrants)";
String grantType = "http://vivoweb.org/ontology#Grant";
String grantType = "http://vivoweb.org/ontology/core#Grant";
ObjectProperty predicate = ModelUtils.getPropertyForRoleInClass(grantType, vitroRequest.getWebappDaoFactory());
String roleToGrantPredicate = "<" + predicate.getURI() + ">";