From 7cf8a6eb8f72b0b3548b4ef4f0c3c12e55297d4f Mon Sep 17 00:00:00 2001 From: grahamtriggs Date: Wed, 21 Oct 2015 16:08:13 +0100 Subject: [PATCH] [VIVO-1078] Restrict editor resolution to only books and book sections (chapters) --- .../listViewConfig-authorInAuthorship.xml | 450 +++++++++--------- .../listViewConfig-publicationVenueFor.xml | 12 +- .../config/listViewConfig-publisherOf.xml | 10 +- 3 files changed, 242 insertions(+), 230 deletions(-) diff --git a/productMods/config/listViewConfig-authorInAuthorship.xml b/productMods/config/listViewConfig-authorInAuthorship.xml index 8e356012..ef3e3764 100644 --- a/productMods/config/listViewConfig-authorInAuthorship.xml +++ b/productMods/config/listViewConfig-authorInAuthorship.xml @@ -4,260 +4,256 @@ - - PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> + + PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX core: <http://vivoweb.org/ontology/core#> - PREFIX bibo: <http://purl.org/ontology/bibo/> + PREFIX bibo: <http://purl.org/ontology/bibo/> PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#> PREFIX foaf: <http://xmlns.com/foaf/0.1/> - - SELECT DISTINCT ?subclass - ?authorship - ?infoResource ?infoResourceName - ?dateTime - ?journal - ?volume - ?startPage - ?endPage - ?publisher - ?locale - ?appearsIn - ?partOf - ?editor - ?hideThis - WHERE { + + SELECT DISTINCT ?subclass + ?authorship + ?infoResource ?infoResourceName + ?dateTime + ?journal + ?volume + ?startPage + ?endPage + ?publisher + ?locale + ?appearsIn + ?partOf + ?editor + ?hideThis + WHERE + { ?subject ?property ?authorship . ?authorship core:relates ?infoResource . - ?infoResource a <http://purl.obolibrary.org/obo/IAO_0000030> . + ?infoResource a <http://purl.obolibrary.org/obo/IAO_0000030> . ?infoResource rdfs:label ?infoResourceName . - - OPTIONAL { ?infoResource bibo:volume ?volume } - OPTIONAL { ?infoResource bibo:pageStart ?startPage } - OPTIONAL { ?infoResource bibo:pageEnd ?endPage } - OPTIONAL { ?infoResource core:placeOfPublication ?locale } - OPTIONAL { ?infoResource bibo:reproducedIn ?appearsInObj . - ?appearsInObj rdfs:label ?appearsIn - } - OPTIONAL { ?infoResource core:publisher ?publisherObj . - ?publisherObj rdfs:label ?publisher - } - OPTIONAL { ?infoResource core:relatedBy ?editorship . - ?editorship a core:Editorship . - ?editorship core:relates ?editorObj . - ?editorObj rdfs:label ?editor - } - OPTIONAL { ?infoResource <http://purl.obolibrary.org/obo/BFO_0000050> ?partOfObj . - ?partOfObj rdfs:label ?partOf - } - OPTIONAL { ?infoResource vitro:mostSpecificType ?subclass } - OPTIONAL { ?infoResource core:hasPublicationVenue ?publishedIn . - ?publishedIn rdfs:label ?journal - } - OPTIONAL { ?infoResource core:dateTimeValue ?dateTimeValue . - ?dateTimeValue core:dateTime ?dateTime - } - OPTIONAL { ?authorship core:hideFromDisplay ?hideThis } - + OPTIONAL { ?infoResource bibo:volume ?volume } + OPTIONAL { ?infoResource bibo:pageStart ?startPage } + OPTIONAL { ?infoResource bibo:pageEnd ?endPage } + OPTIONAL { ?infoResource core:placeOfPublication ?locale } + OPTIONAL { + ?infoResource bibo:reproducedIn ?appearsInObj . + ?appearsInObj rdfs:label ?appearsIn + } + + OPTIONAL { + ?infoResource core:publisher ?publisherObj . + ?publisherObj rdfs:label ?publisher + } + + OPTIONAL { + ?infoResource core:relatedBy ?editorship . + ?editorship a core:Editorship . + ?editorship core:relates ?editorObj . + ?editorObj rdfs:label ?editor + } + + OPTIONAL { + ?infoResource <http://purl.obolibrary.org/obo/BFO_0000050> ?partOfObj . + ?partOfObj rdfs:label ?partOf + } + + OPTIONAL { ?infoResource vitro:mostSpecificType ?subclass } + OPTIONAL { + ?infoResource core:hasPublicationVenue ?publishedIn . + ?publishedIn rdfs:label ?journal + } + + OPTIONAL { + ?infoResource core:dateTimeValue ?dateTimeValue . + ?dateTimeValue core:dateTime ?dateTime + } + OPTIONAL { ?authorship core:hideFromDisplay ?hideThis } + + FILTER ( bound(?infoResource) ) - - } ORDER BY ?subclass DESC(?dateTime) ?infoResourceName + + } ORDER BY ?subclass DESC(?dateTime) ?infoResourceName PREFIX core: <http://vivoweb.org/ontology/core#> + PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX bibo: <http://purl.org/ontology/bibo/> - PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#> - CONSTRUCT { - ?subject ?property ?authorship . - ?authorship a core:Authorship . - ?authorship core:relates ?infoResource . - ?infoResource a <http://purl.obolibrary.org/obo/IAO_0000030> . - ?infoResource vitro:mostSpecificType ?subclass - } WHERE { - ?subject ?property ?authorship . - ?authorship a core:Authorship . - ?authorship core:relates ?infoResource . - ?infoResource a <http://purl.obolibrary.org/obo/IAO_0000030> . - ?infoResource vitro:mostSpecificType ?subclass - } - - - - PREFIX core: <http://vivoweb.org/ontology/core#> - PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> - PREFIX bibo: <http://purl.org/ontology/bibo/> - CONSTRUCT { - ?subject ?property ?authorship . - ?authorship a core:Authorship . - ?authorship core:hideFromDisplay ?hideThis . - ?authorship core:relates ?infoResource . - ?infoResource a <http://purl.obolibrary.org/obo/IAO_0000030> . - ?infoResource rdfs:label ?infoResourceName . - ?infoResource core:hasPublicationVenue ?publishedIn . - ?publishedIn rdfs:label ?journal - } WHERE { - { - ?subject ?property ?authorship . - ?authorship a core:Authorship - } - UNION { - ?subject ?property ?authorship . - ?authorship a core:Authorship . - } UNION { - ?subject ?property ?authorship . - ?authorship a core:Authorship . - ?authorship core:hideFromDisplay ?hideThis . - } UNION { - ?subject ?property ?authorship . - ?authorship a core:Authorship . - ?authorship core:relates ?infoResource . - ?infoResource a <http://purl.obolibrary.org/obo/IAO_0000030> - } UNION { - ?subject ?property ?authorship . - ?authorship a core:Authorship . - ?authorship core:relates ?infoResource . - ?infoResource a <http://purl.obolibrary.org/obo/IAO_0000030> . - ?infoResource rdfs:label ?infoResourceName - } UNION { - ?subject ?property ?authorship . - ?authorship a core:Authorship . - ?authorship core:relates ?infoResource . - ?infoResource a <http://purl.obolibrary.org/obo/IAO_0000030> . - ?infoResource core:hasPublicationVenue ?publishedIn - } UNION { - ?subject ?property ?authorship . - ?authorship a core:Authorship . - ?authorship core:relates ?infoResource . - ?infoResource a <http://purl.obolibrary.org/obo/IAO_0000030> . - ?infoResource core:hasPublicationVenue ?publishedIn . - ?publishedIn rdfs:label ?journal - } - } - - - - PREFIX core: <http://vivoweb.org/ontology/core#> - PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> - PREFIX bibo: <http://purl.org/ontology/bibo/> PREFIX foaf: <http://xmlns.com/foaf/0.1/> - CONSTRUCT { - ?subject ?property ?authorship . + PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#> + CONSTRUCT + { + ?subject ?property ?authorship . ?authorship a core:Authorship . - ?authorship core:relates ?infoResource . ?authorship core:hideFromDisplay ?hideThis . + ?authorship core:relates ?infoResource . ?infoResource a <http://purl.obolibrary.org/obo/IAO_0000030> . - ?infoResource bibo:volume ?volume . - ?infoResource bibo:pageStart ?startPage . - ?infoResource bibo:pageEnd ?endPage . - ?infoResource core:placeOfPublication ?locale . + ?infoResource vitro:mostSpecificType ?subclass . + ?infoResource rdfs:label ?infoResourceName . + ?infoResource bibo:volume ?volume . + ?infoResource bibo:pageStart ?startPage . + ?infoResource bibo:pageEnd ?endPage . + ?infoResource core:placeOfPublication ?locale . ?infoResource bibo:reproducedIn ?appearsInObj . + ?appearsInObj rdfs:label ?appearsIn . + ?infoResource core:publisher ?publisherObj . + ?publisherObj rdfs:label ?publisher . + + ?infoResource core:hasPublicationVenue ?publishedIn . + ?publishedIn rdfs:label ?journal . + + ?infoResource core:dateTimeValue ?dateTimeValue . + ?dateTimeValue core:dateTime ?dateTime . + + ?infoResource <http://purl.obolibrary.org/obo/BFO_0000050> ?partOfObj . + ?partOfObj rdfs:label ?partOf . + ?infoResource core:relatedBy ?editorship . ?editorship a core:Editorship . ?editorship core:relates ?editorObj . ?editorObj a foaf:Person . - ?infoResource <http://purl.obolibrary.org/obo/BFO_0000050> ?partOfObj . - ?appearsInObj rdfs:label ?appearsIn . - ?publisherObj rdfs:label ?publisher . ?editorObj rdfs:label ?editor . - ?partOfObj rdfs:label ?partOf - } WHERE { + } + WHERE + { { - ?subject ?property ?authorship . - ?authorship a core:Authorship + ?subject ?property ?authorship . + ?authorship a core:Authorship } - UNION { - ?subject ?property ?authorship . - ?authorship a core:Authorship . - } UNION { - ?subject ?property ?authorship . - ?authorship a core:Authorship . - ?authorship core:hideFromDisplay ?hideThis . - } UNION { - ?subject ?property ?authorship . - ?authorship a core:Authorship . - ?authorship core:relates ?infoResource . - ?infoResource a <http://purl.obolibrary.org/obo/IAO_0000030> . - } UNION { - ?subject ?property ?authorship . - ?authorship a core:Authorship . - ?authorship core:relates ?infoResource . - ?infoResource a <http://purl.obolibrary.org/obo/IAO_0000030> . - ?infoResource bibo:volume ?volume . - } UNION { - ?subject ?property ?authorship . - ?authorship a core:Authorship . - ?authorship core:relates ?infoResource . - ?infoResource a <http://purl.obolibrary.org/obo/IAO_0000030> . - ?infoResource bibo:pageStart ?startPage . - } UNION { - ?subject ?property ?authorship . - ?authorship a core:Authorship . - ?authorship core:relates ?infoResource . - ?infoResource a <http://purl.obolibrary.org/obo/IAO_0000030> . - ?infoResource bibo:pageEnd ?endPage . - } UNION { - ?subject ?property ?authorship . - ?authorship a core:Authorship . - ?authorship core:relates ?infoResource . - ?infoResource a <http://purl.obolibrary.org/obo/IAO_0000030> . - ?infoResource core:placeOfPublication ?locale . - } UNION { - ?subject ?property ?authorship . - ?authorship a core:Authorship . - ?authorship core:relates ?infoResource . - ?infoResource a <http://purl.obolibrary.org/obo/IAO_0000030> . - ?infoResource bibo:reproducedIn ?appearsInObj . - ?appearsInObj rdfs:label ?appearsIn - } UNION { - ?subject ?property ?authorship . - ?authorship a core:Authorship . - ?authorship core:relates ?infoResource . - ?infoResource a <http://purl.obolibrary.org/obo/IAO_0000030> . - ?infoResource core:publisher ?publisherObj . - ?publisherObj rdfs:label ?publisher - } UNION { - ?subject ?property ?authorship . - ?authorship a core:Authorship . - ?authorship core:relates ?infoResource . - ?infoResource a <http://purl.obolibrary.org/obo/IAO_0000030> . - ?infoResource core:relatedBy ?editorship . - ?editorship a core:Editorship . - ?editorship core:relates ?editorObj . - ?editorObj a foaf:Person . - ?editorObj rdfs:label ?editor - } UNION { - ?subject ?property ?authorship . - ?authorship a core:Authorship . - ?authorship core:relates ?infoResource . - ?infoResource a <http://purl.obolibrary.org/obo/IAO_0000030> . - ?infoResource <http://purl.obolibrary.org/obo/BFO_0000050> ?partOfObj . - ?partOfObj rdfs:label ?partOf - } - } + UNION + { + ?subject ?property ?authorship . + ?authorship a core:Authorship . + ?authorship core:hideFromDisplay ?hideThis . + } + UNION + { + ?subject ?property ?authorship . + ?authorship a core:Authorship . + ?authorship core:relates ?infoResource . + ?infoResource a <http://purl.obolibrary.org/obo/IAO_0000030> . + } + UNION + { + ?subject ?property ?authorship . + ?authorship a core:Authorship . + ?authorship core:relates ?infoResource . + ?infoResource a <http://purl.obolibrary.org/obo/IAO_0000030> . + ?infoResource vitro:mostSpecificType ?subclass . + } + UNION + { + ?subject ?property ?authorship . + ?authorship a core:Authorship . + ?authorship core:relates ?infoResource . + ?infoResource a <http://purl.obolibrary.org/obo/IAO_0000030> . + ?infoResource rdfs:label ?infoResourceName + } + UNION + { + ?subject ?property ?authorship . + ?authorship a core:Authorship . + ?authorship core:relates ?infoResource . + ?infoResource a <http://purl.obolibrary.org/obo/IAO_0000030> . + ?infoResource bibo:volume ?volume . + } + UNION + { + ?subject ?property ?authorship . + ?authorship a core:Authorship . + ?authorship core:relates ?infoResource . + ?infoResource a <http://purl.obolibrary.org/obo/IAO_0000030> . + ?infoResource bibo:pageStart ?startPage . + } + UNION + { + ?subject ?property ?authorship . + ?authorship a core:Authorship . + ?authorship core:relates ?infoResource . + ?infoResource a <http://purl.obolibrary.org/obo/IAO_0000030> . + ?infoResource bibo:pageEnd ?endPage . + } + UNION + { + ?subject ?property ?authorship . + ?authorship a core:Authorship . + ?authorship core:relates ?infoResource . + ?infoResource a <http://purl.obolibrary.org/obo/IAO_0000030> . + ?infoResource core:placeOfPublication ?locale . + } + UNION + { + ?subject ?property ?authorship . + ?authorship a core:Authorship . + ?authorship core:relates ?infoResource . + ?infoResource a <http://purl.obolibrary.org/obo/IAO_0000030> . + ?infoResource bibo:reproducedIn ?appearsInObj . + ?appearsInObj rdfs:label ?appearsIn . + } + UNION + { + ?subject ?property ?authorship . + ?authorship a core:Authorship . + ?authorship core:relates ?infoResource . + ?infoResource a <http://purl.obolibrary.org/obo/IAO_0000030> . + ?infoResource core:publisher ?publisherObj . + ?publisherObj rdfs:label ?publisher . + } + UNION + { + ?subject ?property ?authorship . + ?authorship a core:Authorship . + ?authorship core:relates ?infoResource . + ?infoResource a <http://purl.obolibrary.org/obo/IAO_0000030> . + ?infoResource core:dateTimeValue ?dateTimeValue . + ?dateTimeValue core:dateTime ?dateTime . + } + UNION + { + ?subject ?property ?authorship . + ?authorship a core:Authorship . + ?authorship core:relates ?infoResource . + ?infoResource a <http://purl.obolibrary.org/obo/IAO_0000030> . + ?infoResource core:hasPublicationVenue ?publishedIn . + ?publishedIn rdfs:label ?journal . + } + UNION + { + ?subject ?property ?authorship . + ?authorship a core:Authorship . + ?authorship core:relates ?infoResource . + ?infoResource a <http://purl.obolibrary.org/obo/IAO_0000030> . + ?infoResource <http://purl.obolibrary.org/obo/BFO_0000050> ?partOfObj . + ?partOfObj rdfs:label ?partOf . + } + UNION + { + ?subject ?property ?authorship . + ?authorship a core:Authorship . + ?authorship core:relates ?infoResource . + ?infoResource a bibo:Book . + ?infoResource core:relatedBy ?editorship . + ?editorship a core:Editorship . + ?editorship core:relates ?editorObj . + ?editorObj a foaf:Person . + ?editorObj rdfs:label ?editor . + } + UNION + { + ?subject ?property ?authorship . + ?authorship a core:Authorship . + ?authorship core:relates ?infoResource . + ?infoResource a bibo:BookSection . + ?infoResource core:relatedBy ?editorship . + ?editorship a core:Editorship . + ?editorship core:relates ?editorObj . + ?editorObj a foaf:Person . + ?editorObj rdfs:label ?editor . + } + } - - PREFIX core: <http://vivoweb.org/ontology/core#> - PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> - PREFIX bibo: <http://purl.org/ontology/bibo/> - CONSTRUCT { - ?subject ?property ?authorship . - ?authorship a core:Authorship . - ?authorship core:relates ?infoResource . - ?infoResource a <http://purl.obolibrary.org/obo/IAO_0000030> . - ?infoResource core:dateTimeValue ?dateTimeValue . - ?dateTimeValue core:dateTime ?dateTime - } WHERE { - ?subject ?property ?authorship . - ?authorship a core:Authorship . - ?authorship core:relates ?infoResource . - ?infoResource a <http://purl.obolibrary.org/obo/IAO_0000030> . - ?infoResource core:dateTimeValue ?dateTimeValue . - ?dateTimeValue core:dateTime ?dateTime - } - - diff --git a/productMods/config/listViewConfig-publicationVenueFor.xml b/productMods/config/listViewConfig-publicationVenueFor.xml index 78b2792f..6e1e87fa 100644 --- a/productMods/config/listViewConfig-publicationVenueFor.xml +++ b/productMods/config/listViewConfig-publicationVenueFor.xml @@ -114,13 +114,21 @@ ?infoResource core:placeOfPublication ?locale . } UNION { ?subject ?property ?infoResource . - ?infoResource a <http://purl.obolibrary.org/obo/IAO_0000030> . + ?infoResource a bibo:Book . ?infoResource core:relatedBy ?editorship . ?editorship a core:Editorship . ?editorship core:relates ?editorObj . ?editorObj a foaf:Person . ?editorObj rdfs:label ?editor - } + } UNION { + ?subject ?property ?infoResource . + ?infoResource a bibo:BookSection . + ?infoResource core:relatedBy ?editorship . + ?editorship a core:Editorship . + ?editorship core:relates ?editorObj . + ?editorObj a foaf:Person . + ?editorObj rdfs:label ?editor + } } diff --git a/productMods/config/listViewConfig-publisherOf.xml b/productMods/config/listViewConfig-publisherOf.xml index ff811e0e..6bc96b51 100644 --- a/productMods/config/listViewConfig-publisherOf.xml +++ b/productMods/config/listViewConfig-publisherOf.xml @@ -147,12 +147,20 @@ ?appearsInObj rdfs:label ?appearsIn } UNION { ?subject ?property ?infoResource . - ?infoResource a <http://purl.obolibrary.org/obo/IAO_0000030> . + ?infoResource a bibo:Book . ?infoResource core:relatedBy ?editorship . ?editorship a core:Editorship . ?editorship core:relates ?editorObj . ?editorObj a foaf:Person . ?editorObj rdfs:label ?editor + } UNION { + ?subject ?property ?infoResource . + ?infoResource a bibo:BookSection . + ?infoResource core:relatedBy ?editorship . + ?editorship a core:Editorship . + ?editorship core:relates ?editorObj . + ?editorObj a foaf:Person . + ?editorObj rdfs:label ?editor } UNION { ?subject ?property ?infoResource . ?infoResource a <http://purl.obolibrary.org/obo/IAO_0000030> .