From c41175cbb104de102aa1eb9dd6301687d0b521fd Mon Sep 17 00:00:00 2001
From: Nordine Bittich <3816305+nbittich@users.noreply.github.com>
Date: Wed, 25 Jan 2023 16:30:35 +0100
Subject: [PATCH 01/48] fix missing governing bodies (#224)
---
...25140612-add-missing-governing-body.sparql | 35 +++++++++++++++++++
1 file changed, 35 insertions(+)
create mode 100644 config/migrations/2023/20230125140612-add-missing-governing-body.sparql
diff --git a/config/migrations/2023/20230125140612-add-missing-governing-body.sparql b/config/migrations/2023/20230125140612-add-missing-governing-body.sparql
new file mode 100644
index 0000000..2eb46bb
--- /dev/null
+++ b/config/migrations/2023/20230125140612-add-missing-governing-body.sparql
@@ -0,0 +1,35 @@
+PREFIX mu:
+PREFIX org:
+PREFIX besluit:
+PREFIX generiek:
+
+# OP-2070
+INSERT DATA {
+ GRAPH {
+
+ a ;
+ mu:uuid "56c71a29-bff0-4b67-804d-2c98fd4bd10f";
+ besluit:bestuurt ;
+ org:classification .
+ a ;
+ mu:uuid "54f16d44-2f2c-45df-83c1-5a9fbe4756ca";
+ generiek:isTijdspecialisatieVan .
+ }
+}
+
+;
+
+# OP-2084
+
+INSERT DATA {
+ GRAPH {
+
+ a ;
+ mu:uuid "1179426b-69d4-4974-8aa2-c4d46a22c9cc";
+ besluit:bestuurt ;
+ org:classification .
+ a ;
+ mu:uuid "b3db6a8d-d6cb-4b78-af87-b80dfda580c7";
+ generiek:isTijdspecialisatieVan .
+ }
+}
From 76cb2ef5473e4966e482d12d3fd239f786172114 Mon Sep 17 00:00:00 2001
From: Nordine Bittich <3816305+nbittich@users.noreply.github.com>
Date: Fri, 27 Jan 2023 15:29:24 +0100
Subject: [PATCH 02/48] migration to delete mandatarissen, and person (#226)
---
...4100000-delete-person-mandatarissen.sparql | 59 +++++++++++++++++++
1 file changed, 59 insertions(+)
create mode 100644 config/migrations/2023/20230124100000-delete-person-mandatarissen.sparql
diff --git a/config/migrations/2023/20230124100000-delete-person-mandatarissen.sparql b/config/migrations/2023/20230124100000-delete-person-mandatarissen.sparql
new file mode 100644
index 0000000..9deef26
--- /dev/null
+++ b/config/migrations/2023/20230124100000-delete-person-mandatarissen.sparql
@@ -0,0 +1,59 @@
+PREFIX mandaat:
+PREFIX schema:
+PREFIX locn:
+PREFIX org:
+
+DELETE {
+ GRAPH {
+ ?mandatarissen ?pMandatarissen ?oMandatarissen .
+ ?mandaat ?pMandaat ?oMandaat .
+ ?person ?pPerson ?oPerson .
+ ?contactPoint ?pContactPoint ?oContactPoint .
+ ?address ?pAddress ?oAddress .
+ }
+} WHERE {
+ GRAPH {
+ VALUES ?mandatarissen {
+ #1
+ #2
+ }
+
+ ?mandatarissen org:holds ?mandaat ;
+ mandaat:isBestuurlijkeAliasVan ?person ;
+ ?pMandatarissen ?oMandatarissen .
+
+ OPTIONAL {
+ ?mandatarissen schema:contactPoint ?contactPoint .
+ OPTIONAL {
+ ?contactPoint locn:address ?address ;
+ ?pContactPoint ?oContactPoint .
+ ?address ?pAddress ?oAddress .
+ }
+ }
+
+ ?person ?pPerson ?oPerson .
+ ?mandaat ?pMandaat ?oMandaat .
+ }
+}
+
+# An associated call to trigger a reindex is:
+
+# curl --location --request POST '172.32.0.21/update' \
+# --header 'Content-Type: application/vnd.api+json' \
+# --data-raw ' [
+# {
+# "deletes": [
+# {
+# "subject": { "type": "uri", "value": "http://data.lblod.info/id/mandatarissen/807a3e07c95fe40962d64695069af946" },
+# "predicate": { "type": "uri", "value": "http://data.vlaanderen.be/ns/mandaat#isBestuurlijkeAliasVan" },
+# "object": { "type": "uri", "value": "http://data.lblod.info/id/personen/620523C451BFC225E4ECFA97" }
+# },
+# {
+# "subject": { "type": "uri", "value": "http://data.lblod.info/id/mandatarissen/40ed3cb19f9fa33e47b39016780dce1d" },
+# "predicate": { "type": "uri", "value": "http://data.vlaanderen.be/ns/mandaat#isBestuurlijkeAliasVan" },
+# "object": { "type": "uri", "value": "http://data.lblod.info/id/personen/620523C451BFC225E4ECFA97" }
+# }
+# ],
+# "inserts": []
+# }
+# ]'
\ No newline at end of file
From d52f121a0bf9038540d6f7b8a809bc1c77de8f0e Mon Sep 17 00:00:00 2001
From: Claire Lovisa
Date: Thu, 19 Jan 2023 17:50:21 +0100
Subject: [PATCH 03/48] Enable local involvements for central worship services
I had to deactivate parts of the cache, causing the frontend to have
very weird behaviours when the data was correct
---
config/authorization/config.ex | 1 +
config/dispatcher/dispatcher.ex | 4 +-
...le-betrokken-lokale-besturen-for-cb.sparql | 19 +
...55023-add-missing-betrokken-besturen.graph | 1 +
...9155023-add-missing-betrokken-besturen.ttl | 3070 +++++++++++++++++
config/resources/domain.json | 18 +-
6 files changed, 3101 insertions(+), 12 deletions(-)
create mode 100644 config/migrations/2023/20230119153244-delete-double-betrokken-lokale-besturen-for-cb.sparql
create mode 100644 config/migrations/2023/20230119155023-add-missing-betrokken-besturen.graph
create mode 100644 config/migrations/2023/20230119155023-add-missing-betrokken-besturen.ttl
diff --git a/config/authorization/config.ex b/config/authorization/config.ex
index f7a758d..e52cb73 100644
--- a/config/authorization/config.ex
+++ b/config/authorization/config.ex
@@ -18,6 +18,7 @@ defmodule Acl.UserGroups.Config do
"https://data.vlaanderen.be/ns/besluitvorming#Beslissingsactiviteit",
"http://data.vlaanderen.be/ns/besluit#Bestuurseenheid",
"http://data.lblod.info/vocabularies/erediensten/BestuurVanDeEredienst",
+ "http://data.lblod.info/vocabularies/erediensten/EredienstBestuurseenheid",
"http://data.vlaanderen.be/ns/besluit#Bestuursorgaan",
"http://data.lblod.info/vocabularies/erediensten/RolBedienaar",
"http://data.lblod.info/vocabularies/erediensten/VoorwaardenBedienaar",
diff --git a/config/dispatcher/dispatcher.ex b/config/dispatcher/dispatcher.ex
index a86c47a..1a8eb1b 100644
--- a/config/dispatcher/dispatcher.ex
+++ b/config/dispatcher/dispatcher.ex
@@ -97,7 +97,7 @@ defmodule Dispatcher do
end
match "/central-worship-services/*path", %{ accept: [:json], layer: :api} do
- Proxy.forward conn, path, "http://cache/central-worship-services/"
+ Proxy.forward conn, path, "http://resource/central-worship-services/"
end
match "/representative-bodies/*path", %{ accept: [:json], layer: :api} do
@@ -113,7 +113,7 @@ defmodule Dispatcher do
end
match "/local-involvements/*path", %{ accept: [:json], layer: :api} do
- Proxy.forward conn, path, "http://cache/local-involvements/"
+ Proxy.forward conn, path, "http://resource/local-involvements/"
end
match "/identifiers/*path", %{ accept: [:json], layer: :api} do
diff --git a/config/migrations/2023/20230119153244-delete-double-betrokken-lokale-besturen-for-cb.sparql b/config/migrations/2023/20230119153244-delete-double-betrokken-lokale-besturen-for-cb.sparql
new file mode 100644
index 0000000..7b1873d
--- /dev/null
+++ b/config/migrations/2023/20230119153244-delete-double-betrokken-lokale-besturen-for-cb.sparql
@@ -0,0 +1,19 @@
+# We already had betrokken lokale besturen entered for some CB.
+# Too keep data aligned with the other applications (Loket, CVP etc), we first flush them
+# before re-adding only the necessary ones
+
+DELETE {
+ GRAPH ?g {
+ ?localInvolvement ?plocalInvolvement ?olocalInvolvement .
+ ?bestuur ?localInvolvement .
+ }
+} WHERE {
+ GRAPH ?g {
+ ?centraalBestuur a .
+
+ ?localInvolvement ?centraalBestuur ;
+ ?plocalInvolvement ?olocalInvolvement .
+
+ ?bestuur ?localInvolvement .
+ }
+}
diff --git a/config/migrations/2023/20230119155023-add-missing-betrokken-besturen.graph b/config/migrations/2023/20230119155023-add-missing-betrokken-besturen.graph
new file mode 100644
index 0000000..7489cd5
--- /dev/null
+++ b/config/migrations/2023/20230119155023-add-missing-betrokken-besturen.graph
@@ -0,0 +1 @@
+http://mu.semte.ch/graphs/organisatieportaal
\ No newline at end of file
diff --git a/config/migrations/2023/20230119155023-add-missing-betrokken-besturen.ttl b/config/migrations/2023/20230119155023-add-missing-betrokken-besturen.ttl
new file mode 100644
index 0000000..a886300
--- /dev/null
+++ b/config/migrations/2023/20230119155023-add-missing-betrokken-besturen.ttl
@@ -0,0 +1,3070 @@
+
+
+ a ;
+ 100;
+ ;
+ "39db6dfe-579c-4c1d-9851-f18547643a33";
+ .
+
+
+ a ;
+ 100;
+ ;
+ "14d5d68e-ac34-4793-8fde-e43569f0c37d";
+ .
+
+
+ a ;
+ 100;
+ ;
+ "54281766-9fce-42be-9c83-b8d1ee171e74";
+ .
+
+
+ a ;
+ 100;
+ ;
+ "c0bcd3a6-517a-4669-a376-c31e3ae6cc17";
+ .
+
+
+ a ;
+ 100;
+ ;
+ "cd8d283b-7e5d-427a-be95-6ff9b87db757";
+ .
+
+
+ a ;
+ 100;
+ ;
+ "86b1eac5-aa95-475c-93df-b9586eb077de";
+ .
+
+
+ a ;
+ 100;
+ ;
+ "15acbee6-a360-43ff-b5cc-fe5dc3bc03ce";
+ .
+
+
+ a ;
+ 100;
+ ;
+ "296eff94-b3cc-473b-abef-5abf68590916";
+ .
+
+
+ a ;
+ 100;
+ ;
+ "bba8e9b3-547d-4f52-88cf-36ba90b0cfd8";
+ .
+
+
+ a ;
+ 100;
+ ;
+ "e2dfa734-ed22-4109-bae1-979575030fbc";
+ .
+
+
+ a ;
+ 100;
+ ;
+ "291d611f-e5e8-4e65-b0d9-4ddd39026ce0";
+ .
+
+
+ a ;
+ 100;
+ ;
+ "34c15ea2-7347-4ad7-a3fe-4c0540e6a00b";
+ .
+
+
+ a ;
+ 100;
+ ;
+ "fcb1b005-226d-4b9a-94ee-25bab1950a52";
+ .
+
+
+ a ;
+ 100;
+ ;
+ "134dec04-7788-49af-b539-1b2a3b7b2f9b";
+ .
+
+
+ a ;
+ 100;
+ ;
+ "8f8d28c9-5776-4bb7-9da5-ca8498d36130";
+ .
+
+
+ a ;
+ 100;
+ ;
+ "91d5cddd-2127-42c4-a14b-9ac09410d35f";
+ .
+
+
+ a ;
+ 100;
+ ;
+ "8609c2af-ab32-4b1d-8166-5a8aa9549145";
+ .
+
+
+ a ;
+ 100;
+ ;
+ "60535a06-07a0-4071-8a1b-f776f7d4d68d";
+ .
+
+
+ a ;
+ 100;
+ ;
+ "a44ea2b7-65df-41ee-a747-7065a7f8df1a";
+ .
+
+
+ a ;
+ 100;
+ ;
+ "339eb0e3-fbb1-4a6d-9284-e4b47c7afb82";
+ .
+
+
+ a ;
+ 100;
+ ;
+ "206dfcd4-a6b2-4b04-b83a-3ef2b7a0d630";
+ .
+
+
+ a ;
+ 100;
+ ;
+ "744e85a0-5217-4f1e-a863-5845f7b19b5a";
+ .
+
+
+ a ;
+ 100;
+ ;
+ "306b56d0-5294-4ee6-bf22-b62cfdda8d32";
+ .
+
+
+ a ;
+ 100;
+ ;
+ "7a4c7098-a524-4c1c-abdd-d674a31df7b1";
+ .
+
+
+ a ;
+ 100;
+ ;
+ "127859a0-41f8-4593-9e65-a0ecdc354bdc";
+ .
+
+
+ a ;
+ 100;
+ ;
+ "ce1026f8-7474-47f2-86bc-80851d14b15b";
+ .
+
+
+ a ;
+ 100;
+ ;
+ "77e4d005-5acc-45f7-ab52-c37cdbd27840";
+ .
+
+
+ a ;
+ 100;
+ ;
+ "0e305e28-e4c8-485a-9d78-4c8a4932108d";
+