Merge branch 'development' into OP-3760-Query-list-change-events-of-organisations-in-Dashboard
# Conflicts: # CHANGELOG.md
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
# Changelog
|
||||
## Unreleased
|
||||
- OP-3771: Adds labels for: EredienstBeroepen and TypeBetrokkenheid
|
||||
- Bump to kbo-data-sync [OP-3765]
|
||||
- Added administrativeUnits report with strekking [OP-3766]
|
||||
- Cleanup local involvement for oud heverlee [OP-3757]
|
||||
@@ -11,6 +12,7 @@
|
||||
drc pull kbo-data-sync && drc up -d kbo-data-sync
|
||||
drc restart report-generation
|
||||
drc restart migrations && drc logs -ft --tail=200 migrations
|
||||
drc up -d delta-producer-publication-graph-maintainer
|
||||
```
|
||||
|
||||
## 1.39.0 (2026-04-02)
|
||||
|
||||
@@ -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": [
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
DELETE {
|
||||
GRAPH ?g {
|
||||
?s a <http://www.w3.org/ns/org#Organization>.
|
||||
?s <http://www.w3.org/ns/regorg#orgStatus> ?status.
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
INSERT {
|
||||
GRAPH <http://mu.semte.ch/graphs/public> {
|
||||
?s <http://www.w3.org/2004/02/skos/core#inScheme> <http://lblod.data.gift/concept-schemes/10caf4a4-1ff5-4c05-917e-56489910d68b> .
|
||||
}
|
||||
} WHERE {
|
||||
VALUES ?type {
|
||||
<http://lblod.data.gift/vocabularies/organisatie/EredienstBeroepen>
|
||||
<http://lblod.data.gift/vocabularies/organisatie/TypeBetrokkenheid>
|
||||
}
|
||||
|
||||
?s a ?type .
|
||||
}
|
||||
@@ -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: <http://www.w3.org/ns/org#>
|
||||
PREFIX adms: <http://www.w3.org/ns/adms#>
|
||||
PREFIX generiek: <https://data.vlaanderen.be/ns/generiek#>
|
||||
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
|
||||
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 ( <http://mu.semte.ch/graphs/administrative-unit>, <http://mu.semte.ch/graphs/worship-service>, <http://mu.semte.ch/graphs/shared>))
|
||||
}
|
||||
`;
|
||||
|
||||
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 <http://www.w3.org/ns/org#hasPrimarySite> ?site.
|
||||
?site <https://data.vlaanderen.be/ns/organisatie#bestaatUit> ?address.
|
||||
?address <http://www.w3.org/ns/locn#adminUnitL2> ?provincie
|
||||
}
|
||||
}
|
||||
FILTER (?h IN ( <http://mu.semte.ch/graphs/administrative-unit>, <http://mu.semte.ch/graphs/worship-service> ))
|
||||
}
|
||||
|
||||
FILTER (?g IN ( <http://mu.semte.ch/graphs/administrative-unit>, <http://mu.semte.ch/graphs/worship-service>, <http://mu.semte.ch/graphs/shared>))
|
||||
|
||||
OPTIONAL {?bestuur <http://data.lblod.info/vocabularies/erediensten/typeEredienst> ?typeEredienst.}
|
||||
OPTIONAL {?bestuur skos:prefLabel ?label}
|
||||
OPTIONAL {
|
||||
?bestuur <http://www.w3.org/ns/org#classification> ?org_classification .
|
||||
?org_classification skos:prefLabel ?classification
|
||||
}
|
||||
OPTIONAL {
|
||||
?bestuur <http://www.w3.org/ns/regorg#orgStatus> ?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,
|
||||
);
|
||||
},
|
||||
};
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user