From 9a71662b49c62e8c49a8a68ec4e74ce13693ca9f Mon Sep 17 00:00:00 2001 From: mirdono Date: Wed, 26 Feb 2025 12:55:54 +0100 Subject: [PATCH] feat: add timed governing bodies for new legislature for AGBs The governing bodies for an AGB have the same legislature as the corresponding municipality. This adds new time specialised governing bodies for the new (current) legislature for Raad van bestuur and Algemene vergadering. --- ...ed-governing-bodies-new-legislature.sparql | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 config/migrations/2025/20250225102801-agb-update-governing-bodies-new-legislature/20250225112043-insert-timed-governing-bodies-new-legislature.sparql diff --git a/config/migrations/2025/20250225102801-agb-update-governing-bodies-new-legislature/20250225112043-insert-timed-governing-bodies-new-legislature.sparql b/config/migrations/2025/20250225102801-agb-update-governing-bodies-new-legislature/20250225112043-insert-timed-governing-bodies-new-legislature.sparql new file mode 100644 index 0000000..f115434 --- /dev/null +++ b/config/migrations/2025/20250225102801-agb-update-governing-bodies-new-legislature/20250225112043-insert-timed-governing-bodies-new-legislature.sparql @@ -0,0 +1,32 @@ +PREFIX mandaat: +PREFIX besluit: +PREFIX org: +PREFIX generiek: +PREFIX mu: +PREFIX skos: + +INSERT { + GRAPH { + ?timedGoverningBody a besluit:Bestuursorgaan; + mu:uuid ?timedGoverningBodyUuid; + generiek:isTijdspecialisatieVan ?governingBody; + mandaat:bindingStart "2025-01-02"^^xsd:dateTime; + mandaat:bindingEinde "2030-12-31"^^xsd:dateTime. + } +} WHERE { + VALUES ?governingBodyClassification { + # Algemene vergadering + # Raad van bestuur + } + + GRAPH { + ?agb a besluit:Bestuurseenheid; + org:classification ; # AGB + mu:uuid ?organizationUuid. + ?governingBody besluit:bestuurt ?agb; + org:classification ?governingBodyClassification. + } + + BIND(SHA256(CONCAT(STR(?governingBodyClassification), " 2025 ", STR(?governingBody), STR(?organizationUuid))) AS ?timedGoverningBodyUuid) + BIND(IRI(CONCAT("http://data.lblod.info/id/bestuursorganen/", STR(?timedGoverningBodyUuid))) AS ?timedGoverningBody) +}