Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3b3a7b548c | ||
|
|
bdf7802a31 | ||
|
|
76cb2ef547 | ||
|
|
c41175cbb1 | ||
|
|
9818c0e38e | ||
|
|
9c5ee85080 |
@@ -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",
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -0,0 +1,129 @@
|
||||
PREFIX org: <http://www.w3.org/ns/org#>
|
||||
PREFIX ere: <http://data.lblod.info/vocabularies/erediensten/>
|
||||
|
||||
DELETE {
|
||||
GRAPH ?g {
|
||||
?role ere:functie <http://lblod.data.gift/concepts/e357bc8f4cc3a694fde2239748768a22> . # Eerste Imam in rang
|
||||
}
|
||||
} INSERT {
|
||||
GRAPH ?g {
|
||||
?role ere:functie <http://lblod.data.gift/concepts/5ebb798bd59c3b48c25116032caa02b7> . # Derde Imam in rang
|
||||
}
|
||||
} WHERE {
|
||||
GRAPH ?g {
|
||||
VALUES ?rolBedienaar {
|
||||
<http://data.lblod.info/id/rollenBedienaar/6332F95A036B579F0A26FF39> # OP-2045
|
||||
<http://data.lblod.info/id/rollenBedienaar/63515D0E8DE5818A7C9F41B6> # OP-2046
|
||||
}
|
||||
?rolBedienaar org:holds ?role .
|
||||
?role ere:functie <http://lblod.data.gift/concepts/e357bc8f4cc3a694fde2239748768a22> .
|
||||
}
|
||||
}
|
||||
;
|
||||
DELETE {
|
||||
GRAPH ?g {
|
||||
?role ere:functie <http://lblod.data.gift/concepts/c4a3fd586211b17b06f574885e23f355> . # Tweede Imam in rang
|
||||
}
|
||||
} INSERT {
|
||||
GRAPH ?g {
|
||||
?role ere:functie <http://lblod.data.gift/concepts/5ebb798bd59c3b48c25116032caa02b7> . # Derde Imam in rang
|
||||
}
|
||||
} WHERE {
|
||||
GRAPH ?g {
|
||||
<http://data.lblod.info/id/rollenBedienaar/63515DDE8DE5818A7C9F41BB> org:holds ?role . # OP-2046
|
||||
?role ere:functie <http://lblod.data.gift/concepts/c4a3fd586211b17b06f574885e23f355> .
|
||||
}
|
||||
}
|
||||
;
|
||||
DELETE {
|
||||
GRAPH ?g {
|
||||
?role ere:functie <http://lblod.data.gift/concepts/efbf2ff50b5c4f693f129ac03319c4f2> . # Priester
|
||||
}
|
||||
} INSERT {
|
||||
GRAPH ?g {
|
||||
?role ere:functie <http://lblod.data.gift/concepts/04d3b5325f2ebc5eaf96849519af4254> . # Rector
|
||||
}
|
||||
} WHERE {
|
||||
GRAPH ?g {
|
||||
VALUES ?rolBedienaar {
|
||||
<http://data.lblod.info/id/rollenBedienaar/633309B8036B579F0A26FF4D> # OP-2056
|
||||
<http://data.lblod.info/id/rollenBedienaar/6308BA29BB4106FB970C4D15> # OP-2057
|
||||
<http://data.lblod.info/id/rollenBedienaar/633308FD036B579F0A26FF48> # OP-2060
|
||||
}
|
||||
?rolBedienaar org:holds ?role .
|
||||
?role ere:functie <http://lblod.data.gift/concepts/efbf2ff50b5c4f693f129ac03319c4f2> .
|
||||
}
|
||||
}
|
||||
|
||||
# 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" }
|
||||
# }
|
||||
# ]
|
||||
# }
|
||||
# ]'
|
||||
@@ -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 <http://data.lblod.info/vocabularies/erediensten/betrokkenBestuur> ?localInvolvement .
|
||||
}
|
||||
} WHERE {
|
||||
GRAPH ?g {
|
||||
?centraalBestuur a <http://data.lblod.info/vocabularies/erediensten/CentraalBestuurVanDeEredienst> .
|
||||
|
||||
?localInvolvement <http://www.w3.org/ns/org#organization> ?centraalBestuur ;
|
||||
?plocalInvolvement ?olocalInvolvement .
|
||||
|
||||
?bestuur <http://data.lblod.info/vocabularies/erediensten/betrokkenBestuur> ?localInvolvement .
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
http://mu.semte.ch/graphs/organisatieportaal
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,67 @@
|
||||
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
|
||||
PREFIX org: <http://www.w3.org/ns/org#>
|
||||
PREFIX locn: <http://www.w3.org/ns/locn#>
|
||||
PREFIX schema: <http://schema.org/>
|
||||
PREFIX ch: <http://data.lblod.info/vocabularies/contacthub/>
|
||||
PREFIX ere: <http://data.lblod.info/vocabularies/erediensten/>
|
||||
|
||||
DELETE {
|
||||
GRAPH <http://mu.semte.ch/graphs/organisatieportaal> {
|
||||
?rolBedienaar ?pRolBedienaar ?oRolBedienaar .
|
||||
?contactPoint ?pContactPoint ?ocontactPoint .
|
||||
?address ?pAddress ?oAddress .
|
||||
}
|
||||
}
|
||||
WHERE {
|
||||
GRAPH <http://mu.semte.ch/graphs/organisatieportaal> {
|
||||
|
||||
VALUES ?rolBedienaar {
|
||||
<http://data.lblod.info/id/rollenBedienaar/6332F770036B579F0A26FF2F> # OP-2043
|
||||
<http://data.lblod.info/id/rollenBedienaar/6332F6C9036B579F0A26FF2A> # OP-2043
|
||||
<http://data.lblod.info/id/rollenBedienaar/6332F7FB036B579F0A26FF34> # OP-2043
|
||||
<http://data.lblod.info/id/rollenBedienaar/638F083FA742F4FD4AB55907> # OP-2047
|
||||
}
|
||||
|
||||
?rolBedienaar rdf:type ere:RolBedienaar ;
|
||||
schema:contactPoint ?contactPoint ;
|
||||
?pRolBedienaar ?oRolBedienaar .
|
||||
|
||||
?contactPoint locn:address ?address ;
|
||||
?pContactPoint ?ocontactPoint .
|
||||
|
||||
?address ?pAddress ?oAddress .
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
# The associated call to trigger a reindex is :
|
||||
|
||||
# curl --location --request POST '172.22.0.30/update' \
|
||||
# --header 'Content-Type: application/vnd.api+json' \
|
||||
# --data-raw ' [
|
||||
# {
|
||||
# "deletes": [
|
||||
# {
|
||||
# "subject": { "type": "uri", "value": "http://data.lblod.info/id/rollenBedienaar/6332F770036B579F0A26FF2F" },
|
||||
# "predicate": { "type": "uri", "value": "http://www.w3.org/ns/org#heldBy" },
|
||||
# "object": { "type": "uri", "value": "http://data.lblod.info/id/personen/6332F6FD036B579F0A26FF2B" }
|
||||
# },
|
||||
# {
|
||||
# "subject": { "type": "uri", "value": "http://data.lblod.info/id/rollenBedienaar/6332F6C9036B579F0A26FF2A" },
|
||||
# "predicate": { "type": "uri", "value": "http://www.w3.org/ns/org#heldBy" },
|
||||
# "object": { "type": "uri", "value": "http://data.lblod.info/id/personen/6332F648036B579F0A26FF26" }
|
||||
# },
|
||||
# {
|
||||
# "subject": { "type": "uri", "value": "http://data.lblod.info/id/rollenBedienaar/6332F7FB036B579F0A26FF34" },
|
||||
# "predicate": { "type": "uri", "value": "http://www.w3.org/ns/org#heldBy" },
|
||||
# "object": { "type": "uri", "value": "http://data.lblod.info/id/personen/6332F7AF036B579F0A26FF30" }
|
||||
# },
|
||||
# {
|
||||
# "subject": { "type": "uri", "value": "http://data.lblod.info/id/rollenBedienaar/638F083FA742F4FD4AB55907" },
|
||||
# "predicate": { "type": "uri", "value": "http://www.w3.org/ns/org#heldBy" },
|
||||
# "object": { "type": "uri", "value": "http://data.lblod.info/id/personen/638F07A6A742F4FD4AB55903" }
|
||||
# }
|
||||
# ],
|
||||
# "inserts": []
|
||||
# }
|
||||
# ]'
|
||||
@@ -0,0 +1,59 @@
|
||||
PREFIX mandaat: <http://data.vlaanderen.be/ns/mandaat#>
|
||||
PREFIX schema: <http://schema.org/>
|
||||
PREFIX locn: <http://www.w3.org/ns/locn#>
|
||||
PREFIX org: <http://www.w3.org/ns/org#>
|
||||
|
||||
DELETE {
|
||||
GRAPH <http://mu.semte.ch/graphs/organisatieportaal> {
|
||||
?mandatarissen ?pMandatarissen ?oMandatarissen .
|
||||
?mandaat ?pMandaat ?oMandaat .
|
||||
?person ?pPerson ?oPerson .
|
||||
?contactPoint ?pContactPoint ?oContactPoint .
|
||||
?address ?pAddress ?oAddress .
|
||||
}
|
||||
} WHERE {
|
||||
GRAPH <http://mu.semte.ch/graphs/organisatieportaal> {
|
||||
VALUES ?mandatarissen {
|
||||
<http://data.lblod.info/id/mandatarissen/807a3e07c95fe40962d64695069af946> #1
|
||||
<http://data.lblod.info/id/mandatarissen/40ed3cb19f9fa33e47b39016780dce1d> #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": []
|
||||
# }
|
||||
# ]'
|
||||
@@ -0,0 +1,35 @@
|
||||
PREFIX mu: <http://mu.semte.ch/vocabularies/core/>
|
||||
PREFIX org: <http://www.w3.org/ns/org#>
|
||||
PREFIX besluit: <http://data.vlaanderen.be/ns/besluit#>
|
||||
PREFIX generiek: <https://data.vlaanderen.be/ns/generiek#>
|
||||
|
||||
# OP-2070
|
||||
INSERT DATA {
|
||||
GRAPH <http://mu.semte.ch/graphs/organisatieportaal> {
|
||||
|
||||
<http://data.lblod.info/id/bestuursorganen/56c71a29-bff0-4b67-804d-2c98fd4bd10f> a <http://data.vlaanderen.be/ns/besluit#Bestuursorgaan>;
|
||||
mu:uuid "56c71a29-bff0-4b67-804d-2c98fd4bd10f";
|
||||
besluit:bestuurt <http://data.lblod.info/id/besturenVanDeEredienst/6232329df9377210c3576b17e116de8b>;
|
||||
org:classification <http://data.vlaanderen.be/id/concept/BestuursorgaanClassificatieCode/b475fa47e17a8a05ae04a9e1fb9c9258>.
|
||||
<http://data.lblod.info/id/bestuursorganen/54f16d44-2f2c-45df-83c1-5a9fbe4756ca> a <http://data.vlaanderen.be/ns/besluit#Bestuursorgaan>;
|
||||
mu:uuid "54f16d44-2f2c-45df-83c1-5a9fbe4756ca";
|
||||
generiek:isTijdspecialisatieVan <http://data.lblod.info/id/bestuursorganen/56c71a29-bff0-4b67-804d-2c98fd4bd10f> .
|
||||
}
|
||||
}
|
||||
|
||||
;
|
||||
|
||||
# OP-2084
|
||||
|
||||
INSERT DATA {
|
||||
GRAPH <http://mu.semte.ch/graphs/organisatieportaal> {
|
||||
|
||||
<http://data.lblod.info/id/bestuursorganen/1179426b-69d4-4974-8aa2-c4d46a22c9cc> a <http://data.vlaanderen.be/ns/besluit#Bestuursorgaan>;
|
||||
mu:uuid "1179426b-69d4-4974-8aa2-c4d46a22c9cc";
|
||||
besluit:bestuurt <http://data.lblod.info/id/besturenVanDeEredienst/88cc9ab83a5a94caeb2f4b04615b20f2>;
|
||||
org:classification <http://data.vlaanderen.be/id/concept/BestuursorgaanClassificatieCode/b475fa47e17a8a05ae04a9e1fb9c9258>.
|
||||
<http://data.lblod.info/id/bestuursorganen/b3db6a8d-d6cb-4b78-af87-b80dfda580c7> a <http://data.vlaanderen.be/ns/besluit#Bestuursorgaan>;
|
||||
mu:uuid "b3db6a8d-d6cb-4b78-af87-b80dfda580c7";
|
||||
generiek:isTijdspecialisatieVan <http://data.lblod.info/id/bestuursorganen/1179426b-69d4-4974-8aa2-c4d46a22c9cc> .
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
|
||||
PREFIX org: <http://www.w3.org/ns/org#>
|
||||
PREFIX mu: <http://mu.semte.ch/vocabularies/core/>
|
||||
PREFIX ext: <http://mu.semte.ch/vocabularies/ext/>
|
||||
PREFIX ch: <http://data.lblod.info/vocabularies/contacthub/>
|
||||
PREFIX code: <http://lblod.data.gift/vocabularies/organisatie/>
|
||||
|
||||
INSERT DATA {
|
||||
GRAPH <http://mu.semte.ch/graphs/organisatieportaal> {
|
||||
|
||||
<http://lblod.data.info/id/veranderingsgebeurtenis-resultaten/0b2f1b62-a15d-11ed-a8fc-0242ac120002>
|
||||
rdf:type code:VeranderingsgebeurtenisResultaat;
|
||||
mu:uuid "0b2f1b62-a15d-11ed-a8fc-0242ac120002" ;
|
||||
code:resulterendeStatus <http://lblod.data.gift/concepts/d02c4e12bf88d2fdf5123b07f29c9311> ;
|
||||
ext:resultingOrganization <http://data.lblod.info/id/bestuurseenheden/25b05f670144f166a485a1d0ac37faca672b36642cf1647d846010d6fe9cabb5> .
|
||||
|
||||
<http://data.lblod.info/id/veranderingsgebeurtenissen/63D7E7E07A8167ED439EC88E>
|
||||
rdf:type org:ChangeEvent ;
|
||||
mu:uuid "63D7E7E07A8167ED439EC88E" ;
|
||||
ch:typeWijziging <http://lblod.data.gift/concepts/e4c3d1ef-a34d-43b0-a18c-f4e60e2c8af3> ;
|
||||
org:resultingOrganization <http://data.lblod.info/id/bestuurseenheden/25b05f670144f166a485a1d0ac37faca672b36642cf1647d846010d6fe9cabb5> ;
|
||||
org:originalOrganization <http://data.lblod.info/id/bestuurseenheden/25b05f670144f166a485a1d0ac37faca672b36642cf1647d846010d6fe9cabb5> ;
|
||||
code:veranderingsgebeurtenisResultaat <http://lblod.data.info/id/veranderingsgebeurtenis-resultaten/0b2f1b62-a15d-11ed-a8fc-0242ac120002> .
|
||||
|
||||
}
|
||||
}
|
||||
25
config/migrations/2023/20230131172200-delete-region.sparql
Normal file
25
config/migrations/2023/20230131172200-delete-region.sparql
Normal file
@@ -0,0 +1,25 @@
|
||||
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
|
||||
PREFIX besluit: <http://data.vlaanderen.be/ns/besluit#>
|
||||
PREFIX geo: <http://www.opengis.net/ont/geosparql#>
|
||||
|
||||
DELETE {
|
||||
GRAPH <http://mu.semte.ch/graphs/organisatieportaal> {
|
||||
|
||||
?werkingsgebied geo:sfWithin ?locatie .
|
||||
|
||||
}
|
||||
} WHERE {
|
||||
GRAPH <http://mu.semte.ch/graphs/organisatieportaal> {
|
||||
|
||||
VALUES ?bestuurseenheid {
|
||||
<http://data.lblod.info/id/bestuurseenheden/9b93ff5308590c7d03c97c3b892910f912e695ad45c82465934996fb04dac859> # OP-2033
|
||||
<http://data.lblod.info/id/bestuurseenheden/25b05f670144f166a485a1d0ac37faca672b36642cf1647d846010d6fe9cabb5> # OP-1994
|
||||
}
|
||||
|
||||
?bestuurseenheid rdf:type besluit:Bestuurseenheid ;
|
||||
besluit:werkingsgebied ?werkingsgebied .
|
||||
|
||||
?werkingsgebied geo:sfWithin ?locatie .
|
||||
|
||||
}
|
||||
}
|
||||
@@ -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/"
|
||||
},
|
||||
@@ -108,7 +108,7 @@
|
||||
},
|
||||
"organization": {
|
||||
"predicate": "org:postIn",
|
||||
"target": "organization",
|
||||
"target": "organizations",
|
||||
"cardinality": "one"
|
||||
},
|
||||
"agents-in-position": {
|
||||
@@ -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"
|
||||
}
|
||||
},
|
||||
@@ -492,10 +492,15 @@
|
||||
"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/"
|
||||
|
||||
},
|
||||
"worship-services": {
|
||||
"class": "ere:BestuurVanDeEredienst",
|
||||
@@ -510,14 +515,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 +628,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": {
|
||||
@@ -711,7 +708,6 @@
|
||||
"type": "url",
|
||||
"predicate": "adres:verwijstNaar"
|
||||
}
|
||||
|
||||
},
|
||||
"relationships": {
|
||||
"source": {
|
||||
@@ -838,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",
|
||||
@@ -968,4 +964,4 @@
|
||||
"new-resource-base": "http://lblod.data.gift/concepts/"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
1
config/search-migrations/.gitignore
vendored
Normal file
1
config/search-migrations/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.migration_history
|
||||
0
config/search-migrations/.gitkeep
Normal file
0
config/search-migrations/.gitkeep
Normal file
@@ -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"
|
||||
|
||||
21
scripts/project/config.json
Normal file
21
scripts/project/config.json
Normal file
@@ -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/"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
1
scripts/project/mu-search-delta/.gitignore
vendored
Normal file
1
scripts/project/mu-search-delta/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
node_modules
|
||||
43
scripts/project/mu-search-delta/README.md
Normal file
43
scripts/project/mu-search-delta/README.md
Normal file
@@ -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`
|
||||
4
scripts/project/mu-search-delta/build.sh
Executable file
4
scripts/project/mu-search-delta/build.sh
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/bin/bash
|
||||
mkdir -p /data/app/config/search-migrations
|
||||
npm i
|
||||
node script.mjs
|
||||
144
scripts/project/mu-search-delta/package-lock.json
generated
Normal file
144
scripts/project/mu-search-delta/package-lock.json
generated
Normal file
@@ -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=="
|
||||
}
|
||||
}
|
||||
}
|
||||
14
scripts/project/mu-search-delta/package.json
Normal file
14
scripts/project/mu-search-delta/package.json
Normal file
@@ -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"
|
||||
}
|
||||
}
|
||||
82
scripts/project/mu-search-delta/script.mjs
Normal file
82
scripts/project/mu-search-delta/script.mjs
Normal file
@@ -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."));
|
||||
Reference in New Issue
Block a user