Tweak the build script, so a developer can build vitro-core and it won't have any effect when they build vivoweb in the same workspace.
This commit is contained in:
commit
3f17d16d7b
68 changed files with 40148 additions and 0 deletions
78
modifications/templates/entity/authorshipShortView.jsp
Normal file
78
modifications/templates/entity/authorshipShortView.jsp
Normal file
|
@ -0,0 +1,78 @@
|
|||
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
|
||||
<%@ taglib uri="http://vitro.mannlib.cornell.edu/vitro/tags/StringProcessorTag" prefix="p" %>
|
||||
|
||||
<c:choose>
|
||||
<c:when test="${!empty individual}"><%-- individual is the OBJECT of the property referenced -- the Authorship individual, not the Person or Publication --%>
|
||||
<%-- c:set var="authorRank" value="${individual.dataPropertyMap['http://vivoweb.org/ontology/core#authorRank'].dataPropertyStatements[0].data}"/ --%>
|
||||
<c:choose>
|
||||
<c:when test="${!empty predicateUri}">
|
||||
<c:choose>
|
||||
<c:when test="${predicateUri == 'http://vivoweb.org/ontology/core#authorInAuthorship'}"><%-- SUBJECT is a Person, so get info from Authorship about related Publication --%>
|
||||
<c:choose>
|
||||
<c:when test="${!empty individual.objectPropertyMap['http://vivoweb.org/ontology/core#linkedInformationResource']}"><%-- this Position is linked to an Organization --%>
|
||||
<c:set var="name" value="${individual.objectPropertyMap['http://vivoweb.org/ontology/core#linkedInformationResource'].objectPropertyStatements[0].object.name}"/>
|
||||
<c:set var="moniker" value="${individual.objectPropertyMap['http://vivoweb.org/ontology/core#linkedInformationResource'].objectPropertyStatements[0].object.moniker}"/>
|
||||
<c:set var="year" value="${individual.objectPropertyMap['http://vivoweb.org/ontology/core#linkedInformationResource'].objectPropertyStatements[0].object.dataPropertyMap['http://vivoweb.org/ontology/core#year'].dataPropertyStatements[0].data}"/>
|
||||
<c:set var="label" value="${moniker} ${year}"/>
|
||||
<c:set var="uri" value="${individual.objectPropertyMap['http://vivoweb.org/ontology/core#linkedInformationResource'].objectPropertyStatements[0].object.URI}"/>
|
||||
</c:when>
|
||||
<c:otherwise><%-- this Position is not linked to a Publication yet; use Authorship name as a placeholder and add link to the Authorship so user can add more information --%>
|
||||
<c:choose>
|
||||
<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:choose>
|
||||
<c:set var="label" value="(no publication linked yet)"/>
|
||||
<c:set var="uri" value="${individual.URI}"/>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</c:when>
|
||||
<c:when test="${predicateUri == 'http://vivoweb.org/ontology/core#informationResourceInAuthorship'}"><%-- SUBJECT is a Publication, so get info from Authorship about the related Person --%>
|
||||
<c:choose>
|
||||
<c:when test="${!empty individual.objectPropertyMap['http://vivoweb.org/ontology/core#linkedAuthor']}"><%-- there is a related Person --%>
|
||||
<c:set var="name" value="${individual.objectPropertyMap['http://vivoweb.org/ontology/core#linkedAuthor'].objectPropertyStatements[0].object.name}"/>
|
||||
<c:set var="label" value="${individual.objectPropertyMap['http://vivoweb.org/ontology/core#linkedAuthor'].objectPropertyStatements[0].object.moniker}"/>
|
||||
<c:set var="uri" value="${individual.objectPropertyMap['http://vivoweb.org/ontology/core#linkedAuthor'].objectPropertyStatements[0].object.URI}"/>
|
||||
</c:when>
|
||||
<c:when test="${!empty individual.dataPropertyMap['http://vivoweb.org/ontology/core#authorNameAsListed'].dataPropertyStatements[0].data}"><%-- only an author name has been specified --%>
|
||||
<c:set var="name" value="<strong>${individual.dataPropertyMap['http://vivoweb.org/ontology/core#authorNameAsListed'].dataPropertyStatements[0].data}</strong>"/>
|
||||
</c:when>
|
||||
<c:otherwise><%-- no related Person yet (likely from before custom form available) --%>
|
||||
<c:choose>
|
||||
<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:choose>
|
||||
<c:set var="label" value="(no author linked yet)"/>
|
||||
<c:set var="uri" value="${individual.URI}"/>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<c:set var="name" value="unknown predicate"/>
|
||||
<c:set var="label" value="please contact your VIVO support team"/>
|
||||
<c:set var="uri" value="${predicateUri}"/>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
<c:choose>
|
||||
<c:when test="${!empty uri}">
|
||||
<c:url var="olink" value="/entity"><c:param name="uri" value="${uri}"/></c:url>
|
||||
<a href="<c:out value="${olink}"/>"><p:process>${name}</p:process></a> <p:process>${label}</p:process>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<p:process><strong>${name}</strong> ${label}</p:process>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<c:out value="No predicate available for custom rendering ..."/>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<c:out value="Got nothing to draw here ..."/>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
104
modifications/templates/entity/positionShortView.jsp
Normal file
104
modifications/templates/entity/positionShortView.jsp
Normal file
|
@ -0,0 +1,104 @@
|
|||
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
|
||||
<%@ taglib uri="http://vitro.mannlib.cornell.edu/vitro/tags/StringProcessorTag" prefix="p" %>
|
||||
|
||||
<c:choose>
|
||||
<c:when test="${!empty individual}"><%-- individual is the OBJECT of the property referenced -- the Position, not the Person or Organization --%>
|
||||
<c:set var="startYear" value="${individual.dataPropertyMap['http://vivoweb.org/ontology/core#startYear'].dataPropertyStatements[0].data}"/>
|
||||
<c:set var="endYear" value="${individual.dataPropertyMap['http://vivoweb.org/ontology/core#endYear'].dataPropertyStatements[0].data}"/>
|
||||
<c:choose><%-- use working title in preference to HR title --%>
|
||||
<c:when test="${!empty individual.dataPropertyMap['http://vivoweb.org/ontology/core#titleOrRole'].dataPropertyStatements[0].data}">
|
||||
<c:set var="title" value="${individual.dataPropertyMap['http://vivoweb.org/ontology/core#titleOrRole'].dataPropertyStatements[0].data}"/>
|
||||
</c:when>
|
||||
<c:when test="${!empty individual.dataPropertyMap['http://vivoweb.org/ontology/core#hrJobTitle'].dataPropertyStatements[0].data}">
|
||||
<c:set var="title" value="${individual.dataPropertyMap['http://vivoweb.org/ontology/core#hrJobTitle'].dataPropertyStatements[0].data}"/>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<c:set var="title" value="${individual.name}"/>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
<c:choose>
|
||||
<c:when test="${!empty predicateUri}">
|
||||
<c:choose>
|
||||
<c:when test="${predicateUri == 'http://vivoweb.org/ontology/core#personInPosition'}"><%-- SUBJECT is a Person, so get info from Position about related Organization --%>
|
||||
<c:choose>
|
||||
<c:when test="${!empty individual.objectPropertyMap['http://vivoweb.org/ontology/core#positionInOrganization']}"><%-- this Position is linked to an Organization --%>
|
||||
<c:set var="objName" value="${individual.objectPropertyMap['http://vivoweb.org/ontology/core#positionInOrganization'].objectPropertyStatements[0].object.name}"/>
|
||||
<c:choose>
|
||||
<c:when test="${!empty title}">
|
||||
<c:set var="objLabel" value="${title}"/>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<c:set var="objLabel" value="${individual.objectPropertyMap['http://vivoweb.org/ontology/core#positionInOrganization'].objectPropertyStatements[0].object.moniker}"/>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
<c:set var="objUri" value="${individual.objectPropertyMap['http://vivoweb.org/ontology/core#positionInOrganization'].objectPropertyStatements[0].object.URI}"/>
|
||||
</c:when>
|
||||
<c:otherwise><%-- this Position is not linked to an Organization --%>
|
||||
<c:choose>
|
||||
<c:when test="${!empty individual.dataPropertyMap['http://vivoweb.org/ontology/core#involvedOrganizationName'].dataPropertyStatements[0].data}"><%-- an Organization name has been specified --%>
|
||||
<c:set var="objName" value="${individual.dataPropertyMap['http://vivoweb.org/ontology/core#involvedOrganizationName'].dataPropertyStatements[0].data}"/>
|
||||
<c:set var="objLabel" value="${title}"/>
|
||||
</c:when>
|
||||
<c:otherwise><%-- not even an organization name, so just display the title in place of the name --%>
|
||||
<c:set var="objName" value="${title}"/>
|
||||
<c:set var="title" value=""/><%-- don't show title twice --%>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</c:when>
|
||||
<c:when test="${predicateUri == 'http://vivoweb.org/ontology/core#organizationForPosition'}"><%-- SUBJECT is an Organization, so get info from Position about the related Person --%>
|
||||
<c:choose>
|
||||
<c:when test="${!empty individual.objectPropertyMap['http://vivoweb.org/ontology/core#positionForPerson']}"><%-- there is a related Person --%>
|
||||
<c:set var="objName" value="${individual.objectPropertyMap['http://vivoweb.org/ontology/core#positionForPerson'].objectPropertyStatements[0].object.name}"/>
|
||||
<c:choose>
|
||||
<c:when test="${!empty title}">
|
||||
<c:set var="objLabel" value="${title}"/>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<c:set var="objLabel" value="${individual.objectPropertyMap['http://vivoweb.org/ontology/core#positionForPerson'].objectPropertyStatements[0].object.moniker}"/>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
<c:set var="objUri" value="${individual.objectPropertyMap['http://vivoweb.org/ontology/core#positionForPerson'].objectPropertyStatements[0].object.URI}"/>
|
||||
</c:when>
|
||||
<c:otherwise><%-- no related Person, which should not happen --%>
|
||||
<c:set var="objName" value="${individual.name}"/>
|
||||
<c:set var="objLabel" value="${title}"/>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<c:set var="objName" value="unknown predicate"/>
|
||||
<c:set var="objUri" value="${predicateUri}"/>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
<c:if test="${!empty startYear}">
|
||||
<c:choose>
|
||||
<c:when test="${!empty endYear}">
|
||||
<c:set var="timeSpan" value=", ${startYear} - ${endYear}"/>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<c:set var="timeSpan" value=", ${startYear} - "/>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</c:if>
|
||||
<c:choose>
|
||||
<c:when test="${!empty objUri}">
|
||||
<c:url var="objLink" value="/entity"><c:param name="uri" value="${objUri}"/></c:url>
|
||||
<a href="<c:out value="${objLink}"/>"><p:process>${objName}</p:process></a> <p:process>${objLabel} ${timeSpan}</p:process>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<p:process><strong>${objName}</strong> ${objLabel} ${timeSpan}</p:process>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<c:out value="No predicate available for custom rendering ..."/>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<c:out value="Got nothing to draw here ..."/>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
Loading…
Add table
Add a link
Reference in a new issue