Files
app-organization-portal/config/migrations/2025/20250430130307-chore--cleanup-werkingsgebieden-data/20250521102551-fix--move-location-triples-from-shared-to-public.sparql
mirdono 366aad9fe5 fix: move lingering location triples from shared to public graph
The `shared` graph still contains some location triples introduced as part of
the municipality mergers. They were overlooked by the original cleanup
migrations because the `prov:Location` and `ext:werkingsgebiedNiveau` triples
were located in the `administrative-unit` graph, causing the `WHERE` clause to
not match these triples.
2025-05-21 12:36:08 +02:00

25 lines
508 B
SPARQL

PREFIX geo: <http://www.opengis.net/ont/geosparql#>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX prov: <http://www.w3.org/ns/prov#>
DELETE {
GRAPH <http://mu.semte.ch/graphs/shared> {
?s ?p ?o .
}
} INSERT {
GRAPH <http://mu.semte.ch/graphs/public> {
?s ?p ?o .
}
} WHERE {
GRAPH <http://mu.semte.ch/graphs/shared> {
?s ?p ?o .
VALUES ?p {
geo:sfWithin
skos:exactMatch
}
}
GRAPH <http://mu.semte.ch/graphs/public> {
?s a prov:Location .
}
}