migrants/updates_step05/003-location-properties.rq
Daniel Hernandez 3d0829aa9d Add Step 5: use well-known vocabularies (Schema.org, OWL, WGS84, SKOS)
SPARQL UPDATE queries add standard vocabulary properties alongside
existing custom predicates: schema:Person/Place/Organization types,
schema:givenName/familyName/birthDate, owl:sameAs for authority links,
wgs84:lat/long for coordinates, skos:Concept/prefLabel for enumerations,
and rdfs:label for persons.
2026-03-01 12:07:01 +01:00

25 lines
903 B
SPARQL

PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX schema: <https://schema.org/>
PREFIX wgs84: <http://www.w3.org/2003/01/geo/wgs84_pos#>
DELETE { ?s <http://example.org/migrants/location#latitude> ?v . }
INSERT { ?s wgs84:lat ?v . }
WHERE { ?s <http://example.org/migrants/location#latitude> ?v . }
;
DELETE { ?s <http://example.org/migrants/location#longitude> ?v . }
INSERT { ?s wgs84:long ?v . }
WHERE { ?s <http://example.org/migrants/location#longitude> ?v . }
;
DELETE { ?s <http://example.org/migrants/location#wikipedia> ?v . }
INSERT { ?s schema:sameAs ?v . }
WHERE {
?s <http://example.org/migrants/location#wikipedia> ?v .
FILTER(isIRI(?v))
}
;
DELETE { ?s <http://example.org/migrants/location#wikidata> ?q . }
INSERT { ?s owl:sameAs ?wd . }
WHERE {
?s <http://example.org/migrants/location#wikidata> ?q .
BIND(IRI(CONCAT("http://www.wikidata.org/entity/", STR(?q))) AS ?wd)
}