From 52bc6e5d6065d8eeee4a45d9a2214896ddea04c1 Mon Sep 17 00:00:00 2001 From: Nordine Bittich Date: Wed, 3 Nov 2021 10:48:12 +0100 Subject: [PATCH 1/5] changes for crab --- config/dispatcher/dispatcher.ex | 3 +++ .../migrations/20211103152631-source-crab.ttl | 8 ++++++ config/resources/domain.json | 26 +++++++++++++++++++ 3 files changed, 37 insertions(+) create mode 100644 config/migrations/20211103152631-source-crab.ttl diff --git a/config/dispatcher/dispatcher.ex b/config/dispatcher/dispatcher.ex index 1b4c4f8..2be7f36 100644 --- a/config/dispatcher/dispatcher.ex +++ b/config/dispatcher/dispatcher.ex @@ -162,6 +162,9 @@ defmodule Dispatcher do match "/gender-codes/*path", %{ accept: [:json], layer: :api} do Proxy.forward conn, path, "http://cache/gender-codes/" end + match "/concepts/*path", %{ accept: [:json], layer: :api} do + Proxy.forward conn, path, "http://cache/concepts/" + end match "/minister-positions/*path", %{ accept: [:json], layer: :api} do Proxy.forward conn, path, "http://cache/minister-positions/" diff --git a/config/migrations/20211103152631-source-crab.ttl b/config/migrations/20211103152631-source-crab.ttl new file mode 100644 index 0000000..bd806cd --- /dev/null +++ b/config/migrations/20211103152631-source-crab.ttl @@ -0,0 +1,8 @@ + a ; + "Data sources"@en, "Databronnen"@nl . + a ; + ; +; + "e59c97a9-4e95-4d65-9696-756de47fbc1f"; + "Centraal Referentieadressenbestand (CRAB)"; + "CRAB". \ No newline at end of file diff --git a/config/resources/domain.json b/config/resources/domain.json index 6ff1654..19d62a4 100644 --- a/config/resources/domain.json +++ b/config/resources/domain.json @@ -616,6 +616,18 @@ "full-address": { "type": "string", "predicate": "locn:fullAddress" + }, + "adres-register-uri": { + "type": "url", + "predicate": "adres:verwijstNaar" + } + + }, + "relationships": { + "source": { + "predicate": "dct:source", + "target": "concepts", + "cardinality": "one" } }, "new-resource-base": "http://data.lblod.info/id/adressen/" @@ -684,6 +696,20 @@ }, "new-resource-base": "http://lblod.data.gift/concepts/" }, + "concepts": { + "class": "skos:Concept", + "attributes": { + "label": { + "type": "string", + "predicate": "skos:prefLabel" + }, + "alt-label": { + "type": "string", + "predicate": "skos:altLabel" + } + }, + "new-resource-base": "http://lblod.data.gift/concepts/" + }, "organization-status-codes": { "class": "code:OrganisatieStatusCode", "attributes": { From 478affc609eac139f4fc30471c89940eede79bdd Mon Sep 17 00:00:00 2001 From: Nordine Bittich Date: Fri, 5 Nov 2021 10:29:14 +0100 Subject: [PATCH 2/5] bugfix --- .../migrations/20211103152631-source-crab.ttl | 21 ++++++++++++------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/config/migrations/20211103152631-source-crab.ttl b/config/migrations/20211103152631-source-crab.ttl index bd806cd..e715fd0 100644 --- a/config/migrations/20211103152631-source-crab.ttl +++ b/config/migrations/20211103152631-source-crab.ttl @@ -1,8 +1,13 @@ - a ; - "Data sources"@en, "Databronnen"@nl . - a ; - ; -; - "e59c97a9-4e95-4d65-9696-756de47fbc1f"; - "Centraal Referentieadressenbestand (CRAB)"; - "CRAB". \ No newline at end of file +INSERT DATA { + GRAPH { + a ; + "Data sources"@en, "Databronnen"@nl . + a ; + ; + ; + "e59c97a9-4e95-4d65-9696-756de47fbc1f"; + "Centraal Referentieadressenbestand (CRAB)"; + "CRAB". + } +} + From 670c1591c6585e6703018783eaf2525f995ce452 Mon Sep 17 00:00:00 2001 From: Nordine Bittich Date: Fri, 5 Nov 2021 10:31:08 +0100 Subject: [PATCH 3/5] bugfix --- 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 19d62a4..ae24fc5 100644 --- a/config/resources/domain.json +++ b/config/resources/domain.json @@ -617,7 +617,7 @@ "type": "string", "predicate": "locn:fullAddress" }, - "adres-register-uri": { + "address-register-uri": { "type": "url", "predicate": "adres:verwijstNaar" } From e6a167c40209427b0c88e3faa37e538f946cc21c Mon Sep 17 00:00:00 2001 From: Nordine Bittich Date: Fri, 5 Nov 2021 10:40:38 +0100 Subject: [PATCH 4/5] ensure source crab migration will run --- ...urce-crab.ttl => 2021110315263111111111111111-source-crab.ttl} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename config/migrations/{20211103152631-source-crab.ttl => 2021110315263111111111111111-source-crab.ttl} (100%) diff --git a/config/migrations/20211103152631-source-crab.ttl b/config/migrations/2021110315263111111111111111-source-crab.ttl similarity index 100% rename from config/migrations/20211103152631-source-crab.ttl rename to config/migrations/2021110315263111111111111111-source-crab.ttl From 45a5dff52a6750b973320411f8250c5baa288a3a Mon Sep 17 00:00:00 2001 From: Nordine Bittich Date: Mon, 8 Nov 2021 14:33:24 +0100 Subject: [PATCH 5/5] fix file extension --- ...e-crab.ttl => 2021110315263111111111111111-source-crab.sparql} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename config/migrations/{2021110315263111111111111111-source-crab.ttl => 2021110315263111111111111111-source-crab.sparql} (100%) diff --git a/config/migrations/2021110315263111111111111111-source-crab.ttl b/config/migrations/2021110315263111111111111111-source-crab.sparql similarity index 100% rename from config/migrations/2021110315263111111111111111-source-crab.ttl rename to config/migrations/2021110315263111111111111111-source-crab.sparql