From cae4fe03c17b72ef2d1a86b19dded4f4c600f7f1 Mon Sep 17 00:00:00 2001 From: tworrall Date: Thu, 29 Aug 2013 12:35:35 -0400 Subject: [PATCH] VIVO-112: more changes for role related forms and addAuthorToPub --- .../app/loadedAtStartup/PropertyConfig.n3 | 16 ++++++------- .../listViewConfig-hasInvestigatorRole.xml | 2 +- productMods/config/listViewConfig-hasRole.xml | 7 +++--- ...Config-informationResourceInAuthorship.xml | 23 ++++++++++++------- 4 files changed, 27 insertions(+), 21 deletions(-) diff --git a/productMods/WEB-INF/ontologies/app/loadedAtStartup/PropertyConfig.n3 b/productMods/WEB-INF/ontologies/app/loadedAtStartup/PropertyConfig.n3 index c7ea9e42..8b237c6b 100644 --- a/productMods/WEB-INF/ontologies/app/loadedAtStartup/PropertyConfig.n3 +++ b/productMods/WEB-INF/ontologies/app/loadedAtStartup/PropertyConfig.n3 @@ -52,7 +52,7 @@ local:authorInAuthorshipConfig a :ObjectPropertyDisplayConfig ; vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ; vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ; vitro:customEntryFormAnnot "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.AddPublicationToPersonGenerator"^^xsd:string ; - :propertyGroup . + :propertyGroup . local:hasServiceProviderRoleContext a :ConfigContext ; :hasConfiguration local:hasServiceProviderRoleConfig ; @@ -65,7 +65,7 @@ local:hasServiceProviderRoleConfig a :ObjectPropertyDisplayConfig ; vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ; vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ; vitro:customEntryFormAnnot "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.AddServiceProviderRoleToPersonGenerator"^^ ; - :propertyGroup . + :propertyGroup . local:hasClinicalRoleContext a :ConfigContext ; :hasConfiguration local:hasClinicalRoleConfig ; @@ -130,7 +130,7 @@ local:hasEditorRoleConfig a :ObjectPropertyDisplayConfig ; vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ; vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ; vitro:customEntryFormAnnot "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.AddEditorRoleToPersonGenerator"^^ ; - :propertyGroup . + :propertyGroup . local:hasReviewerRoleContext a :ConfigContext ; :hasConfiguration local:hasReviewerRoleConfig ; @@ -143,7 +143,7 @@ local:hasReviewerRoleConfig a :ObjectPropertyDisplayConfig ; vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ; vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ; vitro:customEntryFormAnnot "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.AddReviewerRoleToPersonGenerator"^^ ; - :propertyGroup . + :propertyGroup . local:hasOrganizerRoleContext a :ConfigContext ; :hasConfiguration local:hasOrganizerRoleConfig ; @@ -156,7 +156,7 @@ local:hasOrganizerRoleConfig a :ObjectPropertyDisplayConfig ; vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ; vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ; vitro:customEntryFormAnnot "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.AddOrganizerRoleToPersonGenerator"^^ ; - :propertyGroup . + :propertyGroup . local:hasOutreachProviderRoleContext a :ConfigContext ; :hasConfiguration local:hasOutreachProviderRoleConfig ; @@ -169,7 +169,7 @@ local:hasOutreachProviderRoleConfig a :ObjectPropertyDisplayConfig ; vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ; vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ; vitro:customEntryFormAnnot "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.AddOutreachProviderRoleToPersonGenerator"^^ ; - :propertyGroup . + :propertyGroup . local:hasAttendeeRoleContext a :ConfigContext ; :hasConfiguration local:hasAttendeeRoleConfig ; @@ -247,7 +247,7 @@ local:hasPresenterRoleConfig a :ObjectPropertyDisplayConfig ; vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ; vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ; vitro:customEntryFormAnnot "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.AddPresenterRoleToPersonGenerator"^^ ; - :propertyGroup . + :propertyGroup . local:awardOrHonorContext a :ConfigContext ; :hasConfiguration local:awardOrHonorConfig ; @@ -273,7 +273,7 @@ local:educationalTrainingConfig a :ObjectPropertyDisplayConfig ; vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ; vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ; vitro:customEntryFormAnnot "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.PersonHasEducationalTraining"^^ ; - :propertyGroup . + :propertyGroup . local:informationResourceInAuthorshipContext a :ConfigContext ; :hasConfiguration local:informationResourceInAuthorshipConfig ; diff --git a/productMods/config/listViewConfig-hasInvestigatorRole.xml b/productMods/config/listViewConfig-hasInvestigatorRole.xml index 54131a60..98344214 100644 --- a/productMods/config/listViewConfig-hasInvestigatorRole.xml +++ b/productMods/config/listViewConfig-hasInvestigatorRole.xml @@ -82,7 +82,7 @@ { ?subject ?property ?role . ?role a ?objectType . - ?role <http://purl.obolibrary.org/obo/BFO_0000054>n ?activity . + ?role <http://purl.obolibrary.org/obo/BFO_0000054> ?activity . ?activity rdfs:label ?activityLabel } } diff --git a/productMods/config/listViewConfig-hasRole.xml b/productMods/config/listViewConfig-hasRole.xml index 0d66740f..a3383212 100644 --- a/productMods/config/listViewConfig-hasRole.xml +++ b/productMods/config/listViewConfig-hasRole.xml @@ -22,7 +22,8 @@ ?objectType WHERE { ?subject ?property ?role . - ?role a ?objectType + ?role a ?objectType . + ?role vitro:mostSpecificType ?roleSubclass OPTIONAL { ?role <http://purl.obolibrary.org/obo/BFO_0000054> ?activity LET (?activityName := afn:localname(?activity)) @@ -53,9 +54,7 @@ } } # NOT EXISTS { ?role core:hideFromDisplay ?hideThis } - - FILTER ( bound(?activity) ) - + FILTER ( bound(?activity) && ?objectType = ?roleSubclass ) } ORDER BY ?subclass DESC(?dateTimeEnd) DESC(?dateTimeStart) ?activityLabel ?activityName diff --git a/productMods/config/listViewConfig-informationResourceInAuthorship.xml b/productMods/config/listViewConfig-informationResourceInAuthorship.xml index ff635393..d7af9d7f 100644 --- a/productMods/config/listViewConfig-informationResourceInAuthorship.xml +++ b/productMods/config/listViewConfig-informationResourceInAuthorship.xml @@ -13,11 +13,13 @@ SELECT DISTINCT ?subclass ?authorship - ?person ?personName WHERE { - ?subject ?property ?authorship . - ?subject a core:Authorship - OPTIONAL { ?authorship core:authorRank ?rank } - OPTIONAL { ?authorship core:relates ?person . + ?person ?personName + WHERE { + ?subject ?property ?authorship . + ?authorship a core:Authorship + OPTIONAL { ?authorship core:authorRank ?rank } + OPTIONAL { ?authorship core:relates ?person . + ?person a foaf:Person . ?person rdfs:label ?personName OPTIONAL { ?person vitro:mostSpecificType ?subclass . @@ -44,10 +46,13 @@ PREFIX core: <http://vivoweb.org/ontology/core#> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> - PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#> + PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#> + PREFIX foaf: <http://xmlns.com/foaf/0.1/> CONSTRUCT { ?subject ?property ?authorship . ?authorship ?authorshipProperty ?authorshipValue . + ?authorship core:relates ?person . + ?person a foaf:Person . ?person rdfs:label ?personName . ?person vitro:mostSpecificType ?subclass } WHERE { @@ -58,11 +63,13 @@ ?authorship ?authorshipProperty ?authorshipValue } UNION { ?subject ?property ?authorship . - ?authorship core:relates ?person . + ?authorship core:relates ?person . + ?person a foaf:Person . ?person rdfs:label ?personName } UNION { ?subject ?property ?authorship . - ?authorship core:relates ?person . + ?authorship core:relates ?person . + ?person a foaf:Person . ?person rdfs:label ?personName . ?person vitro:mostSpecificType ?subclass }