From d52f121a0bf9038540d6f7b8a809bc1c77de8f0e Mon Sep 17 00:00:00 2001 From: Claire Lovisa Date: Thu, 19 Jan 2023 17:50:21 +0100 Subject: [PATCH 01/11] 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"; + . + + + a ; + 100; + ; + "c86dfd33-5286-4981-911a-b14182685c0e"; + . + + + a ; + 100; + ; + "f857ddda-4349-4918-9eb0-7fa95c82f903"; + . + + + a ; + 100; + ; + "d8d2a773-c569-4ac5-b0f4-f67560705124"; + . + + + a ; + 100; + ; + "90a72485-877d-428e-9b7a-41a5e282acf3"; + . + + + a ; + 100; + ; + "a3dba296-e6a9-481c-b708-6c57b04c30e0"; + . + + + a ; + 100; + ; + "2fd9d299-0826-47ab-8a4d-e56247fe703a"; + . + + + a ; + 100; + ; + "04a73cb0-8e64-4609-804d-8d189f3e8ceb"; + . + + + a ; + 100; + ; + "8fe7a0f7-767f-4fd2-94f0-8e4c0c3b529e"; + . + + + a ; + 100; + ; + "7c989a6c-ef15-490c-a972-13b380892fb4"; + . + + + a ; + 100; + ; + "18ad5664-1873-4ef1-8be0-7235f903d4c2"; + . + + + a ; + 100; + ; + "8ebc757c-c4d8-486f-a01c-93e25c72708e"; + . + + + a ; + 100; + ; + "7316fb2f-388b-40f8-b6fa-49a91255d6c4"; + . + + + a ; + 100; + ; + "6018fdd0-5588-4652-935f-72fb9f48a03b"; + . + + + a ; + 100; + ; + "5bbe9ad0-2066-4ae4-b893-301ae1a3c8b8"; + . + + + a ; + 100; + ; + "d2a63b79-a907-4e67-a283-dde537b38eca"; + . + + + a ; + 100; + ; + "8c7ad881-4f96-4beb-b69a-0e4a9ac3048a"; + . + + + a ; + 100; + ; + "ad165bd6-0fb9-43df-8e74-28370f306aed"; + . + + + a ; + 100; + ; + "2b5d3333-d0c0-4d56-9435-fa56b32bba7a"; + . + + + a ; + 100; + ; + "c8a4618d-e6f8-4ed4-8dc0-0a1ebc19edf3"; + . + + + a ; + 100; + ; + "992017f5-247b-4e02-acfd-e9882a336cef"; + . + + + a ; + 100; + ; + "94ee9cd9-350e-4cf4-8037-d84e989b13cd"; + . + + + a ; + 100; + ; + "239249a4-1121-48fa-a4d2-99f57a1a6ffa"; + . + + + a ; + 100; + ; + "565404af-88c0-4005-a976-1fcd2f786e48"; + . + + + a ; + 100; + ; + "787879fb-d398-4cdf-9d3e-31bd3fcde711"; + . + + + a ; + 100; + ; + "13737cc0-59e5-439c-95b0-fddc4352a4dc"; + . + + + a ; + 100; + ; + "ca1146a6-786d-4e67-897a-6f9be3a63f8d"; + . + + + a ; + 100; + ; + "9dbc6857-0647-4e8c-85e9-83042bdc0e5c"; + . + + + a ; + 100; + ; + "f83ee6da-c5c6-48cf-b47a-bd7cde8ef7d1"; + . + + + a ; + 100; + ; + "4219f672-aa0c-4d1e-97b0-ed779d14e390"; + . + + + a ; + 100; + ; + "6798d9cd-f314-4bca-8488-2f376439abdd"; + . + + + a ; + 100; + ; + "428f7bb2-ec40-4ec8-be93-cc1f9cf118c2"; + . + + + a ; + 100; + ; + "64d7773a-810b-4eee-9172-bffaa2946ee1"; + . + + + a ; + 100; + ; + "e088c7f4-b5b4-4f55-9815-43c1be94bd2f"; + . + + + a ; + 100; + ; + "83cff3a2-7ab0-4cb7-b9b1-01f88265817e"; + . + + + a ; + 100; + ; + "d1917ea6-f1c5-41cf-b2af-447f1d370d01"; + . + + + a ; + 100; + ; + "64ae6d76-aa1c-4df7-99d3-4efd9a4320df"; + . + + + a ; + 100; + ; + "570ac453-b6b7-47ea-869e-2047b0f7906e"; + . + + + a ; + 100; + ; + "741ddc80-fdff-432f-895d-484ee3fb035c"; + . + + + a ; + 100; + ; + "f0c82c4c-e50d-4885-a769-3ecd1edd8ee7"; + . + + + a ; + 100; + ; + "dc963735-8bb7-4faa-9c57-c2bcdbc9782a"; + . + + + a ; + 100; + ; + "7a25c32f-e161-43da-af61-133179ff6fdf"; + . + + + a ; + 100; + ; + "25c11629-4084-42f8-94ac-918f3ef6cfd4"; + . + + + a ; + 100; + ; + "61e30f3a-54b2-41fb-b2ff-f96207a98d8c"; + . + + + a ; + 100; + ; + "278ccdf8-5170-4501-9daa-d4a853de40cd"; + . + + + a ; + 100; + ; + "cc97c7ae-8b3f-464d-89c9-30e74abaea79"; + . + + + a ; + 100; + ; + "9a3a5452-e626-4886-9499-d4826e70206c"; + . + + + a ; + 100; + ; + "b7695bf9-8f3e-4a90-b029-230e069fc38e"; + . + + + a ; + 100; + ; + "4ebb7193-400b-4415-9508-4a3af27a029a"; + . + + + a ; + 100; + ; + "31658bc3-3296-4f2f-9e91-0badefc5c790"; + . + + + a ; + 100; + ; + "28246920-b91c-4321-8e10-65c1edc3c7ab"; + . + + + a ; + 100; + ; + "250a4a81-2394-4828-8aa8-3ec6e2625908"; + . + + + a ; + 100; + ; + "868c83a4-bd00-436f-93a8-3fae5f32ccea"; + . + + + a ; + 100; + ; + "baa67736-47f5-4838-a5f0-3b2e50af4ae9"; + . + + + a ; + 100; + ; + "8e0e36f0-99fe-4a4f-af12-b0408163ce21"; + . + + + a ; + 100; + ; + "f5413fe1-5117-473a-8f7f-d9da25e2f5a6"; + . + + + a ; + 100; + ; + "e4455570-25ed-478e-8fa4-be7ecac66c11"; + . + + + a ; + 100; + ; + "50a9a3b9-a9ed-4d94-891d-4d70b8cc1a2a"; + . + + + a ; + 100; + ; + "62bd8d74-c266-4a42-8a43-bf8fb8887bf5"; + . + + + a ; + 100; + ; + "214bc598-39ea-496e-906b-60ec04543b08"; + . + + + a ; + 100; + ; + "49751f48-7076-40ac-8002-b0793aa4aa5d"; + . + + + a ; + 100; + ; + "68c31d29-4373-4215-a9dd-e26b90be567c"; + . + + + a ; + 100; + ; + "d243b200-81a3-43d7-8dbf-df8f89fae3a3"; + . + + + a ; + 100; + ; + "7bcd745d-6fa6-4a57-94ec-5aae6afd05a1"; + . + + + a ; + 100; + ; + "62786f76-4e5d-46df-958f-b45c95e6aa03"; + . + + + a ; + 100; + ; + "3c6efedb-efb6-4aaf-877d-7cbbe3bc9aa3"; + . + + + a ; + 100; + ; + "ed3bebca-9177-4e8c-8e65-27616d334a18"; + . + + + a ; + 100; + ; + "e9c7a18b-197c-401e-8239-14f990c950fa"; + . + + + a ; + 100; + ; + "568e868f-7005-40b9-957c-9e02054b1a80"; + . + + + a ; + 100; + ; + "162a3bc7-ec69-4dd2-b352-6848290f4f7a"; + . + + + a ; + 100; + ; + "12a63c62-dc35-40fa-a9c4-33890fb75b9e"; + . + + + a ; + 100; + ; + "fe93089a-d4c1-4dc7-a774-b3d01decb8c3"; + . + + + a ; + 100; + ; + "35c5df16-5ef4-43bf-97f0-681654a1549e"; + . + + + a ; + 100; + ; + "4ca67124-51c6-4c39-b2c2-76f332d74a90"; + . + + + a ; + 100; + ; + "ba45706a-e24e-4adc-96a1-f6475d9e72a0"; + . + + + a ; + 100; + ; + "a1ffa407-3e09-4c59-8666-41e4d06c93c1"; + . + + + a ; + 100; + ; + "e894ea54-e3f5-497b-b2db-99244d7b8492"; + . + + + a ; + 100; + ; + "b6e810a9-565a-4157-b3bb-dcc88e8e5338"; + . + + + a ; + 100; + ; + "e6b76587-cb8c-4689-9f21-5cfb9f108f9d"; + . + + + a ; + 100; + ; + "9f0c28c3-6859-46b9-ac36-b53efaa333d7"; + . + + + a ; + 100; + ; + "4fb4a21b-74f0-4e98-afb3-62e32c03f793"; + . + + + a ; + 100; + ; + "a11ea4bb-6f42-40b5-948f-2d4645e96b10"; + . + + + a ; + 100; + ; + "aa9f88e5-132b-4bfa-9c5f-b226c6ef44f1"; + . + + + a ; + 100; + ; + "d22dc214-5d35-46a8-85b6-8f0b2793b7eb"; + . + + + a ; + 100; + ; + "79c1a286-69a7-4c6d-bfd9-eb82749fd759"; + . + + + a ; + 100; + ; + "697412fc-de35-41ee-9786-81e62ef25f56"; + . + + + a ; + 100; + ; + "207be3f8-e1fc-46f0-acfb-3e9f9660b344"; + . + + + a ; + 100; + ; + "2ac22503-9450-42c3-82a5-96cab6bd72d4"; + . + + + a ; + 100; + ; + "6572b77d-be77-4c5f-b1fb-473f34ace8ac"; + . + + + a ; + 100; + ; + "dd510104-5352-4a44-962f-0424c960c251"; + . + + + a ; + 100; + ; + "d02b415a-c66c-42b6-a15b-0e5101edf9cc"; + . + + + a ; + 100; + ; + "0632f407-2829-4a17-afb6-5725fbcf80db"; + . + + + a ; + 100; + ; + "f1dcd064-35aa-4d47-a8a9-5f3532e4787f"; + . + + + a ; + 100; + ; + "e7c618b7-f47b-46cd-b081-59839d20398f"; + . + + + a ; + 100; + ; + "ff579e0c-fce9-4855-8a06-ede8de9e9754"; + . + + + a ; + 100; + ; + "eb38cf59-77d6-4fb1-8912-183d90a6affb"; + . + + + a ; + 100; + ; + "87d179f6-7413-4137-bdf6-63ac9d4c16d7"; + . + + + a ; + 100; + ; + "466e8074-bd15-46d7-95e1-02a03527948e"; + . + + + a ; + 100; + ; + "8579babe-cfa9-4dc5-92ed-15044ef5a098"; + . + + + a ; + 100; + ; + "71680486-630e-46a4-8325-37b3026b1385"; + . + + + a ; + 100; + ; + "6417268c-ec01-4873-89d1-7bb777ad1583"; + . + + + a ; + 100; + ; + "64128756-b6c8-4e0b-8fce-df7bbf327c0c"; + . + + + a ; + 100; + ; + "9905d0ad-9ca5-4077-b5b5-452f207b45f7"; + . + + + a ; + 100; + ; + "77e1f4cb-1055-46d1-b052-852bdd79fe68"; + . + + + a ; + 100; + ; + "d19a92da-1ddc-4410-9188-9c3941f41173"; + . + + + a ; + 100; + ; + "e0c8b859-c442-4e0f-8735-160a95ba8ac3"; + . + + + a ; + 100; + ; + "09dede7e-1e6e-4c0a-b0f6-2b3c52291d5b"; + . + + + a ; + 100; + ; + "937533ac-0cb8-4e78-91f7-c23dfee89bb2"; + . + + + a ; + 100; + ; + "f80a6a4c-9b90-42ae-ab5c-8ab9bbfe2724"; + . + + + a ; + 100; + ; + "089cb5a2-8b1c-4c5b-a49e-5a176a0d145a"; + . + + + a ; + 100; + ; + "706b2012-3aba-477e-9c9c-ce47f29e3840"; + . + + + a ; + 100; + ; + "b88e6c3d-21ac-4252-8526-a8fad885002e"; + . + + + a ; + 100; + ; + "3611f01a-6439-4631-9ae1-da38a5ba83f0"; + . + + + a ; + 100; + ; + "f74bebb6-1322-4d3d-b96c-acce0320ae36"; + . + + + a ; + 100; + ; + "d915a89f-703d-49c0-9dc2-7eaf5c419a99"; + . + + + a ; + 100; + ; + "ce3cce03-8a26-4eb2-8b22-887c99dd27b9"; + . + + + a ; + 100; + ; + "213e15a7-e334-4aa3-ad36-8cded8a27157"; + . + + + a ; + 100; + ; + "589e11e6-367b-4649-a15a-ac14ba1c4d8e"; + . + + + a ; + 100; + ; + "9246c603-62b1-4984-a90b-4f1608b600e4"; + . + + + a ; + 100; + ; + "35274e45-b5b6-46b2-afe1-98e0aaff5a58"; + . + + + a ; + 100; + ; + "5fb9cd00-c6b5-49b5-8eb5-381bb8167446"; + . + + + a ; + 100; + ; + "c34307ad-7555-4140-827d-34f49191622a"; + . + + + a ; + 100; + ; + "27a6cb6a-e17b-4f57-96e4-b3ff6f783e5a"; + . + + + a ; + 100; + ; + "128b0d77-a84f-404b-87c7-8a979cbfac44"; + . + + + a ; + 100; + ; + "70e8bbcc-3fec-45fb-855a-f10029468a19"; + . + + + a ; + 100; + ; + "9cba7852-98c8-4e71-b702-4d4057b8f2c5"; + . + + + a ; + 100; + ; + "b0a6cc03-f5d0-4232-89ed-9c9d4a82f211"; + . + + + a ; + 100; + ; + "7ad2d2ad-c003-472d-a9d3-cc0217e8244c"; + . + + + a ; + 100; + ; + "4a062eeb-8a0c-4fee-9d65-95ee2201f2a6"; + . + + + a ; + 100; + ; + "01a80a07-f933-4eb3-ad55-abbce96232f1"; + . + + + a ; + 100; + ; + "b7bbabee-aaea-4380-a6ea-ef80450a5419"; + . + + + a ; + 100; + ; + "50ae7530-3c5c-47c5-a4c3-e867f7b8d913"; + . + + + a ; + 100; + ; + "b91371e9-96fd-40e7-94ac-2dff4b25bf94"; + . + + + a ; + 100; + ; + "8a01e75c-a469-484c-b16a-925066ce84f6"; + . + + + a ; + 100; + ; + "fa7e9864-e350-4183-adb1-c448689fdc10"; + . + + + a ; + 100; + ; + "77bf3b5f-3f68-429a-885e-d88dbfefb3d2"; + . + + + a ; + 100; + ; + "c53d5dba-3877-43fd-9d41-d73b92549174"; + . + + + a ; + 100; + ; + "58808ab5-24a8-413b-80fb-68972c666bdd"; + . + + + a ; + 100; + ; + "3a91c63a-e100-49f8-9385-89c08c87675a"; + . + + + a ; + 100; + ; + "cabaeee7-baa5-453c-85c5-64b797f74734"; + . + + + a ; + 100; + ; + "2a51b7c0-2708-4c9b-9ce8-8eb2c1c16b11"; + . + + + a ; + 100; + ; + "0b24ff63-9e02-4149-b0da-5795de03ae6f"; + . + + + a ; + 100; + ; + "5464eefb-2fb0-4737-9304-466669a5ddc3"; + . + + + a ; + 100; + ; + "047418fa-8aa8-4524-a4a3-65fdde2bd492"; + . + + + a ; + 100; + ; + "b09b6515-5781-48cc-ba0b-2d22e765b432"; + . + + + a ; + 100; + ; + "fadbd6f2-0118-43a8-9eb7-e8d4a91bc8ed"; + . + + + a ; + 100; + ; + "80f91b42-8387-40e3-a57d-682f35b5954d"; + . + + + a ; + 100; + ; + "df27db01-f88c-4c60-988b-74fec112c8b4"; + . + + + a ; + 100; + ; + "81da9158-07fa-44bb-b598-31ad4ac20dc6"; + . + + + a ; + 100; + ; + "bfabc47a-37f0-4ed5-b4ba-70052e83d135"; + . + + + a ; + 100; + ; + "a259314c-5931-4122-bac1-e7f9813cc10c"; + . + + + a ; + 100; + ; + "16243d63-2cfd-42a4-834a-3ccb9a01a2f6"; + . + + + a ; + 100; + ; + "6a929c1b-82e4-4d93-a3fe-d91a75217f46"; + . + + + a ; + 100; + ; + "7ff5d6d2-d991-486a-ad03-2beba2a88f68"; + . + + + a ; + 100; + ; + "28b914fa-0e7d-47e2-99fa-9fa3a409be54"; + . + + + a ; + 100; + ; + "8b4a085c-99a1-4789-b566-b6ad837bcd44"; + . + + + a ; + 100; + ; + "ad535a13-cff6-422b-a083-c827cd77f232"; + . + + + a ; + 100; + ; + "709b701c-573c-42b3-ae08-4db84215308b"; + . + + + a ; + 100; + ; + "cb8b230f-f1e4-4992-981d-e4d0ecf889a3"; + . + + + a ; + 100; + ; + "c345fbfc-ab9b-4211-a032-e41753da5288"; + . + + + a ; + 100; + ; + "9a7efbb9-d5ff-418d-b02e-f9c09d8489f5"; + . + + + a ; + 100; + ; + "d7565813-18f0-4dad-b6b8-41b91947f105"; + . + + + a ; + 100; + ; + "f7054ad2-b4e6-4117-9f8a-d40e03da4ce5"; + . + + + a ; + 100; + ; + "5ec8ca42-4386-4888-a875-f2175106a813"; + . + + + a ; + 100; + ; + "4baf611b-0850-4c92-9dd2-8872c5c4f629"; + . + + + a ; + 100; + ; + "93db383d-b5f2-4bde-bf0e-2d36c5d2efa0"; + . + + + a ; + 100; + ; + "d2398702-63bf-498d-870d-6060cb716bc4"; + . + + + a ; + 100; + ; + "1047d898-f0a3-4f45-ae81-ea8e44e1599d"; + . + + + a ; + 100; + ; + "88a03a37-2ff7-47e5-a79b-9dc6e5b99a50"; + . + + + a ; + 100; + ; + "0206d727-0cf5-4cb7-bc80-9af44cb205e2"; + . + + + a ; + 100; + ; + "9985cafe-8eeb-4ca0-bdea-6f644f1466a1"; + . + + + a ; + 100; + ; + "54958763-5035-4429-a978-2f390c5e2b6f"; + . + + + a ; + 100; + ; + "d09c807b-a88a-452e-8522-ab1192e4c14f"; + . + + + a ; + 100; + ; + "2feff2ed-ea4d-451e-b128-de14e7c2327e"; + . + + + a ; + 100; + ; + "2ed9ac9d-5131-40aa-9881-c23860283973"; + . + + + a ; + 100; + ; + "dfa69fc9-3739-4e65-9d18-1c8fd7721e34"; + . + + + a ; + 100; + ; + "fe97d33f-d6f9-45c4-9526-caac68f2e880"; + . + + + a ; + 100; + ; + "7d22ca2f-1203-4333-bc93-f8e7826dfbf9"; + . + + + a ; + 100; + ; + "935cc3be-c4e1-4b3f-9aaf-c12c2b294b3d"; + . + + + a ; + 100; + ; + "b37752e5-6010-4bde-9528-d75267568b46"; + . + + + a ; + 100; + ; + "fd55d258-10c1-41fc-8158-ebe18ef9a3cf"; + . + + + a ; + 100; + ; + "b02539bd-7de9-4b53-914d-b77a0b70b346"; + . + + + a ; + 100; + ; + "c4ea099a-26b3-4a6c-8d81-6b7985579499"; + . + + + a ; + 100; + ; + "3440173c-27e5-4f0d-8f02-be3b91f605be"; + . + + + a ; + 100; + ; + "c4c82ddf-4cd4-4e82-8976-45987e24c0fe"; + . + + + a ; + 100; + ; + "7f467c15-7ac5-4fc5-92af-83aa20bc920b"; + . + + + a ; + 100; + ; + "ba677230-e9bd-4902-b763-7672e5a3a979"; + . + + + a ; + 100; + ; + "d8dfe222-6a06-4b8c-a925-84bbc1d1cace"; + . + + + a ; + 100; + ; + "efea1be4-8f83-41d3-a3b1-44aa09d1e258"; + . + + + a ; + 100; + ; + "509a0e42-bc30-442f-a872-d39fe8388f33"; + . + + + a ; + 100; + ; + "74abb738-8f89-413b-81b6-bc7f461b278a"; + . + + + a ; + 100; + ; + "bf6ecbe4-7ce3-4711-918f-04f498367d47"; + . + + + a ; + 100; + ; + "78aa54ff-a9ef-47d9-81d0-9266cb8ef940"; + . + + + a ; + 100; + ; + "e2620be3-8f6c-4dee-a0ef-ed02009aa7dc"; + . + + + a ; + 100; + ; + "5ed9eb05-627f-4b28-8ed5-813e4b3dbf38"; + . + + + a ; + 100; + ; + "cb597309-1b3e-41e2-8798-1670b0b3c2ad"; + . + + + a ; + 100; + ; + "a215fa25-a829-48b2-b40c-6edea1494795"; + . + + + a ; + 100; + ; + "a6309fc7-47e5-48a8-882b-2995f54463ad"; + . + + + a ; + 100; + ; + "961861e5-a0a8-4591-b50a-815de0c98136"; + . + + + a ; + 100; + ; + "bf59dce8-dc6d-4cd6-a47a-aebc02e50e5b"; + . + + + a ; + 100; + ; + "0ccd39a1-6007-49d8-b4a3-57b5ec6cfc3b"; + . + + + a ; + 100; + ; + "65771337-68d9-4e12-821f-21e8bb2f3cdf"; + . + + + a ; + 100; + ; + "5890a48a-bff5-4dce-869a-64f386827dc1"; + . + + + a ; + 100; + ; + "4c2744fb-08d7-4be9-8392-d1fdf4664095"; + . + + + a ; + 100; + ; + "5572181b-d91c-4258-828f-372ae64f10e9"; + . + + + a ; + 100; + ; + "1a01900a-a9ce-4d10-87aa-df79e0d529ad"; + . + + + a ; + 100; + ; + "cb39f5f3-ca4e-4d17-b9f2-9cd0b9a5cfdc"; + . + + + a ; + 100; + ; + "e356d500-f70b-4f96-b2aa-030331b3368c"; + . + + + a ; + 100; + ; + "f62426cf-e089-49f3-8222-7e5af777ad0a"; + . + + + a ; + 100; + ; + "af47b89b-a457-43c8-aad3-d0c2f03b097b"; + . + + + a ; + 100; + ; + "e19033b0-8f1e-4f67-b2b4-a293a59f4aab"; + . + + + a ; + 100; + ; + "af5ff968-30f0-48c6-80bd-17c56501ed60"; + . + + + a ; + 100; + ; + "84b30cfb-94c9-419a-8bf7-041a1ab94ac4"; + . + + + a ; + 100; + ; + "b96042b6-bfbb-4187-803d-6661675958c3"; + . + + + a ; + 100; + ; + "0ac22758-7380-46be-b881-cb962acbcc4f"; + . + + + a ; + 100; + ; + "d119dc08-213d-4030-ab98-fdbe796d4667"; + . + + + a ; + 100; + ; + "9fffe76f-9cfb-4e91-8408-d70c4feb75bc"; + . + + + a ; + 100; + ; + "64c9f77a-5078-449e-966d-10de580ae689"; + . + + + a ; + 100; + ; + "be57a498-43d8-4c3a-8a5e-a1dc5f9d1fc3"; + . + + + a ; + 100; + ; + "06d5bcbe-7917-48f8-9e55-3a24a632b627"; + . + + + a ; + 100; + ; + "a242d7d2-ab33-4cb6-8490-22584778764c"; + . + + + a ; + 100; + ; + "714a2f24-e9ba-4219-89ab-49129fba7986"; + . + + + a ; + 100; + ; + "8daf621b-766d-45d0-b071-9ca71bcb4ff5"; + . + + + a ; + 100; + ; + "a8f2b132-4257-422e-9bd0-0f8081311fef"; + . + + + a ; + 100; + ; + "65163706-f40e-4944-9f18-ac0bdc51a368"; + . + + + a ; + 100; + ; + "273f3fe0-fd88-4c20-9674-de1ac7a598f8"; + . + + + a ; + 100; + ; + "f1819db5-b9b5-45a2-9897-3fd3e551e0c3"; + . + + + a ; + 100; + ; + "281edce4-7008-4464-8ad5-18e74b878124"; + . + + + a ; + 100; + ; + "b663f2e9-22c5-4308-82da-668b33efbb2d"; + . + + + a ; + 100; + ; + "fba041d9-1d8b-4c86-8454-6ba72da0db82"; + . + + + a ; + 100; + ; + "c8dc25bf-8622-4f53-a61e-f2a852b8f441"; + . + + + a ; + 100; + ; + "7ec382e1-fb93-4fb8-8a33-35491e963ad1"; + . + + + a ; + 100; + ; + "14c3966b-ab20-4c0d-b61d-04c386072052"; + . + + + a ; + 100; + ; + "3a2fff57-3aca-4278-a7cc-c44ce6504d99"; + . + + + a ; + 100; + ; + "ae1fb5b6-b210-4b1a-81e7-429cfa4c6321"; + . + + + a ; + 100; + ; + "a3b5ba49-7826-4221-afbe-58ea09f7e9ae"; + . + + + a ; + 100; + ; + "a96b574f-354e-45b5-b5c7-323c3686b20f"; + . + + + a ; + 100; + ; + "d7cd7da2-d97c-4496-9ed3-c423a0db4292"; + . + + + a ; + 100; + ; + "c9fd8612-c459-40e7-bff9-de204a9e4733"; + . + + + a ; + 100; + ; + "6462d6a9-604d-4860-a480-06de8ab88488"; + . + + + a ; + 100; + ; + "5d2b4250-0927-4c24-aab7-08ba65a4f56a"; + . + + + a ; + 100; + ; + "cd84600f-5d7a-43c8-b971-8285b67ae173"; + . + + + a ; + 100; + ; + "d7672d1f-893b-496d-ae39-55fa40ab99b6"; + . + + + a ; + 100; + ; + "7a1bc677-2030-48fb-85c3-7633a5c6a0a6"; + . + + + a ; + 100; + ; + "4dd4ef9f-36cd-4a40-a16d-1cd65bbaf3ec"; + . + + + a ; + 100; + ; + "4bdbb2b6-3ce4-41c7-b05a-10867a142668"; + . + + + a ; + 100; + ; + "ec55bfbc-67cd-41d9-8823-3aca1d4c959b"; + . + + + a ; + 100; + ; + "8d13312e-69c3-4284-b371-737b58be2361"; + . + + + a ; + 100; + ; + "3a1038f8-6e42-49b2-9f25-3bab894414f1"; + . + + + a ; + 100; + ; + "4c392c17-bff7-4f24-b288-99e3df00b589"; + . + + + a ; + 100; + ; + "213df356-1b68-45c0-a1db-8feab78aec81"; + . + + + a ; + 100; + ; + "692921a6-2465-47eb-8e04-2c29b49f50de"; + . + + + a ; + 100; + ; + "dcb29e8e-263d-490a-97ef-b312252822d8"; + . + + + a ; + 100; + ; + "4dc96030-88e8-4748-adbf-1aebdc2ea2b3"; + . + + + a ; + 100; + ; + "ad539bb3-f41a-44a9-947f-0dc6ecb29fea"; + . + + + a ; + 100; + ; + "03ddc34f-7990-4bb2-888b-37bce5ce044e"; + . + + + a ; + 100; + ; + "9773c47e-4206-44cd-81ac-a437e080b9d0"; + . + + + a ; + 100; + ; + "637812c3-34c4-4339-8618-bcc2675d83d4"; + . + + + a ; + 100; + ; + "94f23563-6df6-4808-8324-5924c86b4f25"; + . + + + a ; + 100; + ; + "dd898f3b-87e5-432e-9e00-5d0d3fa54b05"; + . + + + a ; + 100; + ; + "849f49cf-bd09-4f88-96ea-e1bd702a94ca"; + . + + + a ; + 100; + ; + "5e40cc59-194b-4b42-b64a-6a53a8cb1152"; + . + + + a ; + 100; + ; + "37b2f71b-c14f-4fa5-ba7d-8a765c87859e"; + . + + + a ; + 100; + ; + "4ba2e1d8-fa5d-4002-9d1b-c168a2a84045"; + . + + + a ; + 100; + ; + "34837fc6-c5f9-424e-8d9e-b9fef8751a8a"; + . + + + a ; + 100; + ; + "aeeed194-f748-4ec1-a2c8-c54e8fd60545"; + . + + + a ; + 100; + ; + "b8d72a74-90c1-4241-8b3f-9df3abb6299b"; + . + + + a ; + 100; + ; + "d5f854b4-0751-4a3a-8f4b-227e3dd8252e"; + . + + + a ; + 100; + ; + "e395419c-b06e-484e-8302-cd2d1011601f"; + . + + + a ; + 100; + ; + "2924cc14-f51c-4692-ae4b-84f886d4daf9"; + . + + + a ; + 100; + ; + "c6e14db2-95da-4189-9d60-051164b5e0b5"; + . + + + a ; + 100; + ; + "9ae6d05c-a9db-429b-8c7c-65367ff00fcb"; + . + + + a ; + 100; + ; + "49d534b3-50ca-41ed-9fea-80cd49f67454"; + . + + + a ; + 100; + ; + "ef6637fa-f831-4c6a-92c7-2f8a1c29e383"; + . + + + a ; + 100; + ; + "7d08085a-3e2a-46ba-9347-8681b8173137"; + . + + + a ; + 100; + ; + "ade9acde-d2e6-4ae3-b733-733d8465e83b"; + . + + + a ; + 100; + ; + "44d35426-24a8-4516-b9bb-6c8b56417e85"; + . + + + a ; + 100; + ; + "2e60a1c4-358c-409f-94ab-cbf817d55569"; + . + + + a ; + 100; + ; + "626974f2-ad28-4a67-a59c-a60cd0c0ab77"; + . + + + a ; + 100; + ; + "a03b1945-3232-4561-b719-78b3e77b366e"; + . + + + a ; + 100; + ; + "40e1c80d-17ab-47ce-ba7c-bfcb39e7cd57"; + . + + + a ; + 100; + ; + "f09f7a20-5c11-4277-902c-851c1f98e031"; + . + + + a ; + 100; + ; + "f28864b3-d734-4c52-bf0c-e6335be2f714"; + . + + + a ; + 100; + ; + "12451bc0-ed31-4c6b-9d1e-0c68ec2d23b5"; + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + , + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + , + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + , + , + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + , + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + , + , + , + , + , + , + , + , + , + . + + + . + + + . + + + . + + + . + + + . + + + . + + + , + , + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + , + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + , + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + , + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + , + . + + + . + + + . + + + . \ No newline at end of file diff --git a/config/resources/domain.json b/config/resources/domain.json index c524da8..6a29794 100644 --- a/config/resources/domain.json +++ b/config/resources/domain.json @@ -492,6 +492,12 @@ "predicate": "ere:wordtBediendDoor", "target": "minister-positions", "cardinality": "many" + }, + "involvements": { + "predicate": "org:organization", + "target": "local-involvements", + "cardinality": "many", + "inverse": true } }, "new-resource-base": "http://data.lblod.info/id/eredienstBestuurseenheden/" @@ -510,14 +516,6 @@ "predicate": "ere:grensoverschrijdend" } }, - "relationships": { - "involvements": { - "predicate": "org:organization", - "target": "local-involvements", - "cardinality": "many", - "inverse": true - } - }, "new-resource-base": "http://data.lblod.info/id/besturenVanDeEredienst/" }, "recognized-worship-types": { @@ -631,9 +629,9 @@ "target": "involvement-types", "cardinality": "one" }, - "worship-service": { + "worship-administrative-unit": { "predicate": "org:organization", - "target": "worship-services", + "target": "worship-administrative-units", "cardinality": "one" }, "administrative-unit": { From 3d749242aab96e1a15748bf4dfe287515fa5838f Mon Sep 17 00:00:00 2001 From: Boris De Vloed Date: Thu, 26 Jan 2023 10:01:44 +0000 Subject: [PATCH 02/11] removed comma --- config/resources/domain.json | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/config/resources/domain.json b/config/resources/domain.json index 6a29794..164d134 100644 --- a/config/resources/domain.json +++ b/config/resources/domain.json @@ -23,7 +23,7 @@ "skos": "http://www.w3.org/2004/02/skos/core#", "euvoc": "http://publications.europa.eu/ontology/euvoc#", "ere": "http://data.lblod.info/vocabularies/erediensten/", - "ch": "http://data.lblod.info/vocabularies/contacthub/", + "ch": "http://data.lblod.info/vocabularies/contacthub/", "code": "http://lblod.data.gift/vocabularies/organisatie/", "ext": "http://mu.semte.ch/vocabularies/ext/", "geo": "http://www.opengis.net/ont/geosparql#" @@ -63,7 +63,7 @@ "target": "agents", "cardinality": "many", "inverse": true - }, + } }, "new-resource-base": "http://data.lblod.info/id/personen/" }, @@ -223,7 +223,7 @@ "type": "string", "predicate": "schema:contactType" } - }, + }, "relationships": { "contact-address": { "predicate": "locn:address", @@ -269,7 +269,7 @@ "type": "datetime", "predicate": "mandaat:einde" } - }, + }, "relationships": { "board-position": { "predicate": "org:holds", @@ -358,7 +358,7 @@ "predicate": "skos:prefLabel" }, "alternative-name": { - "type": "string", + "type": "string", "predicate": "skos:altLabel" } }, @@ -501,7 +501,6 @@ } }, "new-resource-base": "http://data.lblod.info/id/eredienstBestuurseenheden/" - }, "worship-services": { "class": "ere:BestuurVanDeEredienst", @@ -709,7 +708,6 @@ "type": "url", "predicate": "adres:verwijstNaar" } - }, "relationships": { "source": { @@ -836,9 +834,9 @@ "predicate": "ere:voldoetAan", "target": "minister-conditions", "cardinality": "many" - } + } }, - "new-resource-base": "http://data.lblod.info/id/rollenBedienaar/" + "new-resource-base": "http://data.lblod.info/id/rollenBedienaar/" }, "minister-conditions": { "class": "ere:VoorwaardenBedienaar", @@ -966,4 +964,4 @@ "new-resource-base": "http://lblod.data.gift/concepts/" } } -} \ No newline at end of file +} From bb74c522675bfbf2fc8bb628b3e842162f401620 Mon Sep 17 00:00:00 2001 From: Boris De Vloed Date: Thu, 26 Jan 2023 11:01:58 +0000 Subject: [PATCH 03/11] typo in target --- config/resources/domain.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/resources/domain.json b/config/resources/domain.json index 164d134..a763d2a 100644 --- a/config/resources/domain.json +++ b/config/resources/domain.json @@ -108,7 +108,7 @@ }, "organization": { "predicate": "org:postIn", - "target": "organization", + "target": "organizations", "cardinality": "one" }, "agents-in-position": { From 7b8890b1ff878a4e6f0db36146f2fde1db50418d Mon Sep 17 00:00:00 2001 From: Nordine Bittich <3816305+nbittich@users.noreply.github.com> Date: Tue, 31 Jan 2023 11:33:53 +0100 Subject: [PATCH 04/11] mu search delta script (#229) --- config/search-migrations/.gitignore | 1 + config/search-migrations/.gitkeep | 0 docker-compose.yml | 10 ++ scripts/project/config.json | 21 +++ scripts/project/mu-search-delta/.gitignore | 1 + scripts/project/mu-search-delta/README.md | 43 ++++++ scripts/project/mu-search-delta/build.sh | 4 + .../project/mu-search-delta/package-lock.json | 144 ++++++++++++++++++ scripts/project/mu-search-delta/package.json | 14 ++ scripts/project/mu-search-delta/script.mjs | 82 ++++++++++ 10 files changed, 320 insertions(+) create mode 100644 config/search-migrations/.gitignore create mode 100644 config/search-migrations/.gitkeep create mode 100644 scripts/project/config.json create mode 100644 scripts/project/mu-search-delta/.gitignore create mode 100644 scripts/project/mu-search-delta/README.md create mode 100755 scripts/project/mu-search-delta/build.sh create mode 100644 scripts/project/mu-search-delta/package-lock.json create mode 100644 scripts/project/mu-search-delta/package.json create mode 100644 scripts/project/mu-search-delta/script.mjs diff --git a/config/search-migrations/.gitignore b/config/search-migrations/.gitignore new file mode 100644 index 0000000..282b503 --- /dev/null +++ b/config/search-migrations/.gitignore @@ -0,0 +1 @@ +.migration_history diff --git a/config/search-migrations/.gitkeep b/config/search-migrations/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/docker-compose.yml b/docker-compose.yml index 2d3b4f0..ea4f4e7 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -566,3 +566,13 @@ services: image: lblod/error-report-service:0.1.0 links: - db:database + + +################################################################################### +# MU SCRIPTS +# ################################################################################# + project-scripts: + image: semtech/mu-scripts:1.0.0 + volumes: + - ./scripts/project:/app/scripts/ + restart: "no" diff --git a/scripts/project/config.json b/scripts/project/config.json new file mode 100644 index 0000000..2a8ae6f --- /dev/null +++ b/scripts/project/config.json @@ -0,0 +1,21 @@ +{ + "version": "0.1", + "scripts": [ + { + "documentation": { + "command": "mu-search-delta", + "description": "produce delta for mu-search", + "arguments": [] + }, + "environment": { + "image": "node:16", + "interactive": true, + "script": "mu-search-delta/build.sh", + "join_networks": true + }, + "mounts": { + "app": "/data/app/" + } + } + ] +} diff --git a/scripts/project/mu-search-delta/.gitignore b/scripts/project/mu-search-delta/.gitignore new file mode 100644 index 0000000..3c3629e --- /dev/null +++ b/scripts/project/mu-search-delta/.gitignore @@ -0,0 +1 @@ +node_modules diff --git a/scripts/project/mu-search-delta/README.md b/scripts/project/mu-search-delta/README.md new file mode 100644 index 0000000..4c4dc8f --- /dev/null +++ b/scripts/project/mu-search-delta/README.md @@ -0,0 +1,43 @@ +#### Scripts mu-search-delta +* make the script executable: `chmod a+x scripts/project/mu-search-delta/build.sh` +* add your delta messages in json format in `config/search-migrations`, e.g: + ```js + // config/search-migrations/2023/001-delete-bedinaeren.json + [ + { + "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": [] + } + ] + ``` +* make sure virtuoso, mu-auth, elasticsearch & mu search are running +* run `mu script project-scripts mu-search-delta` diff --git a/scripts/project/mu-search-delta/build.sh b/scripts/project/mu-search-delta/build.sh new file mode 100755 index 0000000..ea8e121 --- /dev/null +++ b/scripts/project/mu-search-delta/build.sh @@ -0,0 +1,4 @@ +#!/bin/bash +mkdir -p /data/app/config/search-migrations +npm i +node script.mjs diff --git a/scripts/project/mu-search-delta/package-lock.json b/scripts/project/mu-search-delta/package-lock.json new file mode 100644 index 0000000..98598b8 --- /dev/null +++ b/scripts/project/mu-search-delta/package-lock.json @@ -0,0 +1,144 @@ +{ + "name": "mu-search-delta", + "version": "1.0.0", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "name": "mu-search-delta", + "version": "1.0.0", + "license": "MIT", + "dependencies": { + "node-fetch": "^3.3.0" + } + }, + "node_modules/data-uri-to-buffer": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz", + "integrity": "sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==", + "engines": { + "node": ">= 12" + } + }, + "node_modules/fetch-blob": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/fetch-blob/-/fetch-blob-3.2.0.tgz", + "integrity": "sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/jimmywarting" + }, + { + "type": "paypal", + "url": "https://paypal.me/jimmywarting" + } + ], + "dependencies": { + "node-domexception": "^1.0.0", + "web-streams-polyfill": "^3.0.3" + }, + "engines": { + "node": "^12.20 || >= 14.13" + } + }, + "node_modules/formdata-polyfill": { + "version": "4.0.10", + "resolved": "https://registry.npmjs.org/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz", + "integrity": "sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==", + "dependencies": { + "fetch-blob": "^3.1.2" + }, + "engines": { + "node": ">=12.20.0" + } + }, + "node_modules/node-domexception": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz", + "integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/jimmywarting" + }, + { + "type": "github", + "url": "https://paypal.me/jimmywarting" + } + ], + "engines": { + "node": ">=10.5.0" + } + }, + "node_modules/node-fetch": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.0.tgz", + "integrity": "sha512-BKwRP/O0UvoMKp7GNdwPlObhYGB5DQqwhEDQlNKuoqwVYSxkSZCSbHjnFFmUEtwSKRPU4kNK8PbDYYitwaE3QA==", + "dependencies": { + "data-uri-to-buffer": "^4.0.0", + "fetch-blob": "^3.1.4", + "formdata-polyfill": "^4.0.10" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/node-fetch" + } + }, + "node_modules/web-streams-polyfill": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.2.1.tgz", + "integrity": "sha512-e0MO3wdXWKrLbL0DgGnUV7WHVuw9OUvL4hjgnPkIeEvESk74gAITi5G606JtZPp39cd8HA9VQzCIvA49LpPN5Q==", + "engines": { + "node": ">= 8" + } + } + }, + "dependencies": { + "data-uri-to-buffer": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz", + "integrity": "sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==" + }, + "fetch-blob": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/fetch-blob/-/fetch-blob-3.2.0.tgz", + "integrity": "sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==", + "requires": { + "node-domexception": "^1.0.0", + "web-streams-polyfill": "^3.0.3" + } + }, + "formdata-polyfill": { + "version": "4.0.10", + "resolved": "https://registry.npmjs.org/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz", + "integrity": "sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==", + "requires": { + "fetch-blob": "^3.1.2" + } + }, + "node-domexception": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz", + "integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==" + }, + "node-fetch": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.0.tgz", + "integrity": "sha512-BKwRP/O0UvoMKp7GNdwPlObhYGB5DQqwhEDQlNKuoqwVYSxkSZCSbHjnFFmUEtwSKRPU4kNK8PbDYYitwaE3QA==", + "requires": { + "data-uri-to-buffer": "^4.0.0", + "fetch-blob": "^3.1.4", + "formdata-polyfill": "^4.0.10" + } + }, + "web-streams-polyfill": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.2.1.tgz", + "integrity": "sha512-e0MO3wdXWKrLbL0DgGnUV7WHVuw9OUvL4hjgnPkIeEvESk74gAITi5G606JtZPp39cd8HA9VQzCIvA49LpPN5Q==" + } + } +} diff --git a/scripts/project/mu-search-delta/package.json b/scripts/project/mu-search-delta/package.json new file mode 100644 index 0000000..87120e8 --- /dev/null +++ b/scripts/project/mu-search-delta/package.json @@ -0,0 +1,14 @@ +{ + "name": "mu-search-delta", + "version": "1.0.0", + "description": "", + "main": "script.mjs", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "Nordine Bittich", + "license": "MIT", + "dependencies": { + "node-fetch": "^3.3.0" + } +} diff --git a/scripts/project/mu-search-delta/script.mjs b/scripts/project/mu-search-delta/script.mjs new file mode 100644 index 0000000..1461ebd --- /dev/null +++ b/scripts/project/mu-search-delta/script.mjs @@ -0,0 +1,82 @@ +import fs from 'fs'; +import fetch from 'node-fetch'; +import path from 'path'; + +const CONFIG_PATH = process.env.SEARCH_CONFIG_PATH || '/data/app/config/search-migrations'; +const HISTORY_PATH = process.env.HISTORY_PATH || CONFIG_PATH + '/.migration_history'; +const MU_SEARCH_DELTA_URL = process.env.MU_SEARCH_DELTA_URL || 'http://search/update'; +const SEARCH_MIGRATIONS_DIR = process.env.SEARCH_MIGRATIONS_DIR || CONFIG_PATH; +const CONTENT_TYPE_JSON_API = { 'Content-Type': 'application/vnd.api+json' }; + +function read(fd, len) { + const buff = Buffer.alloc(len), + pos = 0, offset = 0; + fs.readSync(fd, buff, offset, len, pos); + return buff.toString(); +} + +function readDirRecursive(dir, filterHistory = [], filterExtensions = ["json"]) { + const files = fs.readdirSync(dir); + + const resultFiles = []; + + for (const file of files) { + const filePath = path.join(dir, file); + const stat = fs.statSync(filePath); + if (stat.isDirectory()) { + resultFiles.push(...(readDirRecursive(`${dir}/${file}`, filterHistory))); + } else if (filterExtensions.some((ext) => filePath.endsWith(ext)) && !filterHistory.includes(filePath)) { + resultFiles.push({ + time: stat.atimeMs, + file: filePath, + }); + } else { + console.log(`filter file ${filePath}`); + } + } + + return resultFiles.sort((a, b) => a.time - b.time); +} + +// main + +async function main() { + const historyFileDescriptor = fs.openSync(HISTORY_PATH, 'a+'); + const historyFileLen = fs.statSync(HISTORY_PATH).size; + + const history = read(historyFileDescriptor, historyFileLen) + .split(/\r?\n/) + .map((f) => f.trim()) + .filter((f) => f?.length); + + const fileNames = readDirRecursive(SEARCH_MIGRATIONS_DIR, history); + console.log(`processing ${fileNames.length} migration(s)`); + for (const { file } of fileNames) { + console.log(`Current file: ${file}`); + const payload = fs.readFileSync(file); + + try { + JSON.parse(payload); + } catch (e) { + console.error("Verify your migration. Exit..."); + process.exit(1); + } + + const r = await fetch(MU_SEARCH_DELTA_URL, { + method: "post", + body: payload, + headers: CONTENT_TYPE_JSON_API, + }); + console.log(`"[Delta]=> Status: ${r.status} `); + if (r.status == 200) { + const responseBody = await r.json(); + console.log(`response ${JSON.stringify(responseBody)}`); + fs.appendFileSync(HISTORY_PATH, file + '\n'); + } else { + console.error("an error occurred. check your migration, make sure mu search is running."); + process.exit(1); + } + } +} + +main().then(() => console.log("Done.")); From 2958262abfd4cb0d8aa898d648a78c4f71355457 Mon Sep 17 00:00:00 2001 From: iurianu Date: Thu, 2 Feb 2023 13:08:03 +0200 Subject: [PATCH 05/11] migration to delete mandatarissen --- ...20230202100000-delete-mandatarissen.sparql | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 config/migrations/2023/20230202100000-delete-mandatarissen.sparql diff --git a/config/migrations/2023/20230202100000-delete-mandatarissen.sparql b/config/migrations/2023/20230202100000-delete-mandatarissen.sparql new file mode 100644 index 0000000..9a13573 --- /dev/null +++ b/config/migrations/2023/20230202100000-delete-mandatarissen.sparql @@ -0,0 +1,37 @@ +PREFIX org: +PREFIX locn: +PREFIX schema: + +DELETE { + GRAPH { + + ?mandatarissen ?pMandatarissen ?oMandatarissen . + ?mandaat ?pMandaat ?oMandaat . + ?contactPoint ?pContactPoint ?oContactPoint . + ?address ?pAddress ?oAddress . + + } +} +WHERE { + GRAPH { + + VALUES ?mandatarissen { + + + } + + ?mandatarissen org:holds ?mandaat ; + ?pMandatarissen ?oMandatarissen . + ?mandaat ?pMandaat ?oMandaat . + + OPTIONAL { + ?mandatarissen schema:contactPoint ?contactPoint . + OPTIONAL { + ?contactPoint locn:address ?address ; + ?pContactPoint ?oContactPoint . + ?address ?pAddress ?oAddress . + } + } + + } +} \ No newline at end of file From e30e93e00e39a9daf54e49fcbbb677db29a81943 Mon Sep 17 00:00:00 2001 From: Boris De Vloed Date: Thu, 2 Feb 2023 15:59:27 +0100 Subject: [PATCH 06/11] Change to delete secondary contact point --- .../2023/20230202100000-delete-mandatarissen.sparql | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/config/migrations/2023/20230202100000-delete-mandatarissen.sparql b/config/migrations/2023/20230202100000-delete-mandatarissen.sparql index 9a13573..dbf88aa 100644 --- a/config/migrations/2023/20230202100000-delete-mandatarissen.sparql +++ b/config/migrations/2023/20230202100000-delete-mandatarissen.sparql @@ -3,7 +3,7 @@ PREFIX locn: PREFIX schema: DELETE { - GRAPH { + GRAPH { ?mandatarissen ?pMandatarissen ?oMandatarissen . ?mandaat ?pMandaat ?oMandaat . @@ -11,9 +11,9 @@ DELETE { ?address ?pAddress ?oAddress . } -} +} WHERE { - GRAPH { + GRAPH { VALUES ?mandatarissen { @@ -26,12 +26,11 @@ WHERE { OPTIONAL { ?mandatarissen schema:contactPoint ?contactPoint . + ?contactPoint ?pContactPoint ?oContactPoint. OPTIONAL { - ?contactPoint locn:address ?address ; - ?pContactPoint ?oContactPoint . + ?contactPoint locn:address ?address . ?address ?pAddress ?oAddress . } } - - } + } } \ No newline at end of file From 1767eff19b44cb6faab9556d366ad2e37d0052e2 Mon Sep 17 00:00:00 2001 From: Boris De Vloed Date: Thu, 2 Feb 2023 16:18:20 +0100 Subject: [PATCH 07/11] Do not delete mandate --- .../2023/20230202100000-delete-mandatarissen.sparql | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/config/migrations/2023/20230202100000-delete-mandatarissen.sparql b/config/migrations/2023/20230202100000-delete-mandatarissen.sparql index dbf88aa..2d05f67 100644 --- a/config/migrations/2023/20230202100000-delete-mandatarissen.sparql +++ b/config/migrations/2023/20230202100000-delete-mandatarissen.sparql @@ -6,7 +6,6 @@ DELETE { GRAPH { ?mandatarissen ?pMandatarissen ?oMandatarissen . - ?mandaat ?pMandaat ?oMandaat . ?contactPoint ?pContactPoint ?oContactPoint . ?address ?pAddress ?oAddress . @@ -20,9 +19,7 @@ WHERE { } - ?mandatarissen org:holds ?mandaat ; - ?pMandatarissen ?oMandatarissen . - ?mandaat ?pMandaat ?oMandaat . + ?mandatarissen ?pMandatarissen ?oMandatarissen . OPTIONAL { ?mandatarissen schema:contactPoint ?contactPoint . From 6d1b58ecf0ce3bce1532f5db8fadf12b2b093c91 Mon Sep 17 00:00:00 2001 From: iurianu Date: Fri, 3 Feb 2023 13:18:52 +0200 Subject: [PATCH 08/11] migration to change kbo --- .../20230202100000-change-kbo-number.sparql | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 config/migrations/2023/20230202100000-change-kbo-number.sparql diff --git a/config/migrations/2023/20230202100000-change-kbo-number.sparql b/config/migrations/2023/20230202100000-change-kbo-number.sparql new file mode 100644 index 0000000..a63d2e1 --- /dev/null +++ b/config/migrations/2023/20230202100000-change-kbo-number.sparql @@ -0,0 +1,18 @@ +PREFIX generiek: + +DELETE { + GRAPH ?g { + + generiek:lokaleIdentificator ?kbo . + } +} INSERT { + GRAPH ?g { + + generiek:lokaleIdentificator "0655698422" . + } +} WHERE { + GRAPH ?g { + + generiek:lokaleIdentificator ?kbo . + } +} \ No newline at end of file From 411d16e33d5788a0b0f55acc2b83d9d4b32dafda Mon Sep 17 00:00:00 2001 From: iurianu Date: Fri, 3 Feb 2023 15:49:53 +0200 Subject: [PATCH 09/11] 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 From 0f7313b9449396025bc02c25611b757df741b8fb Mon Sep 17 00:00:00 2001 From: Claire Lovisa Date: Mon, 6 Feb 2023 14:37:26 +0100 Subject: [PATCH 10/11] Add option to create migrations triggering index --- .../20230203150000-remove-dummy-worship.sparql | 17 ----------------- docker-compose.dev.yml | 2 ++ docker-compose.yml | 10 ++++++++++ 3 files changed, 12 insertions(+), 17 deletions(-) rename config/{migrations => migrations-triggering-indexing}/2023/20230203150000-remove-dummy-worship.sparql (71%) diff --git a/config/migrations/2023/20230203150000-remove-dummy-worship.sparql b/config/migrations-triggering-indexing/2023/20230203150000-remove-dummy-worship.sparql similarity index 71% rename from config/migrations/2023/20230203150000-remove-dummy-worship.sparql rename to config/migrations-triggering-indexing/2023/20230203150000-remove-dummy-worship.sparql index 0f52eec..314c464 100644 --- a/config/migrations/2023/20230203150000-remove-dummy-worship.sparql +++ b/config/migrations-triggering-indexing/2023/20230203150000-remove-dummy-worship.sparql @@ -48,20 +48,3 @@ DELETE { } } } - -# 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 diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml index 5eecc28..5d68e6d 100644 --- a/docker-compose.dev.yml +++ b/docker-compose.dev.yml @@ -17,6 +17,8 @@ services: volumes: - ./config/dev-migrations:/data/migrations/dev/ restart: "no" + migrations-triggering-indexing: + restart: "no" resource: restart: "no" cache: diff --git a/docker-compose.yml b/docker-compose.yml index ea4f4e7..78d8ac1 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -59,6 +59,16 @@ services: - "logging=true" restart: always logging: *default-logging + migrations-triggering-indexing: + image: semtech/mu-migrations-service:0.8.0 + links: + - db:database + volumes: + - ./config/migrations-triggering-indexing:/data/migrations + labels: + - "logging=true" + restart: always + logging: *default-logging resource: image: semtech/mu-cl-resources:1.21.1 environment: From 4179194e6fedc8feb30ddc665613f0a6abb7080d Mon Sep 17 00:00:00 2001 From: Claire Lovisa Date: Tue, 7 Feb 2023 15:05:26 +0100 Subject: [PATCH 11/11] Moving migration to trigger reindex --- .../2023/20230202100000-delete-mandatarissen.sparql | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename config/{migrations => migrations-triggering-indexing}/2023/20230202100000-delete-mandatarissen.sparql (100%) diff --git a/config/migrations/2023/20230202100000-delete-mandatarissen.sparql b/config/migrations-triggering-indexing/2023/20230202100000-delete-mandatarissen.sparql similarity index 100% rename from config/migrations/2023/20230202100000-delete-mandatarissen.sparql rename to config/migrations-triggering-indexing/2023/20230202100000-delete-mandatarissen.sparql