[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

@ -21,7 +21,7 @@ ${i18n().check_people_to_exclude}
<ul > <ul >
<#list peeps as person> <#list peeps as person>
<li> <li>
<input type="checkbox" class="itemCheckbox" <#if person.hideThis??>checked</#if> />${person.name} <input type="checkbox" class="itemCheckbox" <#if person.hideThis??>checked</#if> />${person.name}<#if person.positionLabel??> <span class="listEmphasis">${person.positionLabel}</span></#if>
</li> </li>
<script type="text/javascript"> <script type="text/javascript">
itemData.push({ itemData.push({

View file

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