Adapting addGrantRoleToPerson.jsp to ontology changes NIHVIVO-629
This commit is contained in:
parent
c8badcf64a
commit
afdbea1db7
4 changed files with 22 additions and 26 deletions
|
@ -72,8 +72,8 @@ if ( ((String)request.getAttribute("predicateUri")).endsWith("hasPrincipalInvest
|
||||||
|
|
||||||
?person ?rolePredicate ?role.
|
?person ?rolePredicate ?role.
|
||||||
?role rdf:type ?roleType .
|
?role rdf:type ?roleType .
|
||||||
?role core:relatedRole ?grant .
|
?role core:roleIn ?grant .
|
||||||
?grant core:inRole ?role .
|
?grant core:relatedRole ?role .
|
||||||
</v:jsonset>
|
</v:jsonset>
|
||||||
|
|
||||||
<v:jsonset var="n3ForInverse">
|
<v:jsonset var="n3ForInverse">
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
<jsp:include page="roleShortView.jsp">
|
<jsp:include page="roleShortView.jsp">
|
||||||
<jsp:param name="personToRolePredicate" value="http://vivoweb.org/ontology/core#hasCo-PrincipalInvestigatorRole"/>
|
<jsp:param name="personToRolePredicate" value="http://vivoweb.org/ontology/core#hasCo-PrincipalInvestigatorRole"/>
|
||||||
<jsp:param name="roleActivityToRolePredicate" value="http://vivoweb.org/ontology/core#roleIn"/>
|
<jsp:param name="roleToPersonPredicate" value="http://vivoweb.org/ontology/core#co-PrincipalInvestigatorRoleOf"/>
|
||||||
<jsp:param name="roleActivityLabel" value="grant"/>
|
<jsp:param name="roleActivityToRolePredicate" value="http://vivoweb.org/ontology/core#relatedRole"/>
|
||||||
|
<jsp:param name="roleActivityLabel" value="grant"/>
|
||||||
</jsp:include>
|
</jsp:include>
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
<jsp:include page="roleShortView.jsp">
|
<jsp:include page="roleShortView.jsp">
|
||||||
<jsp:param name="personToRolePredicate" value="http://vivoweb.org/ontology/core#hasPrincipalInvestigatorRole"/>
|
<jsp:param name="personToRolePredicate" value="http://vivoweb.org/ontology/core#hasPrincipalInvestigatorRole"/>
|
||||||
<jsp:param name="roleActivityToRolePredicate" value="http://vivoweb.org/ontology/core#roleIn"/>
|
<jsp:param name="roleToPersonPredicate" value="http://vivoweb.org/ontology/core#principalInvestigatorRoleOf"/>
|
||||||
|
<jsp:param name="roleActivityToRolePredicate" value="http://vivoweb.org/ontology/core#relatedRole"/>
|
||||||
<jsp:param name="roleActivityLabel" value="grant"/>
|
<jsp:param name="roleActivityLabel" value="grant"/>
|
||||||
</jsp:include>
|
</jsp:include>
|
||||||
|
|
|
@ -8,7 +8,8 @@
|
||||||
This short view is intended to be called to handle short views for roles
|
This short view is intended to be called to handle short views for roles
|
||||||
|
|
||||||
The following vars should be set by the jsp that is calling this short view
|
The following vars should be set by the jsp that is calling this short view
|
||||||
personToRolePredicate: URI of the person to role predicate.
|
personToRolePredicate: URI of the person to role predicate.
|
||||||
|
roleToPersonPredicate: URI of the role to person predicate.
|
||||||
roleActivityToRolePredicate: URI of the activity to role predicate.
|
roleActivityToRolePredicate: URI of the activity to role predicate.
|
||||||
roleActivityLabel: human readable label of activity. --%>
|
roleActivityLabel: human readable label of activity. --%>
|
||||||
|
|
||||||
|
@ -22,12 +23,10 @@
|
||||||
<%-- SUBJECT is a Person, so get info from other part of the role --%>
|
<%-- SUBJECT is a Person, so get info from other part of the role --%>
|
||||||
<c:when test="${predicateUri == param.personToRolePredicate}">
|
<c:when test="${predicateUri == param.personToRolePredicate}">
|
||||||
<c:choose>
|
<c:choose>
|
||||||
<c:when test="${!empty individual.objectPropertyMap['http://vivoweb.org/ontology/core#relatedRole']}">
|
<c:when test="${!empty individual.objectPropertyMap['http://vivoweb.org/ontology/core#roleIn']}">
|
||||||
<c:set var="roleActivity" value="${individual.objectPropertyMap['http://vivoweb.org/ontology/core#relatedRole'].objectPropertyStatements[0].object}" />
|
<c:set var="roleActivity" value="${individual.objectPropertyMap['http://vivoweb.org/ontology/core#roleIn'].objectPropertyStatements[0].object}" />
|
||||||
<c:set var="name" value="${roleActivity.name}"/>
|
<c:set var="name" value="${roleActivity.name}"/>
|
||||||
<c:set var="moniker" value="${roleActivity.moniker}"/>
|
<c:set var="label" value="${roleActivity.moniker}"/>
|
||||||
<%--<c:set var="year" value="${roleActivity.dataPropertyMap['http://vivoweb.org/ontology/core#year'].dataPropertyStatements[0].data}"/> --%>
|
|
||||||
<c:set var="label" value="${moniker} ${year}"/>
|
|
||||||
<c:set var="uri" value="${roleActivity.URI}"/>
|
<c:set var="uri" value="${roleActivity.URI}"/>
|
||||||
</c:when>
|
</c:when>
|
||||||
<c:otherwise><%-- this Role is not linked to a anything yet; use name as a placeholder and add link to the Role so user can add more information --%>
|
<c:otherwise><%-- this Role is not linked to a anything yet; use name as a placeholder and add link to the Role so user can add more information --%>
|
||||||
|
@ -50,25 +49,20 @@
|
||||||
<c:choose>
|
<c:choose>
|
||||||
|
|
||||||
<%-- there is a related Person --%>
|
<%-- there is a related Person --%>
|
||||||
<c:when test="${!empty individual.objectPropertyMap['http://vivoweb.org/ontology/core#linkedAuthor']}">
|
<c:when test="${!empty individual.objectPropertyMap[ param.roleToPersonPredicate ]}">
|
||||||
<c:set var="author" value="${individual.objectPropertyMap['http://vivoweb.org/ontology/core#linkedAuthor'].objectPropertyStatements[0].object}" />
|
<c:set var="person" value="${individual.objectPropertyMap[ param.roleToPersonPredicate ].objectPropertyStatements[0].object}" />
|
||||||
<c:set var="name" value="${author.name}"/>
|
<c:set var="name" value="${person.name}"/>
|
||||||
<c:set var="label" value="${author.dataPropertyMap['http://vivoweb.org/ontology/core#preferredTitle'].dataPropertyStatements[0].data}" />
|
<%-- <c:set var="label" value="${person.dataPropertyMap['http://vivoweb.org/ontology/core#preferredTitle'].dataPropertyStatements[0].data}" /> --%>
|
||||||
<c:set var="uri" value="${author.URI}"/>
|
<c:set var="uri" value="${person.URI}"/>
|
||||||
</c:when>
|
</c:when>
|
||||||
|
|
||||||
<%-- only an author name has been specified --%>
|
<%-- this is a Role with out a Person (likely from before custom form available) --%>
|
||||||
<c:when test="${!empty individual.dataPropertyMap['http://vivoweb.org/ontology/core#authorNameAsListed'].dataPropertyStatements[0].data}">
|
<c:otherwise>
|
||||||
<c:set var="name" value="<strong>${individual.dataPropertyMap['http://vivoweb.org/ontology/core#authorNameAsListed'].dataPropertyStatements[0].data}</strong>"/>
|
|
||||||
</c:when>
|
|
||||||
|
|
||||||
<%-- no related Person yet (likely from before custom form available) --%>
|
|
||||||
<c:otherwise>
|
|
||||||
<c:choose>
|
<c:choose>
|
||||||
<c:when test="${!empty individual.name}"><c:set var="name" value="${individual.name}"/></c:when>
|
<c:when test="${!empty individual.name}"><c:set var="name" value="${individual.name}"/></c:when>
|
||||||
<c:otherwise><c:set var="name" value="unlabeled authorship"/></c:otherwise>
|
<c:otherwise><c:set var="name" value="unlabeled ${param.roleActivityLabel} to person relation"/></c:otherwise>
|
||||||
</c:choose>
|
</c:choose>
|
||||||
<c:set var="label" value="(no author linked yet)"/>
|
<c:set var="label" value="(no person linked yet)"/>
|
||||||
<c:set var="uri" value="${individual.URI}"/>
|
<c:set var="uri" value="${individual.URI}"/>
|
||||||
</c:otherwise>
|
</c:otherwise>
|
||||||
</c:choose>
|
</c:choose>
|
||||||
|
|
Loading…
Add table
Reference in a new issue