VIVO-112: ISF updates for advising relationship plus a couple of fixes
This commit is contained in:
parent
17b90964d0
commit
e05f5d6fb4
5 changed files with 359 additions and 243 deletions
|
@ -28,10 +28,12 @@
|
|||
?subject ?property ?advisory
|
||||
LET ( ?localName := afn:localname(?advisory) )
|
||||
OPTIONAL { ?advisory rdfs:label ?advisoryLabel }
|
||||
OPTIONAL { ?advisory core:advisee ?advisee
|
||||
OPTIONAL { ?advisory core:relates ?advisee .
|
||||
?advisee a foaf:Person .
|
||||
OPTIONAL { ?advisee rdfs:label ?adviseeLabel }
|
||||
}
|
||||
OPTIONAL { ?advisory core:degreeCandidacy ?degree
|
||||
OPTIONAL { ?advisory core:relates ?degree .
|
||||
?degree a core:AcademicDegree .
|
||||
OPTIONAL { ?degree rdfs:label ?degreeLabel }
|
||||
OPTIONAL { ?degree core:abbreviation ?degreeAbbr }
|
||||
}
|
||||
|
@ -51,7 +53,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
FILTER ( ?subject != ?advisee )
|
||||
} ORDER BY <collated>?subclass</collated> DESC(?dateTimeEnd)
|
||||
</query-select>
|
||||
|
||||
|
@ -70,16 +72,20 @@
|
|||
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
||||
CONSTRUCT {
|
||||
?subject ?property ?advisory .
|
||||
?advisory a core:AdvisingRelationship .
|
||||
?advisory ?advisoryProperty ?advisoryValue .
|
||||
?advisory rdfs:label ?advisoryLabel
|
||||
} WHERE {
|
||||
{
|
||||
?subject ?property ?advisory
|
||||
?subject ?property ?advisory .
|
||||
?advisory a core:AdvisingRelationship
|
||||
} UNION {
|
||||
?subject ?property ?advisory .
|
||||
?advisory a core:AdvisingRelationship .
|
||||
?advisory ?advisoryProperty ?advisoryValue
|
||||
} UNION {
|
||||
?subject ?property ?advisory .
|
||||
?advisory a core:AdvisingRelationship .
|
||||
?advisory ?advisoryProperty ?advisoryValue .
|
||||
?advisory rdfs:label ?advisoryLabel
|
||||
}
|
||||
|
@ -94,31 +100,45 @@
|
|||
|
||||
CONSTRUCT {
|
||||
?subject ?property ?advisory .
|
||||
?advisory core:advisee ?advisee .
|
||||
?advisory a core:AdvisingRelationship .
|
||||
?advisory core:relates ?advisee .
|
||||
?advisee a foaf:Person .
|
||||
?advisee rdfs:label ?adviseeLabel .
|
||||
?advisory core:degreeCandidacy ?degree .
|
||||
?advisory core:relates ?degree .
|
||||
?degree a core:AcademicDegree .
|
||||
?degree rdfs:label ?degreeLabel .
|
||||
?degree core:abbreviation ?degreeAbbr
|
||||
} WHERE {
|
||||
{
|
||||
?subject ?property ?advisory
|
||||
?subject ?property ?advisory .
|
||||
?advisory a core:AdvisingRelationship .
|
||||
} UNION {
|
||||
?subject ?property ?advisory.
|
||||
?advisory core:advisee ?advisee
|
||||
?advisory a core:AdvisingRelationship .
|
||||
?advisory core:relates ?advisee .
|
||||
?advisee a foaf:Person .
|
||||
} UNION {
|
||||
?subject ?property ?advisory .
|
||||
?advisory core:advisee ?advisee .
|
||||
?advisory a core:AdvisingRelationship .
|
||||
?advisory core:relates ?advisee .
|
||||
?advisee a foaf:Person .
|
||||
?advisee rdfs:label ?adviseeLabel
|
||||
} UNION {
|
||||
?subject ?property ?advisory .
|
||||
?advisory core:degreeCandidacy ?degree
|
||||
?advisory a core:AdvisingRelationship .
|
||||
?advisory core:relates ?degree .
|
||||
?degree a core:AcademicDegree .
|
||||
} UNION {
|
||||
?subject ?property ?advisory .
|
||||
?advisory core:degreeCandidacy ?degree .
|
||||
?advisory a core:AdvisingRelationship .
|
||||
?advisory core:relates ?degree .
|
||||
?degree a core:AcademicDegree .
|
||||
?degree rdfs:label ?degreeLabel
|
||||
} UNION {
|
||||
?subject ?property ?advisory .
|
||||
?advisory core:degreeCandidacy ?degree .
|
||||
?advisory a core:AdvisingRelationship .
|
||||
?advisory core:relates ?degree .
|
||||
?degree a core:AcademicDegree .
|
||||
?degree rdfs:label ?degreeLabel .
|
||||
?degree core:abbreviation ?degreeAbbr
|
||||
}
|
||||
|
@ -128,12 +148,14 @@
|
|||
<query-construct>
|
||||
PREFIX core: <http://vivoweb.org/ontology/core#>
|
||||
CONSTRUCT {
|
||||
?subject ?property ?award .
|
||||
?subject ?property ?advisory .
|
||||
?advisory a core:AdvisingRelationship .
|
||||
?award core:dateTimeInterval ?dateTimeInterval .
|
||||
?dateTimeInterval core:start ?dateTimeStartValue .
|
||||
?dateTimeStartValue core:dateTime ?dateTimeStart
|
||||
} WHERE {
|
||||
?subject ?property ?award .
|
||||
?subject ?property ?advisory .
|
||||
?advisory a core:AdvisingRelationship .
|
||||
?award core:dateTimeInterval ?dateTimeInterval .
|
||||
?dateTimeInterval core:start ?dateTimeStartValue .
|
||||
?dateTimeStartValue core:dateTime ?dateTimeStart
|
||||
|
@ -143,12 +165,14 @@
|
|||
<query-construct>
|
||||
PREFIX core: <http://vivoweb.org/ontology/core#>
|
||||
CONSTRUCT {
|
||||
?subject ?property ?award .
|
||||
?subject ?property ?advisory .
|
||||
?advisory a core:AdvisingRelationship .
|
||||
?award core:dateTimeInterval ?dateTimeInterval .
|
||||
?dateTimeInterval core:end ?dateTimeEndValue .
|
||||
?dateTimeEndValue core:dateTime ?dateTimeEnd
|
||||
} WHERE {
|
||||
?subject ?property ?award .
|
||||
?subject ?property ?advisory .
|
||||
?advisory a core:AdvisingRelationship .
|
||||
?award core:dateTimeInterval ?dateTimeInterval .
|
||||
?dateTimeInterval core:end ?dateTimeEndValue .
|
||||
?dateTimeEndValue core:dateTime ?dateTimeEnd
|
||||
|
|
|
@ -61,6 +61,7 @@ local:authorInAuthorshipConfig a :ObjectPropertyDisplayConfig ;
|
|||
local:hasServiceProviderRoleContext a :ConfigContext ;
|
||||
:hasConfiguration local:hasServiceProviderRoleConfig ;
|
||||
:configContextFor <http://purl.obolibrary.org/obo/RO_0000053> ;
|
||||
:qualifiedByDomain <http://xmlns.com/foaf/0.1/Person> ;
|
||||
:qualifiedBy <http://purl.obolibrary.org/obo/ERO_0000012> .
|
||||
|
||||
local:hasServiceProviderRoleConfig a :ObjectPropertyDisplayConfig ;
|
||||
|
@ -75,6 +76,7 @@ local:hasServiceProviderRoleConfig a :ObjectPropertyDisplayConfig ;
|
|||
local:hasClinicalRoleContext a :ConfigContext ;
|
||||
:hasConfiguration local:hasClinicalRoleConfig ;
|
||||
:configContextFor <http://purl.obolibrary.org/obo/RO_0000053> ;
|
||||
:qualifiedByDomain <http://xmlns.com/foaf/0.1/Person> ;
|
||||
:qualifiedBy <http://vivoweb.org/ontology/core#ClinicalRole> .
|
||||
|
||||
local:hasClinicalRoleConfig a :ObjectPropertyDisplayConfig ;
|
||||
|
@ -89,6 +91,7 @@ local:hasClinicalRoleConfig a :ObjectPropertyDisplayConfig ;
|
|||
local:hasLeaderRoleContext a :ConfigContext ;
|
||||
:hasConfiguration local:hasLeaderRoleConfig ;
|
||||
:configContextFor <http://purl.obolibrary.org/obo/RO_0000053> ;
|
||||
:qualifiedByDomain <http://xmlns.com/foaf/0.1/Person> ;
|
||||
:qualifiedBy <http://vivoweb.org/ontology/core#LeaderRole> .
|
||||
|
||||
local:hasLeaderRoleConfig a :ObjectPropertyDisplayConfig ;
|
||||
|
@ -103,6 +106,7 @@ local:hasLeaderRoleConfig a :ObjectPropertyDisplayConfig ;
|
|||
local:hasMemberRoleContext a :ConfigContext ;
|
||||
:hasConfiguration local:hasMemberRoleConfig ;
|
||||
:configContextFor <http://purl.obolibrary.org/obo/RO_0000053> ;
|
||||
:qualifiedByDomain <http://xmlns.com/foaf/0.1/Person> ;
|
||||
:qualifiedBy <http://vivoweb.org/ontology/core#MemberRole> .
|
||||
|
||||
local:hasMemberRoleConfig a :ObjectPropertyDisplayConfig ;
|
||||
|
@ -117,6 +121,7 @@ local:hasMemberRoleConfig a :ObjectPropertyDisplayConfig ;
|
|||
local:hasTeacherRoleContext a :ConfigContext ;
|
||||
:hasConfiguration local:hasTeacherRoleConfig ;
|
||||
:configContextFor <http://purl.obolibrary.org/obo/RO_0000053> ;
|
||||
:qualifiedByDomain <http://xmlns.com/foaf/0.1/Person> ;
|
||||
:qualifiedBy <http://vivoweb.org/ontology/core#TeacherRole> .
|
||||
|
||||
local:hasTeacherRoleConfig a :ObjectPropertyDisplayConfig ;
|
||||
|
@ -131,6 +136,7 @@ local:hasTeacherRoleConfig a :ObjectPropertyDisplayConfig ;
|
|||
local:hasEditorRoleContext a :ConfigContext ;
|
||||
:hasConfiguration local:hasEditorRoleConfig ;
|
||||
:configContextFor <http://purl.obolibrary.org/obo/RO_0000053> ;
|
||||
:qualifiedByDomain <http://xmlns.com/foaf/0.1/Person> ;
|
||||
:qualifiedBy <http://vivoweb.org/ontology/core#EditorRole> .
|
||||
|
||||
local:hasEditorRoleConfig a :ObjectPropertyDisplayConfig ;
|
||||
|
@ -145,6 +151,7 @@ local:hasEditorRoleConfig a :ObjectPropertyDisplayConfig ;
|
|||
local:hasReviewerRoleContext a :ConfigContext ;
|
||||
:hasConfiguration local:hasReviewerRoleConfig ;
|
||||
:configContextFor <http://purl.obolibrary.org/obo/RO_0000053> ;
|
||||
:qualifiedByDomain <http://xmlns.com/foaf/0.1/Person> ;
|
||||
:qualifiedBy <http://vivoweb.org/ontology/core#ReviewerRole> .
|
||||
|
||||
local:hasReviewerRoleConfig a :ObjectPropertyDisplayConfig ;
|
||||
|
@ -159,6 +166,7 @@ local:hasReviewerRoleConfig a :ObjectPropertyDisplayConfig ;
|
|||
local:hasOrganizerRoleContext a :ConfigContext ;
|
||||
:hasConfiguration local:hasOrganizerRoleConfig ;
|
||||
:configContextFor <http://purl.obolibrary.org/obo/RO_0000053> ;
|
||||
:qualifiedByDomain <http://xmlns.com/foaf/0.1/Person> ;
|
||||
:qualifiedBy <http://vivoweb.org/ontology/core#OrganizerRole> .
|
||||
|
||||
local:hasOrganizerRoleConfig a :ObjectPropertyDisplayConfig ;
|
||||
|
@ -173,6 +181,7 @@ local:hasOrganizerRoleConfig a :ObjectPropertyDisplayConfig ;
|
|||
local:hasOutreachProviderRoleContext a :ConfigContext ;
|
||||
:hasConfiguration local:hasOutreachProviderRoleConfig ;
|
||||
:configContextFor <http://purl.obolibrary.org/obo/RO_0000053> ;
|
||||
:qualifiedByDomain <http://xmlns.com/foaf/0.1/Person> ;
|
||||
:qualifiedBy <http://vivoweb.org/ontology/core#OutreachProviderRole> .
|
||||
|
||||
local:hasOutreachProviderRoleConfig a :ObjectPropertyDisplayConfig ;
|
||||
|
@ -187,6 +196,7 @@ local:hasOutreachProviderRoleConfig a :ObjectPropertyDisplayConfig ;
|
|||
local:hasAttendeeRoleContext a :ConfigContext ;
|
||||
:hasConfiguration local:hasAttendeeRoleConfig ;
|
||||
:configContextFor <http://purl.obolibrary.org/obo/RO_0000053> ;
|
||||
:qualifiedByDomain <http://xmlns.com/foaf/0.1/Person> ;
|
||||
:qualifiedBy <http://vivoweb.org/ontology/core#AttendeeRole> .
|
||||
|
||||
local:hasAttendeeRoleConfig a :ObjectPropertyDisplayConfig ;
|
||||
|
@ -201,6 +211,7 @@ local:hasAttendeeRoleConfig a :ObjectPropertyDisplayConfig ;
|
|||
local:hasResearcherRoleContext a :ConfigContext ;
|
||||
:hasConfiguration local:hasResearcherRoleConfig ;
|
||||
:configContextFor <http://purl.obolibrary.org/obo/RO_0000053> ;
|
||||
:qualifiedByDomain <http://xmlns.com/foaf/0.1/Person> ;
|
||||
:qualifiedBy <http://vivoweb.org/ontology/core#ResearcherRole> .
|
||||
|
||||
local:hasResearcherRoleConfig a :ObjectPropertyDisplayConfig ;
|
||||
|
@ -215,6 +226,7 @@ local:hasResearcherRoleConfig a :ObjectPropertyDisplayConfig ;
|
|||
local:hasInvestigatorRoleContext a :ConfigContext ;
|
||||
:hasConfiguration local:hasInvestigatorRoleConfig ;
|
||||
:configContextFor <http://purl.obolibrary.org/obo/RO_0000053> ;
|
||||
:qualifiedByDomain <http://xmlns.com/foaf/0.1/Person> ;
|
||||
:qualifiedBy <http://vivoweb.org/ontology/core#InvestigatorRole> .
|
||||
|
||||
local:hasInvestigatorRoleConfig a :ObjectPropertyDisplayConfig ;
|
||||
|
@ -229,6 +241,7 @@ local:hasInvestigatorRoleConfig a :ObjectPropertyDisplayConfig ;
|
|||
local:hasPrincipalInvestigatorRoleContext a :ConfigContext ;
|
||||
:hasConfiguration local:hasPrincipalInvestigatorRoleConfig ;
|
||||
:configContextFor <http://purl.obolibrary.org/obo/RO_0000053> ;
|
||||
:qualifiedByDomain <http://xmlns.com/foaf/0.1/Person> ;
|
||||
:qualifiedBy <http://vivoweb.org/ontology/core#PrincipalInvestigatorRole> .
|
||||
|
||||
local:hasPrincipalInvestigatorRoleConfig a :ObjectPropertyDisplayConfig ;
|
||||
|
@ -243,6 +256,7 @@ local:hasPrincipalInvestigatorRoleConfig a :ObjectPropertyDisplayConfig ;
|
|||
local:hasCo-PrincipalInvestigatorRoleContext a :ConfigContext ;
|
||||
:hasConfiguration local:hasCo-PrincipalInvestigatorRoleConfig ;
|
||||
:configContextFor <http://purl.obolibrary.org/obo/RO_0000053> ;
|
||||
:qualifiedByDomain <http://xmlns.com/foaf/0.1/Person> ;
|
||||
:qualifiedBy <http://vivoweb.org/ontology/core#CoPrincipalInvestigatorRole> .
|
||||
|
||||
local:hasCo-PrincipalInvestigatorRoleConfig a :ObjectPropertyDisplayConfig ;
|
||||
|
@ -257,6 +271,7 @@ local:hasCo-PrincipalInvestigatorRoleConfig a :ObjectPropertyDisplayConfig ;
|
|||
local:hasPresenterRoleContext a :ConfigContext ;
|
||||
:hasConfiguration local:hasPresenterRoleConfig ;
|
||||
:configContextFor <http://purl.obolibrary.org/obo/RO_0000053> ;
|
||||
:qualifiedByDomain <http://xmlns.com/foaf/0.1/Person> ;
|
||||
:qualifiedBy <http://vivoweb.org/ontology/core#PresenterRole> .
|
||||
|
||||
local:hasPresenterRoleConfig a :ObjectPropertyDisplayConfig ;
|
||||
|
@ -271,6 +286,7 @@ local:hasPresenterRoleConfig a :ObjectPropertyDisplayConfig ;
|
|||
local:awardOrHonorContext a :ConfigContext ;
|
||||
:hasConfiguration local:awardOrHonorConfig ;
|
||||
:configContextFor <http://vivoweb.org/ontology/core#relatedBy> ;
|
||||
:qualifiedByDomain <http://xmlns.com/foaf/0.1/Person> ;
|
||||
:qualifiedBy <http://vivoweb.org/ontology/core#AwardorHonorReceipt> .
|
||||
|
||||
local:awardOrHonorConfig a :ObjectPropertyDisplayConfig ;
|
||||
|
@ -285,6 +301,7 @@ local:awardOrHonorConfig a :ObjectPropertyDisplayConfig ;
|
|||
local:educationalTrainingContext a :ConfigContext ;
|
||||
:hasConfiguration local:educationalTrainingConfig ;
|
||||
:configContextFor <http://purl.obolibrary.org/obo/RO_0000056> ;
|
||||
:qualifiedByDomain <http://xmlns.com/foaf/0.1/Person> ;
|
||||
:qualifiedBy <http://vivoweb.org/ontology/core#EducationalProcess> .
|
||||
|
||||
local:educationalTrainingConfig a :ObjectPropertyDisplayConfig ;
|
||||
|
@ -296,6 +313,22 @@ local:educationalTrainingConfig a :ObjectPropertyDisplayConfig ;
|
|||
vitro:customEntryFormAnnot "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.PersonHasEducationalTraining"^^<http://www.w3.org/2001/XMLSchema#string> ;
|
||||
:propertyGroup <http://vivoweb.org/ontology#vitroPropertyGroupbiography> .
|
||||
|
||||
local:advisorRoleContext a :ConfigContext ;
|
||||
:hasConfiguration local:advisorRoleConfig ;
|
||||
:configContextFor <http://vivoweb.org/ontology/core#relatedBy> ;
|
||||
:qualifiedByDomain <http://xmlns.com/foaf/0.1/Person> ;
|
||||
:qualifiedBy <http://vivoweb.org/ontology/core#AdvisingRelationship> .
|
||||
|
||||
local:advisorRoleConfig a :ObjectPropertyDisplayConfig ;
|
||||
:listViewConfigFile "listViewConfig-advisorIn.xml"^^xsd:string ;
|
||||
:displayName "advisees" ;
|
||||
vitro:displayRankAnnot 40;
|
||||
vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ;
|
||||
vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ;
|
||||
vitro:customEntryFormAnnot "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.PersonHasAdvisingRelationshipGenerator"^^<http://www.w3.org/2001/XMLSchema#string> ;
|
||||
:propertyGroup <http://vivoweb.org/ontology#vitroPropertyGroupteaching> .
|
||||
|
||||
|
||||
local:informationResourceInAuthorshipContext a :ConfigContext ;
|
||||
:hasConfiguration local:informationResourceInAuthorshipConfig ;
|
||||
:configContextFor <http://vivoweb.org/ontology/core#relatedBy> ;
|
||||
|
@ -310,3 +343,19 @@ local:informationResourceInAuthorshipConfig a :ObjectPropertyDisplayConfig ;
|
|||
vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ;
|
||||
vitro:customEntryFormAnnot "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.AddAuthorsToInformationResourceGenerator"^^<http://www.w3.org/2001/XMLSchema#string> ;
|
||||
:propertyGroup <http://vivoweb.org/ontology#vitroPropertyGroupoverview> .
|
||||
|
||||
### vcard properties ###
|
||||
local:mailingAddressContext a :ConfigContext ;
|
||||
:hasConfiguration local:mailingAddressConfig ;
|
||||
:configContextFor <http://vivoweb.org/ontology/core#relatedBy> ;
|
||||
:qualifiedByDomain <http://xmlns.com/foaf/0.1/Person> ;
|
||||
:qualifiedBy <http://www.w3.org/2006/vcard/ns#Address> .
|
||||
|
||||
local:mailingAddressConfig a :ObjectPropertyDisplayConfig ;
|
||||
:listViewConfigFile "listViewConfig-personHasMailingAddress.xml"^^xsd:string ;
|
||||
:displayName "mailing address" ;
|
||||
vitro:displayRankAnnot 80;
|
||||
vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ;
|
||||
vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ;
|
||||
vitro:customEntryFormAnnot "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.PersonHasMailingAddressGenerator"^^<http://www.w3.org/2001/XMLSchema#string> ;
|
||||
:propertyGroup <http://vivoweb.org/ontology#vitroPropertyGroupaddress> .
|
||||
|
|
|
@ -29,7 +29,7 @@ public class AddClinicalRoleToPersonGenerator extends AddRoleToPersonTwoStageGen
|
|||
return new ConstantFieldOptions(
|
||||
"", "Select one",
|
||||
"http://vivoweb.org/ontology/core#Project", "Project",
|
||||
"http://vivoweb.org/ontology/core#Service", "Service"
|
||||
"http://purl.obolibrary.org/obo/ERO_0000005", "Service"
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -28,12 +28,8 @@ public class PersonHasAdvisingRelationshipGenerator extends VivoBaseGenerator im
|
|||
final static String subjAreaClass = "http://www.w3.org/2004/02/skos/core#Concept";
|
||||
final static String degreeClass = vivoCore+"AcademicDegree";
|
||||
final static String adviseeClass = foaf + "Person";
|
||||
final static String advisorInPred = vivoCore + "advisorIn";
|
||||
final static String adviseeInPred = vivoCore + "adviseeIn";
|
||||
final static String advisorPred = vivoCore + "advisor";
|
||||
final static String adviseePred = vivoCore + "advisee" ;
|
||||
final static String subjAreaPred = vivoCore + "hasSubjectArea" ;
|
||||
final static String degreePred = vivoCore + "degreeCandidacy" ;
|
||||
final static String adviseeRoleClass = "http://vivoweb.org/ontology/core#AdviseeRole";
|
||||
final static String advisorRoleClass = "http://vivoweb.org/ontology/core#AdvisorRole";
|
||||
final static String advisingRelToInterval = vivoCore + "dateTimeInterval";
|
||||
final static String intervalType = vivoCore + "DateTimeInterval";
|
||||
final static String intervalToStart = vivoCore + "start";
|
||||
|
@ -75,6 +71,8 @@ public class PersonHasAdvisingRelationshipGenerator extends VivoBaseGenerator im
|
|||
|
||||
conf.addNewResource("advisingRelationship", DEFAULT_NS_FOR_NEW_RESOURCE);
|
||||
conf.addNewResource("newAdvisee", DEFAULT_NS_FOR_NEW_RESOURCE);
|
||||
conf.addNewResource("advisorRole", DEFAULT_NS_FOR_NEW_RESOURCE);
|
||||
conf.addNewResource("adviseeRole", DEFAULT_NS_FOR_NEW_RESOURCE);
|
||||
conf.addNewResource("newSubjArea", DEFAULT_NS_FOR_NEW_RESOURCE);
|
||||
conf.addNewResource("intervalNode", DEFAULT_NS_FOR_NEW_RESOURCE);
|
||||
conf.addNewResource("startNode", DEFAULT_NS_FOR_NEW_RESOURCE);
|
||||
|
@ -93,6 +91,8 @@ public class PersonHasAdvisingRelationshipGenerator extends VivoBaseGenerator im
|
|||
conf.addSparqlForExistingLiteral("endField-value", existingEndDateQuery);
|
||||
|
||||
conf.addSparqlForExistingUris("advisingRelType", advisingRelTypeQuery);
|
||||
conf.addSparqlForExistingUris("advisorRole", existingAdvisorRoleQuery);
|
||||
conf.addSparqlForExistingUris("adviseeRole", existingAdviseeRoleQuery);
|
||||
conf.addSparqlForExistingUris("existingSubjArea", subjAreaQuery);
|
||||
conf.addSparqlForExistingUris("existingAdvisee", adviseeQuery);
|
||||
conf.addSparqlForExistingUris("degree", degreeQuery);
|
||||
|
@ -193,9 +193,14 @@ public class PersonHasAdvisingRelationshipGenerator extends VivoBaseGenerator im
|
|||
|
||||
final static String n3ForNewAdvisingRelationship =
|
||||
"@prefix vivo: <" + vivoCore + "> . \n\n" +
|
||||
"?person <" + advisorInPred + "> ?advisingRelationship . \n" +
|
||||
"?person <http://vivoweb.org/ontology/core#relatedBy> ?advisingRelationship . \n" +
|
||||
"?advisingRelationship a <" + advisingRelClass + "> . \n" +
|
||||
"?advisingRelationship <" + advisorPred + "> ?person . \n" ;
|
||||
"?advisingRelationship <http://vivoweb.org/ontology/core#relates> ?person . \n" +
|
||||
"?advisingRelationship <http://vivoweb.org/ontology/core#relates> ?advisorRole . \n" +
|
||||
"?advisorRole a <" + advisorRoleClass + "> . \n" +
|
||||
"?advisorRole <http://vivoweb.org/ontology/core#relatedBy> ?advisingRelationship . \n" +
|
||||
"?person <http://purl.obolibrary.org/obo/RO_0000053> ?advisorRole . \n" +
|
||||
"?advisorRole <http://purl.obolibrary.org/obo/RO_0000052> ?person . ";
|
||||
|
||||
final static String advisingRelLabelAssertion =
|
||||
"?advisingRelationship <"+ label + "> ?advisingRelLabel .";
|
||||
|
@ -204,14 +209,24 @@ public class PersonHasAdvisingRelationshipGenerator extends VivoBaseGenerator im
|
|||
"?advisingRelationship a ?advisingRelType .";
|
||||
|
||||
final static String n3ForNewAdviseeAssertion =
|
||||
"?advisingRelationship <" + adviseePred + "> ?newAdvisee . \n" +
|
||||
"?newAdvisee <" + adviseeInPred + "> ?advisingRelationship . \n" +
|
||||
"?advisingRelationship <http://vivoweb.org/ontology/core#relates> ?newAdvisee . \n" +
|
||||
"?newAdvisee <http://vivoweb.org/ontology/core#relatedBy> ?advisingRelationship . \n" +
|
||||
"?newAdvisee <" + label + "> ?adviseeLabel . \n" +
|
||||
"?newAdvisee a <" + adviseeClass + "> . ";
|
||||
"?newAdvisee a <" + adviseeClass + "> . \n" +
|
||||
"?newAdvisee <http://purl.obolibrary.org/obo/RO_0000053> ?adviseeRole . \n" +
|
||||
"?adviseeRole <http://purl.obolibrary.org/obo/RO_0000052> ?newAdvisee . \n" +
|
||||
"?adviseeRole a <" + adviseeRoleClass + "> . \n" +
|
||||
"?advisingRelationship <http://vivoweb.org/ontology/core#relates> ?adviseeRole . \n" +
|
||||
"?adviseeRole <http://vivoweb.org/ontology/core#relatedBy> ?advisingRelationship . ";
|
||||
|
||||
final static String n3ForExistingAdviseeAssertion =
|
||||
"?advisingRelationship <" + adviseePred + "> ?existingAdvisee . \n" +
|
||||
"?existingAdvisee <" + adviseeInPred + "> ?advisingRelationship . ";
|
||||
"?advisingRelationship <http://vivoweb.org/ontology/core#relates> ?existingAdvisee . \n" +
|
||||
"?existingAdvisee <http://vivoweb.org/ontology/core#relatedBy> ?advisingRelationship . \n" +
|
||||
"?existingAdvisee <http://purl.obolibrary.org/obo/RO_0000053> ?adviseeRole . \n" +
|
||||
"?adviseeRole <http://purl.obolibrary.org/obo/RO_0000052> ?existingAdvisee . \n" +
|
||||
"?adviseeRole a <" + adviseeRoleClass + "> . \n" +
|
||||
"?advisingRelationship <http://vivoweb.org/ontology/core#relates> ?adviseeRole . \n" +
|
||||
"?adviseeRole <http://vivoweb.org/ontology/core#relatedBy> ?advisingRelationship . ";
|
||||
|
||||
final static String firstNameAssertion =
|
||||
"@prefix foaf: <" + foaf + "> . \n" +
|
||||
|
@ -222,19 +237,22 @@ public class PersonHasAdvisingRelationshipGenerator extends VivoBaseGenerator im
|
|||
"?newAdvisee foaf:lastName ?lastName .";
|
||||
|
||||
final static String degreeAssertion =
|
||||
"?advisingRelationship <"+ degreePred +"> ?degree .";
|
||||
"?advisingRelationship <http://vivoweb.org/ontology/core#relates> ?degree . \n" +
|
||||
"?degree <http://vivoweb.org/ontology/core#relatedBy> ?advisingRelationship . ";
|
||||
|
||||
//This is for an existing subject area
|
||||
//Where we only need the existing subject area label
|
||||
final static String n3ForExistingSubjAreaAssertion =
|
||||
"?advisingRelationship <"+ subjAreaPred +"> ?existingSubjArea .";
|
||||
"?advisingRelationship <http://vivoweb.org/ontology/core#relates> ?existingSubjArea . \n" +
|
||||
"?existingSubjArea <http://vivoweb.org/ontology/core#relatedBy> ?advisingRelationship . ";
|
||||
//For new subject area, we include all new information
|
||||
//new subject area should always be a new resource
|
||||
//and the following should only get evaluated
|
||||
//when there is something in the label
|
||||
|
||||
final static String n3ForNewSubjAreaAssertion =
|
||||
"?advisingRelationship <"+ subjAreaPred +"> ?newSubjArea . \n" +
|
||||
"?advisingRelationship <http://vivoweb.org/ontology/core#relates> ?newSubjArea . \n" +
|
||||
"?newSubjArea <http://vivoweb.org/ontology/core#relatedBy> ?advisingRelationship . \n" +
|
||||
"?newSubjArea <"+ label + "> ?subjAreaLabel . \n" +
|
||||
"?newSubjArea a <" + subjAreaClass + "> . ";
|
||||
|
||||
|
@ -264,24 +282,46 @@ public class PersonHasAdvisingRelationshipGenerator extends VivoBaseGenerator im
|
|||
|
||||
final static String adviseeQuery =
|
||||
"SELECT ?existingAdvisee WHERE { \n" +
|
||||
" ?advisingRelationship <" + adviseePred + "> ?existingAdvisee . \n" +
|
||||
" ?advisingRelationship <http://vivoweb.org/ontology/core#relates> ?existingAdvisee . \n" +
|
||||
" ?existingAdvisee a <" + adviseeClass + "> . \n" +
|
||||
" FILTER (?person != ?existingAdvisee) . \n" +
|
||||
"}";
|
||||
|
||||
final static String existingAdvisorRoleQuery =
|
||||
"SELECT ?advisorRole WHERE { \n" +
|
||||
"?advisingRelationship <http://vivoweb.org/ontology/core#relates> ?advisorRole . \n" +
|
||||
"?advisorRole a <" + advisorRoleClass + "> . \n" +
|
||||
"}";
|
||||
|
||||
final static String existingAdviseeRoleQuery =
|
||||
"SELECT ?adviseeRole WHERE { \n" +
|
||||
" ?advisingRelationship <http://vivoweb.org/ontology/core#relates> ?adviseeRole . \n" +
|
||||
" ?adviseeRole a <" + adviseeRoleClass + "> . \n" +
|
||||
"}";
|
||||
|
||||
final static String adviseeLabelQuery =
|
||||
"SELECT ?existingAdviseeLabel WHERE { \n" +
|
||||
" ?advisingRelationship <" + adviseePred + "> ?existingAdvisee . \n" +
|
||||
" ?advisingRelationship <http://vivoweb.org/ontology/core#relates> ?existingAdvisee . \n" +
|
||||
" ?existingAdvisee a <" + adviseeClass + "> . \n" +
|
||||
" ?existingAdvisee <" + label + "> ?existingAdviseeLabel . \n" +
|
||||
" FILTER (?person != ?existingAdvisee) . \n" +
|
||||
"}";
|
||||
|
||||
final static String subjAreaQuery =
|
||||
"SELECT ?existingSubjArea WHERE { \n" +
|
||||
" ?advisingRelationship <" + subjAreaPred + "> ?existingSubjArea . \n" +
|
||||
" ?advisingRelationship <http://vivoweb.org/ontology/core#relates> ?existingSubjArea . \n" +
|
||||
" ?existingSubjArea a <http://www.w3.org/2004/02/skos/core#Concept> . \n" +
|
||||
" ?existingSubjArea <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#mostSpecificType> ?type \n" +
|
||||
" FILTER (?type != <http://vivoweb.org/ontology/core#AcademicDegree>) . \n" +
|
||||
"}";
|
||||
|
||||
final static String subjAreaLabelQuery =
|
||||
"SELECT ?existingSubjAreaLabel WHERE { \n" +
|
||||
" ?advisingRelationship <" + subjAreaPred + "> ?existingSubjArea . \n" +
|
||||
" ?advisingRelationship <http://vivoweb.org/ontology/core#relates> ?existingSubjArea . \n" +
|
||||
" ?existingSubjArea a <http://www.w3.org/2004/02/skos/core#Concept> . \n" +
|
||||
" ?existingSubjArea <" + label + "> ?existingSubjAreaLabel . \n" +
|
||||
" ?existingSubjArea <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#mostSpecificType> ?type \n" +
|
||||
" FILTER (?type != <http://vivoweb.org/ontology/core#AcademicDegree>) . \n" +
|
||||
"}";
|
||||
|
||||
final static String advisingRelLabelQuery =
|
||||
|
@ -291,7 +331,10 @@ public class PersonHasAdvisingRelationshipGenerator extends VivoBaseGenerator im
|
|||
|
||||
final static String degreeQuery =
|
||||
"SELECT ?existingDegree WHERE {\n"+
|
||||
" ?advisingRelationship <"+ degreePred +"> ?existingDegree . }";
|
||||
" ?advisingRelationship <http://vivoweb.org/ontology/core#relates> ?existingDegree . \n" +
|
||||
" ?existingDegree a <" + degreeClass + "> . \n" +
|
||||
"}";
|
||||
|
||||
|
||||
final static String existingStartDateQuery =
|
||||
"SELECT ?existingDateStart WHERE { \n" +
|
||||
|
|
Loading…
Add table
Reference in a new issue