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.
35 lines
1.5 KiB
SPARQL
35 lines
1.5 KiB
SPARQL
PREFIX owl: <http://www.w3.org/2002/07/owl#>
|
|
PREFIX schema: <https://schema.org/>
|
|
PREFIX wdtn: <http://www.wikidata.org/prop/direct-normalized/>
|
|
|
|
DELETE { ?s <http://example.org/migrants/person#Wikidata> ?v . }
|
|
INSERT { ?s owl:sameAs ?v . }
|
|
WHERE { ?s <http://example.org/migrants/person#Wikidata> ?v . FILTER(isIRI(?v)) }
|
|
;
|
|
DELETE { ?s <http://example.org/migrants/person#Wikipedia> ?v . }
|
|
INSERT { ?s schema:sameAs ?v . }
|
|
WHERE { ?s <http://example.org/migrants/person#Wikipedia> ?v . FILTER(isIRI(?v)) }
|
|
;
|
|
DELETE { ?s <http://example.org/migrants/person#GND> ?v . }
|
|
INSERT { ?s wdtn:P227 ?v . }
|
|
WHERE { ?s <http://example.org/migrants/person#GND> ?v . FILTER(isIRI(?v)) }
|
|
;
|
|
DELETE { ?s <http://example.org/migrants/person#VIAF> ?v . }
|
|
INSERT { ?s wdtn:P214 ?v . }
|
|
WHERE { ?s <http://example.org/migrants/person#VIAF> ?v . FILTER(isIRI(?v)) }
|
|
;
|
|
DELETE { ?s <http://example.org/migrants/person#CERL> ?v . }
|
|
INSERT { ?s wdtn:P1871 ?v . }
|
|
WHERE { ?s <http://example.org/migrants/person#CERL> ?v . FILTER(isIRI(?v)) }
|
|
;
|
|
DELETE { ?s <http://example.org/migrants/person#LCCN> ?v . }
|
|
INSERT { ?s wdtn:P244 ?v . }
|
|
WHERE { ?s <http://example.org/migrants/person#LCCN> ?v . FILTER(isIRI(?v)) }
|
|
;
|
|
DELETE { ?s <http://example.org/migrants/person#ISNI> ?v . }
|
|
INSERT { ?s wdtn:P213 ?v . }
|
|
WHERE { ?s <http://example.org/migrants/person#ISNI> ?v . FILTER(isIRI(?v)) }
|
|
;
|
|
DELETE { ?s <http://example.org/migrants/person#SNAC> ?v . }
|
|
INSERT { ?s wdtn:P3430 ?v . }
|
|
WHERE { ?s <http://example.org/migrants/person#SNAC> ?v . FILTER(isIRI(?v)) }
|