SPARQL CONSTRUCT queries transform graph-05 into graph-06 using the tm: vocabulary. Persons keep schema:Person properties, works become org:Membership, professions become schema:Occupation, enumerations become skos:Concept with tm: subtypes. Split 010-occupations into two query files (passthrough + retype). Includes step-06 binary, Rakefile tasks, and example data for Irene Abendroth.
19 lines
551 B
SPARQL
19 lines
551 B
SPARQL
# Construct occupation instances: retype migrants:Profession 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 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 }
|
|
}
|