From 411d16e33d5788a0b0f55acc2b83d9d4b32dafda Mon Sep 17 00:00:00 2001 From: iurianu Date: Fri, 3 Feb 2023 15:49:53 +0200 Subject: [PATCH] migration to remove dummy worship sewrvice --- ...20230203150000-remove-dummy-worship.sparql | 67 +++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 config/migrations/2023/20230203150000-remove-dummy-worship.sparql diff --git a/config/migrations/2023/20230203150000-remove-dummy-worship.sparql b/config/migrations/2023/20230203150000-remove-dummy-worship.sparql new file mode 100644 index 0000000..0f52eec --- /dev/null +++ b/config/migrations/2023/20230203150000-remove-dummy-worship.sparql @@ -0,0 +1,67 @@ +PREFIX org: +PREFIX adms: +PREFIX generiek: +PREFIX organisatie: + +DELETE { + GRAPH { + ?bestuur ?pbestuur ?obestuur . + ?primarySite ?pprimarySite ?oprimarySite . + ?address ?paddress ?oaddress . + ?contactPoint ?pcontactPoint ?ocontactPoint . + ?identifier ?pidentifier ?oidentifier . + ?structuredIdentifier ?pstructuredIdentifier ?ostructuredIdentifier . + } +} WHERE { + GRAPH { + BIND( as ?bestuur) + + ?bestuur ?pbestuur ?obestuur . + + OPTIONAL { + + ?bestuur org:hasPrimarySite ?primarySite . + + OPTIONAL { + ?primarySite organisatie:bestaatUit ?address . + ?address ?paddress ?oaddress . + } + OPTIONAL { + ?primarySite org:siteAddress ?contactPoint . + ?contactPoint ?pcontactPoint ?ocontactPoint . + } + + ?primarySite ?pprimarySite ?oprimarySite . + + } + OPTIONAL { + + ?bestuur adms:identifier ?identifier . + + OPTIONAL { + ?identifier generiek:gestructureerdeIdentificator ?structuredIdentifier . + ?structuredIdentifier ?pstructuredIdentifier ?ostructuredIdentifier . + } + + ?identifier ?pidentifier ?oidentifier . + + } + } +} + +# The associated call to trigger a reindex is : + +# curl --location --request POST '172.25.0.34/update' \ +# --header 'Content-Type: application/vnd.api+json' \ +# --data-raw ' [ +# { +# "deletes": [ +# { +# "subject": { "type": "uri", "value": "http://data.lblod.info/id/besturenVanDeEredienst/578bf96f86056e2260dc21cee91aa519" }, +# "predicate": { "type": "uri", "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#type" }, +# "object": { "type": "uri", "value": "http://data.vlaanderen.be/ns/besluit#Bestuurseenheid" } +# } +# ], +# "inserts": [] +# } +# ]' \ No newline at end of file