[VIVO-1080] Add position information to manage people in organization

This commit is contained in:
grahamtriggs 2015-10-20 13:38:13 +01:00
parent 9c5b8f5c29
commit b1979d24c9
2 changed files with 15 additions and 8 deletions

View file

@ -68,17 +68,24 @@ public class ManagePeopleForOrganizationController extends FreemarkerHttpServlet
+ "PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#> \n"
+ "PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#> \n"
+ "PREFIX foaf: <http://xmlns.com/foaf/0.1/> \n"
+ "SELECT DISTINCT ?subclass ?position (str(?label) as ?name) ?person ?hideThis WHERE { \n"
+ "SELECT DISTINCT ?subclass ?position ?positionLabel (str(?label) as ?name) ?person ?hideThis WHERE { \n"
+ " ?subject core:relatedBy ?position . \n"
+ " ?position a core:Position . \n"
+ " OPTIONAL { ?position core:relates ?person . "
+ " ?person a foaf:Person . \n"
+ " ?person rdfs:label ?label } \n"
+ " OPTIONAL { ?position vitro:mostSpecificType ?subclass . \n"
+ " OPTIONAL { ?subclass vitro:displayRankAnnot ?displayRank } \n"
+ " ?position rdfs:label ?positionLabel . \n"
+ " OPTIONAL { \n"
+ " ?subject core:relatedBy ?position . \n"
+ " ?position a core:Position . \n"
+ " ?position core:relates ?person . "
+ " ?person a foaf:Person . \n"
+ " ?person rdfs:label ?label } \n"
+ " OPTIONAL { \n"
+ " ?subject core:relatedBy ?position . \n"
+ " ?position a core:Position . \n"
+ " ?position vitro:mostSpecificType ?subclass . \n"
+ " OPTIONAL { ?subclass vitro:displayRankAnnot ?displayRank } \n"
+ " } \n "
+ " OPTIONAL { ?position core:hideFromDisplay ?hideThis } \n "
+ " FILTER ( ?displayRank < 500 )"
+ " FILTER ( !BOUND(?displayRank) || ?displayRank < 500 )"
+ "} ORDER BY ?subclass ?name";
HashMap<String, List<Map<String,String>>> getPeople(String subjectUri, VitroRequest vreq) {