From 2109ff77fc71cc2bc04f2ba422a61e04e914c543 Mon Sep 17 00:00:00 2001 From: Boris De Vloed Date: Thu, 9 Apr 2026 16:15:29 +0200 Subject: [PATCH 1/5] Add EredienstBeroepen and TypeBetrokkenheid labels --- config/delta-producer/public/export.json | 26 ++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/config/delta-producer/public/export.json b/config/delta-producer/public/export.json index fb0a689..b34ea6f 100644 --- a/config/delta-producer/public/export.json +++ b/config/delta-producer/public/export.json @@ -525,6 +525,32 @@ "http://www.w3.org/2004/02/skos/core#prefLabel" ] }, + { + "type": "http://lblod.data.gift/vocabularies/organisatie/EredienstBeroepen", + "graphsFilter": [ + "http://mu.semte.ch/graphs/public" + ], + "pathToConceptScheme": [ + "http://www.w3.org/2004/02/skos/core#inScheme" + ], + "properties": [ + "http://mu.semte.ch/vocabularies/core/uuid", + "http://www.w3.org/2004/02/skos/core#prefLabel" + ] + }, + { + "type": "http://lblod.data.gift/vocabularies/organisatie/TypeBetrokkenheid", + "graphsFilter": [ + "http://mu.semte.ch/graphs/public" + ], + "pathToConceptScheme": [ + "http://www.w3.org/2004/02/skos/core#inScheme" + ], + "properties": [ + "http://mu.semte.ch/vocabularies/core/uuid", + "http://www.w3.org/2004/02/skos/core#prefLabel" + ] + }, { "type": "http://data.vlaanderen.be/ns/mandaat#Mandaat", "graphsFilter": [ From c63b0659ebef46fdb9fc28d299b6bc9a8224cf03 Mon Sep 17 00:00:00 2001 From: Damon Date: Wed, 15 Apr 2026 16:31:51 +0200 Subject: [PATCH 2/5] OP-3758: updated organizations-report query + fix to dev migration --- ...0821-add-status-to-bestuurseenheden.sparql | 1 - config/reports/organizations-report.js | 119 +++++++----------- 2 files changed, 47 insertions(+), 73 deletions(-) diff --git a/config/dev-migrations/20251118120821-add-status-to-bestuurseenheden.sparql b/config/dev-migrations/20251118120821-add-status-to-bestuurseenheden.sparql index 49bc2cc..04fed56 100644 --- a/config/dev-migrations/20251118120821-add-status-to-bestuurseenheden.sparql +++ b/config/dev-migrations/20251118120821-add-status-to-bestuurseenheden.sparql @@ -1,6 +1,5 @@ DELETE { GRAPH ?g { - ?s a . ?s ?status. } } diff --git a/config/reports/organizations-report.js b/config/reports/organizations-report.js index 2011077..d006c64 100644 --- a/config/reports/organizations-report.js +++ b/config/reports/organizations-report.js @@ -6,93 +6,68 @@ export default { name: "organizations", execute: async () => { const reportData = { - title: "organizations", - description: "List of the Organizations", + title: "organisations in database", + description: "List of the Organisations in the database", filePrefix: "exports/organizations", }; console.log("Generating organizations report"); - const queryStringPart1 = ` + const queryString = ` ${PREFIXES} - - SELECT DISTINCT ?bestuur ?label ?classification ?typeEredienst + PREFIX org: + PREFIX adms: + PREFIX generiek: + PREFIX skos: + SELECT DISTINCT + ?bestuur + ?label + ?classification + ?typeEredienst + ?provincie + ?status WHERE { - GRAPH ?g { - ?bestuur a org:Organization . - OPTIONAL { ?bestuur skos:prefLabel ?label. } - } - - OPTIONAL { - ?bestuur org:classification ?classificationUri . - ?classificationUri skos:prefLabel ?classification. - } - - OPTIONAL { - ?bestuur ere:typeEredienst ?typeEredienstUri. - ?typeEredienstUri skos:prefLabel ?typeEredienst. - } - - FILTER (?g IN ( , , )) - } - `; - - const queryResponsePart1 = await batchedQuery(queryStringPart1); - - const dataPart1 = queryResponsePart1.results.bindings.reduce((acc, row) => { - acc[getSafeValue(row, "bestuur")] = { - bestuur: getSafeValue(row, "bestuur"), - label: getSafeValue(row, "label"), - classification: getSafeValue(row, "classification"), - typeEredienst: getSafeValue(row, "typeEredienst"), - }; - return acc; - }, {}); - - const queryStringPart2 = ` - ${PREFIXES} - - SELECT DISTINCT ?bestuur ?provincie - WHERE { - GRAPH ?g { - ?bestuur a org:Organization . - } - - OPTIONAL { - GRAPH ?h { - ?bestuur org:hasPrimarySite ?primarySite. - + ?bestuur a org:Organization . OPTIONAL { - ?primarySite organisatie:bestaatUit ?sa. - OPTIONAL { ?sa locn:adminUnitL2 ?provincie. } + ?bestuur ?site. + ?site ?address. + ?address ?provincie } - } - FILTER (?h IN ( , )) - } - - FILTER (?g IN ( , , )) - + OPTIONAL {?bestuur ?typeEredienst.} + OPTIONAL {?bestuur skos:prefLabel ?label} + OPTIONAL { + ?bestuur ?org_classification . + ?org_classification skos:prefLabel ?classification + } + OPTIONAL { + ?bestuur ?org_status. + ?org_status skos:prefLabel ?status. + } } `; - const queryResponsePart2 = await batchedQuery(queryStringPart2); - const dataPart2 = queryResponsePart2.results.bindings.reduce((acc, row) => { - let dataPart = { - bestuur: getSafeValue(row, "bestuur"), - provincie: getSafeValue(row, "provincie"), - }; + const queryResponse = await batchedQuery(queryString); - acc[getSafeValue(row, "bestuur")] = Object.assign( - dataPart, - dataPart1[getSafeValue(row, "bestuur")], - ); - return acc; - }, {}); + const data = queryResponse.results.bindings.map((row) => ({ + "bestuur": getSafeValue(row, "bestuur"), + "label": getSafeValue(row, "label"), + "classification": getSafeValue(row, "classification"), + "typeEredienst": getSafeValue(row, "typeEredienst"), + "provincie": getSafeValue(row, "provincie"), + "status": getSafeValue(row, "status"), + })); await generateReportFromData( - Object.values(dataPart2), - ["bestuur", "label", "classification", "typeEredienst", "provincie"], - reportData, + data, + [ + "bestuur", + "label", + "classification", + "typeEredienst", + "provincie", + "status", + ], + reportData, ); }, }; From bfd10583bf5b9a684c64e200972369f1c2075494 Mon Sep 17 00:00:00 2001 From: felix Date: Wed, 15 Apr 2026 16:54:17 +0200 Subject: [PATCH 3/5] Added migration to add the beroepen and typebetrokkenheid in concept --- ...oncept-scheme-to-codes-for-public-producer.sparql | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 config/migrations/2026/20260415165111-add-concept-scheme-to-codes-for-public-producer.sparql diff --git a/config/migrations/2026/20260415165111-add-concept-scheme-to-codes-for-public-producer.sparql b/config/migrations/2026/20260415165111-add-concept-scheme-to-codes-for-public-producer.sparql new file mode 100644 index 0000000..aceff05 --- /dev/null +++ b/config/migrations/2026/20260415165111-add-concept-scheme-to-codes-for-public-producer.sparql @@ -0,0 +1,12 @@ +INSERT { + GRAPH { + ?s . + } +} WHERE { + VALUES ?type { + + + } + + ?s a ?type . +} From e1bb06ba2c9520efa18cdc8ed4e76279c6e80edd Mon Sep 17 00:00:00 2001 From: felix Date: Wed, 15 Apr 2026 16:57:19 +0200 Subject: [PATCH 4/5] Bump maintainer 1.4.3 --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 485fc92..0e43099 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -389,7 +389,7 @@ services: restart: always logging: *default-logging delta-producer-publication-graph-maintainer: - image: lblod/delta-producer-publication-graph-maintainer:1.2.2 + image: lblod/delta-producer-publication-graph-maintainer:1.4.3 environment: MAX_BODY_SIZE: "50mb" PRETTY_PRINT_DIFF_JSON: "true" From ce4abe4d2735b82ac0234e9d62b1486b57249e7d Mon Sep 17 00:00:00 2001 From: felix Date: Wed, 15 Apr 2026 17:02:17 +0200 Subject: [PATCH 5/5] Update deploy notes --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 280bb2d..5e17403 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,12 @@ # Changelog +## Unreleased +- OP-3771: Adds labels for: EredienstBeroepen and TypeBetrokkenheid +### deploy notes +``` +drc restart migrations +drc up -d delta-producer-publication-graph-maintainer +``` + ## 1.39.0 (2026-04-02) - Add KBO organizations report to report generation service [OP-3738] - Add organizations detail report (addresses and contact info) to report generation service [OP-3738]