Compare commits
96 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
74327cc371 | ||
|
|
bfb28bb698 | ||
|
|
cc8125cb14 | ||
|
|
329a63a0b9 | ||
|
|
4891b6829d | ||
|
|
eef379f7ed | ||
|
|
ea2d25d177 | ||
|
|
8c49134011 | ||
|
|
d203077364 | ||
|
|
eee9f18561 | ||
|
|
a8681a02f3 | ||
|
|
edbba1eeaa | ||
|
|
0c9355c94f | ||
|
|
b6a42c66cf | ||
|
|
96b36d2cf6 | ||
|
|
19a0804b56 | ||
|
|
a4684811df | ||
|
|
dc18662517 | ||
|
|
c6ba52a6bc | ||
|
|
ee1c92b5fe | ||
|
|
32b6520bfa | ||
|
|
0e9483b4f8 | ||
|
|
b65e0cbeaa | ||
|
|
fbf8a4e2dc | ||
|
|
1bff031596 | ||
|
|
b2deb421bc | ||
|
|
e078ae48a7 | ||
|
|
e2479f626a | ||
|
|
df8512d8f9 | ||
|
|
ed0863c0bf | ||
|
|
4131395159 | ||
|
|
325ebe991c | ||
|
|
179ba7b315 | ||
|
|
714fda3dc8 | ||
|
|
b31d6c65e6 | ||
|
|
0be27e1ef2 | ||
|
|
c77f1e9139 | ||
|
|
8a76be40e8 | ||
|
|
3dffca6623 | ||
|
|
f6fe8ac87d | ||
|
|
7defbf9009 | ||
|
|
5f1bfe96c7 | ||
|
|
d2ec188373 | ||
|
|
9515aec9ad | ||
|
|
d4cd0d5cbd | ||
|
|
6036b030c1 | ||
|
|
d3420cf935 | ||
|
|
f2a65697db | ||
|
|
f279c1dba5 | ||
|
|
d0d3440338 | ||
|
|
6c0619d45c | ||
|
|
8b8b192bbd | ||
|
|
bde4180168 | ||
|
|
f04ebf5723 | ||
|
|
addd4304f6 | ||
|
|
ba5bdac6cb | ||
|
|
366aad9fe5 | ||
|
|
01c5c7e7b3 | ||
|
|
73a494cd73 | ||
|
|
73e6c2c60c | ||
|
|
6cc9acd4cd | ||
|
|
273c3d1f10 | ||
|
|
464da76876 | ||
|
|
eb7d8949cd | ||
|
|
34244b699b | ||
|
|
0f4173fd1a | ||
|
|
5dfa7e4676 | ||
|
|
927e370aa6 | ||
|
|
2f06135cf9 | ||
|
|
c6b74f6a1c | ||
|
|
706b7fa525 | ||
|
|
8ca23d5515 | ||
|
|
e712fa8fc8 | ||
|
|
225e31d845 | ||
|
|
a26abc8523 | ||
|
|
9591cd3603 | ||
|
|
85c307216c | ||
|
|
e9327a4357 | ||
|
|
539376c47c | ||
|
|
57ef47cef9 | ||
|
|
12265b7eee | ||
|
|
a019ee1025 | ||
|
|
50d9db571b | ||
|
|
f41aaae912 | ||
|
|
c0d23e6178 | ||
|
|
67a8e9c6df | ||
|
|
b6ac54df46 | ||
|
|
0497b23fac | ||
|
|
0d87feb119 | ||
|
|
725f608a3b | ||
|
|
a3d1ec1b81 | ||
|
|
285bb6f6cb | ||
|
|
9dde9bf2b9 | ||
|
|
262fe89248 | ||
|
|
d5c8f699b1 | ||
|
|
d017d1b0e3 |
130
CHANGELOG.md
130
CHANGELOG.md
@@ -1,6 +1,134 @@
|
||||
# Changelog
|
||||
## Unreleased
|
||||
|
||||
## v1.34.0 (2025-07-11)
|
||||
### Frontend
|
||||
- Bump to version [v1.33.0](https://github.com/lblod/frontend-organization-portal/releases/tag/v1.33.0)
|
||||
### Backend
|
||||
- Add Brussels Hoofdstedelijk Gewest as province and location, update province of addresses in Brussel's area, update resource config to add `skos:note` on organizations [OP-3624]
|
||||
- Add Brussel as a municipality [OP-3628]
|
||||
- Revert Brussel as province and municipality and update back province of addresses in Brussel's area [OP-3637]
|
||||
- Bump delta-notifier service to most recent version [OP-3190]
|
||||
- Add URI to resource's organization responses
|
||||
- Fix query for organizations report [OP-3636]
|
||||
- Bump report-generation-service to most recent version
|
||||
- Write migration to harmonize date formats of change events [OP-3559]
|
||||
### Deploy notes
|
||||
```
|
||||
drc pull deltanotifier; drc up -d deltanotifier
|
||||
drc restart migrations-triggering-indexing resource
|
||||
drc pull frontend; drc up -d frontend
|
||||
drc pull report-generation; drc up -d report-generation
|
||||
drc restart migrations; drc logs -ft --tail=200 migrations
|
||||
```
|
||||
|
||||
## v1.33.3 (2025-07-04)
|
||||
### Backend
|
||||
- datafix: re-add Havenbedrijf Antwerpen as an AGB [OP-3639]
|
||||
### Deploy notes
|
||||
```
|
||||
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.33.2 (2025-06-20)
|
||||
### Backend
|
||||
- datafix: correct name for locations whose municipalities kept their URI in the 2025 mergers [OP-3627]
|
||||
### Deploy notes
|
||||
```
|
||||
drc restart migrations-triggering-indexing && drc logs -ft --tail=200
|
||||
```
|
||||
|
||||
## v1.33.1 (2025-06-16)
|
||||
### Backend
|
||||
- Added Vlaams Parlement as bestuurseenheid. [DL-6686]
|
||||
### Deploy Notes
|
||||
```
|
||||
drc restart migrations;
|
||||
drc exec delta-producer-background-jobs-initiator curl -X POST http://localhost/public/healing-jobs
|
||||
```
|
||||
|
||||
## v1.33.0 (2025-06-05)
|
||||
### Frontend
|
||||
- Bump to version [v1.32.0](https://github.com/lblod/frontend-organization-portal/releases/tag/v1.32.0)
|
||||
### Backend
|
||||
- datafix: move memberships involving provinces and municipalities to shared graph [OP-3619]
|
||||
### Deploy notes
|
||||
```
|
||||
drc restart migrations; drc logs -ft --tail=200 migrations
|
||||
drc exec db-cleanup curl -X POST "http://localhost/cleanup"
|
||||
drc pull frontend; drc up -d frontend
|
||||
```
|
||||
|
||||
## v1.32.1 (2025-06-02)
|
||||
### Backend
|
||||
- Added Kabinet Crevits as bestuurseenheid. [DL-6655]
|
||||
### Deploy Notes
|
||||
```
|
||||
drc restart migrations;
|
||||
drc exec delta-producer-background-jobs-initiator curl -X POST http://localhost/public/healing-jobs
|
||||
```
|
||||
|
||||
## v1.32.0 (2025-05-23)
|
||||
### Frontend
|
||||
- Bump to version [v1.31.0](https://github.com/lblod/frontend-organization-portal/releases/tag/v1.31.0)
|
||||
### Backend
|
||||
- Fix KBO statuses not being displayed [OP-3584]
|
||||
- datafix: update NIS2019 end dates and link additional NIS2025 to werkingsgebieden [part of OP-3566]
|
||||
- datafix: correct date of change event of ckb olen [OP-3594]
|
||||
- datafix: move memberships from shared to administrative unit graph
|
||||
- datafix: cleanup werkingsgbieden data [OP-3566]
|
||||
+ Move werkingsgebieden to public graph
|
||||
+ Link district werkingsgebieden to Antwerp municipality werkingsgebied
|
||||
+ Add missing werkingsgebied for Borsbeek district
|
||||
- Write migration to extract from existing primary sites the province URI [OP-3597]
|
||||
- datafix: update status kerkfabriek weelde [OP-3598]
|
||||
- datafix: delete change event and update status protestantse kerk oostende [OP-3604]
|
||||
- datafix: update change event date islamic assocation [OP-3602]
|
||||
### Deploy Notes
|
||||
```
|
||||
drc pull frontend; drc up -d frontend
|
||||
drc restart migrations; drc logs -ft --tail=200 migrations
|
||||
drc restart migrations-triggering-indexing && drc logs -ft --tail=200 migrations-triggering-indexing
|
||||
drc up -d kbo-data-sync
|
||||
drc exec kbo-data-sync curl -X POST http://localhost/sync-all-kbo-data
|
||||
|
||||
drc restart delta-producer-publication-graph-maintainer
|
||||
drc exec delta-producer-background-jobs-initiator curl -X POST http://localhost/public/healing-jobs # or wait until nightly healing kicks in
|
||||
drc exec delta-producer-background-jobs-initiator curl -X POST http://localhost/organizations/healing-jobs # or wait until nightly healing kicks in
|
||||
drc exec db-cleanup curl -X POST "http://localhost/cleanup"
|
||||
```
|
||||
|
||||
## v1.31.3 (2025-05-08)
|
||||
### Backend
|
||||
- Migrate active organizations linked to inactive CKB to the active one. [DL-6604]
|
||||
### Deploy notes
|
||||
```
|
||||
drc restart migrations-triggering-indexing && drc logs -ft --tail=200 migrations-triggering-indexing
|
||||
```
|
||||
|
||||
## v1.31.2 (2025-04-02)
|
||||
### Backend
|
||||
- Extend the public producer to include: [CLBV-980]
|
||||
- NIS codes
|
||||
- Sites and statuses of representative organs
|
||||
- Secondary sites with their contacts and addresses
|
||||
- Site descriptions
|
||||
|
||||
### Deploy notes
|
||||
```
|
||||
drc restart delta-producer-publication-graph-maintainer
|
||||
```
|
||||
|
||||
## v1.31.1 (2025-04-01)
|
||||
### Backend
|
||||
- Removal of change events of 8 ckb's + update of their status [OP-3562]
|
||||
### Deploy Notes
|
||||
```
|
||||
drc restart migrations-triggering-indexing; drc logs -ft --tail=200 migrations-triggering-indexing
|
||||
drc restart migrations; drc logs -ft --tail=200 migrations
|
||||
```
|
||||
|
||||
## 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)
|
||||
@@ -41,7 +169,7 @@ Before we can generate a user we need to add an application salt to the server.
|
||||
|
||||
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.
|
||||
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`
|
||||
|
||||
@@ -336,6 +336,7 @@
|
||||
"http://www.w3.org/ns/locn#postCode",
|
||||
"https://data.vlaanderen.be/ns/adres#gemeentenaam",
|
||||
"http://www.w3.org/ns/locn#adminUnitL2",
|
||||
"https://data.vlaanderen.be/ns/adres#adresIsGelegenIn",
|
||||
"https://data.vlaanderen.be/ns/adres#land",
|
||||
"http://www.w3.org/ns/locn#fullAddress",
|
||||
"https://data.vlaanderen.be/ns/adres#verwijstNaar",
|
||||
@@ -389,7 +390,7 @@
|
||||
{
|
||||
"type": "http://www.w3.org/ns/prov#Location",
|
||||
"graphsFilter": [
|
||||
"http://mu.semte.ch/graphs/shared"
|
||||
"http://mu.semte.ch/graphs/public"
|
||||
],
|
||||
"properties": [
|
||||
"http://www.w3.org/2000/01/rdf-schema#label",
|
||||
|
||||
@@ -157,6 +157,9 @@
|
||||
"http://www.w3.org/2004/02/skos/core#prefLabel",
|
||||
"http://www.w3.org/ns/regorg#legalName",
|
||||
"http://www.w3.org/2004/02/skos/core#altLabel",
|
||||
"http://www.w3.org/ns/regorg#orgStatus",
|
||||
"http://www.w3.org/ns/org#hasPrimarySite",
|
||||
"http://www.w3.org/ns/org#hasSite",
|
||||
"http://www.w3.org/ns/org#linkedTo",
|
||||
"http://data.lblod.info/vocabularies/erediensten/typeEredienst",
|
||||
"http://www.w3.org/ns/org#classification",
|
||||
@@ -204,7 +207,28 @@
|
||||
"http://mu.semte.ch/vocabularies/core/uuid",
|
||||
"http://www.w3.org/ns/org#siteAddress",
|
||||
"https://data.vlaanderen.be/ns/organisatie#bestaatUit",
|
||||
"http://data.lblod.info/vocabularies/erediensten/vestigingstype"
|
||||
"http://data.lblod.info/vocabularies/erediensten/vestigingstype",
|
||||
"http://purl.org/dc/terms/description"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "http://www.w3.org/ns/org#Site",
|
||||
"graphsFilter": [
|
||||
"http://mu.semte.ch/graphs/shared",
|
||||
"http://mu.semte.ch/graphs/worship-service",
|
||||
"http://mu.semte.ch/graphs/administrative-unit"
|
||||
],
|
||||
"pathToConceptScheme": [
|
||||
"^http://www.w3.org/ns/org#hasSite",
|
||||
"http://www.w3.org/ns/org#classification",
|
||||
"http://www.w3.org/2004/02/skos/core#inScheme"
|
||||
],
|
||||
"properties": [
|
||||
"http://mu.semte.ch/vocabularies/core/uuid",
|
||||
"http://www.w3.org/ns/org#siteAddress",
|
||||
"https://data.vlaanderen.be/ns/organisatie#bestaatUit",
|
||||
"http://data.lblod.info/vocabularies/erediensten/vestigingstype",
|
||||
"http://purl.org/dc/terms/description"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -228,6 +252,35 @@
|
||||
"http://www.w3.org/ns/locn#postCode",
|
||||
"https://data.vlaanderen.be/ns/adres#gemeentenaam",
|
||||
"http://www.w3.org/ns/locn#adminUnitL2",
|
||||
"https://data.vlaanderen.be/ns/adres#adresIsGelegenIn",
|
||||
"https://data.vlaanderen.be/ns/adres#land",
|
||||
"http://www.w3.org/ns/locn#fullAddress",
|
||||
"https://data.vlaanderen.be/ns/adres#verwijstNaar",
|
||||
"http://purl.org/dc/terms/source"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "http://www.w3.org/ns/locn#Address",
|
||||
"graphsFilter": [
|
||||
"http://mu.semte.ch/graphs/shared",
|
||||
"http://mu.semte.ch/graphs/worship-service",
|
||||
"http://mu.semte.ch/graphs/administrative-unit"
|
||||
],
|
||||
"pathToConceptScheme": [
|
||||
"^https://data.vlaanderen.be/ns/organisatie#bestaatUit",
|
||||
"^http://www.w3.org/ns/org#hasSite",
|
||||
"http://www.w3.org/ns/org#classification",
|
||||
"http://www.w3.org/2004/02/skos/core#inScheme"
|
||||
],
|
||||
"properties": [
|
||||
"http://mu.semte.ch/vocabularies/core/uuid",
|
||||
"https://data.vlaanderen.be/ns/adres#Adresvoorstelling.huisnummer",
|
||||
"https://data.vlaanderen.be/ns/adres#Adresvoorstelling.busnummer",
|
||||
"http://www.w3.org/ns/locn#thoroughfare",
|
||||
"http://www.w3.org/ns/locn#postCode",
|
||||
"https://data.vlaanderen.be/ns/adres#gemeentenaam",
|
||||
"http://www.w3.org/ns/locn#adminUnitL2",
|
||||
"https://data.vlaanderen.be/ns/adres#adresIsGelegenIn",
|
||||
"https://data.vlaanderen.be/ns/adres#land",
|
||||
"http://www.w3.org/ns/locn#fullAddress",
|
||||
"https://data.vlaanderen.be/ns/adres#verwijstNaar",
|
||||
@@ -258,6 +311,30 @@
|
||||
"http://schema.org/telephone"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "http://schema.org/ContactPoint",
|
||||
"graphsFilter": [
|
||||
"http://mu.semte.ch/graphs/shared",
|
||||
"http://mu.semte.ch/graphs/worship-service",
|
||||
"http://mu.semte.ch/graphs/administrative-unit"
|
||||
],
|
||||
"pathToConceptScheme": [
|
||||
"^http://www.w3.org/ns/org#siteAddress",
|
||||
"^http://www.w3.org/ns/org#hasSite",
|
||||
"http://www.w3.org/ns/org#classification",
|
||||
"http://www.w3.org/2004/02/skos/core#inScheme"
|
||||
],
|
||||
"properties": [
|
||||
"http://mu.semte.ch/vocabularies/core/uuid",
|
||||
"http://www.w3.org/ns/locn#address",
|
||||
"http://xmlns.com/foaf/0.1/page",
|
||||
"http://schema.org/faxNumber",
|
||||
"http://schema.org/contactType",
|
||||
"http://xmlns.com/foaf/0.1/page",
|
||||
"http://schema.org/email",
|
||||
"http://schema.org/telephone"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "http://www.w3.org/ns/adms#Identifier",
|
||||
"graphsFilter": [
|
||||
@@ -553,8 +630,7 @@
|
||||
{
|
||||
"type": "http://www.w3.org/ns/prov#Location",
|
||||
"graphsFilter": [
|
||||
"http://mu.semte.ch/graphs/shared",
|
||||
"http://mu.semte.ch/graphs/administrative-unit"
|
||||
"http://mu.semte.ch/graphs/public"
|
||||
],
|
||||
"hasRegexGraphsFilter": false,
|
||||
"properties": [
|
||||
@@ -564,6 +640,41 @@
|
||||
"http://www.opengis.net/ont/geosparql#sfWithin",
|
||||
"http://www.w3.org/2004/02/skos/core#exactMatch"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "http://www.w3.org/2004/02/skos/core#Concept",
|
||||
"graphsFilter": [
|
||||
"http://mu.semte.ch/graphs/public"
|
||||
],
|
||||
"pathToConceptScheme": [
|
||||
"http://www.w3.org/2004/02/skos/core#inScheme"
|
||||
],
|
||||
"properties": [
|
||||
"http://mu.semte.ch/vocabularies/core/uuid",
|
||||
"http://www.w3.org/2004/02/skos/core#altLabel",
|
||||
"http://www.w3.org/2004/02/skos/core#broadMatch",
|
||||
"http://www.w3.org/2004/02/skos/core#broader",
|
||||
"http://www.w3.org/2004/02/skos/core#exactMatch",
|
||||
"http://www.w3.org/2004/02/skos/core#inScheme",
|
||||
"http://www.w3.org/2004/02/skos/core#narrowMatch",
|
||||
"http://www.w3.org/2004/02/skos/core#narrower",
|
||||
"http://www.w3.org/2004/02/skos/core#notation",
|
||||
"http://www.w3.org/2004/02/skos/core#prefLabel",
|
||||
"http://www.w3.org/2004/02/skos/core#relatedMatch",
|
||||
"http://www.w3.org/2004/02/skos/core#topConceptOf",
|
||||
"https://schema.org/endDate",
|
||||
"https://schema.org/startDate"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "http://publications.europa.eu/ontology/euvoc#Country",
|
||||
"graphsFilter": [
|
||||
"http://mu.semte.ch/graphs/public"
|
||||
],
|
||||
"properties": [
|
||||
"http://www.w3.org/2004/02/skos/core#prefLabel",
|
||||
"http://www.w3.org/2000/01/rdf-schema#label"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
PREFIX regorg: <http://www.w3.org/ns/regorg#>
|
||||
|
||||
DELETE {
|
||||
GRAPH <http://mu.semte.ch/graphs/worship-service> {
|
||||
?s regorg:orgStatus ?activeStatus.
|
||||
}
|
||||
} INSERT {
|
||||
GRAPH <http://mu.semte.ch/graphs/worship-service> {
|
||||
?s regorg:orgStatus ?notActiveStatus.
|
||||
}
|
||||
} WHERE {
|
||||
VALUES ?s {
|
||||
<http://data.lblod.info/id/centraleBesturenVanDeEredienst/ed0914f40dfed83ca44af845a2bf4d81>
|
||||
<http://data.lblod.info/id/centraleBesturenVanDeEredienst/9e0e8f060ca954da6263243642433f44>
|
||||
<http://data.lblod.info/id/centraleBesturenVanDeEredienst/b93ae92a8eb4912125094d98b8b4841d>
|
||||
<http://data.lblod.info/id/centraleBesturenVanDeEredienst/988321712204bd0104fb62e6f5dbe104>
|
||||
<http://data.lblod.info/id/centraleBesturenVanDeEredienst/70e058024a3cd58f76005d645b892e01>
|
||||
<http://data.lblod.info/id/centraleBesturenVanDeEredienst/cf4add06db226861767559753fb50206>
|
||||
<http://data.lblod.info/id/centraleBesturenVanDeEredienst/5442c1374ed159347bc0c64518a9b1a9>
|
||||
}
|
||||
BIND (<http://lblod.data.gift/concepts/d02c4e12bf88d2fdf5123b07f29c9311> AS ?notActiveStatus)
|
||||
BIND (<http://lblod.data.gift/concepts/63cc561de9188d64ba5840a42ae8f0d6> AS ?activeStatus)
|
||||
}
|
||||
|
||||
;
|
||||
|
||||
DELETE {
|
||||
GRAPH <http://mu.semte.ch/graphs/worship-service> {
|
||||
?s regorg:orgStatus ?notActiveStatus.
|
||||
}
|
||||
} INSERT {
|
||||
GRAPH <http://mu.semte.ch/graphs/worship-service> {
|
||||
?s regorg:orgStatus ?activeStatus.
|
||||
}
|
||||
} WHERE {
|
||||
VALUES ?s {
|
||||
<http://data.lblod.info/id/centraleBesturenVanDeEredienst/e12c4f9f7167cd0074a97a2f658d1d51>
|
||||
|
||||
}
|
||||
BIND (<http://lblod.data.gift/concepts/d02c4e12bf88d2fdf5123b07f29c9311> AS ?notActiveStatus)
|
||||
BIND (<http://lblod.data.gift/concepts/63cc561de9188d64ba5840a42ae8f0d6> AS ?activeStatus)
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
PREFIX org: <http://www.w3.org/ns/org#>
|
||||
PREFIX mu: <http://mu.semte.ch/vocabularies/core/>
|
||||
|
||||
INSERT {
|
||||
GRAPH <http://mu.semte.ch/graphs/worship-service> {
|
||||
?activeOrg
|
||||
<http://www.w3.org/ns/org#hasSubOrganization> ?sub .
|
||||
|
||||
?membership a org:Membership ;
|
||||
mu:uuid ?uuid ;
|
||||
org:organization ?activeOrg ;
|
||||
org:member ?sub ;
|
||||
org:role <http://data.lblod.info/id/rollen/4ec7d5c39bdc4e84b4174379b9e22ad8> .
|
||||
}
|
||||
}
|
||||
WHERE {
|
||||
BIND(<http://data.lblod.info/id/centraleBesturenVanDeEredienst/643ddbd9448ca43828702527af7bfbb8> AS ?inactiveOrg)
|
||||
BIND(<http://data.lblod.info/id/centraleBesturenVanDeEredienst/7f5475cfb202d12f54779f046441c9e1> AS ?activeOrg)
|
||||
|
||||
GRAPH <http://mu.semte.ch/graphs/worship-service> {
|
||||
?inactiveOrg
|
||||
<http://www.w3.org/ns/org#hasSubOrganization> ?sub .
|
||||
}
|
||||
|
||||
FILTER NOT EXISTS {
|
||||
?activeOrg
|
||||
<http://www.w3.org/ns/org#hasSubOrganization> ?sub .
|
||||
}
|
||||
|
||||
BIND(SHA1(CONCAT(STR(?activeOrg), STR(?sub), "sub organization")) as ?uuid)
|
||||
BIND(IRI(CONCAT("http://data.lblod.info/id/lidmaatschap/", ?uuid)) AS ?membership)
|
||||
}
|
||||
|
||||
;
|
||||
|
||||
DELETE {
|
||||
GRAPH <http://mu.semte.ch/graphs/worship-service> {
|
||||
?inactiveOrg
|
||||
<http://www.w3.org/ns/org#hasSubOrganization> ?sub .
|
||||
|
||||
?membership ?membershipP ?membershipO .
|
||||
}
|
||||
}
|
||||
WHERE {
|
||||
BIND(<http://data.lblod.info/id/centraleBesturenVanDeEredienst/643ddbd9448ca43828702527af7bfbb8> AS ?inactiveOrg)
|
||||
|
||||
GRAPH <http://mu.semte.ch/graphs/worship-service> {
|
||||
?inactiveOrg
|
||||
<http://www.w3.org/ns/org#hasSubOrganization> ?sub .
|
||||
|
||||
?membership a org:Membership ;
|
||||
org:organization ?inactiveOrg ;
|
||||
?membershipP ?membershipO .
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
PREFIX regorg: <http://www.w3.org/ns/regorg#>
|
||||
|
||||
DELETE {
|
||||
GRAPH <http://mu.semte.ch/graphs/worship-service> {
|
||||
?s regorg:orgStatus ?activeStatus.
|
||||
}
|
||||
} INSERT {
|
||||
GRAPH <http://mu.semte.ch/graphs/worship-service> {
|
||||
?s regorg:orgStatus ?notActiveStatus.
|
||||
}
|
||||
} WHERE {
|
||||
VALUES ?s {
|
||||
<http://data.lblod.info/id/besturenVanDeEredienst/b1dbb9effdedef39bc4f0c8d96197cfd>
|
||||
}
|
||||
BIND (<http://lblod.data.gift/concepts/d02c4e12bf88d2fdf5123b07f29c9311> AS ?notActiveStatus)
|
||||
BIND (<http://lblod.data.gift/concepts/63cc561de9188d64ba5840a42ae8f0d6> AS ?activeStatus)
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
PREFIX regorg: <http://www.w3.org/ns/regorg#>
|
||||
|
||||
DELETE {
|
||||
GRAPH <http://mu.semte.ch/graphs/worship-service> {
|
||||
?s regorg:orgStatus ?notActiveStatus.
|
||||
}
|
||||
} INSERT {
|
||||
GRAPH <http://mu.semte.ch/graphs/worship-service> {
|
||||
?s regorg:orgStatus ?activeStatus.
|
||||
}
|
||||
} WHERE {
|
||||
VALUES ?s {
|
||||
<http://data.lblod.info/id/besturenVanDeEredienst/45596b602140f031237b0ec26a8d4718>
|
||||
}
|
||||
BIND (<http://lblod.data.gift/concepts/d02c4e12bf88d2fdf5123b07f29c9311> AS ?notActiveStatus)
|
||||
BIND (<http://lblod.data.gift/concepts/63cc561de9188d64ba5840a42ae8f0d6> AS ?activeStatus)
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
||||
PREFIX prov: <http://www.w3.org/ns/prov#>
|
||||
|
||||
DELETE {
|
||||
GRAPH <http://mu.semte.ch/graphs/public> {
|
||||
?scope rdfs:label ?oldLabel .
|
||||
}
|
||||
} INSERT {
|
||||
GRAPH <http://mu.semte.ch/graphs/public> {
|
||||
?scope rdfs:label ?newLabel .
|
||||
}
|
||||
} WHERE {
|
||||
GRAPH <http://mu.semte.ch/graphs/public> {
|
||||
?scope a prov:Location ;
|
||||
rdfs:label ?oldLabel .
|
||||
VALUES (?scope ?newLabel) {
|
||||
(<http://data.lblod.info/id/werkingsgebieden/1f5dd7043ad54d07751da8689d5b47ad9ae0e52dccce8f00cc8debab35f8e2b2> "Bilzen-Hoeselt")
|
||||
(<http://data.lblod.info/id/werkingsgebieden/fc34bb0a1dbf157ac5e5f8e657dd774210f03d2efa21370dd3b9a6342906c7ab> "Tessenderlo-Ham")
|
||||
(<http://data.lblod.info/id/werkingsgebieden/fabec9e745fc9efa32afadd8b7268938805b9679dcf3b032c9b9a9a3530d6b59> "Tongeren-Borgloon")
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
INSERT {
|
||||
GRAPH <http://mu.semte.ch/graphs/public> {
|
||||
?s skos:inScheme <http://lblod.data.gift/concept-schemes/10caf4a4-1ff5-4c05-917e-56489910d68b>.
|
||||
}
|
||||
} WHERE {
|
||||
GRAPH <http://mu.semte.ch/graphs/public> {
|
||||
VALUES ?nisScheme {
|
||||
<http://vocab.belgif.be/auth/refnis2025>
|
||||
<http://vocab.belgif.be/auth/refnis2019>
|
||||
}
|
||||
|
||||
?s a <http://www.w3.org/2004/02/skos/core#Concept> ;
|
||||
<http://www.w3.org/2004/02/skos/core#inScheme> ?nisScheme .
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
PREFIX core: <http://mu.semte.ch/vocabularies/core/>
|
||||
PREFIX org: <http://www.w3.org/ns/org#>
|
||||
PREFIX lblodorg: <http://lblod.data.gift/vocabularies/organisatie/>
|
||||
PREFIX euro: <http://data.europa.eu/m8g/>
|
||||
PREFIX besluit: <http://data.vlaanderen.be/ns/besluit#>
|
||||
|
||||
DELETE {
|
||||
GRAPH <http://mu.semte.ch/graphs/worship-service> {
|
||||
?event ?ep ?eo .
|
||||
|
||||
?result ?rp ?ro .
|
||||
|
||||
?decision ?de ?do .
|
||||
}
|
||||
}
|
||||
WHERE {
|
||||
GRAPH <http://mu.semte.ch/graphs/worship-service> {
|
||||
VALUES ?changeEventUuid {
|
||||
"675AFDCA29299CC832892989" # CKB Beveren
|
||||
|
||||
"675AC8C529299CC83289296D" # CKB De Pinte
|
||||
|
||||
"675AC99229299CC83289296F" # CKB Merelbeke
|
||||
|
||||
"675AB94329299CC83289295D" # CKB Galmaarden
|
||||
"675AD32529299CC83289297B" # CKB Galmaarden
|
||||
|
||||
"675AB98C29299CC83289295F" # CKB Gooik
|
||||
"675AD47629299CC83289297D" # CKB Gooik
|
||||
|
||||
"675AD50229299CC83289297F" # CKB Herne
|
||||
"675AB9D229299CC832892961" # CKB Herne
|
||||
|
||||
"675ACA5F29299CC832892971" # CKB Tessenderlo
|
||||
|
||||
"6774F73E29299CC8328929D3" # CKB Ham
|
||||
}
|
||||
|
||||
?event a org:ChangeEvent ;
|
||||
core:uuid ?changeEventUuid ;
|
||||
lblodorg:veranderingsgebeurtenisResultaat ?result ;
|
||||
?ep ?eo .
|
||||
|
||||
?result a lblodorg:VeranderingsgebeurtenisResultaat ;
|
||||
?rp ?ro .
|
||||
|
||||
OPTIONAL {
|
||||
?event euro:hasFormalFramework ?decision .
|
||||
?decision a besluit:Besluit ;
|
||||
?de ?do .
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
DELETE {
|
||||
GRAPH ?g {
|
||||
?s <http://purl.org/dc/terms/modified> ?modified .
|
||||
}
|
||||
} INSERT {
|
||||
GRAPH ?g {
|
||||
?s <http://purl.org/dc/terms/modified> "1000-01-01"^^xsd:date .
|
||||
}
|
||||
} WHERE {
|
||||
GRAPH ?g {
|
||||
?s a <http://mu.semte.ch/vocabularies/ext/KboOrganisatie> ;
|
||||
<http://purl.org/dc/terms/modified> ?modified .
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
http://mu.semte.ch/graphs/refnis2019-data-temp
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,21 @@
|
||||
PREFIX schemas: <https://schema.org/>
|
||||
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
|
||||
|
||||
DELETE {
|
||||
GRAPH <http://mu.semte.ch/graphs/public> {
|
||||
?nis2019 schemas:endDate ?currentEndDate .
|
||||
}
|
||||
} INSERT {
|
||||
GRAPH <http://mu.semte.ch/graphs/public> {
|
||||
?nis2019 schemas:endDate ?newEndDate .
|
||||
}
|
||||
} WHERE {
|
||||
GRAPH <http://mu.semte.ch/graphs/public> {
|
||||
?nis2019 skos:inScheme <http://vocab.belgif.be/auth/refnis2019> ;
|
||||
schemas:endDate ?currentEndDate .
|
||||
}
|
||||
GRAPH <http://mu.semte.ch/graphs/refnis2019-data-temp> {
|
||||
?nis2019 schemas:endDate ?newEndDate .
|
||||
}
|
||||
FILTER (?currentEndDate != ?newEndDate)
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
CLEAR GRAPH <http://mu.semte.ch/graphs/refnis2019-data-temp>
|
||||
@@ -0,0 +1,18 @@
|
||||
DELETE {
|
||||
GRAPH <http://mu.semte.ch/graphs/shared> {
|
||||
?werkingsgebied skos:exactMatch ?nis2019 .
|
||||
}
|
||||
} INSERT {
|
||||
GRAPH <http://mu.semte.ch/graphs/shared> {
|
||||
?werkingsgebied skos:exactMatch ?nis2025 .
|
||||
}
|
||||
} WHERE {
|
||||
GRAPH <http://mu.semte.ch/graphs/shared> {
|
||||
?werkingsgebied skos:exactMatch ?nis2019 .
|
||||
}
|
||||
VALUES (?nis2019 ?nis2025) {
|
||||
(<http://vocab.belgif.be/auth/refnis2019/10000> <http://vocab.belgif.be/auth/refnis2025/10000>) # Antwerp province
|
||||
(<http://vocab.belgif.be/auth/refnis2019/40000> <http://vocab.belgif.be/auth/refnis2025/40000>) # East Flanders province
|
||||
(<http://vocab.belgif.be/auth/refnis2019/11002> <http://vocab.belgif.be/auth/refnis2025/11002>) # Antwerp municipality
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
PREFIX prov: <http://www.w3.org/ns/prov#>
|
||||
PREFIX ext: <http://mu.semte.ch/vocabularies/ext/>
|
||||
|
||||
DELETE {
|
||||
GRAPH ?sourceGraph {
|
||||
?werkingsgebied ?p ?o .
|
||||
}
|
||||
} INSERT {
|
||||
GRAPH <http://mu.semte.ch/graphs/public> {
|
||||
?werkingsgebied ?p ?o .
|
||||
}
|
||||
} WHERE {
|
||||
GRAPH ?sourceGraph {
|
||||
?werkingsgebied a prov:Location ;
|
||||
ext:werkingsgebiedNiveau ?level ;
|
||||
?p ?o .
|
||||
}
|
||||
VALUES ?sourceGraph {
|
||||
<http://mu.semte.ch/graphs/administrative-unit>
|
||||
<http://mu.semte.ch/graphs/shared>
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
PREFIX geo: <http://www.opengis.net/ont/geosparql#>
|
||||
PREFIX ext: <http://mu.semte.ch/vocabularies/ext/>
|
||||
|
||||
INSERT {
|
||||
GRAPH <http://mu.semte.ch/graphs/public> {
|
||||
?districtLocation geo:sfWithin ?antwerpLocation .
|
||||
}
|
||||
}
|
||||
WHERE {
|
||||
GRAPH <http://mu.semte.ch/graphs/public> {
|
||||
?districtLocation a prov:Location ;
|
||||
ext:werkingsgebiedNiveau ?level .
|
||||
FILTER (?level = "District")
|
||||
}
|
||||
# Hardcode the werkingsgbied for the Antwerp municipality as it is the only one with districts anyway.
|
||||
BIND (<http://data.lblod.info/id/werkingsgebieden/3a9b09cbccb798c8f9d5bad3fce1476bce1ee014165ba243488b0af690d0f464> AS ?antwerpLocation)
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
PREFIX geo: <http://www.opengis.net/ont/geosparql#>
|
||||
PREFIX ext: <http://mu.semte.ch/vocabularies/ext/>
|
||||
PREFIX mu: <http://mu.semte.ch/vocabularies/core/>
|
||||
PREFIX besluit: <http://data.vlaanderen.be/ns/besluit#>
|
||||
|
||||
INSERT {
|
||||
GRAPH <http://mu.semte.ch/graphs/public> {
|
||||
?borsbeekLocation a prov:Location;
|
||||
mu:uuid ?uuid ;
|
||||
rdfs:label "Borsbeek" ;
|
||||
ext:werkingsgebiedNiveau "District" ;
|
||||
geo:sfWithin ?antwerpLocation .
|
||||
}
|
||||
# Also link this new werkingsgbied to the actual district
|
||||
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
|
||||
?borsbeekDistrict besluit:werkingsgebied ?borsbeekLocation .
|
||||
}
|
||||
} WHERE {
|
||||
BIND(SHA256(CONCAT("Werkingsgebied for the district of Borsbeek")) AS ?uuid)
|
||||
BIND(IRI(CONCAT("http://data.lblod.info/id/werkingsgebieden/", STR(?uuid))) AS ?borsbeekLocation)
|
||||
|
||||
BIND (<http://data.lblod.info/id/werkingsgebieden/3a9b09cbccb798c8f9d5bad3fce1476bce1ee014165ba243488b0af690d0f464> AS ?antwerpLocation)
|
||||
BIND (<http://data.lblod.info/id/bestuurseenheden/4b44e6f1-113b-4692-b149-44a889b215f2> AS ?borsbeekDistrict)
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
PREFIX geo: <http://www.opengis.net/ont/geosparql#>
|
||||
PREFIX org: <http://www.w3.org/ns/org#>
|
||||
PREFIX besluit: <http://data.vlaanderen.be/ns/besluit#>
|
||||
|
||||
INSERT {
|
||||
GRAPH <http://mu.semte.ch/graphs/public> {
|
||||
?municipalityLocation geo:sfWithin ?provinceLocation .
|
||||
}
|
||||
} WHERE {
|
||||
GRAPH <http://mu.semte.ch/graphs/shared> {
|
||||
?municipality a besluit:Bestuurseenheid ;
|
||||
org:classification <http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/5ab0e9b8a3b2ca7c5e000001> .
|
||||
?province a besluit:Bestuurseenheid ;
|
||||
org:classification <http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/5ab0e9b8a3b2ca7c5e000000> .
|
||||
}
|
||||
|
||||
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
|
||||
?membership a org:Membership ;
|
||||
org:member ?municipality ;
|
||||
org:organization ?province .
|
||||
|
||||
?municipality besluit:werkingsgebied ?municipalityLocation .
|
||||
?province besluit:werkingsgebied ?provinceLocation .
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
PREFIX geo: <http://www.opengis.net/ont/geosparql#>
|
||||
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
|
||||
PREFIX prov: <http://www.w3.org/ns/prov#>
|
||||
|
||||
DELETE {
|
||||
GRAPH <http://mu.semte.ch/graphs/shared> {
|
||||
?s ?p ?o .
|
||||
}
|
||||
} INSERT {
|
||||
GRAPH <http://mu.semte.ch/graphs/public> {
|
||||
?s ?p ?o .
|
||||
}
|
||||
} WHERE {
|
||||
GRAPH <http://mu.semte.ch/graphs/shared> {
|
||||
?s ?p ?o .
|
||||
VALUES ?p {
|
||||
geo:sfWithin
|
||||
skos:exactMatch
|
||||
}
|
||||
}
|
||||
GRAPH <http://mu.semte.ch/graphs/public> {
|
||||
?s a prov:Location .
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
PREFIX dct: <http://purl.org/dc/terms/>
|
||||
|
||||
DELETE {
|
||||
GRAPH ?g {
|
||||
<http://data.lblod.info/id/veranderingsgebeurtenissen/68021371D4DB18EC8BA958FC> dct:date ?oldDate .
|
||||
}
|
||||
} INSERT {
|
||||
GRAPH ?g {
|
||||
<http://data.lblod.info/id/veranderingsgebeurtenissen/68021371D4DB18EC8BA958FC> dct:date "2023-11-30"^^xsd:date .
|
||||
}
|
||||
} WHERE {
|
||||
GRAPH ?g {
|
||||
<http://data.lblod.info/id/veranderingsgebeurtenissen/68021371D4DB18EC8BA958FC> dct:date ?oldDate .
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
PREFIX org: <http://www.w3.org/ns/org#>
|
||||
|
||||
DELETE {
|
||||
GRAPH <http://mu.semte.ch/graphs/shared> {
|
||||
?membership ?p ?o .
|
||||
}
|
||||
} INSERT {
|
||||
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
|
||||
?membership ?p ?o .
|
||||
}
|
||||
} WHERE {
|
||||
GRAPH <http://mu.semte.ch/graphs/shared> {
|
||||
?membership a org:Membership ;
|
||||
?p ?o .
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
|
||||
PREFIX concept_schemes: <http://data.lblod.info/doc/conceptscheme#>
|
||||
PREFIX ext: <http://mu.semte.ch/vocabularies/ext/>
|
||||
PREFIX dcterms: <http://purl.org/dc/terms/>
|
||||
|
||||
INSERT DATA {
|
||||
GRAPH <http://mu.semte.ch/graphs/public> {
|
||||
concept_schemes:ProvincesConceptScheme a skos:ConceptScheme ;
|
||||
skos:prefLabel "Provinces Concept Scheme" ;
|
||||
dcterms:description "A concept scheme containing all the location entities that are provinces".
|
||||
}
|
||||
}
|
||||
|
||||
;
|
||||
|
||||
INSERT
|
||||
{
|
||||
GRAPH <http://mu.semte.ch/graphs/public> {
|
||||
?province_uri rdf:type skos:Concept ;
|
||||
skos:inScheme concept_schemes:ProvincesConceptScheme .
|
||||
}
|
||||
} WHERE {
|
||||
GRAPH <http://mu.semte.ch/graphs/public> {
|
||||
?province_uri ext:werkingsgebiedNiveau "Provincie".
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
PREFIX locn: <http://www.w3.org/ns/locn#>
|
||||
PREFIX ext: <http://mu.semte.ch/vocabularies/ext/>
|
||||
PREFIX adres: <https://data.vlaanderen.be/ns/adres#>
|
||||
|
||||
|
||||
INSERT {
|
||||
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
|
||||
?address adres:adresIsGelegenIn ?province_uri .
|
||||
}
|
||||
} WHERE {
|
||||
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
|
||||
?address rdf:type locn:Address ;
|
||||
locn:adminUnitL2 ?province_literal .
|
||||
}
|
||||
GRAPH <http://mu.semte.ch/graphs/public> {
|
||||
?province_uri rdfs:label ?province_literal ;
|
||||
ext:werkingsgebiedNiveau "Provincie" .
|
||||
}
|
||||
}
|
||||
|
||||
;
|
||||
|
||||
INSERT {
|
||||
GRAPH <http://mu.semte.ch/graphs/worship-service> {
|
||||
?address adres:adresIsGelegenIn ?province_uri .
|
||||
}
|
||||
} WHERE {
|
||||
GRAPH <http://mu.semte.ch/graphs/worship-service> {
|
||||
?address rdf:type locn:Address ;
|
||||
locn:adminUnitL2 ?province_literal .
|
||||
}
|
||||
GRAPH <http://mu.semte.ch/graphs/public> {
|
||||
?province_uri rdfs:label ?province_literal ;
|
||||
ext:werkingsgebiedNiveau "Provincie" .
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
http://mu.semte.ch/graphs/public
|
||||
@@ -0,0 +1,41 @@
|
||||
@prefix cleanup: <http://mu.semte.ch/vocabularies/ext/cleanup/> .
|
||||
@prefix mu: <http://mu.semte.ch/vocabularies/core/> .
|
||||
@prefix dcterms: <http://purl.org/dc/terms/> .
|
||||
|
||||
<http://data.lblod.info/id/cleanup-job/42245582-ea60-4d44-80ef-c686901eccb5> a cleanup:Job ;
|
||||
mu:uuid "42245582-ea60-4d44-80ef-c686901eccb5" ;
|
||||
dcterms:title "Insert missing province uris for addresses of administrative units" ;
|
||||
cleanup:randomQuery """
|
||||
|
||||
PREFIX locn: <http://www.w3.org/ns/locn#>
|
||||
PREFIX ext: <http://mu.semte.ch/vocabularies/ext/>
|
||||
PREFIX adres: <https://data.vlaanderen.be/ns/adres#>
|
||||
|
||||
INSERT {
|
||||
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
|
||||
?address adres:adresIsGelegenIn ?province_uri .
|
||||
}
|
||||
}
|
||||
WHERE {
|
||||
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
|
||||
?address rdf:type locn:Address ;
|
||||
locn:adminUnitL2 ?province_literal .
|
||||
FILTER NOT EXISTS {
|
||||
?address adres:adresIsGelegenIn ?province_uri2 .
|
||||
}
|
||||
}
|
||||
GRAPH <http://mu.semte.ch/graphs/public> {
|
||||
?province_uri rdfs:label ?province_literal ;
|
||||
ext:werkingsgebiedNiveau "Provincie" .
|
||||
BIND (?province_uri as ?province_uri2)
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
""" .
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
http://mu.semte.ch/graphs/public
|
||||
@@ -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/> .
|
||||
|
||||
<http://data.lblod.info/id/cleanup-job/cdbb9f4e-90cc-40f6-a0a9-bd0bd8c9105f> a cleanup:Job ;
|
||||
mu:uuid "cdbb9f4e-90cc-40f6-a0a9-bd0bd8c9105f" ;
|
||||
dcterms:title "Insert missing province uris for addresses of worship services" ;
|
||||
cleanup:randomQuery """
|
||||
|
||||
PREFIX locn: <http://www.w3.org/ns/locn#>
|
||||
PREFIX ext: <http://mu.semte.ch/vocabularies/ext/>
|
||||
PREFIX adres: <https://data.vlaanderen.be/ns/adres#>
|
||||
|
||||
INSERT {
|
||||
GRAPH <http://mu.semte.ch/graphs/worship-service> {
|
||||
?address adres:adresIsGelegenIn ?province_uri .
|
||||
}
|
||||
}
|
||||
WHERE {
|
||||
GRAPH <http://mu.semte.ch/graphs/worship-service> {
|
||||
?address rdf:type locn:Address ;
|
||||
locn:adminUnitL2 ?province_literal .
|
||||
FILTER NOT EXISTS {
|
||||
?address adres:adresIsGelegenIn ?province_uri2 .
|
||||
}
|
||||
}
|
||||
GRAPH <http://mu.semte.ch/graphs/public> {
|
||||
?province_uri rdfs:label ?province_literal ;
|
||||
ext:werkingsgebiedNiveau "Provincie" .
|
||||
BIND (?province_uri as ?province_uri2)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
""" .
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
PREFIX core: <http://mu.semte.ch/vocabularies/core/>
|
||||
PREFIX org: <http://www.w3.org/ns/org#>
|
||||
PREFIX lblodorg: <http://lblod.data.gift/vocabularies/organisatie/>
|
||||
PREFIX euro: <http://data.europa.eu/m8g/>
|
||||
PREFIX besluit: <http://data.vlaanderen.be/ns/besluit#>
|
||||
|
||||
DELETE {
|
||||
GRAPH <http://mu.semte.ch/graphs/worship-service> {
|
||||
?event ?ep ?eo .
|
||||
|
||||
?result ?rp ?ro .
|
||||
|
||||
?decision ?de ?do .
|
||||
}
|
||||
}
|
||||
WHERE {
|
||||
GRAPH <http://mu.semte.ch/graphs/worship-service> {
|
||||
?event a org:ChangeEvent ;
|
||||
core:uuid "6824418BD4DB18EC8BA95940" ;
|
||||
lblodorg:veranderingsgebeurtenisResultaat ?result ;
|
||||
?ep ?eo .
|
||||
|
||||
?result a lblodorg:VeranderingsgebeurtenisResultaat ;
|
||||
?rp ?ro .
|
||||
|
||||
OPTIONAL {
|
||||
?event euro:hasFormalFramework ?decision .
|
||||
?decision a besluit:Besluit ;
|
||||
?de ?do .
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
PREFIX dct: <http://purl.org/dc/terms/>
|
||||
|
||||
DELETE {
|
||||
GRAPH ?g {
|
||||
<http://data.lblod.info/id/veranderingsgebeurtenissen/682443E0D4DB18EC8BA95945> dct:date ?oldDate .
|
||||
}
|
||||
} INSERT {
|
||||
GRAPH ?g {
|
||||
<http://data.lblod.info/id/veranderingsgebeurtenissen/682443E0D4DB18EC8BA95945> dct:date "2021-06-18"^^xsd:date .
|
||||
}
|
||||
} WHERE {
|
||||
GRAPH ?g {
|
||||
<http://data.lblod.info/id/veranderingsgebeurtenissen/682443E0D4DB18EC8BA95945> dct:date ?oldDate .
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
|
||||
PREFIX owl: <http://www.w3.org/2002/07/owl#>
|
||||
PREFIX dcterms: <http://purl.org/dc/terms/>
|
||||
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
|
||||
|
||||
INSERT DATA {
|
||||
|
||||
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
|
||||
<http://data.lblod.info/id/bestuurseenheden/a33d5059-d527-4c9a-a788-1b7f5c75d10e>
|
||||
rdf:type <http://www.w3.org/ns/org#Organization> , <http://data.vlaanderen.be/ns/besluit#Bestuurseenheid> , dcterms:Agent ;
|
||||
owl:sameAs <http://data.vlaanderen.be/doc/organisatie/OVO053550> ;
|
||||
<http://www.w3.org/ns/org#classification> <http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/52cc9d8d-1c9a-4d92-9936-da9d4a622ec4> ;
|
||||
<http://www.w3.org/ns/org#linkedTo> <http://data.lblod.info/id/bestuurseenheden/141d9d6b-54af-4d17-b313-8d1c30bc3f5b> ;
|
||||
<http://mu.semte.ch/vocabularies/core/uuid> "a33d5059-d527-4c9a-a788-1b7f5c75d10e" ;
|
||||
skos:prefLabel "Kabinet Crevits" ;
|
||||
<http://www.w3.org/2004/02/skos/core#note> """This is a special case, we consider (for now) Kabinet Crevits as a bestuurseenheid, of org:classification ABB.""";
|
||||
<http://www.w3.org/ns/adms#identifier> <http://data.lblod.info/id/identificatoren/b53dc2b0-7fca-4c59-8f2a-276753edb81e> ;
|
||||
<http://www.w3.org/ns/regorg#orgStatus> <http://lblod.data.gift/concepts/63cc561de9188d64ba5840a42ae8f0d6> ;
|
||||
<http://www.w3.org/ns/regorg#legalName> "Kabinet Crevits" .
|
||||
|
||||
<http://data.lblod.info/id/identificatoren/b53dc2b0-7fca-4c59-8f2a-276753edb81e>
|
||||
<https://data.vlaanderen.be/ns/generiek#gestructureerdeIdentificator> <http://data.lblod.info/id/gestructureerdeIdentificator/aac3f5c0-e525-4cec-8432-2d59806661e5>;
|
||||
<http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/ns/adms#Identifier>;
|
||||
<http://www.w3.org/2004/02/skos/core#notation> "OVO-nummer" ;
|
||||
<http://mu.semte.ch/vocabularies/core/uuid> "b53dc2b0-7fca-4c59-8f2a-276753edb81e" .
|
||||
|
||||
<http://data.lblod.info/id/gestructureerdeIdentificator/aac3f5c0-e525-4cec-8432-2d59806661e5>
|
||||
<http://mu.semte.ch/vocabularies/core/uuid> "aac3f5c0-e525-4cec-8432-2d59806661e5";
|
||||
<http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <https://data.vlaanderen.be/ns/generiek#GestructureerdeIdentificator>;
|
||||
<https://data.vlaanderen.be/ns/generiek#lokaleIdentificator> "OVO053550" .
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
PREFIX org: <http://www.w3.org/ns/org#>
|
||||
|
||||
DELETE {
|
||||
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
|
||||
?membership ?p ?o .
|
||||
?organization org:hasSubOrganization ?member .
|
||||
}
|
||||
} INSERT {
|
||||
GRAPH <http://mu.semte.ch/graphs/shared>{
|
||||
?membership ?p ?o .
|
||||
?organization org:hasSubOrganization ?member .
|
||||
}
|
||||
} WHERE {
|
||||
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
|
||||
?membership a org:Membership ;
|
||||
org:member ?member ;
|
||||
org:organization ?organization ;
|
||||
?p ?o .
|
||||
}
|
||||
GRAPH <http://mu.semte.ch/graphs/shared> {
|
||||
?member org:classification <http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/5ab0e9b8a3b2ca7c5e000001> . # Municipality
|
||||
?organization org:classification <http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/5ab0e9b8a3b2ca7c5e000000> . # Province
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
http://mu.semte.ch/graphs/public
|
||||
@@ -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/> .
|
||||
|
||||
# Insert triples of the form
|
||||
# <Province> <http://www.w3.org/ns/org#hasSubOrganization> <Municipality>
|
||||
# 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>
|
||||
|
||||
<http://data.lblod.info/id/cleanup-job/0cc5e981-a61e-433e-b6f2-c59fd8599944> a cleanup:Job ;
|
||||
mu:uuid "0cc5e981-a61e-433e-b6f2-c59fd8599944" ;
|
||||
dcterms:title "Insert missing `org:hasSubOrganization` triples relating provinces and municipalities." ;
|
||||
cleanup:randomQuery """
|
||||
PREFIX org: <http://www.w3.org/ns/org#>
|
||||
|
||||
INSERT {
|
||||
GRAPH <http://mu.semte.ch/graphs/shared> {
|
||||
?province org:hasSubOrganization ?municipality .
|
||||
}
|
||||
} WHERE {
|
||||
GRAPH <http://mu.semte.ch/graphs/shared> {
|
||||
?membership a org:Membership ;
|
||||
org:organization ?province ;
|
||||
org:member ?municipality ;
|
||||
org:role <http://data.lblod.info/id/rollen/4ec7d5c39bdc4e84b4174379b9e22ad8> .
|
||||
|
||||
FILTER NOT EXISTS { ?province org:hasSubOrganization ?municipality . }
|
||||
|
||||
?municipality org:classification <http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/5ab0e9b8a3b2ca7c5e000001> .
|
||||
?province org:classification <http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/5ab0e9b8a3b2ca7c5e000000> .
|
||||
}
|
||||
}
|
||||
""" .
|
||||
@@ -0,0 +1 @@
|
||||
http://mu.semte.ch/graphs/public
|
||||
@@ -0,0 +1,37 @@
|
||||
@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> <Municipality>
|
||||
# for which no matching membership exists.
|
||||
|
||||
# Province: <http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/5ab0e9b8a3b2ca7c5e000000>
|
||||
#
|
||||
# Municipality: <http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/5ab0e9b8a3b2ca7c5e000001>
|
||||
|
||||
<http://data.lblod.info/id/cleanup-job/7354dfd9-bdef-48d6-b81e-e814bd4f4e9c> a cleanup:Job ;
|
||||
mu:uuid "7354dfd9-bdef-48d6-b81e-e814bd4f4e9c" ;
|
||||
dcterms:title "Delete leftover `org:hasSubOrganization` triples between Provinces and municipalities." ;
|
||||
cleanup:randomQuery """
|
||||
PREFIX org: <http://www.w3.org/ns/org#>
|
||||
|
||||
DELETE {
|
||||
GRAPH <http://mu.semte.ch/graphs/shared> {
|
||||
?province org:hasSubOrganization ?municipality .
|
||||
}
|
||||
} WHERE {
|
||||
GRAPH <http://mu.semte.ch/graphs/shared> {
|
||||
?province org:hasSubOrganization ?municipality .
|
||||
FILTER NOT EXISTS {
|
||||
?membership a org:Membership ;
|
||||
org:organization ?province ;
|
||||
org:member ?municipality ;
|
||||
org:role <http://data.lblod.info/id/rollen/4ec7d5c39bdc4e84b4174379b9e22ad8> .
|
||||
}
|
||||
|
||||
?municipality org:classification <http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/5ab0e9b8a3b2ca7c5e000001> .
|
||||
?province org:classification <http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/5ab0e9b8a3b2ca7c5e000000> .
|
||||
}
|
||||
}
|
||||
""" .
|
||||
@@ -0,0 +1,32 @@
|
||||
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
|
||||
PREFIX owl: <http://www.w3.org/2002/07/owl#>
|
||||
PREFIX dcterms: <http://purl.org/dc/terms/>
|
||||
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
|
||||
|
||||
INSERT DATA {
|
||||
|
||||
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
|
||||
<http://data.lblod.info/id/bestuurseenheden/862d7e64-fa34-4cd8-a948-00327c6260a6>
|
||||
rdf:type <http://www.w3.org/ns/org#Organization> , <http://data.vlaanderen.be/ns/besluit#Bestuurseenheid> , dcterms:Agent ;
|
||||
owl:sameAs <http://data.vlaanderen.be/doc/organisatie/OVO000617> ;
|
||||
<http://www.w3.org/ns/org#classification> <http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/52cc9d8d-1c9a-4d92-9936-da9d4a622ec4> ;
|
||||
<http://www.w3.org/ns/org#linkedTo> <http://data.lblod.info/id/bestuurseenheden/141d9d6b-54af-4d17-b313-8d1c30bc3f5b> ;
|
||||
<http://mu.semte.ch/vocabularies/core/uuid> "862d7e64-fa34-4cd8-a948-00327c6260a6" ;
|
||||
skos:prefLabel "Vlaams Parlement" ;
|
||||
<http://www.w3.org/2004/02/skos/core#note> """This is a special case, we consider (for now) Vlaams Parlement as a bestuurseenheid, of org:classification ABB.""";
|
||||
<http://www.w3.org/ns/adms#identifier> <http://data.lblod.info/id/identificatoren/a03f0b48-1a6d-40af-84eb-5aee7b757986> ;
|
||||
<http://www.w3.org/ns/regorg#orgStatus> <http://lblod.data.gift/concepts/63cc561de9188d64ba5840a42ae8f0d6> ;
|
||||
<http://www.w3.org/ns/regorg#legalName> "Vlaams Parlement" .
|
||||
|
||||
<http://data.lblod.info/id/identificatoren/a03f0b48-1a6d-40af-84eb-5aee7b757986>
|
||||
<https://data.vlaanderen.be/ns/generiek#gestructureerdeIdentificator> <http://data.lblod.info/id/gestructureerdeIdentificator/666c8cb7-030b-4e28-9042-82ac685684b9>;
|
||||
<http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/ns/adms#Identifier>;
|
||||
<http://www.w3.org/2004/02/skos/core#notation> "OVO-nummer" ;
|
||||
<http://mu.semte.ch/vocabularies/core/uuid> "a03f0b48-1a6d-40af-84eb-5aee7b757986" .
|
||||
|
||||
<http://data.lblod.info/id/gestructureerdeIdentificator/666c8cb7-030b-4e28-9042-82ac685684b9>
|
||||
<http://mu.semte.ch/vocabularies/core/uuid> "666c8cb7-030b-4e28-9042-82ac685684b9";
|
||||
<http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <https://data.vlaanderen.be/ns/generiek#GestructureerdeIdentificator>;
|
||||
<https://data.vlaanderen.be/ns/generiek#lokaleIdentificator> "OVO000617" .
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
http://mu.semte.ch/graphs/administrative-unit
|
||||
@@ -0,0 +1,129 @@
|
||||
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
|
||||
@prefix dcterms: <http://purl.org/dc/terms/> .
|
||||
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
|
||||
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
|
||||
|
||||
# Core data
|
||||
<http://data.lblod.info/id/bestuurseenheden/604d50138929f0e450f629b1caad73733d2a5dc31018edb53e50a5940f4dafe7> rdf:type <http://data.vlaanderen.be/ns/besluit#Bestuurseenheid> , <http://www.w3.org/ns/org#Organization> , dcterms:Agent ;
|
||||
<http://mu.semte.ch/vocabularies/core/uuid> "604d50138929f0e450f629b1caad73733d2a5dc31018edb53e50a5940f4dafe7" ;
|
||||
skos:prefLabel "Havenbedrijf Antwerpen" ;
|
||||
<http://www.w3.org/ns/regorg#legalName> "Havenbedrijf Antwerpen" ;
|
||||
<http://www.w3.org/ns/org#hasPrimarySite> <http://data.lblod.info/id/vestigingen/6867A955D4D5D97D41D25644> ;
|
||||
<http://www.w3.org/ns/regorg#orgStatus> <http://lblod.data.gift/concepts/63cc561de9188d64ba5840a42ae8f0d6> ;
|
||||
<http://www.w3.org/ns/adms#identifier> <http://data.lblod.info/id/identificatoren/6867A953D4D5D97D41D2563E> , <http://data.lblod.info/id/identificatoren/6867A954D4D5D97D41D25640> , <http://data.lblod.info/id/identificatoren/90a07cc0-58bf-11f0-a83a-cf8f2103999b> ;
|
||||
<http://www.w3.org/ns/org#classification> <http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/36a82ba0-7ff1-4697-a9dd-2e94df73b721> .
|
||||
|
||||
## Identifiers
|
||||
### KBO no.
|
||||
<http://data.lblod.info/id/identificatoren/6867A953D4D5D97D41D2563E> rdf:type <http://www.w3.org/ns/adms#Identifier> ;
|
||||
<http://mu.semte.ch/vocabularies/core/uuid> "6867A953D4D5D97D41D2563E" ;
|
||||
<https://data.vlaanderen.be/ns/generiek#gestructureerdeIdentificator> <http://data.lblod.info/id/gestructureerdeIdentificatoren/6867A953D4D5D97D41D2563D> ;
|
||||
skos:notation "KBO nummer" .
|
||||
<http://data.lblod.info/id/gestructureerdeIdentificatoren/6867A953D4D5D97D41D2563D> rdf:type <https://data.vlaanderen.be/ns/generiek#GestructureerdeIdentificator> ;
|
||||
<http://mu.semte.ch/vocabularies/core/uuid> "6867A953D4D5D97D41D2563D" ;
|
||||
<https://data.vlaanderen.be/ns/generiek#lokaleIdentificator> "0248399380" .
|
||||
### SharePoint id
|
||||
<http://data.lblod.info/id/identificatoren/6867A954D4D5D97D41D25640> rdf:type <http://www.w3.org/ns/adms#Identifier> ;
|
||||
<http://mu.semte.ch/vocabularies/core/uuid> "6867A954D4D5D97D41D25640" ;
|
||||
<https://data.vlaanderen.be/ns/generiek#gestructureerdeIdentificator> <http://data.lblod.info/id/gestructureerdeIdentificatoren/6867A954D4D5D97D41D2563F> ;
|
||||
skos:notation "SharePoint identificator" .
|
||||
<http://data.lblod.info/id/gestructureerdeIdentificatoren/6867A954D4D5D97D41D2563F> rdf:type <https://data.vlaanderen.be/ns/generiek#GestructureerdeIdentificator> ;
|
||||
<http://mu.semte.ch/vocabularies/core/uuid> "6867A954D4D5D97D41D2563F" .
|
||||
### OVO no.
|
||||
<http://data.lblod.info/id/identificatoren/90a07cc0-58bf-11f0-a83a-cf8f2103999b> rdf:type <http://www.w3.org/ns/adms#Identifier> ;
|
||||
<http://mu.semte.ch/vocabularies/core/uuid> "90a07cc0-58bf-11f0-a83a-cf8f2103999b" ;
|
||||
<https://data.vlaanderen.be/ns/generiek#gestructureerdeIdentificator> <http://data.lblod.info/id/gestructureerdeIdentificatoren/90a07cc1-58bf-11f0-a83a-cf8f2103999b> ;
|
||||
skos:notation "OVO-nummer" .
|
||||
<http://data.lblod.info/id/gestructureerdeIdentificatoren/90a07cc1-58bf-11f0-a83a-cf8f2103999b> rdf:type <https://data.vlaanderen.be/ns/generiek#GestructureerdeIdentificator> ;
|
||||
<http://mu.semte.ch/vocabularies/core/uuid> "90a07cc1-58bf-11f0-a83a-cf8f2103999b" .
|
||||
|
||||
# Contact information
|
||||
<http://data.lblod.info/id/vestigingen/6867A955D4D5D97D41D25644> rdf:type <http://www.w3.org/ns/org#Site> ;
|
||||
<http://mu.semte.ch/vocabularies/core/uuid> "6867A955D4D5D97D41D25644" ;
|
||||
<http://www.w3.org/ns/org#siteAddress> <http://data.lblod.info/id/contact-punten/6867A954D4D5D97D41D25641> , <http://data.lblod.info/id/contact-punten/6867A954D4D5D97D41D25642> ;
|
||||
<https://data.vlaanderen.be/ns/organisatie#bestaatUit> <http://data.lblod.info/id/adressen/6867A954D4D5D97D41D25643> ;
|
||||
<http://data.lblod.info/vocabularies/erediensten/vestigingstype> <http://lblod.data.gift/concepts/f1381723dec42c0b6ba6492e41d6f5dd> .
|
||||
|
||||
<http://data.lblod.info/id/contact-punten/6867A954D4D5D97D41D25641> rdf:type <http://schema.org/ContactPoint> ;
|
||||
<http://schema.org/contactType> "Primary" ;
|
||||
<http://mu.semte.ch/vocabularies/core/uuid> "6867A954D4D5D97D41D25641" .
|
||||
|
||||
<http://data.lblod.info/id/contact-punten/6867A954D4D5D97D41D25642> rdf:type <http://schema.org/ContactPoint> ;
|
||||
<http://schema.org/contactType> "Secondary" ;
|
||||
<http://mu.semte.ch/vocabularies/core/uuid> "6867A954D4D5D97D41D25642" .
|
||||
|
||||
<http://data.lblod.info/id/adressen/6867A954D4D5D97D41D25643> rdf:type <http://www.w3.org/ns/locn#Address> ;
|
||||
<https://data.vlaanderen.be/ns/adres#verwijstNaar> <https://data.vlaanderen.be/id/adres/3883528> ;
|
||||
<http://mu.semte.ch/vocabularies/core/uuid> "6867A954D4D5D97D41D25643" ;
|
||||
dcterms:source <http://lblod.data.gift/concepts/e59c97a9-4e95-4d65-9696-756de47fbc1f> ;
|
||||
<http://www.w3.org/ns/locn#postCode> "2030" ;
|
||||
<https://data.vlaanderen.be/ns/adres#Adresvoorstelling.huisnummer> "1" ;
|
||||
<http://www.w3.org/ns/locn#adminUnitL2> "Antwerpen" ;
|
||||
<http://www.w3.org/ns/locn#fullAddress> "Zaha Hadidplein 1, 2030 Antwerpen, Belgi\u00EB" ;
|
||||
<http://www.w3.org/ns/locn#thoroughfare> "Zaha Hadidplein" ;
|
||||
<https://data.vlaanderen.be/ns/adres#gemeentenaam> "Antwerpen" ;
|
||||
<https://data.vlaanderen.be/ns/adres#land> "Belgi\u00EB" .
|
||||
|
||||
# Governing bodies
|
||||
## Raad van bestuur
|
||||
<http://data.lblod.info/id/bestuursorganen/8ffdfb30-58bf-11f0-8a90-dda5d31bcff4> rdf:type <http://data.vlaanderen.be/ns/besluit#Bestuursorgaan> ;
|
||||
<http://mu.semte.ch/vocabularies/core/uuid> "8ffdfb30-58bf-11f0-8a90-dda5d31bcff4" ;
|
||||
skos:prefLabel "Raad van bestuur Havenbedrijf Antwerpen" ;
|
||||
<http://www.w3.org/ns/org#classification> <http://data.vlaanderen.be/id/concept/BestuursorgaanClassificatieCode/013cc838-173a-4657-b1ae-b00c048df943> ;
|
||||
<http://data.vlaanderen.be/ns/besluit#bestuurt> <http://data.lblod.info/id/bestuurseenheden/604d50138929f0e450f629b1caad73733d2a5dc31018edb53e50a5940f4dafe7> .
|
||||
|
||||
<http://data.lblod.info/id/bestuursorganen/903007b0-58bf-11f0-8a90-dda5d31bcff4> rdf:type <http://data.vlaanderen.be/ns/besluit#Bestuursorgaan> ;
|
||||
<http://mu.semte.ch/vocabularies/core/uuid> "903007b0-58bf-11f0-8a90-dda5d31bcff4" ;
|
||||
<https://data.vlaanderen.be/ns/generiek#isTijdspecialisatieVan> <http://data.lblod.info/id/bestuursorganen/8ffdfb30-58bf-11f0-8a90-dda5d31bcff4> ;
|
||||
<http://data.vlaanderen.be/ns/mandaat#bindingStart> "2019-01-01T00:00:00Z"^^xsd:dateTime .
|
||||
|
||||
## Bevoegd beslissingsorgaan
|
||||
<http://data.lblod.info/id/bestuursorganen/900b1a90-58bf-11f0-8a90-dda5d31bcff4> rdf:type <http://data.vlaanderen.be/ns/besluit#Bestuursorgaan> ;
|
||||
<http://mu.semte.ch/vocabularies/core/uuid> "900b1a90-58bf-11f0-8a90-dda5d31bcff4" ;
|
||||
skos:prefLabel "Bevoegd beslissingsorgaan Havenbedrijf Antwerpen" ;
|
||||
<http://www.w3.org/ns/org#classification> <http://data.vlaanderen.be/id/concept/BestuursorgaanClassificatieCode/0dbc70ec-6be9-4997-b8e1-11b6c0542382> ;
|
||||
<http://data.vlaanderen.be/ns/besluit#bestuurt> <http://data.lblod.info/id/bestuurseenheden/604d50138929f0e450f629b1caad73733d2a5dc31018edb53e50a5940f4dafe7> .
|
||||
|
||||
<http://data.lblod.info/id/bestuursorganen/90384510-58bf-11f0-8a90-dda5d31bcff4> rdf:type <http://data.vlaanderen.be/ns/besluit#Bestuursorgaan> ;
|
||||
<http://mu.semte.ch/vocabularies/core/uuid> "90384510-58bf-11f0-8a90-dda5d31bcff4" ;
|
||||
<https://data.vlaanderen.be/ns/generiek#isTijdspecialisatieVan> <http://data.lblod.info/id/bestuursorganen/900b1a90-58bf-11f0-8a90-dda5d31bcff4> ;
|
||||
<http://data.vlaanderen.be/ns/mandaat#bindingStart> "2019-01-01T00:00:00Z"^^xsd:dateTime .
|
||||
|
||||
## Algemene vergadering
|
||||
<http://data.lblod.info/id/bestuursorganen/901812e0-58bf-11f0-8a90-dda5d31bcff4> rdf:type <http://data.vlaanderen.be/ns/besluit#Bestuursorgaan> ;
|
||||
<http://mu.semte.ch/vocabularies/core/uuid> "901812e0-58bf-11f0-8a90-dda5d31bcff4" ;
|
||||
skos:prefLabel "Algemene vergadering Havenbedrijf Antwerpen" ;
|
||||
<http://www.w3.org/ns/org#classification> <http://data.vlaanderen.be/id/concept/BestuursorgaanClassificatieCode/b52094ff-21a2-4da8-8dbe-f513365d1528> ;
|
||||
<http://data.vlaanderen.be/ns/besluit#bestuurt> <http://data.lblod.info/id/bestuurseenheden/604d50138929f0e450f629b1caad73733d2a5dc31018edb53e50a5940f4dafe7> .
|
||||
|
||||
<http://data.lblod.info/id/bestuursorganen/903c3cb0-58bf-11f0-8a90-dda5d31bcff4> rdf:type <http://data.vlaanderen.be/ns/besluit#Bestuursorgaan> ;
|
||||
<http://mu.semte.ch/vocabularies/core/uuid> "903c3cb0-58bf-11f0-8a90-dda5d31bcff4" ;
|
||||
<https://data.vlaanderen.be/ns/generiek#isTijdspecialisatieVan> <http://data.lblod.info/id/bestuursorganen/901812e0-58bf-11f0-8a90-dda5d31bcff4> ;
|
||||
<http://data.vlaanderen.be/ns/mandaat#bindingStart> "2019-01-01T00:00:00Z"^^xsd:dateTime .
|
||||
|
||||
## Leidend Ambtenaar
|
||||
<http://data.lblod.info/id/bestuursorganen/90230f60-58bf-11f0-8a90-dda5d31bcff4> rdf:type <http://data.vlaanderen.be/ns/besluit#Bestuursorgaan> ;
|
||||
<http://mu.semte.ch/vocabularies/core/uuid> "90230f60-58bf-11f0-8a90-dda5d31bcff4" ;
|
||||
skos:prefLabel "Leidend Ambtenaar Havenbedrijf Antwerpen" ;
|
||||
<http://www.w3.org/ns/org#classification> <http://data.vlaanderen.be/id/concept/BestuursorgaanClassificatieCode/41caf7e6-b040-4720-9cc2-a96cfffed5b4> ;
|
||||
<http://data.vlaanderen.be/ns/besluit#bestuurt> <http://data.lblod.info/id/bestuurseenheden/604d50138929f0e450f629b1caad73733d2a5dc31018edb53e50a5940f4dafe7> .
|
||||
|
||||
<http://data.lblod.info/id/bestuursorganen/90427e40-58bf-11f0-8a90-dda5d31bcff4> rdf:type <http://data.vlaanderen.be/ns/besluit#Bestuursorgaan> ;
|
||||
<http://mu.semte.ch/vocabularies/core/uuid> "90427e40-58bf-11f0-8a90-dda5d31bcff4" ;
|
||||
<http://data.lblod.info/vocabularies/leidinggevenden/heeftBestuursfunctie> <http://data.lblod.info/id/bestuursfuncties/904a6d80-58bf-11f0-8a90-dda5d31bcff4> ;
|
||||
<https://data.vlaanderen.be/ns/generiek#isTijdspecialisatieVan> <http://data.lblod.info/id/bestuursorganen/90230f60-58bf-11f0-8a90-dda5d31bcff4> ;
|
||||
<http://data.vlaanderen.be/ns/mandaat#bindingStart> "2019-01-01T00:00:00Z"^^xsd:dateTime .
|
||||
|
||||
|
||||
# Related organisations
|
||||
<http://data.lblod.info/id/lidmaatschap/6867A956D4D5D97D41D25646> rdf:type <http://www.w3.org/ns/org#Membership> ;
|
||||
<http://www.w3.org/ns/org#organization> <http://data.lblod.info/id/bestuurseenheden/604d50138929f0e450f629b1caad73733d2a5dc31018edb53e50a5940f4dafe7> ;
|
||||
<http://mu.semte.ch/vocabularies/core/uuid> "6867A956D4D5D97D41D25646" ;
|
||||
<http://www.w3.org/ns/org#member> <http://data.lblod.info/id/bestuurseenheden/670db1d66c0de3b931962e1044033ccfa9d6e3023aa9828a5f252c3bc69bd32c> ;
|
||||
<http://www.w3.org/ns/org#role> <http://data.lblod.info/id/rollen/73d5e1cf250d42fab15926771f07505a> .
|
||||
|
||||
<http://data.lblod.info/id/lidmaatschap/6867A956D4D5D97D41D25647> rdf:type <http://www.w3.org/ns/org#Membership> ;
|
||||
<http://www.w3.org/ns/org#organization> <http://data.lblod.info/id/bestuurseenheden/604d50138929f0e450f629b1caad73733d2a5dc31018edb53e50a5940f4dafe7> ;
|
||||
<http://mu.semte.ch/vocabularies/core/uuid> "6867A956D4D5D97D41D25647" ;
|
||||
<http://www.w3.org/ns/org#member> <http://data.lblod.info/id/bestuurseenheden/bd74ee38a4b1e296821a11729c1f704cf439576c7ab2c910c95b067cf183d923> ;
|
||||
<http://www.w3.org/ns/org#role> <http://data.lblod.info/id/rollen/4ec7d5c39bdc4e84b4174379b9e22ad8> .
|
||||
@@ -0,0 +1,26 @@
|
||||
PREFIX org: <http://www.w3.org/ns/org#>
|
||||
PREFIX dcterms: <http://purl.org/dc/terms/>
|
||||
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
|
||||
|
||||
DELETE {
|
||||
GRAPH ?g {
|
||||
?s dcterms:date ?oldDate .
|
||||
}
|
||||
}
|
||||
INSERT {
|
||||
GRAPH ?g {
|
||||
?s dcterms:date ?newDate .
|
||||
}
|
||||
}
|
||||
WHERE {
|
||||
GRAPH ?g {
|
||||
?s a org:ChangeEvent ;
|
||||
dcterms:date ?oldDate .
|
||||
FILTER(DATATYPE(?oldDate) != xsd:date)
|
||||
FILTER(?g IN (
|
||||
<http://mu.semte.ch/graphs/administrative-unit>,
|
||||
<http://mu.semte.ch/graphs/worship-service>
|
||||
))
|
||||
BIND(STRDT(SUBSTR(STR(?oldDate), 1, 10), xsd:date) AS ?newDate)
|
||||
}
|
||||
}
|
||||
@@ -1,30 +1,25 @@
|
||||
import { generateReportFromData, batchedQuery } from '../helpers.js';
|
||||
import { PREFIXES } from './utils'
|
||||
import { generateReportFromData, batchedQuery } from "../helpers.js";
|
||||
import { PREFIXES } from "./utils";
|
||||
|
||||
export default {
|
||||
cronPattern: '0 00 23 * * *',
|
||||
name: 'organizations',
|
||||
cronPattern: "0 00 23 * * *",
|
||||
name: "organizations",
|
||||
execute: async () => {
|
||||
const reportData = {
|
||||
title: 'organizations',
|
||||
description: 'List of the Organizations',
|
||||
filePrefix: 'exports/organizations'
|
||||
title: "organizations",
|
||||
description: "List of the Organizations",
|
||||
filePrefix: "exports/organizations",
|
||||
};
|
||||
|
||||
console.log('Generating organizations report');
|
||||
console.log("Generating organizations report");
|
||||
|
||||
const queryStringPart1 = `
|
||||
${PREFIXES}
|
||||
|
||||
SELECT DISTINCT ?bestuur ?label ?classification ?typeEredienst
|
||||
WHERE {
|
||||
VALUES ?type {
|
||||
org:Organization
|
||||
besluit:Bestuurseenheid
|
||||
}
|
||||
|
||||
GRAPH ?g {
|
||||
?bestuur a ?type .
|
||||
?bestuur a org:Organization .
|
||||
OPTIONAL { ?bestuur skos:prefLabel ?label. }
|
||||
}
|
||||
|
||||
@@ -44,12 +39,12 @@ export default {
|
||||
|
||||
const queryResponsePart1 = await batchedQuery(queryStringPart1);
|
||||
|
||||
const dataPart1 = queryResponsePart1.results.bindings.reduce( (acc, row) => {
|
||||
acc[getSafeValue(row, 'bestuur')] = {
|
||||
bestuur: getSafeValue(row, 'bestuur'),
|
||||
label: getSafeValue(row, 'label'),
|
||||
classification: getSafeValue(row, 'classification'),
|
||||
typeEredienst: getSafeValue(row, 'typeEredienst'),
|
||||
const dataPart1 = queryResponsePart1.results.bindings.reduce((acc, row) => {
|
||||
acc[getSafeValue(row, "bestuur")] = {
|
||||
bestuur: getSafeValue(row, "bestuur"),
|
||||
label: getSafeValue(row, "label"),
|
||||
classification: getSafeValue(row, "classification"),
|
||||
typeEredienst: getSafeValue(row, "typeEredienst"),
|
||||
};
|
||||
return acc;
|
||||
}, {});
|
||||
@@ -59,17 +54,12 @@ export default {
|
||||
|
||||
SELECT DISTINCT ?bestuur ?provincie
|
||||
WHERE {
|
||||
VALUES ?type {
|
||||
org:Organization
|
||||
besluit:Bestuurseenheid
|
||||
}
|
||||
|
||||
GRAPH ?g {
|
||||
?bestuur a ?type .
|
||||
?bestuur a org:Organization .
|
||||
}
|
||||
|
||||
GRAPH ?h {
|
||||
OPTIONAL {
|
||||
OPTIONAL {
|
||||
GRAPH ?h {
|
||||
?bestuur org:hasPrimarySite ?primarySite.
|
||||
|
||||
OPTIONAL {
|
||||
@@ -77,35 +67,37 @@ export default {
|
||||
OPTIONAL { ?sa locn:adminUnitL2 ?provincie. }
|
||||
}
|
||||
}
|
||||
FILTER (?h IN ( <http://mu.semte.ch/graphs/administrative-unit>, <http://mu.semte.ch/graphs/worship-service> ))
|
||||
}
|
||||
|
||||
FILTER (?g IN ( <http://mu.semte.ch/graphs/administrative-unit>, <http://mu.semte.ch/graphs/worship-service>, <http://mu.semte.ch/graphs/shared>))
|
||||
FILTER (?h IN ( <http://mu.semte.ch/graphs/administrative-unit>, <http://mu.semte.ch/graphs/worship-service>, <http://mu.semte.ch/graphs/shared>))
|
||||
|
||||
}
|
||||
`;
|
||||
|
||||
const queryResponsePart2 = await batchedQuery(queryStringPart2);
|
||||
const dataPart2 = queryResponsePart2.results.bindings.reduce( (acc, row) => {
|
||||
const dataPart2 = queryResponsePart2.results.bindings.reduce((acc, row) => {
|
||||
let dataPart = {
|
||||
bestuur: getSafeValue(row, 'bestuur'),
|
||||
provincie: getSafeValue(row, 'provincie')
|
||||
bestuur: getSafeValue(row, "bestuur"),
|
||||
provincie: getSafeValue(row, "provincie"),
|
||||
};
|
||||
|
||||
acc[getSafeValue(row, 'bestuur')] = Object.assign(dataPart, dataPart1[getSafeValue(row, 'bestuur')]);
|
||||
acc[getSafeValue(row, "bestuur")] = Object.assign(
|
||||
dataPart,
|
||||
dataPart1[getSafeValue(row, "bestuur")],
|
||||
);
|
||||
return acc;
|
||||
}, {});
|
||||
|
||||
await generateReportFromData(Object.values(dataPart2), [
|
||||
'bestuur',
|
||||
'label',
|
||||
'classification',
|
||||
'typeEredienst',
|
||||
'provincie'
|
||||
], reportData);
|
||||
}
|
||||
await generateReportFromData(
|
||||
Object.values(dataPart2),
|
||||
["bestuur", "label", "classification", "typeEredienst", "provincie"],
|
||||
reportData,
|
||||
);
|
||||
},
|
||||
};
|
||||
|
||||
function getSafeValue(entry, property){
|
||||
function getSafeValue(entry, property) {
|
||||
return entry[property] ? wrapInQuote(entry[property].value) : null;
|
||||
}
|
||||
|
||||
|
||||
@@ -469,6 +469,7 @@
|
||||
"inverse": true
|
||||
}
|
||||
},
|
||||
"features": ["include-uri"],
|
||||
"new-resource-base": "http://data.lblod.info/id/organisaties/"
|
||||
},
|
||||
"administrative-units": {
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
version: "3.4"
|
||||
|
||||
services:
|
||||
identifier:
|
||||
restart: "no"
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
version: "3.4"
|
||||
|
||||
x-logging: &default-logging
|
||||
driver: "json-file"
|
||||
options:
|
||||
@@ -116,7 +114,7 @@ services:
|
||||
restart: always
|
||||
logging: *default-logging
|
||||
deltanotifier:
|
||||
image: cecemel/delta-notifier:0.2.0-beta.2
|
||||
image: semtech/mu-delta-notifier:0.4.0
|
||||
volumes:
|
||||
- ./config/delta:/config
|
||||
labels:
|
||||
@@ -196,7 +194,7 @@ services:
|
||||
restart: always
|
||||
logging: *default-logging
|
||||
frontend:
|
||||
image: lblod/frontend-organization-portal:1.30.0
|
||||
image: lblod/frontend-organization-portal:1.33.0
|
||||
volumes:
|
||||
- ./config/frontend/add-x-frame-options-header.conf:/config/add-x-frame-options.conf
|
||||
environment:
|
||||
@@ -288,7 +286,7 @@ services:
|
||||
restart: always
|
||||
logging: *default-logging
|
||||
report-generation:
|
||||
image: lblod/loket-report-generation-service:0.7.0
|
||||
image: lblod/loket-report-generation-service:0.8.3
|
||||
environment:
|
||||
DEFAULT_GRAPH: "http://mu.semte.ch/graphs/shared"
|
||||
ONLY_KEEP_LATEST_REPORT: "true"
|
||||
@@ -312,7 +310,7 @@ services:
|
||||
restart: always
|
||||
logging: *default-logging
|
||||
kbo-data-sync:
|
||||
image: lblod/sync-wegwijs-organization-service:2.0.2
|
||||
image: lblod/sync-wegwijs-organization-service:2.0.3
|
||||
links:
|
||||
- db:database
|
||||
labels:
|
||||
|
||||
@@ -1,6 +1,22 @@
|
||||
{
|
||||
"version": "0.1",
|
||||
"scripts": [
|
||||
{
|
||||
"documentation": {
|
||||
"command": "create-export",
|
||||
"description": "create export of administrative units and their bodies",
|
||||
"arguments": []
|
||||
},
|
||||
"environment": {
|
||||
"image": "nvdk/ruby-semantic-works-cli",
|
||||
"interactive": true,
|
||||
"script": "export/run.rb",
|
||||
"join_networks": true
|
||||
},
|
||||
"mounts": {
|
||||
"app": "/app/"
|
||||
}
|
||||
},
|
||||
{
|
||||
"documentation": {
|
||||
"command": "mu-search-delta",
|
||||
|
||||
22
scripts/project/export/enrichment.owl
Normal file
22
scripts/project/export/enrichment.owl
Normal file
@@ -0,0 +1,22 @@
|
||||
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
|
||||
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
|
||||
@prefix owl: <http://www.w3.org/2002/07/owl#> .
|
||||
@prefix generiek: <https://data.vlaanderen.be/ns/generiek#> .
|
||||
@prefix mandaat: <http://data.vlaanderen.be/ns/mandaat#> .
|
||||
@prefix org: <http://www.w3.org/ns/org#> .
|
||||
@prefix besluit: <http://data.vlaanderen.be/ns/besluit#> .
|
||||
@prefix ere: <http://data.lblod.info/vocabularies/erediensten/> .
|
||||
|
||||
<http://lblod.data.gift/mappings.owl> a owl:Ontology .
|
||||
|
||||
# Equivalent Properties
|
||||
generiek:isTijdspecialisatieVan owl:equivalentProperty
|
||||
<http://data.vlaanderen.be/ns/generiek#isTijdspecialisatieVan>,
|
||||
mandaat:isTijdspecialisatieVan .
|
||||
org:classification owl:equivalentProperty besluit:classificatie .
|
||||
generiek:gestructureerdeIdentificator owl:equivalentProperty <http://data.vlaanderen.be/ns/generiek#gestructureerdeIdentificator>.
|
||||
|
||||
# Subclass mappings
|
||||
ere:BestuurVanDeEredienst rdfs:subClassOf besluit:Bestuurseenheid .
|
||||
ere:CentraalBestuurVanDeEredienst rdfs:subClassOf besluit:Bestuurseenheid .
|
||||
ere:RepresentatiefOrgaan rdfs:subClassOf besluit:Bestuurseenheid.
|
||||
358
scripts/project/export/run.rb
Executable file
358
scripts/project/export/run.rb
Executable file
@@ -0,0 +1,358 @@
|
||||
#!/usr/bin/env ruby
|
||||
|
||||
require 'bundler/inline'
|
||||
require 'yaml'
|
||||
require 'securerandom'
|
||||
require 'date'
|
||||
require 'rdf/vocab'
|
||||
require 'tty-prompt'
|
||||
require 'rdf/turtle'
|
||||
require 'rdf/reasoner'
|
||||
|
||||
$stdout.sync = true
|
||||
ENV['LOG_SPARQL_ALL']='false'
|
||||
ENV['MU_SPARQL_ENDPOINT']='http://triplestore:8890/sparql'
|
||||
ENV['MU_SPARQL_TIMEOUT']='180'
|
||||
require 'mu/auth-sudo'
|
||||
|
||||
|
||||
|
||||
def sparql_escape_uri(value)
|
||||
'<' + value.to_s.gsub(/[\\"<>]/) { |s| '\\' + s } + '>'
|
||||
end
|
||||
|
||||
def sparql_escape_string(str)
|
||||
'"""' + str.gsub(/[\\"]/) { |s| '\\' + s } + '"""'
|
||||
end
|
||||
|
||||
def search_classifications
|
||||
query = <<~EOF
|
||||
PREFIX org: <http://www.w3.org/ns/org#>
|
||||
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
|
||||
PREFIX besluit: <http://data.vlaanderen.be/ns/besluit#>
|
||||
SELECT DISTINCT ?type ?name ?classification WHERE {
|
||||
?org a ?type;
|
||||
org:classification ?classification.
|
||||
?classification skos:prefLabel ?name.
|
||||
VALUES ?type { besluit:Bestuurseenheid }
|
||||
} ORDER BY ?name
|
||||
EOF
|
||||
Mu::AuthSudo.query(query)
|
||||
end
|
||||
|
||||
def get_admin_units(classifications)
|
||||
query = <<~EOF
|
||||
PREFIX org: <http://www.w3.org/ns/org#>
|
||||
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
|
||||
PREFIX besluit: <http://data.vlaanderen.be/ns/besluit#>
|
||||
SELECT DISTINCT ?org ?name WHERE {
|
||||
?org a ?type;
|
||||
skos:prefLabel ?name;
|
||||
org:classification ?classification.
|
||||
VALUES ?type { besluit:Bestuurseenheid }
|
||||
VALUES ?classification { #{classifications.map{ |c| sparql_escape_uri(c) }.join(" ")}}
|
||||
}
|
||||
EOF
|
||||
Mu::AuthSudo.query(query)
|
||||
end
|
||||
|
||||
def export_admin_unit(unit)
|
||||
repository = RDF::Repository.new
|
||||
query = <<~EOF
|
||||
PREFIX org: <http://www.w3.org/ns/org#>
|
||||
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
|
||||
PREFIX besluit: <http://data.vlaanderen.be/ns/besluit#>
|
||||
PREFIX generiek: <https://data.vlaanderen.be/ns/generiek#>
|
||||
CONSTRUCT {
|
||||
?org ?p ?o
|
||||
}
|
||||
WHERE {
|
||||
VALUES ?org { #{sparql_escape_uri(unit)}}
|
||||
?org ?p ?o.
|
||||
VALUES ?p {
|
||||
rdf:type
|
||||
org:classification
|
||||
besluit:classificatie
|
||||
skos:prefLabel
|
||||
<http://mu.semte.ch/vocabularies/core/uuid>
|
||||
<http://www.w3.org/ns/regorg#orgStatus>
|
||||
<http://data.lblod.info/vocabularies/erediensten/betrokkenBestuur>
|
||||
}
|
||||
}
|
||||
EOF
|
||||
repository << Mu::AuthSudo.query(query)
|
||||
query = <<~EOF
|
||||
PREFIX org: <http://www.w3.org/ns/org#>
|
||||
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
|
||||
PREFIX besluit: <http://data.vlaanderen.be/ns/besluit#>
|
||||
PREFIX generiek: <https://data.vlaanderen.be/ns/generiek#>
|
||||
CONSTRUCT {
|
||||
?org <http://www.w3.org/ns/adms#identifier> ?id.
|
||||
?id ?p ?o.
|
||||
?id skos:notation ?localId.
|
||||
?id <http://www.w3.org/ns/adms#schemaAgency> ?source.
|
||||
}
|
||||
WHERE {
|
||||
VALUES ?org { #{sparql_escape_uri(unit)}}
|
||||
?org <http://www.w3.org/ns/adms#identifier> ?id.
|
||||
?id ?p ?o.
|
||||
FILTER (?p NOT IN(<http://www.w3.org/2004/02/skos/core#notation>, <https://data.vlaanderen.be/ns/generiek#gestructureerdeIdentificator>))
|
||||
?id <http://www.w3.org/2004/02/skos/core#notation> ?source.
|
||||
FILTER(?source != "SharePoint identificator")
|
||||
?id <https://data.vlaanderen.be/ns/generiek#gestructureerdeIdentificator> ?gestructureerdeIdentificator.
|
||||
?gestructureerdeIdentificator <https://data.vlaanderen.be/ns/generiek#lokaleIdentificator> ?localId
|
||||
}
|
||||
EOF
|
||||
repository << Mu::AuthSudo.query(query)
|
||||
query = <<~EOF
|
||||
PREFIX org: <http://www.w3.org/ns/org#>
|
||||
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
|
||||
PREFIX besluit: <http://data.vlaanderen.be/ns/besluit#>
|
||||
PREFIX generiek: <https://data.vlaanderen.be/ns/generiek#>
|
||||
CONSTRUCT {
|
||||
?org besluit:werkingsgebied ?gebied.
|
||||
?gebied ?p ?o.
|
||||
}
|
||||
WHERE {
|
||||
VALUES ?org { #{sparql_escape_uri(unit)}}
|
||||
?org besluit:werkingsgebied ?gebied.
|
||||
?gebied ?p ?o
|
||||
}
|
||||
EOF
|
||||
repository << Mu::AuthSudo.query(query)
|
||||
|
||||
query = <<~EOF
|
||||
PREFIX org: <http://www.w3.org/ns/org#>
|
||||
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
|
||||
PREFIX besluit: <http://data.vlaanderen.be/ns/besluit#>
|
||||
PREFIX generiek: <https://data.vlaanderen.be/ns/generiek#>
|
||||
PREFIX mandaat: <https://data.vlaanderen.be/ns/mandaat#>
|
||||
CONSTRUCT {
|
||||
?bestuursorgaan ?bp ?bo.
|
||||
?bestuursorgaanIntijd generiek:isTijdspecialisatieVan ?bestuursorgaan.
|
||||
?bestuursorgaanIntijd ?bop ?boo.
|
||||
}
|
||||
WHERE {
|
||||
VALUES ?org { #{sparql_escape_uri(unit)}}
|
||||
?bestuursorgaan besluit:bestuurt ?org.
|
||||
?bestuursorgaan ?bp ?bo.
|
||||
values ?tijdspecialisatie {
|
||||
generiek:isTijdspecialisatieVan
|
||||
mandaat:isTijdspecialisatieVan
|
||||
}
|
||||
?bestuursorgaanIntijd ?tijdspecialisatie ?bestuursorgaan.
|
||||
?bestuursorgaanIntijd ?bop ?boo.
|
||||
}
|
||||
|
||||
EOF
|
||||
repository << Mu::AuthSudo.query(query)
|
||||
query = <<~EOF
|
||||
PREFIX org: <http://www.w3.org/ns/org#>
|
||||
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
|
||||
PREFIX besluit: <http://data.vlaanderen.be/ns/besluit#>
|
||||
PREFIX generiek: <https://data.vlaanderen.be/ns/generiek#>
|
||||
CONSTRUCT {
|
||||
?mandaat ?p ?o.
|
||||
?role ?roleP ?roleO.
|
||||
}
|
||||
WHERE {
|
||||
VALUES ?org { #{sparql_escape_uri(unit)}}
|
||||
?bestuursorgaan besluit:bestuurt ?org.
|
||||
?bestuursorgaanIntijd generiek:isTijdspecialisatieVan ?bestuursorgaan.
|
||||
VALUES ?post { org:hasPost <http://data.lblod.info/vocabularies/leidinggevenden/heeftBestuursfunctie>}
|
||||
?bestuursorgaanIntijd ?post ?mandaat.
|
||||
?mandaat ?p ?o.
|
||||
?mandaat org:role ?role.
|
||||
OPTIONAL {
|
||||
?role ?roleP ?roleO.
|
||||
FILTER(!STRSTARTS(STR(?role), "http://data.vlaanderen.be"))
|
||||
}
|
||||
}
|
||||
EOF
|
||||
repository << Mu::AuthSudo.query(query)
|
||||
repository
|
||||
end
|
||||
|
||||
def ensure_dir(path)
|
||||
unless Dir.exist?(path)
|
||||
Dir.mkdir(path)
|
||||
end
|
||||
end
|
||||
|
||||
def sanitize_unix_path(path)
|
||||
# Regular expression to match characters not allowed in Unix paths
|
||||
sanitized_path = path.gsub(/[^a-zA-Z0-9._\-\/]/, '-')
|
||||
sanitized_path
|
||||
end
|
||||
|
||||
|
||||
def enrich_graph(data)
|
||||
RDF::Reasoner.apply(:owl,:rdfs)
|
||||
graph = RDF::Graph.load("./enrichment.owl")
|
||||
graph << clean_up_dates(data)
|
||||
graph.entail!(:subClassOf)
|
||||
graph.entail!(:equivalentProperty)
|
||||
graph
|
||||
end
|
||||
|
||||
DATE_PREDICATES=[
|
||||
RDF::URI("http://data.vlaanderen.be/ns/mandaat#bindingStart"),
|
||||
RDF::URI("http://data.vlaanderen.be/ns/mandaat#bindingEinde"),
|
||||
RDF::URI("https://data.vlaanderen.be/ns/generiek#bindingStart"),
|
||||
RDF::URI("https://data.vlaanderen.be/ns/generiek#bindingEinde")
|
||||
]
|
||||
|
||||
def convert_date_to_datetime(date_literal)
|
||||
begin
|
||||
date = Date.parse(date_literal.to_s)
|
||||
datetime = DateTime.new(date.year, date.month, date.day)
|
||||
RDF::Literal.new(datetime.strftime("%Y-%m-%dT%T"), datatype: RDF::XSD.dateTime)
|
||||
rescue ArgumentError => e
|
||||
puts "Invalid date format for #{date_literal}: #{e.message}"
|
||||
nil
|
||||
end
|
||||
end
|
||||
|
||||
def clean_up_dates(data)
|
||||
clean_data = RDF::Graph.new
|
||||
data.each_statement do |statement|
|
||||
if DATE_PREDICATES.include?(statement.predicate)
|
||||
obj = statement.object
|
||||
if obj.is_a?(RDF::Literal) && obj.datatype == RDF::XSD.date
|
||||
new_object = convert_date_to_datetime(obj)
|
||||
if new_object
|
||||
clean_data << [statement.subject, statement.predicate, new_object] # Add the new statement
|
||||
end
|
||||
elsif obj.is_a?(RDF::Literal) && obj.datatype == RDF::XSD.dateTime
|
||||
clean_data << statement
|
||||
else
|
||||
puts "unexpected value #{obj.inspect}for statement:\n #{statement.inspect}"
|
||||
end
|
||||
else
|
||||
clean_data << statement
|
||||
end
|
||||
end
|
||||
clean_data
|
||||
end
|
||||
|
||||
prompt = TTY::Prompt.new
|
||||
prompt.say("\n\n")
|
||||
prompt.say("This script will help you export administrative units and their respective bodies")
|
||||
options = search_classifications.map do |binding|
|
||||
{name: "#{binding[:name]}", value: binding[:classification]}
|
||||
end
|
||||
|
||||
if options.size > 0
|
||||
classifications = prompt.multi_select("Please select the matching admin unit classifications", options)
|
||||
admin_units = get_admin_units(classifications)
|
||||
prompt.say("found #{admin_units.size} admin units")
|
||||
output_dir = prompt.ask("Provide the directory the exports should be written to?", default: "/app/exports/")
|
||||
ensure_dir(output_dir)
|
||||
admin_units.each do |unit|
|
||||
repo = export_admin_unit(unit[:org])
|
||||
repo = enrich_graph(repo)
|
||||
file_name = sanitize_unix_path(unit[:name].to_s)
|
||||
timestamp=`date +%Y%0m%0d%0H%0M%0S`.strip.to_i
|
||||
path = File.join(output_dir, "#{timestamp}-remove-data-#{file_name}-bestuurseenheid.sparql")
|
||||
File.open(path, 'w') do |file|
|
||||
file.write <<EOF
|
||||
PREFIX besluit: <http://data.vlaanderen.be/ns/besluit#>
|
||||
PREFIX mandaat: <http://data.vlaanderen.be/ns/mandaat#>
|
||||
PREFIX generiek: <https://data.vlaanderen.be/ns/generiek#>
|
||||
PREFIX org: <http://www.w3.org/ns/org#>
|
||||
PREFIX prov: <http://www.w3.org/ns/prov#>
|
||||
DELETE {
|
||||
GRAPH <http://mu.semte.ch/graphs/public> {
|
||||
?id ?p ?o.
|
||||
}
|
||||
} WHERE {
|
||||
GRAPH <http://mu.semte.ch/graphs/public> {
|
||||
<#{unit[:org]}> <http://www.w3.org/ns/adms#identifier> ?id.
|
||||
?id ?p ?o.
|
||||
}
|
||||
};
|
||||
DELETE {
|
||||
GRAPH <http://mu.semte.ch/graphs/public> {
|
||||
?gebied ?p ?o.
|
||||
}
|
||||
} WHERE {
|
||||
GRAPH <http://mu.semte.ch/graphs/public> {
|
||||
<#{unit[:org]}> besluit:werkingsgebied ?gebied.
|
||||
?gebied ?p ?o.
|
||||
}
|
||||
};
|
||||
DELETE WHERE {
|
||||
GRAPH <http://mu.semte.ch/graphs/public> {
|
||||
<#{unit[:org]}> ?p ?o
|
||||
}
|
||||
};
|
||||
EOF
|
||||
end
|
||||
path = File.join(output_dir, "#{timestamp}-remove-data-#{file_name}-bestuursorganen.sparql")
|
||||
File.open(path, 'w') do |file|
|
||||
file.write <<EOF
|
||||
PREFIX besluit: <http://data.vlaanderen.be/ns/besluit#>
|
||||
PREFIX mandaat: <http://data.vlaanderen.be/ns/mandaat#>
|
||||
PREFIX generiek: <https://data.vlaanderen.be/ns/generiek#>
|
||||
PREFIX org: <http://www.w3.org/ns/org#>
|
||||
PREFIX prov: <http://www.w3.org/ns/prov#>
|
||||
DELETE {
|
||||
GRAPH <http://mu.semte.ch/graphs/public> {
|
||||
?mandaat ?p ?o
|
||||
}
|
||||
} WHERE {
|
||||
GRAPH <http://mu.semte.ch/graphs/public> {
|
||||
?bestuursorgaan besluit:bestuurt <#{unit[:org]}> .
|
||||
?bestuursorgaanIntijd mandaat:isTijdspecialisatieVan ?bestuursorgaan.
|
||||
VALUES ?post { org:hasPost <http://data.lblod.info/vocabularies/leidinggevenden/heeftBestuursfunctie>}
|
||||
?bestuursorgaanIntijd ?post ?mandaat.
|
||||
?mandaat ?p ?o.
|
||||
}
|
||||
};
|
||||
DELETE {
|
||||
GRAPH <http://mu.semte.ch/graphs/public> {
|
||||
?mandaat ?p ?o
|
||||
}
|
||||
} WHERE {
|
||||
GRAPH <http://mu.semte.ch/graphs/public> {
|
||||
?bestuursorgaan besluit:bestuurt <#{unit[:org]}> .
|
||||
?bestuursorgaanIntijd mandaat:isTijdspecialisatieVan ?bestuursorgaan.
|
||||
VALUES ?post { org:hasPost <http://data.lblod.info/vocabularies/leidinggevenden/heeftBestuursfunctie>}
|
||||
?bestuursorgaanIntijd ?post ?mandaat.
|
||||
?mandaat ?p ?o.
|
||||
}
|
||||
};
|
||||
DELETE {
|
||||
GRAPH <http://mu.semte.ch/graphs/public> {
|
||||
?bestuursorgaanIntijd ?p ?o
|
||||
}
|
||||
} WHERE {
|
||||
GRAPH <http://mu.semte.ch/graphs/public> {
|
||||
?bestuursorgaan besluit:bestuurt <#{unit[:org]}> .
|
||||
?bestuursorgaanIntijd mandaat:isTijdspecialisatieVan ?bestuursorgaan.
|
||||
VALUES ?post { org:hasPost <http://data.lblod.info/vocabularies/leidinggevenden/heeftBestuursfunctie>}
|
||||
?bestuursorgaanIntijd ?p ?o
|
||||
}
|
||||
};
|
||||
DELETE {
|
||||
GRAPH <http://mu.semte.ch/graphs/public> {
|
||||
?bestuursorgaan ?p ?o
|
||||
}
|
||||
} WHERE {
|
||||
GRAPH <http://mu.semte.ch/graphs/public> {
|
||||
?bestuursorgaan besluit:bestuurt <#{unit[:org]}>; ?p ?o
|
||||
}
|
||||
}
|
||||
EOF
|
||||
end
|
||||
timestamp+=1
|
||||
path = File.join(output_dir, "#{timestamp}-#{SecureRandom.uuid}-#{file_name}.ttl")
|
||||
File.open(path, 'w') do |file|
|
||||
file.write repo.dump(:ttl)
|
||||
end
|
||||
prompt.say("Exported #{repo.size} statements to #{path}")
|
||||
end
|
||||
else
|
||||
abort("No classifications found?")
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user