VIVO-112: updates for educational training and awards

This commit is contained in:
tworrall 2013-09-06 17:02:43 -04:00
parent 5d2e44c08f
commit 15168eb8ea
12 changed files with 417 additions and 249 deletions

View file

@ -25,6 +25,7 @@ local:personInPositionConfig a :ObjectPropertyDisplayConfig ;
:displayName "positions" ;
:listViewConfigFile "listViewConfig-personInPosition.xml"^^xsd:string ;
:propertyGroup <http://vivoweb.org/ontology#vitroPropertyGroupaffiliation> ;
vitro:displayRankAnnot 40;
vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ;
vitro:customEntryFormAnnot "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.PersonHasPositionHistoryGenerator"^^xsd:string .
@ -38,17 +39,20 @@ local:organizationForPositionConfig a :ObjectPropertyDisplayConfig ;
:displayName "people" ;
:listViewConfigFile "listViewConfig-organizationForPosition.xml"^^xsd:string ;
:propertyGroup <http://vivoweb.org/ontology#vitroPropertyGroupaffiliation> ;
vitro:displayRankAnnot 15;
vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ;
vitro:customEntryFormAnnot "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.OrganizationHasPositionHistoryGenerator"^^xsd:string .
local:authorInAuthorshipContext a :ConfigContext ;
:hasConfiguration local:authorInAuthorshipConfig ;
:configContextFor vivo:relatedBy ;
:qualifiedByDomain <http://xmlns.com/foaf/0.1/Person> ;
:qualifiedBy vivo:Authorship .
local:authorInAuthorshipConfig a :ObjectPropertyDisplayConfig ;
:listViewConfigFile "listViewConfig-authorInAuthorship.xml"^^xsd:string ;
:displayName "selected publications" ;
vitro:displayRankAnnot 1;
vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ;
vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ;
vitro:customEntryFormAnnot "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.AddPublicationToPersonGenerator"^^xsd:string ;
@ -62,6 +66,7 @@ local:hasServiceProviderRoleContext a :ConfigContext ;
local:hasServiceProviderRoleConfig a :ObjectPropertyDisplayConfig ;
:listViewConfigFile "listViewConfig-hasRole.xml"^^xsd:string ;
:displayName "service to the profession" ;
vitro:displayRankAnnot 1;
vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ;
vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ;
vitro:customEntryFormAnnot "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.AddServiceProviderRoleToPersonGenerator"^^<http://www.w3.org/2001/XMLSchema#string> ;
@ -75,6 +80,7 @@ local:hasClinicalRoleContext a :ConfigContext ;
local:hasClinicalRoleConfig a :ObjectPropertyDisplayConfig ;
:listViewConfigFile "listViewConfig-hasRole.xml"^^xsd:string ;
:displayName "clinical activities" ;
vitro:displayRankAnnot 70;
vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ;
vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ;
vitro:customEntryFormAnnot "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.AddClinicalRoleToPersonGenerator"^^<http://www.w3.org/2001/XMLSchema#string> ;
@ -88,6 +94,7 @@ local:hasLeaderRoleContext a :ConfigContext ;
local:hasLeaderRoleConfig a :ObjectPropertyDisplayConfig ;
:listViewConfigFile "listViewConfig-hasRole.xml"^^xsd:string ;
:displayName "head of" ;
vitro:displayRankAnnot 30;
vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ;
vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ;
vitro:customEntryFormAnnot "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.AddHeadOfRoleToPersonGenerator"^^<http://www.w3.org/2001/XMLSchema#string> ;
@ -101,6 +108,7 @@ local:hasMemberRoleContext a :ConfigContext ;
local:hasMemberRoleConfig a :ObjectPropertyDisplayConfig ;
:listViewConfigFile "listViewConfig-hasRole.xml"^^xsd:string ;
:displayName "member of" ;
vitro:displayRankAnnot 50;
vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ;
vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ;
vitro:customEntryFormAnnot "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.AddMemberRoleToPersonGenerator"^^<http://www.w3.org/2001/XMLSchema#string> ;
@ -114,6 +122,7 @@ local:hasTeacherRoleContext a :ConfigContext ;
local:hasTeacherRoleConfig a :ObjectPropertyDisplayConfig ;
:listViewConfigFile "listViewConfig-hasRole.xml"^^xsd:string ;
:displayName "teaching activities" ;
vitro:displayRankAnnot 1;
vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ;
vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ;
vitro:customEntryFormAnnot "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.AddTeacherRoleToPersonGenerator"^^<http://www.w3.org/2001/XMLSchema#string> ;
@ -127,6 +136,7 @@ local:hasEditorRoleContext a :ConfigContext ;
local:hasEditorRoleConfig a :ObjectPropertyDisplayConfig ;
:listViewConfigFile "listViewConfig-hasRole.xml"^^xsd:string ;
:displayName "collection or series editor for" ;
vitro:displayRankAnnot 2;
vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ;
vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ;
vitro:customEntryFormAnnot "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.AddEditorRoleToPersonGenerator"^^<http://www.w3.org/2001/XMLSchema#string> ;
@ -140,6 +150,7 @@ local:hasReviewerRoleContext a :ConfigContext ;
local:hasReviewerRoleConfig a :ObjectPropertyDisplayConfig ;
:listViewConfigFile "listViewConfig-hasRole.xml"^^xsd:string ;
:displayName "reviewer of" ;
vitro:displayRankAnnot 3;
vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ;
vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ;
vitro:customEntryFormAnnot "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.AddReviewerRoleToPersonGenerator"^^<http://www.w3.org/2001/XMLSchema#string> ;
@ -153,6 +164,7 @@ local:hasOrganizerRoleContext a :ConfigContext ;
local:hasOrganizerRoleConfig a :ObjectPropertyDisplayConfig ;
:listViewConfigFile "listViewConfig-hasRole.xml"^^xsd:string ;
:displayName "organizer of" ;
vitro:displayRankAnnot 4;
vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ;
vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ;
vitro:customEntryFormAnnot "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.AddOrganizerRoleToPersonGenerator"^^<http://www.w3.org/2001/XMLSchema#string> ;
@ -166,6 +178,7 @@ local:hasOutreachProviderRoleContext a :ConfigContext ;
local:hasOutreachProviderRoleConfig a :ObjectPropertyDisplayConfig ;
:listViewConfigFile "listViewConfig-hasRole.xml"^^xsd:string ;
:displayName "outreach and community service" ;
vitro:displayRankAnnot 50;
vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ;
vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ;
vitro:customEntryFormAnnot "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.AddOutreachProviderRoleToPersonGenerator"^^<http://www.w3.org/2001/XMLSchema#string> ;
@ -179,6 +192,7 @@ local:hasAttendeeRoleContext a :ConfigContext ;
local:hasAttendeeRoleConfig a :ObjectPropertyDisplayConfig ;
:listViewConfigFile "listViewConfig-hasRole.xml"^^xsd:string ;
:displayName "attended" ;
vitro:displayRankAnnot 1;
vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ;
vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ;
vitro:customEntryFormAnnot "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.AddAttendeeRoleToPersonGenerator"^^<http://www.w3.org/2001/XMLSchema#string> ;
@ -192,6 +206,7 @@ local:hasResearcherRoleContext a :ConfigContext ;
local:hasResearcherRoleConfig a :ObjectPropertyDisplayConfig ;
:listViewConfigFile "listViewConfig-hasRole.xml"^^xsd:string ;
:displayName "research activities" ;
vitro:displayRankAnnot 10;
vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ;
vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ;
vitro:customEntryFormAnnot "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.AddResearcherRoleToPersonGenerator"^^<http://www.w3.org/2001/XMLSchema#string> ;
@ -205,6 +220,7 @@ local:hasInvestigatorRoleContext a :ConfigContext ;
local:hasInvestigatorRoleConfig a :ObjectPropertyDisplayConfig ;
:listViewConfigFile "listViewConfig-hasInvestigatorRole.xml"^^xsd:string ;
:displayName "investigator on" ;
vitro:displayRankAnnot 25;
vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ;
vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ;
vitro:customEntryFormAnnot "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.AddGrantRoleToPersonGenerator"^^<http://www.w3.org/2001/XMLSchema#string> ;
@ -218,6 +234,7 @@ local:hasPrincipalInvestigatorRoleContext a :ConfigContext ;
local:hasPrincipalInvestigatorRoleConfig a :ObjectPropertyDisplayConfig ;
:listViewConfigFile "listViewConfig-hasInvestigatorRole.xml"^^xsd:string ;
:displayName "principal investigator on" ;
vitro:displayRankAnnot 15;
vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ;
vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ;
vitro:customEntryFormAnnot "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.AddGrantRoleToPersonGenerator"^^<http://www.w3.org/2001/XMLSchema#string> ;
@ -231,6 +248,7 @@ local:hasCo-PrincipalInvestigatorRoleContext a :ConfigContext ;
local:hasCo-PrincipalInvestigatorRoleConfig a :ObjectPropertyDisplayConfig ;
:listViewConfigFile "listViewConfig-hasInvestigatorRole.xml"^^xsd:string ;
:displayName "co-principal investigator on" ;
vitro:displayRankAnnot 20;
vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ;
vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ;
vitro:customEntryFormAnnot "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.AddGrantRoleToPersonGenerator"^^<http://www.w3.org/2001/XMLSchema#string> ;
@ -244,6 +262,7 @@ local:hasPresenterRoleContext a :ConfigContext ;
local:hasPresenterRoleConfig a :ObjectPropertyDisplayConfig ;
:listViewConfigFile "listViewConfig-hasPresenterRole.xml"^^xsd:string ;
:displayName "presentations" ;
vitro:displayRankAnnot 30;
vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ;
vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ;
vitro:customEntryFormAnnot "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.AddPresenterRoleToPersonGenerator"^^<http://www.w3.org/2001/XMLSchema#string> ;
@ -251,25 +270,27 @@ local:hasPresenterRoleConfig a :ObjectPropertyDisplayConfig ;
local:awardOrHonorContext a :ConfigContext ;
:hasConfiguration local:awardOrHonorConfig ;
:configContextFor <http://purl.obolibrary.org/obo/RO_0000053> ;
:configContextFor <http://vivoweb.org/ontology/core#relatedBy> ;
:qualifiedBy <http://vivoweb.org/ontology/core#AwardorHonorReceipt> .
local:awardOrHonorConfig a :ObjectPropertyDisplayConfig ;
:listViewConfigFile "listViewConfig-awardOrHonor.xml"^^xsd:string ;
:displayName "awards and honors" ;
vitro:displayRankAnnot 20;
vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ;
vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ;
vitro:customEntryFormAnnot "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.PersonHasAwardOrHonorGenerator"^^<http://www.w3.org/2001/XMLSchema#string> ;
:propertyGroup <http://vivoweb.org/ontology#vitroPropertyGroupbackground> .
:propertyGroup <http://vivoweb.org/ontology#vitroPropertyGroupbiography> .
local:educationalTrainingContext a :ConfigContext ;
:hasConfiguration local:educationalTrainingConfig ;
:configContextFor <http://purl.obolibrary.org/obo/RO_0000053> ;
:qualifiedBy <http://vivoweb.org/ontology/core#EducationalTraining> .
:configContextFor <http://purl.obolibrary.org/obo/RO_0000056> ;
:qualifiedBy <http://vivoweb.org/ontology/core#EducationalProcess> .
local:educationalTrainingConfig a :ObjectPropertyDisplayConfig ;
:listViewConfigFile "listViewConfig-educationalTraining.xml"^^xsd:string ;
:displayName "education and training" ;
vitro:displayRankAnnot 10;
vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ;
vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ;
vitro:customEntryFormAnnot "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.PersonHasEducationalTraining"^^<http://www.w3.org/2001/XMLSchema#string> ;
@ -284,6 +305,7 @@ local:informationResourceInAuthorshipContext a :ConfigContext ;
local:informationResourceInAuthorshipConfig a :ObjectPropertyDisplayConfig ;
:listViewConfigFile "listViewConfig-informationResourceInAuthorship.xml"^^xsd:string ;
:displayName "authors" ;
vitro:displayRankAnnot 10;
vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ;
vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ;
vitro:customEntryFormAnnot "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.AddAuthorsToInformationResourceGenerator"^^<http://www.w3.org/2001/XMLSchema#string> ;

View file

@ -1,147 +1,167 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
<!-- See guidelines in vitro/doc/list_view_configuration_guidelines.txt -->
<list-view-config>
<query-select>
PREFIX foaf: &lt;http://xmlns.com/foaf/0.1/&gt;
PREFIX afn: &lt;http://jena.hpl.hp.com/ARQ/function#&gt;
PREFIX bibo: &lt;http://purl.org/ontology/bibo/&gt;
PREFIX core: &lt;http://vivoweb.org/ontology/core#&gt;
PREFIX owl: &lt;http://www.w3.org/2002/07/owl#&gt;
PREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt;
PREFIX vitro: &lt;http://vitro.mannlib.cornell.edu/ns/vitro/0.7#&gt;
SELECT DISTINCT ?awardReceipt
?receiptLabel
?award
?awardLabel
?conferredBy
?conferredByLabel
?dateTimeStart
?dateTimeEnd
?dateTime
WHERE {
?subject ?property ?awardReceipt .
OPTIONAL { ?awardReceipt rdfs:label ?receiptLabel }
OPTIONAL { ?awardReceipt core:receiptOf ?award .
?award core:receipt ?awardReceipt
OPTIONAL { ?award rdfs:label ?awardLabel }
OPTIONAL { ?award core:awardConferredBy ?conferredBy
OPTIONAL { ?conferredBy rdfs:label ?conferredByLabel }
}
}
OPTIONAL { ?awardReceipt core:dateTimeInterval ?dateTimeInterval
OPTIONAL { ?dateTimeInterval core:start ?dateTimeStartValue .
?dateTimeStartValue core:dateTime ?dateTimeStart
}
}
OPTIONAL { ?awardReceipt core:dateTimeInterval ?dateTimeInterval
OPTIONAL { ?dateTimeInterval core:end ?dateTimeEndValue .
?dateTimeEndValue core:dateTime ?dateTimeEnd
}
}
OPTIONAL { ?awardReceipt core:dateTimeValue ?dateTimeValue
OPTIONAL { ?dateTimeValue core:dateTime ?dateTime }
}
} ORDER BY DESC(?dateTime) DESC(?dateTimeEnd)
</query-select>
<query-construct>
PREFIX bibo: &lt;http://purl.org/ontology/bibo/&gt;
PREFIX core: &lt;http://vivoweb.org/ontology/core#&gt;
PREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt;
PREFIX foaf: &lt;http://xmlns.com/foaf/0.1/&gt;
CONSTRUCT {
?subject ?property ?awardReceipt .
?awardReceipt rdfs:label ?receiptLabel .
?awardReceipt core:receiptOf ?award .
?award core:receipt ?awardReceipt .
?award rdfs:label ?awardLabel .
?award core:awardConferredBy ?conferredBy .
?conferredBy rdfs:label ?conferredByLabel
} WHERE {
{
?subject ?property ?awardReceipt
} UNION {
?subject ?property ?awardReceipt .
?awardReceipt rdfs:label ?receiptLabel
} UNION {
?subject ?property ?awardReceipt .
?awardReceipt rdfs:label ?receiptLabel .
?awardReceipt core:receiptOf ?award .
?award core:receipt ?awardReceipt
} UNION {
?subject ?property ?awardReceipt .
?awardReceipt rdfs:label ?receiptLabel .
?awardReceipt core:receiptOf ?award .
?award core:receipt ?awardReceipt .
?award rdfs:label ?awardLabel
} UNION {
?subject ?property ?awardReceipt .
?awardReceipt rdfs:label ?receiptLabel .
?awardReceipt core:receiptOf ?award .
?award core:receipt ?awardReceipt .
?award rdfs:label ?awardLabel .
?award core:awardConferredBy ?conferredBy
} UNION {
?subject ?property ?awardReceipt .
?awardReceipt rdfs:label ?receiptLabel .
?awardReceipt core:receiptOf ?award .
?award core:receipt ?awardReceipt .
?award rdfs:label ?awardLabel .
?award core:awardConferredBy ?conferredBy .
?conferredBy rdfs:label ?conferredByLabel
}
}
</query-construct>
<query-construct>
PREFIX core: &lt;http://vivoweb.org/ontology/core#&gt;
CONSTRUCT {
?subject ?property ?awardReceipt .
?awardReceipt core:dateTimeInterval ?dateTimeInterval .
?dateTimeInterval core:start ?dateTimeStartValue .
?dateTimeStartValue core:dateTime ?dateTimeStart
} WHERE {
?subject ?property ?awardReceipt .
?awardReceipt core:dateTimeInterval ?dateTimeInterval .
?dateTimeInterval core:start ?dateTimeStartValue .
?dateTimeStartValue core:dateTime ?dateTimeStart
}
</query-construct>
<query-construct>
PREFIX core: &lt;http://vivoweb.org/ontology/core#&gt;
CONSTRUCT {
?subject ?property ?awardReceipt .
?awardReceipt core:dateTimeInterval ?dateTimeInterval .
?dateTimeInterval core:end ?dateTimeEndValue .
?dateTimeEndValue core:dateTime ?dateTimeEnd
} WHERE {
?subject ?property ?awardReceipt .
?awardReceipt core:dateTimeInterval ?dateTimeInterval .
?dateTimeInterval core:end ?dateTimeEndValue .
?dateTimeEndValue core:dateTime ?dateTimeEnd
}
</query-construct>
<query-construct>
PREFIX core: &lt;http://vivoweb.org/ontology/core#&gt;
PREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt;
CONSTRUCT {
?subject ?property ?awardReceipt .
?awardReceipt core:dateTimeValue ?dateTimeValue .
?dateTimeValue core:dateTime ?dateTime
} WHERE {
?subject ?property ?awardReceipt .
?awardReceipt core:dateTimeValue ?dateTimeValue .
?dateTimeValue core:dateTime ?dateTime
}
</query-construct>
<template>propStatement-awardOrHonor.ftl</template>
</list-view-config>
<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
<!-- See guidelines in vitro/doc/list_view_configuration_guidelines.txt -->
<list-view-config>
<query-select>
PREFIX foaf: &lt;http://xmlns.com/foaf/0.1/&gt;
PREFIX afn: &lt;http://jena.hpl.hp.com/ARQ/function#&gt;
PREFIX bibo: &lt;http://purl.org/ontology/bibo/&gt;
PREFIX core: &lt;http://vivoweb.org/ontology/core#&gt;
PREFIX owl: &lt;http://www.w3.org/2002/07/owl#&gt;
PREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt;
PREFIX vitro: &lt;http://vitro.mannlib.cornell.edu/ns/vitro/0.7#&gt;
SELECT DISTINCT ?awardReceipt
?receiptLabel
?award
?awardLabel
?assignedBy
?assignedByLabel
?dateTimeStart
?dateTimeEnd
?dateTime
WHERE {
?subject ?property ?awardReceipt .
?awardReceipt a core:AwardReceipt .
OPTIONAL { ?awardReceipt rdfs:label ?receiptLabel }
OPTIONAL { ?awardReceipt core:relates ?award .
?award a core:Award .
?award core:relatedBy ?awardReceipt
OPTIONAL { ?award rdfs:label ?awardLabel }
OPTIONAL { ?award core:assignedBy ?assignedBy
OPTIONAL { ?assignedBy rdfs:label ?assignedByLabel }
}
}
OPTIONAL { ?awardReceipt core:dateTimeInterval ?dateTimeInterval
OPTIONAL { ?dateTimeInterval core:start ?dateTimeStartValue .
?dateTimeStartValue core:dateTime ?dateTimeStart
}
}
OPTIONAL { ?awardReceipt core:dateTimeInterval ?dateTimeInterval
OPTIONAL { ?dateTimeInterval core:end ?dateTimeEndValue .
?dateTimeEndValue core:dateTime ?dateTimeEnd
}
}
OPTIONAL { ?awardReceipt core:dateTimeValue ?dateTimeValue
OPTIONAL { ?dateTimeValue core:dateTime ?dateTime }
}
} ORDER BY DESC(?dateTime) DESC(?dateTimeEnd)
</query-select>
<query-construct>
PREFIX bibo: &lt;http://purl.org/ontology/bibo/&gt;
PREFIX core: &lt;http://vivoweb.org/ontology/core#&gt;
PREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt;
PREFIX foaf: &lt;http://xmlns.com/foaf/0.1/&gt;
CONSTRUCT {
?subject ?property ?awardReceipt .
?awardReceipt a core:AwardReceipt .
?awardReceipt rdfs:label ?receiptLabel .
?awardReceipt core:relates ?award .
?award a core:Award .
?award core:relatedBy ?awardReceipt .
?award rdfs:label ?awardLabel .
?award core:assignedBy ?assignedBy .
?assignedBy rdfs:label ?assignedByLabel
} WHERE {
{
?subject ?property ?awardReceipt .
?awardReceipt a core:AwardReceipt .
} UNION {
?subject ?property ?awardReceipt .
?awardReceipt a core:AwardReceipt .
?awardReceipt rdfs:label ?receiptLabel
} UNION {
?subject ?property ?awardReceipt .
?awardReceipt a core:AwardReceipt .
?awardReceipt rdfs:label ?receiptLabel .
?awardReceipt core:relates ?award .
?award a core:Award .
?award core:relatedBy ?awardReceipt
} UNION {
?subject ?property ?awardReceipt .
?awardReceipt a core:AwardReceipt .
?awardReceipt rdfs:label ?receiptLabel .
?awardReceipt core:relates ?award .
?award a core:Award .
?award core:relatedBy ?awardReceipt .
?award rdfs:label ?awardLabel
} UNION {
?subject ?property ?awardReceipt .
?awardReceipt a core:AwardReceipt .
?awardReceipt rdfs:label ?receiptLabel .
?awardReceipt core:relates ?award .
?award a core:Award .
?award core:relatedBy ?awardReceipt .
?award rdfs:label ?awardLabel .
?award core:assignedBy ?assignedBy
} UNION {
?subject ?property ?awardReceipt .
?awardReceipt a core:AwardReceipt .
?awardReceipt rdfs:label ?receiptLabel .
?awardReceipt core:relates ?award .
?award a core:Award .
?award core:relatedBy ?awardReceipt .
?award rdfs:label ?awardLabel .
?award core:assignedBy ?assignedBy .
?assignedBy rdfs:label ?assignedByLabel
}
}
</query-construct>
<query-construct>
PREFIX core: &lt;http://vivoweb.org/ontology/core#&gt;
CONSTRUCT {
?subject ?property ?awardReceipt .
?awardReceipt a core:AwardReceipt .
?awardReceipt core:dateTimeInterval ?dateTimeInterval .
?dateTimeInterval core:start ?dateTimeStartValue .
?dateTimeStartValue core:dateTime ?dateTimeStart
} WHERE {
?subject ?property ?awardReceipt .
?awardReceipt a core:AwardReceipt .
?awardReceipt core:dateTimeInterval ?dateTimeInterval .
?dateTimeInterval core:start ?dateTimeStartValue .
?dateTimeStartValue core:dateTime ?dateTimeStart
}
</query-construct>
<query-construct>
PREFIX core: &lt;http://vivoweb.org/ontology/core#&gt;
CONSTRUCT {
?subject ?property ?awardReceipt .
?awardReceipt a core:AwardReceipt .
?awardReceipt core:dateTimeInterval ?dateTimeInterval .
?dateTimeInterval core:end ?dateTimeEndValue .
?dateTimeEndValue core:dateTime ?dateTimeEnd
} WHERE {
?subject ?property ?awardReceipt .
?awardReceipt a core:AwardReceipt .
?awardReceipt core:dateTimeInterval ?dateTimeInterval .
?dateTimeInterval core:end ?dateTimeEndValue .
?dateTimeEndValue core:dateTime ?dateTimeEnd
}
</query-construct>
<query-construct>
PREFIX core: &lt;http://vivoweb.org/ontology/core#&gt;
PREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt;
CONSTRUCT {
?subject ?property ?awardReceipt .
?awardReceipt a core:AwardReceipt .
?awardReceipt core:dateTimeValue ?dateTimeValue .
?dateTimeValue core:dateTime ?dateTime
} WHERE {
?subject ?property ?awardReceipt .
?awardReceipt a core:AwardReceipt .
?awardReceipt core:dateTimeValue ?dateTimeValue .
?dateTimeValue core:dateTime ?dateTime
}
</query-construct>
<template>propStatement-awardOrHonor.ftl</template>
</list-view-config>

View file

@ -20,12 +20,13 @@
?majorField ?deptOrSchool ?info
?dateTimeStart ?dateTimeEnd
WHERE {
?subject ?property ?edTraining
?subject ?property ?edTraining .
?edTraining a core:EducationalProcess
OPTIONAL {?edTraining vitro:mostSpecificType ?trainingType .
?trainingType rdfs:subClassOf core:EducationalTraining .
?trainingType rdfs:subClassOf core:EducationalProcess .
?trainingType rdfs:label ?typeName
}
OPTIONAL { ?edTraining core:trainingAtOrganization ?org .
OPTIONAL { ?edTraining core:relates ?org .
?org rdfs:label ?orgName
<collated>
OPTIONAL { ?org vitro:mostSpecificType ?subclass .
@ -33,7 +34,9 @@
}
</collated>
}
OPTIONAL { ?edTraining core:degreeEarned ?degree
OPTIONAL { ?edTraining &lt;http://purl.obolibrary.org/obo/RO_0002234&gt; ?awardedDegree .
?awardedDegree core:relates ?degree .
?degree a core:AcademicDegree
OPTIONAL { ?degree rdfs:label ?degreeName }
OPTIONAL { ?degree core:abbreviation ?degreeAbbr }
}
@ -69,30 +72,43 @@
CONSTRUCT {
?subject ?property ?edTraining .
?edTraining a core:EducationalProcess .
?edTraining ?edTrainingProp ?edTrainingValue .
?edTraining core:trainingAtOrganization ?org .
?edTraining core:relates ?org .
?org rdfs:label ?orgName .
?edTraining core:degreeEarned ?degree .
?edTraining &lt;http://purl.obolibrary.org/obo/RO_0002234&gt; ?awardedDegree .
?awardedDegree core:relates ?degree .
?edTraining core:dateTimeInterval ?dateTimeInterval
} WHERE {
{
?subject ?property ?edTraining .
?edTraining a core:EducationalProcess
}
UNION {
?subject ?property ?edTraining .
?edTraining a core:EducationalProcess .
?edTraining ?edTrainingProp ?edTrainingValue
}
UNION {
?subject ?property ?edTraining .
?edTraining core:trainingAtOrganization ?org .
?edTraining a core:EducationalProcess .
?edTraining core:relates ?org .
?org rdfs:label ?orgName
}
UNION {
?subject ?property ?edTraining .
?edTraining core:degreeEarned ?degree .
?edTraining a core:EducationalProcess .
?edTraining &lt;http://purl.obolibrary.org/obo/RO_0002234&gt; ?awardedDegree .
}
UNION {
?subject ?property ?edTraining .
?edTraining a core:EducationalProcess .
?edTraining &lt;http://purl.obolibrary.org/obo/RO_0002234&gt; ?awardedDegree .
?awardedDegree core:relates ?degree
}
UNION {
?subject ?property ?edTraining .
?edTraining a core:EducationalProcess .
?edTraining core:dateTimeInterval ?dateTimeInterval
}
}
@ -104,17 +120,20 @@
PREFIX vitro: &lt;http://vitro.mannlib.cornell.edu/ns/vitro/0.7#&gt;
CONSTRUCT {
?subject ?property ?edTraining .
?edTraining a core:EducationalProcess .
?edTraining vitro:mostSpecificType ?trainingType .
?trainingType rdfs:subClassOf core:EducationalTraining .
?trainingType rdfs:label ?typeName
} WHERE {
{
?subject ?property ?edTraining .
?edTraining a core:EducationalProcess .
?edTraining vitro:mostSpecificType ?trainingType .
?trainingType rdfs:subClassOf core:EducationalTraining
} UNION
{
?subject ?property ?edTraining .
?edTraining a core:EducationalProcess .
?edTraining vitro:mostSpecificType ?trainingType .
?trainingType rdfs:subClassOf core:EducationalTraining .
?trainingType rdfs:label ?typeName
@ -127,16 +146,23 @@
PREFIX core: &lt;http://vivoweb.org/ontology/core#&gt;
CONSTRUCT {
?degree a core:AcademicDegree .
?degree rdfs:label ?degreeName .
?degree core:abbreviation ?degreeAbbr
} WHERE {
{
?subject ?property ?edTraining .
?edTraining core:degreeEarned ?degree .
?edTraining a core:EducationalProcess .
?edTraining &lt;http://purl.obolibrary.org/obo/RO_0002234&gt; ?awardedDegree .
?awardedDegree core:relates ?degree .
?degree a core:AcademicDegree .
?degree rdfs:label ?degreeName
} UNION {
?subject ?property ?edTraining .
?edTraining core:degreeEarned ?degree .
?edTraining a core:EducationalProcess .
?edTraining &lt;http://purl.obolibrary.org/obo/RO_0002234&gt; ?awardedDegree .
?awardedDegree core:relates ?degree .
?degree a core:AcademicDegree .
?degree core:abbreviation ?degreeAbbr
}
}
@ -151,6 +177,7 @@
?dateTimeStartValue core:dateTime ?dateTimeStart .
} WHERE {
?subject ?property ?edTraining .
?edTraining a core:EducationalProcess .
?edTraining core:dateTimeInterval ?dateTimeInterval .
?dateTimeInterval core:start ?dateTimeStartValue .
?dateTimeStartValue core:dateTime ?dateTimeStart .
@ -166,6 +193,7 @@
?dateTimeEndValue core:dateTime ?dateTimeEnd
} WHERE {
?subject ?property ?edTraining .
?edTraining a core:EducationalProcess .
?edTraining core:dateTimeInterval ?dateTimeInterval .
?dateTimeInterval core:end ?dateTimeEndValue .
?dateTimeEndValue core:dateTime ?dateTimeEnd

View file

@ -29,12 +29,12 @@
</#if>
</#local>
<#local conferredByOrg>
<#if statement.conferredBy?has_content && statement.conferredByLabel?has_content>
${i18n().conferred_by} <a href="${profileUrl(statement.uri("conferredBy"))}" title="${i18n().conferred_by}">${statement.conferredByLabel}</a>
<#local assignedByOrg>
<#if statement.assignedBy?has_content && statement.assignedByLabel?has_content>
${i18n().conferred_by} <a href="${profileUrl(statement.uri("assignedBy"))}" title="${i18n().conferred_by}">${statement.assignedByLabel}</a>
</#if>
</#local>
<@s.join [ linkedIndividual, conferredByOrg!, dateTimeVal! ] />
<@s.join [ linkedIndividual, assignedByOrg!, dateTimeVal! ] />
</#macro>

View file

@ -1,28 +1,28 @@
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
<#--Two stage form for service provider role-->
<#--
Required Values to be set for each form that includes addRoleToPersonTwoStage.ftl are:
roleDescriptor.
The other required values (roleType, optionsType, objectClassUri, and literalOptions are
set in the JAVA class corresponding to the form, e.g. AddOrganizerRoleToPersonGenerator.java.
Optional values can be set, but each of these has default values
set in addRoleToPersonTwoStage.ftl:
buttonText
typeSelectorLabel
numDateFields
showRoleLAbelField
roleExamples-->
<#--Variable assignments-->
<#assign roleDescriptor = "${i18n().organizer_of}" />
<#assign typeSelectorLabel = "${i18n().organizer_of}" />
<#assign genericLabel = "${i18n().event_capitalized}" />
<#assign acMultipleTypes = "'true'" />
<#assign acTypes = "{activity: 'http://vivoweb.org/ontology/core#EventSeries,http://purl.org/NET/c4dm/event.owl#Event'}"
<#--Each of the two stage forms will include the form below-->
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
<#--Two stage form for service provider role-->
<#--
Required Values to be set for each form that includes addRoleToPersonTwoStage.ftl are:
roleDescriptor.
The other required values (roleType, optionsType, objectClassUri, and literalOptions are
set in the JAVA class corresponding to the form, e.g. AddOrganizerRoleToPersonGenerator.java.
Optional values can be set, but each of these has default values
set in addRoleToPersonTwoStage.ftl:
buttonText
typeSelectorLabel
numDateFields
showRoleLAbelField
roleExamples-->
<#--Variable assignments-->
<#assign roleDescriptor = "${i18n().organizer_of}" />
<#assign typeSelectorLabel = "${i18n().organizer_of}" />
<#assign genericLabel = "${i18n().event_capitalized}" />
<#assign acMultipleTypes = "'true'" />
<#assign acTypes = "{activity: 'http://vivoweb.org/ontology/core#EventSeries,http://purl.org/NET/c4dm/event.owl#Event'}">
<#--Each of the two stage forms will include the form below-->
<#include "addRoleToPersonTwoStage.ftl">

View file

@ -91,8 +91,14 @@ var awardReceiptUtils = {
buildAwardReceiptLabel: function() {
var rdfsLabel = "";
var $acSelection = $("div.acSelection[acGroupName='award']")
if ( this.editMode == "edit" ) {
rdfsLabel = this.awardDisplay.val();
if ( $acSelection.find("span.acSelectionInfo").text().length > 0 ) {
rdfsLabel = $("span.acSelectionInfo").text();
}
else {
rdfsLabel = this.award.val();
}
}
else {
rdfsLabel = this.award.val();

View file

@ -0,0 +1,31 @@
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
var educationalTrainingUtils = {
onLoad: function(href, blankSentinel) {
this.initObjectReferences();
this.bindEventListeners();
$.extend(this, customFormData);
},
initObjectReferences: function() {
this.form = $('#personHasEducationalTraining');
this.aDLabel = $('#awardedDegreeLabel');
this.degreeSelector = $('#degreeUri');
},
bindEventListeners: function() {
this.degreeSelector.change(function() {
educationalTrainingUtils.setAwardedDegreeLabel();
});
},
setAwardedDegreeLabel: function() {
var degreeLabel = this.subjectName + ": " + this.degreeSelector.find(":selected").text();
this.aDLabel.val(degreeLabel);
}
}

View file

@ -33,9 +33,11 @@ Set this flag on the input acUriReceiver where you would like this behavior to o
<#assign deptValue = lvf.getFormFieldValue(editSubmission, editConfiguration, "dept") />
<#assign infoValue = lvf.getFormFieldValue(editSubmission, editConfiguration, "info") />
<#assign majorFieldValue = lvf.getFormFieldValue(editSubmission, editConfiguration, "majorField") />
<#assign degreeValue = lvf.getFormFieldValue(editSubmission, editConfiguration, "degree") />
<#assign degreeValue = lvf.getFormFieldValue(editSubmission, editConfiguration, "degreeType") />
<#assign awardedDegreeLabelValue = lvf.getFormFieldValue(editSubmission, editConfiguration, "awardedDegreeLabel") />
<#assign existingOrgValue = lvf.getFormFieldValue(editSubmission, editConfiguration, "existingOrg") />
<#assign trainingTypeValue = lvf.getFormFieldValue(editSubmission, editConfiguration, "trainingType")/>
<#assign existingADLabelValue = lvf.getFormFieldValue(editSubmission, editConfiguration, "existingAwardedDegreeLabel") />
<#--If edit submission exists, then retrieve validation errors if they exist-->
<#if editSubmission?has_content && editSubmission.submissionExists = true && editSubmission.validationErrors?has_content>
@ -56,7 +58,7 @@ Set this flag on the input acUriReceiver where you would like this behavior to o
<#assign yearHint = "<span class='hint'>(${i18n().year_hint_format})</span>" />
<h2>${titleVerb}&nbsp;${i18n().educational_training_for} ${subjectName}${editConfiguration.subjectName}</h2>
<h2>${titleVerb}&nbsp;${i18n().educational_training_for} ${editConfiguration.subjectName}</h2>
<#--Display error messages if any-->
<#if submissionErrors?has_content>
@ -155,13 +157,19 @@ Set this flag on the input acUriReceiver where you would like this behavior to o
<div class="entry">
<label for="degreeUri">${i18n().degree}</label>
<#assign degreeOpts = editConfiguration.pageData.degree />
<select name="degree" id="degreeUri" >
<#assign degreeOpts = editConfiguration.pageData.degreeType />
<select name="degreeType" id="degreeUri" >
<option value="" <#if degreeValue = "">selected</#if>>${i18n().select_one}</option>
<#list degreeOpts?keys as key>
<option value="${key}" <#if degreeValue = key>selected</#if>>${degreeOpts[key]}</option>
</#list>
</select>
</select>
<#if editMode == "edit">
<input type="hidden" id="newAwardedDegreeLabel" name="awardedDegreeLabel" value=""/>
<input type="hidden" id="awardedDegreeLabel" name="existingAwardedDegreeLabel" value="${existingADLabelValue!}"/>
<#else>
<input type="hidden" id="awardedDegreeLabel" name="awardedDegreeLabel" value=""/>
</#if>
</div>
<p>
@ -208,13 +216,18 @@ var customFormData = {
defaultTypeName: 'organization',
baseHref: '${urls.base}/individual?uri=',
blankSentinel: '${blankSentinel}',
flagClearLabelForExisting: '${flagClearLabelForExisting}'
flagClearLabelForExisting: '${flagClearLabelForExisting}',
subjectName: '${editConfiguration.subjectName}'
};
var i18nStrings = {
selectAnExisting: '${i18n().select_an_existing}',
orCreateNewOne: '${i18n().or_create_new_one}',
selectedString: '${i18n().selected}'
};
$(document).ready(function() {
educationalTrainingUtils.onLoad();
});
</script>
</section>
@ -229,6 +242,7 @@ ${scripts.add('<script type="text/javascript" src="${urls.base}/js/jquery-ui/js/
'<script type="text/javascript" src="${urls.base}/js/extensions/String.js"></script>',
'<script type="text/javascript" src="${urls.base}/js/browserUtils.js"></script>',
'<script type="text/javascript" src="${urls.base}/js/jquery_plugins/jquery.bgiframe.pack.js"></script>',
'<script type="text/javascript" src="${urls.base}/templates/freemarker/edit/forms/js/educationalTrainingUtils.js"></script>',
'<script type="text/javascript" src="${urls.base}/templates/freemarker/edit/forms/js/customFormWithAutocomplete.js"></script>')}

View file

@ -24,12 +24,12 @@ public class PersonHasAwardOrHonorGenerator extends VivoBaseGenerator implements
final static String awardReceiptClass = vivoCore + "AwardReceipt";
final static String awardClass = vivoCore + "Award";
final static String orgClass = "http://xmlns.com/foaf/0.1/Organization";
final static String awardReceiptPred = vivoCore + "awardOrHonor";
final static String awardForPred = vivoCore + "awardOrHonorFor";
final static String receiptPred =vivoCore+"receipt" ;
final static String receiptOfPred =vivoCore+"receiptOf" ;
final static String awardConferredByPred =vivoCore+"awardConferredBy" ;
final static String awardConferredPred =vivoCore+"awardConferred" ;
final static String awardReceiptPred = vivoCore + "relatedBy";
final static String awardForPred = vivoCore + "relates";
final static String receiptPred =vivoCore+"relatedBy" ;
final static String receiptOfPred =vivoCore+"relates" ;
final static String awardConferredByPred =vivoCore+"assignedBy" ;
final static String awardConferredPred =vivoCore+"assigns" ;
final static String descriptionPred = vivoCore + "description";
final static String yearAwardedPred = vivoCore + "dateTimeValue";
final static String awardReceiptToInterval = vivoCore + "dateTimeInterval";
@ -257,11 +257,13 @@ public class PersonHasAwardOrHonorGenerator extends VivoBaseGenerator implements
final static String existingAwardQuery =
"SELECT ?existingAward WHERE { \n" +
" ?awardReceipt <" + receiptOfPred + "> ?existingAward . \n" +
" ?existingAward a <" + awardClass + "> . \n" +
"}";
final static String existingOrgQuery =
"SELECT ?existingOrg WHERE { \n" +
" ?awardReceipt <" + receiptOfPred + "> ?existingAward . \n" +
" ?existingAward a <" + awardClass + "> . \n" +
" ?existingAward<" + awardConferredByPred + "> ?existingOrg . \n" +
" ?existingOrg <" + awardConferredPred + "> ?existingAward . }";
@ -273,6 +275,7 @@ public class PersonHasAwardOrHonorGenerator extends VivoBaseGenerator implements
final static String awardLabelQuery =
"SELECT ?existingAwardLabel WHERE { \n" +
" ?awardReceipt <" + receiptOfPred + "> ?existingAward . \n" +
" ?existingAward a <" + awardClass + "> . \n" +
" ?existingAward <" + label + "> ?existingAwardLabel . \n" +
"}";

View file

@ -30,7 +30,7 @@ import edu.cornell.mannlib.vitro.webapp.utils.generators.EditModeUtils;
core:EducationalTraining - primary new individual being created
foaf:Person - existing individual
foaf:Organization - new or existing individual
core:AcademicDegree - existing individual
core:AcademicdegreeType - existing individual
Data properties of EducationalTraining:
core:majorField
@ -42,10 +42,10 @@ import edu.cornell.mannlib.vitro.webapp.utils.generators.EditModeUtils;
core:educationalTraining (Person : EducationalTraining) - inverse of core:educationalTrainingOf
core:educationalTrainingOf (EducationalTraining : Person) - inverse of core:educationalTraining
core:degreeEarned (EducationalTraining : AcademicDegree) - inverse of core:degreeOutcomeOf
core:degreeOutcomeOf (AcademicDegree : EducationalTraining) - inverse of core:degreeEarned
core:degreeTypeEarned (EducationalTraining : AcademicdegreeType) - inverse of core:degreeTypeOutcomeOf
core:degreeTypeOutcomeOf (AcademicdegreeType : EducationalTraining) - inverse of core:degreeTypeEarned
core:organizationGrantingDegree (EducationalTraining : Organization) - no inverse
core:organizationGrantingdegreeType (EducationalTraining : Organization) - no inverse
Future version
--------------
@ -90,10 +90,13 @@ public class PersonHasEducationalTraining extends VivoBaseGenerator implements
conf.setN3Required( Arrays.asList( n3ForNewEdTraining, trainingTypeAssertion ) );
conf.setN3Optional(Arrays.asList(
n3ForNewOrg, n3ForExistingOrg, majorFieldAssertion, degreeAssertion,
deptAssertion, infoAssertion, n3ForStart, n3ForEnd ));
n3ForNewOrg, n3ForExistingOrg, n3ForNewAwardedDegree,
majorFieldAssertion,
//existingDegreeTypeAssertion,
existingAwardedDegreeLabel, deptAssertion, infoAssertion, n3ForStart, n3ForEnd ));
conf.addNewResource("edTraining", DEFAULT_NS_FOR_NEW_RESOURCE);
conf.addNewResource("newAwardedDegree",DEFAULT_NS_FOR_NEW_RESOURCE);
conf.addNewResource("newOrg",DEFAULT_NS_FOR_NEW_RESOURCE);
conf.addNewResource("intervalNode",DEFAULT_NS_FOR_NEW_RESOURCE);
conf.addNewResource("startNode",DEFAULT_NS_FOR_NEW_RESOURCE);
@ -102,10 +105,12 @@ public class PersonHasEducationalTraining extends VivoBaseGenerator implements
//uris in scope: none
//literals in scope: none
conf.setUrisOnform( Arrays.asList( "existingOrg", "orgType", "degree", "trainingType"));
conf.setLiteralsOnForm( Arrays.asList("orgLabel", "orgLabelDisplay", "majorField", "dept", "info"));
conf.setUrisOnform( Arrays.asList( "existingOrg", "orgType", "existingAwardedDegree", "degreeType", "trainingType"));
conf.setLiteralsOnForm( Arrays.asList("orgLabel", "orgLabelDisplay", "awardedDegreeLabel", "existingAwardedDegreeLabel",
"majorField", "dept", "info"));
conf.addSparqlForExistingLiteral("orgLabel", orgLabelQuery);
conf.addSparqlForExistingLiteral("existingAwardedDegreeLabel", existingAwardedDegreeLabelQuery);
conf.addSparqlForExistingLiteral("majorField", majorFieldQuery);
conf.addSparqlForExistingLiteral("dept", deptQuery);
conf.addSparqlForExistingLiteral("info", infoQuery);
@ -113,10 +118,11 @@ public class PersonHasEducationalTraining extends VivoBaseGenerator implements
conf.addSparqlForExistingLiteral("endField-value", existingEndDateQuery);
conf.addSparqlForExistingUris("existingAwardedDegree", existingAwardedDegreeQuery);
conf.addSparqlForExistingUris("existingOrg", existingOrgQuery);
conf.addSparqlForExistingUris("orgType", orgTypeQuery);
conf.addSparqlForExistingUris("trainingType", trainingTypeQuery);
conf.addSparqlForExistingUris("degree", degreeQuery);
conf.addSparqlForExistingUris("degreeType", degreeTypeQuery);
conf.addSparqlForExistingUris("intervalNode",existingIntervalNodeQuery);
conf.addSparqlForExistingUris("startNode", existingStartNodeQuery);
conf.addSparqlForExistingUris("endNode", existingEndNodeQuery);
@ -126,9 +132,9 @@ public class PersonHasEducationalTraining extends VivoBaseGenerator implements
conf.addSparqlForAdditionalUrisInScope("inverseTrainingAtOrg", inverseTrainingAtOrgQuery);
conf.addField( new FieldVTwo().
setName("degree").
setName("degreeType").
setOptions( new IndividualsViaVClassOptions(
degreeClass)));
degreeTypeClass)));
conf.addField( new FieldVTwo().
setName("majorField").
@ -140,11 +146,26 @@ public class PersonHasEducationalTraining extends VivoBaseGenerator implements
//options will be added in browser by auto complete JS
);
conf.addField( new FieldVTwo().
setName("existingAwardedDegree")
//options will be added in browser by auto complete JS
);
conf.addField( new FieldVTwo().
setName("orgLabel").
setRangeDatatypeUri(XSD.xstring.toString() ).
setValidators( list("datatype:" + XSD.xstring.toString())));
conf.addField( new FieldVTwo().
setName("awardedDegreeLabel").
setRangeDatatypeUri(XSD.xstring.toString() ).
setValidators( list("datatype:" + XSD.xstring.toString())));
conf.addField( new FieldVTwo().
setName("existingAwardedDegreeLabel").
setRangeDatatypeUri(XSD.xstring.toString() ).
setValidators( list("datatype:" + XSD.xstring.toString())));
conf.addField( new FieldVTwo().
setName("orgLabelDisplay").
setRangeDatatypeUri(XSD.xstring.toString() ));
@ -159,7 +180,7 @@ public class PersonHasEducationalTraining extends VivoBaseGenerator implements
setName("trainingType").
setValidators( list("nonempty") ).
setOptions(
new ChildVClassesWithParent(trainingClass)));
new ChildVClassesWithParent(edProcessClass)));
conf.addField( new FieldVTwo().
setName("dept").
@ -201,28 +222,44 @@ public class PersonHasEducationalTraining extends VivoBaseGenerator implements
final static String n3ForNewEdTraining =
"@prefix core: <"+ vivoCore +"> .\n"+
"?person core:educationalTraining ?edTraining .\n" +
"?edTraining a core:EducationalTraining .\n" +
"?edTraining core:educationalTrainingOf ?person .";
"?person <http://purl.obolibrary.org/obo/RO_0000056> ?edTraining .\n" +
"?edTraining a core:EducationalProcess .\n" +
"?edTraining <http://purl.obolibrary.org/obo/RO_0000057> ?person .";
final static String trainingTypeAssertion =
"?edTraining a ?trainingType .";
final static String n3ForNewAwardedDegree =
"@prefix core: <"+ vivoCore +"> .\n"+
"?edTraining <http://purl.obolibrary.org/obo/RO_0002234> ?newAwardedDegree . \n" +
"?newAwardedDegree <http://purl.obolibrary.org/obo/RO_0002353> ?edTraining . \n" +
"?newAwardedDegree <http://vivoweb.org/ontology/core#relates> ?person . \n" +
"?person <http://vivoweb.org/ontology/core#relatedBy> ?newAwardedDegree . \n" +
"?newAwardedDegree <"+ label +"> ?awardedDegreeLabel . \n" +
"?newOrg <http://vivoweb.org/ontology/core#assigns> ?newAwardedDegree . \n" +
"?newAwardedDegree <http://vivoweb.org/ontology/core#assignedBy> ?newOrg . \n" +
"?newAwardedDegree <http://vivoweb.org/ontology/core#relates> ?degreeType .\n"+
"?degreeType <http://vivoweb.org/ontology/core#relatedBy> ?newAwardedDegree . \n"+
"?newAwardedDegree a core:AwardedDegree .";
final static String existingAwardedDegreeLabel =
"?edTraining <http://purl.obolibrary.org/obo/RO_0002234> ?existingAwardedDegree . \n" +
"?existingAwardedDegree <http://purl.obolibrary.org/obo/RO_0002353> ?edTraining . \n" +
"?existingAwardedDegree <http://vivoweb.org/ontology/core#relates> ?degreeType .\n"+
"?degreeType <http://vivoweb.org/ontology/core#relatedBy> ?existingAwardedDegree . \n"+
"?existingAwardedDegree <"+ label +"> ?existingAwardedDegreeLabel . " ;
final static String n3ForNewOrg =
"?edTraining <"+ trainingAtOrg +"> ?newOrg . \n" +
"?newOrg ?inverseTrainingAtOrg ?edTraining . \n" +
"?edTraining <http://vivoweb.org/ontology/core#relates> ?newOrg . \n" +
"?newOrg <http://vivoweb.org/ontology/core#relatedBy> ?edTraining . \n" +
"?newOrg <"+ label +"> ?orgLabel . \n" +
"?newOrg a ?orgType .";
final static String n3ForExistingOrg =
"?edTraining <"+ trainingAtOrg +"> ?existingOrg . \n" +
"?existingOrg ?inverseTrainingAtOrg ?edTraining . \n" +
"?edTraining <http://vivoweb.org/ontology/core#relates> ?existingOrg . \n" +
"?existingOrg <http://vivoweb.org/ontology/core#relatedBy> ?edTraining . \n" +
"?existingOrg a ?orgType . ";
final static String degreeAssertion =
"?edTraining <"+ degreeEarned +"> ?degree .\n"+
"?degree <"+ degreeOutcomeOf +"> ?edTraining .";
final static String majorFieldAssertion =
"?edTraining <"+ majorFieldPred +"> ?majorField .";
@ -252,20 +289,29 @@ public class PersonHasEducationalTraining extends VivoBaseGenerator implements
final static String existingOrgQuery =
"SELECT ?existingOrg WHERE {\n"+
"?edTraining <"+ trainingAtOrg +"> ?existingOrg . }\n";
"?edTraining <http://vivoweb.org/ontology/core#relates> ?existingOrg . }\n";
final static String orgLabelQuery =
"SELECT ?existingOrgLabel WHERE {\n"+
"?edTraining <"+ trainingAtOrg +"> ?existingOrg .\n"+
"?edTraining <http://vivoweb.org/ontology/core#relates> ?existingOrg .\n"+
"?existingOrg <"+ label +"> ?existingOrgLabel .\n"+
"}";
final static String existingAwardedDegreeQuery =
"SELECT ?existingAwardedDegree WHERE {\n"+
"?edTraining <http://purl.obolibrary.org/obo/RO_0002234> ?existingAwardedDegree . }\n";
final static String existingAwardedDegreeLabelQuery =
"SELECT ?existingAwardedDegreeLabel WHERE {\n"+
"?edTraining <http://purl.obolibrary.org/obo/RO_0002234> ?existingAwardedDegree . \n" +
"?existingAwardedDegree <"+ label +"> ?existingAwardedDegreeLabel }\n";
/* Limit type to subclasses of foaf:Organization. Otherwise, sometimes owl:Thing or another
type is returned and we don't get a match to the select element options. */
final static String orgTypeQuery =
"PREFIX rdfs: <"+ rdfs +"> \n"+
"SELECT ?existingOrgType WHERE {\n"+
"?edTraining <"+ trainingAtOrg +"> ?existingOrg .\n"+
"?edTraining <http://vivoweb.org/ontology/core#relates> ?existingOrg .\n"+
"?existingOrg a ?existingOrgType .\n"+
"?existingOrgType rdfs:subClassOf <"+ orgClass +"> .\n"+
"}";
@ -273,11 +319,15 @@ public class PersonHasEducationalTraining extends VivoBaseGenerator implements
final static String trainingTypeQuery =
"PREFIX vitro: <" + VitroVocabulary.vitroURI + "> \n" +
"SELECT ?existingTrainingType WHERE { \n" +
" ?edTraining vitro:mostSpecificType ?existingTrainingType . }";
" ?edTraining vitro:mostSpecificType ?existingTrainingType . }";
final static String degreeQuery =
"SELECT ?existingDegree WHERE {\n"+
"?edTraining <"+ degreeEarned +"> ?existingDegree . }";
final static String degreeTypeQuery =
"PREFIX core: <"+ vivoCore +"> \n"+
"SELECT ?existingDegreeType WHERE {\n"+
"?edTraining <http://purl.obolibrary.org/obo/RO_0002234> ?existingAwardedDegree . \n"+
"?existingAwardedDegree a core:AwardedDegree . \n"+
"?existingAwardedDegree core:relates ?existingDegreeType . \n" +
"?existingDegreeType a core:AcademicDegree }";
final static String majorFieldQuery =
"SELECT ?existingMajorField WHERE {\n"+
@ -346,7 +396,7 @@ public class PersonHasEducationalTraining extends VivoBaseGenerator implements
final static String inverseTrainingAtOrgQuery =
"PREFIX owl: <http://www.w3.org/2002/07/owl#>"
+ " SELECT ?inverseTrainingAtOrg "
+ " WHERE { ?inverseTrainingAtOrg owl:inverseOf <"+ trainingAtOrg +"> . } ";
+ " WHERE { ?inverseTrainingAtOrg owl:inverseOf <http://vivoweb.org/ontology/core#relates> . } ";
//Adding form specific data such as edit mode
@ -358,10 +408,7 @@ public class PersonHasEducationalTraining extends VivoBaseGenerator implements
public EditMode getEditMode(VitroRequest vreq) {
List<String> predicates = new ArrayList<String>();
predicates.add(trainingAtOrg);
predicates.add("http://vivoweb.org/ontology/core#relates");
return EditModeUtils.getEditMode(vreq, predicates);
}
}

View file

@ -18,16 +18,13 @@ public abstract class VivoBaseGenerator extends BaseEditConfigurationGenerator i
final static String label =rdfs+"label" ;
final static String bibo = "http://purl.org/ontology/bibo/";
final static String trainingClass = vivoCore+"EducationalTraining" ;
final static String degreeClass =vivoCore+"AcademicDegree" ;
final static String edProcessClass = vivoCore+"EducationalProcess" ;
final static String degreeTypeClass =vivoCore+"AcademicDegree" ;
final static String majorFieldPred =vivoCore+"majorField" ;
final static String deptPred =vivoCore+"departmentOrSchool" ;
final static String infoPred =vivoCore+"supplementalInformation" ;
final static String degreeEarned =vivoCore+"degreeEarned" ;
final static String degreeOutcomeOf =vivoCore+"degreeOutcomeOf" ;
final static String trainingAtOrg =vivoCore+"trainingAtOrganization" ;
final static String authorRankPredicate = vivoCore + "authorRank";
final static String linkedAuthorPredicate = vivoCore + "linkedAuthor";
final static String linkedAuthorPredicate = vivoCore + "relates";
final static String dateTimeValue =vivoCore+"dateTime";
final static String dateTimeValueType =vivoCore+"DateTimeValue";

View file

@ -23,7 +23,7 @@ public class ModelUtils {
private static final String processPropertyURI = "http://purl.obolibrary.org/obo/BFO_0000054";
private static final String processPropertyInverseURI = "http://purl.obolibrary.org/obo/BFO_0000055";
private static final String nonProcessPropertyURI = "http://vivoweb.org/ontology/core#relatedBy";
private static final String nonProcessPropertyInverseURI = "http://vivoweb.org/ontology/core#contributingRole";
private static final String nonProcessPropertyInverseURI = "http://purl.obolibrary.org/obo/RO_0000052";
private static Set<String> processClass = new HashSet<String>();
static {