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).
30 lines
762 B
SPARQL
30 lines
762 B
SPARQL
# Construct occupation instances.
|
|
# Existing schema:Occupation instances pass through.
|
|
# migrants:Profession instances are retyped as schema:Occupation.
|
|
|
|
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
|
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
|
|
PREFIX schema: <https://schema.org/>
|
|
PREFIX migrants: <http://example.org/migrants/>
|
|
|
|
CONSTRUCT {
|
|
?s a schema:Occupation .
|
|
?s schema:name ?name .
|
|
}
|
|
WHERE {
|
|
?s a schema:Occupation .
|
|
OPTIONAL { ?s schema:name ?name }
|
|
}
|
|
;
|
|
CONSTRUCT {
|
|
?s a schema:Occupation .
|
|
?s a skos:Concept .
|
|
?s rdfs:label ?label .
|
|
?s skos:prefLabel ?prefLabel .
|
|
?s schema:name ?label .
|
|
}
|
|
WHERE {
|
|
?s a migrants:Profession .
|
|
OPTIONAL { ?s rdfs:label ?label }
|
|
OPTIONAL { ?s skos:prefLabel ?prefLabel }
|
|
}
|