NIHVIVO-356, NIHVIVO-362 Merging custom form fixes from rel-1.0-maint branch.

This commit is contained in:
rjy7 2010-04-12 21:26:09 +00:00
parent 60f93a2875
commit a8b39bf005
2 changed files with 38 additions and 28 deletions

View file

@ -141,21 +141,15 @@ core:organizationGrantingDegree (EducationalBackground : Organization) - no inve
?edBackgroundUri <${orgGrantingDegree}> ?organizationUri .
</v:jsonset>
<%-- Do we need anything like this? EducationalBackground has no subtypes
<v:jsonset var="positionTypeExisting">
SELECT ?existingPositionType WHERE {
?positionUri <${type}> ?existingPositionType }
</v:jsonset>
<v:jsonset var="positionTypeAssertion">
?positionUri <${type}> ?positionType .
</v:jsonset>
--%>
<v:jsonset var="newOrgNameAssertion">
?newOrg <${label}> ?newOrgName .
</v:jsonset>
<%-- Break up the new org type and subclass assertions, so that if there is no subclass,
the org type still gets asserted. --%>
<v:jsonset var="newOrgTypeAssertion">
?newOrg a <${orgClass}> .
</v:jsonset>
<v:jsonset var="newOrgSubClassAssertion">
?newOrg a ?newOrgType .
</v:jsonset>
@ -171,11 +165,16 @@ core:organizationGrantingDegree (EducationalBackground : Organization) - no inve
<v:jsonset var="n3ForNewOrg">
?newOrg <${label}> ?newOrgName ;
a ?newOrgType ;
a <${flagURI}> .
a <${orgClass}> ,
<${flagURI}> .
?edBackgroundUri <${orgGrantingDegree}> ?newOrg .
</v:jsonset>
<%-- Break up the new org type and subclass assertions, so that if there is no subclass,
the type still gets asserted. --%>
<v:jsonset var="n3ForNewOrgSubClass">
?newOrg a ?newOrgType .
</v:jsonset>
<v:jsonset var="edBackgroundClassUriJson">${edBackgroundClass}</v:jsonset>
<v:jsonset var="orgClassUriJson">${orgClass}</v:jsonset>
@ -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",

View file

@ -108,8 +108,12 @@
<v:jsonset var="newOrgNameAssertion">
?newOrg <${label}> ?newOrgName .
</v:jsonset>
<%-- Break up the new org type and subclass assertions, so that if there is no subclass,
the type still gets asserted. --%>
<v:jsonset var="newOrgTypeAssertion">
?newOrg a <${orgClass}> .
</v:jsonset>
<v:jsonset var="newOrgSubClassAssertion">
?newOrg a ?newOrgType .
</v:jsonset>
@ -119,17 +123,24 @@
?person core:personInPosition ?positionUri .
?positionUri core:positionForPerson ?person ;
a ?positionType ;
a <${flagURI}> .
a ?positionType ,
<${flagURI}> .
</v:jsonset>
<v:jsonset var="n3ForNewOrg">
?positionUri <${positionInOrgPred}> ?newOrg .
?newOrg <${label}> ?newOrgName ;
a ?newOrgType ;
<${orgForPositionPred}> ?positionUri ;
a <${flagURI}> .
?newOrg <${label}> ?newOrgName .
?newOrg a <${orgClass}> ,
<${flagURI}> ;
<${orgForPositionPred}> ?positionUri .
</v:jsonset>
<%-- Break up the new org type and subclass assertions, so that if there is no subclass,
the type still gets asserted. --%>
<v:jsonset var="n3ForNewOrgSubClass">
?newOrg a ?newOrgType .
</v:jsonset>
<v:jsonset var="positionClassUriJson">${positionClass}</v:jsonset>
@ -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",