diff --git a/productMods/WEB-INF/ontologies/app/loadedAtStartup/PropertyConfig.n3 b/productMods/WEB-INF/ontologies/app/loadedAtStartup/PropertyConfig.n3 index 8b237c6b..a467236d 100644 --- a/productMods/WEB-INF/ontologies/app/loadedAtStartup/PropertyConfig.n3 +++ b/productMods/WEB-INF/ontologies/app/loadedAtStartup/PropertyConfig.n3 @@ -25,6 +25,7 @@ local:personInPositionConfig a :ObjectPropertyDisplayConfig ; :displayName "positions" ; :listViewConfigFile "listViewConfig-personInPosition.xml"^^xsd:string ; :propertyGroup ; + 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 ; + 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 ; :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"^^ ; @@ -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"^^ ; @@ -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"^^ ; @@ -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"^^ ; @@ -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"^^ ; @@ -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"^^ ; @@ -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"^^ ; @@ -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"^^ ; @@ -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"^^ ; @@ -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"^^ ; @@ -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"^^ ; @@ -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"^^ ; @@ -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"^^ ; @@ -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"^^ ; @@ -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"^^ ; @@ -251,25 +270,27 @@ local:hasPresenterRoleConfig a :ObjectPropertyDisplayConfig ; local:awardOrHonorContext a :ConfigContext ; :hasConfiguration local:awardOrHonorConfig ; - :configContextFor ; + :configContextFor ; :qualifiedBy . 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"^^ ; - :propertyGroup . + :propertyGroup . local:educationalTrainingContext a :ConfigContext ; :hasConfiguration local:educationalTrainingConfig ; - :configContextFor ; - :qualifiedBy . + :configContextFor ; + :qualifiedBy . 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"^^ ; @@ -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"^^ ; diff --git a/productMods/config/listViewConfig-awardOrHonor.xml b/productMods/config/listViewConfig-awardOrHonor.xml index d118b4fd..14e49603 100644 --- a/productMods/config/listViewConfig-awardOrHonor.xml +++ b/productMods/config/listViewConfig-awardOrHonor.xml @@ -1,147 +1,167 @@ - - - - - - - - PREFIX foaf: <http://xmlns.com/foaf/0.1/> - PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#> - PREFIX bibo: <http://purl.org/ontology/bibo/> - PREFIX core: <http://vivoweb.org/ontology/core#> - PREFIX owl: <http://www.w3.org/2002/07/owl#> - PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> - PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#> - - 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) - - - - PREFIX bibo: <http://purl.org/ontology/bibo/> - PREFIX core: <http://vivoweb.org/ontology/core#> - PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> - PREFIX foaf: <http://xmlns.com/foaf/0.1/> - - 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 - } - } - - - - PREFIX core: <http://vivoweb.org/ontology/core#> - 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 - } - - - - PREFIX core: <http://vivoweb.org/ontology/core#> - 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 - } - - - - PREFIX core: <http://vivoweb.org/ontology/core#> - PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> - CONSTRUCT { - ?subject ?property ?awardReceipt . - ?awardReceipt core:dateTimeValue ?dateTimeValue . - ?dateTimeValue core:dateTime ?dateTime - } WHERE { - ?subject ?property ?awardReceipt . - ?awardReceipt core:dateTimeValue ?dateTimeValue . - ?dateTimeValue core:dateTime ?dateTime - } - - - - + + + + + + + + PREFIX foaf: <http://xmlns.com/foaf/0.1/> + PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#> + PREFIX bibo: <http://purl.org/ontology/bibo/> + PREFIX core: <http://vivoweb.org/ontology/core#> + PREFIX owl: <http://www.w3.org/2002/07/owl#> + PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> + PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#> + + 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) + + + + PREFIX bibo: <http://purl.org/ontology/bibo/> + PREFIX core: <http://vivoweb.org/ontology/core#> + PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> + PREFIX foaf: <http://xmlns.com/foaf/0.1/> + + 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 + } + } + + + + PREFIX core: <http://vivoweb.org/ontology/core#> + 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 + } + + + + PREFIX core: <http://vivoweb.org/ontology/core#> + 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 + } + + + + PREFIX core: <http://vivoweb.org/ontology/core#> + PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> + 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 + } + + + + diff --git a/productMods/config/listViewConfig-educationalTraining.xml b/productMods/config/listViewConfig-educationalTraining.xml index 986356f3..810c1e95 100644 --- a/productMods/config/listViewConfig-educationalTraining.xml +++ b/productMods/config/listViewConfig-educationalTraining.xml @@ -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 OPTIONAL { ?org vitro:mostSpecificType ?subclass . @@ -33,7 +34,9 @@ } } - OPTIONAL { ?edTraining core:degreeEarned ?degree + OPTIONAL { ?edTraining <http://purl.obolibrary.org/obo/RO_0002234> ?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 <http://purl.obolibrary.org/obo/RO_0002234> ?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 <http://purl.obolibrary.org/obo/RO_0002234> ?awardedDegree . + } + UNION { + ?subject ?property ?edTraining . + ?edTraining a core:EducationalProcess . + ?edTraining <http://purl.obolibrary.org/obo/RO_0002234> ?awardedDegree . + ?awardedDegree core:relates ?degree } UNION { ?subject ?property ?edTraining . + ?edTraining a core:EducationalProcess . ?edTraining core:dateTimeInterval ?dateTimeInterval } } @@ -104,17 +120,20 @@ PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#> 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: <http://vivoweb.org/ontology/core#> 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 <http://purl.obolibrary.org/obo/RO_0002234> ?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 <http://purl.obolibrary.org/obo/RO_0002234> ?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 diff --git a/productMods/templates/freemarker/body/partials/individual/propStatement-awardOrHonor.ftl b/productMods/templates/freemarker/body/partials/individual/propStatement-awardOrHonor.ftl index 49ce2f9e..937c930b 100644 --- a/productMods/templates/freemarker/body/partials/individual/propStatement-awardOrHonor.ftl +++ b/productMods/templates/freemarker/body/partials/individual/propStatement-awardOrHonor.ftl @@ -29,12 +29,12 @@ - <#local conferredByOrg> - <#if statement.conferredBy?has_content && statement.conferredByLabel?has_content> - ${i18n().conferred_by} ${statement.conferredByLabel} + <#local assignedByOrg> + <#if statement.assignedBy?has_content && statement.assignedByLabel?has_content> + ${i18n().conferred_by} ${statement.assignedByLabel} - <@s.join [ linkedIndividual, conferredByOrg!, dateTimeVal! ] /> + <@s.join [ linkedIndividual, assignedByOrg!, dateTimeVal! ] /> diff --git a/productMods/templates/freemarker/edit/forms/addOrganizerRoleToPerson.ftl b/productMods/templates/freemarker/edit/forms/addOrganizerRoleToPerson.ftl index e889d511..241b3c2a 100644 --- a/productMods/templates/freemarker/edit/forms/addOrganizerRoleToPerson.ftl +++ b/productMods/templates/freemarker/edit/forms/addOrganizerRoleToPerson.ftl @@ -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"> \ No newline at end of file diff --git a/productMods/templates/freemarker/edit/forms/js/awardReceiptUtils.js b/productMods/templates/freemarker/edit/forms/js/awardReceiptUtils.js index 518dc706..6a5ed540 100644 --- a/productMods/templates/freemarker/edit/forms/js/awardReceiptUtils.js +++ b/productMods/templates/freemarker/edit/forms/js/awardReceiptUtils.js @@ -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(); diff --git a/productMods/templates/freemarker/edit/forms/js/educationalTrainingUtils.js b/productMods/templates/freemarker/edit/forms/js/educationalTrainingUtils.js new file mode 100644 index 00000000..85e6dc8d --- /dev/null +++ b/productMods/templates/freemarker/edit/forms/js/educationalTrainingUtils.js @@ -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); + } +} diff --git a/productMods/templates/freemarker/edit/forms/personHasEducationalTraining.ftl b/productMods/templates/freemarker/edit/forms/personHasEducationalTraining.ftl index b2e06895..b514b188 100644 --- a/productMods/templates/freemarker/edit/forms/personHasEducationalTraining.ftl +++ b/productMods/templates/freemarker/edit/forms/personHasEducationalTraining.ftl @@ -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 = "(${i18n().year_hint_format})" /> -

${titleVerb} ${i18n().educational_training_for} ${subjectName}${editConfiguration.subjectName}

+

${titleVerb} ${i18n().educational_training_for} ${editConfiguration.subjectName}

<#--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
- <#assign degreeOpts = editConfiguration.pageData.degree /> - <#list degreeOpts?keys as key> - + + <#if editMode == "edit"> + + + <#else> + +

@@ -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(); +}); @@ -229,6 +242,7 @@ ${scripts.add('', '', '', + '', '')} diff --git a/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/PersonHasAwardOrHonorGenerator.java b/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/PersonHasAwardOrHonorGenerator.java index 0e911d07..862bceb4 100644 --- a/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/PersonHasAwardOrHonorGenerator.java +++ b/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/PersonHasAwardOrHonorGenerator.java @@ -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" + "}"; diff --git a/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/PersonHasEducationalTraining.java b/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/PersonHasEducationalTraining.java index 4af8ca41..762ff407 100644 --- a/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/PersonHasEducationalTraining.java +++ b/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/PersonHasEducationalTraining.java @@ -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 ?edTraining .\n" + + "?edTraining a core:EducationalProcess .\n" + + "?edTraining ?person ."; final static String trainingTypeAssertion = "?edTraining a ?trainingType ."; + final static String n3ForNewAwardedDegree = + "@prefix core: <"+ vivoCore +"> .\n"+ + "?edTraining ?newAwardedDegree . \n" + + "?newAwardedDegree ?edTraining . \n" + + "?newAwardedDegree ?person . \n" + + "?person ?newAwardedDegree . \n" + + "?newAwardedDegree <"+ label +"> ?awardedDegreeLabel . \n" + + "?newOrg ?newAwardedDegree . \n" + + "?newAwardedDegree ?newOrg . \n" + + "?newAwardedDegree ?degreeType .\n"+ + "?degreeType ?newAwardedDegree . \n"+ + "?newAwardedDegree a core:AwardedDegree ."; + + final static String existingAwardedDegreeLabel = + "?edTraining ?existingAwardedDegree . \n" + + "?existingAwardedDegree ?edTraining . \n" + + "?existingAwardedDegree ?degreeType .\n"+ + "?degreeType ?existingAwardedDegree . \n"+ + "?existingAwardedDegree <"+ label +"> ?existingAwardedDegreeLabel . " ; + final static String n3ForNewOrg = - "?edTraining <"+ trainingAtOrg +"> ?newOrg . \n" + - "?newOrg ?inverseTrainingAtOrg ?edTraining . \n" + + "?edTraining ?newOrg . \n" + + "?newOrg ?edTraining . \n" + "?newOrg <"+ label +"> ?orgLabel . \n" + "?newOrg a ?orgType ."; - + final static String n3ForExistingOrg = - "?edTraining <"+ trainingAtOrg +"> ?existingOrg . \n" + - "?existingOrg ?inverseTrainingAtOrg ?edTraining . \n" + + "?edTraining ?existingOrg . \n" + + "?existingOrg ?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 ?existingOrg . }\n"; final static String orgLabelQuery = "SELECT ?existingOrgLabel WHERE {\n"+ - "?edTraining <"+ trainingAtOrg +"> ?existingOrg .\n"+ + "?edTraining ?existingOrg .\n"+ "?existingOrg <"+ label +"> ?existingOrgLabel .\n"+ "}"; + final static String existingAwardedDegreeQuery = + "SELECT ?existingAwardedDegree WHERE {\n"+ + "?edTraining ?existingAwardedDegree . }\n"; + + final static String existingAwardedDegreeLabelQuery = + "SELECT ?existingAwardedDegreeLabel WHERE {\n"+ + "?edTraining ?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 ?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 ?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: " + " SELECT ?inverseTrainingAtOrg " - + " WHERE { ?inverseTrainingAtOrg owl:inverseOf <"+ trainingAtOrg +"> . } "; + + " WHERE { ?inverseTrainingAtOrg owl:inverseOf . } "; //Adding form specific data such as edit mode @@ -358,10 +408,7 @@ public class PersonHasEducationalTraining extends VivoBaseGenerator implements public EditMode getEditMode(VitroRequest vreq) { List predicates = new ArrayList(); - predicates.add(trainingAtOrg); + predicates.add("http://vivoweb.org/ontology/core#relates"); return EditModeUtils.getEditMode(vreq, predicates); } - - - } diff --git a/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/VivoBaseGenerator.java b/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/VivoBaseGenerator.java index 7bd8818a..cab2f6b3 100644 --- a/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/VivoBaseGenerator.java +++ b/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/VivoBaseGenerator.java @@ -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"; diff --git a/src/org/vivoweb/webapp/util/ModelUtils.java b/src/org/vivoweb/webapp/util/ModelUtils.java index 9b62e3c4..a7afab86 100644 --- a/src/org/vivoweb/webapp/util/ModelUtils.java +++ b/src/org/vivoweb/webapp/util/ModelUtils.java @@ -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 processClass = new HashSet(); static {