[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

@ -12,250 +12,246 @@
PREFIX foaf: <http://xmlns.com/foaf/0.1/> PREFIX foaf: <http://xmlns.com/foaf/0.1/>
SELECT DISTINCT ?subclass SELECT DISTINCT ?subclass
?authorship ?authorship
?infoResource ?infoResourceName ?infoResource ?infoResourceName
?dateTime ?dateTime
?journal ?journal
?volume ?volume
?startPage ?startPage
?endPage ?endPage
?publisher ?publisher
?locale ?locale
?appearsIn ?appearsIn
?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> .
?infoResource rdfs:label ?infoResourceName . ?infoResource rdfs:label ?infoResourceName .
OPTIONAL { ?infoResource bibo:volume ?volume } OPTIONAL { ?infoResource bibo:volume ?volume }
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 {
?appearsInObj rdfs:label ?appearsIn ?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 }
<critical-data-required> 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 &lt;http://purl.obolibrary.org/obo/BFO_0000050&gt; ?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 }
<critical-data-required>
FILTER ( bound(?infoResource) ) FILTER ( bound(?infoResource) )
</critical-data-required> </critical-data-required>
} 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>
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 .
?authorship a core:Authorship .
?authorship core:hideFromDisplay ?hideThis .
?authorship core:relates ?infoResource .
?infoResource a &lt;http://purl.obolibrary.org/obo/IAO_0000030&gt; .
?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 &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 rdfs:label ?infoResourceName
} 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:hasPublicationVenue ?publishedIn
} 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:hasPublicationVenue ?publishedIn .
?publishedIn rdfs:label ?journal
}
}
</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;
PREFIX foaf: &lt;http://xmlns.com/foaf/0.1/&gt; PREFIX foaf: &lt;http://xmlns.com/foaf/0.1/&gt;
CONSTRUCT { 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:relates ?infoResource .
?authorship core:hideFromDisplay ?hideThis . ?authorship core:hideFromDisplay ?hideThis .
?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 bibo:volume ?volume . ?infoResource vitro:mostSpecificType ?subclass .
?infoResource bibo:pageStart ?startPage . ?infoResource rdfs:label ?infoResourceName .
?infoResource bibo:pageEnd ?endPage . ?infoResource bibo:volume ?volume .
?infoResource core:placeOfPublication ?locale . ?infoResource bibo:pageStart ?startPage .
?infoResource bibo:pageEnd ?endPage .
?infoResource core:placeOfPublication ?locale .
?infoResource bibo:reproducedIn ?appearsInObj . ?infoResource bibo:reproducedIn ?appearsInObj .
?appearsInObj rdfs:label ?appearsIn .
?infoResource core:publisher ?publisherObj . ?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 &lt;http://purl.obolibrary.org/obo/BFO_0000050&gt; ?partOfObj .
?partOfObj rdfs:label ?partOf .
?infoResource core:relatedBy ?editorship . ?infoResource core:relatedBy ?editorship .
?editorship a core:Editorship . ?editorship a core:Editorship .
?editorship core:relates ?editorObj . ?editorship core:relates ?editorObj .
?editorObj a foaf:Person . ?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 . ?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 .
?authorship a core:Authorship .
?authorship core:relates ?infoResource .
?infoResource a &lt;http://purl.obolibrary.org/obo/IAO_0000030&gt; .
?infoResource &lt;http://purl.obolibrary.org/obo/BFO_0000050&gt; ?partOfObj .
?partOfObj rdfs:label ?partOf
}
} }
</query-construct> WHERE
{
<query-construct> {
PREFIX core: &lt;http://vivoweb.org/ontology/core#&gt; ?subject ?property ?authorship .
PREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt; ?authorship a core:Authorship
PREFIX bibo: &lt;http://purl.org/ontology/bibo/&gt; }
CONSTRUCT { UNION
?subject ?property ?authorship . {
?authorship a core:Authorship . ?subject ?property ?authorship .
?authorship core:relates ?infoResource . ?authorship a core:Authorship .
?infoResource a &lt;http://purl.obolibrary.org/obo/IAO_0000030&gt; . ?authorship core:hideFromDisplay ?hideThis .
?infoResource core:dateTimeValue ?dateTimeValue . }
?dateTimeValue core:dateTime ?dateTime UNION
} WHERE { {
?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:dateTimeValue ?dateTimeValue . }
?dateTimeValue core:dateTime ?dateTime 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 .
?authorship a core:Authorship .
?authorship core:relates ?infoResource .
?infoResource a &lt;http://purl.obolibrary.org/obo/IAO_0000030&gt; .
?infoResource rdfs:label ?infoResourceName
}
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:dateTimeValue ?dateTimeValue .
?dateTimeValue core:dateTime ?dateTime .
}
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:hasPublicationVenue ?publishedIn .
?publishedIn rdfs:label ?journal .
}
UNION
{
?subject ?property ?authorship .
?authorship a core:Authorship .
?authorship core:relates ?infoResource .
?infoResource a &lt;http://purl.obolibrary.org/obo/IAO_0000030&gt; .
?infoResource &lt;http://purl.obolibrary.org/obo/BFO_0000050&gt; ?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 .
}
} }
</query-construct> </query-construct>

View file

@ -114,12 +114,20 @@
?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 . ?infoResource core:relatedBy ?editorship .
?editorship a core:Editorship . ?editorship a core:Editorship .
?editorship core:relates ?editorObj . ?editorship core:relates ?editorObj .
?editorObj a foaf:Person . ?editorObj a foaf:Person .
?editorObj rdfs:label ?editor ?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
} }
} }
</query-construct> </query-construct>

View file

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