Compare commits

...

20 Commits

Author SHA1 Message Date
cecemel
39226cdf24 Merge pull request #472 from lblod/hotfix/remove-functionarissen-newly-created-organen
Removes the newly created bestuursorganen for leidinggevenden
2024-10-28 14:55:34 +01:00
felix
9b3dd7201b update migration 2024-10-28 14:50:56 +01:00
felix
5d20fee494 Removes the newly created bestuursorganen for leidinggevenden
They have another lifecycle than political mandates.
2024-10-28 13:02:22 +01:00
cecemel
4e30c155ef Merge pull request #468 from lblod/hotfix/add-enddates-bestuursorganen
Added migration to add end-dates to bestuursorganen
2024-10-28 11:52:35 +01:00
cecemel
7294052c75 Merge pull request #471 from lblod/hotfix/add-heeft-bestuursfunctie
Added missing predicate: `lblodlg:heeftBestuursfunctie`
2024-10-28 10:27:27 +01:00
cecemel
ccac93121b Merge pull request #470 from lblod/fix/produce-missing-classifications
Produce missing classifications
2024-10-28 10:27:14 +01:00
felix
58742fdf5e Added missing predicate 2024-10-28 10:24:01 +01:00
Claire Lovisa
12efbcc9fd Produce GeregistreerdeOrganisatieClassificatieCode in public producer 2024-10-25 09:25:11 +02:00
Claire Lovisa
0426f0f35e Add missing organen to public producer 2024-10-24 16:05:52 +02:00
mirdono
04298db9e5 fix: delete superfluous relations between APBs and municipalities
A number of APBs were accidentally `org:linkedTo` all municipalities in
municipality and an APB for which:
- the APB is linked to more than 1 municipality; and
- the municipality does not match that of the APB's primary site.

The first condition avoids we remove `org:linkedTo` triples for APBs that were
created by the users, as these are only linked with a single municipality.
2024-10-24 14:49:07 +02:00
felix
799999f051 updated migration 2024-10-23 13:21:01 +02:00
felix
8f8557d733 Added migration to add end-dates to bestuursorganen 2024-10-23 12:46:34 +02:00
cecemel
fc6b2d3b80 Merge pull request #466 from lblod/hotfix/bump-delta-dump-file-producer
Bump lblod/delta-producer-dump-file-publisher:0.10.3
2024-10-22 17:47:49 +02:00
felix
99f5c9fc91 dump lblod/delta-producer-dump-file-publisher:0.10.3 2024-10-22 17:46:29 +02:00
cecemel
3870dac1f8 Merge pull request #465 from lblod/hotfix/add-bestuurseenheid-to-eredienstbesturen
Ensure types and subtypes are added to EredienstBestuurseenheid
2024-10-22 12:46:12 +02:00
felix
08b0e29f20 Ensure types and subtypes are adde to EredienstBestuurseenheid 2024-10-22 12:12:10 +02:00
cecemel
76d7964e5c Merge pull request #464 from lblod/hotfix/dump-file-producer-config-should-get-data-from-publication-triple-store
DumpfilePublisher needs to fetch from publication-triplestore
2024-10-21 11:47:04 +02:00
felix
bc10af81f4 DumpfilePublisher needs to fetch from publication-triplestore 2024-10-21 11:38:17 +02:00
cecemel
14a290b82f Merge pull request #463 from lblod/hotfix/add-type-bestuurseenheid-to-centrale-besturen
Added migration to add besluit:Bestuurseenheid to centrale besturen
2024-10-18 11:29:15 +02:00
felix
ba4a4aa5da Added migration to add besluit:Bestuurseenheid to centrale besture 2024-10-18 11:20:37 +02:00
10 changed files with 192 additions and 7 deletions

View File

@@ -39,7 +39,7 @@
"dcatDataSetSubject": "http://data.lblod.info/datasets/delta-producer/dumps/PublicCacheGraphDump",
"targetGraph": "http://redpencil.data.gift/id/deltas/producer/public",
"fileBaseName": "dump-public",
"publicationGraphEndpoint": "http://triplestore:8890/sparql",
"publicationGraphEndpoint": "http://publication-triplestore:8890/sparql",
"targetDcatGraph": "http://mu.semte.ch/graphs/public",
"targetFilesGraph": "http://mu.semte.ch/graphs/public",
"cleanupOldDumps": true
@@ -48,7 +48,7 @@
"dcatDataSetSubject": "http://data.lblod.info/datasets/delta-producer/dumps/PublicCacheGraphDump",
"targetGraph": "http://redpencil.data.gift/id/deltas/producer/public",
"fileBaseName": "dump-public",
"publicationGraphEndpoint": "http://triplestore:8890/sparql",
"publicationGraphEndpoint": "http://publication-triplestore:8890/sparql",
"targetDcatGraph": "http://mu.semte.ch/graphs/public",
"targetFilesGraph": "http://mu.semte.ch/graphs/public",
"cleanupOldDumps": true
@@ -57,7 +57,7 @@
"dcatDataSetSubject": "http://data.lblod.info/datasets/delta-producer/dumps/WorshipPostsCacheGraphDump",
"targetGraph": "http://redpencil.data.gift/id/deltas/producer/worship-posts",
"fileBaseName": "dump-worship-posts",
"publicationGraphEndpoint": "http://triplestore:8890/sparql",
"publicationGraphEndpoint": "http://publication-triplestore:8890/sparql",
"targetDcatGraph": "http://mu.semte.ch/graphs/public",
"targetFilesGraph": "http://mu.semte.ch/graphs/public",
"cleanupOldDumps": true
@@ -66,7 +66,7 @@
"dcatDataSetSubject": "http://data.lblod.info/datasets/delta-producer/dumps/WorshipPostsCacheGraphDump",
"targetGraph": "http://redpencil.data.gift/id/deltas/producer/worship-posts",
"fileBaseName": "dump-worship-posts",
"publicationGraphEndpoint": "http://triplestore:8890/sparql",
"publicationGraphEndpoint": "http://publication-triplestore:8890/sparql",
"targetDcatGraph": "http://mu.semte.ch/graphs/public",
"targetFilesGraph": "http://mu.semte.ch/graphs/public",
"cleanupOldDumps": true

View File

@@ -274,7 +274,8 @@
"http://data.vlaanderen.be/ns/besluit#bestuurt",
"http://www.w3.org/ns/org#classification",
"https://data.vlaanderen.be/ns/generiek#isTijdspecialisatieVan",
"http://www.w3.org/ns/org#hasPost"
"http://www.w3.org/ns/org#hasPost",
"http://data.lblod.info/vocabularies/leidinggevenden/heeftBestuursfunctie"
]
},
{

View File

@@ -329,7 +329,8 @@
"http://data.vlaanderen.be/ns/mandaat#bindingEinde",
"http://data.vlaanderen.be/ns/mandaat#bindingStart",
"https://data.vlaanderen.be/ns/generiek#isTijdspecialisatieVan",
"http://www.w3.org/ns/org#hasPost"
"http://www.w3.org/ns/org#hasPost",
"http://data.lblod.info/vocabularies/leidinggevenden/heeftBestuursfunctie"
],
"additionalFilter": "?subject (<https://data.vlaanderen.be/ns/generiek#isTijdspecialisatieVan>/<http://www.w3.org/ns/org#classification>/<http://www.w3.org/2004/02/skos/core#inScheme>)|(<http://www.w3.org/ns/org#classification>/<http://www.w3.org/2004/02/skos/core#inScheme>) <http://lblod.data.gift/concept-schemes/10caf4a4-1ff5-4c05-917e-56489910d68b> ."
},
@@ -458,6 +459,19 @@
"http://www.w3.org/ns/org#role",
"http://www.w3.org/2004/02/skos/core#prefLabel"
]
},
{
"type": "http://mu.semte.ch/vocabularies/ext/GeregistreerdeOrganisatieClassificatieCode",
"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"
]
}
]
}

View File

@@ -0,0 +1,10 @@
INSERT {
GRAPH <http://mu.semte.ch/graphs/worship-service> {
?s a <http://data.vlaanderen.be/ns/besluit#Bestuurseenheid>.
}
}
WHERE {
GRAPH <http://mu.semte.ch/graphs/worship-service> {
?s a <http://data.lblod.info/vocabularies/erediensten/CentraalBestuurVanDeEredienst>.
}
}

View File

@@ -0,0 +1,16 @@
INSERT {
GRAPH <http://mu.semte.ch/graphs/worship-service> {
?s a <http://data.vlaanderen.be/ns/besluit#Bestuurseenheid>;
a <http://data.lblod.info/vocabularies/erediensten/EredienstBestuurseenheid>.
}
}
WHERE {
VALUES ?type {
<http://data.lblod.info/vocabularies/erediensten/CentraalBestuurVanDeEredienst>
<http://data.lblod.info/vocabularies/erediensten/BestuurVanDeEredienst>
}
GRAPH <http://mu.semte.ch/graphs/worship-service> {
?s a ?type.
}
}

View File

@@ -0,0 +1,59 @@
PREFIX besluit: <http://data.vlaanderen.be/ns/besluit#>
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 skos: <http://www.w3.org/2004/02/skos/core#>
INSERT {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?oldVersion mandaat:bindingEinde ?newStartDate .
}
}
WHERE {
VALUES ?orgaanClass {
<http://data.vlaanderen.be/id/concept/BestuursorgaanClassificatieCode/180a2fba-6ca9-4766-9b94-82006bb9c709> #Gouverneur
<http://data.vlaanderen.be/id/concept/BestuursorgaanClassificatieCode/5ab0e9b8a3b2ca7c5e00000c> # Provincieraad
<http://data.vlaanderen.be/id/concept/BestuursorgaanClassificatieCode/5ab0e9b8a3b2ca7c5e00000d> # deputatie
<http://data.vlaanderen.be/id/concept/BestuursorgaanClassificatieCode/4955bd72cd0e4eb895fdbfab08da0284> # Burgemeester
<http://data.vlaanderen.be/id/concept/BestuursorgaanClassificatieCode/5ab0e9b8a3b2ca7c5e000005> # gemeenteraad
<http://data.vlaanderen.be/id/concept/BestuursorgaanClassificatieCode/5ab0e9b8a3b2ca7c5e000006> # college
<http://data.vlaanderen.be/id/concept/BestuursorgaanClassificatieCode/5ab0e9b8a3b2ca7c5e000007> # rmw
<http://data.vlaanderen.be/id/concept/BestuursorgaanClassificatieCode/5ab0e9b8a3b2ca7c5e000008> # Vast Bureau
<http://data.vlaanderen.be/id/concept/BestuursorgaanClassificatieCode/53c0d8cd-f3a2-411d-bece-4bd83ae2bbc9> # Voorzitter van het Bijzonder Comité voor de Sociale Dienst
<http://data.vlaanderen.be/id/concept/BestuursorgaanClassificatieCode/5ab0e9b8a3b2ca7c5e000009> # Bijzonder Comité voor de Sociale Dienst
<http://data.vlaanderen.be/id/concept/BestuursorgaanClassificatieCode/9314533e-891f-4d84-a492-0338af104065> #districtburgemeester
<http://data.vlaanderen.be/id/concept/BestuursorgaanClassificatieCode/5ab0e9b8a3b2ca7c5e00000a> # Districtsraad
<http://data.vlaanderen.be/id/concept/BestuursorgaanClassificatieCode/5ab0e9b8a3b2ca7c5e00000b> # Districtscollege
}
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?bestuursorgaan besluit:bestuurt ?bestuurseenheid;
skos:prefLabel ?orgaanLabel;
<http://www.w3.org/ns/org#classification> ?orgaanClass.
# Find the bestuursorgaan version without an end date
?oldVersion a besluit:Bestuursorgaan ;
generiek:isTijdspecialisatieVan ?bestuursorgaan ;
mandaat:bindingStart ?oldStartDate .
FILTER NOT EXISTS { ?oldVersion mandaat:bindingEinde ?_ }
# Find newer bestuursorgaan version
?newVersion a besluit:Bestuursorgaan ;
generiek:isTijdspecialisatieVan ?bestuursorgaan ;
mandaat:bindingStart ?newStartDate .
FILTER (?newStartDate > ?oldStartDate)
# Ensure there's no version with an earlier or same start date than the new one
FILTER NOT EXISTS {
?otherVersion a besluit:Bestuursorgaan ;
generiek:isTijdspecialisatieVan ?bestuursorgaan ;
mandaat:bindingStart ?otherStartDate .
FILTER (?otherStartDate > ?oldStartDate && ?otherStartDate < ?newStartDate)
}
}
}

View File

@@ -0,0 +1,36 @@
PREFIX besluit: <http://data.vlaanderen.be/ns/besluit#>
PREFIX org: <http://www.w3.org/ns/org#>
PREFIX organisatie: <https://data.vlaanderen.be/ns/organisatie#>
PREFIX adres: <https://data.vlaanderen.be/ns/adres#>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
DELETE {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?municipality org:linkedTo ?apb .
}
} WHERE {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?apb a besluit:Bestuurseenheid;
org:classification <http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/80310756-ce0a-4a1b-9b8e-7c01b6cc7a2d>; # APB
org:hasPrimarySite/organisatie:bestaatUit/adres:gemeentenaam ?apbMunicipalityName .
?municipality org:linkedTo ?apb .
# Filter APBs with more than 1 linked municipality, this avoids removing
# triples for APBs created by users.
{
SELECT DISTINCT ?apb
WHERE {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?municipality org:linkedTo ?apb .
}
} GROUP BY ?apb HAVING (COUNT(?municipality) > 1)
}
}
# Filter municipalities that are different from the APB's primary site's
# municipality
GRAPH <http://mu.semte.ch/graphs/shared> {
?municipality a besluit:Bestuurseenheid;
org:classification <http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/5ab0e9b8a3b2ca7c5e000001>; # municipality
skos:prefLabel ?municipalityName .
}
FILTER (?apbMunicipalityName != ?municipalityName)
}

View File

@@ -0,0 +1,11 @@
INSERT DATA {
GRAPH <http://mu.semte.ch/graphs/public> {
<http://data.vlaanderen.be/id/concept/BestuursorgaanClassificatieCode/b52094ff-21a2-4da8-8dbe-f513365d1528> <http://www.w3.org/2004/02/skos/core#inScheme> <http://lblod.data.gift/concept-schemes/10caf4a4-1ff5-4c05-917e-56489910d68b> .
<http://data.vlaanderen.be/id/concept/BestuursorgaanClassificatieCode/5733254e-73ff-4844-8d43-7afb7ec726e8> <http://www.w3.org/2004/02/skos/core#inScheme> <http://lblod.data.gift/concept-schemes/10caf4a4-1ff5-4c05-917e-56489910d68b> .
<http://data.vlaanderen.be/id/concept/BestuursorgaanClassificatieCode/17e76b36-64a1-4db1-8927-def3064b4bf1> <http://www.w3.org/2004/02/skos/core#inScheme> <http://lblod.data.gift/concept-schemes/10caf4a4-1ff5-4c05-917e-56489910d68b> .
<http://data.vlaanderen.be/id/concept/BestuursorgaanClassificatieCode/013cc838-173a-4657-b1ae-b00c048df943> <http://www.w3.org/2004/02/skos/core#inScheme> <http://lblod.data.gift/concept-schemes/10caf4a4-1ff5-4c05-917e-56489910d68b> .
<http://data.vlaanderen.be/id/concept/BestuursorgaanClassificatieCode/1afce932-53c1-46d8-8aab-90dcc331e67d> <http://www.w3.org/2004/02/skos/core#inScheme> <http://lblod.data.gift/concept-schemes/10caf4a4-1ff5-4c05-917e-56489910d68b> .
<http://data.vlaanderen.be/id/concept/BestuursorgaanClassificatieCode/a9e30e31-0cd2-4f4a-9352-545c5d43be83> <http://www.w3.org/2004/02/skos/core#inScheme> <http://lblod.data.gift/concept-schemes/10caf4a4-1ff5-4c05-917e-56489910d68b> .
<http://data.vlaanderen.be/id/concept/BestuursorgaanClassificatieCode/0dbc70ec-6be9-4997-b8e1-11b6c0542382> <http://www.w3.org/2004/02/skos/core#inScheme> <http://lblod.data.gift/concept-schemes/10caf4a4-1ff5-4c05-917e-56489910d68b> .
}
}

View File

@@ -0,0 +1,38 @@
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX generiek: <https://data.vlaanderen.be/ns/generiek#>
DELETE {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?orgIntijdNew ?orgIntijdNewP ?orgIntijdNewO.
?bestuursfunctie ?bestuursfunctieP ?bestuursfunctieO.
}
}
WHERE {
VALUES ?class {
<http://data.vlaanderen.be/id/concept/BestuursorgaanClassificatieCode/11f0af9e-016c-4e0b-983a-d8bc73804abc> # "Adjunct-algemeen directeur"
<http://data.vlaanderen.be/id/concept/BestuursorgaanClassificatieCode/39854196-f214-4688-87a1-d6ad12baa2fa> # "Algemeen directeur"
<http://data.vlaanderen.be/id/concept/BestuursorgaanClassificatieCode/41caf7e6-b040-4720-9cc2-a96cfffed5b4> # "Leidend Ambtenaar"
<http://data.vlaanderen.be/id/concept/BestuursorgaanClassificatieCode/62644b9c-4514-41dd-a660-4c35257f2b35> # "Financieel directeu"
<http://data.vlaanderen.be/id/concept/BestuursorgaanClassificatieCode/ed40469e-3b6f-4f38-99ba-18912ee352b0> # "Adjunct-financieel directeur"
<http://data.vlaanderen.be/id/concept/BestuursorgaanClassificatieCode/3e9f22c1-0d35-445b-8a37-494addedf2d8> # "Financieel beheerder"
<http://data.vlaanderen.be/id/concept/BestuursorgaanClassificatieCode/5ab19107-82d2-4273-a986-3da86fda050d> # Griffier
}
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?s a <http://data.vlaanderen.be/ns/besluit#Bestuursorgaan>;
<http://www.w3.org/ns/org#classification> ?class.
?orgIntijdOld generiek:isTijdspecialisatieVan ?s;
<http://data.vlaanderen.be/ns/mandaat#bindingStart> ?old.
?orgIntijdNew generiek:isTijdspecialisatieVan ?s;
<http://data.vlaanderen.be/ns/mandaat#bindingStart> ?new.
FILTER(?new > ?old)
?orgIntijdNew ?orgIntijdNewP ?orgIntijdNewO.
?orgIntijdNew <http://data.lblod.info/vocabularies/leidinggevenden/heeftBestuursfunctie> ?bestuursfunctie.
?bestuursfunctie ?bestuursfunctieP ?bestuursfunctieO.
}
}

View File

@@ -323,7 +323,7 @@ services:
restart: always
logging: *default-logging
delta-producer-dump-file-publisher:
image: lblod/delta-producer-dump-file-publisher:0.10.2
image: lblod/delta-producer-dump-file-publisher:0.10.3
volumes:
- ./config/delta-producer/dump-file-publisher:/config
- ./data/files:/share