Merge branch 'develop' of https://github.com/vivo-project/VIVO into develop

This commit is contained in:
Holly Mistlebauer 2013-10-25 17:07:16 -04:00
commit d3cb935d9b
2 changed files with 9 additions and 13 deletions

View file

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

View file

@ -148,7 +148,7 @@ public class UtilitiesRequestHandler implements VisualizationRequestHandler {
Map<String, String> fieldLabelToOutputFieldLabel = new HashMap<String, String>(); Map<String, String> fieldLabelToOutputFieldLabel = new HashMap<String, String>();
String aggregationRules = "(count(DISTINCT ?Grant) AS ?numOfGrants)"; 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()); ObjectProperty predicate = ModelUtils.getPropertyForRoleInClass(grantType, vitroRequest.getWebappDaoFactory());
String roleToGrantPredicate = "<" + predicate.getURI() + ">"; String roleToGrantPredicate = "<" + predicate.getURI() + ">";