Compare commits

...

174 Commits

Author SHA1 Message Date
mirdono
2271ea0395 chore: bump frontend 2025-03-27 12:33:38 +01:00
mirdono
4b4f11c1c7 chore: bump frontend 2025-03-26 13:58:27 +01:00
mirdono
ec6f1700a9 chore: update changelog for prerelease 2025-03-26 13:56:05 +01:00
felix
2757b082b8 Merge branch 'master' into development 2025-03-25 10:54:27 +01:00
cecemel
1f76fc0fe6 Merge pull request #532 from lblod/chore/flush-landing-zones-leidinggevenden-and-mandatarissen
A migration to flush the landing zones of consumers for bits of the data. Since this data is not actively maintained anymore by the producers, this might lead to obsolete information and confusion situations at the consumer side. Context: deploy story DL-6552
2025-03-25 10:50:44 +01:00
felix
ce2558ad68 Update changelog for v1.30.6 2025-03-24 17:23:12 +01:00
felix
b9fb9d8a63 Flush landing-zone leidinggevenden and mandatarissen
We do want to avoid inconsistencies popping up; i.e. bestuurseenheid
label gets upated, but that won't be reflected in the landing zone
since the information by the producers is not produced anymore,
potentially bringing very confusion situations
2025-03-24 17:15:37 +01:00
cecemel
bf6b568aa9 Merge pull request #531 from lblod/chore/undo-update-label-ocwmv
Chore/undo update label ocwmv
2025-03-21 17:17:12 +01:00
felix
84b657cd84 Update changelog 2025-03-21 17:16:08 +01:00
felix
5deec6a735 undo name change OCMWv 2025-03-21 17:14:33 +01:00
cecemel
adb6864321 Merge pull request #530 from lblod/chore/update-label-ocwmv
Chore/update label ocwmv
2025-03-21 17:00:49 +01:00
felix
cbff03275a update changelog 2025-03-21 16:59:53 +01:00
felix
d246555c8a swapped migration to triggering index migration. 2025-03-21 16:58:37 +01:00
felix
f9c0ef7072 update changelog 2025-03-21 16:30:45 +01:00
felix
9e75eaecb4 Added migration to change label ocmwv 2025-03-21 16:28:14 +01:00
wolfderechter
a3370a9385 Fix: update date of change event st petrus (#529)
* Update the date of a change event of kerkfabriek st petrus

* update changelog
2025-03-21 14:10:41 +01:00
Sam Van Campenhout
0a883702fc Update the dashboard domain names
These are more consistent with how other apps have set up their dashboards.
2025-03-20 16:25:06 +01:00
Sam Van Campenhout
8a64229f69 Merge pull request #525 from lblod/job-dashboard-setup
[OP-3103] Set up the dashboard
2025-03-20 11:55:58 +01:00
Sam Van Campenhout
6cae455d46 Disable the secure cookie flag in development
This makes it easier to test the dashboard locally.
2025-03-20 09:32:09 +01:00
Sam Van Campenhout
b97b545add Set up the jobs dashboard
Based on the same setup in the worship decisions app: https://github.com/lblod/app-worship-decisions-database/pull/29
2025-03-20 09:32:09 +01:00
Claire Lovisa
2c729ddee3 Merge pull request #527 from lblod/chore/harmonize-delta-consumers-folder
Move consumers to delta-consumers folder
2025-03-19 10:13:17 +01:00
Claire Lovisa
a210f830c2 Move consumers to delta-consumers folder 2025-03-18 14:02:04 +01:00
Riad Abdallah
6fc2281ea0 Merge pull request #526 from lblod/maintenance/add-missing-compose-keys
Add missing `logging` keys for some services
2025-03-14 23:10:15 +01:00
Riad Abdallah
b07885b14c Add missing logging keys for some services 2025-03-12 18:35:53 +01:00
felix
74d86dd25c update changelog.md 2025-03-11 17:46:47 +01:00
felix
ab8cef99d0 Update CHANGELOG.md 2025-03-11 17:46:47 +01:00
felix
e8a2d29abc Added Location for export of the public delta-stream 2025-03-11 17:46:47 +01:00
cecemel
846b523045 Merge pull request #524 from lblod/hotfix/public-producer-for-mdb-cutover
Hotfix/public producer for mdb cutover
2025-03-11 17:45:51 +01:00
felix
93298b2c34 update changelog.md 2025-03-10 17:06:52 +01:00
felix
0dae17db17 Update CHANGELOG.md 2025-03-10 17:04:32 +01:00
felix
be4d2c04b0 Added Location for export of the public delta-stream 2025-03-10 16:57:20 +01:00
Riad Abdallah
15972b5125 Bump MaxConstructTriples to 1000000
`MaxConstructTriples` needs to bumped to the same value as `ResultSetMaxRows`
since `virtuoso` will check the value of the former variable first. By setting it
to 10000, we were severely limiting the number of triples that can be constructed.
2025-03-06 15:42:22 +01:00
Claire Lovisa
0a5e5ac9e6 Merge branch 'master' into development 2025-03-06 14:56:14 +01:00
Claire Lovisa
68afdad2c4 Release v1.30.4 2025-03-06 14:54:45 +01:00
Claire Lovisa
c6345a9c2f Merge pull request #523 from lblod/hotfix/missing-codes-in-public-producer
Add missing codes to public producer
2025-03-06 14:53:52 +01:00
Claire Lovisa
c3365c7b80 Update changelog 2025-03-06 12:32:07 +01:00
Claire Lovisa
59b0e6ae5c Add missing codes to public producer 2025-03-06 11:49:22 +01:00
Riad Abdallah
df30c9c080 Merge pull request #522 from lblod/maintenance/upgrade-databases
Upgrade `triplestore` and `publication-triplestore` to `v1.3.0-rc.1`
2025-03-04 16:02:33 +01:00
Riad Abdallah
3747f97a8f Update CHANGELOG 2025-03-04 12:00:16 +01:00
Riad Abdallah
bc3cd35f8f Add new config vars to .ini files 2025-03-04 11:57:09 +01:00
Riad Abdallah
3ab27e5d36 Bump databases to v1.3.0-rc.1 2025-03-04 11:56:42 +01:00
mirdono
1d2d69594b Merge branch 'master' into development 2025-03-04 10:43:08 +01:00
mirdono
50728e0766 chore: update changelog for v1.30.3 2025-03-04 10:37:30 +01:00
mirdono
88f49a1f08 chore: bump frontend 2025-03-04 10:37:17 +01:00
mirdono
175ecef9fa Merge branch 'master' into development 2025-02-28 17:08:18 +01:00
mirdono
395707593d chore: update changelog 2025-02-28 16:56:23 +01:00
mirdono
853b2ddd85 chore: update changelog with pre-release 2025-02-28 15:06:47 +01:00
mirdono
ee8dbbe72d chore: update changelog 2025-02-26 12:58:00 +01:00
mirdono
9a71662b49 feat: add timed governing bodies for new legislature for AGBs
The governing bodies for an AGB have the same legislature as the corresponding
municipality. This adds new time specialised governing bodies for the
new (current) legislature for Raad van bestuur and Algemene vergadering.
2025-02-26 12:56:26 +01:00
mirdono
c72093ad4b feat: set end date for AGB's governing bodies
The governing bodies for an AGB have the same legislature as the corresponding
municipality. This sets the end date for the existing Raad van bestuur and
Algemene vergadering governing bodies.
2025-02-26 12:52:35 +01:00
mirdono
72a0d782a6 Merge branch 'chore/move-status-for-municipalities-and-provinces-shared-graph' into development [#519] 2025-02-24 14:40:25 +01:00
mirdono
a7d77241d0 chore: update changelog 2025-02-24 14:38:23 +01:00
mirdono
920f78e51d chore: move status for municipalities and provinces in shared graph
For new frontend functionality concerning local involvements a worship user
should be able to read the status for municipalities and provinces. This
migrations moves these triples to the shared graph such worship users have read
access. The status for municipalities and provinces cannot be changed by users
so no write access is needed.
2025-02-20 18:25:10 +01:00
cecemel
6adf03a6a2 Merge pull request #518 from lblod/hotfix/vgc-classificatie-code-to-public
Hotfix/vgc classificatie code to public
2025-02-20 16:30:02 +01:00
felix
0b62fca662 Update changelog 2025-02-20 11:58:41 +01:00
felix
ea85a77865 Fix: move bestuursorgaanclassificatiecode to public graph. 2025-02-20 11:55:30 +01:00
mirdono
b45480d594 Merge branch 'master' into development 2025-02-19 19:54:47 +01:00
mirdono
642125be9b chore: release v1.30.0 2025-02-19 19:51:14 +01:00
mirdono
6a6d04ecb6 chore: bump frontend 2025-02-19 19:48:22 +01:00
mirdono
70d3174847 fix: corrected deploy command in changelog 2025-02-18 10:57:13 +01:00
mirdono
1e2d32b3c9 chore: bump frontend 2025-02-18 10:30:33 +01:00
mirdono
764638431f Merge branch 'development' 2025-02-18 10:15:55 +01:00
Claire Lovisa
6a231f3ee2 Merge branch 'master' into development 2025-02-17 16:48:23 +01:00
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
felix
828d90747e Merge branch 'master' into development 2025-02-14 16:48:51 +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
f7c86a177f Merge branch 'master' into development 2025-02-07 20:15:43 +01:00
Claire Lovisa
88fba9c90c Merge pull request #513 from lblod/chore/cleanup-reasoner
Remove reasoner service, replaced by new consumer logic
2025-02-07 11:12:48 +01:00
Claire Lovisa
af74dc7b7b Update changelog 2025-02-07 11:11:51 +01:00
mirdono
d58d200341 chore: additional example environment settings for worship consumers
This adds example entries for `DCR_SYNC_LOGIN_ENDPOINT` and `DCR_SECRET_KEY`
environment settings for the worship consumers. The example value for
`DCR_SYNC_LOGIN_ENDPOINT` was chosen to match the value for `DCR_SYNC_BASE_URL`.
2025-02-07 10:07:38 +01:00
Claire Lovisa
6b7bb2ec5d Remove reasoner service, replaced by new consumer logic 2025-02-06 10:05:29 +01:00
Claire Lovisa
565cf992c2 Merge branch 'master' into development 2025-02-05 14:54:28 +01:00
Claire Lovisa
94662e4e04 Merge branch 'master' into development 2025-02-04 08:42:17 +01:00
wolfderechter
ef98cd512a Add migration to remove OCMW bcsd & bcsd voorzitter (#511)
* Add migration to remove bcsd

* Update changelog

* Specify graphs

* update predicates

* Target bcsd voorzitter as well

* cleanup changelog
2025-02-03 13:38:48 +01:00
mirdono
25eb28c6c5 chore: added information for next release 2025-01-31 16:55:43 +01:00
mirdono
eb55bc9def refactor: determine docker compose command based on system
- Determine whether to use `docker compose` or `docker-compose` based on whether
  the former is available on the system at hand.
- Use the `--remove-orphanS` flag, supported since v1.7.0, instead of its
  singular form which was removed at some point.
2025-01-29 10:20:25 +01:00
mirdono
730e531387 Merge branch 'chore/cleanup-search-configuration' into development 2025-01-28 21:14:52 +01:00
mirdono
1edc4cf0a6 chore: remove separate search configuration for dev
Considering the time it takes to do a full re-index the speed benefit of the
development-specific configuration is limited. To the point that it does not
seem to outweigh the added complexity of maintaining two configurations and the
added chance of errors that brings.
2025-01-28 21:13:16 +01:00
mirdono
3a375a4581 chore: remove unused indexes for positions
The indexes for the municipality and province of a position's organisation are
not used in the app. Removing them to decrease the time required to index data.
2025-01-28 21:12:00 +01:00
mirdono
2666301048 chore: align search service configuration for dev and prod
This makes diff'ing the dev and prod configurations for the `search` service
slightly more readable.

- use same order of eager index entries with prod confiuration
- remove an extra normalizer setting in the dev config
- remove duplicate person id index
- correct property name in identifier mappings
- add missing `first_name_used` mappings
- order properties and mappings consistently across file
2025-01-28 21:11:22 +01:00
Boris De Vloed
7019d06b62 Merge pull request #508 from lblod/fix/remove-duplicate-classifications
remove province and commune classifications from admin graph
2025-01-24 13:05:49 +01:00
Boris De Vloed
3cd6c2c7f7 updated changelog 2025-01-24 13:03:40 +01:00
Boris De Vloed
8e311c6bab remove province and commune classifications from admin graph 2025-01-24 11:28:41 +01:00
mirdono
b296a99ac0 Merge branch 'master' into development 2025-01-23 20:05:54 +01:00
Riad Abdallah
c5974f34d3 Merge pull request #491 from lblod/cleanup/fully-delete-agb-stekene
Completely remove AGB Stekene's data
2025-01-17 16:41:23 +01:00
Riad Abdallah
d70becf88f Add note on DEV-specific migration 2025-01-17 16:40:47 +01:00
Riad Abdallah
71b8b636c2 Update CHANGELOG 2025-01-17 16:38:36 +01:00
Riad Abdallah
74096c96b1 Merge branch 'development' into cleanup/fully-delete-agb-stekene 2025-01-17 16:24:26 +01:00
Riad Abdallah
5ea8bfc46b Completely remove AGB Stekene data
A previous PR changed the org's status only; this PR completely removes
its data.
2025-01-17 16:00:20 +01:00
felix
5438af149b Merge branch 'master' into development 2025-01-16 14:39:37 +01:00
felix
e0a9e77441 Merge branch 'master' into development 2025-01-16 12:13:06 +01:00
felix
cfd1a445de Merge branch 'master' into development 2025-01-13 17:11:47 +01:00
mirdono
51e41f1eb1 Merge branch 'master' into development 2025-01-10 10:59:35 +01:00
mirdono
090a69fd3f feat: allow local migrations that trigger indexing
Support for environment-local migrations that trigger indexing. This is similar
to the local migrations for the regular `migrations` service.
2025-01-09 22:32:20 +01:00
cecemel
b60004fcf2 Merge pull request #486 from lblod/archive-agb-stekene
Archive AGB Stekene
2025-01-03 12:23:39 +01:00
felix
945faf8761 move migrations to trigger-re-index-migration
Don't forget to `drc restart migrations-triggering-indexing`
2025-01-03 12:20:15 +01:00
felix
1f7a754eb9 Remove comment migration, so we can use the mu-auth version
to migrate the file
2025-01-03 12:17:42 +01:00
cecemel
93a86372e0 Merge pull request #487 from lblod/remove-empty-uris
Remove empty URIs
2025-01-03 11:55:40 +01:00
felix
fd5844c319 Update migration to remove dangling triple for eenheid. ->
This assumes the migration hasn't run on any 'deployed' environment.
2025-01-03 11:53:24 +01:00
mirdono
dc62d6616b Merge branch 'master' into development 2024-12-20 14:56:38 +01:00
mirdono
ccc06b1970 Merge branch 'master' into development 2024-12-13 13:12:24 +01:00
Riad Abdallah
432d866b7b Remove empty URIs 2024-12-12 20:21:09 +01:00
Riad Abdallah
04f01f8302 Set AGB Stekene's org status to Niet-Actief 2024-12-12 17:42:26 +01:00
Riad Abdallah
01a374f98f Merge branch 'master' into development 2024-12-11 18:58:29 +01:00
Claire Lovisa
34ec459382 Bump construct-administrative-unit-relationships 2024-12-11 13:59:27 +01:00
felix
7afee31178 Merge branch 'master' into development 2024-12-11 11:19:45 +01:00
felix
1518c71334 Merge branch 'master' into development 2024-12-05 10:34:49 +01:00
mirdono
c52ff23566 chore: downgrade mu-cl-resources
mu-cl-resources v1.25.0 contains a bug[1], downgrading back to v1.24.0 for now.

[1]: https://github.com/mu-semtech/mu-cl-resources/issues/38
2024-11-29 11:30:25 +01:00
mirdono
7964fd7879 chore: bump services
- identifier to v1.10.3
- migrations and migrations-triggering-indexing to v0.9.0
- resource to v1.25.0
- file to v3.4.0
2024-11-27 16:50:52 +01:00
mirdono
86c2917396 chore: move db-cleanup configuration
Moved the `db-cleanup` configuration up so the two migration services are right
after each other again.
2024-11-27 16:50:52 +01:00
mirdono
d66b0b5eec chore: removed migrations that were executed locally
Business wanted to re-enable the edit contact data earlier than the next
release. Therefore, these migrations were executed locally on QA and PROD.
2024-11-20 18:46:25 +01:00
Claire Lovisa
6222aadf35 Merge branch 'master' into development 2024-11-20 11:04:51 +01:00
mirdono
90f2cc26c5 chore: bump mu-search service
Bump mu-search to the released 0.10.0 version, almost identical to the beta.5
used before except for a minor bugfix.
2024-11-18 13:34:15 +01:00
felix
fd98afc05b Merge branch 'master' into development 2024-11-12 13:53:10 +01:00
felix
df4c187c2a Merge branch 'master' into development 2024-11-12 11:40:25 +01:00
felix
08aae7881d Merge branch 'master' into development 2024-11-07 09:46:02 +01:00
felix
2423b02840 Merge branch 'master' into development 2024-10-28 14:56:32 +01:00
felix
0b18c44e2b Merge branch 'master' into development 2024-10-28 10:28:51 +01:00
mirdono
4ea35853f1 Merge branch 'master' into development 2024-10-24 15:29:58 +02:00
mirdono
04b25fea7d fix: remove incorrect change event
A user entered a faulty change event, this migration removes it again.
2024-10-24 15:29:23 +02:00
felix
ae5c84d1d4 Merge branch 'master' into development 2024-10-22 17:48:33 +02:00
felix
d40b2837b9 Merge branch 'master' into development 2024-10-22 12:48:49 +02:00
felix
7926b078e3 Merge branch 'master' into development 2024-10-21 11:48:26 +02:00
felix
eddf8f8b67 Merge branch 'master' into development 2024-10-18 11:30:20 +02:00
mirdono
00a6144c16 Merge branch 'master' into development 2024-10-17 16:19:44 +02:00
mirdono
d687463c0d feat: import modified CLB data
These migrations add the contact data from CLB production that was modified in
that app during the time it was available. These migrations perform the
following actions, in the specified order:

1. Delete all contact data for the 8 modified sites
2. Import the data extracted from CLB production for the relevant organisations
   Done in separate migrations for worship and non-worship organisations.
3. Correct a phone number literal that contained spaces for some reason
2024-10-16 13:05:24 +02:00
mirdono
74442fcdf6 chore: drop landing zone graph for removed CLB consumer 2024-10-16 09:55:59 +02:00
mirdono
40d7c72b59 chore: remove the CLB consumer for contact data
OP will take over the editing of contact data again. This removes the CLB
consumer from OP altogether such that it cannot be accidentally be reactivated.
2024-10-16 09:55:59 +02:00
mirdono
44cbb222cc chore: enable editing contact data
Re-enable editing contact data in OP as the CLB app editing functionality was
disable due to data flow issues. This sets the relevant frontend feature flag
such that it allows editing the contact data for all organizations
classifications agains.

When deploying make sure this environment variable is **not** overwritten in the
environment's `docker-compose.override.yml`.
2024-10-16 09:55:59 +02:00
mirdono
08b39e36c3 fix: remove superfluous line in drc dev configuration
The most recent merge commit from master to branch contained error were a
removed line was reinserted at a wrong place with an incorrect indentation .his
causes (some) drc commands to fail with an error
2024-10-15 18:18:00 +02:00
felix
95953c7988 Merge branch 'master' into development 2024-10-15 10:57:21 +02:00
mirdono
64f78722d9 feat: add memberships for new organizations
Add the migrations to create the necessary memberships for the newly added
municipalities and OCMWs. These new organizations were added as part of a hotfix
after the memberships were added to development. Consequently, the migrations
inserting these organizations are performed **after** the migrations introducing
membership data. Therefore, we need to add some additional migrations
specifically for these new organizations.
2024-10-09 09:08:01 +02:00
mirdono
2ed45e3a5e refactor: renamed job migrations to include "insert" in the filename
Added comments to make it easier to understand query executed by each job.
2024-10-09 09:08:01 +02:00
mirdono
70e09cf995 chore: add DEV migration to remove invalid memberships
This migration removes a bunch of memberships which `organization` assignment is
not valid. These memberships were most likely created by (automated) testing
while the frontend did not correctly enforce the correct direction.
2024-10-09 09:08:01 +02:00
mirdono
e3ec21eb71 feat: add cleanup jobs to delete triples
When removing memberships some `org:hasSubOrganization` or `org:linkedTo`
triples may remain in the triplestore. These migrations add jobs to delete such triples.
2024-10-09 09:08:01 +02:00
mirdono
7da8ebb695 feat: add cleanup jobs to insert triples 2024-10-09 09:08:01 +02:00
mirdono
494caa8c59 chore: added db-cleanup-service
This service will be used to insert and delete triples for the
`org:hasSubOrganization` and `org:linkedTo` predicates when appropriated
memberships have been added or deleted to the triplestore.
2024-10-09 09:08:01 +02:00
mirdono
13d8154a9a fix: do not delete hasSubOrganization and linkedTo triples
Triples for the predicates `org:hasSubgOrganization` and `org:linkedTo` are
produced by OP for other apps to consume. Therefore, they should not be deleted.
2024-10-09 09:08:01 +02:00
mirdono
6cc953e4ed refactor: moved migrations to correct subfolder
These two migrations were accidentally placed in the `migrations` folder instead
of the appropriate `2024` subfolder. These migrations have already been executed
on all environments.
2024-10-04 11:00:32 +02:00
Ben
67efdf47aa Merge pull request #450 from lblod/fix/remove-https-BestuurseenheidClassificatieCode
Remove HTTPS BestuurseenheidClassificatieCodes
2024-09-06 01:30:12 +02:00
benjay10
fcf5d3fc59 Add migration to remove references to https variant
This HTTPS variant does not exist elsewhere and the linking entitities
also reference to the regular HTTP version, so these references can be
removed.
2024-09-05 16:44:10 +02:00
mirdono
15248b5e4b Merge branch 'master' into development 2024-09-04 18:20:48 +02:00
mirdono
8c7e75acc8 chore: bump frontend to latest release 2024-08-31 15:34:19 +02:00
mirdono
9291024baa 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-31 15:34:19 +02:00
Boris De Vloed
d202be0be8 export representative organ classification 2024-08-31 15:34:19 +02:00
mirdono
ee1d6078ab chore: bump frontend version 2024-08-31 15:34:19 +02:00
mirdono
fd6326c605 chore: bump frontend to new pre-release 2024-08-31 15:34:19 +02:00
mirdono
0502535e13 chore: bump frontend 2024-08-31 15:34:19 +02:00
Laurent Deketelaere
d617154e5d feat: Remove CLB data from the producer 2024-08-31 15:34:19 +02:00
mirdono
68677ead2a fix: user INSERT DATA instead of INSERT where appropriate 2024-08-31 15:34:19 +02:00
mirdono
3102f48998 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-31 15:34:19 +02:00
mirdono
d5da714e12 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-31 15:34:19 +02:00
mirdono
c373a3708b 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-31 15:34:19 +02:00
mirdono
7ae1793866 feat: add new classification code Vlaamse gemeenschapscommissie 2024-08-31 15:34:19 +02:00
mirdono
0e5ac9a59f chore: bump relationships-service version
A new bug fix release was made for the
`construct-organization-relationships-service`. This release is fully backward
compatible and requires no further changes.
2024-08-30 16:49:54 +02:00
cecemel
90cc3a0888 Merge pull request #444 from lblod/master
Master
2024-08-23 11:30:33 +02:00
mirdono
86c8fd4b56 chore: removed deprecated relations from data model 2024-07-19 17:37:24 +00:00
mirdono
7050629e0c feat: replace is-associated-with with a membership relation 2024-07-19 17:37:24 +00:00
mirdono
4b0f0c1df2 feat: remove org:memberOf predicates 2024-07-19 17:37:24 +00:00
mirdono
9b4b9a0a6d chore: formatting and added comments 2024-07-19 17:37:24 +00:00
mirdono
7902a1acad chore: renamed membership migrations to execute them at the right time 2024-07-19 17:37:24 +00:00
mirdono
fef667fd9f feat: adapt mu-auth and dispatcher config for membership relations 2024-07-19 17:37:24 +00:00
mirdono
c7e58abdc3 feat: replace sub-organization relations by membership relations
- Remove relations based on the `org:hasSubOrganization` predicate.
- Migrate triples for the `org:hasSubOrganization` predicate to new, appropriate
  triples.
2024-07-19 17:37:24 +00:00
mirdono
2c6d73d389 feat: replace founding relation by membership relation
- Remove relations based on `ext:isFounderOfOrganization` predicate from the
  data model.
- Migrate the `ext:isFounderOfOrganization` triples to new, appropriate triples.
2024-07-19 17:37:24 +00:00
mirdono
07b36fb193 feat: added membership relations to model 2024-07-19 17:37:24 +00:00
mirdono
633a44a85f feat: migration adding concepts for membership relations 2024-07-19 17:37:24 +00:00
163 changed files with 6076 additions and 5799 deletions

1
.gitignore vendored
View File

@@ -20,6 +20,7 @@ docker-compose.override.yml
/config/migrations/private-data/*
/config/migrations/local/*
/config/migrations-triggering-indexing/local/*
/config/proxy/nginx.htpasswd

View File

@@ -1,4 +1,222 @@
# Changelog
## Unreleased
## v1.31.0 (2025-03-27)
### Frontend
- Bump to version [v1.30.0](https://github.com/lblod/frontend-organization-portal/blob/v1.30.0/CHANGELOG.md#v1300-2025-03-27)
### Backend
- Datafix: move status for municipalities and provinces to the `shared` graph such that it can be read by worship users [OP-3469]
- Bump `triplestore` and `publication-triplestore` to `v1.3.0-rc.1`. [OP-2492] [OP-3547]
- Add missing docker compose keys. [DL-6490]
- Reorganize delta consumers config to harmonize with the ecosystem
- Set up the dashboard app [OP-3103]
- Datafix: correct date of change event of kerkfabriek st petrus [OP-3555]
- Update OCMWv to VVMW [OP-3565] and back. It's technically a nil-operation. But you should run the migrations nevertheless.
### Deploy notes
```
drc restart migrations-triggering-indexing
drc restart migrations; drc logs -ft --tail=200 migrations
drc pull frontend; drc up -d frontend
drc up -d mandatarissen-consumer leidinggevenden-consumer worship-services-main-info-consumer worship-services-private-info-consumer
```
#### For upgrade databases
[This README](https://github.com/Riadabd/upgrade-virtuoso) provides the necessary steps for upgrading the database. **NOTE**: This will involve shutting down the app for small period of time (around 30 minutes).
#### For adding the missing keys
```
drc up -d search elasticsearch
```
#### Dashboard
The dashboard requires some server specific configuration before it can be used.
##### 1. Dashboard domains
To configure the domain name that's used by the dashboard frontend, you can add it to the `VIRTUAL_HOST` and `LETSENCRYPT_HOST` environment variables of the identifier service.
- DEV domain: dashboard.dev.app-organisation-portal.contacthub-dev.s.redhost.be
- QA domain: dashboard.qa.app-organisation-portal.contacthub-dev.s.redhost.be
- PROD domain: dashboard.app-organisation-portal.organisaties.s.redpencil.io
##### 2. Dashboard users
Before we can generate a user we need to add an application salt to the server. Add a `MU_APPLICATION_SALT` environment variable to the `dashboard-login` service in the docker-compose.override.yml file.
Once this is done you can generate a user by running `mu script project-scripts generate-dashboard-login` and following the prompts. A new local migration will be generated which can be run by restarting the migrations service and which will insert the new user into the database.
Store the login credentials as a comment in the docker-compose.override.yml file.
##### 3. (Re)start the needed services
`drc up -d frontend-dashboard dashboard-login identifier; drc restart dispatcher resource db`
## v1.30.5 (2025-03-10)
### Backend
- Added `http://www.w3.org/ns/prov#Location` to delta stream 'public' [DL-6496]
### Deploy notes
```
drc restart delta-producer-publication-graph-maintainer
drc exec delta-producer-background-jobs-initiator curl -X POST http://localhost/public/healing-jobs
```
## v1.30.6 (2025-03-25)
### Backend
- Flushed landingzones [DL-6552]
### Deploy notes
```
drc restart migrations
```
## v1.30.5 (2025-03-10)
### Backend
- Added `http://www.w3.org/ns/prov#Location` to delta stream 'public' [DL-6496]
### Deploy notes
```
drc restart delta-producer-publication-graph-maintainer
drc exec delta-producer-background-jobs-initiator curl -X POST http://localhost/public/healing-jobs
```
## v1.30.4 (2025-03-06)
### Backend
- Add missing codes to public producer [DL-6210] [DL-6449]
#### Deploy commands
```
drc restart migrations delta-producer-publication-graph-maintainer
drc exec delta-producer-background-jobs-initiator curl -X POST http://localhost/public/healing-jobs
```
## v1.30.3 (2025-03-04)
### Frontend
- Bump to [v1.29.1](https://github.com/lblod/frontend-organization-portal/releases/tag/v1.29.1)
### Deploy notes
- Bump frontend
#### Deploy commands
```
drc pull frontend; drc up -d frontend
```
## v1.30.2 (2025-02-28)
### Backend
- Datafix: add new timed governing bodies for new legislature for AGBs [OP-3552]
### Deploy notes
- Restart the migration service
- Start a healing job the public producer, or wait for it to kick in overnight
#### Deploy commands
```
drc restart migrations; drc logs -ft --tail=200 migrations
drc exec delta-producer-background-jobs-initiator curl -X POST http://localhost/public/healing-jobs
```
## v1.30.1 (2025-02-20)
### Backend
- Bestuursorgaanclassificatiecode of VGC was in wrong graph, so it wouldn't export. [DL-6428]
### Deploy notes
```
drc restart migrations
```
## v1.30.0 (2025-02-19)
### Frontend
- Bump to version [v1.29.0](https://github.com/lblod/frontend-organization-portal/releases/tag/v1.29.0)
### Backend
- Datafix: delete duplicate identifiers [OP-3157]
- Feature: replace different relations between organisations by memberships [OP-3195 (epic), OP-2606, OP-3156, OP-3198, OP-3199, OP-3258, OP-3259, OP-3260, OP-3265, OP-3293, OP-3305]
- Added `db-cleanup-service` to keep membership data backwards compatible [OP-3369]
- Datafix: delete incorrect change event [OP-3363]
- Feature: re-enable contact data editing [OP-3425]
- Remove gemeente and provincie classifications from admin unit graph [OP-3393]
- Remove several OCMW bcsd faciliteitgemeenten [OP-3535]
- Completely remove AGB Stekene's data. [OP-3409]
- Remove reasoner service, replaced by new consumer logic
### Deploy Notes
- Before pulling the changes
+ Shut down the reasoner and thank it for its good service: `drc down reasoner`
- Re-enable contact date editing:
+ remove `EMBER_ENABLE_EDIT_CONTACT_DATA_FEATURE` flag in `docker-compose.override.yml`
+ Stop and remove the `clb-contact-data-consumer` service
+ Remove the `clb-contact-data-consumer` configuration in `docker-compose.override.yml`
- Rebuild the `search` service before starting the re-indexing
- To enable the membership functionality:
+ Restart migration service
+ Restart services for which the configuration was changed: `resource`, `dispatcher` and `db`
+ Start the `db-cleanup` service
+ Pull and restart the frontend
+ Perform a re-index using `reset-elastic.sh` script
#### Deploy commands
```
drc down clb-contact-data-consumer
drc up -d search
drc restart migrations; drc logs -ft --tail=200 migrations
drc restart migrations-triggering-indexing && drc logs -ft --tail=200 migrations-triggering-indexing
drc restart resource dispatcher db
drc up -d db-cleanup
drc pull frontend; drc up -d frontend
./scripts/reset-elastic.sh
```
## 1.29.2 (2025-02-17)
### Data fix
- restore betrokken 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

View File

@@ -185,3 +185,26 @@ To make sure the app can share data, producers need to be set up. There is an in
)
}
```
## Configuring the dashboard
### Accessing the dashboard from your local machine
Since we use dispatcher v2, which dispatches on hostname, we'll have to update `/etc/hosts`.
Add an entry similar to the following. Ensure the first part of the domain starts with `dashboard`.:
```
127.0.0.1 dashboard.localhost
```
### Creating new users
For now, we use specific logins for the dashboard users. Each environment has its own passwords.
To add a user, make sure to have [mu-cli](https://github.com/mu-semtech/mu-cli) installed first.
Then in `docker-compose.override.yml`
```
dashboard-login:
environment:
MU_APPLICATION_SALT: 'a_random_string_with_sufficient_entropy_hence_not_this_one'
```
You can now generate a user by running `mu script project-scripts generate-dashboard-login` and following the steps.
Restart `migrations` and it should insert the new user into the database.

View File

@@ -79,6 +79,8 @@ defmodule Acl.UserGroups.Config do
"http://www.w3.org/ns/org#ChangeEvent",
"http://data.lblod.info/vocabularies/contacthub/AgentInPositie",
"http://mu.semte.ch/vocabularies/ext/KboOrganisatie",
"http://www.w3.org/ns/org#Membership",
"http://www.w3.org/2006/time#ProperInterval"
]
@shared_protected_type [
@@ -105,6 +107,19 @@ defmodule Acl.UserGroups.Config do
}"
end
defp can_access_dashboard() do
%AccessByQuery{
vars: [],
query: "PREFIX ext: <http://mu.semte.ch/vocabularies/ext/>
PREFIX mu: <http://mu.semte.ch/vocabularies/core/>
SELECT DISTINCT ?account WHERE {
<SESSION_ID> <http://mu.semte.ch/vocabularies/session/account> ?account.
?account <http://mu.semte.ch/vocabularies/ext/sessionRole> ?session_role.
FILTER( ?session_role = \"dashboard-user\" )
}"
}
end
def user_groups do
[
%GroupSpec{
@@ -204,6 +219,46 @@ defmodule Acl.UserGroups.Config do
}
]
},
# // dashboard users
%GroupSpec{
name: "dashboard-users",
useage: [:read],
access: can_access_dashboard(),
graphs: [
%GraphSpec{
graph: "http://mu.semte.ch/graphs/reports",
constraint: %ResourceConstraint{
resource_types: [
"http://lblod.data.gift/vocabularies/reporting/Report",
"http://open-services.net/ns/core#Error",
"http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#DataContainer",
"http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#FileDataObject"
]
}
},
%GraphSpec{
graph: "http://mu.semte.ch/graphs/system/jobs",
constraint: %ResourceConstraint{
resource_types: [
"http://vocab.deri.ie/cogs#Job",
"http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#DataContainer",
"http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#FileDataObject"
]
}
},
# OP stores jobs in multiple graphs, so we configure both until they are merged into one graph
%GraphSpec{
graph: "http://mu.semte.ch/graphs/jobs",
constraint: %ResourceConstraint{
resource_types: [
"http://vocab.deri.ie/cogs#Job",
"http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#DataContainer",
"http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#FileDataObject"
]
}
},
]
},
# // CLEANUP
#

View File

@@ -1,30 +0,0 @@
const BATCH_SIZE = parseInt(process.env.BATCH_SIZE) || 1000;
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://virtuoso: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 || 100);
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 LANDING_ZONE_GRAPH = process.env.DCR_LANDING_ZONE_GRAPH || `http://mu.semte.ch/graphs/landing-zone/clb-contact-data`;
// ENDPOINTS
const LANDING_ZONE_DATABASE = process.env.DCR_LANDING_ZONE_DATABASE || 'database';
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
};

View File

@@ -1,268 +0,0 @@
const PREFIXES = `
PREFIX besluit: <http://data.vlaanderen.be/ns/besluit#>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX lblodgeneriek: <https://data.lblod.info/vocabularies/generiek/>
PREFIX org: <http://www.w3.org/ns/org#>
PREFIX code: <http://lblod.data.gift/vocabularies/organisatie/>
PREFIX adms: <http://www.w3.org/ns/adms#>
PREFIX generiek: <https://data.vlaanderen.be/ns/generiek#>
PREFIX ere: <http://data.lblod.info/vocabularies/erediensten/>
PREFIX organisatie: <https://data.vlaanderen.be/ns/organisatie#>
PREFIX mu: <http://mu.semte.ch/vocabularies/core/>
PREFIX euvoc: <http://publications.europa.eu/ontology/euvoc#>
PREFIX prov: <http://www.w3.org/ns/prov#>
PREFIX schema: <http://schema.org/>
PREFIX locn: <http://www.w3.org/ns/locn#>
PREFIX ext: <http://mu.semte.ch/vocabularies/ext/>`
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: [
{
trigger: { // subjectType or predicateValue
subjectType: "org:Site"
},
queryTemplate: (subject) => `
${PREFIXES}
CONSTRUCT {
${subject} ext:goesInGraph ?graphOne.
${subject} ext:goesInGraph ?graphTwo.
${subject} ext:goesInGraph ?graphThree.
${subject} ext:goesInGraph ?graphFour.
} WHERE {
OPTIONAL {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?adminUnitOne org:hasPrimarySite ${subject}.
}
BIND(<http://mu.semte.ch/graphs/administrative-unit> AS ?graphOne)
}
OPTIONAL {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?adminUnitTwo org:hasSite ${subject}.
}
BIND(<http://mu.semte.ch/graphs/administrative-unit> AS ?graphTwo)
}
OPTIONAL {
GRAPH <http://mu.semte.ch/graphs/worship-service> {
?adminUnitThree org:hasPrimarySite ${subject}.
}
BIND(<http://mu.semte.ch/graphs/worship-service> AS ?graphThree)
}
OPTIONAL {
GRAPH <http://mu.semte.ch/graphs/worship-service> {
?adminUnitFour org:hasSite ${subject}.
}
BIND(<http://mu.semte.ch/graphs/worship-service> AS ?graphFour)
}
}`
},
{
trigger: { // subjectType or predicateValue
subjectType: "schema:ContactPoint"
},
queryTemplate: (subject) => `
${PREFIXES}
CONSTRUCT {
${subject} ext:goesInGraph ?graphOne.
${subject} ext:goesInGraph ?graphTwo.
} WHERE {
OPTIONAL {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?siteOne org:siteAddress ${subject}.
}
BIND(<http://mu.semte.ch/graphs/administrative-unit> AS ?graphOne)
}
OPTIONAL {
GRAPH <http://mu.semte.ch/graphs/worship-service> {
?siteTwo org:siteAddress ${subject}.
}
BIND(<http://mu.semte.ch/graphs/worship-service> AS ?graphTwo)
}
}`
},
{
trigger: { // subjectType or predicateValue
subjectType: "locn:Address"
},
queryTemplate: (subject) => `
${PREFIXES}
CONSTRUCT {
${subject} ext:goesInGraph ?graphOne.
${subject} ext:goesInGraph ?graphTwo.
} WHERE {
OPTIONAL {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?siteOne organisatie:bestaatUit ${subject}.
}
BIND(<http://mu.semte.ch/graphs/administrative-unit> AS ?graphOne)
}
OPTIONAL {
GRAPH <http://mu.semte.ch/graphs/worship-service> {
?siteTwo organisatie:bestaatUit ${subject}.
}
BIND(<http://mu.semte.ch/graphs/worship-service> AS ?graphTwo)
}
}`
},
//Predicate triggers to solve out of order deltas
{
trigger: { // subjectType or predicateValue
predicateValue: "org:hasSite"
},
//We assume that only administrative units are in the shared graph of OP due to the need of sharing the prefLabel with worships services
queryTemplate: (subject) => `
${PREFIXES}
CONSTRUCT {
${subject} ext:goesInGraph ?graphOne.
${subject} ext:goesInGraph ?graphTwo.
?site ?pSite ?oSite.
?contact ?pContact ?oContact.
?address ?pAddress ?oAddress.
?addressContact ?pAddressContact ?oAddressContact.
} WHERE {
OPTIONAL {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
${subject} a ?type.
}
BIND(<http://mu.semte.ch/graphs/administrative-unit> AS ?graphOne)
}
OPTIONAL {
GRAPH <http://mu.semte.ch/graphs/shared> {
${subject} a ?type.
}
BIND(<http://mu.semte.ch/graphs/administrative-unit> AS ?graphOne)
}
OPTIONAL {
GRAPH <http://mu.semte.ch/graphs/worship-service> {
${subject} a ?type.
}
BIND(<http://mu.semte.ch/graphs/worship-service> AS ?graphTwo)
}
${subject} org:hasSite ?site.
?site ?pSite ?oSite.
{
?site org:siteAddress ?contact.
?contact ?pContact ?oContact.
?contact locn:address ?addressContact.
?addressContact ?pAddressContact ?oAddressContact.
}
UNION
{
?site org:siteAddress ?contact.
?contact ?pContact ?oContact.
}
UNION
{
?site organisatie:bestaatUit ?address.
?address ?pAddress ?oAddress.
}
}`
},
{
trigger: { // subjectType or predicateValue
predicateValue: "org:hasPrimarySite"
},
//We assume that only administrative units are in the shared graph of OP due to the need of sharing the prefLabel with worships services
queryTemplate: (subject) => `
${PREFIXES}
CONSTRUCT {
${subject} ext:goesInGraph ?graphOne.
${subject} ext:goesInGraph ?graphTwo.
?site ?pSite ?oSite.
?contact ?pContact ?oContact.
?address ?pAddress ?oAddress.
?addressContact ?pAddressContact ?oAddressContact.
} WHERE {
OPTIONAL {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
${subject} a ?type.
}
BIND(<http://mu.semte.ch/graphs/administrative-unit> AS ?graphOne)
}
OPTIONAL {
GRAPH <http://mu.semte.ch/graphs/shared> {
${subject} a ?type.
}
BIND(<http://mu.semte.ch/graphs/administrative-unit> AS ?graphOne)
}
OPTIONAL {
GRAPH <http://mu.semte.ch/graphs/worship-service> {
${subject} a ?type.
}
BIND(<http://mu.semte.ch/graphs/worship-service> AS ?graphTwo)
}
${subject} org:hasPrimarySite ?site.
?site ?pSite ?oSite.
{
?site org:siteAddress ?contact.
?contact ?pContact ?oContact.
?contact locn:address ?addressContact.
?addressContact ?pAddressContact ?oAddressContact.
}
UNION
{
?site org:siteAddress ?contact.
?contact ?pContact ?oContact.
}
UNION
{
?site organisatie:bestaatUit ?address.
?address ?pAddress ?oAddress.
}
}`
},
{
trigger: { // subjectType or predicateValue
predicateValue: "org:siteAddress"
},
queryTemplate: (subject) => `
${PREFIXES}
CONSTRUCT {
?contact ?pContact ?oContact.
?addressContact ?pAddressContact ?oAddressContact.
} WHERE {
${subject} org:siteAddress ?contact.
?contact ?pContact ?oContact.
OPTIONAL {
?contact locn:address ?addressContact.
?addressContact ?pAddressContact ?oAddressContact.
}
}`
},
{
trigger: { // subjectType or predicateValue
predicateValue: "locn:address"
},
queryTemplate: (subject) => `
${PREFIXES}
CONSTRUCT {
?addressContact ?pAddressContact ?oAddressContact.
} WHERE {
${subject} locn:address ?addressContact.
?addressContact ?pAddressContact ?oAddressContact.
}`
},
{
trigger: { // subjectType or predicateValue
predicateValue: "organisatie:bestaatUit"
},
queryTemplate: (subject) => `
${PREFIXES}
CONSTRUCT {
?address ?pAddress ?oAddress.
} WHERE {
${subject} organisatie:bestaatUit ?address.
?address ?pAddress ?oAddress.
}`
}
]
}
module.exports = {
contextConfig,
PREFIXES
};

View File

@@ -1,104 +0,0 @@
const {
deleteFromPublicGraph,
insertIntoPublicGraph,
deleteFromSpecificGraphs,
insertIntoSpecificGraphs
} = require('./util');
const {
LANDING_ZONE_GRAPH
} = require('./config')
const publicTypes = [
'<http://lblod.data.gift/vocabularies/organisatie/TypeVestiging>'
]
/**
* 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) {
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 && termObjectChangeSetsWithContext[i]
}));
console.log(`Received ${zippedChangeSets.length} change sets`)
for (let { original, withContext } of zippedChangeSets) {
const {public: insertsOnPublic, target: insertsOnGraphs} = separateBetweenTargetAndPublic(original.inserts, withContext.inserts)
const {public: deletesOnPublic, target: deletesOnGraphs} = separateBetweenTargetAndPublic(original.deletes, withContext.deletes)
await deleteFromPublicGraph(lib, deletesOnPublic);
await deleteFromSpecificGraphs(lib, deletesOnGraphs);
await insertIntoPublicGraph(lib, insertsOnPublic);
await insertIntoSpecificGraphs(lib, insertsOnGraphs);
}
}
function separateBetweenTargetAndPublic(changes, context) {
const changesOnPublic = new Set();
const changesOnGraphs = {};
for(let change of changes) {
const subject = change.subject;
const contextTriples = context.filter((context) => context.subject === subject);
const graphTriple = contextTriples.find(
(context) => context.predicate === '<http://mu.semte.ch/vocabularies/ext/goesInGraph>'
&& context.object !== `<${LANDING_ZONE_GRAPH}>`
)
const otherContextTriples = context.filter(
(context) => context.predicate !== '<http://mu.semte.ch/vocabularies/ext/goesInGraph>'
&& context.predicate !== '<http://mu.semte.ch/vocabularies/ext/contextDataGoesInGraph>'
&& !(context.subject === subject && context.predicate === '<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>')
);
if(graphTriple) {
const graph = graphTriple.object.slice(1,-1); // We have to slice it to remove the "<" and ">"
if(change.object !== '') {
if(!changesOnGraphs[graph]) {
changesOnGraphs[graph] = new Set();
}
changesOnGraphs[graph].add(`${change.subject} ${change.predicate} ${change.object}.`)
}
for(let triple of otherContextTriples) {
if(triple.object === '') continue;
if(!changesOnGraphs[graph]) {
changesOnGraphs[graph] = new Set();
}
changesOnGraphs[graph].add(`${triple.subject} ${triple.predicate} ${triple.object}.`)
}
}
const typeTriple = contextTriples.find(
(context) => context.subject === subject
&& context.predicate === '<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>'
);
if(!typeTriple) continue;
const type = typeTriple.object;
if(publicTypes.includes(type)) {
changesOnPublic.add(`${change.subject} ${change.predicate} ${change.object}.`)
for(let triple of otherContextTriples) {
changesOnPublic.add(`${triple.subject} ${triple.predicate} ${triple.object}.`)
}
}
}
return {public: changesOnPublic, target: changesOnGraphs}
}
module.exports = {
dispatch
};

View File

@@ -1,69 +0,0 @@
const { batchedDbUpdate, moveDataAfterInitialSync } = 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,
LANDING_ZONE_GRAPH,
} = 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 - without 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 },
endpoint,
BATCH_SIZE,
MAX_DB_RETRY_ATTEMPTS,
SLEEP_BETWEEN_BATCHES,
SLEEP_TIME_AFTER_FAILED_DB_OPERATION
);
}
}
async function onFinishInitialIngest(lib,data) {
const { muAuthSudo } = lib;
console.log(`!! On-finish triggered !!`);
await moveDataAfterInitialSync(muAuthSudo.updateSudo, endpoint)
}
module.exports = {
dispatch,
onFinishInitialIngest
};

View File

@@ -1,337 +0,0 @@
const {
MAX_DB_RETRY_ATTEMPTS,
SLEEP_BETWEEN_BATCHES,
SLEEP_TIME_AFTER_FAILED_DB_OPERATION,
LANDING_ZONE_GRAPH,
BATCH_SIZE,
} = require('./config');
const prefixes = `
PREFIX besluit: <http://data.vlaanderen.be/ns/besluit#>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX lblodgeneriek: <https://data.lblod.info/vocabularies/generiek/>
PREFIX org: <http://www.w3.org/ns/org#>
PREFIX code: <http://lblod.data.gift/vocabularies/organisatie/>
PREFIX adms: <http://www.w3.org/ns/adms#>
PREFIX generiek: <https://data.vlaanderen.be/ns/generiek#>
PREFIX ere: <http://data.lblod.info/vocabularies/erediensten/>
PREFIX organisatie: <https://data.vlaanderen.be/ns/organisatie#>
PREFIX mu: <http://mu.semte.ch/vocabularies/core/>
PREFIX euvoc: <http://publications.europa.eu/ontology/euvoc#>
PREFIX prov: <http://www.w3.org/ns/prov#>
PREFIX schema: <http://schema.org/>
PREFIX locn: <http://www.w3.org/ns/locn#>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX ext:<http://mu.semte.ch/vocabularies/ext/>
`
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);
}
}
async function insertIntoPublicGraph(lib, statements) {
console.log(`Inserting ${statements.length} statements into public graph`);
await batchedDbUpdate(
lib.muAuthSudo.updateSudo,
'http://mu.semte.ch/graphs/public',
Array.from(statements),
{},
process.env.MU_SPARQL_ENDPOINT,
BATCH_SIZE,
MAX_DB_RETRY_ATTEMPTS,
SLEEP_BETWEEN_BATCHES,
SLEEP_TIME_AFTER_FAILED_DB_OPERATION,
'INSERT');
}
async function insertIntoSpecificGraphs(lib, statementsWithGraphs) {
for( let graph in statementsWithGraphs) {
console.log(`Inserting ${statementsWithGraphs[graph].length} statements into ${graph} graph`);
await batchedDbUpdate(
lib.muAuthSudo.updateSudo,
graph,
Array.from(statementsWithGraphs[graph]),
{},
process.env.MU_SPARQL_ENDPOINT,
BATCH_SIZE,
MAX_DB_RETRY_ATTEMPTS,
SLEEP_BETWEEN_BATCHES,
SLEEP_TIME_AFTER_FAILED_DB_OPERATION,
'INSERT');
}
}
async function deleteFromPublicGraph(lib, statements) {
console.log(`Deleting ${statements.length} statements from public graph`);
await batchedDbUpdate(
lib.muAuthSudo.updateSudo,
'http://mu.semte.ch/graphs/public',
Array.from(statements),
{},
process.env.MU_SPARQL_ENDPOINT,
BATCH_SIZE,
MAX_DB_RETRY_ATTEMPTS,
SLEEP_BETWEEN_BATCHES,
SLEEP_TIME_AFTER_FAILED_DB_OPERATION,
'DELETE');
}
async function deleteFromSpecificGraphs(lib, statementsWithGraphs) {
for( let graph in statementsWithGraphs) {
console.log(`Deleting ${statementsWithGraphs[graph].length} statements from ${graph} graph`);
await batchedDbUpdate(
lib.muAuthSudo.updateSudo,
graph,
Array.from(statementsWithGraphs[graph]),
{},
process.env.MU_SPARQL_ENDPOINT,
BATCH_SIZE,
MAX_DB_RETRY_ATTEMPTS,
SLEEP_BETWEEN_BATCHES,
SLEEP_TIME_AFTER_FAILED_DB_OPERATION,
'DELETE');
}
}
async function moveDataAfterInitialSync(muUpdate, endpoint) {
// Move primary sites admin units
await muUpdate(`
${prefixes}
INSERT {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?adminUnit org:hasPrimarySite ?site.
?site ?pSite ?oSite.
?contact ?pContact ?oContact.
?address ?pAddress ?oAddress.
?addressContact ?pAddressContact ?oAddressContact.
}
} WHERE {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?adminUnit a ?type.
}
GRAPH <${LANDING_ZONE_GRAPH}> {
?adminUnit org:hasPrimarySite ?site.
?site ?pSite ?oSite.
{
?site org:siteAddress ?contact.
?contact ?pContact ?oContact.
?contact locn:address ?addressContact.
?addressContact ?pAddressContact ?oAddressContact.
}
UNION
{
?site org:siteAddress ?contact.
?contact ?pContact ?oContact.
}
UNION
{
?site organisatie:bestaatUit ?address.
?address ?pAddress ?oAddress.
}
}
}
`, undefined, endpoint)
// Move sites administrative units
await muUpdate(`
${prefixes}
INSERT {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?adminUnit org:hasSite ?site.
?site ?pSite ?oSite.
?contact ?pContact ?oContact.
?address ?pAddress ?oAddress.
?addressContact ?pAddressContact ?oAddressContact.
}
} WHERE {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?adminUnit a ?type.
}
GRAPH <${LANDING_ZONE_GRAPH}> {
?adminUnit org:hasSite ?site.
?site ?pSite ?oSite.
{
?site org:siteAddress ?contact.
?contact ?pContact ?oContact.
?contact locn:address ?addressContact.
?addressContact ?pAddressContact ?oAddressContact.
}
UNION
{
?site org:siteAddress ?contact.
?contact ?pContact ?oContact.
}
UNION
{
?site organisatie:bestaatUit ?address.
?address ?pAddress ?oAddress.
}
}
}
`, undefined, endpoint)
// Move primary sites worships
await muUpdate(`
${prefixes}
INSERT {
GRAPH <http://mu.semte.ch/graphs/worship-service> {
?adminUnit org:hasPrimarySite ?site.
?site ?pSite ?oSite.
?contact ?pContact ?oContact.
?address ?pAddress ?oAddress.
?addressContact ?pAddressContact ?oAddressContact.
}
} WHERE {
GRAPH <http://mu.semte.ch/graphs/worship-service> {
?adminUnit a ?type.
}
GRAPH <${LANDING_ZONE_GRAPH}> {
?adminUnit org:hasPrimarySite ?site.
?site ?pSite ?oSite.
{
?site org:siteAddress ?contact.
?contact ?pContact ?oContact.
?contact locn:address ?addressContact.
?addressContact ?pAddressContact ?oAddressContact.
}
UNION
{
?site org:siteAddress ?contact.
?contact ?pContact ?oContact.
}
UNION
{
?site organisatie:bestaatUit ?address.
?address ?pAddress ?oAddress.
}
}
}
`, undefined, endpoint)
// Move sites worships
await muUpdate(`
${prefixes}
INSERT {
GRAPH <http://mu.semte.ch/graphs/worship-service> {
?adminUnit org:hasSite ?site.
?site ?pSite ?oSite.
?contact ?pContact ?oContact.
?address ?pAddress ?oAddress.
?addressContact ?pAddressContact ?oAddressContact.
}
} WHERE {
GRAPH <http://mu.semte.ch/graphs/worship-service> {
?adminUnit a ?type.
}
GRAPH <${LANDING_ZONE_GRAPH}> {
?adminUnit org:hasSite ?site.
?site ?pSite ?oSite.
{
?site org:siteAddress ?contact.
?contact ?pContact ?oContact.
?contact locn:address ?addressContact.
?addressContact ?pAddressContact ?oAddressContact.
}
UNION
{
?site org:siteAddress ?contact.
?contact ?pContact ?oContact.
}
UNION
{
?site organisatie:bestaatUit ?address.
?address ?pAddress ?oAddress.
}
}
}
`, undefined, endpoint)
// Move sites worships
await muUpdate(`
${prefixes}
INSERT {
GRAPH <http://mu.semte.ch/graphs/public> {
?type a <http://lblod.data.gift/vocabularies/organisatie/TypeVestiging>.
?type ?a ?b.
}
} WHERE {
GRAPH <${LANDING_ZONE_GRAPH}> {
?type a <http://lblod.data.gift/vocabularies/organisatie/TypeVestiging>.
?type ?a ?b.
}
}
`, undefined, endpoint)
}
module.exports = {
batchedDbUpdate,
moveDataAfterInitialSync,
insertIntoPublicGraph,
deleteFromPublicGraph,
insertIntoSpecificGraphs,
deleteFromSpecificGraphs,
};

View File

@@ -231,10 +231,12 @@ DefaultHost = localhost:8890
;DefaultGraph = http://localhost:8890/dataspace
;ImmutableGraphs = http://localhost:8890/dataspace
ResultSetMaxRows = 1000000 ; 1 million
MaxConstructTriples = 1000000 ; More info on this addition here: https://github.com/redpencilio/docker-virtuoso/pull/29
;MaxQueryCostEstimationTime = 4000 ; in seconds
MaxQueryExecutionTime = 1200 ; in seconds
DefaultQuery = select distinct ?Concept where {[] a ?Concept} LIMIT 100
DeferInferenceRulesInit = 0 ; controls inference rules loading
MaxMemInUse = 0 ; limits the amount of memory for construct dict (0=unlimited). More info on this addition here: https://github.com/redpencilio/docker-virtuoso/pull/29
;PingService = http://rpc.pingthesemanticweb.com/
[Plugins]

View File

@@ -231,10 +231,12 @@ DefaultHost = localhost:8890
;DefaultGraph = http://localhost:8890/dataspace
;ImmutableGraphs = http://localhost:8890/dataspace
ResultSetMaxRows = 1000000 ; 1 million
MaxConstructTriples = 1000000 ; More info on this addition here: https://github.com/redpencilio/docker-virtuoso/pull/29
;MaxQueryCostEstimationTime = 4000 ; in seconds
MaxQueryExecutionTime = 1200 ; in seconds
DefaultQuery = select distinct ?Concept where {[] a ?Concept} LIMIT 100
DeferInferenceRulesInit = 0 ; controls inference rules loading
MaxMemInUse = 0 ; limits the amount of memory for construct dict (0=unlimited). More info on this addition here: https://github.com/redpencilio/docker-virtuoso/pull/29
;PingService = http://rpc.pingthesemanticweb.com/
[Plugins]

View File

@@ -497,6 +497,73 @@
"http://mu.semte.ch/vocabularies/core/uuid",
"http://www.w3.org/2004/02/skos/core#prefLabel"
]
},
{
"type": "http://lblod.data.gift/vocabularies/organisatie/MandatarisStatusCode",
"graphsFilter": [
"http://mu.semte.ch/graphs/public"
],
"pathToConceptScheme": [
"http://www.w3.org/2004/02/skos/core#inScheme"
],
"properties": [
"http://mu.semte.ch/vocabularies/core/uuid",
"http://www.w3.org/2004/02/skos/core#prefLabel"
]
},
{
"type": "http://lblod.data.gift/vocabularies/organisatie/BestuursfunctieCode",
"graphsFilter": [
"http://mu.semte.ch/graphs/public"
],
"pathToConceptScheme": [
"http://www.w3.org/2004/02/skos/core#inScheme"
],
"properties": [
"http://mu.semte.ch/vocabularies/core/uuid",
"http://www.w3.org/2004/02/skos/core#prefLabel"
]
},
{
"type": "http://data.lblod.info/vocabularies/leidinggevenden/FunctionarisStatusCode",
"graphsFilter": [
"http://mu.semte.ch/graphs/public"
],
"pathToConceptScheme": [
"http://www.w3.org/2004/02/skos/core#inScheme"
],
"properties": [
"http://mu.semte.ch/vocabularies/core/uuid",
"http://www.w3.org/2004/02/skos/core#prefLabel"
]
},
{
"type": "http://mu.semte.ch/vocabularies/ext/OrganizationClassificationCode",
"graphsFilter": [
"http://mu.semte.ch/graphs/public"
],
"pathToConceptScheme": [
"http://www.w3.org/2004/02/skos/core#inScheme"
],
"properties": [
"http://mu.semte.ch/vocabularies/core/uuid",
"http://www.w3.org/2004/02/skos/core#prefLabel"
]
},
{
"type": "http://www.w3.org/ns/prov#Location",
"graphsFilter": [
"http://mu.semte.ch/graphs/shared",
"http://mu.semte.ch/graphs/administrative-unit"
],
"hasRegexGraphsFilter": false,
"properties": [
"http://www.w3.org/2000/01/rdf-schema#label",
"http://mu.semte.ch/vocabularies/core/uuid",
"http://mu.semte.ch/vocabularies/ext/werkingsgebiedNiveau",
"http://www.opengis.net/ont/geosparql#sfWithin",
"http://www.w3.org/2004/02/skos/core#exactMatch"
]
}
]
}

View File

@@ -0,0 +1,31 @@
PREFIX org: <http://www.w3.org/ns/org#>
DELETE {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?membership ?p ?o .
}
} WHERE {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?membership a org:Membership ;
org:member ?member ;
org:organization ?organization ;
org:role <http://data.lblod.info/id/rollen/4ec7d5c39bdc4e84b4174379b9e22ad8> ; # has a relation with
?p ?o .
?organization org:classification ?organizationClass .
FILTER (?organizationClass IN
(
<http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/ea446861-2c51-45fa-afd3-4e4a37b71562> , # HVZ
<http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/80310756-ce0a-4a1b-9b8e-7c01b6cc7a2d> , # APB
<http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/d01bb1f6-2439-4e33-9c25-1fc295de2e71> , # Dienstverlenende vereniging
<http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/cd93f147-3ece-4308-acab-5c5ada3ec63d> , # Opdrachthoudende vereniging
<http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/4b8450cf-a326-4c66-9e63-b4ec10acc7f6> , # Opdrachthoudende vereniging met private deelname
<http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/b156b67f-c5f4-4584-9b30-4c090be02fdc> , # Projectvereniging
<http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/a3922c6d-425b-474f-9a02-ffb71a436bfc> , # Politiezone
<http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/34b5af85-dc9f-468f-9e03-ef89b174c267> , # Autonome verzorgingsinstelling
<http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/36a82ba0-7ff1-4697-a9dd-2e94df73b721> , # AGB
<http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/e8294b73-87c9-4fa2-9441-1937350763c9> # Welzijnsvereniging
)
)
}
}

View File

@@ -1,364 +1,432 @@
defmodule Dispatcher do
use Matcher
define_accept_types [
define_accept_types(
html: ["text/html", "application/xhtml+html"],
json: ["application/json", "application/vnd.api+json"],
upload: ["multipart/form-data"],
sparql_json: ["application/sparql-results+json"],
any: [ "*/*" ],
]
define_layers [ :api_services, :api, :frontend, :not_found ]
any: ["*/*"]
)
define_layers([:api_services, :api, :frontend, :not_found])
###############################################################
# domain.json
###############################################################
match "/people/*path", %{ accept: [:json], layer: :api} do
Proxy.forward conn, path, "http://cache/people/"
match "/people/*path", %{accept: [:json], layer: :api} do
Proxy.forward(conn, path, "http://cache/people/")
end
match "/agents-in-position/*path", %{ accept: [:json], layer: :api} do
Proxy.forward conn, path, "http://cache/agents-in-position/"
match "/agents-in-position/*path", %{accept: [:json], layer: :api} do
Proxy.forward(conn, path, "http://cache/agents-in-position/")
end
match "/posts/*path", %{ accept: [:json], layer: :api} do
Proxy.forward conn, path, "http://cache/posts/"
match "/posts/*path", %{accept: [:json], layer: :api} do
Proxy.forward(conn, path, "http://cache/posts/")
end
match "/mandatories/*path", %{ accept: [:json], layer: :api} do
Proxy.forward conn, path, "http://cache/mandatories/"
match "/mandatories/*path", %{accept: [:json], layer: :api} do
Proxy.forward(conn, path, "http://cache/mandatories/")
end
match "/mandatory-status-codes/*path", %{ accept: [:json], layer: :api} do
Proxy.forward conn, path, "http://cache/mandatory-status-codes/"
match "/mandatory-status-codes/*path", %{accept: [:json], layer: :api} do
Proxy.forward(conn, path, "http://cache/mandatory-status-codes/")
end
match "/worship-mandatories/*path", %{ accept: [:json], layer: :api} do
Proxy.forward conn, path, "http://cache/worship-mandatories/"
match "/worship-mandatories/*path", %{accept: [:json], layer: :api} do
Proxy.forward(conn, path, "http://cache/worship-mandatories/")
end
match "/half-elections/*path", %{ accept: [:json], layer: :api} do
Proxy.forward conn, path, "http://cache/half-elections/"
match "/half-elections/*path", %{accept: [:json], layer: :api} do
Proxy.forward(conn, path, "http://cache/half-elections/")
end
match "/contact-points/*path", %{ accept: [:json], layer: :api} do
Proxy.forward conn, path, "http://cache/contact-points/"
match "/contact-points/*path", %{accept: [:json], layer: :api} do
Proxy.forward(conn, path, "http://cache/contact-points/")
end
match "/mandates/*path", %{ accept: [:json], layer: :api} do
Proxy.forward conn, path, "http://cache/mandates/"
match "/mandates/*path", %{accept: [:json], layer: :api} do
Proxy.forward(conn, path, "http://cache/mandates/")
end
match "/board-positions/*path", %{ accept: [:json], layer: :api} do
Proxy.forward conn, path, "http://cache/board-positions/"
match "/board-positions/*path", %{accept: [:json], layer: :api} do
Proxy.forward(conn, path, "http://cache/board-positions/")
end
match "/board-position-codes/*path", %{ accept: [:json], layer: :api} do
Proxy.forward conn, path, "http://cache/board-position-codes/"
match "/board-position-codes/*path", %{accept: [:json], layer: :api} do
Proxy.forward(conn, path, "http://cache/board-position-codes/")
end
match "/functionaries/*path", %{ accept: [:json], layer: :api} do
Proxy.forward conn, path, "http://cache/functionaries/"
match "/functionaries/*path", %{accept: [:json], layer: :api} do
Proxy.forward(conn, path, "http://cache/functionaries/")
end
match "/agent-status-codes/*path", %{ accept: [:json], layer: :api} do
Proxy.forward conn, path, "http://cache/agent-status-codes/"
match "/agent-status-codes/*path", %{accept: [:json], layer: :api} do
Proxy.forward(conn, path, "http://cache/agent-status-codes/")
end
match "/roles/*path", %{ accept: [:json], layer: :api} do
Proxy.forward conn, path, "http://cache/roles/"
match "/roles/*path", %{accept: [:json], layer: :api} do
Proxy.forward(conn, path, "http://cache/roles/")
end
match "/organizations/*path", %{ accept: [:json], layer: :api} do
Proxy.forward conn, path, "http://cache/organizations/"
match "/organizations/*path", %{accept: [:json], layer: :api} 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/"
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://cache/administrative-units/"
match "/administrative-units/*path", %{accept: [:json], layer: :api} do
Proxy.forward(conn, path, "http://cache/administrative-units/")
end
match "/administrative-unit-classification-codes/*path", %{ accept: [:json], layer: :api} do
Proxy.forward conn, path, "http://cache/administrative-unit-classification-codes/"
match "/administrative-unit-classification-codes/*path", %{accept: [:json], layer: :api} do
Proxy.forward(conn, path, "http://cache/administrative-unit-classification-codes/")
end
match "/organization-classification-codes/*path", %{ accept: [:json], layer: :api} do
Proxy.forward conn, path, "http://cache/organization-classification-codes/"
match "/organization-classification-codes/*path", %{accept: [:json], layer: :api} 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/"
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://cache/worship-administrative-units/"
match "/worship-administrative-units/*path", %{accept: [:json], layer: :api} do
Proxy.forward(conn, path, "http://cache/worship-administrative-units/")
end
match "/worship-services/*path", %{ accept: [:json], layer: :api} do
Proxy.forward conn, path, "http://cache/worship-services/"
match "/worship-services/*path", %{accept: [:json], layer: :api} do
Proxy.forward(conn, path, "http://cache/worship-services/")
end
match "/recognized-worship-types/*path", %{ accept: [:json], layer: :api} do
Proxy.forward conn, path, "http://cache/recognized-worship-types/"
match "/recognized-worship-types/*path", %{accept: [:json], layer: :api} do
Proxy.forward(conn, path, "http://cache/recognized-worship-types/")
end
match "/central-worship-services/*path", %{ accept: [:json], layer: :api} do
Proxy.forward conn, path, "http://cache/central-worship-services/"
match "/central-worship-services/*path", %{accept: [:json], layer: :api} do
Proxy.forward(conn, path, "http://cache/central-worship-services/")
end
match "/representative-bodies/*path", %{ accept: [:json], layer: :api} do
Proxy.forward conn, path, "http://cache/representative-bodies/"
match "/representative-bodies/*path", %{accept: [:json], layer: :api} do
Proxy.forward(conn, path, "http://cache/representative-bodies/")
end
match "/governing-bodies/*path", %{ accept: [:json], layer: :api} do
Proxy.forward conn, path, "http://cache/governing-bodies/"
match "/governing-bodies/*path", %{accept: [:json], layer: :api} do
Proxy.forward(conn, path, "http://cache/governing-bodies/")
end
match "/governing-body-classification-codes/*path", %{ accept: [:json], layer: :api} do
Proxy.forward conn, path, "http://cache/governing-body-classification-codes/"
match "/governing-body-classification-codes/*path", %{accept: [:json], layer: :api} do
Proxy.forward(conn, path, "http://cache/governing-body-classification-codes/")
end
match "/local-involvements/*path", %{ accept: [:json], layer: :api} do
Proxy.forward conn, path, "http://cache/local-involvements/"
match "/local-involvements/*path", %{accept: [:json], layer: :api} do
Proxy.forward(conn, path, "http://cache/local-involvements/")
end
match "/identifiers/*path", %{ accept: [:json], layer: :api} do
Proxy.forward conn, path, "http://cache/identifiers/"
match "/identifiers/*path", %{accept: [:json], layer: :api} do
Proxy.forward(conn, path, "http://cache/identifiers/")
end
match "/structured-identifiers/*path", %{ accept: [:json], layer: :api} do
Proxy.forward conn, path, "http://cache/structured-identifiers/"
match "/structured-identifiers/*path", %{accept: [:json], layer: :api} do
Proxy.forward(conn, path, "http://cache/structured-identifiers/")
end
match "/addresses/*path", %{ accept: [:json], layer: :api} do
Proxy.forward conn, path, "http://cache/addresses/"
match "/addresses/*path", %{accept: [:json], layer: :api} do
Proxy.forward(conn, path, "http://cache/addresses/")
end
match "/sites/*path", %{ accept: [:json], layer: :api} do
Proxy.forward conn, path, "http://cache/sites/"
match "/sites/*path", %{accept: [:json], layer: :api} do
Proxy.forward(conn, path, "http://cache/sites/")
end
match "/change-events/*path", %{ accept: [:json], layer: :api} do
Proxy.forward conn, path, "http://cache/change-events/"
match "/change-events/*path", %{accept: [:json], layer: :api} do
Proxy.forward(conn, path, "http://cache/change-events/")
end
match "/change-event-types/*path", %{ accept: [:json], layer: :api} do
Proxy.forward conn, path, "http://cache/change-event-types/"
match "/change-event-types/*path", %{accept: [:json], layer: :api} do
Proxy.forward(conn, path, "http://cache/change-event-types/")
end
match "/change-event-results/*path", %{ accept: [:json], layer: :api} do
Proxy.forward conn, path, "http://cache/change-event-results/"
match "/change-event-results/*path", %{accept: [:json], layer: :api} do
Proxy.forward(conn, path, "http://cache/change-event-results/")
end
match "/organization-status-codes/*path", %{ accept: [:json], layer: :api} do
Proxy.forward conn, path, "http://cache/organization-status-codes/"
match "/organization-status-codes/*path", %{accept: [:json], layer: :api} do
Proxy.forward(conn, path, "http://cache/organization-status-codes/")
end
match "/locations/*path", %{ accept: [:json], layer: :api} do
Proxy.forward conn, path, "http://cache/locations/"
match "/locations/*path", %{accept: [:json], layer: :api} do
Proxy.forward(conn, path, "http://cache/locations/")
end
match "/involvement-types/*path", %{ accept: [:json], layer: :api} do
Proxy.forward conn, path, "http://cache/involvement-types/"
match "/involvement-types/*path", %{accept: [:json], layer: :api} do
Proxy.forward(conn, path, "http://cache/involvement-types/")
end
match "/ministers/*path", %{ accept: [:json], layer: :api} do
Proxy.forward conn, path, "http://cache/ministers/"
match "/ministers/*path", %{accept: [:json], layer: :api} do
Proxy.forward(conn, path, "http://cache/ministers/")
end
match "/minister-conditions/*path", %{ accept: [:json], layer: :api} do
Proxy.forward conn, path, "http://cache/minister-conditions/"
match "/minister-conditions/*path", %{accept: [:json], layer: :api} do
Proxy.forward(conn, path, "http://cache/minister-conditions/")
end
match "/dates-of-birth/*path", %{ accept: [:json], layer: :api} do
Proxy.forward conn, path, "http://cache/dates-of-birth/"
match "/dates-of-birth/*path", %{accept: [:json], layer: :api} do
Proxy.forward(conn, path, "http://cache/dates-of-birth/")
end
match "/nationalities/*path", %{ accept: [:json], layer: :api} do
Proxy.forward conn, path, "http://cache/nationalities/"
match "/nationalities/*path", %{accept: [:json], layer: :api} do
Proxy.forward(conn, path, "http://cache/nationalities/")
end
match "/gender-codes/*path", %{ accept: [:json], layer: :api} do
Proxy.forward conn, path, "http://cache/gender-codes/"
end
match "/concepts/*path", %{ accept: [:json], layer: :api} do
Proxy.forward conn, path, "http://cache/concepts/"
match "/gender-codes/*path", %{accept: [:json], layer: :api} do
Proxy.forward(conn, path, "http://cache/gender-codes/")
end
match "/minister-positions/*path", %{ accept: [:json], layer: :api} do
Proxy.forward conn, path, "http://cache/minister-positions/"
match "/concepts/*path", %{accept: [:json], layer: :api} do
Proxy.forward(conn, path, "http://cache/concepts/")
end
match "/minister-position-functions/*path", %{ accept: [:json], layer: :api} do
Proxy.forward conn, path, "http://cache/minister-position-functions/"
match "/minister-positions/*path", %{accept: [:json], layer: :api} do
Proxy.forward(conn, path, "http://cache/minister-positions/")
end
match "/financing-codes/*path", %{ accept: [:json], layer: :api} do
Proxy.forward conn, path, "http://cache/financing-codes/"
match "/minister-position-functions/*path", %{accept: [:json], layer: :api} do
Proxy.forward(conn, path, "http://cache/minister-position-functions/")
end
match "/minister-condition-criterions/*path", %{ accept: [:json], layer: :api} do
Proxy.forward conn, path, "http://cache/minister-condition-criterions/"
match "/financing-codes/*path", %{accept: [:json], layer: :api} do
Proxy.forward(conn, path, "http://cache/financing-codes/")
end
match "/document-types-criterions/*path", %{ accept: [:json], layer: :api} do
Proxy.forward conn, path, "http://cache/document-types-criterions/"
match "/minister-condition-criterions/*path", %{accept: [:json], layer: :api} do
Proxy.forward(conn, path, "http://cache/minister-condition-criterions/")
end
match "/site-types/*path", %{ accept: [:json], layer: :api} do
Proxy.forward conn, path, "http://cache/site-types/"
match "/document-types-criterions/*path", %{accept: [:json], layer: :api} do
Proxy.forward(conn, path, "http://cache/document-types-criterions/")
end
match "/request-reasons/*path", %{ accept: [:json], layer: :api} do
Proxy.forward conn, path, "http://cache/request-reasons/"
match "/site-types/*path", %{accept: [:json], layer: :api} do
Proxy.forward(conn, path, "http://cache/site-types/")
end
match "/decisions/*path", %{ accept: [:json], layer: :api} do
Proxy.forward conn, path, "http://cache/decisions/"
match "/request-reasons/*path", %{accept: [:json], layer: :api} do
Proxy.forward(conn, path, "http://cache/request-reasons/")
end
match "/decision-activities/*path", %{ accept: [:json], layer: :api} do
Proxy.forward conn, path, "http://cache/decision-activities/"
match "/decisions/*path", %{accept: [:json], layer: :api} do
Proxy.forward(conn, path, "http://cache/decisions/")
end
match "/decision-activities/*path", %{accept: [:json], layer: :api} do
Proxy.forward(conn, path, "http://cache/decision-activities/")
end
match "/memberships/*path", %{accept: [:json], layer: :api} do
Proxy.forward(conn, path, "http://cache/memberships/")
end
match "/membership-roles/*path", %{accept: [:json], layer: :api} do
Proxy.forward(conn, path, "http://cache/membership-roles/")
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/"
match "/kbo-organizations/*path", %{accept: [:any], layer: :api} do
Proxy.forward(conn, path, "http://resource/kbo-organizations/")
end
# Dashboard
match "/jobs/*path", %{accept: [:json], layer: :api} do
Proxy.forward(conn, path, "http://cache/jobs/")
end
match "/tasks/*path", %{accept: [:json], layer: :api} do
Proxy.forward(conn, path, "http://cache/tasks/")
end
match "/data-containers/*path", %{accept: [:json], layer: :api} do
Proxy.forward(conn, path, "http://cache/data-containers/")
end
match "/job-errors/*path", %{accept: [:json], layer: :api} do
Proxy.forward(conn, path, "http://cache/job-errors/")
end
match "/reports/*path", %{accept: [:json], layer: :api} do
Proxy.forward(conn, path, "http://resource/reports/")
end
match "/log-entries/*path", %{accept: [:json], layer: :api} do
Proxy.forward(conn, path, "http://resource/log-entries/")
end
match "/log-levels/*path", %{accept: [:json], layer: :api} do
Proxy.forward(conn, path, "http://resource/log-levels/")
end
match "/status-codes/*path", %{accept: [:json], layer: :api} do
Proxy.forward(conn, path, "http://resource/status-codes/")
end
match "/log-sources/*path", %{accept: [:json], layer: :api} do
Proxy.forward(conn, path, "http://resource/log-sources/")
end
match "/remote-data-objects/*path", %{accept: [:json], layer: :api} do
Proxy.forward(conn, path, "http://resource/remote-data-objects/")
end
###############
# LOGIN
###############
match "/accounts", %{ accept: [:json], layer: :api} do
Proxy.forward conn, [], "http://resource/accounts/"
end
match "/accounts/*path", %{ accept: [:json], layer: :api} do
Proxy.forward conn, path, "http://accountdetail/accounts/"
end
match "/active-role/*path", %{ accept: [:json], layer: :api} do
Proxy.forward conn, path, "http://roles/"
end
match "/groups/*path", %{ accept: [:json], layer: :api} do
Proxy.forward conn, path, "http://resource/groups/"
match "/accounts", %{accept: [:json], layer: :api} do
Proxy.forward(conn, [], "http://resource/accounts/")
end
match "/mock/sessions/*path", %{ accept: [:any], layer: :api} do
Proxy.forward conn, path, "http://mocklogin/sessions/"
match "/accounts/*path", %{accept: [:json], layer: :api} do
Proxy.forward(conn, path, "http://accountdetail/accounts/")
end
match "/sessions/*path", %{ accept: [:any], layer: :api} do
Proxy.forward conn, path, "http://login/sessions/"
match "/active-role/*path", %{accept: [:json], layer: :api} do
Proxy.forward(conn, path, "http://roles/")
end
match "/groups/*path", %{accept: [:json], layer: :api} do
Proxy.forward(conn, path, "http://resource/groups/")
end
match "/mock/sessions/*path", %{accept: [:any], layer: :api} do
Proxy.forward(conn, path, "http://mocklogin/sessions/")
end
match "/sessions/*path", %{ reverse_host: ["dashboard" | _rest] } do
Proxy.forward conn, path, "http://dashboard-login/sessions/"
end
match "/sessions/*path", %{accept: [:any], layer: :api} do
Proxy.forward(conn, path, "http://login/sessions/")
end
###############################################################
# SEARCH
###############################################################
match "/search/*path", %{ accept: %{ json: true }, layer: :api_services} do
Proxy.forward conn, path, "http://search/"
match "/search/*path", %{accept: %{json: true}, layer: :api_services} do
Proxy.forward(conn, path, "http://search/")
end
###############
# API SERVICES
###############
match "/v3/api-docs/*path", %{ layer: :api_services, accept: %{ json: true } } do
forward conn, path, "http://kalliope-api/v3/api-docs/"
match "/v3/api-docs/*path", %{layer: :api_services, accept: %{json: true}} do
forward(conn, path, "http://kalliope-api/v3/api-docs/")
end
match "/consolidated/*path", %{ layer: :api_services, accept: %{ json: true } } do
forward conn, path, "http://kalliope-api/consolidated/"
match "/consolidated/*path", %{layer: :api_services, accept: %{json: true}} do
forward(conn, path, "http://kalliope-api/consolidated/")
end
match "/adresses-register/*path", %{ layer: :api_services, accept: %{ json: true } } do
forward conn, path, "http://adressenregister/"
match "/adresses-register/*path", %{layer: :api_services, accept: %{json: true}} do
forward(conn, path, "http://adressenregister/")
end
match "/worship/person-information-updates/*path", %{ layer: :api_services, accept: %{ json: true } } do
forward conn, path, "http://privacy-worship/person-information-updates"
match "/worship/person-information-updates/*path", %{
layer: :api_services,
accept: %{json: true}
} do
forward(conn, path, "http://privacy-worship/person-information-updates")
end
match "/worship/person-information-requests/*path", %{ layer: :api_services, accept: %{ json: true } } do
forward conn, path, "http://privacy-worship/person-information-requests"
match "/worship/person-information-requests/*path", %{
layer: :api_services,
accept: %{json: true}
} do
forward(conn, path, "http://privacy-worship/person-information-requests")
end
match "/worship/person-information-ask/*path", %{ layer: :api_services, accept: %{ json: true } } do
forward conn, path, "http://privacy-worship/person-information-ask/"
match "/worship/person-information-ask/*path", %{layer: :api_services, accept: %{json: true}} do
forward(conn, path, "http://privacy-worship/person-information-ask/")
end
match "/worship/person-information-validate-ssn/*path", %{ layer: :api_services, accept: %{ json: true } } do
forward conn, path, "http://privacy-worship/person-information-validate-ssn/"
match "/worship/person-information-validate-ssn/*path", %{
layer: :api_services,
accept: %{json: true}
} do
forward(conn, path, "http://privacy-worship/person-information-validate-ssn/")
end
match "/person-information-updates/*path", %{ layer: :api_services, accept: %{ json: true } } do
forward conn, path, "http://privacy-unit/person-information-updates"
match "/person-information-updates/*path", %{layer: :api_services, accept: %{json: true}} do
forward(conn, path, "http://privacy-unit/person-information-updates")
end
match "/person-information-requests/*path", %{ layer: :api_services, accept: %{ json: true } } do
forward conn, path, "http://privacy-unit/person-information-requests"
match "/person-information-requests/*path", %{layer: :api_services, accept: %{json: true}} do
forward(conn, path, "http://privacy-unit/person-information-requests")
end
match "/person-information-ask/*path", %{ layer: :api_services, accept: %{ json: true } } do
forward conn, path, "http://privacy-unit/person-information-ask/"
match "/person-information-ask/*path", %{layer: :api_services, accept: %{json: true}} do
forward(conn, path, "http://privacy-unit/person-information-ask/")
end
match "/person-information-validate-ssn/*path", %{ layer: :api_services, accept: %{ json: true } } do
forward conn, path, "http://privacy-unit/person-information-validate-ssn/"
match "/person-information-validate-ssn/*path", %{layer: :api_services, accept: %{json: true}} do
forward(conn, path, "http://privacy-unit/person-information-validate-ssn/")
end
get "/uri-info/*path", %{ layer: :api_services, accept: %{ json: true } } do
forward conn, path, "http://uri-info/"
get "/uri-info/*path", %{layer: :api_services, accept: %{json: true}} do
forward(conn, path, "http://uri-info/")
end
post "/construct-organization-relationships/*path", %{ layer: :api_services, accept: %{ json: true } } do
forward conn, path, "http://construct-organization-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
forward conn, path, "http://kbo-data-sync/sync-kbo-data/"
post "/kbo-data-sync/*path", %{layer: :api_services, accept: %{json: true}} do
forward(conn, path, "http://kbo-data-sync/sync-kbo-data/")
end
get "/ldes/*path", %{ layer: :api_services } do
forward conn, path, "http://ldes-backend/"
get "/ldes/*path", %{layer: :api_services} do
forward(conn, path, "http://ldes-backend/")
end
#################################################################
# ERROR REPORT
#################################################################
match "/error-reports/*path", %{ layer: :api_services, accept: %{ json: true } } do
forward conn, path, "http://error-report-service/error-reports/"
match "/error-reports/*path", %{layer: :api_services, accept: %{json: true}} do
forward(conn, path, "http://error-report-service/error-reports/")
end
#################################################################
# FILES
#################################################################
get "/files/:id/download", %{ accept: [:any], } do
Proxy.forward conn, [], "http://file/files/" <> id <> "/download"
get "/files/:id/download", %{accept: [:any]} do
Proxy.forward(conn, [], "http://file/files/" <> id <> "/download")
end
get "/files/*path" , %{ layer: :api_services, accept: %{ json: true } } do
Proxy.forward conn, path, "http://resource/files/"
get "/files/*path", %{layer: :api_services, accept: %{json: true}} do
Proxy.forward(conn, path, "http://resource/files/")
end
#################################################################
# DCAT
#################################################################
get "/datasets/*path", %{ layer: :api_services, accept: %{ json: true } } do
Proxy.forward conn, path, "http://resource/datasets/"
get "/datasets/*path", %{layer: :api_services, accept: %{json: true}} do
Proxy.forward(conn, path, "http://resource/datasets/")
end
get "/distributions/*path", %{ layer: :api_services, accept: %{ json: true } } do
Proxy.forward conn, path, "http://resource/distributions/"
get "/distributions/*path", %{layer: :api_services, accept: %{json: true}} do
Proxy.forward(conn, path, "http://resource/distributions/")
end
#################################################################
@@ -398,44 +466,56 @@ defmodule Dispatcher do
#################################################################
get "/download-exports/*path" do
Proxy.forward conn, path, "http://download-exports/"
Proxy.forward(conn, path, "http://download-exports/")
end
###############################################################
# frontend layer
###############################################################
match "/assets/*path", %{ layer: :api } do
Proxy.forward conn, path, "http://frontend/assets/"
get "/assets/*path", %{ reverse_host: ["dashboard" | _rest], layer: :api } do
forward conn, path, "http://frontend-dashboard/assets/"
end
match "/@appuniversum/*path", %{ layer: :api } do
Proxy.forward conn, path, "http://frontend/@appuniversum/"
get "/@appuniversum/*path", %{ reverse_host: ["dashboard" | _rest], layer: :api} do
forward conn, path, "http://frontend-dashboard/@appuniversum/"
end
match "/*path", %{ accept: [:html], layer: :api } do
Proxy.forward conn, [], "http://frontend/index.html"
match "/*_path", %{ reverse_host: ["dashboard" | _rest], layer: :api } do
# *_path allows a path to be supplied, but will not yield
# an error that we don't use the path variable.
forward conn, [], "http://frontend-dashboard/index.html"
end
match "/*_path", %{ layer: :frontend } do
Proxy.forward conn, [], "http://frontend/index.html"
match "/assets/*path", %{layer: :api} do
Proxy.forward(conn, path, "http://frontend/assets/")
end
match "/@appuniversum/*path", %{layer: :api} do
Proxy.forward(conn, path, "http://frontend/@appuniversum/")
end
match "/*path", %{accept: [:html], layer: :api} do
Proxy.forward(conn, [], "http://frontend/index.html")
end
match "/*_path", %{layer: :frontend} do
Proxy.forward(conn, [], "http://frontend/index.html")
end
###############################################################
# sparql endpoint
###############################################################
post "/sparql/*path", %{ layer: :api_services, accept: %{ sparql_json: true } } do
forward conn, path, "http://db:8890/sparql/"
post "/sparql/*path", %{layer: :api_services, accept: %{sparql_json: true}} do
forward(conn, path, "http://db:8890/sparql/")
end
###############################################################
# errors
###############################################################
match "/*_path", %{ accept: [:any], layer: :not_found} do
send_resp( conn, 404, "{\"error\": {\"code\": 404}")
match "/*_path", %{accept: [:any], layer: :not_found} do
send_resp(conn, 404, "{\"error\": {\"code\": 404}")
end
end

View File

@@ -0,0 +1,15 @@
DELETE {
GRAPH ?g {
<http://data.lblod.info/id/bestuurseenheden/8d6609b4-1a20-46b8-97ed-150c6d53acd6> <http://www.w3.org/ns/regorg#orgStatus> ?orgStatus .
}
}
INSERT {
GRAPH ?g {
<http://data.lblod.info/id/bestuurseenheden/8d6609b4-1a20-46b8-97ed-150c6d53acd6> <http://www.w3.org/ns/regorg#orgStatus> <http://lblod.data.gift/concepts/d02c4e12bf88d2fdf5123b07f29c9311> .
}
}
WHERE {
GRAPH ?g {
<http://data.lblod.info/id/bestuurseenheden/8d6609b4-1a20-46b8-97ed-150c6d53acd6> <http://www.w3.org/ns/regorg#orgStatus> ?orgStatus .
}
}

View File

@@ -0,0 +1,196 @@
DELETE {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?bestuursorganen ?bestuursorganenP ?bestuursorganenO .
}
}
WHERE {
VALUES ?bestuursorganen {
<http://data.lblod.info/id/bestuursorganen/24d8e602a8ddbe0adf3dea8c40277706>
<http://data.lblod.info/id/bestuursorganen/dad1789d9b9f8f6cb3c81cc2ca88154f>
<http://data.lblod.info/id/bestuursorganen/b90d16f2c8043bc20b88da232c0389fc>
<http://data.lblod.info/id/bestuursorganen/2f27a688e1728c1906a4bbd8670d7810>
}
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?bestuursorganen ?bestuursorganenP ?bestuursorganenO .
}
}
;
DELETE {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?bestuursorganenInTijd ?bestuursorganenInTijdP ?bestuursorganenInTijdO .
}
}
WHERE {
VALUES ?bestuursorganenInTijd {
<http://data.lblod.info/id/bestuursorganen/c5bb7bca7363109b94b58b1aef6ed59c>
<http://data.lblod.info/id/bestuursorganen/8d43a29c6ed4a8af0cd43d4aba2c7014>
<http://data.lblod.info/id/bestuursorganen/f54979f47464bae1cc001788aedb8b86>
<http://data.lblod.info/id/bestuursorganen/c9a7d9130e1dd8f26ddb8c96fdd94c64>
}
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?bestuursorganenInTijd ?bestuursorganenInTijdP ?bestuursorganenInTijdO .
}
}
;
DELETE {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?identifier ?identifierP ?identifierO .
}
}
WHERE {
VALUES ?identifier {
<http://data.lblod.info/id/identificatoren/99554be7-29d2-403a-a7d5-bda842b4bd86>
<http://data.lblod.info/id/identificatoren/19847e1b-a2bf-48a1-872e-baf8d4efaa12>
<http://data.lblod.info/id/identificatoren/b2123d27-b6bc-4e70-b594-27d35c696713>
}
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?identifier ?identifierP ?identifierO .
}
}
;
DELETE {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?structuredIdentifier ?structuredIdentifierP ?structuredIdentifierO .
}
}
WHERE {
VALUES ?structuredIdentifier {
<http://data.lblod.info/id/gestructureerdeIdentificatoren/920f98a2-1785-4de1-81ed-5859c224dcb8>
<http://data.lblod.info/id/gestructureerdeIdentificatoren/5e1082d8-7751-4bed-a53f-457b347f7f28>
<http://data.lblod.info/id/gestructureerdeIdentificatoren/2e978403-d3ef-40ab-a9f9-3a4ae6a35609>
}
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?structuredIdentifier ?structuredIdentifierP ?structuredIdentifierO .
}
}
;
DELETE {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?site ?siteP ?siteO .
}
}
WHERE {
VALUES ?site {
<http://data.lblod.info/id/vestigingen/daa79855-1de7-4479-8a2e-a8d89db55ee3>
}
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?site ?siteP ?siteO .
}
}
;
DELETE {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?address ?addressP ?addressO .
}
}
WHERE {
VALUES ?address {
<http://data.lblod.info/id/adressen/df102cb4-8abb-4588-a199-1ce22c211812>
}
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?address ?addressP ?addressO .
}
}
;
DELETE {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?contactPoint ?contactPointP ?contactPointO .
}
}
WHERE {
VALUES ?contactPoint {
<http://data.lblod.info/id/contact-punten/042e8816-2e9d-45a1-89f6-dcf805882af7>
<http://data.lblod.info/id/contact-punten/364d8e1a-cb18-4970-aeaf-5f6f307370ad>
}
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?contactPoint ?contactPointP ?contactPointO .
}
}
;
DELETE {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?parentOrganization <http://www.w3.org/ns/org#hasSubOrganization> ?organization .
}
}
WHERE {
BIND(<http://data.lblod.info/id/bestuurseenheden/8d6609b4-1a20-46b8-97ed-150c6d53acd6> AS ?organization)
BIND(<http://data.lblod.info/id/bestuurseenheden/6025a5d1ca2262a784f002edd8ce9ca9073ae3d5ebc6b6b5531f05a29e9250af> AS ?parentOrganization)
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?parentOrganization <http://www.w3.org/ns/org#hasSubOrganization> ?organization .
}
}
;
DELETE {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?parentOrganization <http://mu.semte.ch/vocabularies/ext/isFounderOfOrganization> ?organization .
}
}
WHERE {
BIND(<http://data.lblod.info/id/bestuurseenheden/8d6609b4-1a20-46b8-97ed-150c6d53acd6> AS ?organization)
BIND(<http://data.lblod.info/id/bestuurseenheden/6025a5d1ca2262a784f002edd8ce9ca9073ae3d5ebc6b6b5531f05a29e9250af> AS ?parentOrganization)
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?parentOrganization <http://mu.semte.ch/vocabularies/ext/isFounderOfOrganization> ?organization .
}
}
;
DELETE {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?membership ?p ?o.
}
}
WHERE {
BIND(<http://data.lblod.info/id/bestuurseenheden/8d6609b4-1a20-46b8-97ed-150c6d53acd6> AS ?organization)
VALUES ?membershipP {
<http://www.w3.org/ns/org#organization>
<http://www.w3.org/ns/org#member>
}
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?membership a <http://www.w3.org/ns/org#Membership> ;
?membershipP ?organization ;
?p ?o .
}
}
;
DELETE {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?organization ?organizationP ?organizationO .
}
}
WHERE {
BIND(<http://data.lblod.info/id/bestuurseenheden/8d6609b4-1a20-46b8-97ed-150c6d53acd6> AS ?organization)
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?organization ?organizationP ?organizationO .
}
}

View File

@@ -0,0 +1,18 @@
DELETE {
GRAPH <http://mu.semte.ch/graphs/public> {
?s <http://www.w3.org/2004/02/skos/core#prefLabel> ?label
}
}
INSERT {
GRAPH <http://mu.semte.ch/graphs/public> {
?s <http://www.w3.org/2004/02/skos/core#prefLabel> "VVMW".
}
}
WHERE {
VALUES ?s {
<http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/cc4e2d67-603b-4784-9b61-e50bac1ec089>
}
GRAPH <http://mu.semte.ch/graphs/public> {
?s <http://www.w3.org/2004/02/skos/core#prefLabel> ?label.
}
}

View File

@@ -0,0 +1,18 @@
DELETE {
GRAPH <http://mu.semte.ch/graphs/public> {
?s <http://www.w3.org/2004/02/skos/core#prefLabel> ?label
}
}
INSERT {
GRAPH <http://mu.semte.ch/graphs/public> {
?s <http://www.w3.org/2004/02/skos/core#prefLabel> "OCMW vereniging".
}
}
WHERE {
VALUES ?s {
<http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/cc4e2d67-603b-4784-9b61-e50bac1ec089>
}
GRAPH <http://mu.semte.ch/graphs/public> {
?s <http://www.w3.org/2004/02/skos/core#prefLabel> ?label.
}
}

View File

@@ -0,0 +1,3 @@
# Motivation
This folder is designed to contain migration files specific to a specific deployed instance of the app. These files will be ignored by git. The typical use case for this folder includes migrations containing sensitive data or those related to a re-sync of consumers. Migrations that should be applied to all instances of the app should be stored outside of this folder, but within the 'migrations-triggering-indexing' folder.

View File

@@ -0,0 +1,31 @@
@prefix org: <http://www.w3.org/ns/org#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix schema: <http://schema.org/> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix mu: <http://mu.semte.ch/vocabularies/core/> .
<https://data.vlaanderen.be/id/conceptscheme/lidmaatschap-rollen> a skos:ConceptScheme;
mu:uuid "4755a6afc9044ff289d872092e202472";
skos:prefLabel "lidmaatschap rollen".
<http://data.lblod.info/id/rollen/93c48754610c45e6bd9a894d2720a53d> a org:Role;
mu:uuid "93c48754610c45e6bd9a894d2720a53d";
skos:topConceptOf <https://data.vlaanderen.be/id/conceptscheme/lidmaatschap-rollen>;
skos:prefLabel "lid".
<http://data.lblod.info/id/rollen/73d5e1cf250d42fab15926771f07505a> a org:Role;
mu:uuid "73d5e1cf250d42fab15926771f07505a";
skos:prefLabel "stichtend lid";
skos:broader <http://data.lblod.info/id/rollen/93c48754610c45e6bd9a894d2720a53d>.
<http://data.lblod.info/id/rollen/2152eb830b1143bfb97a7dd9596d6c63> a org:Role;
mu:uuid "2152eb830b1143bfb97a7dd9596d6c63";
skos:prefLabel "participant";
skos:broader <http://data.lblod.info/id/rollen/93c48754610c45e6bd9a894d2720a53d>.
<http://data.lblod.info/id/rollen/4ec7d5c39bdc4e84b4174379b9e22ad8> a org:Role;
mu:uuid "4ec7d5c39bdc4e84b4174379b9e22ad8";
skos:prefLabel "gerelateerd";
skos:broader <http://data.lblod.info/id/rollen/93c48754610c45e6bd9a894d2720a53d>.

View File

@@ -0,0 +1,35 @@
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX org: <http://www.w3.org/ns/org#>
PREFIX mu: <http://mu.semte.ch/vocabularies/core/>
PREFIX ext: <http://mu.semte.ch/vocabularies/ext/>
DELETE {
GRAPH ?g {
?foundingOrg ext:isFounderOfOrganization ?foundedOrg .
}
}
INSERT {
GRAPH ?g {
?foundingOrg org:memberOf ?foundedOrg .
?membership a org:Membership ;
mu:uuid ?uuid ;
org:organization ?foundedOrg ;
org:member ?foundingOrg ;
org:role <http://data.lblod.info/id/rollen/73d5e1cf250d42fab15926771f07505a> . # stichtend lid
}
}
WHERE {
VALUES ?g {
<http://mu.semte.ch/graphs/worship-service>
<http://mu.semte.ch/graphs/administrative-unit>
<http://mu.semte.ch/graphs/shared>
}
GRAPH ?g {
?foundingOrg ext:isFounderOfOrganization ?foundedOrg .
}
BIND(SHA1(CONCAT(STR(?foundingOrg), STR(?foundedOrg), "founded by")) as ?uuid)
BIND(IRI(CONCAT("http://data.lblod.info/id/lidmaatschap/", ?uuid)) AS ?membership)
}

View File

@@ -0,0 +1,32 @@
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX org: <http://www.w3.org/ns/org#>
PREFIX mu: <http://mu.semte.ch/vocabularies/core/>
DELETE {
GRAPH ?g {
?memberOrganization org:memberOf ?organization .
}
}
INSERT {
GRAPH ?g {
?membership a org:Membership ;
mu:uuid ?uuid ;
org:organization ?organization ;
org:member ?memberOrganization ;
org:role <http://data.lblod.info/id/rollen/2152eb830b1143bfb97a7dd9596d6c63> . # participant
}
}
WHERE {
VALUES ?g {
<http://mu.semte.ch/graphs/worship-service>
<http://mu.semte.ch/graphs/administrative-unit>
<http://mu.semte.ch/graphs/shared>
}
GRAPH ?g {
?memberOrganization org:memberOf ?organization .
}
BIND(SHA1(CONCAT(STR(?memberOrganization), STR(?organization), "member of")) as ?uuid)
BIND(IRI(CONCAT("http://data.lblod.info/id/lidmaatschap/", ?uuid)) AS ?membership)
}

View File

@@ -0,0 +1,26 @@
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX org: <http://www.w3.org/ns/org#>
PREFIX mu: <http://mu.semte.ch/vocabularies/core/>
INSERT {
GRAPH ?g {
?membership a org:Membership ;
mu:uuid ?uuid ;
org:organization ?organization ;
org:member ?subOrganization ;
org:role <http://data.lblod.info/id/rollen/4ec7d5c39bdc4e84b4174379b9e22ad8> . # gerelateerd
}
} WHERE {
VALUES ?g {
<http://mu.semte.ch/graphs/worship-service>
<http://mu.semte.ch/graphs/administrative-unit>
<http://mu.semte.ch/graphs/shared>
}
GRAPH ?g {
?organization org:hasSubOrganization ?subOrganization.
}
BIND(SHA1(CONCAT(STR(?organization), STR(?subOrganization), "sub organization")) as ?uuid)
BIND(IRI(CONCAT("http://data.lblod.info/id/lidmaatschap/", ?uuid)) AS ?membership)
}

View File

@@ -0,0 +1,27 @@
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX org: <http://www.w3.org/ns/org#>
PREFIX mu: <http://mu.semte.ch/vocabularies/core/>
PREFIX ext: <http://mu.semte.ch/vocabularies/ext/>
INSERT {
GRAPH ?g {
?membership a org:Membership ;
mu:uuid ?uuid ;
org:organization ?linkedOrg ;
org:member ?org ;
org:role <http://data.lblod.info/id/rollen/4ec7d5c39bdc4e84b4174379b9e22ad8> . # gerelateerd
}
} WHERE {
VALUES ?g {
<http://mu.semte.ch/graphs/worship-service>
<http://mu.semte.ch/graphs/administrative-unit>
<http://mu.semte.ch/graphs/shared>
}
GRAPH ?g {
?org org:linkedTo ?linkedOrg .
}
BIND(SHA1(CONCAT(STR(?org), STR(?linkedOrg), "associated with")) as ?uuid)
BIND(IRI(CONCAT("http://data.lblod.info/id/lidmaatschap/", ?uuid)) AS ?membership)
}

View File

@@ -0,0 +1,13 @@
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
DELETE DATA {
GRAPH <http://mu.semte.ch/graphs/public> {
<http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/36a82ba0-7ff1-4697-a9dd-2e94df73b721>
skos:inScheme <https://data.vlaanderen.be/id/conceptscheme/BestuurseenheidClassificatieCode> ;
skos:topConceptOf <https://data.vlaanderen.be/id/conceptscheme/BestuurseenheidClassificatieCode> .
<http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/80310756-ce0a-4a1b-9b8e-7c01b6cc7a2d>
skos:inScheme <https://data.vlaanderen.be/id/conceptscheme/BestuurseenheidClassificatieCode> ;
skos:topConceptOf <https://data.vlaanderen.be/id/conceptscheme/BestuurseenheidClassificatieCode> .
}
}

View File

@@ -0,0 +1,39 @@
@prefix cleanup: <http://mu.semte.ch/vocabularies/ext/cleanup/> .
@prefix mu: <http://mu.semte.ch/vocabularies/core/> .
@prefix dcterms: <http://purl.org/dc/terms/> .
# Insert triples of the form:
# <Representative Body> <http://www.w3.org/ns/org#linkedTo> <Worship Service>
# <Representative Body> <http://www.w3.org/ns/org#linkedTo> <Central Worship Service>
# matching memberships for which no such triple exists.
# Worship Service: <http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/66ec74fd-8cfc-4e16-99c6-350b35012e86>
# Central Worship Service: <http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/f9cac08a-13c1-49da-9bcb-f650b0604054>
<http://data.lblod.info/id/cleanup-job/f0f7a304-34e9-4986-bf27-8434bb6f8111> a cleanup:Job ;
mu:uuid "f0f7a304-34e9-4986-bf27-8434bb6f8111" ;
dcterms:title "Insert missing `org:linkedTo` triples for Representative Bodies and [Central] Worship Services." ;
cleanup:randomQuery """
PREFIX org: <http://www.w3.org/ns/org#>
INSERT {
GRAPH <http://mu.semte.ch/graphs/worship-service> {
?member org:linkedTo ?organization .
}
} WHERE {
GRAPH <http://mu.semte.ch/graphs/worship-service> {
?membership a org:Membership ;
org:organization ?organization ;
org:member ?member ;
org:role <http://data.lblod.info/id/rollen/4ec7d5c39bdc4e84b4174379b9e22ad8> .
?member org:classification <http://data.vlaanderen.be/id/concept/RepresentatiefOrgaanClassificatieCode/89a00b5a-024f-4630-a722-65a5e68967e5> .
?organization org:classification ?orgClass .
FILTER ( ?orgClass IN (
<http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/66ec74fd-8cfc-4e16-99c6-350b35012e86> ,
<http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/f9cac08a-13c1-49da-9bcb-f650b0604054>
))
FILTER NOT EXISTS { ?member org:linkedTo ?organization . }
}
}
""" .

View File

@@ -0,0 +1,35 @@
@prefix cleanup: <http://mu.semte.ch/vocabularies/ext/cleanup/> .
@prefix mu: <http://mu.semte.ch/vocabularies/core/> .
@prefix dcterms: <http://purl.org/dc/terms/> .
# Insert triples of the form:
# <Central Worship Service> <http://www.w3.org/ns/org#hasSubOrganization> <Worship Service>
# matching memberships for which no such triple exists.
# Central Worship Service: <http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/f9cac08a-13c1-49da-9bcb-f650b0604054>
# Worship Service: <http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/66ec74fd-8cfc-4e16-99c6-350b35012e86>
<http://data.lblod.info/id/cleanup-job/1352f2c5-0207-435b-9737-26d29769cde6> a cleanup:Job ;
mu:uuid "1352f2c5-0207-435b-9737-26d29769cde6" ;
dcterms:title "Insert missing `org:hasSubOrganization` triples for Central Worship Services and Worship Services." ;
cleanup:randomQuery """
PREFIX org: <http://www.w3.org/ns/org#>
INSERT {
GRAPH <http://mu.semte.ch/graphs/worship-service> {
?organization org:hasSubOrganization ?member .
}
} WHERE {
GRAPH <http://mu.semte.ch/graphs/worship-service> {
?membership a org:Membership ;
org:organization ?organization ;
org:member ?member ;
org:role <http://data.lblod.info/id/rollen/4ec7d5c39bdc4e84b4174379b9e22ad8> .
?organization org:classification <http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/f9cac08a-13c1-49da-9bcb-f650b0604054> .
?member org:classification <http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/66ec74fd-8cfc-4e16-99c6-350b35012e86> .
FILTER NOT EXISTS { ?organization org:hasSubOrganization ?member . }
}
}
""" .

View File

@@ -0,0 +1,52 @@
@prefix cleanup: <http://mu.semte.ch/vocabularies/ext/cleanup/> .
@prefix mu: <http://mu.semte.ch/vocabularies/core/> .
@prefix dcterms: <http://purl.org/dc/terms/> .
# Insert triples of the form
# <Province> <http://www.w3.org/ns/org#hasSubOrganization> <subOrg>
# matching memberships for which no such triple exists.
# Province: <http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/5ab0e9b8a3b2ca7c5e000000>
#
# Municipality: <http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/5ab0e9b8a3b2ca7c5e000001>
# OCMW: <http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/5ab0e9b8a3b2ca7c5e000002>
# AGB: <http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/36a82ba0-7ff1-4697-a9dd-2e94df73b721>
# APB: <http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/80310756-ce0a-4a1b-9b8e-7c01b6cc7a2d>
# PEVA municipality: <http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/2ad46df5-5c79-4d67-84d5-604c1377231e>
# PEVA province: <http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/088784b6-e188-48bf-b94f-94665f9e1f53>
<http://data.lblod.info/id/cleanup-job/434b8b52-b695-4358-a927-ddaceb22e7e3> a cleanup:Job ;
mu:uuid "434b8b52-b695-4358-a927-ddaceb22e7e3" ;
dcterms:title "Insert missing `org:hasSubOrganization` triples for Provinces." ;
cleanup:randomQuery """
PREFIX org: <http://www.w3.org/ns/org#>
INSERT {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?organization org:hasSubOrganization ?member .
}
} WHERE {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?membership a org:Membership ;
org:organization ?organization ;
org:member ?member ;
org:role <http://data.lblod.info/id/rollen/4ec7d5c39bdc4e84b4174379b9e22ad8> .
FILTER NOT EXISTS { ?organization org:hasSubOrganization ?member . }
}
?organization org:classification <http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/5ab0e9b8a3b2ca7c5e000000> .
?member org:classification ?memberClass .
FILTER ( ?memberClass
IN (
<http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/5ab0e9b8a3b2ca7c5e000001> ,
<http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/5ab0e9b8a3b2ca7c5e000002> ,
<http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/36a82ba0-7ff1-4697-a9dd-2e94df73b721> ,
<http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/80310756-ce0a-4a1b-9b8e-7c01b6cc7a2d> ,
<http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/2ad46df5-5c79-4d67-84d5-604c1377231e> ,
<http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/088784b6-e188-48bf-b94f-94665f9e1f53>
)
)
}
""" .

View File

@@ -0,0 +1,57 @@
@prefix cleanup: <http://mu.semte.ch/vocabularies/ext/cleanup/> .
@prefix mu: <http://mu.semte.ch/vocabularies/core/> .
@prefix dcterms: <http://purl.org/dc/terms/> .
# Insert triples of the form
# <Municipality> <http://www.w3.org/ns/org#hasSubOrganization> <subOrg>
# matching memberships for which no such triple exists.
# Municipality: <http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/5ab0e9b8a3b2ca7c5e000001>
#
# AGB: <http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/36a82ba0-7ff1-4697-a9dd-2e94df73b721>
# Projectvereniging: <http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/b156b67f-c5f4-4584-9b30-4c090be02fdc>
# Dientsverlenende vereniging <http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/d01bb1f6-2439-4e33-9c25-1fc295de2e71>
# Opdrachthoudende vereniging: <http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/cd93f147-3ece-4308-acab-5c5ada3ec63d>
# Opdrachthoudende vereniging met private deelname: <http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/4b8450cf-a326-4c66-9e63-b4ec10acc7f6>
# HVZ: <http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/ea446861-2c51-45fa-afd3-4e4a37b71562>
# PZ: <http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/a3922c6d-425b-474f-9a02-ffb71a436bfc>
# PEVA municipality: <http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/2ad46df5-5c79-4d67-84d5-604c1377231e>
<http://data.lblod.info/id/cleanup-job/3b7f8739-aa56-4a6c-af56-eb9d80022379> a cleanup:Job ;
mu:uuid "3b7f8739-aa56-4a6c-af56-eb9d80022379" ;
dcterms:title "Insert missing `org:hasSubOrganization` triples for Municipalities." ;
cleanup:randomQuery """
PREFIX org: <http://www.w3.org/ns/org#>
INSERT {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?organization org:hasSubOrganization ?member .
}
} WHERE {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?membership a org:Membership ;
org:organization ?organization ;
org:member ?member ;
org:role <http://data.lblod.info/id/rollen/4ec7d5c39bdc4e84b4174379b9e22ad8> .
FILTER NOT EXISTS { ?organization org:hasSubOrganization ?member . }
?member org:classification ?memberClass .
FILTER ( ?memberClass
IN (
<http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/36a82ba0-7ff1-4697-a9dd-2e94df73b721> ,
<http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/b156b67f-c5f4-4584-9b30-4c090be02fdc> ,
<http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/d01bb1f6-2439-4e33-9c25-1fc295de2e71> ,
<http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/cd93f147-3ece-4308-acab-5c5ada3ec63d> ,
<http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/4b8450cf-a326-4c66-9e63-b4ec10acc7f6> ,
<http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/ea446861-2c51-45fa-afd3-4e4a37b71562> ,
<http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/a3922c6d-425b-474f-9a02-ffb71a436bfc> ,
<http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/2ad46df5-5c79-4d67-84d5-604c1377231e>
)
)
}
GRAPH <http://mu.semte.ch/graphs/shared> {
?organization org:classification <http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/5ab0e9b8a3b2ca7c5e000001> .
}
}
""" .

View File

@@ -0,0 +1,45 @@
@prefix cleanup: <http://mu.semte.ch/vocabularies/ext/cleanup/> .
@prefix mu: <http://mu.semte.ch/vocabularies/core/> .
@prefix dcterms: <http://purl.org/dc/terms/> .
# Insert triples of the form:
# <Municipality> <http://www.w3.org/ns/org#linkedTo> <subOrg>
# matching memberships for which no such triple exists.
# Municipality: <http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/5ab0e9b8a3b2ca7c5e000001>
#
# OCMW: <http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/5ab0e9b8a3b2ca7c5e000002>
# APB: <http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/80310756-ce0a-4a1b-9b8e-7c01b6cc7a2d>
<http://data.lblod.info/id/cleanup-job/a99bcd5c-9781-425d-8a34-fb11a6e3e262> a cleanup:Job ;
mu:uuid "a99bcd5c-9781-425d-8a34-fb11a6e3e262" ;
dcterms:title "Insert missing `org:linkedTo` triples for Municipalities." ;
cleanup:randomQuery """
PREFIX org: <http://www.w3.org/ns/org#>
INSERT {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?organization org:linkedTo ?member .
}
} WHERE {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?membership a org:Membership ;
org:organization ?organization ;
org:member ?member ;
org:role <http://data.lblod.info/id/rollen/4ec7d5c39bdc4e84b4174379b9e22ad8> .
FILTER NOT EXISTS { ?organization org:linkedTo ?member . }
?member org:classification ?memberClass .
FILTER ( ?memberClass
IN (
<http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/5ab0e9b8a3b2ca7c5e000002> ,
<http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/80310756-ce0a-4a1b-9b8e-7c01b6cc7a2d>
)
)
}
GRAPH <http://mu.semte.ch/graphs/shared> {
?organization org:classification <http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/5ab0e9b8a3b2ca7c5e000001> .
}
}
""" .

View File

@@ -0,0 +1,42 @@
@prefix cleanup: <http://mu.semte.ch/vocabularies/ext/cleanup/> .
@prefix mu: <http://mu.semte.ch/vocabularies/core/> .
@prefix dcterms: <http://purl.org/dc/terms/> .
# Delete triples of the form:
# <Representative Body> <http://www.w3.org/ns/org#linkedTo> <Worship Service>
# <Representative Body> <http://www.w3.org/ns/org#linkedTo> <Central Worship Service>
# for which no matching membership exists.
# Worship Service: <http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/66ec74fd-8cfc-4e16-99c6-350b35012e86>
# Central Worship Service: <http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/f9cac08a-13c1-49da-9bcb-f650b0604054>
<http://data.lblod.info/id/cleanup-job/679eec55-0f69-4d45-84c1-9f73df966983> a cleanup:Job ;
mu:uuid "679eec55-0f69-4d45-84c1-9f73df966983" ;
dcterms:title "Delete leftover `org:linkedTo` triples for Representative Bodies and [Central] Worship Services." ;
cleanup:randomQuery """
PREFIX org: <http://www.w3.org/ns/org#>
DELETE {
GRAPH <http://mu.semte.ch/graphs/worship-service> {
?s org:linkedTo ?o .
}
} WHERE {
GRAPH <http://mu.semte.ch/graphs/worship-service> {
?s org:linkedTo ?o .
FILTER NOT EXISTS {
?membership a org:Membership ;
org:organization ?o ;
org:member ?s ;
org:role <http://data.lblod.info/id/rollen/4ec7d5c39bdc4e84b4174379b9e22ad8> .
}
?s org:classification <http://data.vlaanderen.be/id/concept/RepresentatiefOrgaanClassificatieCode/89a00b5a-024f-4630-a722-65a5e68967e5> .
?o org:classification ?oClass .
FILTER ( ?oClass IN (
<http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/66ec74fd-8cfc-4e16-99c6-350b35012e86> ,
<http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/f9cac08a-13c1-49da-9bcb-f650b0604054>
))
}
}
""" .

View File

@@ -0,0 +1,36 @@
@prefix cleanup: <http://mu.semte.ch/vocabularies/ext/cleanup/> .
@prefix mu: <http://mu.semte.ch/vocabularies/core/> .
@prefix dcterms: <http://purl.org/dc/terms/> .
# Delete triples of the form
# <Central Worship Service> <http://www.w3.org/ns/org#hasSubOrganization> <Worship Service>
# for which no matching membership exists.
# Central Worship Service <http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/f9cac08a-13c1-49da-9bcb-f650b0604054>
# Worship Service <http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/66ec74fd-8cfc-4e16-99c6-350b35012e86>
<http://data.lblod.info/id/cleanup-job/50cee254-37e4-410e-936a-d974047bdd4b> a cleanup:Job ;
mu:uuid "50cee254-37e4-410e-936a-d974047bdd4b" ;
dcterms:title "Delete leftover `org:hasSubOrganization` triples for Central Worship Services and Worship Services." ;
cleanup:randomQuery """
PREFIX org: <http://www.w3.org/ns/org#>
DELETE {
GRAPH <http://mu.semte.ch/graphs/worship-service> {
?cws org:hasSubOrganization ?ws .
}
} WHERE {
GRAPH <http://mu.semte.ch/graphs/worship-service> {
?cws org:hasSubOrganization ?ws .
FILTER NOT EXISTS {
?membership a org:Membership ;
org:organization ?cws ;
org:member ?ws ;
org:role <http://data.lblod.info/id/rollen/4ec7d5c39bdc4e84b4174379b9e22ad8> .
}
?cws org:classification <http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/f9cac08a-13c1-49da-9bcb-f650b0604054> .
?ws org:classification <http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/66ec74fd-8cfc-4e16-99c6-350b35012e86> .
}
}
""" .

View File

@@ -0,0 +1,47 @@
@prefix cleanup: <http://mu.semte.ch/vocabularies/ext/cleanup/> .
@prefix mu: <http://mu.semte.ch/vocabularies/core/> .
@prefix dcterms: <http://purl.org/dc/terms/> .
# Delete triples of the form:
# <Municipality> <http://www.w3.org/ns/org#linkedTo> <subOrg>
# for which no matching membership exists.
# Municipality: <http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/5ab0e9b8a3b2ca7c5e000001>
#
# OCMW: <http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/5ab0e9b8a3b2ca7c5e000002>
# APB: <http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/80310756-ce0a-4a1b-9b8e-7c01b6cc7a2d>
<http://data.lblod.info/id/cleanup-job/14cfd05c-7047-43a1-97e4-42d3dd6b048d> a cleanup:Job ;
mu:uuid "14cfd05c-7047-43a1-97e4-42d3dd6b048d" ;
dcterms:title "Delete leftover `org:linkedTo` triples for Municipalities." ;
cleanup:randomQuery """
PREFIX org: <http://www.w3.org/ns/org#>
DELETE {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?municipality org:linkedTo ?member .
}
} WHERE {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?municipality org:linkedTo ?member .
FILTER NOT EXISTS {
?membership a org:Membership ;
org:organization ?municipality ;
org:member ?member ;
org:role <http://data.lblod.info/id/rollen/4ec7d5c39bdc4e84b4174379b9e22ad8> .
}
?member org:classification ?memberClass .
FILTER ( ?memberClass
IN (
<http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/5ab0e9b8a3b2ca7c5e000002> ,
<http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/80310756-ce0a-4a1b-9b8e-7c01b6cc7a2d>
)
)
}
GRAPH <http://mu.semte.ch/graphs/shared> {
?municipality org:classification <http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/5ab0e9b8a3b2ca7c5e000001> .
}
}
""" .

View File

@@ -0,0 +1,58 @@
@prefix cleanup: <http://mu.semte.ch/vocabularies/ext/cleanup/> .
@prefix mu: <http://mu.semte.ch/vocabularies/core/> .
@prefix dcterms: <http://purl.org/dc/terms/> .
# Delete triples of the form
# <Municipality> <http://www.w3.org/ns/org#hasSubOrganization> <subOrg>
# for which no matching membership exists.
# Municipality: <http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/5ab0e9b8a3b2ca7c5e000001>
#
# AGB: <http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/36a82ba0-7ff1-4697-a9dd-2e94df73b721>
# Projectvereniging: <http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/b156b67f-c5f4-4584-9b30-4c090be02fdc>
# Dientsverlenende vereniging <http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/d01bb1f6-2439-4e33-9c25-1fc295de2e71>
# Opdrachthoudende vereniging: <http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/cd93f147-3ece-4308-acab-5c5ada3ec63d>
# Opdrachthoudende vereniging met private deelname: <http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/4b8450cf-a326-4c66-9e63-b4ec10acc7f6>
# HVZ: <http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/ea446861-2c51-45fa-afd3-4e4a37b71562>
# PZ: <http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/a3922c6d-425b-474f-9a02-ffb71a436bfc>
# PEVA municipality: <http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/2ad46df5-5c79-4d67-84d5-604c1377231e>
<http://data.lblod.info/id/cleanup-job/141a5f1c-39d5-431a-99e2-9085252654a3> a cleanup:Job ;
mu:uuid "141a5f1c-39d5-431a-99e2-9085252654a3" ;
dcterms:title "Delete leftover `org:hasSubOrganization` triples for Municipalities." ;
cleanup:randomQuery """
PREFIX org: <http://www.w3.org/ns/org#>
DELETE {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?municipality org:hasSubOrganization ?member .
}
} WHERE {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?municipality org:hasSubOrganization ?member .
FILTER NOT EXISTS {
?membership a org:Membership ;
org:organization ?municipality ;
org:member ?member ;
org:role <http://data.lblod.info/id/rollen/4ec7d5c39bdc4e84b4174379b9e22ad8> .
}
?member org:classification ?memberClass .
FILTER ( ?memberClass
IN (
<http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/36a82ba0-7ff1-4697-a9dd-2e94df73b721> ,
<http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/b156b67f-c5f4-4584-9b30-4c090be02fdc> ,
<http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/d01bb1f6-2439-4e33-9c25-1fc295de2e71> ,
<http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/cd93f147-3ece-4308-acab-5c5ada3ec63d> ,
<http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/4b8450cf-a326-4c66-9e63-b4ec10acc7f6> ,
<http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/ea446861-2c51-45fa-afd3-4e4a37b71562> ,
<http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/a3922c6d-425b-474f-9a02-ffb71a436bfc> ,
<http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/2ad46df5-5c79-4d67-84d5-604c1377231e>
)
)
}
GRAPH <http://mu.semte.ch/graphs/shared> {
?municipality org:classification <http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/5ab0e9b8a3b2ca7c5e000001> .
}
}
""" .

View File

@@ -0,0 +1,54 @@
@prefix cleanup: <http://mu.semte.ch/vocabularies/ext/cleanup/> .
@prefix mu: <http://mu.semte.ch/vocabularies/core/> .
@prefix dcterms: <http://purl.org/dc/terms/> .
# Delete triples of the form
# <Province> <http://www.w3.org/ns/org#hasSubOrganization> <subOrg>
# for which no matching membership exists.
# Province: <http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/5ab0e9b8a3b2ca7c5e000000>
#
# Municipality: <http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/5ab0e9b8a3b2ca7c5e000001>
# OCMW: <http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/5ab0e9b8a3b2ca7c5e000002>
# AGB: <http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/36a82ba0-7ff1-4697-a9dd-2e94df73b721>
# APB: <http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/80310756-ce0a-4a1b-9b8e-7c01b6cc7a2d>
# PEVA municipality: <http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/2ad46df5-5c79-4d67-84d5-604c1377231e>
# PEVA province: <http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/088784b6-e188-48bf-b94f-94665f9e1f53>
<http://data.lblod.info/id/cleanup-job/7b2f66c8-1433-47f4-b730-62316f288631> a cleanup:Job ;
mu:uuid "7b2f66c8-1433-47f4-b730-62316f288631" ;
dcterms:title "Delete leftover `org:hasSubOrganization` triples for Provinces." ;
cleanup:randomQuery """
PREFIX org: <http://www.w3.org/ns/org#>
DELETE {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?province org:hasSubOrganization ?member .
}
} WHERE {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?province org:hasSubOrganization ?member .
FILTER NOT EXISTS {
?membership a org:Membership ;
org:organization ?province ;
org:member ?member ;
org:role <http://data.lblod.info/id/rollen/4ec7d5c39bdc4e84b4174379b9e22ad8> .
}
}
?member org:classification ?memberClass .
FILTER ( ?memberClass
IN (
<http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/5ab0e9b8a3b2ca7c5e000001> ,
<http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/5ab0e9b8a3b2ca7c5e000002> ,
<http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/36a82ba0-7ff1-4697-a9dd-2e94df73b721> ,
<http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/80310756-ce0a-4a1b-9b8e-7c01b6cc7a2d> ,
<http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/2ad46df5-5c79-4d67-84d5-604c1377231e> ,
<http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/088784b6-e188-48bf-b94f-94665f9e1f53>
)
)
GRAPH <http://mu.semte.ch/graphs/shared> {
?province org:classification <http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/5ab0e9b8a3b2ca7c5e000000> .
}
}
""" .

View File

@@ -0,0 +1,37 @@
PREFIX org: <http://www.w3.org/ns/org#>
PREFIX mu: <http://mu.semte.ch/vocabularies/core/>
# Add the "has a relation with" membership between provinces and municipalities
# for the new municipalities that were added for the 2025 mergers.
INSERT {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?membership a org:Membership ;
mu:uuid ?uuid ;
org:organization ?province ;
org:member ?municipality ;
org:role <http://data.lblod.info/id/rollen/4ec7d5c39bdc4e84b4174379b9e22ad8> . # has a relation with
}
} WHERE {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?province org:hasSubOrganization ?municipality .
FILTER (?province IN
(
<http://data.lblod.info/id/bestuurseenheden/298b13541e1e85de4b71535197aa1f3bbc4bdb67f0fe0f58ab4a7dc207af61fa> , # Oost-Vlaanderen
<http://data.lblod.info/id/bestuurseenheden/8b7e7bf05ace5bb1a68f5bc0d870e20c20f147b00bd9a3dcce3a01733d4da744> , # Vlaams-Brabant
<http://data.lblod.info/id/bestuurseenheden/14278813524c762255aeba149e7d7134ddecfbb43e7d56910731bd4e13e34f39> , # Limburg
<http://data.lblod.info/id/bestuurseenheden/bd74ee38a4b1e296821a11729c1f704cf439576c7ab2c910c95b067cf183d923> , # Antwerpen
<http://data.lblod.info/id/bestuurseenheden/8152e68420f560b8493d6c555a5bd4186903dc341028bb9855af6c44a9464fea> # West-Vlaanderen
)
)
}
BIND (SHA256(CONCAT(STR(?province), " has a relation with ", STR(?municipality))) AS ?uuid)
BIND (IRI(CONCAT("http://data.lblod.info/id/lidmaatschap/", ?uuid)) AS ?membership)
VALUES ?municipality {
<http://data.lblod.info/id/bestuurseenheden/19483103-318e-435a-aa37-45e485406ee9> # Beveren-Kruibeke-Zwijndrecht
<http://data.lblod.info/id/bestuurseenheden/b8bb293d-aa22-4b43-bda4-0b6af76e9493> # Merelbeke-Melle
<http://data.lblod.info/id/bestuurseenheden/1ca65d65-54ff-4b44-b750-bd70c91191af> # Nazareth-De Pinte
<http://data.lblod.info/id/bestuurseenheden/add1e4eb-9ec7-4ea6-af82-335aa76b7d48> # Pajottegem
}
}

View File

@@ -0,0 +1,22 @@
PREFIX org: <http://www.w3.org/ns/org#>
PREFIX mu: <http://mu.semte.ch/vocabularies/core/>
INSERT {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?membership a org:Membership ;
mu:uuid ?uuid ;
org:organization ?antwerp ;
org:member ?borsbeek ;
org:role <http://data.lblod.info/id/rollen/4ec7d5c39bdc4e84b4174379b9e22ad8> . # has a relation with
}
} WHERE {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?antwerp org:hasSubOrganization ?borsbeek .
FILTER (?antwerp = <http://data.lblod.info/id/bestuurseenheden/670db1d66c0de3b931962e1044033ccfa9d6e3023aa9828a5f252c3bc69bd32c>)
FILTER (?borsbeek = <http://data.lblod.info/id/bestuurseenheden/4b44e6f1-113b-4692-b149-44a889b215f2>)
}
BIND (SHA256(CONCAT(STR(?antwerp), " has a relation with ", STR(?borsbeek))) AS ?uuid)
BIND (IRI(CONCAT("http://data.lblod.info/id/lidmaatschap/", ?uuid)) AS ?membership)
}

View File

@@ -0,0 +1,105 @@
PREFIX org: <http://www.w3.org/ns/org#>
PREFIX mu: <http://mu.semte.ch/vocabularies/core/>
# Add the "has a relation with" membership between provinces and the new OCMWs
# added for the 2025 mergers.
INSERT {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?membership a org:Membership ;
mu:uuid ?uuid ;
org:organization ?province ;
org:member ?ocmw ;
org:role <http://data.lblod.info/id/rollen/4ec7d5c39bdc4e84b4174379b9e22ad8> . # has a relation with
}
} WHERE {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?province org:hasSubOrganization ?ocmw .
FILTER (?province IN
(
<http://data.lblod.info/id/bestuurseenheden/298b13541e1e85de4b71535197aa1f3bbc4bdb67f0fe0f58ab4a7dc207af61fa> , # Oost-Vlaanderen
<http://data.lblod.info/id/bestuurseenheden/8b7e7bf05ace5bb1a68f5bc0d870e20c20f147b00bd9a3dcce3a01733d4da744> , # Vlaams-Brabant
<http://data.lblod.info/id/bestuurseenheden/14278813524c762255aeba149e7d7134ddecfbb43e7d56910731bd4e13e34f39> , # Limburg
<http://data.lblod.info/id/bestuurseenheden/bd74ee38a4b1e296821a11729c1f704cf439576c7ab2c910c95b067cf183d923> , # Antwerpen
<http://data.lblod.info/id/bestuurseenheden/8152e68420f560b8493d6c555a5bd4186903dc341028bb9855af6c44a9464fea> # West-Vlaanderen
)
)
}
BIND (SHA256(CONCAT(STR(?province), " has a relation with ", STR(?ocmw))) AS ?uuid)
BIND (IRI(CONCAT("http://data.lblod.info/id/lidmaatschap/", ?uuid)) AS ?membership)
VALUES ?ocmw {
<http://data.lblod.info/id/bestuurseenheden/fd41f573-7d9a-4d9f-b7d0-d5b6114d1622> # Beveren-Kruibeke-Zwijndrecht
<http://data.lblod.info/id/bestuurseenheden/5d94b2fd-60ee-4e56-a1f0-a586d596adf6> # Merelbeke-Melle
<http://data.lblod.info/id/bestuurseenheden/7d53f659-3a3b-44b1-9e77-3ea067678c0e> # Nazareth-De Pinte
<http://data.lblod.info/id/bestuurseenheden/650378e7-1bee-4737-91ff-5b20ac4623cf> # Pajottegem
}
}
;
# Relate OCMWs with their municipalities
## Beveren-Kruibeke-Zwijndrecht
### Municipality: <http://data.lblod.info/id/bestuurseenheden/19483103-318e-435a-aa37-45e485406ee9>
### OCMW: <http://data.lblod.info/id/bestuurseenheden/fd41f573-7d9a-4d9f-b7d0-d5b6114d1622>
INSERT {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
<http://data.lblod.info/id/bestuurseenheden/19483103-318e-435a-aa37-45e485406ee9> org:linkedTo <http://data.lblod.info/id/bestuurseenheden/fd41f573-7d9a-4d9f-b7d0-d5b6114d1622> .
?membership a org:Membership ;
mu:uuid ?uuid ;
org:organization <http://data.lblod.info/id/bestuurseenheden/19483103-318e-435a-aa37-45e485406ee9> ;
org:member <http://data.lblod.info/id/bestuurseenheden/fd41f573-7d9a-4d9f-b7d0-d5b6114d1622> ;
org:role <http://data.lblod.info/id/rollen/4ec7d5c39bdc4e84b4174379b9e22ad8> . # has a relation with
}
} WHERE {
BIND (SHA256(CONCAT(STR(<http://data.lblod.info/id/bestuurseenheden/19483103-318e-435a-aa37-45e485406ee9>), "has a relation with", STR(<http://data.lblod.info/id/bestuurseenheden/fd41f573-7d9a-4d9f-b7d0-d5b6114d1622>))) AS ?uuid)
BIND (IRI(CONCAT("http://data.lblod.info/id/lidmaatschap/", ?uuid)) AS ?membership)
}
;
## Merelbeke-Melle
### Municipality: <http://data.lblod.info/id/bestuurseenheden/b8bb293d-aa22-4b43-bda4-0b6af76e9493>
### OCMW: <http://data.lblod.info/id/bestuurseenheden/5d94b2fd-60ee-4e56-a1f0-a586d596adf6>
INSERT {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
<http://data.lblod.info/id/bestuurseenheden/b8bb293d-aa22-4b43-bda4-0b6af76e9493> org:linkedTo <http://data.lblod.info/id/bestuurseenheden/5d94b2fd-60ee-4e56-a1f0-a586d596adf6> .
?membership a org:Membership ;
mu:uuid ?uuid ;
org:organization <http://data.lblod.info/id/bestuurseenheden/b8bb293d-aa22-4b43-bda4-0b6af76e9493> ;
org:member <http://data.lblod.info/id/bestuurseenheden/5d94b2fd-60ee-4e56-a1f0-a586d596adf6> ;
org:role <http://data.lblod.info/id/rollen/4ec7d5c39bdc4e84b4174379b9e22ad8> . # has a relation with
}
} WHERE {
BIND (SHA256(CONCAT(STR(<http://data.lblod.info/id/bestuurseenheden/b8bb293d-aa22-4b43-bda4-0b6af76e9493>), "has a relation with", STR(<http://data.lblod.info/id/bestuurseenheden/5d94b2fd-60ee-4e56-a1f0-a586d596adf6>))) AS ?uuid)
BIND (IRI(CONCAT("http://data.lblod.info/id/lidmaatschap/", ?uuid)) AS ?membership)
}
;
## Nazareth-De Pinte
### Municipality: <http://data.lblod.info/id/bestuurseenheden/1ca65d65-54ff-4b44-b750-bd70c91191af>
### OCMW: <http://data.lblod.info/id/bestuurseenheden/7d53f659-3a3b-44b1-9e77-3ea067678c0e>
INSERT {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
<http://data.lblod.info/id/bestuurseenheden/1ca65d65-54ff-4b44-b750-bd70c91191af> org:linkedTo <http://data.lblod.info/id/bestuurseenheden/7d53f659-3a3b-44b1-9e77-3ea067678c0e> .
?membership a org:Membership ;
mu:uuid ?uuid ;
org:organization <http://data.lblod.info/id/bestuurseenheden/1ca65d65-54ff-4b44-b750-bd70c91191af> ;
org:member <http://data.lblod.info/id/bestuurseenheden/7d53f659-3a3b-44b1-9e77-3ea067678c0e> ;
org:role <http://data.lblod.info/id/rollen/4ec7d5c39bdc4e84b4174379b9e22ad8> . # has a relation with
}
} WHERE {
BIND (SHA256(CONCAT(STR(<http://data.lblod.info/id/bestuurseenheden/1ca65d65-54ff-4b44-b750-bd70c91191af>), "has a relation with", STR(<http://data.lblod.info/id/bestuurseenheden/7d53f659-3a3b-44b1-9e77-3ea067678c0e>))) AS ?uuid)
BIND (IRI(CONCAT("http://data.lblod.info/id/lidmaatschap/", ?uuid)) AS ?membership)
}
;
## Pajottegem
### Municipality: <http://data.lblod.info/id/bestuurseenheden/add1e4eb-9ec7-4ea6-af82-335aa76b7d48>
### OCMW: <http://data.lblod.info/id/bestuurseenheden/650378e7-1bee-4737-91ff-5b20ac4623cf>
INSERT {
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
<http://data.lblod.info/id/bestuurseenheden/add1e4eb-9ec7-4ea6-af82-335aa76b7d48> org:linkedTo <http://data.lblod.info/id/bestuurseenheden/650378e7-1bee-4737-91ff-5b20ac4623cf> .
?membership a org:Membership ;
mu:uuid ?uuid ;
org:organization <http://data.lblod.info/id/bestuurseenheden/add1e4eb-9ec7-4ea6-af82-335aa76b7d48> ;
org:member <http://data.lblod.info/id/bestuurseenheden/650378e7-1bee-4737-91ff-5b20ac4623cf> ;
org:role <http://data.lblod.info/id/rollen/4ec7d5c39bdc4e84b4174379b9e22ad8> . # has a relation with
}
} WHERE {
BIND (SHA256(CONCAT(STR(<http://data.lblod.info/id/bestuurseenheden/add1e4eb-9ec7-4ea6-af82-335aa76b7d48>), "has a relation with", STR(<http://data.lblod.info/id/bestuurseenheden/650378e7-1bee-4737-91ff-5b20ac4623cf>))) AS ?uuid)
BIND (IRI(CONCAT("http://data.lblod.info/id/lidmaatschap/", ?uuid)) AS ?membership)
}

View File

@@ -0,0 +1,4 @@
# Note: the create statement is added because otherwise virtuoso throws an error
# on the drop because the graph was not explicitly made
CREATE SILENT GRAPH <http://mu.semte.ch/graphs/landing-zone/clb-contact-data>
DROP GRAPH <http://mu.semte.ch/graphs/landing-zone/clb-contact-data>

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