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) +}