From 9818c0e38e99dcb7244d944f53e7a53f0a44c093 Mon Sep 17 00:00:00 2001 From: Iulian Andriescu Date: Wed, 25 Jan 2023 13:10:36 +0200 Subject: [PATCH] Fix / Change bedienaar roles (#217) migration to change bedienaar roles --- ...0230118155500-modify-bedienaar-role.sparql | 129 ++++++++++++++++++ 1 file changed, 129 insertions(+) create mode 100644 config/migrations/2023/20230118155500-modify-bedienaar-role.sparql diff --git a/config/migrations/2023/20230118155500-modify-bedienaar-role.sparql b/config/migrations/2023/20230118155500-modify-bedienaar-role.sparql new file mode 100644 index 0000000..6d6bad2 --- /dev/null +++ b/config/migrations/2023/20230118155500-modify-bedienaar-role.sparql @@ -0,0 +1,129 @@ +PREFIX org: +PREFIX ere: + +DELETE { + GRAPH ?g { + ?role ere:functie . # Eerste Imam in rang + } +} INSERT { + GRAPH ?g { + ?role ere:functie . # Derde Imam in rang + } +} WHERE { + GRAPH ?g { + VALUES ?rolBedienaar { + # OP-2045 + # OP-2046 + } + ?rolBedienaar org:holds ?role . + ?role ere:functie . + } +} +; +DELETE { + GRAPH ?g { + ?role ere:functie . # Tweede Imam in rang + } +} INSERT { + GRAPH ?g { + ?role ere:functie . # Derde Imam in rang + } +} WHERE { + GRAPH ?g { + org:holds ?role . # OP-2046 + ?role ere:functie . + } +} +; +DELETE { + GRAPH ?g { + ?role ere:functie . # Priester + } +} INSERT { + GRAPH ?g { + ?role ere:functie . # Rector + } +} WHERE { + GRAPH ?g { + VALUES ?rolBedienaar { + # OP-2056 + # OP-2057 + # OP-2060 + } + ?rolBedienaar org:holds ?role . + ?role ere:functie . + } +} + +# The associated call to trigger a reindex is : + +# curl --location --request POST '172.26.0.28/update' \ +# --header 'Content-Type: application/vnd.api+json' \ +# --data-raw ' [ +# { +# "deletes": [ +# { +# "subject": { "type": "uri", "value": "http://data.lblod.info/id/positiesBedienaar/63515D0E8DE5818A7C9F41B5" }, +# "predicate": { "type": "uri", "value": "http://data.lblod.info/vocabularies/erediensten/functie" }, +# "object": { "type": "uri", "value": "http://lblod.data.gift/concepts/e357bc8f4cc3a694fde2239748768a22" } +# }, +# { +# "subject": { "type": "uri", "value": "http://data.lblod.info/id/positiesBedienaar/6332F959036B579F0A26FF38" }, +# "predicate": { "type": "uri", "value": "http://data.lblod.info/vocabularies/erediensten/functie" }, +# "object": { "type": "uri", "value": "http://lblod.data.gift/concepts/e357bc8f4cc3a694fde2239748768a22" } +# }, +# { +# "subject": { "type": "uri", "value": "http://data.lblod.info/id/positiesBedienaar/63515DDE8DE5818A7C9F41BA" }, +# "predicate": { "type": "uri", "value": "http://data.lblod.info/vocabularies/erediensten/functie" }, +# "object": { "type": "uri", "value": "http://lblod.data.gift/concepts/c4a3fd586211b17b06f574885e23f355" } +# }, +# { +# "subject": { "type": "uri", "value": "http://data.lblod.info/id/positiesBedienaar/6308BA29BB4106FB970C4D14" }, +# "predicate": { "type": "uri", "value": "http://data.lblod.info/vocabularies/erediensten/functie" }, +# "object": { "type": "uri", "value": "http://lblod.data.gift/concepts/efbf2ff50b5c4f693f129ac03319c4f2" } +# }, +# { +# "subject": { "type": "uri", "value": "http://data.lblod.info/id/positiesBedienaar/633308FC036B579F0A26FF47" }, +# "predicate": { "type": "uri", "value": "http://data.lblod.info/vocabularies/erediensten/functie" }, +# "object": { "type": "uri", "value": "http://lblod.data.gift/concepts/efbf2ff50b5c4f693f129ac03319c4f2" } +# }, +# { +# "subject": { "type": "uri", "value": "http://data.lblod.info/id/positiesBedienaar/633309B8036B579F0A26FF4C" }, +# "predicate": { "type": "uri", "value": "http://data.lblod.info/vocabularies/erediensten/functie" }, +# "object": { "type": "uri", "value": "http://lblod.data.gift/concepts/efbf2ff50b5c4f693f129ac03319c4f2" } +# } +# ], +# "inserts": [ +# { +# "subject": { "type": "uri", "value": "http://data.lblod.info/id/positiesBedienaar/63515D0E8DE5818A7C9F41B5" }, +# "predicate": { "type": "uri", "value": "http://data.lblod.info/vocabularies/erediensten/functie" }, +# "object": { "type": "uri", "value": "http://lblod.data.gift/concepts/5ebb798bd59c3b48c25116032caa02b7" } +# }, +# { +# "subject": { "type": "uri", "value": "http://data.lblod.info/id/positiesBedienaar/6332F959036B579F0A26FF38" }, +# "predicate": { "type": "uri", "value": "http://data.lblod.info/vocabularies/erediensten/functie" }, +# "object": { "type": "uri", "value": "http://lblod.data.gift/concepts/5ebb798bd59c3b48c25116032caa02b7" } +# }, +# { +# "subject": { "type": "uri", "value": "http://data.lblod.info/id/positiesBedienaar/63515DDE8DE5818A7C9F41BA" }, +# "predicate": { "type": "uri", "value": "http://data.lblod.info/vocabularies/erediensten/functie" }, +# "object": { "type": "uri", "value": "http://lblod.data.gift/concepts/5ebb798bd59c3b48c25116032caa02b7" } +# }, +# { +# "subject": { "type": "uri", "value": "http://data.lblod.info/id/positiesBedienaar/6308BA29BB4106FB970C4D14" }, +# "predicate": { "type": "uri", "value": "http://data.lblod.info/vocabularies/erediensten/functie" }, +# "object": { "type": "uri", "value": "http://lblod.data.gift/concepts/04d3b5325f2ebc5eaf96849519af4254" } +# }, +# { +# "subject": { "type": "uri", "value": "http://data.lblod.info/id/positiesBedienaar/633308FC036B579F0A26FF47" }, +# "predicate": { "type": "uri", "value": "http://data.lblod.info/vocabularies/erediensten/functie" }, +# "object": { "type": "uri", "value": "http://lblod.data.gift/concepts/04d3b5325f2ebc5eaf96849519af4254" } +# }, +# { +# "subject": { "type": "uri", "value": "http://data.lblod.info/id/positiesBedienaar/633309B8036B579F0A26FF4C" }, +# "predicate": { "type": "uri", "value": "http://data.lblod.info/vocabularies/erediensten/functie" }, +# "object": { "type": "uri", "value": "http://lblod.data.gift/concepts/04d3b5325f2ebc5eaf96849519af4254" } +# } +# ] +# } +# ]' \ No newline at end of file