migrants/constructs_step06/011-enumerations.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

35 lines
1.3 KiB
SPARQL

# Construct enumeration instances with tm: types.
# Replaces migrants: enum types with tm: equivalents.
# Excludes migrants:Profession (handled in 010-occupations.rq)
# and migrants:Gender (already covered by schema:GenderType).
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX tm: <https://daniel.degu.cl/ontologies/theatre-migrants/>
PREFIX migrants: <http://example.org/migrants/>
CONSTRUCT {
?s a skos:Concept .
?s a ?tmType .
?s rdfs:label ?label .
?s skos:prefLabel ?prefLabel .
}
WHERE {
VALUES (?oldType ?tmType) {
( migrants:Continent tm:Continent )
( migrants:Country tm:Country )
( migrants:State tm:State )
( migrants:City tm:City )
( migrants:MigrationReason tm:MigrationReason )
( migrants:InstitutionType tm:InstitutionType )
( migrants:Nametype tm:NameType )
( migrants:RelationshipType tm:RelationshipType )
( migrants:RelationshipTypePrecise tm:RelationshipTypePrecise )
( migrants:Religion tm:Religion )
( migrants:EmploymentType tm:EmploymentType )
( migrants:ImportSource tm:ImportSource )
}
?s a ?oldType .
OPTIONAL { ?s rdfs:label ?label }
OPTIONAL { ?s skos:prefLabel ?prefLabel }
}