Compare commits

..

234 Commits

Author SHA1 Message Date
Claire Lovisa
20f010bd42 Release v1.29.2 2025-02-17 16:47:32 +01:00
Claire Lovisa
7bb08363e2 Merge pull request #517 from lblod/hotfix/restore-betrokken-lokale-besturen
Restore betrokken lokale besturen
2025-02-17 16:45:29 +01:00
Claire Lovisa
b66278aec5 Restore betrokken lokale besturen 2025-02-17 16:15:17 +01:00
cecemel
b273a77923 Merge pull request #515 from lblod/hotfix/flush-eredienst-mandatarissen
Hotfix/flush eredienst mandatarissen
2025-02-14 16:45:59 +01:00
felix
f689f90e37 Update CHANGELOG.md 2025-02-14 14:31:17 +01:00
felix
20bc051103 Refine migrations 2025-02-13 17:37:52 +01:00
felix
8f57a160e0 update migration name 2025-02-13 17:37:41 +01:00
felix
6f731813bb Ensure different operation jobs for both consumers 2025-02-13 17:05:00 +01:00
felix
03635e4b12 bump consumers 2025-02-13 17:04:52 +01:00
felix
741a7cae2c added migrations to flush again 2025-02-13 17:04:23 +01:00
Claire Lovisa
9ea9d90751 Release v1.29.0 2025-02-07 20:12:22 +01:00
Claire Lovisa
d8114bec4e Release v1.29.0-1 2025-02-05 14:22:40 +01:00
Claire Lovisa
a352683c6f Merge pull request #512 from lblod/fix/mkissing-formatting-dates-consumers
Add dates mapping rules for mandatarissen and leidinggevenden consumers
2025-02-05 14:21:50 +01:00
Claire Lovisa
d601d7f34e Add dates mapping rules for consumers
The mandatarissen and leidinggevenden consumers were missing a date
formatting mapping that is making sure that the data we display to the
user is of the same date as the one shown in the original app. This
transcription was made by the reasoner and we forgot to include it in
the mapping configuration.

I also updated the timestamp of migrations that need to run again when
I'll re-deploy to QA and DEV. It will have no impact on the upcoming
PROD deploy.
2025-02-05 10:05:39 +01:00
Claire Lovisa
aab976bcc1 Release v1.29.0-0 2025-02-03 16:13:22 +01:00
Claire Lovisa
404a282a7d Merge pull request #507 from lblod/chore/bump-mandatarissen-consumer
Bump mandatarissen consumer to v0.1.0
2025-02-03 16:11:15 +01:00
Claire Lovisa
f79724132a Merge branch 'master' into chore/bump-mandatarissen-consumer 2025-02-03 16:11:05 +01:00
Claire Lovisa
0b8530db34 Merge pull request #506 from lblod/revert-505-revert-502-chore/update-leidinggevenden-consumer
Bump leidinggevenden consumer to v0.1.0
2025-02-03 16:04:35 +01:00
Claire Lovisa
17d48100d7 Merge branch 'master' into revert-505-revert-502-chore/update-leidinggevenden-consumer 2025-02-03 16:04:25 +01:00
Claire Lovisa
c6baf82dff Merge pull request #503 from lblod/feature/bump-worship-consumer
Bump worship consumer to v0.1.0
2025-02-03 15:58:59 +01:00
Claire Lovisa
cde5b49654 Merge branch 'master' into feature/bump-worship-consumer 2025-02-03 15:56:38 +01:00
mirdono
7316df1ab2 chore: added release date 2025-01-23 16:47:32 +01:00
Claire Lovisa
300e088b6c Bump mandatarissen consumer to v0.1.0 2025-01-23 16:24:02 +01:00
mirdono
43e7cb0dac chore: bump frontend 2025-01-22 20:26:33 +01:00
Claire Lovisa
e844c9f824 Add reasoner rules back, we'll clean everything up afterwards 2025-01-22 20:18:47 +01:00
mirdono
eb8790f40b chore: add changelog entry 2025-01-22 17:02:43 +01:00
mirdono
e10c825f75 fix: index municipality names as keywords instead of regular text
Index municipality names as keywords instead of as plain text. This prevents
them from being split at word separators. Thereby avoiding that searches for a
municipality name, as used by the frontend's municipality filter, return
organisations whose municipality is a partial match.

For example, previously the results when searching for "Puurs" also included the
organisations located in "Sint-Amands-Puurs". The latter was tokenized into
three terms, therefore also matching plain "Puurs". By treating the municipality
name as keyword this split non longer happens.
2025-01-22 17:02:43 +01:00
felix
0553cd7d66 Update consumer main 2025-01-22 16:47:04 +01:00
Claire Lovisa
55cb772e92 Update phone number mapping
The default behaviour should clean any number that can be cleaned BUT
let the other numbers flow without any modification. The previous
behaviour I'm fixing here was to NOT let them flow if they were not in a
"cleanable" format.
2025-01-22 16:47:04 +01:00
Claire Lovisa
83f247b051 Fixes on container names and env var 2025-01-22 16:47:04 +01:00
Claire Lovisa
950521f187 Bump consumer to v0.1.0 2025-01-22 16:47:04 +01:00
Claire Lovisa
61b88fe602 Adjust flushing migration to delete all mandates
and not only the ones coming from Loket. There is a risk that we delete
too much data here but if that would be the case, the data is
recuperable through the backups by looking at persons and worship
positions that were in OP but not in the worship services landing zone.
2025-01-22 16:47:04 +01:00
Claire Lovisa
dae66c97d3 Add sudo retry to worship consumers 2025-01-22 16:47:04 +01:00
Claire Lovisa
647e17900a Fixes on mapping rules 2025-01-22 16:47:04 +01:00
Claire Lovisa
72b4eaa68a Fix rules about names 2025-01-22 16:47:04 +01:00
Claire Lovisa
bbb0f7a373 Update Changelog and Readme
Inspired by @cecemel in
631ba827ee,
thanks!
2025-01-22 16:47:00 +01:00
Claire Lovisa
bf41ad4ad2 Make configuration more granular 2025-01-22 16:45:29 +01:00
Claire Lovisa
d3899762a9 Remove un-necessary remapping rules 2025-01-22 16:45:29 +01:00
Claire Lovisa
47c4dea630 Bump worship consumer to v0.27.0 into two consumers
The consumer needs to dispatch data to two different graphs: the worship
services graph and the privacy graph, based on triple type and/or
property. The latest version of the consumer doesn't allow it to be done
in one consumer instance, hence de split into two consumers.
2025-01-22 16:45:29 +01:00
Claire Lovisa
140626a936 Update changelog 2025-01-22 16:44:03 +01:00
Claire Lovisa
026ef435e1 Revert "Revert "Chore/update leidinggevenden consumer"" 2025-01-22 16:41:12 +01:00
Claire Lovisa
20d4613400 Merge pull request #505 from lblod/revert-502-chore/update-leidinggevenden-consumer
Revert "Chore/update leidinggevenden consumer"
2025-01-22 16:39:40 +01:00
Claire Lovisa
b358278067 Revert "Chore/update leidinggevenden consumer" 2025-01-22 16:31:44 +01:00
Claire Lovisa
f7a637f0f4 Merge pull request #502 from lblod/chore/update-leidinggevenden-consumer
Chore/update leidinggevenden consumer
2025-01-22 16:24:28 +01:00
Claire Lovisa
eb99585a1d Merge branch 'master' into chore/update-leidinggevenden-consumer 2025-01-22 16:23:19 +01:00
Claire Lovisa
841ac47db6 Merge branch 'chore/update-leidinggevenden-consumer' of github.com:lblod/app-organization-portal into chore/update-leidinggevenden-consumer 2025-01-22 16:12:06 +01:00
Claire Lovisa
3b812946e4 Reorganize migrations and split jobs removal 2025-01-22 16:11:59 +01:00
felix
9972451d0e fix typo 2025-01-22 16:09:25 +01:00
Claire Lovisa
0faa8100c8 Bump consumer to v0.1.0 2025-01-22 15:37:48 +01:00
Claire Lovisa
7834352617 Fix phone mapping 2025-01-22 15:37:39 +01:00
Claire Lovisa
261ba383b6 Update doc 2025-01-22 15:37:24 +01:00
mirdono
62769f855c chore: bump frontend 2025-01-21 12:07:29 +01:00
mirdono
5eca8a2e1d chore: bump frontend 2025-01-21 10:11:46 +01:00
mirdono
0e8885f4dd chore: update changelog 2025-01-21 10:04:23 +01:00
mirdono
3bc47a7fb0 fix: merger change event between St.-Amandus and Sint-Martinus
The worship service St.-Amandus was not included as `orginalOrganization` in the
merger change event somehow. As a result it was not listed as involved
organisation in the change event details. Furthermore, its status was not
correctly updated to "Not active".
2025-01-21 10:04:23 +01:00
felix
1698112a9d Merge branch 'master' into chore/update-leidinggevenden-consumer 2025-01-17 15:15:46 +01:00
felix
a001f6b9e4 Remove old dispatching rules 2025-01-17 15:12:52 +01:00
felix
dba1ada5e2 Updated mapping rules 2025-01-17 14:42:54 +01:00
felix
a6571eefa5 Current consumer is VERY picky on how you write the mapping-query
See:
https://github.com/lblod/delta-consumer/blob/v0.0.27/lib/delta-sparql-mapping.js#L267

make sure you write first the graph or "triple"-pattern and filter
after that. For now.
2025-01-17 12:09:07 +01:00
felix
347844e341 update the filter so empty strings are not ingested 2025-01-17 11:19:19 +01:00
felix
aaf87ee32f update consumer-config 2025-01-17 10:24:15 +01:00
felix
631ba827ee update doc 2025-01-17 10:24:04 +01:00
felix
19e3423202 updated migrations 2025-01-17 10:23:52 +01:00
felix
8750fddb2d added mapping rules 2025-01-17 10:23:41 +01:00
felix
8a7eb8ede0 adding migrations 2025-01-17 09:44:08 +01:00
cecemel
4ff40cb4e4 Merge pull request #500 from lblod/hotfix/peformance-fix-bestuursfuncties-fusiegemeentes
Hotfix/peformance fix bestuursfuncties fusiegemeentes
2025-01-16 14:37:28 +01:00
felix
d53bd27369 Release v1.28.4 2025-01-16 14:35:20 +01:00
felix
90fa373254 fix performance of migration 2025-01-16 14:34:08 +01:00
cecemel
d290187467 Merge pull request #499 from lblod/hotfix/betuursfuncties-fusiegemeentes
Hotfix/betuursfuncties fusiegemeentes
2025-01-16 12:12:39 +01:00
felix
dd08a03faa Update Changlog 2025-01-16 12:12:09 +01:00
felix
79bae4fd3c Updated changelog 2025-01-16 11:36:12 +01:00
felix
6bf50bbbb7 Release v1.28.3 2025-01-16 11:31:06 +01:00
felix
038b72646c Added migration to correct leidinggeveden functionarissen OCMW
The bestuursfunctie of functionarissen both are attached to OCMW and Gemeente.
2025-01-16 11:27:03 +01:00
cecemel
c570ab994e Merge pull request #498 from lblod/hotfix/add-opdrachthoudende-gemeente-private-deelname
Hotfix/add opdrachthoudende gemeente private deelname
2025-01-13 17:07:28 +01:00
cecemel
c9ba00fc23 Update CHANGELOG.md 2025-01-13 15:55:59 +01:00
felix
c993a681d9 Addendum changelog 2025-01-13 15:06:04 +01:00
felix
fc676dd30f Release v1.28.2 2025-01-13 15:04:25 +01:00
felix
54700d9832 Publish "Opdrachthoudende vereniging met private deelname" in ->
delta stream "public"
2025-01-13 14:56:01 +01:00
mirdono
ce0e267627 chore: add changelog file
Introduce a changelog file to keep track of the changes in each release.
Furthermore, this should contain the necessary steps to deploy a release.
2025-01-10 10:49:11 +01:00
wolfez
d0835a1b30 Migration to delete betrokkene 'oudenaarde' and update financieringspercentage 2025-01-09 16:48:28 +01:00
wolfez
44e2de4f0b Create migrations for the cleanup of local involvements 2025-01-09 16:48:10 +01:00
mirdono
824201ced6 feat: merge police zones 2025
- Migrations to create the necessary merger change events that represent the
  merger of several police zones into three new ones
- Migration to update the status of the merged police zones to not active
2025-01-09 15:29:54 +01:00
mirdono
80ad432a5c fix: relate merged municipalities and province in shared graph
When new organisations were added for some merged municipalities (see PR #442)
their `org:hasSubOrganization` link with the province was inserted in to the
`<http://mu.semte.ch/graphs/administrative-unit>` graph instead of the
`<http://mu.semte.ch/graphs/shared>`.

Consequently, when logged in as a worship user and either of these
municipalities were selected in a form, the corresponding province was not
automatically filled in. This is due to the fact that worship users cannot read
from the `administrative-unit` graph.

This migration moves the appropriate `org:hasSubOrganization` triples to the
correct graph such that the behaviour for worship and non-worship users is the
same again.
2025-01-09 15:29:00 +01:00
Claire Lovisa
9122c18f1e Import 2025 NIS codes and update werkingsgebieden (#490) 2025-01-08 12:17:38 +01:00
mirdono
8143aac736 chore: regenerate full addresses to reflect address changes
This migration regenerates the `locn:fullAddress` triples for addresses in a
municipality involved in a merger. In essences this migration updates the
`locn:fullAddress` triple for each address changed by the migrations in the
previous commit.

Notes
- The migration is split over two queries, one for addresses without a box
  number and one for addresses with a box number. This avoids complicating the
  query with conditional logic at the cost of code duplication in the queries.
- In the existing full address triples two different notations are used to
  separate the box and building number. OP currently separates them simply by a
  space, which is what this migration matches for. But some historical data uses
  a dash "-" to separate building and box number. Consequently, this migration
  might match more address resources than strictly updated for the municipality
  merges.
2024-12-19 16:01:47 +01:00
mirdono
dde2e42696 chore: update address municipalities for 2025 municipality mergers
This migration updates the municipality name in the addresses for all
organisations located in a municipality whose name changes due to the 2025
municipality mergers.
2024-12-19 16:01:47 +01:00
mirdono
0f1654e64c chore: move organisations in Zwijndrecht to province East Flanders
As part of the 2025 municipality mergers Zwijndrecht will merge with Beveren and
Kruibeke into Beveveren-Kruibeke-Zwijndrecht. Additionally this means that
Zwijndrecht changes province from Antwerp to East Flanders.

This migration updates the province for each organisation with an address in
Zwijndrecht to East Flanders.
2024-12-19 16:01:47 +01:00
cecemel
9ed42aa4f6 Merge pull request #489 from lblod/hotfix/add-werkingsgebieden-ocmw
Added missing werkingsgebied for OCMW.
2024-12-18 12:20:03 +01:00
felix
4e39d1eed4 Added missing werkingsgebied for OCMW.
It seems OCMW's were the only ones without werkingsgebied. And the
corresponding gemeente had this.
2024-12-18 12:03:04 +01:00
mirdono
885db51540 chore: bump frontend 2024-12-13 13:07:55 +01:00
mirdono
477c37320d feat: add merger change events for 2025 municipality mergers
These migrations insert the merger change events that are needed for the 2025
municipality mergers.

The migrations executed by the `migrations` service insert the actual merger
change events for
- mergers where the resulting organisation is a new organisation (these were
  added earlier in #442);
- mergers where the resulting organisation is an already existing, active
  organisation; and
- the special case where the municipality Borsbeek is merging with the
  municipality Antwerp, thereby creating a new district Borsbeek.

The migration executed by the `migrations-triggering-indexing` service updates
the status of the necessary organisations:
- the new municipalities/OCMWs/district are set from "Being founded" (nl. "In
  oprichting") to "Active"
- the other municipalities are changed from "Active" to "Not active"
- organisations that simply remain active before and after the merger are *not*
  updated
2024-12-13 12:36:06 +01:00
mirdono
dfec837bba feat: set end date governing bodies for merged organisations
Set the end date for governing bodies for municipalities and OCMWs that are
involved in a municipality merger *and* will become inactive to 02 January 2025.

For the municipalities and OCMWs that remain active after the merger, the end
date has already been set previously.
2024-12-13 12:35:47 +01:00
mirdono
806a870744 chore: rename municipalities and OCMWs for mergers 2025
As part of the 2025 municipality mergers 3 municipalities, and their
corresponding OCMWs, keep their original URI but do change their name. More
specifically:
- Bilzen becomes Bilzen-Hoeselt
- Ham becomes Tessenderlo-Ham
- Tongeren becomes Tongeren-Borgloon
2024-12-13 12:35:24 +01:00
Boris De Vloed
8e4c395a78 Merge pull request #484 from lblod/fix/remove-test-kerk-and-betrokken-bestuur
remove wrong data in prd
2024-12-12 11:55:05 +01:00
mirdono
eb552c92c3 Fix var typo 2024-12-12 11:48:10 +01:00
Riad Abdallah
782940c270 Merge pull request #451 from lblod/remove-organizations
Add queries to remove organizations
2024-12-11 18:56:02 +01:00
cecemel
b9db4d3c92 Merge pull request #485 from lblod/hotfix/remove-language-tags-skos-notation
Fix skos:notation ADMS:identifier language tags
2024-12-11 11:18:37 +01:00
felix
1b2f9d45ac Fix skos:notation ADMS:identifier language tags
It seems there were language tagged and non-languaged versions used
for the skos:notation from ADMS:identifier.
This migrations alings it, we don't want typed strings here.
See also DL-6343
2024-12-11 10:16:50 +01:00
Boris De Vloed
925289a9dc remove wrong data in prd 2024-12-05 13:35:23 +01:00
cecemel
adb54c3b5a Merge pull request #483 from lblod/hotfix/add-kbo-districten
Added migration to add KBO to districten.
2024-12-05 10:34:24 +01:00
felix
2f37aaaefc Added migration to add KBO to districten. 2024-12-05 10:32:19 +01:00
Claire Lovisa
ca92809cf5 Fix classification of Voetbal in de Stad vzw (#477)
* Fix classification of an organization

* Move migration to trigger indexing on execution
2024-11-20 11:03:56 +01:00
felix
4f8babb9ae update classificatieCode representatief orgaan export 2024-11-12 13:25:57 +01:00
cecemel
644fbfaae3 Merge pull request #476 from lblod/chore/export-representatief-orgaan-classificatie-code
update RO - concept to export
2024-11-12 11:37:12 +01:00
felix
9d5d11f922 update RO - concept to epxport 2024-11-12 11:31:11 +01:00
mirdono
13c862f689 chore: bump frontend 2024-11-05 18:22:19 +01:00
cecemel
1031b78ac7 Merge pull request #475 from lblod/hotfix/export-ABB-to-public-export
Added config export to export ABB
2024-11-05 11:49:52 +01:00
cecemel
03ad3c2089 Merge pull request #474 from lblod/hotfix/export-vgc-to-public
Hotfix/export vgc to public
2024-11-05 11:48:16 +01:00
felix
f79d31e153 update migration 2024-11-05 11:36:41 +01:00
felix
023114fcab added migration to add classification 2024-11-05 11:28:06 +01:00
felix
ac0f5764df updated producer config 2024-11-05 11:27:50 +01:00
felix
dc9d060d49 Added config export to export ABB 2024-10-30 15:49:17 +01:00
felix
3eceefce12 Added VGC export 2024-10-30 15:20:18 +01:00
cecemel
f026723aee Merge pull request #473 from lblod/hotfix/fix-missing-organen
adding missing organen from original OP export
2024-10-30 14:15:17 +01:00
felix
43b5f5e7eb Update migrations 2024-10-30 10:51:35 +01:00
felix
41a497dc71 adding missing organen from original OP export 2024-10-29 13:37:25 +01:00
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
mirdono
b1cc9c7329 fix: correct governing body start dates for new legislature
Originally the starting dates for the new governing bodies for the new
legislature was set to `2025-01-01` for all relevant municipalities, OCMWs,
districts, and provinces.

These migrations change that to more correct starting dates:
* For organisations that are **not** involved in mergers the new starting data
  is `2024-12-02`, the first day installation meetings are allowed[1].
* For organisations that are involved in mergers the new starting date is
  `2025-01-01`, the first work day of the new year on which the mergers take
  effect. Note: this migration assumes there are no other start dates on
  `2025-01-01`, so the migrations have to be run in the specified order.

[1] https://www.vlaanderen.be/lokaal-bestuur/organisatie-en-werking/gemeenteraad/installatie
2024-10-17 15:16:54 +02:00
Riad Abdallah
25588d13ac Remove bestuursfuncties 2024-10-17 15:14:50 +02:00
mirdono
98ed3260ed fix: remove incorrect image line 2024-10-17 12:19:54 +02:00
Achraf Atauil
5e0d47053d Small indent issue 2024-10-17 11:11:41 +02:00
cecemel
99dd506f8f Merge pull request #458 from lblod/chore/remove-latest-tags-from-docker-compose-dev
Chore/remove latest tags from docker compose dev
2024-10-15 10:49:54 +02:00
cecemel
b9695eb255 Merge branch 'master' into chore/remove-latest-tags-from-docker-compose-dev 2024-10-15 10:49:41 +02:00
cecemel
4389a743b6 Merge pull request #459 from lblod/fix/produce-bestuursfunctie
Link missing classifications to public producer concept scheme
2024-10-15 10:48:52 +02:00
cecemel
e40d85b22c Merge pull request #452 from lblod/feature/bump-delta-producers-and-move-to-publication-triplestore
Bump delta producers and move to publication triplestore
2024-10-15 10:48:36 +02:00
felix
340937bc85 Remove the :latest tag from frontend in docker-compose.dev.yml 2024-10-15 10:36:50 +02:00
felix
f08e2e3df0 changed mock-login-service to tagged version in drc.dev.yml 2024-10-15 10:36:38 +02:00
Claire Lovisa
77245adbaa Link missing classifications to public producer concept scheme 2024-10-15 10:27:46 +02:00
felix
cb0191f28b Fix syntax issue in docker-compose.dev.yml 2024-10-14 15:04:22 +02:00
felix
3f460ce329 Some uri's of JobOperations were off. Fixing it here. 2024-10-14 14:51:20 +02:00
felix
6397ce2923 Change the namse of the stream to be in line with previous 2024-10-14 14:50:54 +02:00
felix
7e0a668573 Restore the old public path, to not break clients 2024-10-14 14:50:14 +02:00
Riad Abdallah
b6dd8b4519 Fix public info stream name 2024-10-08 13:35:35 +02:00
Riad Abdallah
797d3a8d44 Fix public info stream name 2024-10-08 13:19:00 +02:00
Riad Abdallah
a98f860d3c Remove individual delta rules 2024-10-03 17:05:19 +02:00
Riad Abdallah
162a6ff654 Update dispatcher rules for the delta streams 2024-10-03 16:42:00 +02:00
Riad Abdallah
d3b40b88ea Remove individual streams from docker compose configs 2024-10-03 16:40:08 +02:00
Riad Abdallah
a7d6dcfb32 Move streams to consolidated background job initiator 2024-10-03 16:39:14 +02:00
Riad Abdallah
d4f9352c61 Move streams to consolidated publication graph maintainer 2024-10-03 16:38:57 +02:00
Riad Abdallah
e182017bb0 Add queries to remove organizations 2024-09-26 14:27:27 +02:00
mirdono
0ba4a6f393 fix: let relevant producers export representative body classification
Each producer that export representative bodies should include the
classification corresponding triples. Otherwise receives might run into
problems.
2024-09-04 18:02:53 +02:00
Boris De Vloed
2e6dd74b72 export ro classifcation in other public producer too 2024-09-04 18:02:53 +02:00
Riad Abdallah
1412a767ad Merge pull request #449 from lblod/fix/remove-duplicate-uri-for-ibeg
Remove duplicate URI for IBEG
2024-09-04 13:45:55 +02:00
Riad Abdallah
e755d615fc Remove properties attached to bestuursorgaan in tijd 2024-09-04 11:30:13 +02:00
Riad Abdallah
974a966576 Remove duplicate URI for IBEG 2024-09-03 16:53:40 +02:00
mirdono
78ce1f7071 feat: mandates and functions for governing bodies legislature 2025
For each of the governing bodies created by the migrations in the previous
commit, now add the corresponding mandates and functions.

Within a organisation some governing bodies share the same mandates. For
example, for municipalities the governing body "Burgemeester" and "College van
burgemeester en schepen" both refer to the SAME instance of mandates for
"Burgemeester" and "Aangewezen burgemeester".
To achieve this the some migrations contain a second `INSERT` clause in which
the other governing body that contains the necessary mandates is selected to be
able to determine the correct mandate URI. This only works on two conditions:
1. Migrations that depend on each must be executed in the correct order. For
   example, the migration inserting the mandates for "College van burgemeester
   en schepen" must be executed after that for "Burgemeester". The former will
   reuse mandates created by the latter.
2. The UUID for the shared mandates is calculated in exactly the same way in
   migrations that depend on each other.
2024-09-02 16:44:32 +02:00
mirdono
a647c7ea69 fix: add missing governing bodies for merging OCMWs
The merged OCMWs as imported in #442 were lacking some governing bodies that are
used to relation funcations to. These migration add the missing governing
bodies for these OCMWs.
2024-09-02 16:44:32 +02:00
mirdono
8c1538d45e feat: add migrations for governing bodies 2025
These migrations create the necessary time specialised governing bodies for
municipalities, OCMWs, district and provinces for the next legislature.

The migrations work by creating a new time specialisation, with an appropriate
starting date, for each abstract governing body associated with an active
organisation. For municipalities and OCMWs some instances are explicitly
filtered, these are municipalities (OCMWs) that will be merged with another one
as of 01-01-2025 and therefore will become inactive. The listed
municipalities (OCMWs) are extracted from data provided by business.
2024-09-02 16:44:32 +02:00
mirdono
48cefe143e chore: bump frontend to latest release 2024-08-31 14:57:19 +02:00
mirdono
296f18e41c feat: add new district Borsbeek
The municipality of Borsbeek will merge with the municipality Antwerp as of
01-01-2025. This will result in a new district Borsbeek part of municipality
Antwerp.

This migration adds that new district such that a URI is assigned to it and its
governing bodies are created. The information available at this time is limited
its (legal) name. Other core data, such as identifiers, and further information
such as site addresses will be added later by business.
2024-08-29 12:43:43 +00:00
Boris De Vloed
51dce798bc Merge pull request #446 from lblod/hotfix/ro-classification-public-producer
export representative organ classification
2024-08-27 16:29:39 +02:00
Boris De Vloed
63979c19ab export representative organ classification 2024-08-27 16:03:12 +02:00
mirdono
5da229f198 chore: bump frontend version 2024-08-27 12:47:12 +02:00
mirdono
da5c9fb35b chore: bump frontend to new pre-release 2024-08-26 12:49:47 +02:00
mirdono
53f8de39eb chore: bump frontend 2024-08-26 12:38:50 +02:00
Laurent Deketelaere
d570e94f22 feat: Remove CLB data from the producer 2024-08-26 10:32:25 +00:00
mirdono
c9af936b43 fix: user INSERT DATA instead of INSERT where appropriate 2024-08-26 10:31:49 +00:00
mirdono
b9348a5076 fix: relate sharepoint with organisations and ensure unique prefixes
- The previous version of the migrations lacked the triple actually linking the
  new organisations with the placeholder for SharePoint identifier. This triple
  was now added.
- Ensure the timestamp prefixes are unique by adding 1 second delay in between
  generating each migration.
2024-08-26 10:31:49 +00:00
mirdono
429072dd18 feat: add new merged municipalities and OCMWs
As part of the municipality mergers for 2025, four new municipalities and their
corresponding OCMWs will have new KBO numbers. Consequently, these organizations
need to be fully manually created.

This commit adds the migrations to import the organisations for the merged
municipalities and OCMWs such that their URIs can already be shared among
applications.

The currently imported data concerns:
- core data such as (legal) name, region, status, KBO, and OVO number
- the necessary governing bodies, with as starting date 2025-01-01

The NIS-codes (and associated data) will be added in future migrations when the
NIS2025 update has been released.

Other missing data, such as addresses and contact details, will be added later
on by business.
2024-08-26 10:31:49 +00:00
mirdono
fdd83c93bb feat: migration to import actual VGC
The Vlaamse Gemeenschapscommissie is a special kind of administrative unit, with
its own specific classification code (which was added in a previous commit). The
core data, address, and contact information was provided by the business.

Note: currently the province in the address is intentionally left empty. This
data will be provided (or entered) later by business.
2024-08-26 10:31:22 +00:00
mirdono
e0d945f960 feat: add new classification code Vlaamse gemeenschapscommissie 2024-08-26 10:31:22 +00:00
Boris De Vloed
2478d1dc06 Merge pull request #441 from lblod/hotfix/bump-old-producers
Bump old producers, from 0.15.4 -> 0.15.5
2024-08-23 11:02:14 +02:00
felix
543ce252f8 Bump old producers, from 0.15.4 -> 0.15.5
There was an issue with the old producers not taking into account all
graph filters, thereby exporting sometimes too many triples.

Note: please consider moving these old producers to the latest
one. (It should be a matter of shuffling config around)
2024-08-18 18:51:02 +02:00
Laurent Deketelaere
bc98cf12f9 chore: bump kalliope-api to 2.0.0 2024-07-19 17:10:48 +00:00
mirdono
bfb02afcdf feat: import legal and alternative names for worship services 2024-07-18 14:47:49 +00:00
mirdono
4602842e99 fix: combine merger change events
- add the missing original organisation and matching change event result to one
  merger change event
- remove the superfluous merger change event, except for its reused change event
  result
2024-07-18 13:48:35 +00:00
mirdono
bbcc6928e7 chore: bump frontend 2024-06-24 17:20:13 +02:00
mirdono
399387e301 chore: bump frontend 2024-06-21 18:22:40 +02:00
mirdono
07687f5e35 Merge branch 'master' into development 2024-06-21 18:06:39 +02:00
mirdono
11508cf310 fix: added migration to import the participating municipalities
The original migration to import the participants for public OCMW associations
contained a bug causing it to not match municipalities. More specifically:
- the type triple for municipalities is located in the `shared` graph;
- consequently the `FILTER EXISTS` statements to limit matches to administrative
  units could not succeed for municipalities as the queries are limited to the
  `administrative-unit` graph.

This new migration fixes this problem by changing the `FILTER EXISTS` into a
`FILTER NOT EXISTS` to exclude resourses of type `ext:KboOrganisatie`.
2024-06-21 09:40:50 +00:00
mirdono
43cf1fd323 chore: removed unneeded migration
With the addition of the migration removing relations with `ext:KboOrganisatie`
resources this migration becomes unnecessary.
2024-06-21 09:40:50 +00:00
mirdono
a6b7321cf0 fix: remove org:memberOf triples with KBO organizations as object
The migration importing related organizations for public OCMW associations was
incorrect in that it did not exclude resources of type `ext:KboOrganisatie`
being matched. This migration removes all incorrectly inserted triples.
2024-06-19 13:41:03 +00:00
mirdono
d88adeee15 chore: bump construct-organization-relationship-service 2024-06-14 13:18:58 +00:00
mirdono
155162eb45 feat: added classification code for associations and corporations 2024-06-14 13:18:58 +00:00
mirdono
592b728611 Merge branch 'master' into development 2024-06-12 11:13:20 +02:00
mirdono
0ab1b278d5 chore: bump frontend 2024-06-12 11:04:03 +02:00
mirdono
f562d711f9 fix: corrected typo in search configuration 2024-06-10 14:17:09 +02:00
mirdono
1420b1a3e8 Merge branch 'development' 2024-06-10 12:33:17 +02:00
mirdono
b9fabc764f chore: bump frontend 2024-06-10 12:30:14 +02:00
Laurent Deketelaere
9db9d86609 Merge pull request #433 from lblod/fix/disable-kbo-organizations-cache
Disable cache on `/kbo-organizations/*`
2024-06-07 12:23:55 +02:00
Laurent Deketelaere
826a9cdf08 fix: Disable cache on /kbo-organizations/* 2024-06-07 11:39:55 +02:00
Laurent Deketelaere
d57eb0c20c Merge pull request #432 from lblod/fix/cache-organizations-route
Fix cache organizations route
2024-06-07 10:08:51 +02:00
Laurent Deketelaere
e6111fffff feat: Enable cache on domaine doutes 2024-06-06 15:40:20 +02:00
Laurent Deketelaere
cdb9bdb803 chore: Bump mu-cl-resources to 1.24.0 2024-06-06 15:31:51 +02:00
Laurent Deketelaere
73492d0217 Merge branch 'master' into development 2024-06-06 10:19:51 +02:00
Laurent Deketelaere
bc9e827703 Merge pull request #431 from lblod/fix/delete-duplicate-organization-identifier
Delete duplicate identifier on organization
2024-06-06 08:57:37 +02:00
Laurent Deketelaere
97361f7f48 fix: Add migration to delete duplicate identifier 2024-06-05 08:38:22 +02:00
mirdono
e76f9c1a2e chore: bumped relationship service version 2024-06-03 07:48:41 +00:00
mirdono
3938191666 refactor: updated docker compose to new service name 2024-06-03 07:48:41 +00:00
mirdono
681fa0ce0a refactor: updated dispatcher to new service name 2024-06-03 07:48:41 +00:00
mirdono
b4b599d091 feat: add recently onboarded organisations to producers
* `organizations` and `organizations-public-info`
- Add the new type of registered organisations to the export configuration

* `public`
- Use a migration to add the classification codes of all recently onboarded
  classes of organisations to the `concept-scheme` used by the producer. These
  were not added during the initial onboarding:
  This includes:
  + public OCMW associations
    - Welzijnsvereniging
    - Autonome verzorgingsinstelling
  + private OCMW associations
    - Ziekenhuisvereniging
    - Vereniging of vennootschap voor sociale dienstverlening
    - Woonzorgvereniging of woonzorgvennootschap
  + PEVAs
    - PEVA gemeente
    - PEVA province
- Add the new type of registered organisations to the export configuration
2024-05-24 14:56:32 +00:00
mirdono
fd0a417ad1 fix: exclude KBO organisations as participants
The initial version of the migration to import related organisations only
matched based on KBO numbers. This risks including resources from the type
`ext:KboOrganisatie` as participants. The migration was regenerated including an
additional `FILTER` to exclude organisations of that type from matching.
2024-05-24 14:56:32 +00:00
mirdono
cd2ee5bea3 feat: added participants for private OCMW associations 2024-05-24 14:56:32 +00:00
mirdono
a94bb7f7e2 fix: regenerated migrations after business data update 2024-05-24 14:56:32 +00:00
mirdono
b9be63f193 fix: corrected the provinces in the address import 2024-05-24 14:56:32 +00:00
mirdono
4b45093572 feat: import contact details for private ocmw associations 2024-05-24 14:56:32 +00:00
mirdono
6c7e5428dc feat: import addresses for private ocmw associations 2024-05-24 14:56:32 +00:00
mirdono
29f0b3e9a1 feat: import core data for private ocmw associations 2024-05-24 14:56:32 +00:00
mirdono
a3dff637e3 fix: exclude KBO organisations as participants
The initial version of the migration to import related organisations only
matched based on KBO numbers. This risks including resources from the type
`ext:KboOrganisatie` as participants. The migration was regenerated including an
additional `FILTER` to exclude organisations of that type from matching.
2024-05-24 14:52:46 +00:00
mirdono
71b21e4716 feat: added participants for private OCMW associations 2024-05-24 14:52:46 +00:00
mirdono
d49ebea0bd fix: regenerated migrations after business data update 2024-05-24 14:52:46 +00:00
mirdono
d35b9fc3a1 fix: corrected the provinces in the address import 2024-05-24 14:52:46 +00:00
mirdono
80a503c132 feat: import contact details for private ocmw associations 2024-05-24 14:52:46 +00:00
mirdono
a0400563da feat: import addresses for private ocmw associations 2024-05-24 14:52:46 +00:00
mirdono
369a2ad483 feat: import core data for private ocmw associations 2024-05-24 14:52:46 +00:00
mirdono
660c9b6848 fix: exclude KBO organisations as participants
The initial version of these migrations were defined too broadly. Since they
only matched on KBO numbers they also included the KBO organisations, imported
from wegwijs, adding them as participants.

This commit adds extra checks to exclude KBO organisations from being added as a
participant for a public OCMW association. Furthermore, the main migration is
split into two parts to work around an error otherwise encountered when
executing the migration as a single whole.
2024-05-22 12:29:06 +00:00
mirdono
bf77794d08 fix: removed faulty trailing comma 2024-05-22 12:22:50 +00:00
mirdono
994c26b58d feat: added paths for registered organizations 2024-05-22 12:22:50 +00:00
mirdono
dd3cbc16e8 feat: added registered organization classification codes 2024-05-22 12:22:50 +00:00
mirdono
89435073c7 feat: include registered organizations in search index 2024-05-22 12:22:50 +00:00
mirdono
5ff3f5b121 feat: added registered organizations to resources service 2024-05-22 12:22:50 +00:00
mirdono
288bf42aa3 feat: import participants for public OCMW associations 2024-05-22 07:39:49 +00:00
mirdono
178f5c17e6 refactor: dispatch requests on organization path to resources service
Forwarding requests on the organizations path to the cache leads to issues were
changes that the user just made are not shown. For example, when adding a
related organization the newly added organization would not show up in the list
unless the cache was restarted.
2024-05-16 15:03:54 +00:00
mirdono
d28cb221da refactor: renamed units index to organizations
Soon we want to introduce (additional) non-administrative unit
organizations. This renaming makes it more clear this index is not limited to
administrative units, both here as where it is used in the frontend. Note,
technically the 'units' name was already incorrect as a 'Representatief orgaan'
is not an administrative unit.
2024-05-16 15:03:54 +00:00
mirdono
8423d24230 refactor: moved classification relation to organization 2024-05-16 15:03:54 +00:00
257 changed files with 70500 additions and 1865 deletions

6
.gitignore vendored
View File

@@ -29,9 +29,11 @@ DS_STORE
/config/proxy-https/cert.pem
/config/proxy-https/key.pem
# Kalliope config files
source.json
out.json
security.yml
output.json
security.json
config/proxy-https/proxy_ssl.conf
/config/search/update-handler.store
/config/search/dev/update-handler.store

223
CHANGELOG.md Normal file
View File

@@ -0,0 +1,223 @@
# Changelog
## 1.29.2 (2025-02-17)
### Data fix
- restore bestrokken lokale besturen that have been accidentally flushed [OP-3546]
## 1.29.1 (2025-02-14)
### Backend
- re-init `worship-services-sensitive-consumer` [OP-3483]
### Deploy notes
:warning: Ensure first loket did a full re-sync again of this delta-stream.
```
drc stop worship-services-main-info-consumer worship-services-private-info-consumer
drc retart migrations
```
Update `docker-compose.override.yml` to remove the config of the consumers and replace it by:
```
worship-services-main-info-consumer:
environment:
DCR_SYNC_BASE_URL: "https://loket.lblod.info" # or another endpoint
DCR_SYNC_LOGIN_ENDPOINT: "https://loket.lblod.info/sync/worship-services-sensitive/login" # or another endpoint
DCR_SECRET_KEY: "key-of-the-producer"
DCR_LANDING_ZONE_DATABASE: "triplestore" # for the initial sync, we go directly to virtuoso
DCR_REMAPPING_DATABASE: "triplestore" # for the initial sync, we go directly to virtuoso
DCR_DISABLE_INITIAL_SYNC: "false"
DCR_DISABLE_DELTA_INGEST: "false"
worship-services-private-info-consumer:
environment:
DCR_SYNC_BASE_URL: "https://loket.lblod.info" # or another endpoint
DCR_SYNC_LOGIN_ENDPOINT: "https://loket.lblod.info/sync/worship-services-sensitive/login" # or another endpoint
DCR_SECRET_KEY: "key-of-the-producer"
DCR_LANDING_ZONE_DATABASE: "triplestore" # for the initial sync, we go directly to virtuoso
DCR_REMAPPING_DATABASE: "triplestore" # for the initial sync, we go directly to virtuoso
DCR_DISABLE_INITIAL_SYNC: "false"
DCR_DISABLE_DELTA_INGEST: "false"
```
Then
```
drc up -d db mandatarissen-consumer leidinggevenden-consumer worship-services-main-info-consumer worship-services-private-info-consumer
# Wait until success of the previous step
```
Then, update `docker-compose.override.yml` to:
```
worship-services-main-info-consumer:
environment:
DCR_SYNC_BASE_URL: "https://loket.lblod.info" # or another endpoint
DCR_SYNC_LOGIN_ENDPOINT: "https://loket.lblod.info/sync/worship-services-sensitive/login" # or another endpoint
DCR_SECRET_KEY: "key-of-the-producer"
DCR_LANDING_ZONE_DATABASE: "db"
DCR_REMAPPING_DATABASE: "db"
DCR_DISABLE_DELTA_INGEST: "false"
DCR_DISABLE_INITIAL_SYNC: "false"
worship-services-private-info-consumer:
environment:
DCR_SYNC_BASE_URL: "https://loket.lblod.info" # or another endpoint
DCR_SYNC_LOGIN_ENDPOINT: "https://loket.lblod.info/sync/worship-services-sensitive/login" # or another endpoint
DCR_SECRET_KEY: "key-of-the-producer"
DCR_LANDING_ZONE_DATABASE: "database"
DCR_REMAPPING_DATABASE: "database"
DCR_DISABLE_DELTA_INGEST: "false"
DCR_DISABLE_INITIAL_SYNC: "false"
```
```
drc up -d
sh scripts/reset-elastic.sh
```
## 1.29.0 (2025-02-07)
### Backend
#### Consumer
- Upgraded `mandatarissen-consumer` [OP-3510]
- Upgraded `leidinggevenden-consumer` [OP-3533], [OP-3511]
- Upgraded `worship-services-sensitive-consumer` [OP-3337]
### Deploy notes
```
drc down;
```
Update `docker-compose.override.yml` to remove the config of the consumers and replace it by:
```
mandatarissen-consumer:
environment:
DCR_SYNC_BASE_URL: "https://loket.lblod.info" # or another endpoint
DCR_LANDING_ZONE_DATABASE: "triplestore" # for the initial sync, we go directly to virtuoso
DCR_REMAPPING_DATABASE: "triplestore" # for the initial sync, we go directly to virtuoso
DCR_DISABLE_DELTA_INGEST: "false"
DCR_DISABLE_INITIAL_SYNC: "false"
leidinggevenden-consumer:
environment:
DCR_SYNC_BASE_URL: "https://loket.lblod.info" # or another endpoint
DCR_LANDING_ZONE_DATABASE: "triplestore" # for the initial sync, we go directly to virtuoso
DCR_REMAPPING_DATABASE: "triplestore" # for the initial sync, we go directly to virtuoso
DCR_DISABLE_DELTA_INGEST: "false"
DCR_DISABLE_INITIAL_SYNC: "false"
worship-services-main-info-consumer:
environment:
DCR_SYNC_BASE_URL: "https://loket.lblod.info" # or another endpoint
DCR_SYNC_LOGIN_ENDPOINT: "https://loket.lblod.info/sync/worship-services-sensitive/login" # or another endpoint
DCR_SECRET_KEY: "key-of-the-producer"
DCR_LANDING_ZONE_DATABASE: "triplestore" # for the initial sync, we go directly to virtuoso
DCR_REMAPPING_DATABASE: "triplestore" # for the initial sync, we go directly to virtuoso
DCR_DISABLE_INITIAL_SYNC: "false"
DCR_DISABLE_DELTA_INGEST: "false"
worship-services-private-info-consumer:
environment:
DCR_SYNC_BASE_URL: "https://loket.lblod.info" # or another endpoint
DCR_SYNC_LOGIN_ENDPOINT: "https://loket.lblod.info/sync/worship-services-sensitive/login" # or another endpoint
DCR_SECRET_KEY: "key-of-the-producer"
DCR_LANDING_ZONE_DATABASE: "triplestore" # for the initial sync, we go directly to virtuoso
DCR_REMAPPING_DATABASE: "triplestore" # for the initial sync, we go directly to virtuoso
DCR_DISABLE_INITIAL_SYNC: "false"
DCR_DISABLE_DELTA_INGEST: "false"
```
Then:
```
drc up -d triplestore migrations
drc up -d db mandatarissen-consumer leidinggevenden-consumer worship-services-main-info-consumer worship-services-private-info-consumer
# Wait until success of the previous step
```
Then, update `docker-compose.override.yml` to:
```
mandatarissen-consumer:
environment:
DCR_SYNC_BASE_URL: "https://loket.lblod.info" # or another endpoint
DCR_LANDING_ZONE_DATABASE: "db"
DCR_REMAPPING_DATABASE: "db"
DCR_DISABLE_DELTA_INGEST: "false"
DCR_DISABLE_INITIAL_SYNC: "false"
leidinggevenden-consumer:
environment:
DCR_SYNC_BASE_URL: "https://loket.lblod.info" # choose the correct endpoint
DCR_LANDING_ZONE_DATABASE: "db"
DCR_REMAPPING_DATABASE: "db"
DCR_DISABLE_DELTA_INGEST: "false"
DCR_DISABLE_INITIAL_SYNC: "false"
worship-services-main-info-consumer:
environment:
DCR_SYNC_BASE_URL: "https://loket.lblod.info" # or another endpoint
DCR_SYNC_LOGIN_ENDPOINT: "https://loket.lblod.info/sync/worship-services-sensitive/login" # or another endpoint
DCR_SECRET_KEY: "key-of-the-producer"
DCR_LANDING_ZONE_DATABASE: "db"
DCR_REMAPPING_DATABASE: "db"
DCR_DISABLE_DELTA_INGEST: "false"
DCR_DISABLE_INITIAL_SYNC: "false"
worship-services-private-info-consumer:
environment:
DCR_SYNC_BASE_URL: "https://loket.lblod.info" # or another endpoint
DCR_SYNC_LOGIN_ENDPOINT: "https://loket.lblod.info/sync/worship-services-sensitive/login" # or another endpoint
DCR_SECRET_KEY: "key-of-the-producer"
DCR_LANDING_ZONE_DATABASE: "database"
DCR_REMAPPING_DATABASE: "database"
DCR_DISABLE_DELTA_INGEST: "false"
DCR_DISABLE_INITIAL_SYNC: "false"
```
```
drc up -d
sh scripts/reset-elastic.sh
```
## 1.28.5 (2025-01-23)
### Frontend
- Bump to [v1.28.3](https://github.com/lblod/frontend-organization-portal/releases/tag/v1.28.3)
### Backend
- Datafix: correct merger change events for worship organisations (OP-3534)
- Avoid municipality filter to include partial matches (OP-3509)
### Deploy notes
- `drc restart migrations-triggering-indexing; drc logs -ft --tail=200 migrations-triggering-indexing`
- `drc pull frontend; drc up -d frontend`
- Perform a full re-index by executing `./scripts/reset-elastic.sh`
## 1.28.4 (2025-01-16)
### Backend
#### Data
- Performance fix on 1.28.3 [DL-6377]
### Deploy commands
```
drc restart migrations
drc exec delta-producer-background-jobs-initiator curl -X POST http://localhost/public/healing-jobs # or wait for the healing to kick in
```
## 1.28.3 (2025-01-16)
### Backend
#### Data
- Datafix. Fusiegemeentes had different bestuursfuncties attached to OCMW and Gemeente. [DL-6377]
However, business-rule-wise, these bestuursfuncties are shared.
### Deploy commands
```
drc restart migrations
drc exec delta-producer-background-jobs-initiator curl -X POST http://localhost/public/healing-jobs # or wait for the healing to kick in
```
## 1.28.2 (2025-01-13)
### Backend
- Added "Opdrachthoudende vereniging met private deelname" in delta public (DL-6368)
### Deploy commands
```
drc restart migrations
drc exec delta-producer-background-jobs-initiator curl -X POST http://localhost/public/healing-jobs # or wait for the healing to kick in
```
## 1.28.1 (2025-01-11)
### Backend
- Import 2025 NIS codes and update werkingsgebieden (OP-3342)
- Add merger change events for merged police zones (OP-3454)
- Delete local involvements for worship services (OP-3501, OP-3512)
- Move link between new municipalities and province to shared graph (OP-3513, OP-3514)
### Deploy notes
- Restart both migration services
#### Docker commands
- `drc restart migrations; drc logs -ft --tail=200 migrations`
- `drc restart migrations-triggering-indexing; drc logs -ft --tail=200 migrations-triggering-indexing`
## 1.28.0 (2025-01-02)
### Backend
- Bump frontend to `v1.28.0`
- Add end date for governing bodies for municipalities and OCMWs and update status (OP-3348)
- Update municipality and province name in organisation's addresses (OP-3410)
- Add merger change events for merged municipalities and OCMWs (OP-3412)
- Updates names for merged municipalities and OCMWs (OP-3456)
### Deploy notes
- Restart both migration services
- Bump frontend
#### Docker commands
- `drc restart migrations; drc logs -ft --tail=200 migrations`
- `drc restart migrations-triggering-indexing; drc logs -ft --tail=200 migrations-triggering-indexing`
- `drc pull frontend; drc up -d frontend`

139
README.md
View File

@@ -11,6 +11,145 @@ Backend for the organization portal application, based on the mu.semte.ch micros
You can shut down using `docker-compose stop` and remove everything using `docker-compose rm`.
#### Setup consumers
The application depends on external data. You'll have to perform extra steps if you want this data to be available.
These are multiple data sets, we'll try to be exhaustive on how to ingest these. Even though the procedures are similar.
#### Setup mandatarissen sync
Note: this is assuming you have never ran this before.
```
drc down;
```
Update `docker-compose.override.yml` to:
```
mandatarissen-consumer:
environment:
DCR_SYNC_BASE_URL: "https://loket.lokaalbestuur.vlaanderen.be" # or another endpoint
DCR_LANDING_ZONE_DATABASE: "triplestore"
DCR_REMAPPING_DATABASE: "triplestore"
DCR_DISABLE_DELTA_INGEST: "false"
DCR_DISABLE_INITIAL_SYNC: "false"
```
Then:
```
drc up -d migrations
drc up -d db mandatarissen-consumer
# Wait until success of the previous step
```
Then, update `docker-compose.override.yml` to:
```
mandatarissen-consumer:
environment:
DCR_SYNC_BASE_URL: "https://loket.lokaalbestuur.vlaanderen.be" # or another endpoint
DCR_LANDING_ZONE_DATABASE: "db"
DCR_REMAPPING_DATABASE: "db"
DCR_DISABLE_DELTA_INGEST: "false"
DCR_DISABLE_INITIAL_SYNC: "false"
```
Finally, put the stack back up and reindex elasticsearch
```
drc up -d
sh scripts/reset-elastic.sh
```
#### Setup leidinggevenden sync (http://data.lblod.info/vocabularies/leidinggevenden/Functionaris)
Note: this is assuming you have never ran this before.
```
drc down;
```
Update `docker-compose.override.yml` to:
```
leidinggevenden-consumer:
environment:
DCR_SYNC_BASE_URL: "https://loket.lokaalbestuur.vlaanderen.be" # or another endpoint
DCR_LANDING_ZONE_DATABASE: "triplestore" # for the initial sync, we go directly to virtuoso
DCR_REMAPPING_DATABASE: "triplestore" # for the initial sync, we go directly to virtuoso
DCR_DISABLE_DELTA_INGEST: "false"
DCR_DISABLE_INITIAL_SYNC: "false"
```
Then:
```
drc up -d migrations
drc up -d db leidinggevenden-consumer
# Wait until success of the previous step
```
Then, update `docker-compose.override.yml` to:
```
leidinggevenden-consumer:
environment:
DCR_SYNC_BASE_URL: "https://loket.lokaalbestuur.vlaanderen.be" # choose the correct endpoint
DCR_LANDING_ZONE_DATABASE: "db"
DCR_REMAPPING_DATABASE: "db"
DCR_DISABLE_DELTA_INGEST: "false"
DCR_DISABLE_INITIAL_SYNC: "false"
```
Finally, put the stack back up and reindex elasticsearch
```
drc up -d
sh scripts/reset-elastic.sh
```
#### Setup worship mandatees sync
Note: this is assuming you have never ran this before.
```
drc down;
```
Update `docker-compose.override.yml` to:
```
worship-services-main-info-consumer:
environment:
DCR_SYNC_BASE_URL: "https://loket.lokaalbestuur.vlaanderen.be" # or another endpoint
DCR_SYNC_LOGIN_ENDPOINT: "https://loket.lokaalbestuur.vlaanderen.be/sync/worship-services-sensitive/login" # or another endpoint
DCR_SECRET_KEY: "key-of-the-producer"
DCR_LANDING_ZONE_DATABASE: "triplestore"
DCR_REMAPPING_DATABASE: "triplestore"
DCR_DISABLE_DELTA_INGEST: "false"
DCR_DISABLE_INITIAL_SYNC: "false"
worship-services-private-info-consumer:
environment:
DCR_SYNC_BASE_URL: "https://loket.lokaalbestuur.vlaanderen.be" # or another endpoint
DCR_SYNC_LOGIN_ENDPOINT: "https://loket.lokaalbestuur.vlaanderen.be/sync/worship-services-sensitive/login" # or another endpoint
DCR_SECRET_KEY: "key-of-the-producer"
DCR_LANDING_ZONE_DATABASE: "triplestore"
DCR_REMAPPING_DATABASE: "triplestore"
DCR_DISABLE_DELTA_INGEST: "false"
DCR_DISABLE_INITIAL_SYNC: "false"
```
Then:
```
drc up -d migrations
drc up -d db worship-services-main-info-consumer worship-services-private-info-consumer
# Wait until success of the previous step
```
Then, update `docker-compose.override.yml` to:
```
worship-services-main-info-consumer:
environment:
DCR_SYNC_BASE_URL: "https://loket.lokaalbestuur.vlaanderen.be" # or another endpoint
DCR_SYNC_LOGIN_ENDPOINT: "https://loket.lokaalbestuur.vlaanderen.be/sync/worship-services-sensitive/login" # or another endpoint
DCR_SECRET_KEY: "key-of-the-producer"
DCR_LANDING_ZONE_DATABASE: "db"
DCR_REMAPPING_DATABASE: "db"
DCR_DISABLE_DELTA_INGEST: "false"
DCR_DISABLE_INITIAL_SYNC: "false"
worship-services-private-info-consumer:
environment:
DCR_SYNC_BASE_URL: "https://loket.lokaalbestuur.vlaanderen.be" # or another endpoint
DCR_SYNC_LOGIN_ENDPOINT: "https://loket.lokaalbestuur.vlaanderen.be/sync/worship-services-sensitive/login" # or another endpoint
DCR_SECRET_KEY: "key-of-the-producer"
DCR_LANDING_ZONE_DATABASE: "db"
DCR_REMAPPING_DATABASE: "db"
DCR_DISABLE_DELTA_INGEST: "false"
DCR_DISABLE_INITIAL_SYNC: "false"
```
Finally, put the stack back up and reindex elasticsearch
```
drc up -d
sh scripts/reset-elastic.sh
```
### Setting up the delta-producers related services
To make sure the app can share data, producers need to be set up. There is an intial sync, that is potentially very expensive, and must be started manually

View File

@@ -40,6 +40,7 @@ defmodule Acl.UserGroups.Config do
"http://lblod.data.gift/vocabularies/organisatie/BestuursorgaanClassificatieCode",
"http://lblod.data.gift/vocabularies/organisatie/MandatarisStatusCode",
"http://lblod.data.gift/vocabularies/organisatie/BestuurseenheidClassificatieCode",
"http://mu.semte.ch/vocabularies/ext/GeregistreerdeOrganisatieClassificatieCode",
"http://lblod.data.gift/vocabularies/organisatie/TypeEredienst",
"http://www.w3.org/2004/02/skos/core#ConceptScheme",
"http://lblod.data.gift/vocabularies/organisatie/BedienaarFinancieringCode",

View File

@@ -1,12 +1,42 @@
[
{
"name": "organizations",
"jobsGraph": "http://mu.semte.ch/graphs/jobs",
"dumpFileCreationJobOperation": "http://redpencil.data.gift/id/jobs/concept/JobOperation/deltas/deltaDumpFileCreation/organizations",
"initialPublicationGraphSyncJobOperation": "http://redpencil.data.gift/id/jobs/concept/JobOperation/deltas/initialPublicationGraphSyncing/organizations",
"healingJobOperation": "http://redpencil.data.gift/id/jobs/concept/JobOperation/deltas/healingOperation/organizations",
"cronPatternDumpJob": "42 * * * *",
"cronPatternHealingJob": "0 0 4 * * *",
"startInitialSync": true
}
]
{
"name": "organizations",
"jobsGraph": "http://mu.semte.ch/graphs/jobs",
"dumpFileCreationJobOperation": "http://redpencil.data.gift/id/jobs/concept/JobOperation/deltas/deltaDumpFileCreation/organizations",
"initialPublicationGraphSyncJobOperation": "http://redpencil.data.gift/id/jobs/concept/JobOperation/deltas/initialPublicationGraphSyncing/organizations",
"healingJobOperation": "http://redpencil.data.gift/id/jobs/concept/JobOperation/deltas/healingOperation/organizations",
"cronPatternDumpJob": "42 * * * *",
"cronPatternHealingJob": "0 0 4 * * *",
"startInitialSync": true
},
{
"name": "public",
"jobsGraph": "http://mu.semte.ch/graphs/jobs",
"dumpFileCreationJobOperation": "http://redpencil.data.gift/id/jobs/concept/JobOperation/deltas/deltaDumpFileCreation/public",
"initialPublicationGraphSyncJobOperation": "http://redpencil.data.gift/id/jobs/concept/JobOperation/deltas/initialPublicationGraphSyncing/public",
"healingJobOperation": "http://redpencil.data.gift/id/jobs/concept/JobOperation/deltas/healingOperation/public",
"cronPatternDumpJob": "11 */4 * * *",
"cronPatternHealingJob": "0 0 4 * * *",
"startInitialSync": true
},
{
"name": "organizations-public-info",
"jobsGraph": "http://mu.semte.ch/graphs/jobs",
"dumpFileCreationJobOperation": "http://redpencil.data.gift/id/jobs/concept/JobOperation/deltas/deltaDumpFileCreation/organizations-public-info",
"initialPublicationGraphSyncJobOperation": "http://redpencil.data.gift/id/jobs/concept/JobOperation/deltas/initialPublicationGraphSyncing/organizations-public-info",
"healingJobOperation": "http://redpencil.data.gift/id/jobs/concept/JobOperation/deltas/healingOperation/organizations-public-info",
"cronPatternDumpJob": "27 */4 * * *",
"cronPatternHealingJob": "0 0 4 * * *",
"startInitialSync": true
},
{
"name": "worship-posts",
"jobsGraph": "http://mu.semte.ch/graphs/jobs",
"dumpFileCreationJobOperation": "http://redpencil.data.gift/id/jobs/concept/JobOperation/deltas/deltaDumpFileCreation/worship-posts",
"initialPublicationGraphSyncJobOperation": "http://redpencil.data.gift/id/jobs/concept/JobOperation/deltas/initialPublicationGraphSyncing/worship-posts",
"healingJobOperation": "http://redpencil.data.gift/id/jobs/concept/JobOperation/deltas/healingOperation/worship-posts",
"cronPatternDumpJob": "17 */4 * * *",
"cronPatternHealingJob": "0 0 3 * * *",
"startInitialSync": true
}
]

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

@@ -15,8 +15,6 @@
"http://www.w3.org/ns/regorg#legalName",
"http://www.w3.org/ns/adms#identifier",
"http://www.w3.org/ns/regorg#orgStatus",
"http://www.w3.org/ns/org#hasPrimarySite",
"http://www.w3.org/ns/org#hasSite",
"http://www.w3.org/ns/org#changedBy",
"http://www.w3.org/ns/org#resultedFrom",
"http://www.w3.org/ns/org#hasPost",
@@ -43,8 +41,6 @@
"http://www.w3.org/ns/regorg#legalName",
"http://www.w3.org/ns/adms#identifier",
"http://www.w3.org/ns/regorg#orgStatus",
"http://www.w3.org/ns/org#hasPrimarySite",
"http://www.w3.org/ns/org#hasSite",
"http://www.w3.org/ns/org#changedBy",
"http://www.w3.org/ns/org#resultedFrom",
"http://www.w3.org/ns/org#hasPost",
@@ -79,8 +75,6 @@
"http://www.w3.org/ns/org#changedBy",
"http://www.w3.org/ns/org#classification",
"http://www.w3.org/ns/org#hasPost",
"http://www.w3.org/ns/org#hasPrimarySite",
"http://www.w3.org/ns/org#hasSite",
"http://www.w3.org/ns/org#hasSubOrganization",
"http://www.w3.org/ns/org#linkedTo",
"http://www.w3.org/ns/org#resultedFrom",
@@ -100,6 +94,7 @@
"http://www.w3.org/2004/02/skos/core#prefLabel",
"http://www.w3.org/ns/org#linkedTo",
"http://data.lblod.info/vocabularies/erediensten/typeEredienst",
"http://www.w3.org/ns/org#classification",
"http://www.w3.org/ns/adms#identifier",
"http://www.w3.org/ns/regorg#legalName",
"http://www.w3.org/2004/02/skos/core#altLabel",
@@ -107,6 +102,32 @@
"http://www.w3.org/ns/org#hasSite"
]
},
{
"type": "http://www.w3.org/ns/regorg#RegisteredOrganization",
"strictTypeExport": "true",
"graphsFilter": ["http://mu.semte.ch/graphs/administrative-unit"],
"properties": [
"http://mu.semte.ch/vocabularies/core/uuid",
"http://data.vlaanderen.be/ns/besluit#werkingsgebied",
"http://www.opengis.net/ont/geosparql#sfWithin",
"http://www.w3.org/2002/07/owl#sameAs",
"http://www.w3.org/2004/02/skos/core#altLabel",
"http://www.w3.org/2004/02/skos/core#prefLabel",
"http://www.w3.org/ns/regorg#legalName",
"http://www.w3.org/ns/adms#identifier",
"http://www.w3.org/ns/org#changedBy",
"http://www.w3.org/ns/org#classification",
"http://www.w3.org/ns/org#hasPost",
"http://www.w3.org/ns/org#hasPrimarySite",
"http://www.w3.org/ns/org#hasSite",
"http://www.w3.org/ns/org#hasSubOrganization",
"http://www.w3.org/ns/org#linkedTo",
"http://www.w3.org/ns/org#resultedFrom",
"http://www.w3.org/ns/regorg#orgStatus",
"https://data.lblod.info/vocabularies/generiek/geplandeEindDatum",
"http://www.w3.org/ns/org#purpose"
]
},
{
"type": "http://data.lblod.info/vocabularies/erediensten/BetrokkenLokaleBesturen",
"graphsFilter": [
@@ -132,59 +153,6 @@
"http://data.lblod.info/vocabularies/erediensten/functie"
]
},
{
"type": "http://www.w3.org/ns/org#Site",
"graphsFilter": [
"http://mu.semte.ch/graphs/shared",
"http://mu.semte.ch/graphs/worship-service",
"http://mu.semte.ch/graphs/administrative-unit"
],
"properties": [
"http://mu.semte.ch/vocabularies/core/uuid",
"http://www.w3.org/ns/org#siteAddress",
"https://data.vlaanderen.be/ns/organisatie#bestaatUit",
"http://data.lblod.info/vocabularies/erediensten/vestigingstype"
]
},
{
"type": "http://www.w3.org/ns/locn#Address",
"graphsFilter": [
"http://mu.semte.ch/graphs/shared",
"http://mu.semte.ch/graphs/worship-service",
"http://mu.semte.ch/graphs/administrative-unit"
],
"properties": [
"http://mu.semte.ch/vocabularies/core/uuid",
"https://data.vlaanderen.be/ns/adres#Adresvoorstelling.huisnummer",
"https://data.vlaanderen.be/ns/adres#Adresvoorstelling.busnummer",
"http://www.w3.org/ns/locn#thoroughfare",
"http://www.w3.org/ns/locn#postCode",
"https://data.vlaanderen.be/ns/adres#gemeentenaam",
"http://www.w3.org/ns/locn#adminUnitL2",
"https://data.vlaanderen.be/ns/adres#land",
"http://www.w3.org/ns/locn#fullAddress",
"https://data.vlaanderen.be/ns/adres#verwijstNaar",
"http://purl.org/dc/terms/source"
]
},
{
"type": "http://schema.org/ContactPoint",
"graphsFilter": [
"http://mu.semte.ch/graphs/shared",
"http://mu.semte.ch/graphs/worship-service",
"http://mu.semte.ch/graphs/administrative-unit"
],
"properties": [
"http://mu.semte.ch/vocabularies/core/uuid",
"http://www.w3.org/ns/locn#address",
"http://xmlns.com/foaf/0.1/page",
"http://schema.org/faxNumber",
"http://schema.org/contactType",
"http://xmlns.com/foaf/0.1/page",
"http://schema.org/email",
"http://schema.org/telephone"
]
},
{
"type": "http://www.w3.org/ns/adms#Identifier",
"graphsFilter": [
@@ -200,9 +168,7 @@
},
{
"type": "http://www.w3.org/ns/adms#Identifier",
"graphsFilter": [
"http://mu.semte.ch/graphs/worship-service"
],
"graphsFilter": ["http://mu.semte.ch/graphs/worship-service"],
"properties": [
"http://mu.semte.ch/vocabularies/core/uuid",
"http://www.w3.org/2004/02/skos/core#notation",
@@ -224,9 +190,7 @@
},
{
"type": "https://data.vlaanderen.be/ns/generiek#GestructureerdeIdentificator",
"graphsFilter": [
"http://mu.semte.ch/graphs/worship-service"
],
"graphsFilter": ["http://mu.semte.ch/graphs/worship-service"],
"properties": [
"http://mu.semte.ch/vocabularies/core/uuid",
"https://data.vlaanderen.be/ns/generiek#lokaleIdentificator"
@@ -235,6 +199,14 @@
},
{
"type": "http://lblod.data.gift/vocabularies/organisatie/BestuurseenheidClassificatieCode",
"graphsFilter": ["http://mu.semte.ch/graphs/public"],
"properties": [
"http://mu.semte.ch/vocabularies/core/uuid",
"http://www.w3.org/2004/02/skos/core#prefLabel"
]
},
{
"type": "http://mu.semte.ch/vocabularies/ext/RepresentatiefOrgaanClassificatieCode",
"graphsFilter": [
"http://mu.semte.ch/graphs/public"
],
@@ -262,9 +234,7 @@
},
{
"type": "http://lblod.data.gift/vocabularies/organisatie/TypeEredienst",
"graphsFilter": [
"http://mu.semte.ch/graphs/public"
],
"graphsFilter": ["http://mu.semte.ch/graphs/public"],
"properties": [
"http://mu.semte.ch/vocabularies/core/uuid",
"http://www.w3.org/2004/02/skos/core#prefLabel"
@@ -272,9 +242,7 @@
},
{
"type": "http://lblod.data.gift/vocabularies/organisatie/BestuursorgaanClassificatieCode",
"graphsFilter": [
"http://mu.semte.ch/graphs/public"
],
"graphsFilter": ["http://mu.semte.ch/graphs/public"],
"properties": [
"http://mu.semte.ch/vocabularies/core/uuid",
"http://www.w3.org/2004/02/skos/core#prefLabel"
@@ -302,9 +270,7 @@
},
{
"type": "http://lblod.data.gift/vocabularies/organisatie/Veranderingsgebeurtenis",
"graphsFilter": [
"http://mu.semte.ch/graphs/public"
],
"graphsFilter": ["http://mu.semte.ch/graphs/public"],
"properties": [
"http://mu.semte.ch/vocabularies/core/uuid",
"http://www.w3.org/2004/02/skos/core#prefLabel"
@@ -312,9 +278,7 @@
},
{
"type": "http://lblod.data.gift/vocabularies/organisatie/OrganisatieStatusCode",
"graphsFilter": [
"http://mu.semte.ch/graphs/public"
],
"graphsFilter": ["http://mu.semte.ch/graphs/public"],
"properties": [
"http://mu.semte.ch/vocabularies/core/uuid",
"http://www.w3.org/2004/02/skos/core#prefLabel"
@@ -322,9 +286,7 @@
},
{
"type": "http://lblod.data.gift/vocabularies/organisatie/TypeVestiging",
"graphsFilter": [
"http://mu.semte.ch/graphs/public"
],
"graphsFilter": ["http://mu.semte.ch/graphs/public"],
"properties": [
"http://mu.semte.ch/vocabularies/core/uuid",
"http://www.w3.org/2004/02/skos/core#prefLabel"
@@ -357,12 +319,8 @@
},
{
"type": "http://www.w3.org/2004/02/skos/core#Concept",
"graphsFilter": [
"http://mu.semte.ch/graphs/public"
],
"pathToConceptScheme": [
"http://www.w3.org/2004/02/skos/core#inScheme"
],
"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/ns/org#role",
@@ -377,4 +335,4 @@
]
}
]
}
}

View File

@@ -228,7 +228,36 @@
"http://www.w3.org/ns/org#hasPost",
"http://www.w3.org/ns/org#linkedTo",
"http://www.w3.org/ns/org#hasSubOrganization",
"http://data.lblod.info/vocabularies/erediensten/typeEredienst"
"http://data.lblod.info/vocabularies/erediensten/typeEredienst",
"http://www.w3.org/ns/org#classification"
]
},
{
"type": "http://www.w3.org/ns/regorg#RegisteredOrganization",
"strictTypeExport": "true",
"graphsFilter": [
"http://mu.semte.ch/graphs/administrative-unit"
],
"properties": [
"http://mu.semte.ch/vocabularies/core/uuid",
"http://data.vlaanderen.be/ns/besluit#werkingsgebied",
"http://www.opengis.net/ont/geosparql#sfWithin",
"http://www.w3.org/2002/07/owl#sameAs",
"http://www.w3.org/2004/02/skos/core#altLabel",
"http://www.w3.org/2004/02/skos/core#prefLabel",
"http://www.w3.org/ns/regorg#legalName",
"http://www.w3.org/ns/adms#identifier",
"http://www.w3.org/ns/org#changedBy",
"http://www.w3.org/ns/org#classification",
"http://www.w3.org/ns/org#hasPost",
"http://www.w3.org/ns/org#hasPrimarySite",
"http://www.w3.org/ns/org#hasSite",
"http://www.w3.org/ns/org#hasSubOrganization",
"http://www.w3.org/ns/org#linkedTo",
"http://www.w3.org/ns/org#resultedFrom",
"http://www.w3.org/ns/regorg#orgStatus",
"https://data.lblod.info/vocabularies/generiek/geplandeEindDatum",
"http://www.w3.org/ns/org#purpose"
]
},
{
@@ -245,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

@@ -99,6 +99,53 @@
"http://www.w3.org/ns/regorg#orgStatus"
]
},
{
"type": "http://data.vlaanderen.be/ns/besluit#Bestuurseenheid",
"strictTypeExport": "true",
"graphsFilter": [
"http://mu.semte.ch/graphs/public"
],
"comment": "Bound to ABB only.",
"properties": [
"http://mu.semte.ch/vocabularies/core/uuid",
"http://www.w3.org/2004/02/skos/core#prefLabel",
"http://purl.org/dc/terms/identifier",
"http://www.w3.org/ns/org#classification"
],
"additionalFilter": "BIND(<http://data.lblod.info/id/bestuurseenheden/141d9d6b-54af-4d17-b313-8d1c30bc3f5b> as ?subject)"
},
{
"type": "http://www.w3.org/ns/regorg#RegisteredOrganization",
"strictTypeExport": "true",
"graphsFilter": [
"http://mu.semte.ch/graphs/administrative-unit"
],
"pathToConceptScheme": [
"http://www.w3.org/ns/org#classification",
"http://www.w3.org/2004/02/skos/core#inScheme"
],
"properties": [
"http://mu.semte.ch/vocabularies/core/uuid",
"http://data.vlaanderen.be/ns/besluit#werkingsgebied",
"http://www.opengis.net/ont/geosparql#sfWithin",
"http://www.w3.org/2002/07/owl#sameAs",
"http://www.w3.org/2004/02/skos/core#altLabel",
"http://www.w3.org/2004/02/skos/core#prefLabel",
"http://www.w3.org/ns/regorg#legalName",
"http://www.w3.org/ns/adms#identifier",
"http://www.w3.org/ns/org#changedBy",
"http://www.w3.org/ns/org#classification",
"http://www.w3.org/ns/org#hasPost",
"http://www.w3.org/ns/org#hasPrimarySite",
"http://www.w3.org/ns/org#hasSite",
"http://www.w3.org/ns/org#hasSubOrganization",
"http://www.w3.org/ns/org#linkedTo",
"http://www.w3.org/ns/org#resultedFrom",
"http://www.w3.org/ns/regorg#orgStatus",
"https://data.lblod.info/vocabularies/generiek/geplandeEindDatum",
"http://www.w3.org/ns/org#purpose"
]
},
{
"type": "http://data.lblod.info/vocabularies/erediensten/RepresentatiefOrgaan",
"graphsFilter": [
@@ -112,6 +159,7 @@
"http://www.w3.org/2004/02/skos/core#altLabel",
"http://www.w3.org/ns/org#linkedTo",
"http://data.lblod.info/vocabularies/erediensten/typeEredienst",
"http://www.w3.org/ns/org#classification",
"http://www.w3.org/ns/adms#identifier"
]
},
@@ -282,6 +330,16 @@
"http://www.w3.org/2004/02/skos/core#prefLabel"
]
},
{
"type": "http://mu.semte.ch/vocabularies/ext/RepresentatiefOrgaanClassificatieCode",
"graphsFilter": [
"http://mu.semte.ch/graphs/public"
],
"properties": [
"http://mu.semte.ch/vocabularies/core/uuid",
"http://www.w3.org/2004/02/skos/core#prefLabel"
]
},
{
"type": "http://data.vlaanderen.be/ns/besluit#Bestuursorgaan",
"graphsFilter": [
@@ -296,7 +354,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> ."
},
@@ -425,6 +484,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

@@ -1,25 +1,93 @@
{
"organizations": {
"deltaInterval": 10000,
"deltaPath": "/organizations/delta",
"errorCreatorUri": "http://lblod.data.gift/services/delta-producer-publication-graph-maintainer-organizations",
"exportConfigPath": "/config/organizations/export.json",
"filesPath": "/organizations/files",
"healingJobOperation": "http://redpencil.data.gift/id/jobs/concept/JobOperation/deltas/healingOperation/organizations",
"initialPublicationGraphSyncJobOperation": "http://redpencil.data.gift/id/jobs/concept/JobOperation/deltas/initialPublicationGraphSyncing/organizations",
"jobsGraph": "http://mu.semte.ch/graphs/jobs",
"publicationGraph": "http://redpencil.data.gift/id/deltas/producer/organizations",
"publisherUri": "http://data.lblod.info/services/delta-production-json-diff-file-manager/organizations",
"queuePollInterval": 3000,
"relativeFilePath": "/deltas/organizations",
"serveDeltaFiles": true,
"skipMuAuthInitialSync": true,
"skipMuAuthHealing": true,
"useFileDiff": true,
"healingInitialBatchSizeInsert": 1000,
"useVirtuosoForExpensiveSelects": true,
"errorGraph": "http://mu.semte.ch/graphs/jobs",
"loginPath": "/organizations/login",
"logOutgoingDelta": true
}
}
"organizations": {
"deltaInterval": 10000,
"errorCreatorUri": "http://lblod.data.gift/services/delta-producer-publication-graph-maintainer-organizations",
"exportConfigPath": "/config/organizations/export.json",
"filesPath": "/organizations/files",
"healingJobOperation": "http://redpencil.data.gift/id/jobs/concept/JobOperation/deltas/healingOperation/organizations",
"initialPublicationGraphSyncJobOperation": "http://redpencil.data.gift/id/jobs/concept/JobOperation/deltas/initialPublicationGraphSyncing/organizations",
"jobsGraph": "http://mu.semte.ch/graphs/jobs",
"publicationGraph": "http://redpencil.data.gift/id/deltas/producer/organizations",
"publisherUri": "http://data.lblod.info/services/delta-production-json-diff-file-manager/organizations",
"queuePollInterval": 3000,
"relativeFilePath": "/deltas/organizations",
"serveDeltaFiles": true,
"skipMuAuthInitialSync": true,
"skipMuAuthHealing": true,
"useFileDiff": true,
"healingInitialBatchSizeInsert": 1000,
"useVirtuosoForExpensiveSelects": true,
"errorGraph": "http://mu.semte.ch/graphs/jobs",
"loginPath": "/organizations/login",
"logOutgoingDelta": true
},
"public": {
"deltaInterval": 10000,
"errorCreatorUri": "http://lblod.data.gift/services/delta-producer-publication-graph-maintainer-public",
"exportConfigPath": "/config/public/export.json",
"filesPath": "/public/files",
"healingJobOperation": "http://redpencil.data.gift/id/jobs/concept/JobOperation/deltas/healingOperation/public",
"initialPublicationGraphSyncJobOperation": "http://redpencil.data.gift/id/jobs/concept/JobOperation/deltas/initialPublicationGraphSyncing/public",
"jobsGraph": "http://mu.semte.ch/graphs/jobs",
"publicationGraph": "http://redpencil.data.gift/id/deltas/producer/public",
"publisherUri": "http://data.lblod.info/services/delta-production-json-diff-file-manager/public",
"queuePollInterval": 3000,
"relativeFilePath": "/deltas/public",
"serveDeltaFiles": true,
"skipMuAuthInitialSync": true,
"skipMuAuthHealing": true,
"useFileDiff": true,
"healingInitialBatchSizeInsert": 1000,
"healingPatchPublicationGraphTaskOperation": 500,
"useVirtuosoForExpensiveSelects": true,
"errorGraph": "http://mu.semte.ch/graphs/jobs",
"loginPath": "/public/login",
"logOutgoingDelta": true
},
"organizations-public-info": {
"deltaInterval": 10000,
"errorCreatorUri": "http://lblod.data.gift/services/delta-producer-publication-graph-maintainer-organizations-public-info",
"exportConfigPath": "/config/organizations-public-info/export.json",
"filesPath": "/organizations-public-info/files",
"healingJobOperation": "http://redpencil.data.gift/id/jobs/concept/JobOperation/deltas/healingOperation/organizations-public-info",
"initialPublicationGraphSyncJobOperation": "http://redpencil.data.gift/id/jobs/concept/JobOperation/deltas/initialPublicationGraphSyncing/organizations-public-info",
"jobsGraph": "http://mu.semte.ch/graphs/jobs",
"publicationGraph": "http://redpencil.data.gift/id/deltas/producer/organizations-public-info",
"publisherUri": "http://data.lblod.info/services/delta-production-json-diff-file-manager/organizations-public-info",
"queuePollInterval": 3000,
"relativeFilePath": "/deltas/organizations-public-info",
"serveDeltaFiles": true,
"skipMuAuthInitialSync": true,
"skipMuAuthHealing": true,
"useFileDiff": true,
"healingInitialBatchSizeInsert": 1000,
"healingPatchPublicationGraphTaskOperation": 500,
"useVirtuosoForExpensiveSelects": true,
"errorGraph": "http://mu.semte.ch/graphs/jobs",
"loginPath": "/organizations-public-info/login",
"logOutgoingDelta": true
},
"worship-posts": {
"deltaInterval": 10000,
"errorCreatorUri": "http://lblod.data.gift/services/delta-producer-publication-graph-maintainer-worship-posts",
"exportConfigPath": "/config/worship-posts/export.json",
"filesPath": "/worship-posts/files",
"healingJobOperation": "http://redpencil.data.gift/id/jobs/concept/JobOperation/deltas/healingOperation/worship-posts",
"initialPublicationGraphSyncJobOperation": "http://redpencil.data.gift/id/jobs/concept/JobOperation/deltas/initialPublicationGraphSyncing/worship-posts",
"jobsGraph": "http://mu.semte.ch/graphs/jobs",
"publicationGraph": "http://redpencil.data.gift/id/deltas/producer/worship-posts",
"publisherUri": "http://data.lblod.info/services/delta-production-json-diff-file-manager/worship-posts",
"queuePollInterval": 3000,
"relativeFilePath": "/deltas/worship-posts",
"serveDeltaFiles": true,
"skipMuAuthInitialSync": true,
"skipMuAuthHealing": true,
"useFileDiff": true,
"healingInitialBatchSizeInsert": 1000,
"healingPatchPublicationGraphTaskOperation": 500,
"useVirtuosoForExpensiveSelects": true,
"errorGraph": "http://mu.semte.ch/graphs/jobs",
"loginPath": "/worship-posts/login",
"logOutgoingDelta": true
}
}

View File

@@ -131,6 +131,7 @@
"http://www.w3.org/ns/org#hasSite",
"http://www.w3.org/ns/org#linkedTo",
"http://data.lblod.info/vocabularies/erediensten/typeEredienst",
"http://www.w3.org/ns/org#classification",
"http://www.w3.org/ns/adms#identifier"
]
},

View File

@@ -33,7 +33,6 @@ export default [
ignoreFromSelf: true
}
},
{
match: {
graph: {
@@ -51,7 +50,6 @@ export default [
ignoreFromSelf: true
}
},
{
match: {
graph: {
@@ -69,7 +67,6 @@ export default [
ignoreFromSelf: true
}
},
{
match: {
predicate: {
@@ -92,59 +89,7 @@ export default [
match: {
},
callback: {
url: 'http://delta-producer-publication-graph-maintainer/organizations/delta',
method: 'POST'
},
options: {
resourceFormat: 'v0.0.1',
gracePeriod: 1000,
ignoreFromSelf: true,
optOutMuScopeIds: [
"http://redpencil.data.gift/id/concept/muScope/deltas/initialSync",
"http://redpencil.data.gift/id/concept/muScope/deltas/publicationGraphMaintenance"
]
}
},
{
match: {
},
callback: {
url: 'http://delta-producer-pub-graph-maintainer-organizations-public-info/delta',
method: 'POST'
},
options: {
resourceFormat: 'v0.0.1',
gracePeriod: 1000,
ignoreFromSelf: true,
optOutMuScopeIds: [
"http://redpencil.data.gift/id/concept/muScope/deltas/initialSync",
"http://redpencil.data.gift/id/concept/muScope/deltas/publicationGraphMaintenance"
]
}
},
{
match: {
},
callback: {
url: 'http://delta-producer-pub-graph-maintainer-public/delta',
method: 'POST'
},
options: {
resourceFormat: 'v0.0.1',
gracePeriod: 1000,
ignoreFromSelf: true,
optOutMuScopeIds: [
"http://redpencil.data.gift/id/concept/muScope/deltas/initialSync",
"http://redpencil.data.gift/id/concept/muScope/deltas/publicationGraphMaintenance"
]
}
},
{
match: {
// anything
},
callback: {
url: 'http://delta-producer-pub-graph-maintainer-worship-posts/delta',
url: 'http://delta-producer-publication-graph-maintainer/delta',
method: 'POST'
},
options: {

View File

@@ -76,8 +76,12 @@ defmodule Dispatcher do
Proxy.forward conn, path, "http://cache/organizations/"
end
match "/registered-organizations/*path", %{ accept: [:json], layer: :api} do
Proxy.forward conn, path, "http://cache/registered-organizations/"
end
match "/administrative-units/*path", %{ accept: [:json], layer: :api} do
Proxy.forward conn, path, "http://resource/administrative-units/"
Proxy.forward conn, path, "http://cache/administrative-units/"
end
match "/administrative-unit-classification-codes/*path", %{ accept: [:json], layer: :api} do
@@ -88,12 +92,16 @@ defmodule Dispatcher do
Proxy.forward conn, path, "http://cache/organization-classification-codes/"
end
match "/registered-organization-classification-codes/*path", %{ accept: [:json], layer: :api} do
Proxy.forward conn, path, "http://cache/registered-organization-classification-codes/"
end
match "/worship-administrative-units/*path", %{ accept: [:json], layer: :api} do
Proxy.forward conn, path, "http://resource/worship-administrative-units/"
Proxy.forward conn, path, "http://cache/worship-administrative-units/"
end
match "/worship-services/*path", %{ accept: [:json], layer: :api} do
Proxy.forward conn, path, "http://resource/worship-services/" # DISABLE CACHING FOR NOW (BUG OP-1404)
Proxy.forward conn, path, "http://cache/worship-services/"
end
match "/recognized-worship-types/*path", %{ accept: [:json], layer: :api} do
@@ -101,7 +109,7 @@ defmodule Dispatcher do
end
match "/central-worship-services/*path", %{ accept: [:json], layer: :api} do
Proxy.forward conn, path, "http://resource/central-worship-services/"
Proxy.forward conn, path, "http://cache/central-worship-services/"
end
match "/representative-bodies/*path", %{ accept: [:json], layer: :api} do
@@ -117,7 +125,7 @@ defmodule Dispatcher do
end
match "/local-involvements/*path", %{ accept: [:json], layer: :api} do
Proxy.forward conn, path, "http://resource/local-involvements/"
Proxy.forward conn, path, "http://cache/local-involvements/"
end
match "/identifiers/*path", %{ accept: [:json], layer: :api} do
@@ -219,6 +227,7 @@ defmodule Dispatcher do
Proxy.forward conn, path, "http://cache/decision-activities/"
end
# There is currently no logic to invalidate the kboOrganization cache when wegwijse updates the content
match "/kbo-organizations/*path", %{ accept: [:any], layer: :api} do
Proxy.forward conn, path, "http://resource/kbo-organizations/"
end
@@ -308,8 +317,8 @@ defmodule Dispatcher do
forward conn, path, "http://uri-info/"
end
post "/create-administrative-unit-relationships/*path", %{ layer: :api_services, accept: %{ json: true } } do
forward conn, path, "http://construct-administrative-unit-relationships/create-relationships/"
post "/construct-organization-relationships/*path", %{ layer: :api_services, accept: %{ json: true } } do
forward conn, path, "http://construct-organization-relationships/create-relationships/"
end
post "/kbo-data-sync/*path", %{ layer: :api_services, accept: %{ json: true } } do
@@ -357,7 +366,7 @@ defmodule Dispatcher do
#################################################################
get "/sync/organizations/files/*path" do
Proxy.forward conn, path, "http://delta-producer-publication-graph-maintainer/files/"
Proxy.forward conn, path, "http://delta-producer-publication-graph-maintainer/organizations/files/"
end
#################################################################
@@ -365,7 +374,7 @@ defmodule Dispatcher do
#################################################################
get "/sync/organizations-public-info/files/*path" do
Proxy.forward conn, path, "http://delta-producer-pub-graph-maintainer-organizations-public-info/files/"
Proxy.forward(conn, path, "http://delta-producer-publication-graph-maintainer/organizations-public-info/files/")
end
#################################################################
@@ -373,7 +382,7 @@ defmodule Dispatcher do
#################################################################
get "/sync/public/files/*path" do
Proxy.forward conn, path, "http://delta-producer-pub-graph-maintainer-public/files/"
Proxy.forward(conn, path, "http://delta-producer-publication-graph-maintainer/public/files/")
end
#################################################################
@@ -381,7 +390,7 @@ defmodule Dispatcher do
#################################################################
get "/sync/worship-posts/files/*path" do
Proxy.forward conn, path, "http://delta-producer-pub-graph-maintainer-worship-posts/files/"
Proxy.forward(conn, path, "http://delta-producer-publication-graph-maintainer/worship-posts/files/")
end
#################################################################

View File

@@ -0,0 +1,6 @@
{
"enabled": false,
"allowedIpAddresses": [],
"authSource": "/config/source.json",
"authOutput": "/config/output.json"
}

View File

@@ -1,9 +0,0 @@
# disabled on dev
application:
security:
enabled: false
spring:
autoconfigure:
exclude:
- org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration
- org.springframework.boot.actuate.autoconfigure.security.servlet.ManagementWebSecurityAutoConfiguration

View File

@@ -1,32 +0,0 @@
const BATCH_SIZE = parseInt(process.env.BATCH_SIZE) || 100;
const MU_CALL_SCOPE_ID_INITIAL_SYNC = process.env.MU_CALL_SCOPE_ID_INITIAL_SYNC || 'http://redpencil.data.gift/id/concept/muScope/deltas/consumer/initialSync';
const BYPASS_MU_AUTH_FOR_EXPENSIVE_QUERIES = process.env.BYPASS_MU_AUTH_FOR_EXPENSIVE_QUERIES == 'true' ? true : false;
const DIRECT_DATABASE_ENDPOINT = process.env.DIRECT_DATABASE_ENDPOINT || 'http://triplestore:8890/sparql';
const MAX_DB_RETRY_ATTEMPTS = parseInt(process.env.MAX_DB_RETRY_ATTEMPTS || 5);
const MAX_REASONING_RETRY_ATTEMPTS = parseInt(process.env.MAX_REASONING_RETRY_ATTEMPTS || 5);
const SLEEP_BETWEEN_BATCHES = parseInt(process.env.SLEEP_BETWEEN_BATCHES || 1000);
const SLEEP_TIME_AFTER_FAILED_REASONING_OPERATION = parseInt(process.env.SLEEP_TIME_AFTER_FAILED_REASONING_OPERATION || 10000);
const SLEEP_TIME_AFTER_FAILED_DB_OPERATION = parseInt(process.env.SLEEP_TIME_AFTER_FAILED_DB_OPERATION || 60000);
// Graphs
const TARGET_GRAPH = process.env.TARGET_GRAPH || `http://mu.semte.ch/graphs/administrative-unit`;
const LANDING_ZONE_GRAPH = process.env.DCR_LANDING_ZONE_GRAPH || `http://mu.semte.ch/graphs/landing-zone/leidinggevenden`;
// ENDPOINTS
const LANDING_ZONE_DATABASE = process.env.DCR_LANDING_ZONE_DATABASE || 'db';
const LANDING_ZONE_DATABASE_ENDPOINT = process.env.DCR_LANDING_ZONE_DATABASE_ENDPOINT || `http://${LANDING_ZONE_DATABASE}:8890/sparql`;
module.exports = {
BATCH_SIZE,
MU_CALL_SCOPE_ID_INITIAL_SYNC,
BYPASS_MU_AUTH_FOR_EXPENSIVE_QUERIES,
DIRECT_DATABASE_ENDPOINT,
MAX_DB_RETRY_ATTEMPTS,
MAX_REASONING_RETRY_ATTEMPTS,
SLEEP_BETWEEN_BATCHES,
SLEEP_TIME_AFTER_FAILED_DB_OPERATION,
SLEEP_TIME_AFTER_FAILED_REASONING_OPERATION,
LANDING_ZONE_GRAPH,
TARGET_GRAPH,
LANDING_ZONE_DATABASE_ENDPOINT
};

View File

@@ -1,72 +0,0 @@
const PREFIXES = `
PREFIX org: <http://www.w3.org/ns/org#>
PREFIX mandaat: <http://data.vlaanderen.be/ns/mandaat#>
PREFIX lblodlg: <http://data.lblod.info/vocabularies/leidinggevenden/>
PREFIX besluit: <http://data.vlaanderen.be/ns/besluit#>`
const contextConfig = {
addTypes: {
scope: 'all', // 'inserts, 'deletes', 'all' or none. To add rdf:type to subjects of inserts, deletes or both
exhausitive: false, // true or false: find all types for a subject, even if one is already present in delta
},
contextQueries: [
// Case Leidnggevenden
// They can be triggered when being inserted or when their link to a bestuursfunctie is added
{
trigger: { // subjectType or predicateValue
subjectType: "lblodlg:Functionaris"
},
queryTemplate: (subject) => `
${PREFIXES}
CONSTRUCT {
?functionaris org:holds ?bestuursfunctie ;
?p ?o .
?orgaanInTime lblodlg:heeftBestuursfunctie ?bestuursfunctie ;
mandaat:isTijdspecialisatieVan ?orgaan .
?orgaan besluit:bestuurt ?eenheid .
?eenheid besluit:classificatie ?classification .
} WHERE {
GRAPH <http://mu.semte.ch/graphs/landing-zone/leidinggevenden> {
VALUES ?functionaris { ${subject} }
?functionaris org:holds ?bestuursfunctie ;
?p ?o .
?orgaanInTime lblodlg:heeftBestuursfunctie ?bestuursfunctie ;
mandaat:isTijdspecialisatieVan ?orgaan .
?orgaan besluit:bestuurt ?eenheid .
?eenheid besluit:classificatie ?classification .
}
}`
},
{
trigger: {
predicateValue: "org:holds"
},
queryTemplate: (subject) => `
${PREFIXES}
CONSTRUCT {
?functionaris org:holds ?bestuursfunctie ;
?p ?o .
?orgaanInTime lblodlg:heeftBestuursfunctie ?bestuursfunctie ;
mandaat:isTijdspecialisatieVan ?orgaan .
?orgaan besluit:bestuurt ?eenheid .
?eenheid besluit:classificatie ?classification .
} WHERE {
GRAPH <http://mu.semte.ch/graphs/landing-zone/leidinggevenden> {
VALUES ?functionaris { ${subject} }
?functionaris org:holds ?bestuursfunctie ;
?p ?o .
?orgaanInTime lblodlg:heeftBestuursfunctie ?bestuursfunctie ;
mandaat:isTijdspecialisatieVan ?orgaan .
?orgaan besluit:bestuurt ?eenheid .
?eenheid besluit:classificatie ?classification .
}
}`
}
]
}
module.exports = {
contextConfig,
PREFIXES
};

View File

@@ -1,85 +0,0 @@
const {
transformStatements,
deleteFromTargetGraph,
insertIntoTargetGraph,
} = require('./util');
/**
* Dispatch the fetched information to a target graph.
* Note: <share://file/data> will be ADDED to it's own graph.
* We take only care of adding them, not updating triples, this is a TODO
* @param { mu, muAuthSudo } lib - The provided libraries from the host service.
* @param { termObjectChangeSets: { deletes, inserts } } data - The fetched changes sets, which objects of serialized Terms
* [ {
* graph: "<http://foo>",
* subject: "<http://bar>",
* predicate: "<http://baz>",
* object: "<http://boom>^^<http://datatype>"
* }
* ]
* @return {void} Nothing
*/
async function dispatch(lib, data) {
const { mu, fetch } = lib;
let { termObjectChangeSets, termObjectChangeSetsWithContext } = data;
// Both arrays are the same length, so we can zip them together for easier processing
zippedChangeSets = termObjectChangeSets.map((o, i) => ({
original: o,
withContext: termObjectChangeSetsWithContext[i]
}));
console.log(`Received ${zippedChangeSets.length} change sets`)
for (let { original, withContext } of zippedChangeSets) {
let originalDeletes, originalInserts, insertsWithContext, deletesWithContext;
try {
originalInserts = original.inserts.map(o => `${o.subject} ${o.predicate} ${o.object}.`);
originalDeletes = original.deletes.map(o => `${o.subject} ${o.predicate} ${o.object}.`);
} catch (e) {
console.log(`Error while processing change set: ${e}`);
console.log(`Original change set: ${JSON.stringify(original)}`);
throw e;
}
// Extra context needed for mapping from DL to OP model and filtering based on type.
try {
insertsWithContext = withContext.inserts.map(o => `${o.subject} ${o.predicate} ${o.object}.`);
deletesWithContext = withContext.deletes.map(o => `${o.subject} ${o.predicate} ${o.object}.`);
} catch (e) {
console.log(`Error while processing change set with context: ${e}`);
console.log(`Change set with context: ${JSON.stringify(withContext)}`);
throw e;
}
if (originalDeletes.length) {
// Map deletes from DL to OP model
const transformedDeletes = await transformStatements(fetch, deletesWithContext);
if (!transformedDeletes.length) {
console.log(`Warn: Delete statements mapped to empty result.`);
console.log(`Input: ${deletesWithContext}`);
console.log(`Output: ${transformedDeletes}`);
} else {
await deleteFromTargetGraph(lib, transformedDeletes);
}
}
if (originalInserts.length) {
// Map inserts from DL to OP model
const transformedInserts = await transformStatements(fetch, insertsWithContext);
if (!transformedInserts.length) {
console.log(`Warn: Insert statements mapped to empty result.`);
console.log(`Input: ${insertsWithContext}`);
console.log(`Output: ${transformedInserts}`);
} else {
await insertIntoTargetGraph(lib, transformedInserts);
}
}
}
}
module.exports = {
dispatch
};

View File

@@ -1,85 +0,0 @@
const { batchedDbUpdate, transformLandingZoneGraph } = require('./util');
const {
BYPASS_MU_AUTH_FOR_EXPENSIVE_QUERIES,
DIRECT_DATABASE_ENDPOINT,
MU_CALL_SCOPE_ID_INITIAL_SYNC,
BATCH_SIZE,
MAX_DB_RETRY_ATTEMPTS,
SLEEP_BETWEEN_BATCHES,
SLEEP_TIME_AFTER_FAILED_DB_OPERATION,
TARGET_GRAPH,
LANDING_ZONE_GRAPH,
LANDING_ZONE_DATABASE_ENDPOINT
} = require('./config');
const endpoint = BYPASS_MU_AUTH_FOR_EXPENSIVE_QUERIES ? DIRECT_DATABASE_ENDPOINT : process.env.MU_SPARQL_ENDPOINT;
/**
* Dispatch the fetched information to a target graph.
* @param { mu, muAuthSudo } lib - The provided libraries from the host service.
* @param { termObjects } data - The fetched quad information, which objects of serialized Terms
* [ {
* graph: "<http://foo>",
* subject: "<http://bar>",
* predicate: "<http://baz>",
* object: "<http://boom>^^<http://datatype>"
* }
* ]
* @return {void} Nothing
*/
async function dispatch(lib, data) {
const { mu, muAuthSudo } = lib;
const { termObjects } = data;
// Steps:
// 1. Write the triples to the landing zone graph - withouth any mapping or filtering
// 2. One-time reasoning run with the full landing zone graph and write the results to the target graph (on-finish)
if (BYPASS_MU_AUTH_FOR_EXPENSIVE_QUERIES) {
console.warn(`Service configured to skip MU_AUTH!`);
}
console.log(`Using ${endpoint} to insert triples`);
if (termObjects.length) {
const originalInsertTriples = termObjects.map(o => `${o.subject} ${o.predicate} ${o.object}.`);
await batchedDbUpdate(
muAuthSudo.updateSudo,
LANDING_ZONE_GRAPH,
originalInsertTriples,
{ 'mu-call-scope-id': MU_CALL_SCOPE_ID_INITIAL_SYNC },
LANDING_ZONE_DATABASE_ENDPOINT,
BATCH_SIZE,
MAX_DB_RETRY_ATTEMPTS,
SLEEP_BETWEEN_BATCHES,
SLEEP_TIME_AFTER_FAILED_DB_OPERATION
);
}
}
async function onFinishInitialIngest(lib) {
const { muAuthSudo, fetch } = lib;
console.log(`!! On-finish triggered !!`);
const transformedInsertTriples = await transformLandingZoneGraph(fetch, endpoint);
console.log(`Transformed ${transformedInsertTriples.length} triples`);
await batchedDbUpdate(
muAuthSudo.updateSudo,
TARGET_GRAPH,
transformedInsertTriples,
{ 'mu-call-scope-id': MU_CALL_SCOPE_ID_INITIAL_SYNC },
endpoint,
BATCH_SIZE,
MAX_DB_RETRY_ATTEMPTS,
SLEEP_BETWEEN_BATCHES,
SLEEP_TIME_AFTER_FAILED_DB_OPERATION
);
}
module.exports = {
dispatch,
onFinishInitialIngest
};

View File

@@ -1,168 +0,0 @@
const {
MAX_REASONING_RETRY_ATTEMPTS,
SLEEP_TIME_AFTER_FAILED_REASONING_OPERATION,
MAX_DB_RETRY_ATTEMPTS,
SLEEP_BETWEEN_BATCHES,
SLEEP_TIME_AFTER_FAILED_DB_OPERATION,
TARGET_GRAPH,
LANDING_ZONE_GRAPH,
BATCH_SIZE,
} = require('./config');
async function batchedDbUpdate(
muUpdate,
graph,
triples,
extraHeaders,
endpoint,
batchSize,
maxAttempts,
sleepBetweenBatches = 1000,
sleepTimeOnFail = 1000,
operation = 'INSERT'
) {
for (let i = 0; i < triples.length; i += batchSize) {
console.log(`Inserting triples in batch: ${i}-${i + batchSize}`);
const batch = triples.slice(i, i + batchSize).join('\n');
const insertCall = async () => {
await muUpdate(`
${operation} DATA {
GRAPH <${graph}> {
${batch}
}
}
`, extraHeaders, endpoint);
};
await operationWithRetry(insertCall, 0, maxAttempts, sleepTimeOnFail);
console.log(`Sleeping before next query execution: ${sleepBetweenBatches}`);
await new Promise(r => setTimeout(r, sleepBetweenBatches));
}
}
async function operationWithRetry(callback,
attempt,
maxAttempts,
sleepTimeOnFail) {
try {
if (typeof callback === "function")
return await callback();
else // Catch error from promise - not how I would do it normally, but allows re use of existing code.
return await callback;
}
catch (e) {
console.log(`Operation failed for ${callback.toString()}, attempt: ${attempt} of ${maxAttempts}`);
console.log(`Error: ${e}`);
console.log(`Sleeping ${sleepTimeOnFail} ms`);
if (attempt >= maxAttempts) {
console.log(`Max attempts reached for ${callback.toString()}, giving up`);
throw e;
}
await new Promise(r => setTimeout(r, sleepTimeOnFail));
return operationWithRetry(callback, ++attempt, maxAttempts, sleepTimeOnFail);
}
}
/**
* Splits an array into two parts, a part that passes and a part that fails a predicate function.
* Credits: https://github.com/benjay10
* @public
* @function partition
* @param {Array} arr - Array to be partitioned
* @param {Function} fn - Function that accepts single argument: an element of the array, and should return a truthy or falsy value.
* @returns {Object} Object that contains keys passes and fails, each representing an array with elemets that pass or fail the predicate respectively
*/
function partition(arr, fn) {
let passes = [], fails = [];
arr.forEach((item) => (fn(item) ? passes : fails).push(item));
return { passes, fails };
}
/**
* Send triples to reasoning service for conversion
*
*/
async function transformTriples(fetch, triples, mapping) {
return await operationWithRetry(mainConversion(fetch, triples, mapping), 0,
MAX_REASONING_RETRY_ATTEMPTS, SLEEP_TIME_AFTER_FAILED_REASONING_OPERATION);
}
async function mainConversion(fetch, triples, mapping) {
let formdata = new URLSearchParams();
formdata.append("data", triples);
let requestOptions = {
method: 'POST',
body: formdata,
redirect: 'follow'
};
const response = await fetch(`http://reasoner/reason/dl2op/${mapping}`, requestOptions)
return await response.text();
}
async function transformStatements(fetch, triples, mapping = 'main') {
console.log(`Received ${JSON.stringify(triples)} to transform`);
const transformedTriples = await transformTriples(fetch, triples.join('\n'), mapping);
statements = transformedTriples ? transformedTriples.replace(/\n{2,}/g, '').split('\n') : [];
console.log(`CONVERSION: FROM ${triples.length} triples to ${statements.length}`);
return statements;
}
async function deleteFromTargetGraph(lib, statements) {
console.log(`Deleting ${statements.length} statements from target graph`);
console.log(`Statements: ${JSON.stringify(statements)}`)
await batchedDbUpdate(
lib.muAuthSudo.updateSudo,
TARGET_GRAPH,
statements,
{},
process.env.MU_SPARQL_ENDPOINT,
BATCH_SIZE,
MAX_DB_RETRY_ATTEMPTS,
SLEEP_BETWEEN_BATCHES,
SLEEP_TIME_AFTER_FAILED_DB_OPERATION,
'DELETE');
}
async function insertIntoTargetGraph(lib, statements) {
console.log(`Inserting ${statements.length} statements into target graph`);
console.log(`Statements: ${JSON.stringify(statements)}`)
await batchedDbUpdate(
lib.muAuthSudo.updateSudo,
TARGET_GRAPH,
statements,
{},
process.env.MU_SPARQL_ENDPOINT,
BATCH_SIZE,
MAX_DB_RETRY_ATTEMPTS,
SLEEP_BETWEEN_BATCHES,
SLEEP_TIME_AFTER_FAILED_DB_OPERATION,
'INSERT');
}
async function transformLandingZoneGraph(fetch, endpoint, mapping = 'main') {
console.log(`Transforming landing zone graph: ${LANDING_ZONE_GRAPH}`);
const response = await fetch(`http://reasoner/reason/dl2op/${mapping}?data=${encodeURIComponent(`${endpoint}?default-graph-uri=&query=CONSTRUCT+%7B%0D%0A%3Fs+%3Fp+%3Fo%0D%0A%7D+WHERE+%7B%0D%0A+GRAPH+<${LANDING_ZONE_GRAPH}>+%7B%0D%0A%3Fs+%3Fp+%3Fo%0D%0A%7D%0D%0A%7D&should-sponge=&format=text%2Fplain&timeout=0&run=+Run+Query`)}`);
const text = await response.text();
const statements = text.replace(/\n{2,}/g, '').split('\n');
return statements;
}
module.exports = {
batchedDbUpdate,
partition,
transformStatements,
transformLandingZoneGraph,
deleteFromTargetGraph,
insertIntoTargetGraph
};

View File

@@ -0,0 +1,21 @@
PREFIX schema: <http://schema.org/>
CONSTRUCT {
?s schema:telephone ?cleanedPhoneNumber .
} WHERE {
?s schema:telephone ?phoneNumber .
# Remove all non digits
BIND(REPLACE(?phoneNumber, """[^+\\d]""", "") AS ?scrapeResult)
# Replace leading 00 with +
BIND(REPLACE(?scrapeResult, """^00""", "+") AS ?replacedZeroZero)
BIND(REPLACE(?replacedZeroZero, """^0""", "+32") AS ?defaultBe)
BIND(REPLACE(?defaultBe, """\\+320""", "+32") AS ?extendedDefaultBe)
BIND(REPLACE(?extendedDefaultBe, """^320""", "+32") AS ?finalResult)
BIND(IF(REGEX(?finalResult, """^\\+((32\\d{8})|(324\\d{8})|((?!32)\\d+))$"""), CONCAT("tel:", ?finalResult), ?phoneNumber) AS ?cleanedPhoneNumber)
}

View File

@@ -0,0 +1,11 @@
PREFIX mandaat: <http://data.vlaanderen.be/ns/mandaat#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
CONSTRUCT {
?s mandaat:einde ?endDateTime .
} WHERE {
?s mandaat:einde ?endDate .
BIND(SUBSTR(STR(?endDate), 1, 10) as ?endDateWithoutTimezone)
BIND(STRDT(CONCAT(?endDateWithoutTimezone, 'T02:00:00'), xsd:dateTime) as ?endDateTime)
}

View File

@@ -0,0 +1,11 @@
PREFIX mandaat: <http://data.vlaanderen.be/ns/mandaat#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
CONSTRUCT {
?s mandaat:start ?startDateTime .
} WHERE {
?s mandaat:start ?startDate .
BIND(SUBSTR(STR(?startDate), 1, 10) as ?startDateWithoutTimezone)
BIND(STRDT(CONCAT(?startDateWithoutTimezone, 'T02:00:00'), xsd:dateTime) as ?startDateTime)
}

View File

@@ -0,0 +1,14 @@
PREFIX dc_terms: <http://purl.org/dc/terms/>
PREFIX lblodlg: <http://data.lblod.info/vocabularies/leidinggevenden/>
PREFIX person: <http://www.w3.org/ns/person#>
CONSTRUCT {
?s a dc_terms:Agent .
} WHERE {
?s a ?type .
VALUES ?type {
lblodlg:Functionaris
person:Person
}
}

View File

@@ -0,0 +1,12 @@
PREFIX ch: <http://data.lblod.info/vocabularies/contacthub/>
PREFIX lblodlg: <http://data.lblod.info/vocabularies/leidinggevenden/>
CONSTRUCT {
?s a ch:AgentInPositie .
} WHERE {
?s a ?type .
VALUES ?type {
lblodlg:Functionaris
}
}

View File

@@ -0,0 +1,8 @@
PREFIX org: <http://www.w3.org/ns/org#>
CONSTRUCT {
?o org:heldBy ?s.
}
WHERE {
?s org:holds ?o.
}

View File

@@ -0,0 +1,10 @@
CONSTRUCT {
?s ?p ?o.
} WHERE {
?s a <http://www.w3.org/ns/locn#Address>;
?p ?o.
FILTER NOT EXISTS {
?s ?p "" .
}
}

View File

@@ -0,0 +1,7 @@
CONSTRUCT {
?s <http://schema.org/contactPoint> ?contactpoint.
}
WHERE {
?s a <http://data.lblod.info/vocabularies/leidinggevenden/Bestuursfunctie>.
?s <http://schema.org/contactPoint> ?contactpoint.
}

View File

@@ -0,0 +1,11 @@
CONSTRUCT {
?s ?p ?o.
} WHERE {
?s a <http://schema.org/ContactPoint>;
?p ?o.
FILTER (?p NOT IN (<http://schema.org/telephone>))
FILTER NOT EXISTS {
?s ?p "" .
}
}

View File

@@ -0,0 +1,14 @@
PREFIX mandaat: <http://data.vlaanderen.be/ns/mandaat#>
CONSTRUCT {
?s ?p ?o.
} WHERE {
?s a <http://data.lblod.info/vocabularies/leidinggevenden/Functionaris>;
?p ?o.
FILTER (?p NOT IN (mandaat:start, mandaat:einde))
FILTER NOT EXISTS {
?s ?p "" .
}
}

View File

@@ -0,0 +1,16 @@
CONSTRUCT {
?s ?p ?o.
} WHERE {
?s a <http://www.w3.org/ns/person#Person>;
?p ?o.
FILTER (?p IN (
<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>,
<http://xmlns.com/foaf/0.1/familyName>,
<http://mu.semte.ch/vocabularies/core/uuid>
))
FILTER NOT EXISTS {
?s ?p "" .
}
}

View File

@@ -0,0 +1,21 @@
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX persoon: <https://data.vlaanderen.be/ns/persoon#>
PREFIX persoon_loket: <http://data.vlaanderen.be/ns/persoon#>
PREFIX person: <http://www.w3.org/ns/person#>
# DL and OP both use persoon:gebruikteVoornaam but with different semantics (!)
# First name: persoon:gebruikteVoornaam => foaf:givenName
# Alternatieve voornaam: foaf:name => persoon:gebruikteVoornaam
# We do both in one query with an OPTIONAL because they need to happen simultaneously
# not to end up in a loop
# Part 1
CONSTRUCT {
?s persoon:gebruikteVoornaam ?name .
} WHERE {
?s a person:Person;
foaf:name ?name .
}

View File

@@ -0,0 +1,21 @@
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX persoon: <https://data.vlaanderen.be/ns/persoon#>
PREFIX persoon_loket: <http://data.vlaanderen.be/ns/persoon#>
PREFIX person: <http://www.w3.org/ns/person#>
# DL and OP both use persoon:gebruikteVoornaam but with different semantics (!)
# First name: persoon:gebruikteVoornaam => foaf:givenName
# Alternatieve voornaam: foaf:name => persoon:gebruikteVoornaam
# We do both in one query with an OPTIONAL because they need to happen simultaneously
# not to end up in a loop
# Part 2
CONSTRUCT {
?s foaf:givenName ?gebruikteVoornaam .
} WHERE {
?s a person:Person ;
persoon_loket:gebruikteVoornaam ?gebruikteVoornaam .
}

View File

@@ -1,33 +0,0 @@
const BATCH_SIZE = parseInt(process.env.BATCH_SIZE) || 100;
const MU_CALL_SCOPE_ID_INITIAL_SYNC = process.env.MU_CALL_SCOPE_ID_INITIAL_SYNC || 'http://redpencil.data.gift/id/concept/muScope/deltas/consumer/initialSync';
const BYPASS_MU_AUTH_FOR_EXPENSIVE_QUERIES = process.env.BYPASS_MU_AUTH_FOR_EXPENSIVE_QUERIES == 'true' ? true : false;
const DIRECT_DATABASE_ENDPOINT = process.env.DIRECT_DATABASE_ENDPOINT || 'http://triplestore:8890/sparql';
const MAX_DB_RETRY_ATTEMPTS = parseInt(process.env.MAX_DB_RETRY_ATTEMPTS || 5);
const MAX_REASONING_RETRY_ATTEMPTS = parseInt(process.env.MAX_REASONING_RETRY_ATTEMPTS || 5);
const SLEEP_BETWEEN_BATCHES = parseInt(process.env.SLEEP_BETWEEN_BATCHES || 1000);
const SLEEP_TIME_AFTER_FAILED_REASONING_OPERATION = parseInt(process.env.SLEEP_TIME_AFTER_FAILED_REASONING_OPERATION || 10000);
const SLEEP_TIME_AFTER_FAILED_DB_OPERATION = parseInt(process.env.SLEEP_TIME_AFTER_FAILED_DB_OPERATION || 60000);
// Graphs
const TARGET_GRAPH = process.env.TARGET_GRAPH || `http://mu.semte.ch/graphs/administrative-unit`;
const LANDING_ZONE_GRAPH = process.env.DCR_LANDING_ZONE_GRAPH || `http://mu.semte.ch/graphs/landing-zone/leidinggevenden`;
// ENDPOINTS
const LANDING_ZONE_DATABASE = process.env.DCR_LANDING_ZONE_DATABASE || 'db';
const LANDING_ZONE_DATABASE_ENDPOINT = process.env.DCR_LANDING_ZONE_DATABASE_ENDPOINT || `http://${LANDING_ZONE_DATABASE}:8890/sparql`;
module.exports = {
BATCH_SIZE,
MU_CALL_SCOPE_ID_INITIAL_SYNC,
BYPASS_MU_AUTH_FOR_EXPENSIVE_QUERIES,
DIRECT_DATABASE_ENDPOINT,
MAX_DB_RETRY_ATTEMPTS,
MAX_REASONING_RETRY_ATTEMPTS,
SLEEP_BETWEEN_BATCHES,
SLEEP_TIME_AFTER_FAILED_DB_OPERATION,
SLEEP_TIME_AFTER_FAILED_REASONING_OPERATION,
LANDING_ZONE_GRAPH,
LANDING_ZONE_DATABASE_ENDPOINT,
TARGET_GRAPH
};

View File

@@ -1,72 +0,0 @@
const PREFIXES = `
PREFIX org: <http://www.w3.org/ns/org#>
PREFIX mandaat: <http://data.vlaanderen.be/ns/mandaat#>
PREFIX lblodlg: <http://data.lblod.info/vocabularies/leidinggevenden/>
PREFIX besluit: <http://data.vlaanderen.be/ns/besluit#>`
const contextConfig = {
addTypes: {
scope: 'all', // 'inserts, 'deletes', 'all' or none. To add rdf:type to subjects of inserts, deletes or both
exhausitive: false, // true or false: find all types for a subject, even if one is already present in delta
},
contextQueries: [
// Case Mandatarissen
// They can be triggered when being inserted or when their link to a mandate is added
{
trigger: { // subjectType or predicateValue
subjectType: "mandaat:Mandataris"
},
queryTemplate: (subject) => `
${PREFIXES}
CONSTRUCT {
?mandataris org:holds ?mandate ;
?p ?o .
?orgaanInTime org:hasPost ?mandate ;
mandaat:isTijdspecialisatieVan ?orgaan .
?orgaan besluit:bestuurt ?eenheid .
?eenheid besluit:classificatie ?classification .
} WHERE {
GRAPH <http://mu.semte.ch/graphs/landing-zone/mandatarissen> {
VALUES ?mandataris { ${subject} }
?mandataris org:holds ?mandate ;
?p ?o .
?orgaanInTime org:hasPost ?mandate ;
mandaat:isTijdspecialisatieVan ?orgaan .
?orgaan besluit:bestuurt ?eenheid .
?eenheid besluit:classificatie ?classification .
}
}`
},
{
trigger: {
predicateValue: "org:holds"
},
queryTemplate: (subject) => `
${PREFIXES}
CONSTRUCT {
?mandataris org:holds ?mandate ;
?p ?o .
?orgaanInTime org:hasPost ?mandate ;
mandaat:isTijdspecialisatieVan ?orgaan .
?orgaan besluit:bestuurt ?eenheid .
?eenheid besluit:classificatie ?classification .
} WHERE {
GRAPH <http://mu.semte.ch/graphs/landing-zone/mandatarissen> {
VALUES ?mandataris { ${subject} }
?mandataris org:holds ?mandate ;
?p ?o .
?orgaanInTime org:hasPost ?mandate ;
mandaat:isTijdspecialisatieVan ?orgaan .
?orgaan besluit:bestuurt ?eenheid .
?eenheid besluit:classificatie ?classification .
}
}`
}
]
}
module.exports = {
contextConfig,
PREFIXES
};

View File

@@ -1,85 +0,0 @@
const {
transformStatements,
deleteFromTargetGraph,
insertIntoTargetGraph,
} = require('./util');
/**
* Dispatch the fetched information to a target graph.
* Note: <share://file/data> will be ADDED to it's own graph.
* We take only care of adding them, not updating triples, this is a TODO
* @param { mu, muAuthSudo } lib - The provided libraries from the host service.
* @param { termObjectChangeSets: { deletes, inserts } } data - The fetched changes sets, which objects of serialized Terms
* [ {
* graph: "<http://foo>",
* subject: "<http://bar>",
* predicate: "<http://baz>",
* object: "<http://boom>^^<http://datatype>"
* }
* ]
* @return {void} Nothing
*/
async function dispatch(lib, data) {
const { mu, fetch } = lib;
let { termObjectChangeSets, termObjectChangeSetsWithContext } = data;
// Both arrays are the same length, so we can zip them together for easier processing
zippedChangeSets = termObjectChangeSets.map((o, i) => ({
original: o,
withContext: termObjectChangeSetsWithContext[i]
}));
console.log(`Received ${zippedChangeSets.length} change sets`)
for (let { original, withContext } of zippedChangeSets) {
let originalDeletes, originalInserts, insertsWithContext, deletesWithContext;
try {
originalInserts = original.inserts.map(o => `${o.subject} ${o.predicate} ${o.object}.`);
originalDeletes = original.deletes.map(o => `${o.subject} ${o.predicate} ${o.object}.`);
} catch (e) {
console.log(`Error while processing change set: ${e}`);
console.log(`Original change set: ${JSON.stringify(original)}`);
throw e;
}
// Extra context needed for mapping from DL to OP model and filtering based on type.
try {
insertsWithContext = withContext.inserts.map(o => `${o.subject} ${o.predicate} ${o.object}.`);
deletesWithContext = withContext.deletes.map(o => `${o.subject} ${o.predicate} ${o.object}.`);
} catch (e) {
console.log(`Error while processing change set with context: ${e}`);
console.log(`Change set with context: ${JSON.stringify(withContext)}`);
throw e;
}
if (originalDeletes.length) {
// Map deletes from DL to OP model
const transformedDeletes = await transformStatements(fetch, deletesWithContext);
if (!transformedDeletes.length) {
console.log(`Warn: Delete statements mapped to empty result.`);
console.log(`Input: ${deletesWithContext}`);
console.log(`Output: ${transformedDeletes}`);
} else {
await deleteFromTargetGraph(lib, transformedDeletes);
}
}
if (originalInserts.length) {
// Map inserts from DL to OP model
const transformedInserts = await transformStatements(fetch, insertsWithContext);
if (!transformedInserts.length) {
console.log(`Warn: Insert statements mapped to empty result.`);
console.log(`Input: ${insertsWithContext}`);
console.log(`Output: ${transformedInserts}`);
} else {
await insertIntoTargetGraph(lib, transformedInserts);
}
}
}
}
module.exports = {
dispatch
};

View File

@@ -1,85 +0,0 @@
const { batchedDbUpdate, transformLandingZoneGraph } = require('./util');
const {
BYPASS_MU_AUTH_FOR_EXPENSIVE_QUERIES,
DIRECT_DATABASE_ENDPOINT,
MU_CALL_SCOPE_ID_INITIAL_SYNC,
BATCH_SIZE,
MAX_DB_RETRY_ATTEMPTS,
SLEEP_BETWEEN_BATCHES,
SLEEP_TIME_AFTER_FAILED_DB_OPERATION,
TARGET_GRAPH,
LANDING_ZONE_GRAPH,
LANDING_ZONE_DATABASE_ENDPOINT
} = require('./config');
const endpoint = BYPASS_MU_AUTH_FOR_EXPENSIVE_QUERIES ? DIRECT_DATABASE_ENDPOINT : process.env.MU_SPARQL_ENDPOINT;
/**
* Dispatch the fetched information to a target graph.
* @param { mu, muAuthSudo } lib - The provided libraries from the host service.
* @param { termObjects } data - The fetched quad information, which objects of serialized Terms
* [ {
* graph: "<http://foo>",
* subject: "<http://bar>",
* predicate: "<http://baz>",
* object: "<http://boom>^^<http://datatype>"
* }
* ]
* @return {void} Nothing
*/
async function dispatch(lib, data) {
const { mu, muAuthSudo } = lib;
const { termObjects } = data;
// Steps:
// 1. Write the triples to the landing zone graph - withouth any mapping or filtering
// 2. One-time reasoning run with the full landing zone graph and write the results to the target graph (on-finish)
if (BYPASS_MU_AUTH_FOR_EXPENSIVE_QUERIES) {
console.warn(`Service configured to skip MU_AUTH!`);
}
console.log(`Using ${endpoint} to insert triples`);
if (termObjects.length) {
const originalInsertTriples = termObjects.map(o => `${o.subject} ${o.predicate} ${o.object}.`);
await batchedDbUpdate(
muAuthSudo.updateSudo,
LANDING_ZONE_GRAPH,
originalInsertTriples,
{ 'mu-call-scope-id': MU_CALL_SCOPE_ID_INITIAL_SYNC },
LANDING_ZONE_DATABASE_ENDPOINT,
BATCH_SIZE,
MAX_DB_RETRY_ATTEMPTS,
SLEEP_BETWEEN_BATCHES,
SLEEP_TIME_AFTER_FAILED_DB_OPERATION
);
}
}
async function onFinishInitialIngest(lib) {
const { muAuthSudo, fetch } = lib;
console.log(`!! On-finish triggered !!`);
const transformedInsertTriples = await transformLandingZoneGraph(fetch, endpoint);
console.log(`Transformed ${transformedInsertTriples.length} triples`);
await batchedDbUpdate(
muAuthSudo.updateSudo,
TARGET_GRAPH,
transformedInsertTriples,
{ 'mu-call-scope-id': MU_CALL_SCOPE_ID_INITIAL_SYNC },
endpoint,
BATCH_SIZE,
MAX_DB_RETRY_ATTEMPTS,
SLEEP_BETWEEN_BATCHES,
SLEEP_TIME_AFTER_FAILED_DB_OPERATION
);
}
module.exports = {
dispatch,
onFinishInitialIngest
};

View File

@@ -1,168 +0,0 @@
const {
MAX_REASONING_RETRY_ATTEMPTS,
SLEEP_TIME_AFTER_FAILED_REASONING_OPERATION,
MAX_DB_RETRY_ATTEMPTS,
SLEEP_BETWEEN_BATCHES,
SLEEP_TIME_AFTER_FAILED_DB_OPERATION,
TARGET_GRAPH,
LANDING_ZONE_GRAPH,
BATCH_SIZE
} = require('./config');
async function batchedDbUpdate(
muUpdate,
graph,
triples,
extraHeaders,
endpoint,
batchSize,
maxAttempts,
sleepBetweenBatches = 1000,
sleepTimeOnFail = 1000,
operation = 'INSERT'
) {
for (let i = 0; i < triples.length; i += batchSize) {
console.log(`Inserting triples in batch: ${i}-${i + batchSize}`);
const batch = triples.slice(i, i + batchSize).join('\n');
const insertCall = async () => {
await muUpdate(`
${operation} DATA {
GRAPH <${graph}> {
${batch}
}
}
`, extraHeaders, endpoint);
};
await operationWithRetry(insertCall, 0, maxAttempts, sleepTimeOnFail);
console.log(`Sleeping before next query execution: ${sleepBetweenBatches}`);
await new Promise(r => setTimeout(r, sleepBetweenBatches));
}
}
async function operationWithRetry(callback,
attempt,
maxAttempts,
sleepTimeOnFail) {
try {
if (typeof callback === "function")
return await callback();
else // Catch error from promise - not how I would do it normally, but allows re use of existing code.
return await callback;
}
catch (e) {
console.log(`Operation failed for ${callback.toString()}, attempt: ${attempt} of ${maxAttempts}`);
console.log(`Error: ${e}`);
console.log(`Sleeping ${sleepTimeOnFail} ms`);
if (attempt >= maxAttempts) {
console.log(`Max attempts reached for ${callback.toString()}, giving up`);
throw e;
}
await new Promise(r => setTimeout(r, sleepTimeOnFail));
return operationWithRetry(callback, ++attempt, maxAttempts, sleepTimeOnFail);
}
}
/**
* Splits an array into two parts, a part that passes and a part that fails a predicate function.
* Credits: https://github.com/benjay10
* @public
* @function partition
* @param {Array} arr - Array to be partitioned
* @param {Function} fn - Function that accepts single argument: an element of the array, and should return a truthy or falsy value.
* @returns {Object} Object that contains keys passes and fails, each representing an array with elemets that pass or fail the predicate respectively
*/
function partition(arr, fn) {
let passes = [], fails = [];
arr.forEach((item) => (fn(item) ? passes : fails).push(item));
return { passes, fails };
}
/**
* Send triples to reasoning service for conversion
*
*/
async function transformTriples(fetch, triples, mapping) {
return await operationWithRetry(mainConversion(fetch, triples, mapping), 0,
MAX_REASONING_RETRY_ATTEMPTS, SLEEP_TIME_AFTER_FAILED_REASONING_OPERATION);
}
async function mainConversion(fetch, triples, mapping) {
let formdata = new URLSearchParams();
formdata.append("data", triples);
let requestOptions = {
method: 'POST',
body: formdata,
redirect: 'follow'
};
const response = await fetch(`http://reasoner/reason/dl2op/${mapping}`, requestOptions)
return await response.text();
}
async function transformStatements(fetch, triples, mapping = 'main') {
console.log(`Received ${JSON.stringify(triples)} to transform`);
const transformedTriples = await transformTriples(fetch, triples.join('\n'), mapping);
statements = transformedTriples ? transformedTriples.replace(/\n{2,}/g, '').split('\n') : [];
console.log(`CONVERSION: FROM ${triples.length} triples to ${statements.length}`);
return statements;
}
async function deleteFromTargetGraph(lib, statements) {
console.log(`Deleting ${statements.length} statements from target graph`);
console.log(`Statements: ${JSON.stringify(statements)}`)
await batchedDbUpdate(
lib.muAuthSudo.updateSudo,
TARGET_GRAPH,
statements,
{},
process.env.MU_SPARQL_ENDPOINT,
BATCH_SIZE,
MAX_DB_RETRY_ATTEMPTS,
SLEEP_BETWEEN_BATCHES,
SLEEP_TIME_AFTER_FAILED_DB_OPERATION,
'DELETE');
}
async function insertIntoTargetGraph(lib, statements) {
console.log(`Inserting ${statements.length} statements into target graph`);
console.log(`Statements: ${JSON.stringify(statements)}`)
await batchedDbUpdate(
lib.muAuthSudo.updateSudo,
TARGET_GRAPH,
statements,
{},
process.env.MU_SPARQL_ENDPOINT,
BATCH_SIZE,
MAX_DB_RETRY_ATTEMPTS,
SLEEP_BETWEEN_BATCHES,
SLEEP_TIME_AFTER_FAILED_DB_OPERATION,
'INSERT');
}
async function transformLandingZoneGraph(fetch, endpoint, mapping = 'main') {
console.log(`Transforming landing zone graph: ${LANDING_ZONE_GRAPH}`);
const response = await fetch(`http://reasoner/reason/dl2op/${mapping}?data=${encodeURIComponent(`${endpoint}?default-graph-uri=&query=CONSTRUCT+%7B%0D%0A%3Fs+%3Fp+%3Fo%0D%0A%7D+WHERE+%7B%0D%0A+GRAPH+<${LANDING_ZONE_GRAPH}>+%7B%0D%0A%3Fs+%3Fp+%3Fo%0D%0A%7D%0D%0A%7D&should-sponge=&format=text%2Fplain&timeout=0&run=+Run+Query`)}`);
const text = await response.text();
const statements = text.replace(/\n{2,}/g, '').split('\n');
return statements;
}
module.exports = {
batchedDbUpdate,
partition,
transformStatements,
transformLandingZoneGraph,
deleteFromTargetGraph,
insertIntoTargetGraph
};

View File

@@ -0,0 +1,11 @@
PREFIX mandaat: <http://data.vlaanderen.be/ns/mandaat#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
CONSTRUCT {
?s mandaat:einde ?endDateTime .
} WHERE {
?s mandaat:einde ?endDate .
BIND(SUBSTR(STR(?endDate), 1, 10) as ?endDateWithoutTimezone)
BIND(STRDT(CONCAT(?endDateWithoutTimezone, 'T02:00:00'), xsd:dateTime) as ?endDateTime)
}

View File

@@ -0,0 +1,11 @@
PREFIX mandaat: <http://data.vlaanderen.be/ns/mandaat#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
CONSTRUCT {
?s mandaat:start ?startDateTime .
} WHERE {
?s mandaat:start ?startDate .
BIND(SUBSTR(STR(?startDate), 1, 10) as ?startDateWithoutTimezone)
BIND(STRDT(CONCAT(?startDateWithoutTimezone, 'T02:00:00'), xsd:dateTime) as ?startDateTime)
}

View File

@@ -0,0 +1,14 @@
PREFIX dc_terms: <http://purl.org/dc/terms/>
PREFIX mandaat: <http://data.vlaanderen.be/ns/mandaat#>
PREFIX person: <http://www.w3.org/ns/person#>
CONSTRUCT {
?s a dc_terms:Agent .
} WHERE {
?s a ?type .
VALUES ?type {
mandaat:Mandataris
person:Person
}
}

View File

@@ -0,0 +1,11 @@
PREFIX ch: <http://data.lblod.info/vocabularies/contacthub/>
PREFIX mandaat: <http://data.vlaanderen.be/ns/mandaat#>
CONSTRUCT {
?s a ch:AgentInPositie .
} WHERE {
?s a ?type .
VALUES ?type {
mandaat:Mandataris
}
}

View File

@@ -0,0 +1,8 @@
PREFIX org: <http://www.w3.org/ns/org#>
CONSTRUCT {
?o org:heldBy ?s.
}
WHERE {
?s org:holds ?o.
}

View File

@@ -0,0 +1,29 @@
PREFIX mandaat: <http://data.vlaanderen.be/ns/mandaat#>
CONSTRUCT {
?s ?p ?o.
} WHERE {
?s a <http://data.vlaanderen.be/ns/mandaat#Mandataris>;
<http://www.w3.org/ns/org#holds> ?mandate;
?p ?o.
?orgaanInTime <http://www.w3.org/ns/org#hasPost> ?mandate ;
<http://data.vlaanderen.be/ns/mandaat#isTijdspecialisatieVan> ?orgaan .
?orgaan <http://data.vlaanderen.be/ns/besluit#bestuurt> ?bestuur .
?bestuur <http://data.vlaanderen.be/ns/besluit#classificatie> ?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 "" .
}
}

View File

@@ -0,0 +1,16 @@
CONSTRUCT {
?s ?p ?o.
} WHERE {
?s a <http://www.w3.org/ns/person#Person>;
?p ?o.
FILTER (?p IN (
<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>,
<http://xmlns.com/foaf/0.1/familyName>,
<http://mu.semte.ch/vocabularies/core/uuid>
))
FILTER NOT EXISTS {
?s ?p "" .
}
}

View File

@@ -0,0 +1,21 @@
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX persoon: <https://data.vlaanderen.be/ns/persoon#>
PREFIX persoon_loket: <http://data.vlaanderen.be/ns/persoon#>
PREFIX person: <http://www.w3.org/ns/person#>
# DL and OP both use persoon:gebruikteVoornaam but with different semantics (!)
# First name: persoon:gebruikteVoornaam => foaf:givenName
# Alternatieve voornaam: foaf:name => persoon:gebruikteVoornaam
# We do both in one query with an OPTIONAL because they need to happen simultaneously
# not to end up in a loop
# Part 1
CONSTRUCT {
?s persoon:gebruikteVoornaam ?name .
} WHERE {
?s a person:Person;
foaf:name ?name .
}

View File

@@ -0,0 +1,22 @@
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX persoon: <https://data.vlaanderen.be/ns/persoon#>
PREFIX persoon_loket: <http://data.vlaanderen.be/ns/persoon#>
PREFIX person: <http://www.w3.org/ns/person#>
# DL and OP both use persoon:gebruikteVoornaam but with different semantics (!)
# First name: persoon:gebruikteVoornaam => foaf:givenName
# Alternatieve voornaam: foaf:name => persoon:gebruikteVoornaam
# We do both in one query with an OPTIONAL because they need to happen simultaneously
# not to end up in a loop
# Part 2
CONSTRUCT {
?s foaf:givenName ?gebruikteVoornaam .
} WHERE {
?s a person:Person ;
persoon_loket:gebruikteVoornaam ?gebruikteVoornaam .
}

View File

@@ -0,0 +1,21 @@
PREFIX schema: <http://schema.org/>
CONSTRUCT {
?s schema:telephone ?cleanedPhoneNumber .
} WHERE {
?s schema:telephone ?phoneNumber .
# Remove all non digits
BIND(REPLACE(?phoneNumber, """[^+\\d]""", "") AS ?scrapeResult)
# Replace leading 00 with +
BIND(REPLACE(?scrapeResult, """^00""", "+") AS ?replacedZeroZero)
BIND(REPLACE(?replacedZeroZero, """^0""", "+32") AS ?defaultBe)
BIND(REPLACE(?defaultBe, """\\+320""", "+32") AS ?extendedDefaultBe)
BIND(REPLACE(?extendedDefaultBe, """^320""", "+32") AS ?finalResult)
BIND(IF(REGEX(?finalResult, """^\\+((32\\d{8})|(324\\d{8})|((?!32)\\d+))$"""), CONCAT("tel:", ?finalResult), ?phoneNumber) AS ?cleanedPhoneNumber)
}

View File

@@ -0,0 +1,10 @@
PREFIX ch: <http://data.lblod.info/vocabularies/contacthub/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
CONSTRUCT {
?s ch:eindedatum ?endDateTime .
} WHERE {
?s ch:eindedatum ?endDate .
BIND(STRDT(CONCAT(STR(?endDate), 'T02:00:00'), xsd:dateTime) as ?endDateTime)
}

View File

@@ -0,0 +1,10 @@
PREFIX ch: <http://data.lblod.info/vocabularies/contacthub/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
CONSTRUCT {
?s ch:startdatum ?startDateTime .
} WHERE {
?s ch:startdatum ?startDate .
BIND(STRDT(CONCAT(STR(?startDate), 'T02:00:00'), xsd:dateTime) as ?startDateTime)
}

View File

@@ -0,0 +1,10 @@
PREFIX ere: <http://data.lblod.info/vocabularies/erediensten/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
CONSTRUCT {
?s ere:geplandeEinddatumAanstelling ?dateTime .
} WHERE {
?s ere:geplandeEinddatumAanstelling ?date .
BIND(STRDT(CONCAT(STR(?date), 'T02:00:00'), xsd:dateTime) as ?dateTime)
}

View File

@@ -0,0 +1,20 @@
PREFIX ch: <http://data.lblod.info/vocabularies/contacthub/>
PREFIX dc_terms: <http://purl.org/dc/terms/>
PREFIX ere: <http://data.lblod.info/vocabularies/erediensten/>
PREFIX lblodlg: <http://data.lblod.info/vocabularies/leidinggevenden/>
PREFIX mandaat: <http://data.vlaanderen.be/ns/mandaat#>
PREFIX person: <http://www.w3.org/ns/person#>
CONSTRUCT {
?s a dc_terms:Agent .
} WHERE {
?s a ?type .
VALUES ?type {
lblodlg:Functionaris
mandaat:Mandataris
ere:EredienstMandataris
ere:RolBedienaar
person:Person
}
}

View File

@@ -0,0 +1,17 @@
PREFIX ch: <http://data.lblod.info/vocabularies/contacthub/>
PREFIX ere: <http://data.lblod.info/vocabularies/erediensten/>
PREFIX lblodlg: <http://data.lblod.info/vocabularies/leidinggevenden/>
PREFIX mandaat: <http://data.vlaanderen.be/ns/mandaat#>
CONSTRUCT {
?s a ch:AgentInPositie .
} WHERE {
?s a ?type .
VALUES ?type {
lblodlg:Functionaris
mandaat:Mandataris
ere:EredienstMandataris
ere:RolBedienaar
}
}

View File

@@ -0,0 +1,8 @@
PREFIX org: <http://www.w3.org/ns/org#>
CONSTRUCT {
?o org:holds ?s.
}
WHERE {
?s org:heldBy ?o.
}

View File

@@ -0,0 +1,8 @@
PREFIX org: <http://www.w3.org/ns/org#>
CONSTRUCT {
?o org:heldBy ?s.
}
WHERE {
?s org:holds ?o.
}

View File

@@ -0,0 +1,11 @@
CONSTRUCT {
?s ?p ?o.
} WHERE {
?s a <http://www.w3.org/ns/locn#Address>;
?p ?o.
FILTER NOT EXISTS {
?s ?p "" .
}
}

View File

@@ -0,0 +1,7 @@
CONSTRUCT {
?s <http://schema.org/contactPoint> ?contactpoint.
}
WHERE {
?s a <http://data.lblod.info/vocabularies/leidinggevenden/Bestuursfunctie>.
?s <http://schema.org/contactPoint> ?contactpoint.
}

View File

@@ -0,0 +1,12 @@
CONSTRUCT {
?s ?p ?o.
} WHERE {
?s a <http://schema.org/ContactPoint>;
?p ?o.
FILTER (?p NOT IN (<http://schema.org/telephone>))
FILTER NOT EXISTS {
?s ?p "" .
}
}

View File

@@ -0,0 +1,15 @@
PREFIX ch: <http://data.lblod.info/vocabularies/contacthub/>
PREFIX ere: <http://data.lblod.info/vocabularies/erediensten/>
CONSTRUCT {
?s ?p ?o.
} WHERE {
?s a <http://data.lblod.info/vocabularies/erediensten/EredienstMandataris>;
?p ?o.
FILTER (?p NOT IN (ch:startdatum, ch:eindedatum, ere:geplandeEinddatumAanstelling))
FILTER NOT EXISTS {
?s ?p "" .
}
}

View File

@@ -0,0 +1,16 @@
CONSTRUCT {
?s ?p ?o.
} WHERE {
?s a <http://www.w3.org/ns/person#Person>;
?p ?o.
FILTER (?p IN (
<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>,
<http://mu.semte.ch/vocabularies/core/uuid>,
<http://xmlns.com/foaf/0.1/familyName>
))
FILTER NOT EXISTS {
?s ?p "" .
}
}

View File

@@ -0,0 +1,10 @@
CONSTRUCT {
?s ?p ?o.
} WHERE {
?s a <http://data.lblod.info/vocabularies/erediensten/RolBedienaar>;
?p ?o.
FILTER NOT EXISTS {
?s ?p "" .
}
}

View File

@@ -0,0 +1,14 @@
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX persoon: <https://data.vlaanderen.be/ns/persoon#>
PREFIX person: <http://www.w3.org/ns/person#>
# DL and OP both use persoon:gebruikteVoornaam but with different semantics (!)
# Alternatieve voornaam: foaf:name => persoon:gebruikteVoornaam
CONSTRUCT {
?s persoon:gebruikteVoornaam ?name .
} WHERE {
?s a person:Person ;
foaf:name ?name .
}

View File

@@ -0,0 +1,14 @@
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX persoon_loket: <http://data.vlaanderen.be/ns/persoon#>
PREFIX person: <http://www.w3.org/ns/person#>
# DL and OP both use persoon:gebruikteVoornaam but with different semantics (!)
# First name: persoon:gebruikteVoornaam => foaf:givenName
CONSTRUCT {
?s foaf:givenName ?gebruikteVoornaam .
} WHERE {
?s a person:Person ;
persoon_loket:gebruikteVoornaam ?gebruikteVoornaam .
}

View File

@@ -0,0 +1,10 @@
CONSTRUCT {
?s ?p ?o.
} WHERE {
?s a <http://data.vlaanderen.be/ns/persoon#Geboorte>;
?p ?o.
FILTER NOT EXISTS {
?s ?p "" .
}
}

View File

@@ -0,0 +1,10 @@
PREFIX persoon: <https://data.vlaanderen.be/ns/persoon#>
PREFIX persoon_loket: <http://data.vlaanderen.be/ns/persoon#>
# Map from http persoon to https persoon namespace
CONSTRUCT {
?s a persoon:Geboorte
} WHERE {
?s a persoon_loket:Geboorte .
}

View File

@@ -0,0 +1,10 @@
PREFIX persoon: <https://data.vlaanderen.be/ns/persoon#>
PREFIX persoon_loket: <http://data.vlaanderen.be/ns/persoon#>
# Map from http persoon to https persoon namespace
CONSTRUCT {
?s persoon:datum ?o .
} WHERE {
?s persoon_loket:datum ?o .
}

View File

@@ -0,0 +1,10 @@
PREFIX persoon: <https://data.vlaanderen.be/ns/persoon#>
PREFIX persoon_loket: <http://data.vlaanderen.be/ns/persoon#>
# Map from http persoon to https persoon namespace
CONSTRUCT {
?s persoon:geslacht ?o .
} WHERE {
?s persoon_loket:geslacht ?o .
}

View File

@@ -0,0 +1,10 @@
PREFIX persoon: <https://data.vlaanderen.be/ns/persoon#>
PREFIX persoon_loket: <http://data.vlaanderen.be/ns/persoon#>
# Map from http persoon to https persoon namespace
CONSTRUCT {
?s persoon:heeftGeboorte ?o .
} WHERE {
?s persoon_loket:heeftGeboorte ?o .
}

View File

@@ -0,0 +1,10 @@
PREFIX persoon: <https://data.vlaanderen.be/ns/persoon#>
PREFIX persoon_loket: <http://data.vlaanderen.be/ns/persoon#>
# Map from http persoon to https persoon namespace
CONSTRUCT {
?s persoon:heeftNationaliteit ?o .
} WHERE {
?s persoon_loket:heeftNationaliteit ?o .
}

View File

@@ -0,0 +1,10 @@
PREFIX persoon: <https://data.vlaanderen.be/ns/persoon#>
PREFIX persoon_loket: <http://data.vlaanderen.be/ns/persoon#>
# Map from http persoon to https persoon namespace
CONSTRUCT {
?s persoon:registratie ?o .
} WHERE {
?s persoon_loket:registratie ?o .
}

View File

@@ -0,0 +1,19 @@
PREFIX generiek: <https://data.vlaanderen.be/ns/generiek#>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX mu: <http://mu.semte.ch/vocabularies/core/>
CONSTRUCT {
?identifier
generiek:gestructureerdeIdentificator ?structuredIdentifier ;
skos:notation "Rijksregisternummer" .
?structuredIdentifier a generiek:GestructureerdeIdentificator ;
mu:uuid ?uuid ;
generiek:lokaleIdentificator ?notation .
}
WHERE {
?identifier skos:notation ?notation.
BIND(MD5(CONCAT(STR(?identifier),"STRUCTURED_IDENTIFIER")) as ?uuid)
BIND(IRI(CONCAT("http://data.lblod.info/id/gestructureerdeIdentificatoren/", ?uuid)) AS ?structuredIdentifier)
}

View File

@@ -0,0 +1,10 @@
PREFIX adms: <http://www.w3.org/ns/adms#>
PREFIX persoon: <https://data.vlaanderen.be/ns/persoon#>
# identifier property in the export is only used for RRN.
CONSTRUCT {
?person persoon:registratie ?rrn .
}
WHERE {
?person adms:identifier ?rrn .
}

View File

@@ -1,40 +0,0 @@
const BATCH_SIZE = parseInt(process.env.BATCH_SIZE) || 100;
const MU_CALL_SCOPE_ID_INITIAL_SYNC = process.env.MU_CALL_SCOPE_ID_INITIAL_SYNC || 'http://redpencil.data.gift/id/concept/muScope/deltas/consumer/initialSync';
const BYPASS_MU_AUTH_FOR_EXPENSIVE_QUERIES = process.env.BYPASS_MU_AUTH_FOR_EXPENSIVE_QUERIES == 'true' ? true : false;
const DIRECT_DATABASE_ENDPOINT = process.env.DIRECT_DATABASE_ENDPOINT || 'http://triplestore:8890/sparql';
const MAX_DB_RETRY_ATTEMPTS = parseInt(process.env.MAX_DB_RETRY_ATTEMPTS || 5);
const MAX_REASONING_RETRY_ATTEMPTS = parseInt(process.env.MAX_REASONING_RETRY_ATTEMPTS || 5);
const SLEEP_BETWEEN_BATCHES = parseInt(process.env.SLEEP_BETWEEN_BATCHES || 1000);
const SLEEP_TIME_AFTER_FAILED_REASONING_OPERATION = parseInt(process.env.SLEEP_TIME_AFTER_FAILED_REASONING_OPERATION || 10000);
const SLEEP_TIME_AFTER_FAILED_DB_OPERATION = parseInt(process.env.SLEEP_TIME_AFTER_FAILED_DB_OPERATION || 60000);
// Graphs
const TARGET_GRAPH = process.env.TARGET_GRAPH || `http://mu.semte.ch/graphs/worship-service`;
const PRIVACY_SENSITIVE_GRAPH = process.env.PRIVACY_SENSITIVE_GRAPH || `http://mu.semte.ch/graphs/worship-privacy-centric-graph`;
const LANDING_ZONE_GRAPH = process.env.DCR_LANDING_ZONE_GRAPH || `http://mu.semte.ch/graphs/landing-zone/leidinggevenden`;
// Mappings
const MAIN_INFO_MAPPING = "main-info";
const PRIVATE_INFO_MAPPING = "private-info";
// ENDPOINTS
const LANDING_ZONE_DATABASE = process.env.DCR_LANDING_ZONE_DATABASE || 'db';
const LANDING_ZONE_DATABASE_ENDPOINT = process.env.DCR_LANDING_ZONE_DATABASE_ENDPOINT || `http://${LANDING_ZONE_DATABASE}:8890/sparql`;
module.exports = {
BATCH_SIZE,
MU_CALL_SCOPE_ID_INITIAL_SYNC,
BYPASS_MU_AUTH_FOR_EXPENSIVE_QUERIES,
DIRECT_DATABASE_ENDPOINT,
MAX_DB_RETRY_ATTEMPTS,
MAX_REASONING_RETRY_ATTEMPTS,
SLEEP_BETWEEN_BATCHES,
SLEEP_TIME_AFTER_FAILED_DB_OPERATION,
SLEEP_TIME_AFTER_FAILED_REASONING_OPERATION,
LANDING_ZONE_GRAPH,
LANDING_ZONE_DATABASE_ENDPOINT,
TARGET_GRAPH,
PRIVACY_SENSITIVE_GRAPH,
MAIN_INFO_MAPPING,
PRIVATE_INFO_MAPPING
};

View File

@@ -1,11 +0,0 @@
const contextConfig = {
addTypes: {
scope: 'all', // 'inserts, 'deletes', 'all' or none. To add rdf:type to subjects of inserts, deletes or both
exhausitive: false, // true or false: find all types for a subject, even if one is already present in delta
},
contextQueries: []
}
module.exports = {
contextConfig
};

View File

@@ -1,114 +0,0 @@
const {
transformStatements,
deleteFromTargetGraph,
insertIntoTargetGraph,
deleteFromPrivateGraph,
insertIntoPrivateGraph
} = require('./util');
const {
MAIN_INFO_MAPPING,
PRIVATE_INFO_MAPPING
} = require('./config');
/**
* Dispatch the fetched information to a target graph.
* Note: <share://file/data> will be ADDED to it's own graph.
* We take only care of adding them, not updating triples, this is a TODO
* @param { mu, muAuthSudo } lib - The provided libraries from the host service.
* @param { termObjectChangeSets: { deletes, inserts } } data - The fetched changes sets, which objects of serialized Terms
* [ {
* graph: "<http://foo>",
* subject: "<http://bar>",
* predicate: "<http://baz>",
* object: "<http://boom>^^<http://datatype>"
* }
* ]
* @return {void} Nothing
*/
async function dispatch(lib, data) {
const { mu, fetch } = lib;
let { termObjectChangeSets, termObjectChangeSetsWithContext } = data;
// Both arrays are the same length, so we can zip them together for easier processing
zippedChangeSets = termObjectChangeSets.map((o, i) => ({
original: o,
withContext: termObjectChangeSetsWithContext[i]
}));
console.log(`Received ${zippedChangeSets.length} change sets`)
for (let { original, withContext } of zippedChangeSets) {
let originalDeletes, originalInserts, insertsWithContext, deletesWithContext;
try {
originalInserts = original.inserts.map(o => `${o.subject} ${o.predicate} ${o.object}.`);
originalDeletes = original.deletes.map(o => `${o.subject} ${o.predicate} ${o.object}.`);
} catch (e) {
console.log(`Error while processing change set: ${e}`);
console.log(`Original change set: ${JSON.stringify(original)}`);
throw e;
}
// Extra context needed for mapping from DL to OP model and filtering based on type.
try {
insertsWithContext = withContext.inserts.map(o => `${o.subject} ${o.predicate} ${o.object}.`);
deletesWithContext = withContext.deletes.map(o => `${o.subject} ${o.predicate} ${o.object}.`);
} catch (e) {
console.log(`Error while processing change set with context: ${e}`);
console.log(`Change set with context: ${JSON.stringify(withContext)}`);
throw e;
}
if (originalDeletes.length) {
// Map main deletes from DL to OP model
const transformedMainDeletes = await transformStatements(fetch, deletesWithContext, MAIN_INFO_MAPPING);
if (!transformedMainDeletes.length) {
console.log(`Warn: Delete main statements mapped to empty result.`);
console.log(`Input: ${deletesWithContext}`);
console.log(`Output: ${transformedMainDeletes}`);
} else {
await deleteFromTargetGraph(lib, transformedMainDeletes);
}
// Map private deletes from DL to OP model
const transformedPrivateDeletes = await transformStatements(fetch, deletesWithContext, PRIVATE_INFO_MAPPING);
if (!transformedPrivateDeletes.length) {
console.log(`Warn: Delete private statements mapped to empty result.`);
console.log(`Input: ${deletesWithContext}`);
console.log(`Output: ${transformedPrivateDeletes}`);
} else {
await deleteFromPrivateGraph(lib, transformedPrivateDeletes);
}
}
if (originalInserts.length) {
// Map main inserts from DL to OP model
const transformedMainInserts = await transformStatements(fetch, insertsWithContext, MAIN_INFO_MAPPING);
if (!transformedMainInserts.length) {
console.log(`Warn: Insert statements mapped to empty result.`);
console.log(`Input: ${insertsWithContext}`);
console.log(`Output: ${transformedMainInserts}`);
} else {
await insertIntoTargetGraph(lib, transformedMainInserts);
}
// Map private inserts from DL to OP model
const transformedPrivateInserts = await transformStatements(fetch, insertsWithContext, PRIVATE_INFO_MAPPING);
if (!transformedPrivateInserts.length) {
console.log(`Warn: Insert statements mapped to empty result.`);
console.log(`Input: ${insertsWithContext}`);
console.log(`Output: ${transformedPrivateInserts}`);
} else {
await insertIntoPrivateGraph(lib, transformedPrivateInserts);
}
}
}
}
module.exports = {
dispatch
};

View File

@@ -1,106 +0,0 @@
const { batchedDbUpdate, transformLandingZoneGraph } = require('./util');
const {
BYPASS_MU_AUTH_FOR_EXPENSIVE_QUERIES,
DIRECT_DATABASE_ENDPOINT,
MU_CALL_SCOPE_ID_INITIAL_SYNC,
BATCH_SIZE,
MAX_DB_RETRY_ATTEMPTS,
SLEEP_BETWEEN_BATCHES,
SLEEP_TIME_AFTER_FAILED_DB_OPERATION,
TARGET_GRAPH,
PRIVACY_SENSITIVE_GRAPH,
LANDING_ZONE_GRAPH,
LANDING_ZONE_DATABASE_ENDPOINT,
MAIN_INFO_MAPPING,
PRIVATE_INFO_MAPPING
} = require('./config');
const endpoint = BYPASS_MU_AUTH_FOR_EXPENSIVE_QUERIES ? DIRECT_DATABASE_ENDPOINT : process.env.MU_SPARQL_ENDPOINT;
/**
* Dispatch the fetched information to a target graph.
* @param { mu, muAuthSudo } lib - The provided libraries from the host service.
* @param { termObjects } data - The fetched quad information, which objects of serialized Terms
* [ {
* graph: "<http://foo>",
* subject: "<http://bar>",
* predicate: "<http://baz>",
* object: "<http://boom>^^<http://datatype>"
* }
* ]
* @return {void} Nothing
*/
async function dispatch(lib, data) {
const { mu, muAuthSudo } = lib;
const { termObjects } = data;
// Steps:
// 1. Write the triples to the landing zone graph - withouth any mapping or filtering
// 2. One-time reasoning run with the full landing zone graph and write the results to the target graph (on-finish)
if (BYPASS_MU_AUTH_FOR_EXPENSIVE_QUERIES) {
console.warn(`Service configured to skip MU_AUTH!`);
}
console.log(`Using ${endpoint} to insert triples`);
if (termObjects.length) {
const originalInsertTriples = termObjects.map(o => `${o.subject} ${o.predicate} ${o.object}.`);
await batchedDbUpdate(
muAuthSudo.updateSudo,
LANDING_ZONE_GRAPH,
originalInsertTriples,
{ 'mu-call-scope-id': MU_CALL_SCOPE_ID_INITIAL_SYNC },
LANDING_ZONE_DATABASE_ENDPOINT,
BATCH_SIZE,
MAX_DB_RETRY_ATTEMPTS,
SLEEP_BETWEEN_BATCHES,
SLEEP_TIME_AFTER_FAILED_DB_OPERATION
);
}
}
async function onFinishInitialIngest(lib) {
const { muAuthSudo, fetch } = lib;
console.log(`!! On-finish triggered !!`);
const transformedMainInsertTriples = await transformLandingZoneGraph(fetch, endpoint, MAIN_INFO_MAPPING);
console.log(`Transformed ${transformedMainInsertTriples.length} main triples`);
if (transformedMainInsertTriples.length) {
await batchedDbUpdate(
muAuthSudo.updateSudo,
TARGET_GRAPH,
transformedMainInsertTriples,
{ 'mu-call-scope-id': MU_CALL_SCOPE_ID_INITIAL_SYNC },
endpoint,
BATCH_SIZE,
MAX_DB_RETRY_ATTEMPTS,
SLEEP_BETWEEN_BATCHES,
SLEEP_TIME_AFTER_FAILED_DB_OPERATION
);
}
const transformedPrivateInsertTriples = await transformLandingZoneGraph(fetch, endpoint, PRIVATE_INFO_MAPPING);
console.log(`Transformed ${transformedPrivateInsertTriples.length} private triples`);
if (transformedPrivateInsertTriples.length) {
await batchedDbUpdate(
muAuthSudo.updateSudo,
PRIVACY_SENSITIVE_GRAPH,
transformedPrivateInsertTriples,
{ 'mu-call-scope-id': MU_CALL_SCOPE_ID_INITIAL_SYNC },
endpoint,
BATCH_SIZE,
MAX_DB_RETRY_ATTEMPTS,
SLEEP_BETWEEN_BATCHES,
SLEEP_TIME_AFTER_FAILED_DB_OPERATION
);
}
}
module.exports = {
dispatch,
onFinishInitialIngest
};

View File

@@ -1,204 +0,0 @@
const {
MAX_REASONING_RETRY_ATTEMPTS,
SLEEP_TIME_AFTER_FAILED_REASONING_OPERATION,
MAX_DB_RETRY_ATTEMPTS,
SLEEP_BETWEEN_BATCHES,
SLEEP_TIME_AFTER_FAILED_DB_OPERATION,
TARGET_GRAPH,
PRIVACY_SENSITIVE_GRAPH,
LANDING_ZONE_GRAPH,
BATCH_SIZE
} = require('./config');
async function batchedDbUpdate(
muUpdate,
graph,
triples,
extraHeaders,
endpoint,
batchSize,
maxAttempts,
sleepBetweenBatches = 1000,
sleepTimeOnFail = 1000,
operation = 'INSERT'
) {
for (let i = 0; i < triples.length; i += batchSize) {
console.log(`Inserting triples in batch: ${i}-${i + batchSize}`);
const batch = triples.slice(i, i + batchSize).join('\n');
const insertCall = async () => {
await muUpdate(`
${operation} DATA {
GRAPH <${graph}> {
${batch}
}
}
`, extraHeaders, endpoint);
};
await operationWithRetry(insertCall, 0, maxAttempts, sleepTimeOnFail);
console.log(`Sleeping before next query execution: ${sleepBetweenBatches}`);
await new Promise(r => setTimeout(r, sleepBetweenBatches));
}
}
async function operationWithRetry(callback,
attempt,
maxAttempts,
sleepTimeOnFail) {
try {
if (typeof callback === "function")
return await callback();
else // Catch error from promise - not how I would do it normally, but allows re use of existing code.
return await callback;
}
catch (e) {
console.log(`Operation failed for ${callback.toString()}, attempt: ${attempt} of ${maxAttempts}`);
console.log(`Error: ${e}`);
console.log(`Sleeping ${sleepTimeOnFail} ms`);
if (attempt >= maxAttempts) {
console.log(`Max attempts reached for ${callback.toString()}, giving up`);
throw e;
}
await new Promise(r => setTimeout(r, sleepTimeOnFail));
return operationWithRetry(callback, ++attempt, maxAttempts, sleepTimeOnFail);
}
}
/**
* Splits an array into two parts, a part that passes and a part that fails a predicate function.
* Credits: https://github.com/benjay10
* @public
* @function partition
* @param {Array} arr - Array to be partitioned
* @param {Function} fn - Function that accepts single argument: an element of the array, and should return a truthy or falsy value.
* @returns {Object} Object that contains keys passes and fails, each representing an array with elemets that pass or fail the predicate respectively
*/
function partition(arr, fn) {
let passes = [], fails = [];
arr.forEach((item) => (fn(item) ? passes : fails).push(item));
return { passes, fails };
}
/**
* Send triples to reasoning service for conversion
*
*/
async function transformTriples(fetch, triples, mapping) {
return await operationWithRetry(mainConversion(fetch, triples, mapping), 0,
MAX_REASONING_RETRY_ATTEMPTS, SLEEP_TIME_AFTER_FAILED_REASONING_OPERATION);
}
async function mainConversion(fetch, triples, mapping) {
let formdata = new URLSearchParams();
formdata.append("data", triples);
let requestOptions = {
method: 'POST',
body: formdata,
redirect: 'follow'
};
const response = await fetch(`http://reasoner/reason/dl2op/${mapping}`, requestOptions)
return await response.text();
}
async function transformStatements(fetch, triples, mapping = 'main') {
console.log(`Received ${JSON.stringify(triples)} to transform`);
const transformedTriples = await transformTriples(fetch, triples.join('\n'), mapping);
statements = transformedTriples ? transformedTriples.replace(/\n{2,}/g, '').split('\n') : [];
console.log(`CONVERSION: FROM ${triples.length} triples to ${statements.length}`);
return statements;
}
async function deleteFromTargetGraph(lib, statements) {
console.log(`Deleting ${statements.length} statements from target graph`);
console.log(`Statements: ${JSON.stringify(statements)}`)
await batchedDbUpdate(
lib.muAuthSudo.updateSudo,
TARGET_GRAPH,
statements,
{},
process.env.MU_SPARQL_ENDPOINT,
BATCH_SIZE,
MAX_DB_RETRY_ATTEMPTS,
SLEEP_BETWEEN_BATCHES,
SLEEP_TIME_AFTER_FAILED_DB_OPERATION,
'DELETE');
}
async function deleteFromPrivateGraph(lib, statements) {
console.log(`Deleting ${statements.length} statements from target graph`);
console.log(`Statements: ${JSON.stringify(statements)}`)
await batchedDbUpdate(
lib.muAuthSudo.updateSudo,
PRIVACY_SENSITIVE_GRAPH,
statements,
{},
process.env.MU_SPARQL_ENDPOINT,
BATCH_SIZE,
MAX_DB_RETRY_ATTEMPTS,
SLEEP_BETWEEN_BATCHES,
SLEEP_TIME_AFTER_FAILED_DB_OPERATION,
'DELETE');
}
async function insertIntoTargetGraph(lib, statements) {
console.log(`Inserting ${statements.length} statements into target graph`);
console.log(`Statements: ${JSON.stringify(statements)}`)
await batchedDbUpdate(
lib.muAuthSudo.updateSudo,
TARGET_GRAPH,
statements,
{},
process.env.MU_SPARQL_ENDPOINT,
BATCH_SIZE,
MAX_DB_RETRY_ATTEMPTS,
SLEEP_BETWEEN_BATCHES,
SLEEP_TIME_AFTER_FAILED_DB_OPERATION,
'INSERT');
}
async function insertIntoPrivateGraph(lib, statements) {
console.log(`Inserting ${statements.length} statements into target graph`);
console.log(`Statements: ${JSON.stringify(statements)}`)
await batchedDbUpdate(
lib.muAuthSudo.updateSudo,
PRIVACY_SENSITIVE_GRAPH,
statements,
{},
process.env.MU_SPARQL_ENDPOINT,
BATCH_SIZE,
MAX_DB_RETRY_ATTEMPTS,
SLEEP_BETWEEN_BATCHES,
SLEEP_TIME_AFTER_FAILED_DB_OPERATION,
'INSERT');
}
async function transformLandingZoneGraph(fetch, endpoint, mapping = 'main') {
console.log(`Transforming landing zone graph: ${LANDING_ZONE_GRAPH}`);
const response = await fetch(`http://reasoner/reason/dl2op/${mapping}?data=${encodeURIComponent(`${endpoint}?default-graph-uri=&query=CONSTRUCT+%7B%0D%0A%3Fs+%3Fp+%3Fo%0D%0A%7D+WHERE+%7B%0D%0A+GRAPH+<${LANDING_ZONE_GRAPH}>+%7B%0D%0A%3Fs+%3Fp+%3Fo%0D%0A%7D%0D%0A%7D&should-sponge=&format=text%2Fplain&timeout=0&run=+Run+Query`)}`);
const text = await response.text();
const statements = text.replace(/\n{2,}/g, '').split('\n');
return statements;
}
module.exports = {
batchedDbUpdate,
partition,
transformStatements,
transformLandingZoneGraph,
deleteFromTargetGraph,
insertIntoTargetGraph,
deleteFromPrivateGraph,
insertIntoPrivateGraph
};

View File

@@ -0,0 +1,11 @@
DELETE DATA {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
<http://data.lblod.info/id/geregistreerdeOrganisaties/8b2e8749-98a9-450f-b2f1-7a93115ef513> <http://www.w3.org/ns/org#classification> <http://data.vlaanderen.be/id/concept/GeregistreerdeOrganisatieClassificatieCode/35833ba2-7371-400b-8df2-2912f66fb153> .
}
}
;
INSERT DATA {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
<http://data.lblod.info/id/geregistreerdeOrganisaties/8b2e8749-98a9-450f-b2f1-7a93115ef513> <http://www.w3.org/ns/org#classification> <http://data.vlaanderen.be/id/concept/GeregistreerdeOrganisatieClassificatieCode/3e5c8e30-95a7-47b0-b0a4-210d5bd440a7> .
}
}

View File

@@ -0,0 +1,33 @@
PREFIX besluit: <http://data.vlaanderen.be/ns/besluit#>
PREFIX regorg: <http://www.w3.org/ns/regorg#>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
DELETE {
GRAPH ?g {
?organisation skos:prefLabel ?oldLabel;
regorg:legalName ?oldName.
}
} INSERT {
GRAPH ?g {
?organisation skos:prefLabel ?newName;
regorg:legalName ?newName.
}
} WHERE {
GRAPH ?g {
?organisation a besluit:Bestuurseenheid;
skos:prefLabel ?oldLabel;
regorg:legalName ?oldName.
}
VALUES ?g {
<http://mu.semte.ch/graphs/administrative-unit>
<http://mu.semte.ch/graphs/shared>
}
VALUES (?organisation ?newName) {
(<http://data.lblod.info/id/bestuurseenheden/99da98a7a0087d3429b084ebfc4eb5d488c593790d4d5af7253982a2e21a6a5f> """Bilzen-Hoeselt""")
(<http://data.lblod.info/id/bestuurseenheden/9ae900a5447b7d727ca6496910220d4389aba7f1869923f1bbf9729bdeca28e2> """Bilzen-Hoeselt""")
(<http://data.lblod.info/id/bestuurseenheden/05099fa1f6524b8b994d86f61549455d2c00b2a956d5308683ac2d1f810fc729> """Tessenderlo-Ham""")
(<http://data.lblod.info/id/bestuurseenheden/42a43591e0db1dca9432f480f0f49f9bd4056c2b131e2fc997497130f5e099d0> """Tessenderlo-Ham""")
(<http://data.lblod.info/id/bestuurseenheden/104f32d7fb8d4b8b61b71717301656f136fe046eabaf126fb3325896b5c2d625> """Tongeren-Borgloon""")
(<http://data.lblod.info/id/bestuurseenheden/ab684633d605d93dbbe6b9ea40667e2bcf03a0856cafe1825e95b7829ed502a3> """Tongeren-Borgloon""")
}
}

View File

@@ -0,0 +1,102 @@
PREFIX regorg: <http://www.w3.org/ns/regorg#>
DELETE {
GRAPH ?g {
?org regorg:orgStatus ?oldStatus.
}
} INSERT {
GRAPH ?g {
?org regorg:orgStatus <http://lblod.data.gift/concepts/d02c4e12bf88d2fdf5123b07f29c9311>.
}
} WHERE {
GRAPH ?g {
?org regorg:orgStatus ?oldStatus.
}
VALUES ?g {
<http://mu.semte.ch/graphs/administrative-unit>
}
VALUES ?org {
<http://data.lblod.info/id/bestuurseenheden/e41ffa04f94bb450a79793020e70d55b5fee5033a5280277998608a9d0913117>
<http://data.lblod.info/id/bestuurseenheden/7125fcbfb7a08f8c01efbed115cea602db249c04afe9b5a2cc298cc7949cd040>
<http://data.lblod.info/id/bestuurseenheden/4f0eb4436c88cf831c35f84e7c34ce32f9ee4e99c5139aff62990e5e531aa1e7>
<http://data.lblod.info/id/bestuurseenheden/6af55cecaea3621f53bb32417a36ed6e3d41b2aa5b9f6d62ab3d80cc8ec11539>
<http://data.lblod.info/id/bestuurseenheden/c362abc58ac4579ff417824ce620962ac57bc344b34fe8f51d21b35ef54da36d>
<http://data.lblod.info/id/bestuurseenheden/72bc672ceb6894d8dd31dc2dff2faad2fd93f4b9f5347d556d092516eaa30aa3>
<http://data.lblod.info/id/bestuurseenheden/d3c76fd84794dad5e12c9eed6d6332dc5e5c99daf0e4ddd7ceebf13d5d6c0ccd>
<http://data.lblod.info/id/bestuurseenheden/bbc23313f4c8585a0c51f15f920d77123356535cd1cad9af38f5707892c7088d>
<http://data.lblod.info/id/bestuurseenheden/a3bd0845853278f478f90b14436d3efa99e73249a84d462f0ddc2e5b6e37a156>
<http://data.lblod.info/id/bestuurseenheden/785e8d5516378c7382ad0e7e356d2301496d810c6cd46d72ccebb455d3ac525e>
<http://data.lblod.info/id/bestuurseenheden/05441122597e0b20b61a8968ea1247c07f9014aad1f1f0709d0b1234e3dfbc2f>
<http://data.lblod.info/id/bestuurseenheden/3834647b5e95ea20f5ffe5a12a09fbd3d7fdf0d187fab385cb7b841422176ad6>
<http://data.lblod.info/id/bestuurseenheden/0327a51548f73607f8a5ec11b36711a3c96703686ad93a3d632718c135c295db>
<http://data.lblod.info/id/bestuurseenheden/e39bc997aa6dd9f240277735efd745b6a0422614d2b36cf01825c86b1b91a9ee>
<http://data.lblod.info/id/bestuurseenheden/0a2d980559eb9f3e0820386541274a72692f495204cd6d951ea1907ecc65829b>
<http://data.lblod.info/id/bestuurseenheden/144c75e403c5084af57f5c0c86252b8759b56baf9694326abbcb5ea40ab69f1a>
<http://data.lblod.info/id/bestuurseenheden/00eb231f51bd6b4f5dcc6536b2d09a174ea8583f5bf28b10bc4fc769a07e511d>
<http://data.lblod.info/id/bestuurseenheden/c69192b973a3ca11531b9657b3ee20aa6688fa33ea1ef1392310fec751980ab2>
<http://data.lblod.info/id/bestuurseenheden/3eb8c9fae32d02359dcd7b22e2a74e67a5b48388df31ad819c27c688fedd10b0>
<http://data.lblod.info/id/bestuurseenheden/ba8a253d98ea7d2ab1afc43e5e2cd145a12ccd86b68e71d023e3c13a83d7498f>
<http://data.lblod.info/id/bestuurseenheden/76c45d60f05bf8afc8c71859342b69cac6a57ee2b320b900a60afd6ba9b8eb9d>
<http://data.lblod.info/id/bestuurseenheden/5d21ccef2f5aa3ccbf3a74c6f25ebe9f0b1ef5a97b87f3d79c86ae9d6d857df8>
<http://data.lblod.info/id/bestuurseenheden/af8969752f6b28c66b6bc402d7987fa38774901ac72b95c5cb7976570487c3c9>
<http://data.lblod.info/id/bestuurseenheden/fb1be873c4b31e391613dfae8e68edd694b1fdf126eeecb502b1e5cad6f2f682>
<http://data.lblod.info/id/bestuurseenheden/f6b131de5e40a0dfd4fc93fedf3b95c9bf156ece718b87fe00469dea2564b3fb>
<http://data.lblod.info/id/bestuurseenheden/3e077115eeb70b649d44e2ebbb218f2cfcac5d84e130c88584f0ec23f7cebbf9>
<http://data.lblod.info/id/bestuurseenheden/1313d4a58f9ecf52cc7e274e3549a759b35e731973cc9f5e07562e5650f594dd>
<http://data.lblod.info/id/bestuurseenheden/7c6b38fa6fc65879cb674a654617de171adfcfacba086fb918da3749dbaa43b5>
<http://data.lblod.info/id/bestuurseenheden/c5dbb08e35e2d090a05d119fef4cc161b5ee1f322698cb8ea3c8c6643a521cf2>
<http://data.lblod.info/id/bestuurseenheden/f2a9a2392d5e4c0f992a84a0871d048a7b91b14681e9980a63aa6ba4b1f7eb8c>
<http://data.lblod.info/id/bestuurseenheden/c0b6b5cf198cd939251dff8ed052177cfff245074c6b8d43394c8c97f7b6e945>
<http://data.lblod.info/id/bestuurseenheden/8ef1e4a43efd913e6b09b0ddea344b7b5d723a344ad559389a55ae1ff0bebc8f>
<http://data.lblod.info/id/bestuurseenheden/04895013fe6301f32aa46deae98abfb833a717ece5a33b6c453674c6d0f4cc5e>
<http://data.lblod.info/id/bestuurseenheden/f56f068943a99059f5bfc3b905fe8848a25a47cfa30fb3ed3d294b47815b2255>
<http://data.lblod.info/id/bestuurseenheden/5a4b2b4f1de1f3b91b0348a7eb6d6aa0ef9420b8ec31374970c9ffe933a79515>
<http://data.lblod.info/id/bestuurseenheden/3f57a17fbcdfc13def910c54948bec11d71d3f75946b0336fffc0587bf18d783>
<http://data.lblod.info/id/bestuurseenheden/2564e21e3650f91625189ccb7eb055e47754a0633c54c7582a899171fef60c52>
<http://data.lblod.info/id/bestuurseenheden/60daf27c2cf12dd123447aa300dd7320890391dbd8dd6b4dd7ec02258f8281b3>
}
}
;
DELETE {
GRAPH ?g {
?org regorg:orgStatus ?oldStatus.
}
} INSERT {
GRAPH ?g {
?org regorg:orgStatus <http://lblod.data.gift/concepts/63cc561de9188d64ba5840a42ae8f0d6>.
}
} WHERE {
GRAPH ?g {
?org regorg:orgStatus ?oldStatus.
}
VALUES ?g {
<http://mu.semte.ch/graphs/administrative-unit>
}
VALUES ?org {
<http://data.lblod.info/id/bestuurseenheden/4b44e6f1-113b-4692-b149-44a889b215f2>
<http://data.lblod.info/id/bestuurseenheden/1ca65d65-54ff-4b44-b750-bd70c91191af>
<http://data.lblod.info/id/bestuurseenheden/7d53f659-3a3b-44b1-9e77-3ea067678c0e>
<http://data.lblod.info/id/bestuurseenheden/b8bb293d-aa22-4b43-bda4-0b6af76e9493>
<http://data.lblod.info/id/bestuurseenheden/5d94b2fd-60ee-4e56-a1f0-a586d596adf6>
<http://data.lblod.info/id/bestuurseenheden/19483103-318e-435a-aa37-45e485406ee9>
<http://data.lblod.info/id/bestuurseenheden/fd41f573-7d9a-4d9f-b7d0-d5b6114d1622>
<http://data.lblod.info/id/bestuurseenheden/add1e4eb-9ec7-4ea6-af82-335aa76b7d48>
<http://data.lblod.info/id/bestuurseenheden/650378e7-1bee-4737-91ff-5b20ac4623cf>
}
}

View File

@@ -0,0 +1,27 @@
PREFIX locn: <http://www.w3.org/ns/locn#>
PREFIX adres: <https://data.vlaanderen.be/ns/adres#>
PREFIX organisatie: <https://data.vlaanderen.be/ns/organisatie#>
PREFIX org: <http://www.w3.org/ns/org#>
DELETE {
GRAPH ?g {
?address locn:adminUnitL2 "Antwerpen".
}
} INSERT {
GRAPH ?g {
?address locn:adminUnitL2 "Oost-Vlaanderen".
}
} WHERE {
GRAPH ?g {
?address a locn:Address;
adres:gemeentenaam "Zwijndrecht";
locn:adminUnitL2 "Antwerpen"
FILTER (EXISTS { ?site organisatie:bestaatUit ?address. } ||
EXISTS { ?site org:siteAddress/locn:address ?address. })
}
VALUES ?g {
<http://mu.semte.ch/graphs/worship-service>
<http://mu.semte.ch/graphs/administrative-unit>
}
}

View File

@@ -0,0 +1,51 @@
PREFIX adres: <https://data.vlaanderen.be/ns/adres#>
PREFIX locn: <http://www.w3.org/ns/locn#>
PREFIX organisatie: <https://data.vlaanderen.be/ns/organisatie#>
PREFIX org: <http://www.w3.org/ns/org#>
DELETE {
GRAPH ?g {
?address adres:gemeentenaam ?oldMunicipality.
}
}
INSERT {
GRAPH ?g {
?address adres:gemeentenaam ?newMunicipality.
}
}
WHERE {
GRAPH ?g {
?address a locn:Address;
adres:gemeentenaam ?oldMunicipality.
FILTER (EXISTS { ?site organisatie:bestaatUit ?address. } ||
EXISTS { ?site org:siteAddress/locn:address ?address. })
}
VALUES ?g {
<http://mu.semte.ch/graphs/administrative-unit>
<http://mu.semte.ch/graphs/worship-service>
}
VALUES (?oldMunicipality ?newMunicipality) {
("Borsbeek" "Antwerpen")
("Galmaarden" "Pajottegem")
("Gooik" "Pajottegem")
("Herne" "Pajottegem")
("Ruiselede" "Wingene")
("Meulebeke" "Tielt")
("De Pinte" "Nazareth-De Pinte")
("Nazareth" "Nazareth-De Pinte")
("Wachtebeke" "Lochristi")
("Moerbeke" "Lokeren")
("Melle" "Merelbeke-Melle")
("Merelbeke" "Merelbeke-Melle")
("Beveren" "Beveren-Kruibeke-Zwijndrecht")
("Kruibeke" "Beveren-Kruibeke-Zwijndrecht")
("Zwijndrecht" "Beveren-Kruibeke-Zwijndrecht")
("Bilzen" "Bilzen-Hoeselt")
("Hoeselt" "Bilzen-Hoeselt")
("Borgloon" "Tongeren-Borgloon")
("Tongeren" "Tongeren-Borgloon")
("Ham" "Tessenderlo-Ham")
("Tessenderlo" "Tessenderlo-Ham")
("Kortessem" "Hasselt")
}
}

View File

@@ -0,0 +1,92 @@
PREFIX locn: <http://www.w3.org/ns/locn#>
PREFIX adres: <https://data.vlaanderen.be/ns/adres#>
PREFIX organisatie: <https://data.vlaanderen.be/ns/organisatie#>
PREFIX org: <http://www.w3.org/ns/org#>
DELETE {
GRAPH ?g {
?address locn:fullAddress ?fullAddress.
}
} INSERT {
GRAPH ?g {
?address locn:fullAddress ?newFullAddress.
}
} WHERE {
GRAPH ?g {
?address locn:fullAddress ?fullAddress;
locn:thoroughfare ?street;
adres:Adresvoorstelling.huisnummer ?buildingNo;
locn:postCode ?postalCode;
adres:gemeentenaam ?municipality;
adres:land ?country.
FILTER NOT EXISTS { ?address adres:Adresvoorstelling.busnummer ?boxNo. }
FILTER (EXISTS { ?site organisatie:bestaatUit ?address. } ||
EXISTS { ?site org:siteAddress/locn:address ?address. })
FILTER (?municipality IN (
"Antwerpen",
"Pajottegem",
"Wingene",
"Tielt",
"Nazareth-De Pinte",
"Lochristi",
"Lokeren",
"Merelbeke-Melle",
"Beveren-Kruibeke-Zwijndrecht",
"Bilzen-Hoeselt",
"Tongeren-Borgloon",
"Tessenderlo-Ham",
"Hasselt"
))
BIND (CONCAT(?street, " ", ?buildingNo, ", ", ?postalCode, " ", ?municipality, ", ", ?country) AS ?newFullAddress)
FILTER (?fullAddress != ?newFullAddress)
}
VALUES ?g {
<http://mu.semte.ch/graphs/administrative-unit>
<http://mu.semte.ch/graphs/worship-service>
}
}
;
DELETE {
GRAPH ?g {
?address locn:fullAddress ?fullAddress.
}
} INSERT {
GRAPH ?g {
?address locn:fullAddress ?newFullAddress.
}
} WHERE {
GRAPH ?g {
?address locn:fullAddress ?fullAddress;
locn:thoroughfare ?street;
adres:Adresvoorstelling.huisnummer ?buildingNo;
adres:Adresvoorstelling.busnummer ?boxNo;
locn:postCode ?postalCode;
adres:gemeentenaam ?municipality;
adres:land ?country.
FILTER (EXISTS { ?site organisatie:bestaatUit ?address. } ||
EXISTS { ?site org:siteAddress/locn:address ?address. })
FILTER (?municipality IN (
"Antwerpen",
"Pajottegem",
"Wingene",
"Tielt",
"Nazareth-De Pinte",
"Lochristi",
"Lokeren",
"Merelbeke-Melle",
"Beveren-Kruibeke-Zwijndrecht",
"Bilzen-Hoeselt",
"Tongeren-Borgloon",
"Tessenderlo-Ham",
"Hasselt"
))
BIND (CONCAT(?street, " ", ?buildingNo, " ", ?boxNo, ", ", ?postalCode, " ", ?municipality, ", ", ?country) AS ?newFullAddress)
FILTER (?fullAddress != ?newFullAddress)
}
VALUES ?g {
<http://mu.semte.ch/graphs/administrative-unit>
<http://mu.semte.ch/graphs/worship-service>
}
}

View File

@@ -0,0 +1,25 @@
PREFIX regorg: <http://www.w3.org/ns/regorg#>
DELETE {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?s regorg:orgStatus ?activeStatus.
}
} INSERT {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?s regorg:orgStatus ?notActiveStatus.
}
} WHERE {
VALUES ?s {
<http://data.lblod.info/id/bestuurseenheden/150440a8bb763d6f53d24ca1c6f1460cb5817c8a261fd90e74aadac3292c3efe>
<http://data.lblod.info/id/bestuurseenheden/41d31a2eb697af977aadf64c73e0bcffb094e0f20e4017fe3b49c507079c0976>
<http://data.lblod.info/id/bestuurseenheden/330516b323c00851cf4b93e6d5d7a2ef4591f68ae6e71ad9c1f432ee70521bb2>
<http://data.lblod.info/id/bestuurseenheden/7dd1250996188607bb1e28df1ebea0b943e8db59c08ea01e3c57672531c43ec6>
<http://data.lblod.info/id/bestuurseenheden/541c1603eb8c01968f95d1f262854134499e00d135cd7c9147d307ccbd1e20fd>
<http://data.lblod.info/id/bestuurseenheden/4deae42b2b25bff407f5abc7cbb6d62eb02afaf2892086341c324fdf2c0e6e92>
<http://data.lblod.info/id/bestuurseenheden/b7af3483cb5d0021c6f5864a433b211fce30246ef685621d104b1951915c21c4>
}
BIND (<http://lblod.data.gift/concepts/d02c4e12bf88d2fdf5123b07f29c9311> AS ?notActiveStatus)
BIND (<http://lblod.data.gift/concepts/63cc561de9188d64ba5840a42ae8f0d6> AS ?activeStatus)
}

View File

@@ -0,0 +1,23 @@
PREFIX regorg: <http://www.w3.org/ns/regorg#>
PREFIX org: <http://www.w3.org/ns/org#>
DELETE {
GRAPH <http://mu.semte.ch/graphs/worship-service> {
?stAmandus regorg:orgStatus ?oldStatus.
}
} INSERT {
GRAPH <http://mu.semte.ch/graphs/worship-service> {
?stAmandus regorg:orgStatus ?notActiveStatus.
?mergerChangeEvent org:originalOrganization ?stAmandus.
}
} WHERE {
GRAPH <http://mu.semte.ch/graphs/worship-service> {
?stAmandus regorg:orgStatus ?oldStatus.
}
VALUES ?stAmandus {
<http://data.lblod.info/id/besturenVanDeEredienst/b18a5d3943087d509d76dcceeba102c3>
}
BIND (<http://data.lblod.info/id/veranderingsgebeurtenissen/677E445E29299CC832892A0F> AS ?mergerChangeEvent)
BIND (<http://lblod.data.gift/concepts/d02c4e12bf88d2fdf5123b07f29c9311> AS ?notActiveStatus)
}

View File

@@ -0,0 +1 @@
http://mu.semte.ch/graphs/administrative-unit

View File

@@ -0,0 +1,169 @@
INSERT {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?orgaanInTime a <http://data.vlaanderen.be/ns/besluit#Bestuursorgaan> ;
<http://mu.semte.ch/vocabularies/core/uuid> ?uuidOrgaanInTime ;
<https://data.vlaanderen.be/ns/generiek#isTijdspecialisatieVan> ?orgaan ;
<http://data.vlaanderen.be/ns/mandaat#bindingStart> "2019-01-01T00:00:00"^^xsd:dateTime .
?orgaan a <http://data.vlaanderen.be/ns/besluit#Bestuursorgaan> ;
<http://mu.semte.ch/vocabularies/core/uuid> ?uuidOrgaan ;
<http://www.w3.org/2004/02/skos/core#prefLabel> ?orgaanLabel ;
<http://www.w3.org/ns/org#classification> ?classificationOrgaan ;
<http://data.vlaanderen.be/ns/besluit#bestuurt> ?bestuurseenheid .
}
} WHERE {
VALUES ?classificationOrgaan {
"http://data.vlaanderen.be/id/concept/BestuursorgaanClassificatieCode/013cc838-173a-4657-b1ae-b00c048df943"
"http://data.vlaanderen.be/id/concept/BestuursorgaanClassificatieCode/b52094ff-21a2-4da8-8dbe-f513365d1528"
"http://data.vlaanderen.be/id/concept/BestuursorgaanClassificatieCode/41caf7e6-b040-4720-9cc2-a96cfffed5b4"
}
VALUES ?bestuurseenheid {
<http://data.lblod.info/id/geregistreerdeOrganisaties/e3343492-9960-4dd3-b862-e440eefc305b>
<http://data.lblod.info/id/geregistreerdeOrganisaties/ff0b817b-1155-4fbd-bdb9-9c9dd01657d3>
<http://data.lblod.info/id/geregistreerdeOrganisaties/81f1473f-9312-4c1d-8fa2-ca0fae3a3a63>
<http://data.lblod.info/id/geregistreerdeOrganisaties/b222a22b-e0df-465a-a4cc-9aa295ab16c0>
<http://data.lblod.info/id/geregistreerdeOrganisaties/f91c2d02-1aee-4cc2-86bc-a259f2c5f538>
<http://data.lblod.info/id/geregistreerdeOrganisaties/e522cf84-9c67-4355-9710-1f4e680670ca>
<http://data.lblod.info/id/geregistreerdeOrganisaties/95d99e57-2ee3-4bd6-acef-2dd7187f1fe7>
<http://data.lblod.info/id/geregistreerdeOrganisaties/a1b090ce-ad45-49cd-b6a6-5483af327e1a>
<http://data.lblod.info/id/geregistreerdeOrganisaties/9e9392bb-4d4b-4c4e-9465-9cf0c9b701d0>
<http://data.lblod.info/id/geregistreerdeOrganisaties/8a623816-309b-4e61-8463-312b446e5196>
<http://data.lblod.info/id/geregistreerdeOrganisaties/1de2d733-ef26-44a7-a713-db50fc0b68a3>
<http://data.lblod.info/id/geregistreerdeOrganisaties/78e7874a-f147-4c99-b6b1-4fdbe076c7b4>
<http://data.lblod.info/id/geregistreerdeOrganisaties/cdc17e8e-4fca-4472-8287-9e8fc2d16754>
<http://data.lblod.info/id/geregistreerdeOrganisaties/18221696-2f63-4cd1-ae22-e7f4cccbad02>
<http://data.lblod.info/id/geregistreerdeOrganisaties/e9f33f85-f209-4eb8-85e0-498a0f6262a4>
<http://data.lblod.info/id/geregistreerdeOrganisaties/230191b8-fc6d-44b5-8dd5-cc1559f3ef87>
<http://data.lblod.info/id/geregistreerdeOrganisaties/d1b5029b-cc97-404b-9343-ce690ec61737>
<http://data.lblod.info/id/geregistreerdeOrganisaties/04138978-6255-4556-9ead-d780e13260f8>
<http://data.lblod.info/id/geregistreerdeOrganisaties/51d266bb-ed87-4ec3-b270-5e6324f5c7b8>
<http://data.lblod.info/id/geregistreerdeOrganisaties/2d2644c4-5364-4b91-bb02-400ff0a81b33>
<http://data.lblod.info/id/geregistreerdeOrganisaties/d167f09f-5fa3-42a2-9f31-3e9805d3643e>
<http://data.lblod.info/id/geregistreerdeOrganisaties/a360d661-fa97-45f0-9177-1b787f949b40>
<http://data.lblod.info/id/geregistreerdeOrganisaties/d3d396b1-eef5-43e0-bca4-1d050676b667>
<http://data.lblod.info/id/geregistreerdeOrganisaties/c87ebc39-e75e-4c51-b881-a10ae9b9283f>
<http://data.lblod.info/id/geregistreerdeOrganisaties/caa7deeb-4fc3-43dc-94c3-f9364d61d6b5>
<http://data.lblod.info/id/geregistreerdeOrganisaties/020b6324-1c66-4695-9824-3147f2155982>
<http://data.lblod.info/id/geregistreerdeOrganisaties/cb1c7564-b85c-48c3-947b-f3ad3acf11e1>
<http://data.lblod.info/id/geregistreerdeOrganisaties/7931cca5-cfe8-40a6-b8c7-b75f764b4ecd>
<http://data.lblod.info/id/geregistreerdeOrganisaties/94631cd3-2d39-4e59-a1bf-cdd3e1b5a65b>
<http://data.lblod.info/id/geregistreerdeOrganisaties/1a61595b-86f4-4273-8a98-7e83c6db6a3f>
<http://data.lblod.info/id/geregistreerdeOrganisaties/5556dd43-4bf1-4353-a9a2-fa80a5837167>
<http://data.lblod.info/id/geregistreerdeOrganisaties/2c3e39f6-d918-46d9-b5e9-54d5638b5c70>
<http://data.lblod.info/id/geregistreerdeOrganisaties/4f156fff-9336-4db9-9673-bb66754227a0>
<http://data.lblod.info/id/geregistreerdeOrganisaties/48e726e6-2172-4039-9956-402993f4b0c3>
<http://data.lblod.info/id/geregistreerdeOrganisaties/ad757c9c-c6a6-48dc-bbf4-1edb35747c90>
<http://data.lblod.info/id/geregistreerdeOrganisaties/5cc1a29b-0e5a-4697-8273-d57dd2affcb0>
<http://data.lblod.info/id/geregistreerdeOrganisaties/638fb1dd-a775-4894-b5ac-ec2fb975842e>
<http://data.lblod.info/id/geregistreerdeOrganisaties/0f9a2ebb-ec76-4d33-90d3-e5d5ff943bb6>
<http://data.lblod.info/id/geregistreerdeOrganisaties/ec01680c-f5b2-45f1-83a5-d69f2f9e99ba>
<http://data.lblod.info/id/geregistreerdeOrganisaties/2d27b3de-40ce-4916-bd25-fa55cac95e28>
<http://data.lblod.info/id/geregistreerdeOrganisaties/b5a89e11-62c9-4711-bf2f-72bb708e1ea0>
<http://data.lblod.info/id/geregistreerdeOrganisaties/5690341e-4403-4147-93d5-404610a3b74b>
<http://data.lblod.info/id/geregistreerdeOrganisaties/8fe066bb-1fbe-411e-a0b9-c3c9310ef9b4>
<http://data.lblod.info/id/geregistreerdeOrganisaties/76b9c075-bdad-4eba-9400-3c82f319afa2>
<http://data.lblod.info/id/geregistreerdeOrganisaties/5b07638d-c577-4594-be40-eea2c2d0e680>
<http://data.lblod.info/id/geregistreerdeOrganisaties/2cbea71f-c0f0-4e12-bc1b-ff92f1d0e9e5>
<http://data.lblod.info/id/geregistreerdeOrganisaties/af9b1777-e024-4073-a554-367c7a46b3c5>
<http://data.lblod.info/id/geregistreerdeOrganisaties/58b924aa-7a30-45c8-bd8d-969874fb7594>
<http://data.lblod.info/id/geregistreerdeOrganisaties/c7a77151-6ccd-44ae-94bc-f672afe6c955>
<http://data.lblod.info/id/geregistreerdeOrganisaties/e9b7e65a-e8b7-4e0d-974d-d0ce6b3680e8>
<http://data.lblod.info/id/geregistreerdeOrganisaties/864cf263-bb92-46d7-8b2b-67915c7dbb15>
<http://data.lblod.info/id/geregistreerdeOrganisaties/90198cd7-efa7-44ac-86f9-2b76780104d4>
<http://data.lblod.info/id/geregistreerdeOrganisaties/0f0cc871-995d-4bb8-9233-881306d16e39>
<http://data.lblod.info/id/geregistreerdeOrganisaties/b9836a4f-da03-4cd3-8357-beb96f4f914d>
<http://data.lblod.info/id/geregistreerdeOrganisaties/db78dac7-7f5e-4142-97ed-8b7a2551642c>
<http://data.lblod.info/id/geregistreerdeOrganisaties/4835fd43-8e5c-4d6f-aa15-19802a8a62f6>
<http://data.lblod.info/id/geregistreerdeOrganisaties/0345303a-d263-4968-ac0d-87afb25705f1>
<http://data.lblod.info/id/geregistreerdeOrganisaties/3a97d38a-caad-4103-a9b2-03c8b20a1a24>
<http://data.lblod.info/id/geregistreerdeOrganisaties/d553356e-6fea-4cce-8672-8911ed6f3f69>
<http://data.lblod.info/id/geregistreerdeOrganisaties/7342b333-0b43-4b6e-8fa1-23dd621c12d2>
<http://data.lblod.info/id/geregistreerdeOrganisaties/f2e9e201-c56e-411a-8b0a-51559c4ae4ec>
<http://data.lblod.info/id/geregistreerdeOrganisaties/420403f8-ac95-4735-8ebc-f89d8f5aebad>
<http://data.lblod.info/id/geregistreerdeOrganisaties/55cbe84f-9b1a-4b38-ad6f-11f14308bf82>
<http://data.lblod.info/id/geregistreerdeOrganisaties/ea0df93d-5c08-4632-a19c-7dd041c907b5>
<http://data.lblod.info/id/geregistreerdeOrganisaties/e4a09b76-1240-46f8-b62b-f0749d4f9863>
<http://data.lblod.info/id/geregistreerdeOrganisaties/948effa4-02be-41a7-a03c-cebf2090dfef>
<http://data.lblod.info/id/geregistreerdeOrganisaties/e75f70ef-59b0-4477-9214-6468bd55680a>
<http://data.lblod.info/id/geregistreerdeOrganisaties/d406c84e-1e51-4c84-91ff-64b1ff5d033c>
<http://data.lblod.info/id/geregistreerdeOrganisaties/ca4273ad-7c01-4f0a-868e-aa88b6100613>
<http://data.lblod.info/id/geregistreerdeOrganisaties/f51c6111-e595-43a7-9052-6cf9cebf8fa6>
<http://data.lblod.info/id/geregistreerdeOrganisaties/4af2a02c-a967-4f6a-b27e-de5ee1620855>
<http://data.lblod.info/id/geregistreerdeOrganisaties/1be7bd51-51cd-4bb3-87fb-751968f9f2d4>
<http://data.lblod.info/id/geregistreerdeOrganisaties/811968a7-0934-4bbd-b6cb-59e344735d73>
<http://data.lblod.info/id/geregistreerdeOrganisaties/89436bea-d90a-4e2f-8559-b0a591858fcb>
<http://data.lblod.info/id/geregistreerdeOrganisaties/0f52cd08-faac-4e31-bd78-d1f961c35808>
<http://data.lblod.info/id/geregistreerdeOrganisaties/7a2ed4b5-e47f-4ee3-8c69-8a7219c6192a>
<http://data.lblod.info/id/geregistreerdeOrganisaties/d7d3061a-35f3-43f7-83a6-42b98c16e676>
<http://data.lblod.info/id/geregistreerdeOrganisaties/4c07f1be-7e00-48ea-ac70-7d9186273fe3>
<http://data.lblod.info/id/geregistreerdeOrganisaties/c48ce652-7d32-4a24-b072-b0e15db57e78>
<http://data.lblod.info/id/geregistreerdeOrganisaties/cd5b169d-28bc-48cf-aeef-a5113692b2ae>
<http://data.lblod.info/id/geregistreerdeOrganisaties/52cda968-eba4-4ae7-b5d8-63099d9ae809>
<http://data.lblod.info/id/geregistreerdeOrganisaties/187b463a-1e2b-4df6-9475-9abd7b8e5483>
<http://data.lblod.info/id/geregistreerdeOrganisaties/e9b771a5-4956-45e8-b151-762d56db70b4>
<http://data.lblod.info/id/geregistreerdeOrganisaties/79df50cd-320a-434d-a1e2-a7386165f31b>
<http://data.lblod.info/id/geregistreerdeOrganisaties/8fd8c217-6484-48c0-a64d-916ba7eb0dbe>
<http://data.lblod.info/id/geregistreerdeOrganisaties/81377f0c-b234-47d8-ba00-7b04454559e4>
<http://data.lblod.info/id/geregistreerdeOrganisaties/8305b1d1-a3f5-40fc-948b-ab8414957033>
<http://data.lblod.info/id/geregistreerdeOrganisaties/9da77bee-26ab-40b7-a755-eb4b67d5ff88>
<http://data.lblod.info/id/geregistreerdeOrganisaties/cbdec98b-778d-42f3-adeb-d205a3ae95f7>
<http://data.lblod.info/id/geregistreerdeOrganisaties/dbb3145c-199f-4dd1-b246-1327b39dafc7>
<http://data.lblod.info/id/geregistreerdeOrganisaties/de5638d3-8b5c-4301-8ae1-0a2b60063681>
<http://data.lblod.info/id/geregistreerdeOrganisaties/d24aefec-7341-4575-9f40-e90289065609>
<http://data.lblod.info/id/geregistreerdeOrganisaties/f833e6f0-b80c-4d5d-a16d-e915c7ac7c5f>
<http://data.lblod.info/id/geregistreerdeOrganisaties/f046264d-b893-47d2-9769-137567f417d1>
<http://data.lblod.info/id/geregistreerdeOrganisaties/e12812a2-7c7c-41b2-935b-477df9df404a>
<http://data.lblod.info/id/geregistreerdeOrganisaties/65c07cc9-8697-47b8-ac9c-981eeedcec09>
<http://data.lblod.info/id/geregistreerdeOrganisaties/a60e73d2-2b6e-4cf0-a0f6-1969cf6d2ff1>
<http://data.lblod.info/id/geregistreerdeOrganisaties/7f027136-6e25-4227-aaab-a6e26029aab0>
<http://data.lblod.info/id/geregistreerdeOrganisaties/88e78916-959a-4f89-b899-2243b19afc87>
<http://data.lblod.info/id/geregistreerdeOrganisaties/74753c7c-e56a-4f86-bb1f-5c0c266743e2>
<http://data.lblod.info/id/geregistreerdeOrganisaties/78298b3b-1dea-4ff5-beb8-36a67cd2b796>
<http://data.lblod.info/id/geregistreerdeOrganisaties/2efb2fd5-7e41-4f61-a340-5960513333d9>
<http://data.lblod.info/id/geregistreerdeOrganisaties/4be9881b-95e0-403a-bb1f-407a5ebd301e>
<http://data.lblod.info/id/geregistreerdeOrganisaties/5f14a83e-2b98-44f0-8f40-8fc618cc98ab>
<http://data.lblod.info/id/geregistreerdeOrganisaties/d42c8aed-4561-49f3-8d35-dbe0fde2553c>
<http://data.lblod.info/id/geregistreerdeOrganisaties/26253779-837e-4d62-bb36-0632a8410b99>
<http://data.lblod.info/id/geregistreerdeOrganisaties/03baec8b-0a59-4777-9026-082d20e8afd1>
<http://data.lblod.info/id/geregistreerdeOrganisaties/272ab4f1-a97a-4de6-b9b5-01d4684c5dc5>
<http://data.lblod.info/id/geregistreerdeOrganisaties/58c2b34f-93b8-469f-8403-6d97d17c1fb6>
<http://data.lblod.info/id/geregistreerdeOrganisaties/8a298ce1-6d90-46e5-8f53-6a5dc7d07d5b>
<http://data.lblod.info/id/geregistreerdeOrganisaties/15220ec1-0b3c-4e03-adbc-24275b080090>
<http://data.lblod.info/id/geregistreerdeOrganisaties/ef414b37-e738-4824-8148-36fa8026b884>
<http://data.lblod.info/id/geregistreerdeOrganisaties/62032c60-45a9-4cb9-b73c-57588a14504f>
<http://data.lblod.info/id/geregistreerdeOrganisaties/be94b266-7a49-4743-ac86-094ac480048b>
<http://data.lblod.info/id/geregistreerdeOrganisaties/a228b316-43a5-4f46-a329-b08c80872994>
<http://data.lblod.info/id/geregistreerdeOrganisaties/182e4511-617a-4538-af9f-b066d98031f6>
<http://data.lblod.info/id/geregistreerdeOrganisaties/3112f575-5f0d-4cee-86e7-ce389ce2d4d0>
<http://data.lblod.info/id/geregistreerdeOrganisaties/23f5dbc2-c225-4022-9544-1cae61df43fe>
<http://data.lblod.info/id/geregistreerdeOrganisaties/b1d15b1f-2e0e-45ec-b593-4bd3f71ed322>
<http://data.lblod.info/id/geregistreerdeOrganisaties/fd2dbeb4-2f86-493f-97b8-b1915f5be0d1>
<http://data.lblod.info/id/geregistreerdeOrganisaties/511438e3-205d-477c-9591-1f5b9def2561>
<http://data.lblod.info/id/geregistreerdeOrganisaties/c76fa344-e6de-4eb9-be4d-c15f67d59d63>
<http://data.lblod.info/id/geregistreerdeOrganisaties/5cf725ad-e71d-4938-b220-935f8cc31b70>
<http://data.lblod.info/id/geregistreerdeOrganisaties/381835b5-34c9-4ea2-ae7b-ea1f27b57ed0>
<http://data.lblod.info/id/geregistreerdeOrganisaties/39748b34-378f-4af5-84eb-8056eac606ba>
<http://data.lblod.info/id/geregistreerdeOrganisaties/15bc6194-c9a7-473c-a416-586523c5e940>
<http://data.lblod.info/id/geregistreerdeOrganisaties/ccee18af-7d0f-448c-8895-c050df95257f>
<http://data.lblod.info/id/geregistreerdeOrganisaties/b37c7cc4-8517-4c72-a4c8-9844508bad09>
<http://data.lblod.info/id/geregistreerdeOrganisaties/79f9c3e3-bea6-40d1-b155-f3ccb04ec0f9>
<http://data.lblod.info/id/geregistreerdeOrganisaties/56e67791-e5e9-4bf2-97a6-651e3247c77a>
<http://data.lblod.info/id/geregistreerdeOrganisaties/8b2e8749-98a9-450f-b2f1-7a93115ef513>
}
?bestuurseenheid a <http://www.w3.org/ns/regorg#RegisteredOrganization> ;
skos:prefLabel ?bestuurseenheidLabel .
?classificationOrgaan skos:prefLabel ?classificationOrgaanLabel .
BIND(CONCAT(?classificationOrgaanLabel, " ", ?bestuurseenheidLabel) as ?orgaanLabel)
BIND(MD5(CONCAT(?bestuurseenheid, ?classificationOrgaan, "orgaanInTime")) as ?uuidOrgaanInTime)
BIND(MD5(CONCAT(?bestuurseenheid, ?classificationOrgaan, "orgaan")) as ?uuidOrgaan)
BIND(IRI(CONCAT("http://data.lblod.info/id/bestuursorganen/", ?uuidOrgaanInTime)) AS ?orgaanInTime)
BIND(IRI(CONCAT("http://data.lblod.info/id/bestuursorganen/", ?uuidOrgaan)) AS ?orgaan)
}
;

View File

@@ -0,0 +1,866 @@
INSERT {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?contact <http://schema.org/telephone> "tel:+3214639730" .
?contact <http://xmlns.com/foaf/0.1/page> "https://www.wzga.be/" .
?contact <http://schema.org/email> "info@wzga.be" .
}
}
WHERE {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?org <http://www.w3.org/ns/adms#identifier> ?id ;
<http://www.w3.org/ns/org#hasPrimarySite> ?primarySite .
?id <http://www.w3.org/2004/02/skos/core#notation> "KBO nummer" ;
<https://data.vlaanderen.be/ns/generiek#gestructureerdeIdentificator>/<https://data.vlaanderen.be/ns/generiek#lokaleIdentificator> "0696665975" .
?primarySite <http://www.w3.org/ns/org#siteAddress> ?contact .
?contact <http://schema.org/contactType> "Primary" .
}
}
INSERT {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?contact <http://schema.org/telephone> "tel:+3232228400" .
?contact <http://xmlns.com/foaf/0.1/page> "https://www.amate.be/over-amate/woonzorg-wuustwezel" .
?contact <http://schema.org/email> "info.amandina@amate.be" .
}
}
WHERE {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?org <http://www.w3.org/ns/adms#identifier> ?id ;
<http://www.w3.org/ns/org#hasPrimarySite> ?primarySite .
?id <http://www.w3.org/2004/02/skos/core#notation> "KBO nummer" ;
<https://data.vlaanderen.be/ns/generiek#gestructureerdeIdentificator>/<https://data.vlaanderen.be/ns/generiek#lokaleIdentificator> "0696899963" .
?primarySite <http://www.w3.org/ns/org#siteAddress> ?contact .
?contact <http://schema.org/contactType> "Primary" .
}
}
INSERT {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?contact <http://schema.org/telephone> "tel:+3255237455" .
?contact <http://xmlns.com/foaf/0.1/page> "https://delinderonse.be/" .
?contact <http://schema.org/email> "wzc@delinderonse.be" .
}
}
WHERE {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?org <http://www.w3.org/ns/adms#identifier> ?id ;
<http://www.w3.org/ns/org#hasPrimarySite> ?primarySite .
?id <http://www.w3.org/2004/02/skos/core#notation> "KBO nummer" ;
<https://data.vlaanderen.be/ns/generiek#gestructureerdeIdentificator>/<https://data.vlaanderen.be/ns/generiek#lokaleIdentificator> "0212165922" .
?primarySite <http://www.w3.org/ns/org#siteAddress> ?contact .
?contact <http://schema.org/contactType> "Primary" .
}
}
INSERT {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?contact <http://schema.org/telephone> "tel:+3252251320" .
?contact <http://xmlns.com/foaf/0.1/page> "https://www.waasmunster.be/product/197/woonzorgcentrum-t-heuverveld" .
?contact <http://schema.org/email> "info@samenouder.be" .
}
}
WHERE {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?org <http://www.w3.org/ns/adms#identifier> ?id ;
<http://www.w3.org/ns/org#hasPrimarySite> ?primarySite .
?id <http://www.w3.org/2004/02/skos/core#notation> "KBO nummer" ;
<https://data.vlaanderen.be/ns/generiek#gestructureerdeIdentificator>/<https://data.vlaanderen.be/ns/generiek#lokaleIdentificator> "0698838775" .
?primarySite <http://www.w3.org/ns/org#siteAddress> ?contact .
?contact <http://schema.org/contactType> "Primary" .
}
}
INSERT {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?contact <http://schema.org/telephone> "tel:+3224472747" .
?contact <http://xmlns.com/foaf/0.1/page> "http://www.metsense.be/nl/onze-uitbatingen#buurtrestaurants" .
?contact <http://schema.org/email> "buurtrestaurant@tvondel.be" .
}
}
WHERE {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?org <http://www.w3.org/ns/adms#identifier> ?id ;
<http://www.w3.org/ns/org#hasPrimarySite> ?primarySite .
?id <http://www.w3.org/2004/02/skos/core#notation> "KBO nummer" ;
<https://data.vlaanderen.be/ns/generiek#gestructureerdeIdentificator>/<https://data.vlaanderen.be/ns/generiek#lokaleIdentificator> "0712777279" .
?primarySite <http://www.w3.org/ns/org#siteAddress> ?contact .
?contact <http://schema.org/contactType> "Primary" .
}
}
INSERT {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?contact <http://schema.org/telephone> "tel:+3251488172" .
?contact <http://xmlns.com/foaf/0.1/page> "https://www.dezonnewende.gvo.be/nl/home/" .
?contact <http://schema.org/email> "dezonnewende@gvo.be" .
}
}
WHERE {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?org <http://www.w3.org/ns/adms#identifier> ?id ;
<http://www.w3.org/ns/org#hasPrimarySite> ?primarySite .
?id <http://www.w3.org/2004/02/skos/core#notation> "KBO nummer" ;
<https://data.vlaanderen.be/ns/generiek#gestructureerdeIdentificator>/<https://data.vlaanderen.be/ns/generiek#lokaleIdentificator> "0735627214" .
?primarySite <http://www.w3.org/ns/org#siteAddress> ?contact .
?contact <http://schema.org/contactType> "Primary" .
}
}
INSERT {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?contact <http://schema.org/telephone> "tel:+3215321741" .
?contact <http://xmlns.com/foaf/0.1/page> "https://www.duffel.be/huishoudhulp" .
?contact <http://schema.org/email> "dco.duffel@skynet.be" .
}
}
WHERE {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?org <http://www.w3.org/ns/adms#identifier> ?id ;
<http://www.w3.org/ns/org#hasPrimarySite> ?primarySite .
?id <http://www.w3.org/2004/02/skos/core#notation> "KBO nummer" ;
<https://data.vlaanderen.be/ns/generiek#gestructureerdeIdentificator>/<https://data.vlaanderen.be/ns/generiek#lokaleIdentificator> "0462239939" .
?primarySite <http://www.w3.org/ns/org#siteAddress> ?contact .
?contact <http://schema.org/contactType> "Primary" .
}
}
INSERT {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?contact <http://schema.org/telephone> "tel:+3237606060" .
?contact <http://xmlns.com/foaf/0.1/page> "https://vitaz.be/" .
?contact <http://schema.org/email> "info@vitaz.be" .
}
}
WHERE {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?org <http://www.w3.org/ns/adms#identifier> ?id ;
<http://www.w3.org/ns/org#hasPrimarySite> ?primarySite .
?id <http://www.w3.org/2004/02/skos/core#notation> "KBO nummer" ;
<https://data.vlaanderen.be/ns/generiek#gestructureerdeIdentificator>/<https://data.vlaanderen.be/ns/generiek#lokaleIdentificator> "0881291322" .
?primarySite <http://www.w3.org/ns/org#siteAddress> ?contact .
?contact <http://schema.org/contactType> "Primary" .
}
}
INSERT {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?contact <http://schema.org/telephone> "tel:+3257208071" .
?contact <http://xmlns.com/foaf/0.1/page> "https://wieltjesgracht.be/" .
?contact <http://schema.org/email> "info@wieltjesgracht.be" .
}
}
WHERE {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?org <http://www.w3.org/ns/adms#identifier> ?id ;
<http://www.w3.org/ns/org#hasPrimarySite> ?primarySite .
?id <http://www.w3.org/2004/02/skos/core#notation> "KBO nummer" ;
<https://data.vlaanderen.be/ns/generiek#gestructureerdeIdentificator>/<https://data.vlaanderen.be/ns/generiek#lokaleIdentificator> "0262925527" .
?primarySite <http://www.w3.org/ns/org#siteAddress> ?contact .
?contact <http://schema.org/contactType> "Primary" .
}
}
INSERT {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?contact <http://schema.org/telephone> "tel:+3251237111" .
?contact <http://xmlns.com/foaf/0.1/page> "https://www.azdelta.be/nl" .
?contact <http://schema.org/email> "info@azdelta.be" .
}
}
WHERE {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?org <http://www.w3.org/ns/adms#identifier> ?id ;
<http://www.w3.org/ns/org#hasPrimarySite> ?primarySite .
?id <http://www.w3.org/2004/02/skos/core#notation> "KBO nummer" ;
<https://data.vlaanderen.be/ns/generiek#gestructureerdeIdentificator>/<https://data.vlaanderen.be/ns/generiek#lokaleIdentificator> "0505931808" .
?primarySite <http://www.w3.org/ns/org#siteAddress> ?contact .
?contact <http://schema.org/contactType> "Primary" .
}
}
INSERT {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?contact <http://schema.org/telephone> "tel:+3232177111" .
?contact <http://xmlns.com/foaf/0.1/page> "https://www.zna.be/nl" .
?contact <http://schema.org/email> "communicatie@zna.be" .
}
}
WHERE {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?org <http://www.w3.org/ns/adms#identifier> ?id ;
<http://www.w3.org/ns/org#hasPrimarySite> ?primarySite .
?id <http://www.w3.org/2004/02/skos/core#notation> "KBO nummer" ;
<https://data.vlaanderen.be/ns/generiek#gestructureerdeIdentificator>/<https://data.vlaanderen.be/ns/generiek#lokaleIdentificator> "0862382656" .
?primarySite <http://www.w3.org/ns/org#siteAddress> ?contact .
?contact <http://schema.org/contactType> "Primary" .
}
}
INSERT {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?contact <http://schema.org/telephone> "tel:+3250277530" .
?contact <http://xmlns.com/foaf/0.1/page> "https://terluchte.be/" .
?contact <http://schema.org/email> "info@terluchte.be" .
}
}
WHERE {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?org <http://www.w3.org/ns/adms#identifier> ?id ;
<http://www.w3.org/ns/org#hasPrimarySite> ?primarySite .
?id <http://www.w3.org/2004/02/skos/core#notation> "KBO nummer" ;
<https://data.vlaanderen.be/ns/generiek#gestructureerdeIdentificator>/<https://data.vlaanderen.be/ns/generiek#lokaleIdentificator> "0738896510" .
?primarySite <http://www.w3.org/ns/org#siteAddress> ?contact .
?contact <http://schema.org/contactType> "Primary" .
}
}
INSERT {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?contact <http://schema.org/telephone> "tel:+3211335577" .
?contact <http://xmlns.com/foaf/0.1/page> "https://www.jessazh.be/" .
?contact <http://schema.org/email> "info@jessazh.be" .
}
}
WHERE {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?org <http://www.w3.org/ns/adms#identifier> ?id ;
<http://www.w3.org/ns/org#hasPrimarySite> ?primarySite .
?id <http://www.w3.org/2004/02/skos/core#notation> "KBO nummer" ;
<https://data.vlaanderen.be/ns/generiek#gestructureerdeIdentificator>/<https://data.vlaanderen.be/ns/generiek#lokaleIdentificator> "0821142117" .
?primarySite <http://www.w3.org/ns/org#siteAddress> ?contact .
?contact <http://schema.org/contactType> "Primary" .
}
}
INSERT {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?contact <http://schema.org/telephone> "tel:+3214406011" .
?contact <http://xmlns.com/foaf/0.1/page> "https://www.azturnhout.be/" .
?contact <http://schema.org/email> "info@azturnhout.be" .
}
}
WHERE {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?org <http://www.w3.org/ns/adms#identifier> ?id ;
<http://www.w3.org/ns/org#hasPrimarySite> ?primarySite .
?id <http://www.w3.org/2004/02/skos/core#notation> "KBO nummer" ;
<https://data.vlaanderen.be/ns/generiek#gestructureerdeIdentificator>/<https://data.vlaanderen.be/ns/generiek#lokaleIdentificator> "0897191602" .
?primarySite <http://www.w3.org/ns/org#siteAddress> ?contact .
?contact <http://schema.org/contactType> "Primary" .
}
}
INSERT {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?contact <http://schema.org/telephone> "tel:+3214246111" .
?contact <http://xmlns.com/foaf/0.1/page> "https://www.azherentals.be/" .
?contact <http://schema.org/email> "directiesecretariaat@azherentals.be" .
}
}
WHERE {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?org <http://www.w3.org/ns/adms#identifier> ?id ;
<http://www.w3.org/ns/org#hasPrimarySite> ?primarySite .
?id <http://www.w3.org/2004/02/skos/core#notation> "KBO nummer" ;
<https://data.vlaanderen.be/ns/generiek#gestructureerdeIdentificator>/<https://data.vlaanderen.be/ns/generiek#lokaleIdentificator> "0821734213" .
?primarySite <http://www.w3.org/ns/org#siteAddress> ?contact .
?contact <http://schema.org/contactType> "Primary" .
}
}
INSERT {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?contact <http://schema.org/telephone> "tel:+3255336111" .
?contact <http://xmlns.com/foaf/0.1/page> "https://www.azoudenaarde.be/" .
?contact <http://schema.org/email> "info@azoudenaarde.be" .
}
}
WHERE {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?org <http://www.w3.org/ns/adms#identifier> ?id ;
<http://www.w3.org/ns/org#hasPrimarySite> ?primarySite .
?id <http://www.w3.org/2004/02/skos/core#notation> "KBO nummer" ;
<https://data.vlaanderen.be/ns/generiek#gestructureerdeIdentificator>/<https://data.vlaanderen.be/ns/generiek#lokaleIdentificator> "0870757023" .
?primarySite <http://www.w3.org/ns/org#siteAddress> ?contact .
?contact <http://schema.org/contactType> "Primary" .
}
}
INSERT {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?contact <http://xmlns.com/foaf/0.1/page> "https://www.zmk.be/index.html" .
}
}
WHERE {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?org <http://www.w3.org/ns/adms#identifier> ?id ;
<http://www.w3.org/ns/org#hasPrimarySite> ?primarySite .
?id <http://www.w3.org/2004/02/skos/core#notation> "KBO nummer" ;
<https://data.vlaanderen.be/ns/generiek#gestructureerdeIdentificator>/<https://data.vlaanderen.be/ns/generiek#lokaleIdentificator> "0475777476" .
?primarySite <http://www.w3.org/ns/org#siteAddress> ?contact .
?contact <http://schema.org/contactType> "Primary" .
}
}
INSERT {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?contact <http://schema.org/telephone> "tel:+3222546400" .
?contact <http://xmlns.com/foaf/0.1/page> "https://www.azjanportaels.be/nl" .
?contact <http://schema.org/email> "info@azjanportaels.be" .
}
}
WHERE {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?org <http://www.w3.org/ns/adms#identifier> ?id ;
<http://www.w3.org/ns/org#hasPrimarySite> ?primarySite .
?id <http://www.w3.org/2004/02/skos/core#notation> "KBO nummer" ;
<https://data.vlaanderen.be/ns/generiek#gestructureerdeIdentificator>/<https://data.vlaanderen.be/ns/generiek#lokaleIdentificator> "0267386438" .
?primarySite <http://www.w3.org/ns/org#siteAddress> ?contact .
?contact <http://schema.org/contactType> "Primary" .
}
}
INSERT {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?contact <http://schema.org/telephone> "tel:+3256636363" .
?contact <http://xmlns.com/foaf/0.1/page> "https://www.azgroeninge.be/start" .
?contact <http://schema.org/email> "info@azgroeninge.be" .
}
}
WHERE {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?org <http://www.w3.org/ns/adms#identifier> ?id ;
<http://www.w3.org/ns/org#hasPrimarySite> ?primarySite .
?id <http://www.w3.org/2004/02/skos/core#notation> "KBO nummer" ;
<https://data.vlaanderen.be/ns/generiek#gestructureerdeIdentificator>/<https://data.vlaanderen.be/ns/generiek#lokaleIdentificator> "0472222625" .
?primarySite <http://www.w3.org/ns/org#siteAddress> ?contact .
?contact <http://schema.org/contactType> "Primary" .
}
}
INSERT {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?contact <http://schema.org/telephone> "tel:+3214234085" .
?contact <http://xmlns.com/foaf/0.1/page> "https://www.het-pareltje.be/" .
?contact <http://schema.org/email> "info@het-pareltje.be" .
}
}
WHERE {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?org <http://www.w3.org/ns/adms#identifier> ?id ;
<http://www.w3.org/ns/org#hasPrimarySite> ?primarySite .
?id <http://www.w3.org/2004/02/skos/core#notation> "KBO nummer" ;
<https://data.vlaanderen.be/ns/generiek#gestructureerdeIdentificator>/<https://data.vlaanderen.be/ns/generiek#lokaleIdentificator> "0883325451" .
?primarySite <http://www.w3.org/ns/org#siteAddress> ?contact .
?contact <http://schema.org/contactType> "Primary" .
}
}
INSERT {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?contact <http://xmlns.com/foaf/0.1/page> "https://www.svkbodukam.be/" .
}
}
WHERE {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?org <http://www.w3.org/ns/adms#identifier> ?id ;
<http://www.w3.org/ns/org#hasPrimarySite> ?primarySite .
?id <http://www.w3.org/2004/02/skos/core#notation> "KBO nummer" ;
<https://data.vlaanderen.be/ns/generiek#gestructureerdeIdentificator>/<https://data.vlaanderen.be/ns/generiek#lokaleIdentificator> "0865010069" .
?primarySite <http://www.w3.org/ns/org#siteAddress> ?contact .
?contact <http://schema.org/contactType> "Primary" .
}
}
INSERT {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?contact <http://schema.org/telephone> "tel:+3215226855" .
?contact <http://xmlns.com/foaf/0.1/page> "https://www.svkonderdak.be/" .
?contact <http://schema.org/email> "info@svkonderdak.be" .
}
}
WHERE {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?org <http://www.w3.org/ns/adms#identifier> ?id ;
<http://www.w3.org/ns/org#hasPrimarySite> ?primarySite .
?id <http://www.w3.org/2004/02/skos/core#notation> "KBO nummer" ;
<https://data.vlaanderen.be/ns/generiek#gestructureerdeIdentificator>/<https://data.vlaanderen.be/ns/generiek#lokaleIdentificator> "0473360790" .
?primarySite <http://www.w3.org/ns/org#siteAddress> ?contact .
?contact <http://schema.org/contactType> "Primary" .
}
}
INSERT {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?contact <http://schema.org/telephone> "tel:+3214254580" .
?contact <http://xmlns.com/foaf/0.1/page> "http://www.terkempen.be/" .
?contact <http://schema.org/email> "info@terkempen.be" .
}
}
WHERE {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?org <http://www.w3.org/ns/adms#identifier> ?id ;
<http://www.w3.org/ns/org#hasPrimarySite> ?primarySite .
?id <http://www.w3.org/2004/02/skos/core#notation> "KBO nummer" ;
<https://data.vlaanderen.be/ns/generiek#gestructureerdeIdentificator>/<https://data.vlaanderen.be/ns/generiek#lokaleIdentificator> "0871619135" .
?primarySite <http://www.w3.org/ns/org#siteAddress> ?contact .
?contact <http://schema.org/contactType> "Primary" .
}
}
INSERT {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?contact <http://xmlns.com/foaf/0.1/page> "https://www.wzcdebuurt.be/" .
}
}
WHERE {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?org <http://www.w3.org/ns/adms#identifier> ?id ;
<http://www.w3.org/ns/org#hasPrimarySite> ?primarySite .
?id <http://www.w3.org/2004/02/skos/core#notation> "KBO nummer" ;
<https://data.vlaanderen.be/ns/generiek#gestructureerdeIdentificator>/<https://data.vlaanderen.be/ns/generiek#lokaleIdentificator> "0870855409" .
?primarySite <http://www.w3.org/ns/org#siteAddress> ?contact .
?contact <http://schema.org/contactType> "Primary" .
}
}
INSERT {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?contact <http://schema.org/telephone> "tel:+3232943734" .
?contact <http://xmlns.com/foaf/0.1/page> "https://www.sensespraktijkhuis.be/" .
?contact <http://schema.org/email> "info@sensespraktijkhuis.be" .
}
}
WHERE {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?org <http://www.w3.org/ns/adms#identifier> ?id ;
<http://www.w3.org/ns/org#hasPrimarySite> ?primarySite .
?id <http://www.w3.org/2004/02/skos/core#notation> "KBO nummer" ;
<https://data.vlaanderen.be/ns/generiek#gestructureerdeIdentificator>/<https://data.vlaanderen.be/ns/generiek#lokaleIdentificator> "0632607670" .
?primarySite <http://www.w3.org/ns/org#siteAddress> ?contact .
?contact <http://schema.org/contactType> "Primary" .
}
}
INSERT {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?contact <http://schema.org/telephone> "tel:+3228010180" .
?contact <http://xmlns.com/foaf/0.1/page> "https://www.ahasverus.be/" .
?contact <http://schema.org/email> "directie@ahasverus.be" .
}
}
WHERE {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?org <http://www.w3.org/ns/adms#identifier> ?id ;
<http://www.w3.org/ns/org#hasPrimarySite> ?primarySite .
?id <http://www.w3.org/2004/02/skos/core#notation> "KBO nummer" ;
<https://data.vlaanderen.be/ns/generiek#gestructureerdeIdentificator>/<https://data.vlaanderen.be/ns/generiek#lokaleIdentificator> "0471364174" .
?primarySite <http://www.w3.org/ns/org#siteAddress> ?contact .
?contact <http://schema.org/contactType> "Primary" .
}
}
INSERT {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?contact <http://schema.org/telephone> "tel:+3216885864" .
?contact <http://xmlns.com/foaf/0.1/page> "https://onshartkloptvooru.be/voorziening/deycken-brug/" .
?contact <http://schema.org/email> "algemeen@deyckenbrug.be" .
}
}
WHERE {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?org <http://www.w3.org/ns/adms#identifier> ?id ;
<http://www.w3.org/ns/org#hasPrimarySite> ?primarySite .
?id <http://www.w3.org/2004/02/skos/core#notation> "KBO nummer" ;
<https://data.vlaanderen.be/ns/generiek#gestructureerdeIdentificator>/<https://data.vlaanderen.be/ns/generiek#lokaleIdentificator> "0861157387" .
?primarySite <http://www.w3.org/ns/org#siteAddress> ?contact .
?contact <http://schema.org/contactType> "Primary" .
}
}
INSERT {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?contact <http://schema.org/telephone> "tel:+3237661340" .
?contact <http://xmlns.com/foaf/0.1/page> "http://www.drietakt.be/" .
?contact <http://schema.org/email> "info@drietakt.be" .
}
}
WHERE {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?org <http://www.w3.org/ns/adms#identifier> ?id ;
<http://www.w3.org/ns/org#hasPrimarySite> ?primarySite .
?id <http://www.w3.org/2004/02/skos/core#notation> "KBO nummer" ;
<https://data.vlaanderen.be/ns/generiek#gestructureerdeIdentificator>/<https://data.vlaanderen.be/ns/generiek#lokaleIdentificator> "0476803795" .
?primarySite <http://www.w3.org/ns/org#siteAddress> ?contact .
?contact <http://schema.org/contactType> "Primary" .
}
}
INSERT {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?contact <http://schema.org/telephone> "tel:+3216791000" .
?contact <http://xmlns.com/foaf/0.1/page> "https://www.korian.be/nl/woonzorgcentra/kor/131-woonzorgzone-de-kouter" .
?contact <http://schema.org/email> "info@wzzdekouter.be" .
}
}
WHERE {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?org <http://www.w3.org/ns/adms#identifier> ?id ;
<http://www.w3.org/ns/org#hasPrimarySite> ?primarySite .
?id <http://www.w3.org/2004/02/skos/core#notation> "KBO nummer" ;
<https://data.vlaanderen.be/ns/generiek#gestructureerdeIdentificator>/<https://data.vlaanderen.be/ns/generiek#lokaleIdentificator> "0848738221" .
?primarySite <http://www.w3.org/ns/org#siteAddress> ?contact .
?contact <http://schema.org/contactType> "Primary" .
}
}
INSERT {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?contact <http://schema.org/telephone> "tel:+3251655278" .
?contact <http://xmlns.com/foaf/0.1/page> "https://www.amphora.gvo.be/nl/home/" .
?contact <http://schema.org/email> "amphora@gvo.be" .
}
}
WHERE {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?org <http://www.w3.org/ns/adms#identifier> ?id ;
<http://www.w3.org/ns/org#hasPrimarySite> ?primarySite .
?id <http://www.w3.org/2004/02/skos/core#notation> "KBO nummer" ;
<https://data.vlaanderen.be/ns/generiek#gestructureerdeIdentificator>/<https://data.vlaanderen.be/ns/generiek#lokaleIdentificator> "0833161902" .
?primarySite <http://www.w3.org/ns/org#siteAddress> ?contact .
?contact <http://schema.org/contactType> "Primary" .
}
}
INSERT {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?contact <http://schema.org/telephone> "tel:+3256264434" .
?contact <http://xmlns.com/foaf/0.1/page> "https://www.vzwmentor.be/" .
?contact <http://schema.org/email> "info@mentorvzw.be" .
}
}
WHERE {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?org <http://www.w3.org/ns/adms#identifier> ?id ;
<http://www.w3.org/ns/org#hasPrimarySite> ?primarySite .
?id <http://www.w3.org/2004/02/skos/core#notation> "KBO nummer" ;
<https://data.vlaanderen.be/ns/generiek#gestructureerdeIdentificator>/<https://data.vlaanderen.be/ns/generiek#lokaleIdentificator> "0472751175" .
?primarySite <http://www.w3.org/ns/org#siteAddress> ?contact .
?contact <http://schema.org/contactType> "Primary" .
}
}
INSERT {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?contact <http://schema.org/telephone> "tel:+3250826636" .
?contact <http://xmlns.com/foaf/0.1/page> "https://www.zorg-en-welzijn-zedelgem.gvo.be/" .
?contact <http://schema.org/email> "info@zwz.be" .
}
}
WHERE {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?org <http://www.w3.org/ns/adms#identifier> ?id ;
<http://www.w3.org/ns/org#hasPrimarySite> ?primarySite .
?id <http://www.w3.org/2004/02/skos/core#notation> "KBO nummer" ;
<https://data.vlaanderen.be/ns/generiek#gestructureerdeIdentificator>/<https://data.vlaanderen.be/ns/generiek#lokaleIdentificator> "0832024923" .
?primarySite <http://www.w3.org/ns/org#siteAddress> ?contact .
?contact <http://schema.org/contactType> "Primary" .
}
}
INSERT {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?contact <http://schema.org/telephone> "tel:+3293113000" .
?contact <http://xmlns.com/foaf/0.1/page> "https://www.wzczilverbos.be/" .
?contact <http://schema.org/email> "info@wzczilverbos.be" .
}
}
WHERE {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?org <http://www.w3.org/ns/adms#identifier> ?id ;
<http://www.w3.org/ns/org#hasPrimarySite> ?primarySite .
?id <http://www.w3.org/2004/02/skos/core#notation> "KBO nummer" ;
<https://data.vlaanderen.be/ns/generiek#gestructureerdeIdentificator>/<https://data.vlaanderen.be/ns/generiek#lokaleIdentificator> "0644984078" .
?primarySite <http://www.w3.org/ns/org#siteAddress> ?contact .
?contact <http://schema.org/contactType> "Primary" .
}
}
INSERT {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?contact <http://schema.org/telephone> "tel:+3253667137" .
?contact <http://xmlns.com/foaf/0.1/page> "https://www.vanlierde-wzc.be/" .
?contact <http://schema.org/email> "onthaal@wzcvanlierde.be" .
}
}
WHERE {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?org <http://www.w3.org/ns/adms#identifier> ?id ;
<http://www.w3.org/ns/org#hasPrimarySite> ?primarySite .
?id <http://www.w3.org/2004/02/skos/core#notation> "KBO nummer" ;
<https://data.vlaanderen.be/ns/generiek#gestructureerdeIdentificator>/<https://data.vlaanderen.be/ns/generiek#lokaleIdentificator> "0633854022" .
?primarySite <http://www.w3.org/ns/org#siteAddress> ?contact .
?contact <http://schema.org/contactType> "Primary" .
}
}
INSERT {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?contact <http://schema.org/telephone> "tel:+3251567301" .
?contact <http://xmlns.com/foaf/0.1/page> "http://www.blijvelde.be/" .
?contact <http://schema.org/email> "info@blijvelde.be" .
}
}
WHERE {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?org <http://www.w3.org/ns/adms#identifier> ?id ;
<http://www.w3.org/ns/org#hasPrimarySite> ?primarySite .
?id <http://www.w3.org/2004/02/skos/core#notation> "KBO nummer" ;
<https://data.vlaanderen.be/ns/generiek#gestructureerdeIdentificator>/<https://data.vlaanderen.be/ns/generiek#lokaleIdentificator> "0566983014" .
?primarySite <http://www.w3.org/ns/org#siteAddress> ?contact .
?contact <http://schema.org/contactType> "Primary" .
}
}
INSERT {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?contact <http://schema.org/telephone> "tel:+3289206597" .
?contact <http://xmlns.com/foaf/0.1/page> "https://wil.be/nl" .
?contact <http://schema.org/email> "info@svkhetscharnier.be" .
}
}
WHERE {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?org <http://www.w3.org/ns/adms#identifier> ?id ;
<http://www.w3.org/ns/org#hasPrimarySite> ?primarySite .
?id <http://www.w3.org/2004/02/skos/core#notation> "KBO nummer" ;
<https://data.vlaanderen.be/ns/generiek#gestructureerdeIdentificator>/<https://data.vlaanderen.be/ns/generiek#lokaleIdentificator> "0881602118" .
?primarySite <http://www.w3.org/ns/org#siteAddress> ?contact .
?contact <http://schema.org/contactType> "Primary" .
}
}
INSERT {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?contact <http://schema.org/telephone> "tel:+3259416111" .
?contact <http://xmlns.com/foaf/0.1/page> "https://www.azoostende.be/" .
?contact <http://schema.org/email> "info@azoostende.be" .
}
}
WHERE {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?org <http://www.w3.org/ns/adms#identifier> ?id ;
<http://www.w3.org/ns/org#hasPrimarySite> ?primarySite .
?id <http://www.w3.org/2004/02/skos/core#notation> "KBO nummer" ;
<https://data.vlaanderen.be/ns/generiek#gestructureerdeIdentificator>/<https://data.vlaanderen.be/ns/generiek#lokaleIdentificator> "0800023336" .
?primarySite <http://www.w3.org/ns/org#siteAddress> ?contact .
?contact <http://schema.org/contactType> "Primary" .
}
}
INSERT {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?contact <http://schema.org/telephone> "tel:+3253724111" .
?contact <http://xmlns.com/foaf/0.1/page> "https://www.olvz.be/nl/praktisch" .
?contact <http://schema.org/email> "webmaster@olvz-aalst.be" .
}
}
WHERE {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?org <http://www.w3.org/ns/adms#identifier> ?id ;
<http://www.w3.org/ns/org#hasPrimarySite> ?primarySite .
?id <http://www.w3.org/2004/02/skos/core#notation> "KBO nummer" ;
<https://data.vlaanderen.be/ns/generiek#gestructureerdeIdentificator>/<https://data.vlaanderen.be/ns/generiek#lokaleIdentificator> "1005154085" .
?primarySite <http://www.w3.org/ns/org#siteAddress> ?contact .
?contact <http://schema.org/contactType> "Primary" .
}
}
INSERT {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?contact <http://schema.org/telephone> "tel:+3289480100" .
?contact <http://xmlns.com/foaf/0.1/page> "https://gerkenberg.be/" .
?contact <http://schema.org/email> "info@gerkenberg.be" .
}
}
WHERE {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?org <http://www.w3.org/ns/adms#identifier> ?id ;
<http://www.w3.org/ns/org#hasPrimarySite> ?primarySite .
?id <http://www.w3.org/2004/02/skos/core#notation> "KBO nummer" ;
<https://data.vlaanderen.be/ns/generiek#gestructureerdeIdentificator>/<https://data.vlaanderen.be/ns/generiek#lokaleIdentificator> "0867804659" .
?primarySite <http://www.w3.org/ns/org#siteAddress> ?contact .
?contact <http://schema.org/contactType> "Primary" .
}
}
INSERT {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?contact <http://schema.org/telephone> "tel:+3215237393" .
?contact <http://xmlns.com/foaf/0.1/page> "https://www.dekringwinkel.be/zuiderkempen" .
?contact <http://schema.org/email> "info@dekringwinkelzuiderkempen.be" .
}
}
WHERE {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?org <http://www.w3.org/ns/adms#identifier> ?id ;
<http://www.w3.org/ns/org#hasPrimarySite> ?primarySite .
?id <http://www.w3.org/2004/02/skos/core#notation> "KBO nummer" ;
<https://data.vlaanderen.be/ns/generiek#gestructureerdeIdentificator>/<https://data.vlaanderen.be/ns/generiek#lokaleIdentificator> "0459644990" .
?primarySite <http://www.w3.org/ns/org#siteAddress> ?contact .
?contact <http://schema.org/contactType> "Primary" .
}
}
INSERT {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?contact <http://xmlns.com/foaf/0.1/page> "https://www.kaagent.be/nl" .
}
}
WHERE {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?org <http://www.w3.org/ns/adms#identifier> ?id ;
<http://www.w3.org/ns/org#hasPrimarySite> ?primarySite .
?id <http://www.w3.org/2004/02/skos/core#notation> "KBO nummer" ;
<https://data.vlaanderen.be/ns/generiek#gestructureerdeIdentificator>/<https://data.vlaanderen.be/ns/generiek#lokaleIdentificator> "0823319370" .
?primarySite <http://www.w3.org/ns/org#siteAddress> ?contact .
?contact <http://schema.org/contactType> "Primary" .
}
}

View File

@@ -0,0 +1,28 @@
PREFIX org: <http://www.w3.org/ns/org#>
PREFIX generiek: <https://data.vlaanderen.be/ns/generiek#>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX adms: <http://www.w3.org/ns/adms#>
PREFIX mu: <http://mu.semte.ch/vocabularies/core/>
PREFIX ext: <http://mu.semte.ch/vocabularies/ext/>
INSERT {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?participant org:memberOf ?association .
}
} WHERE {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?participant adms:identifier ?idParticipant .
FILTER NOT EXISTS { ?participant a ext:KboOrganisatie . }
?idParticipant skos:notation ?kboLabel ;
generiek:gestructureerdeIdentificator/generiek:lokaleIdentificator ?kboNumber .
?association mu:uuid "384b48dc-6860-49b4-a9ef-efa557299950" .
FILTER (?kboLabel IN ("KBO nummer"@nl, "KBO nummer"))
VALUES ?kboNumber {
"0212183243"
"0537951706"
}
}
}

View File

@@ -0,0 +1,17 @@
INSERT DATA {
GRAPH <http://mu.semte.ch/graphs/public> {
<http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/e8294b73-87c9-4fa2-9441-1937350763c9> <http://www.w3.org/2004/02/skos/core#inScheme> <http://lblod.data.gift/concept-schemes/10caf4a4-1ff5-4c05-917e-56489910d68b> . # Welzijnsvereniging
<http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/34b5af85-dc9f-468f-9e03-ef89b174c267> <http://www.w3.org/2004/02/skos/core#inScheme> <http://lblod.data.gift/concept-schemes/10caf4a4-1ff5-4c05-917e-56489910d68b> . # Autonome verzorgingsinstelling
<http://data.vlaanderen.be/id/concept/GeregistreerdeOrganisatieClassificatieCode/82250452-83a0-48f4-89cc-b430320493ce> <http://www.w3.org/2004/02/skos/core#inScheme> <http://lblod.data.gift/concept-schemes/10caf4a4-1ff5-4c05-917e-56489910d68b> . # Ziekenhuisvereniging
<http://data.vlaanderen.be/id/concept/GeregistreerdeOrganisatieClassificatieCode/35833ba2-7371-400b-8df2-2912f66fb153> <http://www.w3.org/2004/02/skos/core#inScheme> <http://lblod.data.gift/concept-schemes/10caf4a4-1ff5-4c05-917e-56489910d68b> . # Vereniging of vennootschap voor sociale dienstverlening
<http://data.vlaanderen.be/id/concept/GeregistreerdeOrganisatieClassificatieCode/82fd21dc-e8bb-4d13-a010-f4a12358ef10> <http://www.w3.org/2004/02/skos/core#inScheme> <http://lblod.data.gift/concept-schemes/10caf4a4-1ff5-4c05-917e-56489910d68b> . # Woonzorgvereniging of woonzorgvennootschap
<http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/2ad46df5-5c79-4d67-84d5-604c1377231e> <http://www.w3.org/2004/02/skos/core#inScheme> <http://lblod.data.gift/concept-schemes/10caf4a4-1ff5-4c05-917e-56489910d68b> . # PEVA gemeente
<http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/088784b6-e188-48bf-b94f-94665f9e1f53> <http://www.w3.org/2004/02/skos/core#inScheme> <http://lblod.data.gift/concept-schemes/10caf4a4-1ff5-4c05-917e-56489910d68b> . # PEVA provincie
}
}

View File

@@ -0,0 +1,22 @@
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX mu: <http://mu.semte.ch/vocabularies/core/>
PREFIX ext: <http://mu.semte.ch/vocabularies/ext/>
PREFIX concept: <http://data.vlaanderen.be/id/concept/GeregistreerdeOrganisatieClassificatieCode/>
INSERT DATA {
GRAPH <http://mu.semte.ch/graphs/public> {
concept:3e5c8e30-95a7-47b0-b0a4-210d5bd440a7 a ext:GeregistreerdeOrganisatieClassificatieCode ;
a ext:OrganizationClassificationCode ;
mu:uuid "3e5c8e30-95a7-47b0-b0a4-210d5bd440a7" ;
skos:prefLabel "Vereniging" .
}
}
;
INSERT DATA {
GRAPH <http://mu.semte.ch/graphs/public> {
concept:b9ed22af-3661-4c3e-b07f-b641d80ebf61 a ext:GeregistreerdeOrganisatieClassificatieCode ;
a ext:OrganizationClassificationCode ;
mu:uuid "b9ed22af-3661-4c3e-b07f-b641d80ebf61" ;
skos:prefLabel "Vennootschap" .
}
}

View File

@@ -0,0 +1,33 @@
DELETE {
GRAPH ?g {
?org <http://www.w3.org/ns/adms#identifier> ?identifier .
?identifier ?pi ?oi .
?structured ?ps ?os .
}
}
WHERE {
GRAPH ?g {
{
# Select one identifier by organization and local identifier
SELECT ?org ?li (MAX(?i) AS ?keepIdentifier) WHERE {
?org <http://www.w3.org/ns/adms#identifier> ?i .
?i <https://data.vlaanderen.be/ns/generiek#gestructureerdeIdentificator>/<https://data.vlaanderen.be/ns/generiek#lokaleIdentificator> ?li .
} GROUP BY ?org ?li
}
?org <http://www.w3.org/ns/adms#identifier> ?identifier .
?identifier <https://data.vlaanderen.be/ns/generiek#gestructureerdeIdentificator> ?structured .
?structured <https://data.vlaanderen.be/ns/generiek#lokaleIdentificator> ?li .
FILTER(?identifier != ?keepIdentifier)
# All properties of the duplicate identifier and structured identifier
?identifier ?pi ?oi .
?structured ?ps ?os .
}
VALUES ?g {
<http://mu.semte.ch/graphs/worship-service>
<http://mu.semte.ch/graphs/administrative-unit>
}
}

Some files were not shown because too many files have changed in this diff Show More