From cdfe850b472946beaa9df335abfa96a6ef7bcf97 Mon Sep 17 00:00:00 2001 From: Claire Lovisa Date: Mon, 31 Jul 2023 16:14:01 +0200 Subject: [PATCH] Link admin units with OVO uris (#312) --- ...00-add-link-between-uri-and-ovo-uri.sparql | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 config/migrations/2023/20230728170200-add-link-between-uri-and-ovo-uri.sparql diff --git a/config/migrations/2023/20230728170200-add-link-between-uri-and-ovo-uri.sparql b/config/migrations/2023/20230728170200-add-link-between-uri-and-ovo-uri.sparql new file mode 100644 index 0000000..9dbc742 --- /dev/null +++ b/config/migrations/2023/20230728170200-add-link-between-uri-and-ovo-uri.sparql @@ -0,0 +1,25 @@ +PREFIX owl: + +INSERT { + GRAPH ?g { + ?s owl:sameAs ?ovoUriToInsert . + } +} WHERE { + VALUES ?g { + + + } + GRAPH ?g { + ?s ?id . + + ?id "OVO-nummer" ; + / ?ovo . + } + + ?s /skos:prefLabel ?classif . + + FILTER(strlen(str(?ovo)) > 0) + FILTER NOT EXISTS { ?s owl:sameAs ?ovoUri . } + + BIND(URI(CONCAT("http://data.vlaanderen.be/id/organisatie/", ?ovo)) as ?ovoUriToInsert) +}