fix: exclude KBO organisations as participants

The initial version of these migrations were defined too broadly. Since they
only matched on KBO numbers they also included the KBO organisations, imported
from wegwijs, adding them as participants.

This commit adds extra checks to exclude KBO organisations from being added as a
participant for a public OCMW association. Furthermore, the main migration is
split into two parts to work around an error otherwise encountered when
executing the migration as a single whole.
This commit is contained in:
mirdono
2024-05-22 12:54:23 +02:00
committed by Alexander van den Berghe
parent bf77794d08
commit 660c9b6848
4 changed files with 3226 additions and 2845 deletions

View File

@@ -0,0 +1,16 @@
PREFIX org: <http://www.w3.org/ns/org#>
DELETE {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?participant org:memberOf ?association .
}
} WHERE {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?participant org:memberOf ?association .
?association org:classification ?class
}
VALUES ?class {
<http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/e8294b73-87c9-4fa2-9441-1937350763c9> # Welzijnsvereniging
<http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/34b5af85-dc9f-468f-9e03-ef89b174c267> # Autonome verzorgingsinstelling
}
}

View File

@@ -3,6 +3,7 @@ PREFIX generiek: <https://data.vlaanderen.be/ns/generiek#>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX adms: <http://www.w3.org/ns/adms#>
PREFIX mu: <http://mu.semte.ch/vocabularies/core/>
PREFIX ext: <http://mu.semte.ch/vocabularies/ext/>
INSERT {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
@@ -11,6 +12,7 @@ INSERT {
} WHERE {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?participant adms:identifier ?idParticipant .
FILTER NOT EXISTS { ?participant a ext:KboOrganisatie . }
?idParticipant skos:notation ?kboLabel ;
generiek:gestructureerdeIdentificator/generiek:lokaleIdentificator ?kboNumber .