From a8b39bf005dbee0cabe8513fb1d36d7d138f0cf2 Mon Sep 17 00:00:00 2001 From: rjy7 Date: Mon, 12 Apr 2010 21:26:09 +0000 Subject: [PATCH] NIHVIVO-356, NIHVIVO-362 Merging custom form fixes from rel-1.0-maint branch. --- .../forms/personHasEducationalBackground.jsp | 33 +++++++++---------- .../edit/forms/personHasPositionHistory.jsp | 33 ++++++++++++------- 2 files changed, 38 insertions(+), 28 deletions(-) diff --git a/productMods/edit/forms/personHasEducationalBackground.jsp b/productMods/edit/forms/personHasEducationalBackground.jsp index dedf8077..6fdb2e99 100644 --- a/productMods/edit/forms/personHasEducationalBackground.jsp +++ b/productMods/edit/forms/personHasEducationalBackground.jsp @@ -141,21 +141,15 @@ core:organizationGrantingDegree (EducationalBackground : Organization) - no inve ?edBackgroundUri <${orgGrantingDegree}> ?organizationUri . -<%-- Do we need anything like this? EducationalBackground has no subtypes - - SELECT ?existingPositionType WHERE { - ?positionUri <${type}> ?existingPositionType } - - - ?positionUri <${type}> ?positionType . - ---%> - ?newOrg <${label}> ?newOrgName . - +<%-- Break up the new org type and subclass assertions, so that if there is no subclass, +the org type still gets asserted. --%> + ?newOrg a <${orgClass}> . + + ?newOrg a ?newOrgType . @@ -171,11 +165,16 @@ core:organizationGrantingDegree (EducationalBackground : Organization) - no inve ?newOrg <${label}> ?newOrgName ; - a ?newOrgType ; - a <${flagURI}> . + a <${orgClass}> , + <${flagURI}> . ?edBackgroundUri <${orgGrantingDegree}> ?newOrg . +<%-- Break up the new org type and subclass assertions, so that if there is no subclass, +the type still gets asserted. --%> + + ?newOrg a ?newOrgType . + ${edBackgroundClass} ${orgClass} @@ -194,8 +193,8 @@ core:organizationGrantingDegree (EducationalBackground : Organization) - no inve "n3required" : [ "${n3ForStmtToPerson}", "${degreeAssertion}", "${majorFieldAssertion}", "${yearAssertion}" ], "n3optional" : [ "${organizationUriAssertion}", - "${n3ForNewOrg}", "${newOrgNameAssertion}", "${newOrgTypeAssertion}", - "${deptAssertion}", "${infoAssertion}" ], + "${n3ForNewOrg}", "${n3ForNewOrgSubClass}", "${newOrgNameAssertion}", "${newOrgTypeAssertion}", + "${newOrgSubClassAssertion}", "${deptAssertion}", "${infoAssertion}" ], "newResources" : { "edBackgroundUri" : "${defaultNamespace}", "newOrg" : "${defaultNamespace}" }, @@ -271,7 +270,7 @@ core:organizationGrantingDegree (EducationalBackground : Organization) - no inve "objectClassUri" : "", "rangeDatatypeUri" : "${stringDatatypeUriJson}", "rangeLang" : "", - "assertions" : [ "${n3ForNewOrg}" ] + "assertions" : [ "${n3ForNewOrg}", "${n3ForNewOrgSubClass}" ] }, "newOrgType" : { "newResource" : "false", @@ -282,7 +281,7 @@ core:organizationGrantingDegree (EducationalBackground : Organization) - no inve "objectClassUri" : "${orgClassUriJson}", "rangeDatatypeUri" : "", "rangeLang" : "", - "assertions" : [ "${newOrgTypeAssertion}" ] + "assertions" : [ "${newOrgTypeAssertion}", "${newOrgSubClassAssertion}" ] }, "dept" : { "newResource" : "false", diff --git a/productMods/edit/forms/personHasPositionHistory.jsp b/productMods/edit/forms/personHasPositionHistory.jsp index de0f2eaa..c3a54fab 100644 --- a/productMods/edit/forms/personHasPositionHistory.jsp +++ b/productMods/edit/forms/personHasPositionHistory.jsp @@ -108,8 +108,12 @@ ?newOrg <${label}> ?newOrgName . - +<%-- Break up the new org type and subclass assertions, so that if there is no subclass, +the type still gets asserted. --%> + ?newOrg a <${orgClass}> . + + ?newOrg a ?newOrgType . @@ -119,17 +123,24 @@ ?person core:personInPosition ?positionUri . ?positionUri core:positionForPerson ?person ; - a ?positionType ; - a <${flagURI}> . + a ?positionType , + <${flagURI}> . ?positionUri <${positionInOrgPred}> ?newOrg . - ?newOrg <${label}> ?newOrgName ; - a ?newOrgType ; - <${orgForPositionPred}> ?positionUri ; - a <${flagURI}> . + ?newOrg <${label}> ?newOrgName . + + ?newOrg a <${orgClass}> , + <${flagURI}> ; + <${orgForPositionPred}> ?positionUri . + + +<%-- Break up the new org type and subclass assertions, so that if there is no subclass, +the type still gets asserted. --%> + + ?newOrg a ?newOrgType . ${positionClass} @@ -148,8 +159,8 @@ "n3required" : [ "${n3ForStmtToPerson}", "${titleAssertion}", "${startYearAssertion}" ], "n3optional" : [ "${organizationUriAssertion}", - "${n3ForNewOrg}", "${newOrgNameAssertion}", "${newOrgTypeAssertion}", - "${endYearAssertion}"], + "${n3ForNewOrg}", "${n3ForNewOrgSubClass}", "${newOrgNameAssertion}", "${newOrgTypeAssertion}", + "${newOrgSubClassAssertion}", "${endYearAssertion}"], "newResources" : { "positionUri" : "${defaultNamespace}", "newOrg" : "${defaultNamespace}" }, @@ -213,7 +224,7 @@ "objectClassUri" : "", "rangeDatatypeUri" : "${stringDatatypeUriJson}", "rangeLang" : "", - "assertions" : [ "${n3ForNewOrg}" ] + "assertions" : [ "${n3ForNewOrg}", "${n3ForNewOrgSubClass}" ] }, "newOrgType" : { "newResource" : "false", @@ -224,7 +235,7 @@ "objectClassUri" : "${orgClassUriJson}", "rangeDatatypeUri" : "", "rangeLang" : "", - "assertions" : [ "${newOrgTypeAssertion}" ] + "assertions" : [ "${newOrgTypeAssertion}", "${newOrgSubClassAssertion}" ] }, "startYear" : { "newResource" : "false",