PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX core: <http://vivoweb.org/ontology/core#>
PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#>
SELECT DISTINCT ?subclass ?position (afn:localname(?position) AS ?positionName)
?positionTitle ?person ?personName ?dateTimeInterval ?dateTimeStart ?dateTimeEnd WHERE {
GRAPH ?g1 { ?subject ?property ?position }
OPTIONAL { GRAPH ?g2 { ?position core:positionForPerson ?person }
GRAPH ?g3 { ?person rdfs:label ?personName }
}
OPTIONAL { GRAPH ?g4 { ?position a ?subclass }
GRAPH ?g5 { ?subclass rdfs:subClassOf core:Position }
FILTER (?g5 != <http://vitro.mannlib.cornell.edu/default/inferred-tbox> &&
?g5 != <http://vitro.mannlib.cornell.edu/default/vitro-kb-inf> )
}
OPTIONAL { GRAPH ?g6 { ?position rdfs:label ?positionTitle } }
OPTIONAL { GRAPH ?g7 { ?position core:dateTimeInterval ?dateTimeInterval }
OPTIONAL { GRAPH ?g8 { ?dateTimeInterval core:start ?dateTimeStartValue .
?dateTimeStartValue core:dateTime ?dateTimeStart }
}
OPTIONAL { GRAPH ?g9 { ?dateTimeInterval core:end ?dateTimeEndValue .
?dateTimeEndValue core:dateTime ?dateTimeEnd }
}
}
} ORDER BY ?subclass ?personName
propStatement-organizationForPosition.ftl