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.
25 lines
903 B
SPARQL
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)
|
|
}
|