made slight improvement to sparql query

This commit is contained in:
Tim Worrall 2014-07-15 14:23:01 -04:00
parent 0eca68e4bc
commit c3c4b11c5e

View file

@ -66,13 +66,15 @@ public class ManageGrantsForIndividualController extends FreemarkerHttpServlet {
+ "PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#> \n"
+ "PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#> \n"
+ "SELECT DISTINCT ?subclass ?role (str(?label2) as ?label) ?activity ?hideThis WHERE { \n"
+ " ?subject ?roleProp ?role . \n"
+ " ?subject <http://purl.obolibrary.org/obo/RO_0000053> ?role . \n"
+ " ?role a core:ResearcherRole . \n"
+ " ?role vitro:mostSpecificType ?subclass \n"
+ " OPTIONAL { ?role core:relatedBy ?activity . \n"
+ " OPTIONAL { ?role core:relatedBy ?activity . \n"
+ " ?activity a core:Grant . \n"
+ " OPTIONAL {?activity rdfs:label ?label2} \n"
+ " } \n"
+ " OPTIONAL { ?role <http://purl.obolibrary.org/obo/BFO_0000054> ?activity . \n"
+ " ?activity a core:Project . \n"
+ " OPTIONAL {?activity rdfs:label ?label2} \n"
+ " } \n"
+ " OPTIONAL { ?role core:hideFromDisplay ?hideThis } \n"