Merge r1357 from rel-1.1-maint branch (reverting addition of description field to role custom form and short view)

This commit is contained in:
rjy7 2010-09-08 20:40:02 +00:00
parent 5b25d92181
commit 24de7c4471
2 changed files with 17 additions and 40 deletions

View file

@ -151,6 +151,16 @@ public static Log log = LogFactory.getLog("edu.cornell.mannlib.vitro.webapp.jsp.
<c:set var="labelRequired" ><%= (mode == 1 || mode == 3) ?"\"nonempty\"," : "" %></c:set> <c:set var="labelRequired" ><%= (mode == 1 || mode == 3) ?"\"nonempty\"," : "" %></c:set>
<c:set var="typeRequired" ><%= (mode == 1 || mode == 3) ?"\"nonempty\"" : "" %></c:set> <c:set var="typeRequired" ><%= (mode == 1 || mode == 3) ?"\"nonempty\"" : "" %></c:set>
<%--
<c:choose>
<c:when test="${numDateFields == 1}">
<c:set var="startYearPredicate" value="${vivoCore}year" />
</c:when>
<c:otherwise>
<c:set var="startYearPredicate" value="${vivoCore}startYear" />
</c:otherwise>
</c:choose>
--%>
<c:set var="startYearPredicate"> <c:set var="startYearPredicate">
<c:choose> <c:choose>
<c:when test="${numDateFields == 1}">${vivoCore}year</c:when> <c:when test="${numDateFields == 1}">${vivoCore}year</c:when>
@ -166,11 +176,6 @@ public static Log log = LogFactory.getLog("edu.cornell.mannlib.vitro.webapp.jsp.
?role <${endYearPredicate}> ?endYear . ?role <${endYearPredicate}> ?endYear .
</v:jsonset> </v:jsonset>
<c:set var="descriptionPredicate" value="${vivoCore}description" />
<v:jsonset var="descriptionAssertion">
?role <${descriptionPredicate}> ?roleDescription .
</v:jsonset>
<v:jsonset var="roleLabelAssertion" > <v:jsonset var="roleLabelAssertion" >
?role <${label}> ?roleLabel . ?role <${label}> ?roleLabel .
</v:jsonset> </v:jsonset>
@ -218,10 +223,6 @@ public static Log log = LogFactory.getLog("edu.cornell.mannlib.vitro.webapp.jsp.
SELECT ?existingStartYear WHERE { ?role <${endYearPredicate}> ?existingStartYear .} SELECT ?existingStartYear WHERE { ?role <${endYearPredicate}> ?existingStartYear .}
</v:jsonset> </v:jsonset>
<v:jsonset var="descriptionQuery">
SELECT ?description WHERE { ?role <${descriptionPredicate}> ?description . }
</v:jsonset>
<v:jsonset var="activityQuery"> <v:jsonset var="activityQuery">
PREFIX core: <${vivoCore}> PREFIX core: <${vivoCore}>
SELECT ?existingActivity WHERE { ?role core:roleIn ?existingActivity . } SELECT ?existingActivity WHERE { ?role core:roleIn ?existingActivity . }
@ -250,7 +251,7 @@ public static Log log = LogFactory.getLog("edu.cornell.mannlib.vitro.webapp.jsp.
"object" : ["role", "${objectUriJson}", "URI" ], "object" : ["role", "${objectUriJson}", "URI" ],
"n3required" : [ "${n3ForNewRole}", "${startYearAssertion}", "${roleLabelAssertion}" ], "n3required" : [ "${n3ForNewRole}", "${startYearAssertion}", "${roleLabelAssertion}" ],
"n3optional" : [ "${n3ForActivityLabel}", "${n3ForActivityType}", "${n3ForInverse}", "${endYearAssertion}", "${descriptionAssertion}" ], "n3optional" : [ "${n3ForActivityLabel}", "${n3ForActivityType}", "${n3ForInverse}", "${endYearAssertion}" ],
"newResources" : { "role" : "${defaultNamespace}", "newResources" : { "role" : "${defaultNamespace}",
"roleActivity" : "${defaultNamespace}" }, "roleActivity" : "${defaultNamespace}" },
@ -258,17 +259,11 @@ public static Log log = LogFactory.getLog("edu.cornell.mannlib.vitro.webapp.jsp.
"urisInScope" : { "inverseRolePredicate" : "${inversePredicate}" }, "urisInScope" : { "inverseRolePredicate" : "${inversePredicate}" },
"literalsInScope": { }, "literalsInScope": { },
"urisOnForm" : [ "roleActivity", "roleActivityType" ], "urisOnForm" : [ "roleActivity", "roleActivityType" ],
"literalsOnForm" : [ "activityLabel", "roleLabel", "startYear", "endYear", "roleDescription" ], "literalsOnForm" : [ "activityLabel", "roleLabel", "startYear", "endYear" ],
"filesOnForm" : [ ], "filesOnForm" : [ ],
"sparqlForLiterals" : { }, "sparqlForLiterals" : { },
"sparqlForUris" : { }, "sparqlForUris" : { },
"sparqlForExistingLiterals" : { "sparqlForExistingLiterals" : { "activityLabel":"${activityLabelQuery}", "roleLabel":"${roleLabelQuery}", "startYear":"${startYearQuery}", "endYear":"${endYearQuery}" },
"activityLabel" : "${activityLabelQuery}",
"roleLabel" : "${roleLabelQuery}",
"startYear" : "${startYearQuery}",
"endYear" : "${endYearQuery}",
"roleDescription" : "${descriptionQuery}"
},
"sparqlForExistingUris" : { "roleActivity":"${activityQuery}" , "roleActivityType":"${activityTypeQuery}" }, "sparqlForExistingUris" : { "roleActivity":"${activityQuery}" , "roleActivityType":"${activityTypeQuery}" },
"fields" : { "fields" : {
"activityLabel" : { "activityLabel" : {
@ -336,17 +331,6 @@ public static Log log = LogFactory.getLog("edu.cornell.mannlib.vitro.webapp.jsp.
"rangeDatatypeUri" : "${gYearDatatypeUriJson}", "rangeDatatypeUri" : "${gYearDatatypeUriJson}",
"rangeLang" : "", "rangeLang" : "",
"assertions" : ["${endYearAssertion}"] "assertions" : ["${endYearAssertion}"]
},
"roleDescription" : {
"newResource" : "false",
"validators" : [ ],
"optionsType" : "UNDEFINED",
"literalOptions" : [ ],
"predicateUri" : "",
"objectClassUri" : "",
"rangeDatatypeUri" : "",
"rangeLang" : "",
"assertions" : ["${descriptionAssertion}"]
} }
} }
} }
@ -437,7 +421,6 @@ public static Log log = LogFactory.getLog("edu.cornell.mannlib.vitro.webapp.jsp.
<p><v:input type="text" id="roleLabel" label="Role in ### ${requiredHint}" size="50" /></p> <p><v:input type="text" id="roleLabel" label="Role in ### ${requiredHint}" size="50" /></p>
<v:input type="text" id="roleDescription" label="Role Description" size="50" />
<c:choose> <c:choose>
<c:when test="${numDateFields == 1}"> <c:when test="${numDateFields == 1}">
<v:input type="text" label="Year ${requiredHint} ${yearHint}" id="startYear" size="7"/> <v:input type="text" label="Year ${requiredHint} ${yearHint}" id="startYear" size="7"/>

View file

@ -30,8 +30,6 @@ Optional vars:
<c:choose> <c:choose>
<c:when test="${!empty predicateUri}"> <c:when test="${!empty predicateUri}">
<c:set var="description" value="${individual.dataPropertyMap['http://vivoweb.org/ontology/core#description'].dataPropertyStatements[0].data}" />
<%-- get years off role --%> <%-- get years off role --%>
<c:set var="startYear" value="${individual.dataPropertyMap[startYearPredicate].dataPropertyStatements[0].data}"/> <c:set var="startYear" value="${individual.dataPropertyMap[startYearPredicate].dataPropertyStatements[0].data}"/>
<c:if test="${! empty startYear}"> <c:if test="${! empty startYear}">
@ -112,8 +110,6 @@ Optional vars:
</c:otherwise> </c:otherwise>
</c:choose> </c:choose>
<%-- only show error messages if logged in --%> <%-- only show error messages if logged in --%>
<c:if test="${ ! showSelfEdits}"> <c:if test="${ ! showSelfEdits}">
<c:set var="errorMsg" value=""/> <c:set var="errorMsg" value=""/>
@ -124,14 +120,12 @@ Optional vars:
<c:when test="${!empty uri}"> <c:when test="${!empty uri}">
<c:url var="olink" value="/entity"><c:param name="uri" value="${uri}"/></c:url> <c:url var="olink" value="/entity"><c:param name="uri" value="${uri}"/></c:url>
<a href="<c:out value="${olink}"/>">${name}</a>&nbsp;${label}&nbsp;${startYear}${endYearVal} ${errorMsg} <a href="<c:out value="${olink}"/>">${name}</a>&nbsp;${label}&nbsp;${startYear}${endYearVal} ${errorMsg}
<c:if test="${! empty description}">
<br />${description}
</c:if>
</c:when> </c:when>
<c:otherwise> <c:otherwise>
<p:process><strong>${name}</strong> ${label}</p:process> ${errorMsg} <p:process><strong>${name}</strong> ${label}</p:process> ${errorMsg}
</c:otherwise> </c:otherwise>
</c:choose> </c:choose>
</c:when> </c:when>
<c:otherwise> <c:otherwise>
<c:out value="No predicate available for custom rendering ..."/> <c:out value="No predicate available for custom rendering ..."/>