From 59ad3f16053660654e619c64cc6e560a4f485ef8 Mon Sep 17 00:00:00 2001 From: anitacaron Date: Tue, 25 May 2021 18:18:47 +0100 Subject: [PATCH 01/19] creation domain.json --- config/resources/domain.json | 160 +++++++++++++++++++++++++++++++++++ 1 file changed, 160 insertions(+) create mode 100644 config/resources/domain.json diff --git a/config/resources/domain.json b/config/resources/domain.json new file mode 100644 index 0000000..6a67699 --- /dev/null +++ b/config/resources/domain.json @@ -0,0 +1,160 @@ +{ + "version": "0.1", + "prefixes": { + "skos": "http://www.w3.org/2004/02/skos/core#", + "org": "http://www.w3.org/ns/org#", + "locn": "http://www.w3.org/ns/locn#", + "organisatie": "https://data.vlaanderen.be/ns/organisatie#", + "dc_terms": "http://purl.org/dc/terms/", + "schema": "http://schema.org/", + "regorg": "http://www.w3.org/ns/regorg#", + "person": "http://www.w3.org/ns/person#", + "persoon": "https://data.vlaanderen.be/ns/persoon#", + "foaf": "http://xmlns.com/foaf/0.1/", + "vcard": "http://www.w3.org/2006/vcard/ns#", + "adres": "https://data.vlaanderen.be/ns/adres#", + "generiek": "https://data.vlaanderen.be/ns/generiek#", + "euro": "http://data.europa.eu/m8g/", + "adms": "http://www.w3.org/ns/adms#", + "lblodlg": "https://data.lblod.info/vocabularies/leidinggevenden/", + "besluit": "http://data.vlaanderen.be/ns/besluit#", + "mandaat": "http://data.vlaanderen.be/ns/mandaat#", + "ere": "http://data.lblod.info/vocabularies/erediensten/", + "ch": "http://data.lblod.info/vocabularies/contacthub/" + }, + "resources": { + "people": { + "name": "person", + "class": "person:Person", + "attributes": { + "given-name": { + "type": "string", + "predicate": "foaf:givenName" + }, + "family-name": { + "type": "string", + "predicate": "foaf:familyName" + }, + "first-name-used": { + "type": "string", + "predicate": "persoon:gebruikteVoornaam" + } + }, + "relationships": { + "mandatories": { + "predicate": "mandaat:isAangesteldAls", + "target": "mandatory", + "cardinality": "many" + } + }, + "new-resource-base": "http://data.lblod.info/persoon/" + }, + "mandatories": { + "name": "mandatory", + "class": "mandaat:Mandataris", + "attributes": { + "start-date": { + "type": "dateTime", + "predicate": "mandaat:start" + }, + "end-date": { + "type": "dateTime", + "predicate": "mandaat:einde" + } + }, + "relationships": { + "status": { + "predicate": "mandaat:status", + "target": "mandatoryStatusCode", + "cardinality": "one" + }, + "governingAlias": { + "predicate": "mandaat:isBestuurlijkeAliasVan", + "target": "person", + "cardinality": "one" + }, + "contactPoint": { + "predicate": "schema:contactPoint", + "target": "contactPoint", + "cardinality": "many" + }, + "mandate": { + "predicate": "org:holds", + "target": "mandate", + "cardinality": "one" + } + }, + "new-resource-base": "http://data.lblod.info/mandataris/" + }, + "mandatory-status-code": { + "name": "mandatoryStatusCode", + "class": "skos:Concept", + "attributes": { + "label": { + "type": "string", + "predicate": "skos:prefLabel" + } + } + }, + "contactPoints": { + "name": "contactPoint", + "class": "schema:ContactPoint", + "attributes": { + "email": { + "type": "string", + "predicate": "schema:email" + }, + "telephone": { + "type": "string", + "predicate": "schema:telephone" + }, + "fax": { + "type": "string", + "predicate": "schema:faxNumber" + }, + "website": { + "type": "uri", + "predicate": "foaf:page" + } + }, + "relationships": { + "contact-address": { + "predicate": "locn:address", + "target": "address", + "cardinality": "one" + } + }, + "new-resource-base": "http://data.lblod.info/contactpunt/" + }, + "mandates": { + "name": "mandate", + "class": "Mandaat", + "relationships": { + "role": { + "predicate": "org:role", + "target": "roleConcept", + "cardinality": "one" + }, + "governingBody": { + "predicate": "org:hasPost", + "target": "governingBody", + "cardinality": "many" + } + } + }, + "governingBodies": { + "name": "governingBody", + "class": "besluit:Bestuursorgaan", + "attributes": { + "start-date": { + "type": "dateTime", + "predicate": "mandaat:bindingStart" + }, + "end-date": { + "type": "dateTime", + "predicate": "mandaat:bindingEinde" + } + } + } + } +} \ No newline at end of file From f671b03c2fce1746148fe273d1550816a7297193 Mon Sep 17 00:00:00 2001 From: anitacaron Date: Wed, 26 May 2021 18:41:08 +0100 Subject: [PATCH 02/19] update domain and include resources and path in dispatcher --- config/dispatcher/dispatcher.ex | 61 ++++++++- config/resources/domain.json | 219 ++++++++++++++++++++++++++++++-- config/resources/domain.lisp | 9 ++ docker-compose.yml | 19 ++- 4 files changed, 296 insertions(+), 12 deletions(-) create mode 100644 config/resources/domain.lisp diff --git a/config/dispatcher/dispatcher.ex b/config/dispatcher/dispatcher.ex index e3b1b50..4445fd4 100644 --- a/config/dispatcher/dispatcher.ex +++ b/config/dispatcher/dispatcher.ex @@ -10,6 +10,65 @@ defmodule Dispatcher do define_layers [ :api, :frontend, :not_found ] + ############################################################### + # domain.json + ############################################################### + match "/people/*path", %{ accept: [:json], layer: :api} do + Proxy.forward conn, path, "http://resource/people/" + end + + match "/mandatories/*path", %{ accept: [:json], layer: :api} do + Proxy.forward conn, path, "http://resource/mandatories/" + end + + match "/mandatory-status-codes/*path", %{ accept: [:json], layer: :api} do + Proxy.forward conn, path, "http://resource/mandatory-status-codes/" + end + + match "/contact-points/*path", %{ accept: [:json], layer: :api} do + Proxy.forward conn, path, "http://resource/contact-points/" + end + + match "/mandates/*path", %{ accept: [:json], layer: :api} do + Proxy.forward conn, path, "http://resource/mandates/" + end + + match "/governing-bories/*path", %{ accept: [:json], layer: :api} do + Proxy.forward conn, path, "http://resource/governing-bories/" + end + + match "/governing-body-classification-codes/*path", %{ accept: [:json], layer: :api} do + Proxy.forward conn, path, "http://resource/governing-body-classification-codes/" + end + + match "/administrative-units/*path", %{ accept: [:json], layer: :api} do + Proxy.forward conn, path, "http://resource/administrative-units/" + end + + match "/administrative-unit-classification-codes/*path", %{ accept: [:json], layer: :api} do + Proxy.forward conn, path, "http://resource/administrative-unit-classification-codes/" + end + + match "/addresses/*path", %{ accept: [:json], layer: :api} do + Proxy.forward conn, path, "http://resource/addresses/" + end + + match "/sites/*path", %{ accept: [:json], layer: :api} do + Proxy.forward conn, path, "http://resource/sites/" + end + + match "/identifiers/*path", %{ accept: [:json], layer: :api} do + Proxy.forward conn, path, "http://resource/identifiers/" + end + + match "/structured-identifiers/*path", %{ accept: [:json], layer: :api} do + Proxy.forward conn, path, "http://resource/structured-identifiers/" + end + + match "/worship-services/*path", %{ accept: [:json], layer: :api} do + Proxy.forward conn, path, "http://resource/worship-services/" + end + ############################################################### # sparql endpoint ############################################################### @@ -46,7 +105,7 @@ defmodule Dispatcher do match "/*_path", %{ layer: :frontend } do Proxy.forward conn, [], "http://frontend/index.html" end - + ############################################################### # errors ############################################################### diff --git a/config/resources/domain.json b/config/resources/domain.json index 6a67699..67e7158 100644 --- a/config/resources/domain.json +++ b/config/resources/domain.json @@ -47,7 +47,7 @@ "cardinality": "many" } }, - "new-resource-base": "http://data.lblod.info/persoon/" + "new-resource-base": "http://data.lblod.info/id/persoon/" }, "mandatories": { "name": "mandatory", @@ -84,9 +84,9 @@ "cardinality": "one" } }, - "new-resource-base": "http://data.lblod.info/mandataris/" + "new-resource-base": "http://data.lblod.info/id/mandataris/" }, - "mandatory-status-code": { + "mandatory-status-codes": { "name": "mandatoryStatusCode", "class": "skos:Concept", "attributes": { @@ -94,9 +94,10 @@ "type": "string", "predicate": "skos:prefLabel" } - } + }, + "new-resource-base": "http://data.vlaanderen.be/id/concept/MandatarisStatusCode/" }, - "contactPoints": { + "contact-points": { "name": "contactPoint", "class": "schema:ContactPoint", "attributes": { @@ -124,7 +125,7 @@ "cardinality": "one" } }, - "new-resource-base": "http://data.lblod.info/contactpunt/" + "new-resource-base": "http://data.lblod.info/id/contactpunt/" }, "mandates": { "name": "mandate", @@ -135,14 +136,15 @@ "target": "roleConcept", "cardinality": "one" }, - "governingBody": { + "governingBodies": { "predicate": "org:hasPost", "target": "governingBody", "cardinality": "many" } - } + }, + "new-resource-base": "http://data.lblod.info/id/mandaat/" }, - "governingBodies": { + "governing-bodies": { "name": "governingBody", "class": "besluit:Bestuursorgaan", "attributes": { @@ -154,7 +156,204 @@ "type": "dateTime", "predicate": "mandaat:bindingEinde" } - } + }, + "relationships": { + "administrativeUnit": { + "predicate": "besluit:bestuurt", + "target": "administrativUnit", + "cardinality": "one" + }, + "classification": { + "predicate": "org:classification", + "target": "governingBodyClassificationCode", + "cardinality": "one" + }, + "isTimeSpecializationOf": { + "predicate": "generiek:isTijdspecialisatieVan", + "target": "governingBody", + "cardinality": "one" + }, + "hasTimeSpecializations": { + "predicate": "generiek:isTijdspecialisatieVan", + "target": "goveringBody", + "cardinality": "many", + "inverse": true + }, + "contains": { + "predicate": "org:hasPost", + "target": "mandate", + "cardinality": "many" + } + }, + "new-resource-base": "http://data.lblod.info/id/bestuursorgaan/" + }, + "governing-body-classification-codes": { + "name": "governingBodyClassificationCode", + "class": "skos:Concept", + "attributes": { + "label": { + "type": "string", + "predicate": "skos:prefLabel" + } + }, + "new-resource-base": "http://data.vlaanderen.be/id/concept/BestuursorgaanClassificatieCode/" + }, + "administrative-units": { + "name": "administrativeUnit", + "class": "besluit:Bestuurseenheid", + "attributes": { + "name": { + "type": "string", + "predicate": "skos:prefLabel" + }, + "alternative-name": { + "type": "string", + "predicate": "skos:altLabel" + } + }, + "relationships": { + "classification": { + "predicate": "org:classification", + "target": "administrativeUnitClassificationCode", + "cardinality": "one" + }, + "primary-site": { + "predicate": "org:hasPrimarySite", + "target": "site", + "cardinality": "one" + }, + "identifiers": { + "predicate": "adms:idenfier", + "target": "identifier", + "cardinality": "many" + }, + "governing-bodies": { + "predicate": "besluit:bestuurt", + "target": "governingBody", + "cardinality": "many", + "inverser": true + }, + "contact-points": { + "predicate": "schema:contactPoint", + "target": "contactPoint", + "cardinality": "many" + }, + "sites": { + "predicate": "org:hasSite", + "target": "site", + "cardinality": "many" + } + }, + "new-resource-base": "http://data.lblod.info/id/bestuurseenheid/" + }, + "administrative-unit-classification-codes": { + "name": "administrativeUnitClassificationCode", + "class": "skos:Concept", + "attributes": { + "label": { + "type": "string", + "predicate": "skos:prefLabel" + } + }, + "new-resource-base": "http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/" + }, + "identifiers": { + "name": "identifier", + "class": "adms:Identifier", + "attributes": { + "id-name": { + "type": "string", + "predicate": "skos:notation" + } + }, + "relationships": { + "structured-identifier": { + "predicate": "generiek:gestructureerdeIdentificator", + "target": "structuredIdentifier", + "cardinality": "one" + } + }, + "new-resource-base": "http://data.lblod.info/id/identificator/" + }, + "structured-idenfiers": { + "name": "structuredIdentifier", + "class": "generiek:GestructureerdeIdentificator", + "attributes": { + "local-id": { + "type": "string", + "predicate": "generiek:lokaleIdentificator" + } + }, + "new-resource-base": "http://data.lblod.info/id/gestructureerdeIdentificator/" + }, + "addresses": { + "name": "address", + "class": "locn:Address", + "attributes": { + "number": { + "type": "string", + "predicate": "adres:Adresvoorstelling.huisnummer" + }, + "box-number": { + "type": "string", + "predicate": "adres:Adresvoorstelling.busnummer" + }, + "street": { + "type": "string", + "predicate": "locn:thoroughfare" + }, + "postcode": { + "type": "string", + "predicate": "locn:postCode" + }, + "municipality": { + "type": "string", + "predicate": "adres:gemeentenaam" + }, + "province": { + "type": "string", + "predicate": "locn:adminUnitL2" + }, + "country": { + "type": "string", + "predicate": "adres:land" + }, + "full-address": { + "type": "string", + "predicate": "locn:fullAddress" + } + }, + "new-resource-base": "http://data.lblod.info/id/adres/" + }, + "sites": { + "name": "site", + "class": "org:Site", + "relationships": { + "contact": { + "predicate": "org:siteAddress", + "target": "contactPoint", + "cardinality": "many" + }, + "address": { + "predicate": "organisatie:bestaatUit", + "target": "address", + "cardinality": "one" + } + }, + "new-resource-base": "http://data.lblod.info/id/vestiging/" + }, + "worship-services": { + "name": "worshipService", + "class": "ere:BestuurVanDeEredienst", + "super": ["administrativeUnit"], + "relationships": { + "type": { + "predicate": "ere:typeEredienst", + "target": "eredienstType", + "cardinality": "one" + } + }, + "new-resource-base": "http://data.lblod.info/id/bestuurVanDeEredienst/" } } } \ No newline at end of file diff --git a/config/resources/domain.lisp b/config/resources/domain.lisp new file mode 100644 index 0000000..5cd593a --- /dev/null +++ b/config/resources/domain.lisp @@ -0,0 +1,9 @@ + +(in-package :mu-cl-resources) + +(defparameter *include-count-in-paginated-responses* t) + +; fixes bug in sorting - parameter is a workaround for virtuoso behaviour (see docs) but cause problems for sorting +(defparameter *max-group-sorted-properties* nil) + +(read-domain-file "domain.json") \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 1ec8738..aef80b4 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -67,6 +67,24 @@ services: - "logging=true" restart: always logging: *default-logging + resource: + image: semtech/mu-cl-resources:1.20.0 + links: + - db:database + volumes: + - ./config/resources:/config + labels: + - "logging=true" + restart: always + logging: *default-logging + cache: + image: semtech/mu-cache:2.0.1 + links: + - resource:backend + labels: + - "logging=true" + restart: always + logging: *default-logging # Ember-Metis uri-info: image: redpencil/mu-uri-info-service:0.2.1 @@ -92,7 +110,6 @@ services: logging: *default-logging labels: - "logging=true" - frontend: image: lblod/frontend-contact-hub labels: From b112d8a349cb131dd06eae91a2b185138aaf2fb0 Mon Sep 17 00:00:00 2001 From: anitacaron Date: Mon, 31 May 2021 21:34:11 +0100 Subject: [PATCH 03/19] Fix domain --- config/resources/domain.json | 29 ++++++++++++++++++++--------- docker-compose.yml | 4 ++-- 2 files changed, 22 insertions(+), 11 deletions(-) diff --git a/config/resources/domain.json b/config/resources/domain.json index 67e7158..3680269 100644 --- a/config/resources/domain.json +++ b/config/resources/domain.json @@ -73,7 +73,7 @@ "target": "person", "cardinality": "one" }, - "contactPoint": { + "contactPoints": { "predicate": "schema:contactPoint", "target": "contactPoint", "cardinality": "many" @@ -119,7 +119,7 @@ } }, "relationships": { - "contact-address": { + "contactAddress": { "predicate": "locn:address", "target": "address", "cardinality": "one" @@ -217,7 +217,7 @@ "target": "administrativeUnitClassificationCode", "cardinality": "one" }, - "primary-site": { + "primarySite": { "predicate": "org:hasPrimarySite", "target": "site", "cardinality": "one" @@ -227,13 +227,13 @@ "target": "identifier", "cardinality": "many" }, - "governing-bodies": { + "governingBodies": { "predicate": "besluit:bestuurt", "target": "governingBody", "cardinality": "many", "inverser": true }, - "contact-points": { + "contactPoints": { "predicate": "schema:contactPoint", "target": "contactPoint", "cardinality": "many" @@ -267,7 +267,7 @@ } }, "relationships": { - "structured-identifier": { + "structuredIdentifier": { "predicate": "generiek:gestructureerdeIdentificator", "target": "structuredIdentifier", "cardinality": "one" @@ -275,7 +275,7 @@ }, "new-resource-base": "http://data.lblod.info/id/identificator/" }, - "structured-idenfiers": { + "structured-identifiers": { "name": "structuredIdentifier", "class": "generiek:GestructureerdeIdentificator", "attributes": { @@ -329,7 +329,7 @@ "name": "site", "class": "org:Site", "relationships": { - "contact": { + "contacts": { "predicate": "org:siteAddress", "target": "contactPoint", "cardinality": "many" @@ -347,13 +347,24 @@ "class": "ere:BestuurVanDeEredienst", "super": ["administrativeUnit"], "relationships": { - "type": { + "typeEredienst": { "predicate": "ere:typeEredienst", "target": "eredienstType", "cardinality": "one" } }, "new-resource-base": "http://data.lblod.info/id/bestuurVanDeEredienst/" + }, + "eredienst-types": { + "name": "eredienstType", + "class": "skos:Concept", + "attributes": { + "label": { + "type": "string", + "predicate": "skos:prefLabel" + } + }, + "new-resource-base": "http://data.lblod.info/id/typeEredienst/" } } } \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index aef80b4..15efc8e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -68,7 +68,7 @@ services: restart: always logging: *default-logging resource: - image: semtech/mu-cl-resources:1.20.0 + image: semtech/mu-cl-resources:latest links: - db:database volumes: @@ -115,6 +115,6 @@ services: labels: - "logging=true" environment: - EMBER_METIS_BASE_URL: "http://data.lblod.info/" + EMBER_METIS_BASE_URL: "http://data.lblod.info/id/" restart: always logging: *default-logging From 65d05fcda8e791e15185e251b72af9d46d3be160 Mon Sep 17 00:00:00 2001 From: anitacaron Date: Tue, 1 Jun 2021 10:18:04 +0100 Subject: [PATCH 04/19] domain.json kebabcased --- config/resources/domain.json | 104 +++++++++++++++++------------------ 1 file changed, 50 insertions(+), 54 deletions(-) diff --git a/config/resources/domain.json b/config/resources/domain.json index 3680269..918d122 100644 --- a/config/resources/domain.json +++ b/config/resources/domain.json @@ -24,7 +24,6 @@ }, "resources": { "people": { - "name": "person", "class": "person:Person", "attributes": { "given-name": { @@ -43,14 +42,13 @@ "relationships": { "mandatories": { "predicate": "mandaat:isAangesteldAls", - "target": "mandatory", + "target": "mandatories", "cardinality": "many" } }, "new-resource-base": "http://data.lblod.info/id/persoon/" }, "mandatories": { - "name": "mandatory", "class": "mandaat:Mandataris", "attributes": { "start-date": { @@ -65,29 +63,28 @@ "relationships": { "status": { "predicate": "mandaat:status", - "target": "mandatoryStatusCode", + "target": "mandatory-status-codes", "cardinality": "one" }, - "governingAlias": { + "governing-alias": { "predicate": "mandaat:isBestuurlijkeAliasVan", - "target": "person", + "target": "people", "cardinality": "one" }, - "contactPoints": { + "contacts": { "predicate": "schema:contactPoint", - "target": "contactPoint", + "target": "contact-points", "cardinality": "many" }, "mandate": { "predicate": "org:holds", - "target": "mandate", + "target": "mandates", "cardinality": "one" } }, "new-resource-base": "http://data.lblod.info/id/mandataris/" }, "mandatory-status-codes": { - "name": "mandatoryStatusCode", "class": "skos:Concept", "attributes": { "label": { @@ -98,7 +95,6 @@ "new-resource-base": "http://data.vlaanderen.be/id/concept/MandatarisStatusCode/" }, "contact-points": { - "name": "contactPoint", "class": "schema:ContactPoint", "attributes": { "email": { @@ -119,33 +115,42 @@ } }, "relationships": { - "contactAddress": { + "contact-address": { "predicate": "locn:address", - "target": "address", + "target": "addresses", "cardinality": "one" } }, "new-resource-base": "http://data.lblod.info/id/contactpunt/" }, "mandates": { - "name": "mandate", "class": "Mandaat", "relationships": { "role": { "predicate": "org:role", - "target": "roleConcept", + "target": "roles", "cardinality": "one" }, - "governingBodies": { - "predicate": "org:hasPost", - "target": "governingBody", - "cardinality": "many" + "governing-bodies": { + "predicate": "org:postIn", + "target": "governing-bodies", + "cardinality": "many", + "inverse": true } }, "new-resource-base": "http://data.lblod.info/id/mandaat/" }, + "roles": { + "class": "skos:Concept", + "attributes": { + "label": { + "type": "string", + "predicate": "skos:prefLabel" + } + }, + "new-resource-base": "http://data.vlaanderen.be/id/concept/BestuursfunctieCode/" + }, "governing-bodies": { - "name": "governingBody", "class": "besluit:Bestuursorgaan", "attributes": { "start-date": { @@ -158,37 +163,36 @@ } }, "relationships": { - "administrativeUnit": { + "administrative-unit": { "predicate": "besluit:bestuurt", - "target": "administrativUnit", + "target": "administrative-units", "cardinality": "one" }, "classification": { "predicate": "org:classification", - "target": "governingBodyClassificationCode", + "target": "governing-body-classification-codes", "cardinality": "one" }, - "isTimeSpecializationOf": { + "is-timeSpecialization-of": { "predicate": "generiek:isTijdspecialisatieVan", - "target": "governingBody", + "target": "governing-bodies", "cardinality": "one" }, - "hasTimeSpecializations": { + "has-time-specializations": { "predicate": "generiek:isTijdspecialisatieVan", - "target": "goveringBody", + "target": "governing-bodies", "cardinality": "many", "inverse": true }, - "contains": { + "mandates": { "predicate": "org:hasPost", - "target": "mandate", + "target": "mandates", "cardinality": "many" } }, "new-resource-base": "http://data.lblod.info/id/bestuursorgaan/" }, "governing-body-classification-codes": { - "name": "governingBodyClassificationCode", "class": "skos:Concept", "attributes": { "label": { @@ -199,7 +203,6 @@ "new-resource-base": "http://data.vlaanderen.be/id/concept/BestuursorgaanClassificatieCode/" }, "administrative-units": { - "name": "administrativeUnit", "class": "besluit:Bestuurseenheid", "attributes": { "name": { @@ -214,40 +217,39 @@ "relationships": { "classification": { "predicate": "org:classification", - "target": "administrativeUnitClassificationCode", + "target": "administrative-unit-classification-codes", "cardinality": "one" }, - "primarySite": { + "primary-site": { "predicate": "org:hasPrimarySite", - "target": "site", + "target": "sites", "cardinality": "one" }, "identifiers": { "predicate": "adms:idenfier", - "target": "identifier", + "target": "identifiers", "cardinality": "many" }, - "governingBodies": { + "governing-bodies": { "predicate": "besluit:bestuurt", - "target": "governingBody", + "target": "governing-bodies", "cardinality": "many", "inverser": true }, - "contactPoints": { + "contact-points": { "predicate": "schema:contactPoint", - "target": "contactPoint", + "target": "contact-points", "cardinality": "many" }, "sites": { "predicate": "org:hasSite", - "target": "site", + "target": "sites", "cardinality": "many" } }, "new-resource-base": "http://data.lblod.info/id/bestuurseenheid/" }, "administrative-unit-classification-codes": { - "name": "administrativeUnitClassificationCode", "class": "skos:Concept", "attributes": { "label": { @@ -258,7 +260,6 @@ "new-resource-base": "http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/" }, "identifiers": { - "name": "identifier", "class": "adms:Identifier", "attributes": { "id-name": { @@ -267,16 +268,15 @@ } }, "relationships": { - "structuredIdentifier": { + "structured-identifier": { "predicate": "generiek:gestructureerdeIdentificator", - "target": "structuredIdentifier", + "target": "structured-identifiers", "cardinality": "one" } }, "new-resource-base": "http://data.lblod.info/id/identificator/" }, "structured-identifiers": { - "name": "structuredIdentifier", "class": "generiek:GestructureerdeIdentificator", "attributes": { "local-id": { @@ -287,7 +287,6 @@ "new-resource-base": "http://data.lblod.info/id/gestructureerdeIdentificator/" }, "addresses": { - "name": "address", "class": "locn:Address", "attributes": { "number": { @@ -326,37 +325,34 @@ "new-resource-base": "http://data.lblod.info/id/adres/" }, "sites": { - "name": "site", "class": "org:Site", "relationships": { "contacts": { "predicate": "org:siteAddress", - "target": "contactPoint", + "target": "contact-points", "cardinality": "many" }, "address": { "predicate": "organisatie:bestaatUit", - "target": "address", + "target": "addresses", "cardinality": "one" } }, "new-resource-base": "http://data.lblod.info/id/vestiging/" }, "worship-services": { - "name": "worshipService", "class": "ere:BestuurVanDeEredienst", - "super": ["administrativeUnit"], + "super": ["administrative-units"], "relationships": { - "typeEredienst": { + "eredienst-type": { "predicate": "ere:typeEredienst", - "target": "eredienstType", + "target": "eredienst-types", "cardinality": "one" } }, "new-resource-base": "http://data.lblod.info/id/bestuurVanDeEredienst/" }, "eredienst-types": { - "name": "eredienstType", "class": "skos:Concept", "attributes": { "label": { From 2cc398d5d26971c313f1ae7726edf769c85188f9 Mon Sep 17 00:00:00 2001 From: anitacaron Date: Wed, 2 Jun 2021 18:51:01 +0100 Subject: [PATCH 05/19] Finish domain.json and include paths to dispatcher --- config/authorization/config.ex | 19 +- config/dispatcher/dispatcher.ex | 84 ++++++- config/resources/domain.json | 400 ++++++++++++++++++++++++++------ docker-compose.yml | 1 + 4 files changed, 415 insertions(+), 89 deletions(-) diff --git a/config/authorization/config.ex b/config/authorization/config.ex index 6254386..6379c47 100644 --- a/config/authorization/config.ex +++ b/config/authorization/config.ex @@ -22,14 +22,25 @@ defmodule Acl.UserGroups.Config do "http://www.w3.org/ns/org#Site", "http://www.w3.org/ns/locn#Address", "https://data.vlaanderen.be/ns/generiek#GestructureerdeIdentificator", - "http://data.vlaanderen.be/ns/besluit#Bestuursorgaan", + "http://www.w3.org/ns/adms#Identifier", "http://www.w3.org/ns/person#Person", "http://schema.org/ContactPoint", "http://data.vlaanderen.be/ns/mandaat#Mandataris", - "https://data.vlaanderen.be/ns/organisatie#Oprichting", - "https://data.vlaanderen.be/ns/organisatie#Stopzetting", + "http://data.vlaanderen.be/ns/mandaat#Mandaat", + "http://data.lblod.info/vocabularies/leidinggevenden/Bestuursfunctie", + "http://data.vlaanderen.be/ns/besluit#Bestuursorgaan", + "http://data.vlaanderen.be/ns/besluit#Bestuurseenheid", + "http://data.lblod.info/vocabularies/erediensten/BestuurVanDeEredienst", + "http://data.lblod.info/vocabularies/erediensten/Eredienstbestuursorgaan", + "http://data.lblod.info/vocabularies/erediensten/CentraalBestuurVanDeEredienst", + "http://data.lblod.info/vocabularies/erediensten/CentraleBestuursorgaan", + "http://data.lblod.info/vocabularies/erediensten/RepresentatiefOrgaan", + "http://data.lblod.info/vocabularies/erediensten/EredienstMandataris", + "http://www.w3.org/ns/org#ChangeEvent", + "http://www.w3.org/ns/org#Role", "http://www.w3.org/ns/org#Post", - "http://www.w3.org/ns/org#Role" + "http://data.lblod.info/vocabularies/contacthub/AgentInPositie", + "http://www.w3.org/ns/prov#Location" ] } } ] }, %GraphCleanup{ diff --git a/config/dispatcher/dispatcher.ex b/config/dispatcher/dispatcher.ex index 4445fd4..f45aee8 100644 --- a/config/dispatcher/dispatcher.ex +++ b/config/dispatcher/dispatcher.ex @@ -17,6 +17,14 @@ defmodule Dispatcher do Proxy.forward conn, path, "http://resource/people/" end + match "/agent-in-position/*path", %{ accept: [:json], layer: :api} do + Proxy.forward conn, path, "http://resource/agent-in-position/" + end + + match "/posts/*path", %{ accept: [:json], layer: :api} do + Proxy.forward conn, path, "http://resource/posts/" + end + match "/mandatories/*path", %{ accept: [:json], layer: :api} do Proxy.forward conn, path, "http://resource/mandatories/" end @@ -25,6 +33,14 @@ defmodule Dispatcher do Proxy.forward conn, path, "http://resource/mandatory-status-codes/" end + match "/worship-mandatories/*path", %{ accept: [:json], layer: :api} do + Proxy.forward conn, path, "http://resource/worship-mandatories/" + end + + match "/half-elections/*path", %{ accept: [:json], layer: :api} do + Proxy.forward conn, path, "http://resource/half-elections/" + end + match "/contact-points/*path", %{ accept: [:json], layer: :api} do Proxy.forward conn, path, "http://resource/contact-points/" end @@ -32,13 +48,17 @@ defmodule Dispatcher do match "/mandates/*path", %{ accept: [:json], layer: :api} do Proxy.forward conn, path, "http://resource/mandates/" end - - match "/governing-bories/*path", %{ accept: [:json], layer: :api} do - Proxy.forward conn, path, "http://resource/governing-bories/" + + match "/board-positions/*path", %{ accept: [:json], layer: :api} do + Proxy.forward conn, path, "http://resource/board-positions/" end - match "/governing-body-classification-codes/*path", %{ accept: [:json], layer: :api} do - Proxy.forward conn, path, "http://resource/governing-body-classification-codes/" + match "/roles/*path", %{ accept: [:json], layer: :api} do + Proxy.forward conn, path, "http://resource/roles/" + end + + match "/organizations/*path", %{ accept: [:json], layer: :api} do + Proxy.forward conn, path, "http://resource/organizations/" end match "/administrative-units/*path", %{ accept: [:json], layer: :api} do @@ -48,13 +68,41 @@ 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 "/addresses/*path", %{ accept: [:json], layer: :api} do - Proxy.forward conn, path, "http://resource/addresses/" + + match "/worship-services/*path", %{ accept: [:json], layer: :api} do + Proxy.forward conn, path, "http://resource/worship-services/" end - match "/sites/*path", %{ accept: [:json], layer: :api} do - Proxy.forward conn, path, "http://resource/sites/" + match "/honorary-service-types/*path", %{ accept: [:json], layer: :api} do + Proxy.forward conn, path, "http://resource/honorary-service-types/" + end + + match "/central-worship-services/*path", %{ accept: [:json], layer: :api} do + Proxy.forward conn, path, "http://resource/central-worship-services/" + end + + match "/representative-bodies/*path", %{ accept: [:json], layer: :api} do + Proxy.forward conn, path, "http://resource/representative-bodies/" + end + + match "/governing-bories/*path", %{ accept: [:json], layer: :api} do + Proxy.forward conn, path, "http://resource/governing-bodies/" + end + + match "/governing-body-classification-codes/*path", %{ accept: [:json], layer: :api} do + Proxy.forward conn, path, "http://resource/governing-body-classification-codes/" + end + + match "/worship-governing-bodies/*path", %{ accept: [:json], layer: :api} do + Proxy.forward conn, path, "http://resource/worship-governing-bodies/" + end + + match "/central-governing-bodies/*path", %{ accept: [:json], layer: :api} do + Proxy.forward conn, path, "http://resource/central-governing-bodies/" + end + + match "/public-involvements/*path", %{ accept: [:json], layer: :api} do + Proxy.forward conn, path, "http://resource/public-involvements/" end match "/identifiers/*path", %{ accept: [:json], layer: :api} do @@ -65,10 +113,22 @@ defmodule Dispatcher do Proxy.forward conn, path, "http://resource/structured-identifiers/" end - match "/worship-services/*path", %{ accept: [:json], layer: :api} do - Proxy.forward conn, path, "http://resource/worship-services/" + match "/addresses/*path", %{ accept: [:json], layer: :api} do + Proxy.forward conn, path, "http://resource/addresses/" end + match "/sites/*path", %{ accept: [:json], layer: :api} do + Proxy.forward conn, path, "http://resource/sites/" + end + + match "/change-events/*path", %{ accept: [:json], layer: :api} do + Proxy.forward conn, path, "http://resource/change-events/" + end + + match "/change-event-types/*path", %{ accept: [:json], layer: :api} do + Proxy.forward conn, path, "http://resource/change-event-types/" + end + ############################################################### # sparql endpoint ############################################################### diff --git a/config/resources/domain.json b/config/resources/domain.json index 918d122..9ab549e 100644 --- a/config/resources/domain.json +++ b/config/resources/domain.json @@ -46,17 +46,69 @@ "cardinality": "many" } }, - "new-resource-base": "http://data.lblod.info/id/persoon/" + "new-resource-base": "http://data.lblod.info/id/personen/" + }, + "agent-in-position": { + "class": "ch:AgentInPositie", + "attributes": { + "start-date": { + "type": "datetime", + "predicate": "ch:startdatum" + }, + "end-date": { + "type": "datetime", + "predicate": "ch:eindedatum" + } + }, + "relationships": { + "position": { + "predicate": "org:hasPost", + "target": "posts", + "cardinality": "one" + }, + "person": { + "predicate": "org:heldBy", + "target": "peolple", + "cardinality": "one" + }, + "contacts": { + "predicate": "schema:contactPoint", + "target": "contact-points", + "cardinality": "many" + } + }, + "new-resource-base": "http://data.lblod.info/id/agentenInPositie/" + }, + "posts": { + "class": "org:Post", + "relationships": { + "role-board": { + "predicate": "org:role", + "target": "board-positions", + "cardinality": "one" + }, + "general-role": { + "predicate": "org:role", + "target": "roles", + "cardinality": "one" + }, + "organization": { + "predicate": "org:postIn", + "target": "organization", + "cardinality": "one" + } + }, + "new-resource-base": "http://data.lblod.info/id/posities/" }, "mandatories": { "class": "mandaat:Mandataris", "attributes": { "start-date": { - "type": "dateTime", + "type": "datetime", "predicate": "mandaat:start" }, "end-date": { - "type": "dateTime", + "type": "datetime", "predicate": "mandaat:einde" } }, @@ -82,7 +134,7 @@ "cardinality": "one" } }, - "new-resource-base": "http://data.lblod.info/id/mandataris/" + "new-resource-base": "http://data.lblod.info/id/mandatarissen/" }, "mandatory-status-codes": { "class": "skos:Concept", @@ -94,6 +146,38 @@ }, "new-resource-base": "http://data.vlaanderen.be/id/concept/MandatarisStatusCode/" }, + "worship-mandatories": { + "class": "ere:EredienstMandataris", + "super": ["mandatories"], + "attributes": { + "expected-end-date": { + "type": "datetime", + "predicate": "ere:geplandeEinddatumAanstelling" + }, + "reason-stopped": { + "type": "string", + "predicate": "ere:redenVanStopzetting" + } + }, + "relationships": { + "type-half": { + "predicate": "ere:typeHelft", + "target": "half-elections", + "cardinality": "one" + } + }, + "new-resource-base": "http://data.lblod.info/id/mandatarissen/" + }, + "half-elections": { + "class": "skos:Concept", + "attributes": { + "label": { + "type": "string", + "predicate": "skos:prefLabel" + } + }, + "new-resource-base": "http://lblod.data.gift/concepts/" + }, "contact-points": { "class": "schema:ContactPoint", "attributes": { @@ -121,14 +205,14 @@ "cardinality": "one" } }, - "new-resource-base": "http://data.lblod.info/id/contactpunt/" + "new-resource-base": "http://data.lblod.info/id/contact-punten/" }, "mandates": { - "class": "Mandaat", + "class": "mandaat:Mandaat", "relationships": { - "role": { + "role-board": { "predicate": "org:role", - "target": "roles", + "target": "board-positions", "cardinality": "one" }, "governing-bodies": { @@ -136,11 +220,17 @@ "target": "governing-bodies", "cardinality": "many", "inverse": true + }, + "held-by": { + "predicate": "org:heldBy", + "target": "mandatories", + "cardinality": "many", + "inverse": true } }, - "new-resource-base": "http://data.lblod.info/id/mandaat/" + "new-resource-base": "http://data.lblod.info/id/mandaten/" }, - "roles": { + "board-positions": { "class": "skos:Concept", "attributes": { "label": { @@ -150,15 +240,194 @@ }, "new-resource-base": "http://data.vlaanderen.be/id/concept/BestuursfunctieCode/" }, + "roles": { + "class": "org:Role", + "attributes": { + "label": { + "type": "string", + "predicate": "skos:prefLabel" + } + }, + "new-resource-base": "http://data.lblod.info/id/rollen/" + }, + "organizations": { + "class": "org:Organization", + "attributes": { + "name": { + "type": "string", + "predicate": "skos:prefLabel" + }, + "alternative-name": { + "type": "string", + "predicate": "skos:altLabel" + } + }, + "relationships": { + "identifiers": { + "predicate": "adms:idenfier", + "target": "identifiers", + "cardinality": "many" + }, + "primary-site": { + "predicate": "org:hasPrimarySite", + "target": "sites", + "cardinality": "one" + }, + "sites": { + "predicate": "org:hasSite", + "target": "sites", + "cardinality": "many" + }, + "changed-by": { + "predicate": "org:changedBy", + "target": "change-events", + "cardinality": "many" + }, + "resulted-from": { + "predicate": "org:resultedFrom", + "target": "change-events", + "cardinality": "many" + }, + "positions": { + "predicate": "org:hasPost", + "target": "posts", + "cardinality": "many" + } + }, + "new-resource-base": "http://data.lblod.info/id/organisaties/" + }, + "administrative-units": { + "class": "besluit:Bestuurseenheid", + "super": ["organizations"], + "relationships": { + "classification": { + "predicate": "org:classification", + "target": "administrative-unit-classification-codes", + "cardinality": "one" + }, + "governing-bodies": { + "predicate": "besluit:bestuurt", + "target": "governing-bodies", + "cardinality": "many", + "inverser": true + }, + "involved-board": { + "predicate": "ere:betrokkenBestuur", + "target": "public-involvements", + "cardinality": "many" + } + }, + "new-resource-base": "http://data.lblod.info/id/bestuurseenheden/" + }, + "administrative-unit-classification-codes": { + "class": "skos:Concept", + "attributes": { + "label": { + "type": "string", + "predicate": "skos:prefLabel" + } + }, + "new-resource-base": "http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/" + }, + "worship-services": { + "class": "ere:BestuurVanDeEredienst", + "super": ["administrative-units"], + "attributes": { + "denomination": { + "type": "string", + "predicate": "ere:denominatie" + }, + "cross-border": { + "type": "boolean", + "predicate": "ere:grensoverscheidend" + } + }, + "relationships": { + "honorary-service-type": { + "predicate": "ere:typeEredienst", + "target": "honorary-service-types", + "cardinality": "one" + }, + "central-service": { + "predicate": "org:linkedTo", + "target": "central-worship-services", + "cardinality": "one" + }, + "representive-body": { + "predicate": "org:linkedTo", + "target": "representative-bodies", + "cardinality": "one" + } + }, + "new-resource-base": "http://data.lblod.info/id/besturenVanDeEredienst/" + }, + "honorary-service-types": { + "class": "skos:Concept", + "attributes": { + "label": { + "type": "string", + "predicate": "skos:prefLabel" + } + }, + "new-resource-base": "http://lblod.data.gift/concepts/" + }, + "central-worship-services": { + "class": "ere:CentraalBestuurVanDeEredienst", + "super": ["administrative-units"], + "relationships": { + "honorary-service-type": { + "predicate": "ere:typeEredienst", + "target": "honorary-service-types", + "cardinality": "one" + }, + "worship-service": { + "predicate": "org:linkedTo", + "target": "worship-services", + "cardinality": "many", + "inverse": true + }, + "representive-body": { + "predicate": "org:linkedTo", + "target": "representative-bodies", + "cardinality": "one" + } + }, + "new-resource-base": "http://data.lblod.info/id/centraleBesturenVanDeEredienst/" + }, + "representative-bodies": { + "class": "ere:RepresentatiefOrgaan", + "super": ["organizations"], + "relationships": { + "honorary-service-type": { + "predicate": "ere:typeEredienst", + "target": "honorary-service-types", + "cardinality": "one" + }, + "central-service": { + "predicate": "org:linkedTo", + "target": "central-worship-services", + "cardinality": "many", + "inverse": true + }, + "worship-service": { + "predicate": "org:linkedTo", + "target": "worship-services", + "cardinality": "many", + "inverse": true + } + }, + "new-resource-base": "http://data.lblod.info/id/representatieveOrganen/" + }, "governing-bodies": { "class": "besluit:Bestuursorgaan", + "super": ["organizations"], "attributes": { "start-date": { - "type": "dateTime", + "type": "datetime", "predicate": "mandaat:bindingStart" }, "end-date": { - "type": "dateTime", + "type": "datetime", "predicate": "mandaat:bindingEinde" } }, @@ -190,7 +459,7 @@ "cardinality": "many" } }, - "new-resource-base": "http://data.lblod.info/id/bestuursorgaan/" + "new-resource-base": "http://data.lblod.info/id/bestuursorganen/" }, "governing-body-classification-codes": { "class": "skos:Concept", @@ -202,62 +471,37 @@ }, "new-resource-base": "http://data.vlaanderen.be/id/concept/BestuursorgaanClassificatieCode/" }, - "administrative-units": { - "class": "besluit:Bestuurseenheid", + "worship-governing-bodies": { + "class": "ere:Eredienstbestuursorgaan", + "super": ["governing-bodies"], + "new-resource-base": "http://data.lblod.info/id/bestuursorganenVanDeBesturenVanDeEredienst/" + }, + "central-governing-bodies": { + "class": "ere:CentraleBestuursorgaan", + "super": ["governing-bodies"], + "new-resource-base": "http://data.lblod.info/id/bestuursorganenVanDeCentraleBesturenVanDeEredienst/" + }, + "public-involvements": { + "class": "ere:PubliekeBetrokkenheid", "attributes": { - "name": { - "type": "string", - "predicate": "skos:prefLabel" - }, - "alternative-name": { - "type": "string", - "predicate": "skos:altLabel" + "percentage": { + "type": "number", + "predicate": "ere:financieringspercentage" } }, "relationships": { - "classification": { - "predicate": "org:classification", - "target": "administrative-unit-classification-codes", + "involvement-type": { + "predicate": "ere:typebetrokkenheid", + "target": "involvement-types", "cardinality": "one" }, - "primary-site": { - "predicate": "org:hasPrimarySite", - "target": "sites", + "worship-service": { + "predicate": "org:organization", + "target": "worship-services", "cardinality": "one" - }, - "identifiers": { - "predicate": "adms:idenfier", - "target": "identifiers", - "cardinality": "many" - }, - "governing-bodies": { - "predicate": "besluit:bestuurt", - "target": "governing-bodies", - "cardinality": "many", - "inverser": true - }, - "contact-points": { - "predicate": "schema:contactPoint", - "target": "contact-points", - "cardinality": "many" - }, - "sites": { - "predicate": "org:hasSite", - "target": "sites", - "cardinality": "many" } }, - "new-resource-base": "http://data.lblod.info/id/bestuurseenheid/" - }, - "administrative-unit-classification-codes": { - "class": "skos:Concept", - "attributes": { - "label": { - "type": "string", - "predicate": "skos:prefLabel" - } - }, - "new-resource-base": "http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/" + "new-resource-base": "http://data.lblod.info/id/publiekeBetrokkenheid/" }, "identifiers": { "class": "adms:Identifier", @@ -274,7 +518,7 @@ "cardinality": "one" } }, - "new-resource-base": "http://data.lblod.info/id/identificator/" + "new-resource-base": "http://data.lblod.info/id/identificatoren/" }, "structured-identifiers": { "class": "generiek:GestructureerdeIdentificator", @@ -284,7 +528,7 @@ "predicate": "generiek:lokaleIdentificator" } }, - "new-resource-base": "http://data.lblod.info/id/gestructureerdeIdentificator/" + "new-resource-base": "http://data.lblod.info/id/gestructureerdeIdentificatoren/" }, "addresses": { "class": "locn:Address", @@ -322,7 +566,7 @@ "predicate": "locn:fullAddress" } }, - "new-resource-base": "http://data.lblod.info/id/adres/" + "new-resource-base": "http://data.lblod.info/id/adressen/" }, "sites": { "class": "org:Site", @@ -338,21 +582,30 @@ "cardinality": "one" } }, - "new-resource-base": "http://data.lblod.info/id/vestiging/" + "new-resource-base": "http://data.lblod.info/id/vestigingen/" }, - "worship-services": { - "class": "ere:BestuurVanDeEredienst", - "super": ["administrative-units"], + "change-events": { + "class": "org:ChangeEvent", + "attributes": { + "date": { + "type": "datetime", + "predicate": "dc_terms:date" + }, + "description": { + "type": "string", + "predicate": "dc_terms:description" + } + }, "relationships": { - "eredienst-type": { - "predicate": "ere:typeEredienst", - "target": "eredienst-types", + "type": { + "predicate": "ch:typeWijziging", + "target": "change-event-types", "cardinality": "one" } }, - "new-resource-base": "http://data.lblod.info/id/bestuurVanDeEredienst/" + "new-resource-base": "http://data.lblod.info/id/veranderingsgebeurtenissen/" }, - "eredienst-types": { + "change-event-types": { "class": "skos:Concept", "attributes": { "label": { @@ -360,7 +613,8 @@ "predicate": "skos:prefLabel" } }, - "new-resource-base": "http://data.lblod.info/id/typeEredienst/" + "new-resource-base": "http://lblod.data.gift/concepts/" } + } } \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 15efc8e..c8c13df 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -55,6 +55,7 @@ services: LOG_OUTGOING_SPARQL_QUERIES: "true" LOG_INCOMING_SPARQL_QUERIES: "true" LOG_ACCESS_RIGHTS: "true" + LOG_OUTGOING_SPARQL_QUERY_ROUNDTRIP: "true" volumes: - ./config/authorization:/config migrations: From 56d3759ae52686a8ddbae8f84b81f0c500e72a81 Mon Sep 17 00:00:00 2001 From: anitacaron Date: Thu, 3 Jun 2021 09:01:24 +0100 Subject: [PATCH 06/19] Fix typo --- config/dispatcher/dispatcher.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/dispatcher/dispatcher.ex b/config/dispatcher/dispatcher.ex index f45aee8..591abba 100644 --- a/config/dispatcher/dispatcher.ex +++ b/config/dispatcher/dispatcher.ex @@ -85,7 +85,7 @@ defmodule Dispatcher do Proxy.forward conn, path, "http://resource/representative-bodies/" end - match "/governing-bories/*path", %{ accept: [:json], layer: :api} do + match "/governing-bodies/*path", %{ accept: [:json], layer: :api} do Proxy.forward conn, path, "http://resource/governing-bodies/" end From c111a89c0eefecee10a3ae614de6210dcd9c3e90 Mon Sep 17 00:00:00 2001 From: anitacaron Date: Thu, 3 Jun 2021 20:30:46 +0100 Subject: [PATCH 07/19] unique governing body for each mandate --- config/resources/domain.json | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/config/resources/domain.json b/config/resources/domain.json index 9ab549e..4593c99 100644 --- a/config/resources/domain.json +++ b/config/resources/domain.json @@ -215,10 +215,10 @@ "target": "board-positions", "cardinality": "one" }, - "governing-bodies": { + "governing-body": { "predicate": "org:postIn", "target": "governing-bodies", - "cardinality": "many", + "cardinality": "one", "inverse": true }, "held-by": { @@ -268,6 +268,11 @@ "target": "identifiers", "cardinality": "many" }, + "organization-status": { + "predicate": "regorg:orgStatus", + "target": "organization-status-codes", + "cardinality": "one" + }, "primary-site": { "predicate": "org:hasPrimarySite", "target": "sites", @@ -309,9 +314,9 @@ "predicate": "besluit:bestuurt", "target": "governing-bodies", "cardinality": "many", - "inverser": true + "inverse": true }, - "involved-board": { + "involved-boards": { "predicate": "ere:betrokkenBestuur", "target": "public-involvements", "cardinality": "many" @@ -501,7 +506,7 @@ "cardinality": "one" } }, - "new-resource-base": "http://data.lblod.info/id/publiekeBetrokkenheid/" + "new-resource-base": "http://data.lblod.info/id/publiekeBetrokkenheden/" }, "identifiers": { "class": "adms:Identifier", @@ -614,7 +619,16 @@ } }, "new-resource-base": "http://lblod.data.gift/concepts/" - } - + }, + "organization-status-codes": { + "class": "skos:Concept", + "attributes": { + "label": { + "type": "string", + "predicate": "skos:prefLabel" + } + }, + "new-resource-base": "http://lblod.data.gift/concepts/" + } } } \ No newline at end of file From 93f5271493b9eb6af6a4b5ced4c88189e83ae813 Mon Sep 17 00:00:00 2001 From: anitacaron Date: Fri, 4 Jun 2021 08:25:39 +0100 Subject: [PATCH 08/19] Add org status code to dispatcher --- config/dispatcher/dispatcher.ex | 6 +++++- config/resources/domain.json | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/config/dispatcher/dispatcher.ex b/config/dispatcher/dispatcher.ex index 41bc967..fdd2992 100644 --- a/config/dispatcher/dispatcher.ex +++ b/config/dispatcher/dispatcher.ex @@ -127,7 +127,11 @@ defmodule Dispatcher do match "/change-event-types/*path", %{ accept: [:json], layer: :api} do Proxy.forward conn, path, "http://resource/change-event-types/" - end + end + + match "/organization-status-codes/*path", %{ accept: [:json], layer: :api} do + Proxy.forward conn, path, "http://resource/organization-status-codes/" + end ############################################################### # sparql endpoint diff --git a/config/resources/domain.json b/config/resources/domain.json index 4593c99..72cb8c0 100644 --- a/config/resources/domain.json +++ b/config/resources/domain.json @@ -506,7 +506,7 @@ "cardinality": "one" } }, - "new-resource-base": "http://data.lblod.info/id/publiekeBetrokkenheden/" + "new-resource-base": "http://data.lblod.info/id/PubliekeBetrokkenheid/" }, "identifiers": { "class": "adms:Identifier", From ef9a35bff74c1cc75a9ebc7a1676ddf86dcd30b0 Mon Sep 17 00:00:00 2001 From: anitacaron Date: Mon, 7 Jun 2021 19:10:51 +0100 Subject: [PATCH 09/19] delete inheritance to bestuursorgaan --- config/dispatcher/dispatcher.ex | 8 -------- config/resources/domain.json | 13 +------------ 2 files changed, 1 insertion(+), 20 deletions(-) diff --git a/config/dispatcher/dispatcher.ex b/config/dispatcher/dispatcher.ex index fdd2992..4fb7526 100644 --- a/config/dispatcher/dispatcher.ex +++ b/config/dispatcher/dispatcher.ex @@ -93,14 +93,6 @@ defmodule Dispatcher do Proxy.forward conn, path, "http://resource/governing-body-classification-codes/" end - match "/worship-governing-bodies/*path", %{ accept: [:json], layer: :api} do - Proxy.forward conn, path, "http://resource/worship-governing-bodies/" - end - - match "/central-governing-bodies/*path", %{ accept: [:json], layer: :api} do - Proxy.forward conn, path, "http://resource/central-governing-bodies/" - end - match "/public-involvements/*path", %{ accept: [:json], layer: :api} do Proxy.forward conn, path, "http://resource/public-involvements/" end diff --git a/config/resources/domain.json b/config/resources/domain.json index 72cb8c0..c3becfc 100644 --- a/config/resources/domain.json +++ b/config/resources/domain.json @@ -425,7 +425,6 @@ }, "governing-bodies": { "class": "besluit:Bestuursorgaan", - "super": ["organizations"], "attributes": { "start-date": { "type": "datetime", @@ -447,7 +446,7 @@ "target": "governing-body-classification-codes", "cardinality": "one" }, - "is-timeSpecialization-of": { + "is-time-specialization-of": { "predicate": "generiek:isTijdspecialisatieVan", "target": "governing-bodies", "cardinality": "one" @@ -476,16 +475,6 @@ }, "new-resource-base": "http://data.vlaanderen.be/id/concept/BestuursorgaanClassificatieCode/" }, - "worship-governing-bodies": { - "class": "ere:Eredienstbestuursorgaan", - "super": ["governing-bodies"], - "new-resource-base": "http://data.lblod.info/id/bestuursorganenVanDeBesturenVanDeEredienst/" - }, - "central-governing-bodies": { - "class": "ere:CentraleBestuursorgaan", - "super": ["governing-bodies"], - "new-resource-base": "http://data.lblod.info/id/bestuursorganenVanDeCentraleBesturenVanDeEredienst/" - }, "public-involvements": { "class": "ere:PubliekeBetrokkenheid", "attributes": { From c55cc1246b77934cac6c8a8b24da9d59b9c3ea67 Mon Sep 17 00:00:00 2001 From: anitacaron Date: Tue, 8 Jun 2021 11:15:45 +0100 Subject: [PATCH 10/19] Fix inverse property in mandate --- 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 c3becfc..d901989 100644 --- a/config/resources/domain.json +++ b/config/resources/domain.json @@ -216,7 +216,7 @@ "cardinality": "one" }, "governing-body": { - "predicate": "org:postIn", + "predicate": "org:hasPost", "target": "governing-bodies", "cardinality": "one", "inverse": true From 8617800a00851b7b803bde5a4c93766816b1dfaa Mon Sep 17 00:00:00 2001 From: anitacaron Date: Thu, 10 Jun 2021 10:15:43 +0100 Subject: [PATCH 11/19] New types for codelist --- config/resources/domain.json | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/config/resources/domain.json b/config/resources/domain.json index d901989..6d56f88 100644 --- a/config/resources/domain.json +++ b/config/resources/domain.json @@ -20,7 +20,8 @@ "besluit": "http://data.vlaanderen.be/ns/besluit#", "mandaat": "http://data.vlaanderen.be/ns/mandaat#", "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/organization/" }, "resources": { "people": { @@ -137,7 +138,7 @@ "new-resource-base": "http://data.lblod.info/id/mandatarissen/" }, "mandatory-status-codes": { - "class": "skos:Concept", + "class": "code:MandatarisStatusCode", "attributes": { "label": { "type": "string", @@ -169,7 +170,7 @@ "new-resource-base": "http://data.lblod.info/id/mandatarissen/" }, "half-elections": { - "class": "skos:Concept", + "class": "code:HelftVerkiezing", "attributes": { "label": { "type": "string", @@ -231,7 +232,7 @@ "new-resource-base": "http://data.lblod.info/id/mandaten/" }, "board-positions": { - "class": "skos:Concept", + "class": "code:BestuursfunctieCode", "attributes": { "label": { "type": "string", @@ -325,7 +326,7 @@ "new-resource-base": "http://data.lblod.info/id/bestuurseenheden/" }, "administrative-unit-classification-codes": { - "class": "skos:Concept", + "class": "code:BestuurseenheidClassificatieCode", "attributes": { "label": { "type": "string", @@ -367,7 +368,7 @@ "new-resource-base": "http://data.lblod.info/id/besturenVanDeEredienst/" }, "honorary-service-types": { - "class": "skos:Concept", + "class": "code:TypeEredienst", "attributes": { "label": { "type": "string", @@ -466,7 +467,7 @@ "new-resource-base": "http://data.lblod.info/id/bestuursorganen/" }, "governing-body-classification-codes": { - "class": "skos:Concept", + "class": "code:BestuursfunctieCode", "attributes": { "label": { "type": "string", @@ -600,7 +601,7 @@ "new-resource-base": "http://data.lblod.info/id/veranderingsgebeurtenissen/" }, "change-event-types": { - "class": "skos:Concept", + "class": "code:Veranderingsgebeurtenis", "attributes": { "label": { "type": "string", @@ -610,7 +611,7 @@ "new-resource-base": "http://lblod.data.gift/concepts/" }, "organization-status-codes": { - "class": "skos:Concept", + "class": "code:StatusCode", "attributes": { "label": { "type": "string", From 0a915f497fe675a0109409d607807f327bc9e78e Mon Sep 17 00:00:00 2001 From: anitacaron Date: Thu, 10 Jun 2021 12:15:55 +0100 Subject: [PATCH 12/19] Fix typo --- config/resources/domain.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/resources/domain.json b/config/resources/domain.json index 6d56f88..dd31414 100644 --- a/config/resources/domain.json +++ b/config/resources/domain.json @@ -265,7 +265,7 @@ }, "relationships": { "identifiers": { - "predicate": "adms:idenfier", + "predicate": "adms:identifier", "target": "identifiers", "cardinality": "many" }, @@ -344,7 +344,7 @@ "predicate": "ere:denominatie" }, "cross-border": { - "type": "boolean", + "type": "string", "predicate": "ere:grensoverscheidend" } }, From 3af8608751b30a224668fd2c29b0a7c1f22c6e89 Mon Sep 17 00:00:00 2001 From: anitacaron Date: Thu, 10 Jun 2021 15:45:56 +0100 Subject: [PATCH 13/19] Include municipality and province properties --- config/resources/domain.json | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/config/resources/domain.json b/config/resources/domain.json index dd31414..92dfba8 100644 --- a/config/resources/domain.json +++ b/config/resources/domain.json @@ -321,6 +321,16 @@ "predicate": "ere:betrokkenBestuur", "target": "public-involvements", "cardinality": "many" + }, + "municipality": { + "predicate": "besluit:werkingsgebied", + "type": "locations", + "cardinality": "one" + }, + "province": { + "predicate": "vcard:hasRegion", + "type": "locations", + "cardinality": "one" } }, "new-resource-base": "http://data.lblod.info/id/bestuurseenheden/" @@ -619,6 +629,16 @@ } }, "new-resource-base": "http://lblod.data.gift/concepts/" + }, + "locations": { + "class": "prov:Location", + "attributes": { + "label": { + "type": "string", + "predicate": "rdfs:label" + } + }, + "new-resource-base": "http://data.lblod.info/id/werkingsgebieden/" } } } \ No newline at end of file From f17442a69b79b22530e7dc1db9199b7c18c047b2 Mon Sep 17 00:00:00 2001 From: anitacaron Date: Thu, 10 Jun 2021 19:46:21 +0100 Subject: [PATCH 14/19] Fix typo --- config/resources/domain.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/resources/domain.json b/config/resources/domain.json index 92dfba8..70b29b4 100644 --- a/config/resources/domain.json +++ b/config/resources/domain.json @@ -324,12 +324,12 @@ }, "municipality": { "predicate": "besluit:werkingsgebied", - "type": "locations", + "target": "locations", "cardinality": "one" }, "province": { "predicate": "vcard:hasRegion", - "type": "locations", + "target": "locations", "cardinality": "one" } }, From da31401f201881054daf538618eeaa844268442c Mon Sep 17 00:00:00 2001 From: anitacaron Date: Tue, 15 Jun 2021 20:02:15 +0100 Subject: [PATCH 15/19] Change class name, type and add level for location --- config/resources/domain.json | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/config/resources/domain.json b/config/resources/domain.json index 70b29b4..122ad7c 100644 --- a/config/resources/domain.json +++ b/config/resources/domain.json @@ -354,7 +354,7 @@ "predicate": "ere:denominatie" }, "cross-border": { - "type": "string", + "type": "boolean", "predicate": "ere:grensoverscheidend" } }, @@ -506,7 +506,7 @@ "cardinality": "one" } }, - "new-resource-base": "http://data.lblod.info/id/PubliekeBetrokkenheid/" + "new-resource-base": "http://data.lblod.info/id/BetrokkenLokaleBesturen/" }, "identifiers": { "class": "adms:Identifier", @@ -636,6 +636,10 @@ "label": { "type": "string", "predicate": "rdfs:label" + }, + "level": { + "type": "string", + "predicate": "ext:werkingsgebiedNiveau" } }, "new-resource-base": "http://data.lblod.info/id/werkingsgebieden/" From 29ddf868e1ee52641df18f38c42323cac47229b0 Mon Sep 17 00:00:00 2001 From: anitacaron Date: Wed, 16 Jun 2021 15:06:42 +0100 Subject: [PATCH 16/19] Add missing prefix --- config/resources/domain.json | 1 + 1 file changed, 1 insertion(+) diff --git a/config/resources/domain.json b/config/resources/domain.json index 122ad7c..c2f5b8d 100644 --- a/config/resources/domain.json +++ b/config/resources/domain.json @@ -19,6 +19,7 @@ "lblodlg": "https://data.lblod.info/vocabularies/leidinggevenden/", "besluit": "http://data.vlaanderen.be/ns/besluit#", "mandaat": "http://data.vlaanderen.be/ns/mandaat#", + "prov": "http://www.w3.org/ns/prov#", "ere": "http://data.lblod.info/vocabularies/erediensten/", "ch": "http://data.lblod.info/vocabularies/contacthub/", "code": "http://lblod.data.gift/vocabularies/organization/" From ef1a45e2b81862ce615706c1c77940e475428228 Mon Sep 17 00:00:00 2001 From: anitacaron Date: Wed, 16 Jun 2021 17:09:00 +0100 Subject: [PATCH 17/19] Add feature to include uri to status codes --- config/resources/domain.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config/resources/domain.json b/config/resources/domain.json index c2f5b8d..6eb616c 100644 --- a/config/resources/domain.json +++ b/config/resources/domain.json @@ -146,6 +146,7 @@ "predicate": "skos:prefLabel" } }, + "features": ["include-uri"], "new-resource-base": "http://data.vlaanderen.be/id/concept/MandatarisStatusCode/" }, "worship-mandatories": { @@ -629,6 +630,7 @@ "predicate": "skos:prefLabel" } }, + "features": ["include-uri"], "new-resource-base": "http://lblod.data.gift/concepts/" }, "locations": { From d082453ac53541b4adc74c26d0eec771441b5ffe Mon Sep 17 00:00:00 2001 From: anitacaron Date: Thu, 17 Jun 2021 08:59:05 +0100 Subject: [PATCH 18/19] Include missing path and prefix --- config/dispatcher/dispatcher.ex | 4 ++++ config/resources/domain.json | 7 ++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/config/dispatcher/dispatcher.ex b/config/dispatcher/dispatcher.ex index 4fb7526..7463528 100644 --- a/config/dispatcher/dispatcher.ex +++ b/config/dispatcher/dispatcher.ex @@ -125,6 +125,10 @@ defmodule Dispatcher do Proxy.forward conn, path, "http://resource/organization-status-codes/" end + match "/locations/*path", %{ accept: [:json], layer: :api} do + Proxy.forward conn, path, "http://resource/locations/" + end + ############################################################### # sparql endpoint ############################################################### diff --git a/config/resources/domain.json b/config/resources/domain.json index 6eb616c..8faef9a 100644 --- a/config/resources/domain.json +++ b/config/resources/domain.json @@ -22,7 +22,8 @@ "prov": "http://www.w3.org/ns/prov#", "ere": "http://data.lblod.info/vocabularies/erediensten/", "ch": "http://data.lblod.info/vocabularies/contacthub/", - "code": "http://lblod.data.gift/vocabularies/organization/" + "code": "http://lblod.data.gift/vocabularies/organization/", + "ext": "http://mu.semte.ch/vocabularies/ext/" }, "resources": { "people": { @@ -489,7 +490,7 @@ "new-resource-base": "http://data.vlaanderen.be/id/concept/BestuursorgaanClassificatieCode/" }, "public-involvements": { - "class": "ere:PubliekeBetrokkenheid", + "class": "ere:BetrokkenLokaleBesturen", "attributes": { "percentage": { "type": "number", @@ -508,7 +509,7 @@ "cardinality": "one" } }, - "new-resource-base": "http://data.lblod.info/id/BetrokkenLokaleBesturen/" + "new-resource-base": "http://data.lblod.info/id/betrokkenLokaleBesturen/" }, "identifiers": { "class": "adms:Identifier", From be11ae60a61f46e9eb1ae4837747910882defb55 Mon Sep 17 00:00:00 2001 From: Boris De Vloed Date: Thu, 17 Jun 2021 10:55:48 +0200 Subject: [PATCH 19/19] added version for jsonld-delta-service image --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index c12c8d4..eaa8d2f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -112,7 +112,7 @@ services: labels: - "logging=true" kalliope-api: - image: lblod/jsonld-delta-service + image: lblod/jsonld-delta-service:0.1.0 volumes: - ./config/kalliope:/config - ./data/files:/share