diff --git a/productMods/edit/forms/addGrantRoleToPerson.jsp b/productMods/edit/forms/addGrantRoleToPerson.jsp index 6e2a6fbf..2f182051 100644 --- a/productMods/edit/forms/addGrantRoleToPerson.jsp +++ b/productMods/edit/forms/addGrantRoleToPerson.jsp @@ -63,7 +63,7 @@ This is intended to create a set of statements like: 3. Repair a bad role node. There is a subject, prediate and object but there is no individual on the other end of the object's core:roleIn stmt. This should be similar to an add but the form should be expanded. - 4. Really bad node. multiple roleIn statements. + 4. Really bad node. multiple core:roleIn statements. */ EditMode mode = FrontEndEditingUtils.getEditMode(request, "http://vivoweb.org/ontology/core#roleIn"); @@ -111,8 +111,16 @@ if ( ((String)request.getAttribute("predicateUri")).endsWith("hasPrincipalInvest - - ${editMode == "repair" ? "" : "" } + + + + + + <%-- editMode == "repair" --%> + + + + @@ -130,22 +138,20 @@ if ( ((String)request.getAttribute("predicateUri")).endsWith("hasPrincipalInvest @prefix core: <${vivoCore}> . @prefix rdf: <${rdf}> . - ?person ?rolePredicate ?role. - ?role rdf:type ?roleType . - ?role core:roleIn ?grant . - ?grant core:relatedRole ?role . + ?person ?rolePredicate ?role. + + ?role a ?roleType ; + core:roleIn ?grant . + + ?grant a core:Grant ; + core:relatedRole ?role . + ?role ?inverseRolePredicate ?person. - - @prefix core: <${vivoCore}> . - @prefix rdf: <${rdf}> . - ?grant rdf:type core:Grant . - - @prefix rdfs: <${rdfs}> . ?grant rdfs:label ?grantLabel . @@ -187,7 +193,7 @@ PREFIX core: <${vivoCore}> "n3required" : [ "${n3ForGrantRole}", "${startYearAssertion}" ], - "n3optional" : [ "${n3ForGrantType}", "${n3ForGrantLabel}", "${n3ForInverse}", "${endYearAssertion}" ], + "n3optional" : [ "${n3ForGrantLabel}", "${n3ForInverse}", "${endYearAssertion}" ], "newResources" : { "role" : "${defaultNamespace}", "grant" : "${defaultNamespace}" }, @@ -212,7 +218,7 @@ PREFIX core: <${vivoCore}> "objectClassUri" : "${grantTypeUriJson}", "rangeDatatypeUri" : "", "rangeLang" : "", - "assertions" : [ ] + "assertions" : [ "${n3ForGrantRole}" ] }, "grantLabel" : { "newResource" : "false", @@ -223,7 +229,7 @@ PREFIX core: <${vivoCore}> "objectClassUri" : "", "rangeDatatypeUri" : "${stringDatatypeUriJson}", "rangeLang" : "", - "assertions" : ["${n3ForGrantLabel}"] + "assertions" : ["${n3ForGrantLabel}", "${n3ForGrantRole}" ] }, "existingGrantLabel" : { /* Needed iff we return from an invalid submission */ "newResource" : "false", @@ -263,6 +269,7 @@ PREFIX core: <${vivoCore}> <% + EditConfiguration editConfig = EditConfiguration.getConfigFromSession(session,request); if (editConfig == null) { @@ -319,7 +326,7 @@ PREFIX core: <${vivoCore}>

- <%-- Store this value in a hidden field, because the displayed field is disabled and don't submit. This ensures that when + <%-- Store this value in a hidden field, because the displayed field is disabled and doesn't submit. This ensures that when returning from a validation error, we retain the value. --%> diff --git a/productMods/edit/forms/addRoleToPersonTwoStage.jsp b/productMods/edit/forms/addRoleToPersonTwoStage.jsp index 30b4e142..0fc24568 100644 --- a/productMods/edit/forms/addRoleToPersonTwoStage.jsp +++ b/productMods/edit/forms/addRoleToPersonTwoStage.jsp @@ -115,7 +115,7 @@ public static Log log = LogFactory.getLog("edu.cornell.mannlib.vitro.webapp.jsp. 3. Repair a bad role node. There is a subject, prediate and object but there is no individual on the other end of the object's core:roleIn stmt. This should be similar to an add but the form should be expanded. - 4. Really bad node. multiple roleIn statements. + 4. Really bad node. multiple core:roleIn statements. */ EditMode mode = FrontEndEditingUtils.getEditMode(request, "http://vivoweb.org/ontology/core#roleIn"); diff --git a/productMods/edit/forms/personHasEducationalTraining.jsp b/productMods/edit/forms/personHasEducationalTraining.jsp index 12c9ca0e..7ba6dd7f 100644 --- a/productMods/edit/forms/personHasEducationalTraining.jsp +++ b/productMods/edit/forms/personHasEducationalTraining.jsp @@ -523,6 +523,8 @@ This goes to an experimental FM based form:

+ <%-- Store these values in hidden fields, because the displayed fields are disabled and don't submit. This ensures that when + returning from a validation error, we retain the values. --%>