migrants/queries/step_04_1hop_example.rq

26 lines
736 B
SPARQL

PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX migrants: <http://example.org/migrants/>
PREFIX person: <http://example.org/migrants/person/>
PREFIX personp: <http://example.org/migrants/person#>
PREFIX work: <http://example.org/migrants/work/>
PREFIX workp: <http://example.org/migrants/work#>
PREFIX location: <http://example.org/migrants/location/>
PREFIX locationp: <http://example.org/migrants/location#>
CONSTRUCT {
?s ?p ?o .
}
WHERE {
{
# Triples about Irene Abendroth (as subject)
?s ?p ?o .
FILTER(?s = person:AbeIre-00)
}
UNION
{
# Triples from other tables referencing Irene Abendroth
?s ?p ?o .
?s ?ref person:AbeIre-00 .
}
}