# 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 }
}
