From e9b21036ea422a99a4d67f90801cc89b8eea3626 Mon Sep 17 00:00:00 2001 From: Oscar Rodriguez Villalobos Date: Tue, 30 Jan 2024 10:52:10 +0100 Subject: [PATCH 1/4] add migration for the concept scheme --- .../organizations-public-info/export.json | 2 ++ ...-add-export-concept-to-nis-concepts.sparql | 24 +++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 config/migrations/2024/20240130104000-add-export-concept-to-nis-concepts.sparql diff --git a/config/delta-producer/organizations-public-info/export.json b/config/delta-producer/organizations-public-info/export.json index 7336a51..7a1b792 100644 --- a/config/delta-producer/organizations-public-info/export.json +++ b/config/delta-producer/organizations-public-info/export.json @@ -1,5 +1,7 @@ { + "conceptScheme": "http://lblod.data.gift/concept-schemes/0d101f02-609d-4cde-bb07-639d874470c4", "export": [ + { "type": "http://data.lblod.info/vocabularies/erediensten/BestuurVanDeEredienst", "strictTypeExport": "true", diff --git a/config/migrations/2024/20240130104000-add-export-concept-to-nis-concepts.sparql b/config/migrations/2024/20240130104000-add-export-concept-to-nis-concepts.sparql new file mode 100644 index 0000000..2e43c1b --- /dev/null +++ b/config/migrations/2024/20240130104000-add-export-concept-to-nis-concepts.sparql @@ -0,0 +1,24 @@ +PREFIX rdf: +PREFIX org: +PREFIX mu: +PREFIX ext: +PREFIX ch: +PREFIX code: + + + +INSERT { + graph ?g { + ?concept skos:inScheme . + ?ce org:originalOrganization ?extResultingOrg + } +} +WHERE { + graph ?g { + ?ce rdf:type org:ChangeEvent ; + code:veranderingsgebeurtenisResultaat ?resultaat. + ?resultaat . + ?resultaat ext:resultingOrganization ?extResultingOrg. + filter not exists {?ce org:resultingOrganization ?result } + } +} \ No newline at end of file From 21bfd7096f20b1ad06dd76495502c431a37bc701 Mon Sep 17 00:00:00 2001 From: Oscar Rodriguez Villalobos Date: Tue, 30 Jan 2024 11:24:29 +0100 Subject: [PATCH 2/4] migration didn't got pushed correctly, and export type correctly --- config/delta-producer/public/export.json | 21 +++++++++++++++++++ ...-add-export-concept-to-nis-concepts.sparql | 21 +++++++------------ 2 files changed, 28 insertions(+), 14 deletions(-) diff --git a/config/delta-producer/public/export.json b/config/delta-producer/public/export.json index f0c3e85..7c1921c 100644 --- a/config/delta-producer/public/export.json +++ b/config/delta-producer/public/export.json @@ -420,6 +420,27 @@ "http://www.w3.org/ns/org#role", "http://www.w3.org/2004/02/skos/core#prefLabel" ] + }, + { + "type": "http://www.w3.org/2004/02/skos/core#Concept", + "graphsFilter": [ + "http://mu.semte.ch/graphs/public" + ], + "pathToConceptScheme": [ + "http://www.w3.org/2004/02/skos/core#inScheme" + ], + "properties": [ + "http://mu.semte.ch/vocabularies/core/uuid", + "http://www.w3.org/ns/org#role", + "http://www.w3.org/2004/02/skos/core#prefLabel", + "http://www.w3.org/2004/02/skos/core#notation", + "https://schema.org/startDate", + "https://schema.org/endDate", + "http://www.w3.org/2004/02/skos/core#broader", + "http://www.w3.org/2004/02/skos/core#exactMatch", + "http://www.w3.org/2004/02/skos/core#narrower", + "http://www.w3.org/2004/02/skos/core#narrowMatch" + ] } ] } diff --git a/config/migrations/2024/20240130104000-add-export-concept-to-nis-concepts.sparql b/config/migrations/2024/20240130104000-add-export-concept-to-nis-concepts.sparql index 2e43c1b..863165f 100644 --- a/config/migrations/2024/20240130104000-add-export-concept-to-nis-concepts.sparql +++ b/config/migrations/2024/20240130104000-add-export-concept-to-nis-concepts.sparql @@ -1,24 +1,17 @@ -PREFIX rdf: -PREFIX org: -PREFIX mu: -PREFIX ext: -PREFIX ch: -PREFIX code: +PREFIX besluit: +PREFIX skos: INSERT { graph ?g { ?concept skos:inScheme . - ?ce org:originalOrganization ?extResultingOrg } } WHERE { - graph ?g { - ?ce rdf:type org:ChangeEvent ; - code:veranderingsgebeurtenisResultaat ?resultaat. - ?resultaat . - ?resultaat ext:resultingOrganization ?extResultingOrg. - filter not exists {?ce org:resultingOrganization ?result } - } + ?adminUnit besluit:werkingsgebied ?location. + ?location skos:exactMatch ?concept. + GRAPH ?g { + ?concept a skos:Concept. + } } \ No newline at end of file From b1e3d009748efb6d07983e27c887bab727b7cb66 Mon Sep 17 00:00:00 2001 From: Oscar Date: Tue, 30 Jan 2024 11:53:20 +0100 Subject: [PATCH 3/4] fix migration --- .../20240130104000-add-export-concept-to-nis-concepts.sparql | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/config/migrations/2024/20240130104000-add-export-concept-to-nis-concepts.sparql b/config/migrations/2024/20240130104000-add-export-concept-to-nis-concepts.sparql index 863165f..e2a0c65 100644 --- a/config/migrations/2024/20240130104000-add-export-concept-to-nis-concepts.sparql +++ b/config/migrations/2024/20240130104000-add-export-concept-to-nis-concepts.sparql @@ -4,14 +4,11 @@ PREFIX skos: INSERT { - graph ?g { + GRAPH { ?concept skos:inScheme . } } WHERE { ?adminUnit besluit:werkingsgebied ?location. ?location skos:exactMatch ?concept. - GRAPH ?g { - ?concept a skos:Concept. - } } \ No newline at end of file From 50d47c2395c60693f17fae92c3cd0f2e03fd03d8 Mon Sep 17 00:00:00 2001 From: Oscar Date: Wed, 31 Jan 2024 18:02:29 +0100 Subject: [PATCH 4/4] put concept in the wrong export --- .../organizations-public-info/export.json | 21 +++++++++++++++++++ config/delta-producer/public/export.json | 21 ------------------- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/config/delta-producer/organizations-public-info/export.json b/config/delta-producer/organizations-public-info/export.json index 7a1b792..100be72 100644 --- a/config/delta-producer/organizations-public-info/export.json +++ b/config/delta-producer/organizations-public-info/export.json @@ -348,6 +348,27 @@ "http://www.w3.org/ns/org#role", "http://www.w3.org/2004/02/skos/core#prefLabel" ] + }, + { + "type": "http://www.w3.org/2004/02/skos/core#Concept", + "graphsFilter": [ + "http://mu.semte.ch/graphs/public" + ], + "pathToConceptScheme": [ + "http://www.w3.org/2004/02/skos/core#inScheme" + ], + "properties": [ + "http://mu.semte.ch/vocabularies/core/uuid", + "http://www.w3.org/ns/org#role", + "http://www.w3.org/2004/02/skos/core#prefLabel", + "http://www.w3.org/2004/02/skos/core#notation", + "https://schema.org/startDate", + "https://schema.org/endDate", + "http://www.w3.org/2004/02/skos/core#broader", + "http://www.w3.org/2004/02/skos/core#exactMatch", + "http://www.w3.org/2004/02/skos/core#narrower", + "http://www.w3.org/2004/02/skos/core#narrowMatch" + ] } ] } diff --git a/config/delta-producer/public/export.json b/config/delta-producer/public/export.json index 7c1921c..f0c3e85 100644 --- a/config/delta-producer/public/export.json +++ b/config/delta-producer/public/export.json @@ -420,27 +420,6 @@ "http://www.w3.org/ns/org#role", "http://www.w3.org/2004/02/skos/core#prefLabel" ] - }, - { - "type": "http://www.w3.org/2004/02/skos/core#Concept", - "graphsFilter": [ - "http://mu.semte.ch/graphs/public" - ], - "pathToConceptScheme": [ - "http://www.w3.org/2004/02/skos/core#inScheme" - ], - "properties": [ - "http://mu.semte.ch/vocabularies/core/uuid", - "http://www.w3.org/ns/org#role", - "http://www.w3.org/2004/02/skos/core#prefLabel", - "http://www.w3.org/2004/02/skos/core#notation", - "https://schema.org/startDate", - "https://schema.org/endDate", - "http://www.w3.org/2004/02/skos/core#broader", - "http://www.w3.org/2004/02/skos/core#exactMatch", - "http://www.w3.org/2004/02/skos/core#narrower", - "http://www.w3.org/2004/02/skos/core#narrowMatch" - ] } ] }