migrants/constructs_step06/006-relationships.rq
Daniel Hernandez 58a725a3d7 Add Step 6 SPARQL CONSTRUCT queries for tm: namespace mapping
11 CONSTRUCT queries transform graph-05 data from migrants: namespace
to the Theatre Migrants ontology (tm:) vocabulary: persons, places,
organisations, migrations, memberships (org:Membership), relationships,
person-professions, person-names, religion affiliations, occupations
(schema:Occupation), and enumeration instances (skos:Concept).
2026-03-01 12:07:18 +01:00

41 lines
1.5 KiB
SPARQL

# Construct relationship triples with tm: vocabulary.
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX tm: <https://daniel.degu.cl/ontologies/theatre-migrants/>
PREFIX migrants: <http://example.org/migrants/>
PREFIX relp: <http://example.org/migrants/relationship#>
CONSTRUCT {
?s a tm:Relationship .
?s tm:activePerson ?active .
?s tm:passivePerson ?passive .
?s tm:relationshipLocation ?location .
?s tm:relationshipOrganisation ?organisation .
?s tm:relationshipType ?relType .
?s tm:relationshipTypePrecise ?relTypePrecise .
?s rdfs:comment ?comment .
?s tm:timePeriod ?timePeriod .
?s tm:dateStartMin ?dsMin .
?s tm:dateStartMax ?dsMax .
?s tm:dateEndMin ?deMin .
?s tm:dateEndMax ?deMax .
?s tm:dateStartFuzzy ?dsFuzzy .
?s tm:dateEndFuzzy ?deFuzzy .
}
WHERE {
?s a migrants:relationship .
OPTIONAL { ?s relp:ref-IDPerson_active ?active }
OPTIONAL { ?s relp:ref-IDPerson_passive ?passive }
OPTIONAL { ?s relp:ref-IDLocation ?location }
OPTIONAL { ?s relp:ref-IDOrganisation ?organisation }
OPTIONAL { ?s relp:Relationshiptype ?relType }
OPTIONAL { ?s relp:relationshiptype_precise ?relTypePrecise }
OPTIONAL { ?s relp:comment ?comment }
OPTIONAL { ?s relp:Timeperiod ?timePeriod }
OPTIONAL { ?s relp:DateStart_Min ?dsMin }
OPTIONAL { ?s relp:DateStart_Max ?dsMax }
OPTIONAL { ?s relp:DateEnd_Min ?deMin }
OPTIONAL { ?s relp:DateEnd_Max ?deMax }
OPTIONAL { ?s relp:DateStart_Fuzzy ?dsFuzzy }
OPTIONAL { ?s relp:DateEnd_Fuzzy ?deFuzzy }
}