[VIVO-1078] Restrict editor resolution to only books and book sections (chapters)

This commit is contained in:
grahamtriggs 2015-10-21 16:08:13 +01:00
parent 84a7733bd6
commit 7cf8a6eb8f
3 changed files with 242 additions and 230 deletions

View file

@ -25,7 +25,8 @@
?partOf ?partOf
?editor ?editor
?hideThis ?hideThis
WHERE { WHERE
{
?subject ?property ?authorship . ?subject ?property ?authorship .
?authorship core:relates ?infoResource . ?authorship core:relates ?infoResource .
?infoResource a <http://purl.obolibrary.org/obo/IAO_0000030> . ?infoResource a <http://purl.obolibrary.org/obo/IAO_0000030> .
@ -35,25 +36,36 @@
OPTIONAL { ?infoResource bibo:pageStart ?startPage } OPTIONAL { ?infoResource bibo:pageStart ?startPage }
OPTIONAL { ?infoResource bibo:pageEnd ?endPage } OPTIONAL { ?infoResource bibo:pageEnd ?endPage }
OPTIONAL { ?infoResource core:placeOfPublication ?locale } OPTIONAL { ?infoResource core:placeOfPublication ?locale }
OPTIONAL { ?infoResource bibo:reproducedIn ?appearsInObj . OPTIONAL {
?infoResource bibo:reproducedIn ?appearsInObj .
?appearsInObj rdfs:label ?appearsIn ?appearsInObj rdfs:label ?appearsIn
} }
OPTIONAL { ?infoResource core:publisher ?publisherObj .
OPTIONAL {
?infoResource core:publisher ?publisherObj .
?publisherObj rdfs:label ?publisher ?publisherObj rdfs:label ?publisher
} }
OPTIONAL { ?infoResource core:relatedBy ?editorship .
OPTIONAL {
?infoResource core:relatedBy ?editorship .
?editorship a core:Editorship . ?editorship a core:Editorship .
?editorship core:relates ?editorObj . ?editorship core:relates ?editorObj .
?editorObj rdfs:label ?editor ?editorObj rdfs:label ?editor
} }
OPTIONAL { ?infoResource <http://purl.obolibrary.org/obo/BFO_0000050> ?partOfObj .
OPTIONAL {
?infoResource <http://purl.obolibrary.org/obo/BFO_0000050> ?partOfObj .
?partOfObj rdfs:label ?partOf ?partOfObj rdfs:label ?partOf
} }
OPTIONAL { ?infoResource vitro:mostSpecificType ?subclass } OPTIONAL { ?infoResource vitro:mostSpecificType ?subclass }
OPTIONAL { ?infoResource core:hasPublicationVenue ?publishedIn . OPTIONAL {
?infoResource core:hasPublicationVenue ?publishedIn .
?publishedIn rdfs:label ?journal ?publishedIn rdfs:label ?journal
} }
OPTIONAL { ?infoResource core:dateTimeValue ?dateTimeValue .
OPTIONAL {
?infoResource core:dateTimeValue ?dateTimeValue .
?dateTimeValue core:dateTime ?dateTime ?dateTimeValue core:dateTime ?dateTime
} }
OPTIONAL { ?authorship core:hideFromDisplay ?hideThis } OPTIONAL { ?authorship core:hideFromDisplay ?hideThis }
@ -64,198 +76,182 @@
} ORDER BY ?subclass DESC(?dateTime) ?infoResourceName } ORDER BY ?subclass DESC(?dateTime) ?infoResourceName
</query-select> </query-select>
<query-construct>
PREFIX core: &lt;http://vivoweb.org/ontology/core#&gt;
PREFIX bibo: &lt;http://purl.org/ontology/bibo/&gt;
PREFIX vitro: &lt;http://vitro.mannlib.cornell.edu/ns/vitro/0.7#&gt;
CONSTRUCT {
?subject ?property ?authorship .
?authorship a core:Authorship .
?authorship core:relates ?infoResource .
?infoResource a &lt;http://purl.obolibrary.org/obo/IAO_0000030&gt; .
?infoResource vitro:mostSpecificType ?subclass
} WHERE {
?subject ?property ?authorship .
?authorship a core:Authorship .
?authorship core:relates ?infoResource .
?infoResource a &lt;http://purl.obolibrary.org/obo/IAO_0000030&gt; .
?infoResource vitro:mostSpecificType ?subclass
}
</query-construct>
<query-construct> <query-construct>
PREFIX core: &lt;http://vivoweb.org/ontology/core#&gt; PREFIX core: &lt;http://vivoweb.org/ontology/core#&gt;
PREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt; PREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt;
PREFIX bibo: &lt;http://purl.org/ontology/bibo/&gt; PREFIX bibo: &lt;http://purl.org/ontology/bibo/&gt;
CONSTRUCT { PREFIX foaf: &lt;http://xmlns.com/foaf/0.1/&gt;
PREFIX vitro: &lt;http://vitro.mannlib.cornell.edu/ns/vitro/0.7#&gt;
CONSTRUCT
{
?subject ?property ?authorship . ?subject ?property ?authorship .
?authorship a core:Authorship . ?authorship a core:Authorship .
?authorship core:hideFromDisplay ?hideThis . ?authorship core:hideFromDisplay ?hideThis .
?authorship core:relates ?infoResource . ?authorship core:relates ?infoResource .
?infoResource a &lt;http://purl.obolibrary.org/obo/IAO_0000030&gt; . ?infoResource a &lt;http://purl.obolibrary.org/obo/IAO_0000030&gt; .
?infoResource vitro:mostSpecificType ?subclass .
?infoResource rdfs:label ?infoResourceName . ?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 . ?infoResource core:hasPublicationVenue ?publishedIn .
?publishedIn rdfs:label ?journal ?publishedIn rdfs:label ?journal .
} WHERE {
?infoResource core:dateTimeValue ?dateTimeValue .
?dateTimeValue core:dateTime ?dateTime .
?infoResource &lt;http://purl.obolibrary.org/obo/BFO_0000050&gt; ?partOfObj .
?partOfObj rdfs:label ?partOf .
?infoResource core:relatedBy ?editorship .
?editorship a core:Editorship .
?editorship core:relates ?editorObj .
?editorObj a foaf:Person .
?editorObj rdfs:label ?editor .
}
WHERE
{
{ {
?subject ?property ?authorship . ?subject ?property ?authorship .
?authorship a core:Authorship ?authorship a core:Authorship
} }
UNION { UNION
?subject ?property ?authorship . {
?authorship a core:Authorship .
} UNION {
?subject ?property ?authorship . ?subject ?property ?authorship .
?authorship a core:Authorship . ?authorship a core:Authorship .
?authorship core:hideFromDisplay ?hideThis . ?authorship core:hideFromDisplay ?hideThis .
} UNION { }
UNION
{
?subject ?property ?authorship . ?subject ?property ?authorship .
?authorship a core:Authorship . ?authorship a core:Authorship .
?authorship core:relates ?infoResource . ?authorship core:relates ?infoResource .
?infoResource a &lt;http://purl.obolibrary.org/obo/IAO_0000030&gt; ?infoResource a &lt;http://purl.obolibrary.org/obo/IAO_0000030&gt; .
} UNION { }
UNION
{
?subject ?property ?authorship .
?authorship a core:Authorship .
?authorship core:relates ?infoResource .
?infoResource a &lt;http://purl.obolibrary.org/obo/IAO_0000030&gt; .
?infoResource vitro:mostSpecificType ?subclass .
}
UNION
{
?subject ?property ?authorship . ?subject ?property ?authorship .
?authorship a core:Authorship . ?authorship a core:Authorship .
?authorship core:relates ?infoResource . ?authorship core:relates ?infoResource .
?infoResource a &lt;http://purl.obolibrary.org/obo/IAO_0000030&gt; . ?infoResource a &lt;http://purl.obolibrary.org/obo/IAO_0000030&gt; .
?infoResource rdfs:label ?infoResourceName ?infoResource rdfs:label ?infoResourceName
} UNION { }
UNION
{
?subject ?property ?authorship . ?subject ?property ?authorship .
?authorship a core:Authorship . ?authorship a core:Authorship .
?authorship core:relates ?infoResource . ?authorship core:relates ?infoResource .
?infoResource a &lt;http://purl.obolibrary.org/obo/IAO_0000030&gt; . ?infoResource a &lt;http://purl.obolibrary.org/obo/IAO_0000030&gt; .
?infoResource core:hasPublicationVenue ?publishedIn ?infoResource bibo:volume ?volume .
} UNION { }
UNION
{
?subject ?property ?authorship .
?authorship a core:Authorship .
?authorship core:relates ?infoResource .
?infoResource a &lt;http://purl.obolibrary.org/obo/IAO_0000030&gt; .
?infoResource bibo:pageStart ?startPage .
}
UNION
{
?subject ?property ?authorship .
?authorship a core:Authorship .
?authorship core:relates ?infoResource .
?infoResource a &lt;http://purl.obolibrary.org/obo/IAO_0000030&gt; .
?infoResource bibo:pageEnd ?endPage .
}
UNION
{
?subject ?property ?authorship .
?authorship a core:Authorship .
?authorship core:relates ?infoResource .
?infoResource a &lt;http://purl.obolibrary.org/obo/IAO_0000030&gt; .
?infoResource core:placeOfPublication ?locale .
}
UNION
{
?subject ?property ?authorship .
?authorship a core:Authorship .
?authorship core:relates ?infoResource .
?infoResource a &lt;http://purl.obolibrary.org/obo/IAO_0000030&gt; .
?infoResource bibo:reproducedIn ?appearsInObj .
?appearsInObj rdfs:label ?appearsIn .
}
UNION
{
?subject ?property ?authorship .
?authorship a core:Authorship .
?authorship core:relates ?infoResource .
?infoResource a &lt;http://purl.obolibrary.org/obo/IAO_0000030&gt; .
?infoResource core:publisher ?publisherObj .
?publisherObj rdfs:label ?publisher .
}
UNION
{
?subject ?property ?authorship .
?authorship a core:Authorship .
?authorship core:relates ?infoResource .
?infoResource a &lt;http://purl.obolibrary.org/obo/IAO_0000030&gt; .
?infoResource core:dateTimeValue ?dateTimeValue .
?dateTimeValue core:dateTime ?dateTime .
}
UNION
{
?subject ?property ?authorship . ?subject ?property ?authorship .
?authorship a core:Authorship . ?authorship a core:Authorship .
?authorship core:relates ?infoResource . ?authorship core:relates ?infoResource .
?infoResource a &lt;http://purl.obolibrary.org/obo/IAO_0000030&gt; . ?infoResource a &lt;http://purl.obolibrary.org/obo/IAO_0000030&gt; .
?infoResource core:hasPublicationVenue ?publishedIn . ?infoResource core:hasPublicationVenue ?publishedIn .
?publishedIn rdfs:label ?journal ?publishedIn rdfs:label ?journal .
} }
} UNION
</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;
PREFIX bibo: &lt;http://purl.org/ontology/bibo/&gt;
PREFIX foaf: &lt;http://xmlns.com/foaf/0.1/&gt;
CONSTRUCT {
?subject ?property ?authorship .
?authorship a core:Authorship .
?authorship core:relates ?infoResource .
?authorship core:hideFromDisplay ?hideThis .
?infoResource a &lt;http://purl.obolibrary.org/obo/IAO_0000030&gt; .
?infoResource bibo:volume ?volume .
?infoResource bibo:pageStart ?startPage .
?infoResource bibo:pageEnd ?endPage .
?infoResource core:placeOfPublication ?locale .
?infoResource bibo:reproducedIn ?appearsInObj .
?infoResource core:publisher ?publisherObj .
?infoResource core:relatedBy ?editorship .
?editorship a core:Editorship .
?editorship core:relates ?editorObj .
?editorObj a foaf:Person .
?infoResource &lt;http://purl.obolibrary.org/obo/BFO_0000050&gt; ?partOfObj .
?appearsInObj rdfs:label ?appearsIn .
?publisherObj rdfs:label ?publisher .
?editorObj rdfs:label ?editor .
?partOfObj rdfs:label ?partOf
} 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 &lt;http://purl.obolibrary.org/obo/IAO_0000030&gt; .
} UNION {
?subject ?property ?authorship .
?authorship a core:Authorship .
?authorship core:relates ?infoResource .
?infoResource a &lt;http://purl.obolibrary.org/obo/IAO_0000030&gt; .
?infoResource bibo:volume ?volume .
} UNION {
?subject ?property ?authorship .
?authorship a core:Authorship .
?authorship core:relates ?infoResource .
?infoResource a &lt;http://purl.obolibrary.org/obo/IAO_0000030&gt; .
?infoResource bibo:pageStart ?startPage .
} UNION {
?subject ?property ?authorship .
?authorship a core:Authorship .
?authorship core:relates ?infoResource .
?infoResource a &lt;http://purl.obolibrary.org/obo/IAO_0000030&gt; .
?infoResource bibo:pageEnd ?endPage .
} UNION {
?subject ?property ?authorship .
?authorship a core:Authorship .
?authorship core:relates ?infoResource .
?infoResource a &lt;http://purl.obolibrary.org/obo/IAO_0000030&gt; .
?infoResource core:placeOfPublication ?locale .
} UNION {
?subject ?property ?authorship .
?authorship a core:Authorship .
?authorship core:relates ?infoResource .
?infoResource a &lt;http://purl.obolibrary.org/obo/IAO_0000030&gt; .
?infoResource bibo:reproducedIn ?appearsInObj .
?appearsInObj rdfs:label ?appearsIn
} UNION {
?subject ?property ?authorship .
?authorship a core:Authorship .
?authorship core:relates ?infoResource .
?infoResource a &lt;http://purl.obolibrary.org/obo/IAO_0000030&gt; .
?infoResource core:publisher ?publisherObj .
?publisherObj rdfs:label ?publisher
} UNION {
?subject ?property ?authorship .
?authorship a core:Authorship .
?authorship core:relates ?infoResource .
?infoResource a &lt;http://purl.obolibrary.org/obo/IAO_0000030&gt; .
?infoResource core:relatedBy ?editorship .
?editorship a core:Editorship .
?editorship core:relates ?editorObj .
?editorObj a foaf:Person .
?editorObj rdfs:label ?editor
} UNION {
?subject ?property ?authorship . ?subject ?property ?authorship .
?authorship a core:Authorship . ?authorship a core:Authorship .
?authorship core:relates ?infoResource . ?authorship core:relates ?infoResource .
?infoResource a &lt;http://purl.obolibrary.org/obo/IAO_0000030&gt; . ?infoResource a &lt;http://purl.obolibrary.org/obo/IAO_0000030&gt; .
?infoResource &lt;http://purl.obolibrary.org/obo/BFO_0000050&gt; ?partOfObj . ?infoResource &lt;http://purl.obolibrary.org/obo/BFO_0000050&gt; ?partOfObj .
?partOfObj rdfs:label ?partOf ?partOfObj rdfs:label ?partOf .
} }
} UNION
</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;
PREFIX bibo: &lt;http://purl.org/ontology/bibo/&gt;
CONSTRUCT {
?subject ?property ?authorship . ?subject ?property ?authorship .
?authorship a core:Authorship . ?authorship a core:Authorship .
?authorship core:relates ?infoResource . ?authorship core:relates ?infoResource .
?infoResource a &lt;http://purl.obolibrary.org/obo/IAO_0000030&gt; . ?infoResource a bibo:Book .
?infoResource core:dateTimeValue ?dateTimeValue . ?infoResource core:relatedBy ?editorship .
?dateTimeValue core:dateTime ?dateTime ?editorship a core:Editorship .
} WHERE { ?editorship core:relates ?editorObj .
?editorObj a foaf:Person .
?editorObj rdfs:label ?editor .
}
UNION
{
?subject ?property ?authorship . ?subject ?property ?authorship .
?authorship a core:Authorship . ?authorship a core:Authorship .
?authorship core:relates ?infoResource . ?authorship core:relates ?infoResource .
?infoResource a &lt;http://purl.obolibrary.org/obo/IAO_0000030&gt; . ?infoResource a bibo:BookSection .
?infoResource core:dateTimeValue ?dateTimeValue . ?infoResource core:relatedBy ?editorship .
?dateTimeValue core:dateTime ?dateTime ?editorship a core:Editorship .
?editorship core:relates ?editorObj .
?editorObj a foaf:Person .
?editorObj rdfs:label ?editor .
}
} }
</query-construct> </query-construct>

View file

@ -114,7 +114,15 @@
?infoResource core:placeOfPublication ?locale . ?infoResource core:placeOfPublication ?locale .
} UNION { } UNION {
?subject ?property ?infoResource . ?subject ?property ?infoResource .
?infoResource a &lt;http://purl.obolibrary.org/obo/IAO_0000030&gt; . ?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 . ?infoResource core:relatedBy ?editorship .
?editorship a core:Editorship . ?editorship a core:Editorship .
?editorship core:relates ?editorObj . ?editorship core:relates ?editorObj .

View file

@ -147,7 +147,15 @@
?appearsInObj rdfs:label ?appearsIn ?appearsInObj rdfs:label ?appearsIn
} UNION { } UNION {
?subject ?property ?infoResource . ?subject ?property ?infoResource .
?infoResource a &lt;http://purl.obolibrary.org/obo/IAO_0000030&gt; . ?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 . ?infoResource core:relatedBy ?editorship .
?editorship a core:Editorship . ?editorship a core:Editorship .
?editorship core:relates ?editorObj . ?editorship core:relates ?editorObj .