OP-3867: fix to mandataris mapping query + backfil migration for stuck mandatarissen

This commit is contained in:
Damon
2026-08-19 16:10:56 +02:00
parent 2fde7737ac
commit f46cd2012e
2 changed files with 42 additions and 2 deletions

View File

@@ -8,10 +8,10 @@ CONSTRUCT {
?p ?o.
?orgaanInTime <http://www.w3.org/ns/org#hasPost> ?mandate ;
<http://data.vlaanderen.be/ns/mandaat#isTijdspecialisatieVan> ?orgaan .
<https://data.vlaanderen.be/ns/generiek#isTijdspecialisatieVan> ?orgaan .
?orgaan <http://data.vlaanderen.be/ns/besluit#bestuurt> ?bestuur .
?bestuur <http://data.vlaanderen.be/ns/besluit#classificatie> ?classification .
?bestuur <http://www.w3.org/ns/org#classification> ?classification .
FILTER(?classification IN (

View File

@@ -0,0 +1,40 @@
PREFIX mandaat: <http://data.vlaanderen.be/ns/mandaat#>
PREFIX generiek: <https://data.vlaanderen.be/ns/generiek#>
PREFIX org: <http://www.w3.org/ns/org#>
PREFIX besluit: <http://data.vlaanderen.be/ns/besluit#>
INSERT {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?s ?p ?o.
}
}
WHERE {
GRAPH <http://mu.semte.ch/graphs/landing-zone/mandatarissen> {
?s a mandaat:Mandataris;
org:holds ?mandate;
?p ?o.
}
?orgaanInTime org:hasPost ?mandate ;
generiek:isTijdspecialisatieVan ?orgaan .
?orgaan besluit:bestuurt ?bestuur .
?bestuur org:classification ?classification .
FILTER(?classification IN (
<http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/5ab0e9b8a3b2ca7c5e000000>,
<http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/5ab0e9b8a3b2ca7c5e000001>,
<http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/5ab0e9b8a3b2ca7c5e000002>,
<http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/5ab0e9b8a3b2ca7c5e000003>
))
FILTER (?p NOT IN (mandaat:start, mandaat:einde))
FILTER NOT EXISTS {
?s ?p "" .
}
FILTER NOT EXISTS {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> { ?s org:holds ?mandate }
}
}