From 327ef360c26042edd77f3e4ea3102b3566620e2c Mon Sep 17 00:00:00 2001 From: anitacaron Date: Wed, 7 Jul 2021 17:50:28 +0100 Subject: [PATCH] Include inheritance between admin unit and worship/central services --- config/dispatcher/dispatcher.ex | 8 ++++++-- config/resources/domain.json | 35 +++++++++++++++++---------------- 2 files changed, 24 insertions(+), 19 deletions(-) diff --git a/config/dispatcher/dispatcher.ex b/config/dispatcher/dispatcher.ex index 406e631..d04b9ea 100644 --- a/config/dispatcher/dispatcher.ex +++ b/config/dispatcher/dispatcher.ex @@ -68,13 +68,17 @@ defmodule Dispatcher do match "/administrative-unit-classification-codes/*path", %{ accept: [:json], layer: :api} do Proxy.forward conn, path, "http://resource/administrative-unit-classification-codes/" end + + match "/worship-administrative-units/*path", %{ accept: [:json], layer: :api} do + Proxy.forward conn, path, "http://resource/worship-administrative-units/" + end match "/worship-services/*path", %{ accept: [:json], layer: :api} do Proxy.forward conn, path, "http://resource/worship-services/" end - match "/honorary-service-types/*path", %{ accept: [:json], layer: :api} do - Proxy.forward conn, path, "http://resource/honorary-service-types/" + match "/recognized-worship-types/*path", %{ accept: [:json], layer: :api} do + Proxy.forward conn, path, "http://resource/recognized-worship-types/" end match "/central-worship-services/*path", %{ accept: [:json], layer: :api} do diff --git a/config/resources/domain.json b/config/resources/domain.json index 63dc6ad..1a7b050 100644 --- a/config/resources/domain.json +++ b/config/resources/domain.json @@ -393,9 +393,22 @@ }, "new-resource-base": "http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/" }, + "worship-administrative-units": { + "class": "ere:EredienstBestuurseenheid", + "super": ["administrative-units"], + "relationships": { + "recognized-worship-type": { + "predicate": "ere:typeEredienst", + "target": "recognized-worship-types", + "cardinality": "one" + } + }, + "new-resource-base": "http://data.lblod.info/id/eredienstBestuurseenheden/" + + }, "worship-services": { "class": "ere:BestuurVanDeEredienst", - "super": ["administrative-units"], + "super": ["worship-administrative-units"], "attributes": { "denomination": { "type": "string", @@ -407,11 +420,6 @@ } }, "relationships": { - "honorary-service-type": { - "predicate": "ere:typeEredienst", - "target": "honorary-service-types", - "cardinality": "one" - }, "involvements": { "predicate": "org:organization", "target": "local-involvements", @@ -426,7 +434,7 @@ }, "new-resource-base": "http://data.lblod.info/id/besturenVanDeEredienst/" }, - "honorary-service-types": { + "recognized-worship-types": { "class": "code:TypeEredienst", "attributes": { "label": { @@ -438,23 +446,16 @@ }, "central-worship-services": { "class": "ere:CentraalBestuurVanDeEredienst", - "super": ["administrative-units"], - "relationships": { - "honorary-service-type": { - "predicate": "ere:typeEredienst", - "target": "honorary-service-types", - "cardinality": "one" - } - }, + "super": ["worship-administrative-units"], "new-resource-base": "http://data.lblod.info/id/centraleBesturenVanDeEredienst/" }, "representative-bodies": { "class": "ere:RepresentatiefOrgaan", "super": ["organizations"], "relationships": { - "honorary-service-type": { + "recognized-worship-type": { "predicate": "ere:typeEredienst", - "target": "honorary-service-types", + "target": "recognized-worship-types", "cardinality": "one" } },