Files
app-organization-portal/config/migrations/2025/20250416181230-fix--refnis-2025/20250417080910-fix--update-narrowed-or-broadened-werkingsgebieden.sparql
mirdono 225e31d845 fix: update werkingsgebieden to match NIS 2025 codes
As part of the 2025 municipality mergers some NIS2019 codes were linked to their
NIS2025 counterparts using `skos:narrowMatch` or `skos:broadMatch`, instead of
`skos:exactMatch`. Consequently, the initial insertion of the NIS2025 codes did
not update the NIS code for the werkingsgebieden linking to these.
2025-04-17 11:35:31 +02:00

19 lines
722 B
SPARQL

DELETE {
GRAPH <http://mu.semte.ch/graphs/shared> {
?werkingsgebied skos:exactMatch ?nis2019 .
}
} INSERT {
GRAPH <http://mu.semte.ch/graphs/shared> {
?werkingsgebied skos:exactMatch ?nis2025 .
}
} WHERE {
GRAPH <http://mu.semte.ch/graphs/shared> {
?werkingsgebied skos:exactMatch ?nis2019 .
}
VALUES (?nis2019 ?nis2025) {
(<http://vocab.belgif.be/auth/refnis2019/10000> <http://vocab.belgif.be/auth/refnis2025/10000>) # Antwerp province
(<http://vocab.belgif.be/auth/refnis2019/40000> <http://vocab.belgif.be/auth/refnis2025/40000>) # East Flanders province
(<http://vocab.belgif.be/auth/refnis2019/11002> <http://vocab.belgif.be/auth/refnis2025/11002>) # Antwerp municipality
}
}