From 764cfb6f1c3ecb8f2ffe176493d4e52eafee566a Mon Sep 17 00:00:00 2001 From: Elias Papanikitas Date: Tue, 6 Feb 2024 11:08:40 +0100 Subject: [PATCH] added kbo-administrative-unit model --- config/authorization/config.ex | 3 ++- config/dispatcher/dispatcher.ex | 8 ++++++++ config/resources/domain.json | 23 +++++++++++++++++++++++ docker-compose.yml | 8 ++++++++ 4 files changed, 41 insertions(+), 1 deletion(-) diff --git a/config/authorization/config.ex b/config/authorization/config.ex index 12f824e..1b88c90 100644 --- a/config/authorization/config.ex +++ b/config/authorization/config.ex @@ -76,7 +76,8 @@ defmodule Acl.UserGroups.Config do "http://lblod.data.gift/vocabularies/organisatie/VeranderingsgebeurtenisResultaat", "http://www.w3.org/ns/org#Post", "http://www.w3.org/ns/org#ChangeEvent", - "http://data.lblod.info/vocabularies/contacthub/AgentInPositie" + "http://data.lblod.info/vocabularies/contacthub/AgentInPositie", + "http://mu.semte.ch/vocabularies/ext/KboEenheid", ] @shared_protected_type [ diff --git a/config/dispatcher/dispatcher.ex b/config/dispatcher/dispatcher.ex index 7c1c085..6a10342 100644 --- a/config/dispatcher/dispatcher.ex +++ b/config/dispatcher/dispatcher.ex @@ -219,6 +219,10 @@ defmodule Dispatcher do Proxy.forward conn, path, "http://cache/decision-activities/" end + match "/kbo-administrative-units/*path", %{ accept: [:any], layer: :api} do + Proxy.forward conn, path, "http://resource/kbo-administrative-units/" + end + ############### # LOGIN ############### @@ -313,6 +317,10 @@ defmodule Dispatcher do forward conn, path, "http://sync-ovo-numbers/sync-from-kbo/" end + post "/kbo-data-sync/*path", %{ layer: :api_services, accept: %{ json: true } } do + forward conn, path, "http://kbo-data-sync/sync-kbo-data/" + end + get "/ldes/*path", %{ layer: :api_services } do forward conn, path, "http://ldes-backend/" end diff --git a/config/resources/domain.json b/config/resources/domain.json index a454026..d092f6d 100644 --- a/config/resources/domain.json +++ b/config/resources/domain.json @@ -521,8 +521,15 @@ "predicate": "skos:exactMatch", "target": "concepts", "cardinality": "one" + }, + "kbo-administrative-unit": { + "predicate": "owl:sameAs", + "target": "kbo-administrative-units", + "cardinality": "one", + "inverse": true } }, + "new-resource-base": "http://data.lblod.info/id/bestuurseenheden/" }, "organization-classification-codes": { @@ -593,6 +600,21 @@ "super": ["worship-administrative-units"], "new-resource-base": "http://data.lblod.info/id/centraleBesturenVanDeEredienst/" }, + + "kbo-administrative-units": { + "class": "ext:KboEenheid", + "super": ["organizations"], + "relationships": { + "administrative-unit": { + "predicate": "owl:sameAs", + "target": "administrative-units", + "cardinality": "one" + } + }, + "new-resource-base": "http://data.lblod.info/id/kboBestuurseenheden/" + }, + + "representative-bodies": { "class": "ere:RepresentatiefOrgaan", "super": ["organizations"], @@ -813,6 +835,7 @@ "target": "site-types", "cardinality": "one" } + }, "new-resource-base": "http://data.lblod.info/id/vestigingen/" }, diff --git a/docker-compose.yml b/docker-compose.yml index 1e48667..35e05d6 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -306,6 +306,14 @@ services: - "logging=true" restart: always logging: *default-logging + kbo-data-sync: + image: kbo-data-sync-service:0.0.1 + links: + - db:database + labels: + - "logging=true" + restart: always + logging: *default-logging ################################################################################ # DELTA GENERAL