Compare commits

...

5 Commits

Author SHA1 Message Date
Alexander van den Berghe
4e0ec40f51 Merge pull request #393 from lblod/fix/remove-local-involvement
Fix: remove superfluous local involvement
2024-03-22 13:56:05 +00:00
Alexander van den Berghe
d493c7601a Merge pull request #396 from lblod/chore/add-merge-change-event-pz-aalter-maldegem
Feature: add merge change event pz aalter maldegem
2024-03-22 13:55:37 +00:00
mirdono
04a749020e feat: change merged PZ's status to not active 2024-03-15 17:31:57 +01:00
mirdono
0d1b610dcf feat: import fusion change event for PZ Aalter and PZ Maldegem 2024-03-15 12:08:46 +01:00
mirdono
5b38e70b61 fix: remove superfluous local involvement 2024-03-13 15:24:45 +01:00
2 changed files with 91 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
PREFIX org: <http://www.w3.org/ns/org#>
PREFIX core: <http://mu.semte.ch/vocabularies/core/>
DELETE {
GRAPH <http://mu.semte.ch/graphs/worship-service> {
?localInvolvement ?p1 ?o .
?s ?p2 ?localInvolvement .
}
} WHERE {
GRAPH <http://mu.semte.ch/graphs/worship-service> {
?service core:uuid "d36c339e23c9d4382b882d00e2ad9235" .
?localInvolvement org:organization ?service ;
core:uuid "b76a291065c633ada0391f5e99661210" .
?localInvolvement ?p1 ?o .
?s ?p2 ?localInvolvement .
}
}

View File

@@ -0,0 +1,73 @@
PREFIX org: <http://www.w3.org/ns/org#>
PREFIX dct: <http://purl.org/dc/terms/>
PREFIX ch: <http://data.lblod.info/vocabularies/contacthub/>
PREFIX lblodOrg: <http://lblod.data.gift/vocabularies/organisatie/>
PREFIX ext: <http://mu.semte.ch/vocabularies/ext/>
PREFIX mu: <http://mu.semte.ch/vocabularies/core/>
PREFIX regorg: <http://www.w3.org/ns/regorg#>
# Add fusion change event
INSERT {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?changeEvent a org:ChangeEvent ;
mu:uuid ?uuidChangeEvent ;
ch:typeWijziging <http://lblod.data.gift/concepts/fa80032794c841ecac73ff874f856db1> ; # Fusie
org:resultingOrganization ?resultingOrganisation ;
dct:date "2024-01-01"^^xsd:date ;
dct:description "Fusie tussen PZ Aalter en PZ Maldegem resulteert in PZ Aalter/Maldegem" ;
org:originalOrganization ?originalAalter ;
org:originalOrganization ?originalMaldegem ;
lblodOrg:veranderingsgebeurtenisResultaat ?changeEventFirstNotActiveResult ;
lblodOrg:veranderingsgebeurtenisResultaat ?changeEventSecondNotActiveResult ;
lblodOrg:veranderingsgebeurtenisResultaat ?changeEventActiveResult .
?changeEventFirstNotActiveResult a lblodOrg:VeranderingsgebeurtenisResultaat ;
mu:uuid ?uuidChangeEventFirstNotActiveResult ;
lblodOrg:resulterendeStatus <http://lblod.data.gift/concepts/d02c4e12bf88d2fdf5123b07f29c9311> ; # not active
ext:resultingOrganization ?originalAalter .
?changeEventSecondNotActiveResult a lblodOrg:VeranderingsgebeurtenisResultaat ;
mu:uuid ?uuidChangeEventSecondNotActiveResult ;
lblodOrg:resulterendeStatus <http://lblod.data.gift/concepts/d02c4e12bf88d2fdf5123b07f29c9311> ; # not active
ext:resultingOrganization ?originalMaldegem .
?changeEventActiveResult a lblodOrg:VeranderingsgebeurtenisResultaat ;
mu:uuid ?uuidChangeEventActiveResult ;
lblodOrg:resulterendeStatus <http://lblod.data.gift/concepts/63cc561de9188d64ba5840a42ae8f0d6> ; # active
ext:resultingOrganization ?resultingOrganisation .
}
} WHERE {
VALUES (?originalAalter ?originalMaldegem ?resultingOrganisation) {
(<http://data.lblod.info/id/bestuurseenheden/e06ce64825e386178b350aa6b2fa869c70ad39aa99ddb3ca2a73d6b103e91161>
<http://data.lblod.info/id/bestuurseenheden/3b7a6d691943806c23f59d22482dea27e451bd440f91f884aeb42e8c72016ee3>
<http://data.lblod.info/id/bestuurseenheden/65EB0324E77A4F2289F6B63D>)
}
BIND(SHA256(CONCAT(STR(?originalAalter), STR(?originalMaldegem), STR(?resultingOrganization))) AS ?uuidChangeEvent) .
BIND(IRI(CONCAT("http://data.lblod.info/id/veranderingsgebeurtenissen/", STR(?uuidChangeEvent))) AS ?changeEvent) .
BIND(SHA256(CONCAT(STR(?originalAalter), "fusieChangeEventFirstNotActiveResult")) AS ?uuidChangeEventFirstNotActiveResult) .
BIND(IRI(CONCAT("http://lblod.data.info/id/veranderingsgebeurtenis-resultaten/", STR(?uuidChangeEventFirstNotActiveResult))) AS ?changeEventFirstNotActiveResult) .
BIND(SHA256(CONCAT(STR(?originalMaldegem), "fusieChangeEventSecondNotActiveResult")) AS ?uuidChangeEventSecondNotActiveResult) .
BIND(IRI(CONCAT("http://lblod.data.info/id/veranderingsgebeurtenis-resultaten/", STR(?uuidChangeEventSecondNotActiveResult))) AS ?changeEventSecondNotActiveResult) .
BIND(SHA256(CONCAT(STR(?originalAalter), STR(?originalMaldegem), STR(?resultingOrganization), "fusieChangeEventActiveResult")) AS ?uuidChangeEventActiveResult) .
BIND(IRI(CONCAT("http://lblod.data.info/id/veranderingsgebeurtenis-resultaten/", STR(?uuidChangeEventActiveResult))) AS ?changeEventActiveResult) .
}
;
# Set merged PZs to not active
DELETE {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?s regorg:orgStatus <http://lblod.data.gift/concepts/63cc561de9188d64ba5840a42ae8f0d6> # Active
}
} INSERT {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?s regorg:orgStatus <http://lblod.data.gift/concepts/d02c4e12bf88d2fdf5123b07f29c9311> # Not active
}
} WHERE {
VALUES ?s {
<http://data.lblod.info/id/bestuurseenheden/e06ce64825e386178b350aa6b2fa869c70ad39aa99ddb3ca2a73d6b103e91161> # PZ Aalter
<http://data.lblod.info/id/bestuurseenheden/3b7a6d691943806c23f59d22482dea27e451bd440f91f884aeb42e8c72016ee3> #PZ Maldegem
}
}