NIHVIVO-193, NIHVIVO-194. Cleaned up n3 statements in position history and educational background forms. Restored degree to required status in educational background status; had temporarily been made optional due to bugs related to the degree which have now been fixed.
This commit is contained in:
parent
af70c12a6a
commit
c0c802af96
2 changed files with 33 additions and 36 deletions
|
@ -45,16 +45,15 @@
|
||||||
<c:set var="rdf" value="<%= VitroVocabulary.RDF %>" />
|
<c:set var="rdf" value="<%= VitroVocabulary.RDF %>" />
|
||||||
<c:set var="rdfs" value="<%= VitroVocabulary.RDFS %>" />
|
<c:set var="rdfs" value="<%= VitroVocabulary.RDFS %>" />
|
||||||
<c:set var="label" value="${rdfs}label" />
|
<c:set var="label" value="${rdfs}label" />
|
||||||
<c:set var="type" value="${rdf}type" />
|
|
||||||
<c:set var="edBackgroundClass" value="${vivoCore}EducationalBackground" />
|
<c:set var="edBackgroundClass" value="${vivoCore}EducationalBackground" />
|
||||||
<c:set var="orgClass" value="http://xmlns.com/foaf/0.1/Organization" />
|
<c:set var="orgClass" value="http://xmlns.com/foaf/0.1/Organization" />
|
||||||
<c:set var="degreeClass" value="${vivoCore}AcademicDegree" />
|
<c:set var="degreeClass" value="${vivoCore}AcademicDegree" />
|
||||||
<%--
|
<%--
|
||||||
Classes:
|
Classes:
|
||||||
core:EducationalBackground - new entity
|
core:EducationalBackground - primary new individual being created
|
||||||
foaf:Person
|
foaf:Person - existing individual
|
||||||
foaf:Organization
|
foaf:Organization - new or existing individual
|
||||||
core:AcademicDegree
|
core:AcademicDegree - existing individual
|
||||||
|
|
||||||
Data properties of EducationalBackground:
|
Data properties of EducationalBackground:
|
||||||
core:majorField
|
core:majorField
|
||||||
|
@ -72,9 +71,6 @@ core:awardedTo (AcademicDegree : EducationalBackground) - inverse of degreeTypeA
|
||||||
|
|
||||||
core:organizationGrantingDegree (EducationalBackground : Organization) - no inverse
|
core:organizationGrantingDegree (EducationalBackground : Organization) - no inverse
|
||||||
|
|
||||||
--%>
|
|
||||||
|
|
||||||
|
|
||||||
<%-- Data properties --%>
|
<%-- Data properties --%>
|
||||||
<%-- Then enter a SPARQL query for each field, by convention concatenating the field id with "Existing"
|
<%-- Then enter a SPARQL query for each field, by convention concatenating the field id with "Existing"
|
||||||
to convey that the expression is used to retrieve any existing value for the field in an existing individual.
|
to convey that the expression is used to retrieve any existing value for the field in an existing individual.
|
||||||
|
@ -160,23 +156,25 @@ core:organizationGrantingDegree (EducationalBackground : Organization) - no inve
|
||||||
</v:jsonset>
|
</v:jsonset>
|
||||||
|
|
||||||
<v:jsonset var="newOrgTypeAssertion">
|
<v:jsonset var="newOrgTypeAssertion">
|
||||||
?newOrg <${type}> ?newOrgType .
|
?newOrg a ?newOrgType .
|
||||||
</v:jsonset>
|
</v:jsonset>
|
||||||
|
|
||||||
<v:jsonset var="n3ForStmtToPerson">
|
<v:jsonset var="n3ForStmtToPerson">
|
||||||
@prefix core: <${vivoCore}> .
|
@prefix core: <${vivoCore}> .
|
||||||
|
|
||||||
?person core:educationalBackground ?edBackgroundUri .
|
?person core:educationalBackground ?edBackgroundUri .
|
||||||
?edBackgroundUri core:educationalBackgroundOf ?person .
|
|
||||||
?edBackgroundUri <${type}> core:EducationalBackground .
|
?edBackgroundUri core:educationalBackgroundOf ?person ;
|
||||||
?edBackgroundUri <${type}> <${flagURI}> .
|
a core:EducationalBackground ;
|
||||||
|
a <${flagURI}> .
|
||||||
</v:jsonset>
|
</v:jsonset>
|
||||||
|
|
||||||
<v:jsonset var="n3ForNewOrg">
|
<v:jsonset var="n3ForNewOrg">
|
||||||
?newOrg <${label}> ?newOrgName .
|
?newOrg <${label}> ?newOrgName ;
|
||||||
?newOrg <${type}> ?newOrgType .
|
a ?newOrgType ;
|
||||||
|
a <${flagURI}> .
|
||||||
|
|
||||||
?edBackgroundUri <${orgGrantingDegree}> ?newOrg .
|
?edBackgroundUri <${orgGrantingDegree}> ?newOrg .
|
||||||
?newOrg <${type}> <${flagURI}> .
|
|
||||||
</v:jsonset>
|
</v:jsonset>
|
||||||
|
|
||||||
<v:jsonset var="edBackgroundClassUriJson">${edBackgroundClass}</v:jsonset>
|
<v:jsonset var="edBackgroundClassUriJson">${edBackgroundClass}</v:jsonset>
|
||||||
|
@ -193,11 +191,11 @@ core:organizationGrantingDegree (EducationalBackground : Organization) - no inve
|
||||||
"predicate" : ["predicate", "${predicateUriJson}" ],
|
"predicate" : ["predicate", "${predicateUriJson}" ],
|
||||||
"object" : ["edBackgroundUri", "${objectUriJson}", "URI" ],
|
"object" : ["edBackgroundUri", "${objectUriJson}", "URI" ],
|
||||||
|
|
||||||
"n3required" : [ "${n3ForStmtToPerson}", "${majorFieldAssertion}", "${yearAssertion}" ],
|
"n3required" : [ "${n3ForStmtToPerson}", "${degreeAssertion}", "${majorFieldAssertion}", "${yearAssertion}" ],
|
||||||
|
|
||||||
"n3optional" : [ "${organizationUriAssertion}",
|
"n3optional" : [ "${organizationUriAssertion}",
|
||||||
"${n3ForNewOrg}", "${newOrgNameAssertion}", "${newOrgTypeAssertion}",
|
"${n3ForNewOrg}", "${newOrgNameAssertion}", "${newOrgTypeAssertion}",
|
||||||
"${deptAssertion}", "${infoAssertion}", "${degreeAssertion}" ],
|
"${deptAssertion}", "${infoAssertion}" ],
|
||||||
|
|
||||||
"newResources" : { "edBackgroundUri" : "${defaultNamespace}",
|
"newResources" : { "edBackgroundUri" : "${defaultNamespace}",
|
||||||
"newOrg" : "${defaultNamespace}" },
|
"newOrg" : "${defaultNamespace}" },
|
||||||
|
@ -222,7 +220,7 @@ core:organizationGrantingDegree (EducationalBackground : Organization) - no inve
|
||||||
"fields" : {
|
"fields" : {
|
||||||
"degreeUri" : {
|
"degreeUri" : {
|
||||||
"newResource" : "false",
|
"newResource" : "false",
|
||||||
"validators" : [ ],
|
"validators" : [ "nonempty" ],
|
||||||
"optionsType" : "INDIVIDUALS_VIA_VCLASS",
|
"optionsType" : "INDIVIDUALS_VIA_VCLASS",
|
||||||
"literalOptions" : [ "Select one" ],
|
"literalOptions" : [ "Select one" ],
|
||||||
"predicateUri" : "",
|
"predicateUri" : "",
|
||||||
|
@ -338,7 +336,7 @@ core:organizationGrantingDegree (EducationalBackground : Organization) - no inve
|
||||||
<c:set var="editType" value="edit" />
|
<c:set var="editType" value="edit" />
|
||||||
<c:set var="title" value="Edit educational background entry for ${subjectName}" />
|
<c:set var="title" value="Edit educational background entry for ${subjectName}" />
|
||||||
<%-- NB This will be the button text when Javascript is disabled. --%>
|
<%-- NB This will be the button text when Javascript is disabled. --%>
|
||||||
<c:set var="submitLabel" value="Save changes" />
|
<c:set var="submitLabel" value="Save Changes" />
|
||||||
<%
|
<%
|
||||||
} else { // adding new entry
|
} else { // adding new entry
|
||||||
%>
|
%>
|
||||||
|
|
|
@ -42,10 +42,8 @@
|
||||||
%>
|
%>
|
||||||
|
|
||||||
<c:set var="vivoCore" value="http://vivoweb.org/ontology/core#" />
|
<c:set var="vivoCore" value="http://vivoweb.org/ontology/core#" />
|
||||||
<c:set var="rdf" value="<%= VitroVocabulary.RDF %>" />
|
|
||||||
<c:set var="rdfs" value="<%= VitroVocabulary.RDFS %>" />
|
<c:set var="rdfs" value="<%= VitroVocabulary.RDFS %>" />
|
||||||
<c:set var="label" value="${rdfs}label" />
|
<c:set var="label" value="${rdfs}label" />
|
||||||
<c:set var="type" value="${rdf}type" />
|
|
||||||
<c:set var="positionClass" value="${vivoCore}Position" />
|
<c:set var="positionClass" value="${vivoCore}Position" />
|
||||||
<c:set var="orgClass" value="http://xmlns.com/foaf/0.1/Organization" />
|
<c:set var="orgClass" value="http://xmlns.com/foaf/0.1/Organization" />
|
||||||
|
|
||||||
|
@ -63,8 +61,8 @@
|
||||||
The actual assertion inserted in the model will be created via string substitution into the ? variables.
|
The actual assertion inserted in the model will be created via string substitution into the ? variables.
|
||||||
NOTE the pattern of punctuation (a period after the prefix URI and after the ?field) --%>
|
NOTE the pattern of punctuation (a period after the prefix URI and after the ?field) --%>
|
||||||
<v:jsonset var="titleAssertion" >
|
<v:jsonset var="titleAssertion" >
|
||||||
?positionUri <${titlePred}> ?title .
|
?positionUri <${titlePred}> ?title ;
|
||||||
?positionUri <${label}> ?title.
|
<${label}> ?title.
|
||||||
</v:jsonset>
|
</v:jsonset>
|
||||||
|
|
||||||
<c:set var="startYearPred" value="${vivoCore}startYear" />
|
<c:set var="startYearPred" value="${vivoCore}startYear" />
|
||||||
|
@ -101,10 +99,10 @@
|
||||||
|
|
||||||
<v:jsonset var="positionTypeExisting">
|
<v:jsonset var="positionTypeExisting">
|
||||||
SELECT ?existingPositionType WHERE {
|
SELECT ?existingPositionType WHERE {
|
||||||
?positionUri <${type}> ?existingPositionType }
|
?positionUri a ?existingPositionType }
|
||||||
</v:jsonset>
|
</v:jsonset>
|
||||||
<v:jsonset var="positionTypeAssertion">
|
<v:jsonset var="positionTypeAssertion">
|
||||||
?positionUri <${type}> ?positionType .
|
?positionUri a ?positionType .
|
||||||
</v:jsonset>
|
</v:jsonset>
|
||||||
|
|
||||||
<v:jsonset var="newOrgNameAssertion">
|
<v:jsonset var="newOrgNameAssertion">
|
||||||
|
@ -112,24 +110,26 @@
|
||||||
</v:jsonset>
|
</v:jsonset>
|
||||||
|
|
||||||
<v:jsonset var="newOrgTypeAssertion">
|
<v:jsonset var="newOrgTypeAssertion">
|
||||||
?newOrg <${type}> ?newOrgType .
|
?newOrg a ?newOrgType .
|
||||||
</v:jsonset>
|
</v:jsonset>
|
||||||
|
|
||||||
<v:jsonset var="n3ForStmtToPerson">
|
<v:jsonset var="n3ForStmtToPerson">
|
||||||
@prefix core: <${vivoCore}> .
|
@prefix core: <${vivoCore}> .
|
||||||
|
|
||||||
?person core:personInPosition ?positionUri .
|
?person core:personInPosition ?positionUri .
|
||||||
?positionUri core:positionForPerson ?person .
|
|
||||||
?positionUri <${type}> ?positionType .
|
?positionUri core:positionForPerson ?person ;
|
||||||
?positionUri <${type}> <${flagURI}> .
|
a ?positionType ;
|
||||||
|
a <${flagURI}> .
|
||||||
</v:jsonset>
|
</v:jsonset>
|
||||||
|
|
||||||
<v:jsonset var="n3ForNewOrg">
|
<v:jsonset var="n3ForNewOrg">
|
||||||
?newOrg <${label}> ?newOrgName .
|
|
||||||
?newOrg <${type}> ?newOrgType .
|
|
||||||
?positionUri <${positionInOrgPred}> ?newOrg .
|
?positionUri <${positionInOrgPred}> ?newOrg .
|
||||||
?newOrg <${orgForPositionPred}> ?positionUri .
|
|
||||||
?newOrg <${type}> <${flagURI}> .
|
?newOrg <${label}> ?newOrgName ;
|
||||||
|
a ?newOrgType ;
|
||||||
|
<${orgForPositionPred}> ?positionUri ;
|
||||||
|
a <${flagURI}> .
|
||||||
</v:jsonset>
|
</v:jsonset>
|
||||||
|
|
||||||
<v:jsonset var="positionClassUriJson">${positionClass}</v:jsonset>
|
<v:jsonset var="positionClassUriJson">${positionClass}</v:jsonset>
|
||||||
|
@ -157,8 +157,7 @@
|
||||||
"urisInScope" : { },
|
"urisInScope" : { },
|
||||||
"literalsInScope": { },
|
"literalsInScope": { },
|
||||||
"urisOnForm" : [ "organizationUri", "newOrgType", "positionType" ],
|
"urisOnForm" : [ "organizationUri", "newOrgType", "positionType" ],
|
||||||
"literalsOnForm" : [ "title", "newOrgName",
|
"literalsOnForm" : [ "title", "newOrgName", "startYear", "endYear" ],
|
||||||
"startYear", "endYear" ],
|
|
||||||
"filesOnForm" : [ ],
|
"filesOnForm" : [ ],
|
||||||
"sparqlForLiterals" : { },
|
"sparqlForLiterals" : { },
|
||||||
"sparqlForUris" : { },
|
"sparqlForUris" : { },
|
||||||
|
|
Loading…
Add table
Reference in a new issue