miscellaneous cleanup but includes a fix for VIVO-404

This commit is contained in:
tworrall 2013-10-24 13:16:26 -04:00
parent 15880ea3b7
commit ae80d6c63d
9 changed files with 175 additions and 130 deletions

View file

@ -12,67 +12,73 @@
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX obo: <http://purl.obolibrary.org/obo/>
PREFIX vcard: <http://www.w3.org/2006/vcard/ns#>
SELECT DISTINCT
?person
?personName
?posnLabel
?org
?orgLabel
?type
?personType
?title
WHERE {
?subject ?property ?person .
?person core:personInPosition ?position .
OPTIONAL { ?person rdfs:label ?personName }
OPTIONAL { ?person core:preferredTitle ?title }
OPTIONAL { ?person vitro:mostSpecificType ?personType .
?personType rdfs:subClassOf foaf:Person
OPTIONAL { ?person core:relatedBy ?position .
?position a core:Position
OPTIONAL { ?position rdfs:label ?posnLabel }
}
OPTIONAL { ?position rdfs:label ?posnLabel }
OPTIONAL { ?position core:positionInOrganization ?org .
OPTIONAL { ?person rdfs:label ?personName }
OPTIONAL { ?person obo:ARG_2000028 ?vcard .
?vcard vcard:hasTitle ?titleObj .
?titleObj vcard:title ?title
}
OPTIONAL { ?position core:relates ?org .
?org a foaf:Organization .
?org rdfs:label ?orgLabel
}
OPTIONAL { ?position core:hrJobTitle ?hrJobTitle }
OPTIONAL { ?position core:rank ?rank }
}
ORDER BY ?personName ?type
ORDER BY ?personName
</query-select>
<query-construct>
PREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt;
PREFIX core: &lt;http://vivoweb.org/ontology/core#&gt;
PREFIX foaf: &lt;http://xmlns.com/foaf/0.1/&gt;
CONSTRUCT {
?subject ?property ?person .
?person core:personInPosition ?position .
?position rdfs:label ?positionLabel .
?position core:positionInOrganization ?org .
?person core:relatedBy ?position .
?position a core:Position .
?position rdfs:label ?posnLabel .
?position core:relates ?org .
?org a foaf:Organization .
?org rdfs:label ?orgName .
?position core:hrJobTitle ?hrJobTitle
} WHERE {
{
?subject ?property ?person
} UNION {
?subject ?property ?person .
?person core:personInPosition ?position
?person core:relatedBy ?position .
?position a core:Position .
} UNION {
?subject ?property ?person .
?person core:personInPosition ?position .
?position rdfs:label ?positionLabel
?person core:relatedBy ?position .
?position a core:Position .
?position rdfs:label ?posnLabel
} UNION {
?subject ?property ?person .
?person core:personInPosition ?position .
?position core:positionInOrganization ?org
?person core:relatedBy ?position .
?position a core:Position .
?position core:relates ?org .
?org a foaf:Organization .
} UNION {
?subject ?property ?person .
?person core:personInPosition ?position .
?position core:positionInOrganization ?org .
?person core:relatedBy ?position .
?position a core:Position .
?position core:relates ?org .
?org a foaf:Organization .
?org rdfs:label ?orgName
} UNION {
?subject ?property ?person .
?person core:personInPosition ?position .
?position core:hrJobTitle ?hrJobTitle
}
}
</query-construct>
@ -82,26 +88,26 @@
PREFIX core: &lt;http://vivoweb.org/ontology/core#&gt;
PREFIX foaf: &lt;http://xmlns.com/foaf/0.1/&gt;
PREFIX vitro: &lt;http://vitro.mannlib.cornell.edu/ns/vitro/0.7#&gt;
PREFIX obo: &lt;http://purl.obolibrary.org/obo/&gt;
PREFIX vcard: &lt;http://www.w3.org/2006/vcard/ns#&gt;
CONSTRUCT {
?subject ?property ?person .
?person rdfs:label ?label .
?person core:preferredTitle ?title .
?person vitro:mostSpecificType ?personType .
?personType rdfs:subClassOf foaf:Person
?person rdfs:label ?personName .
?person obo:ARG_2000028 ?vcard .
?vcard vcard:hasTitle ?titleObj .
?titleObj vcard:title ?title
} WHERE {
{
?subject ?property ?person
} UNION {
?subject ?property ?person .
?person rdfs:label ?label
} UNION {
?person rdfs:label ?personName
} UNION {
?subject ?property ?person .
?person core:preferredTitle ?title
} UNION {
?subject ?property ?person .
?person vitro:mostSpecificType ?personType .
?personType rdfs:subClassOf foaf:Person
?person obo:ARG_2000028 ?vcard .
?vcard vcard:hasTitle ?titleObj .
?titleObj vcard:title ?title
}
}
</query-construct>