From 4edfd3d08af11a9de2957b1f4f908bc69ea97cb5 Mon Sep 17 00:00:00 2001 From: Oscar Rodriguez Villalobos Date: Wed, 17 Apr 2024 13:10:46 +0200 Subject: [PATCH 1/2] Fix consumer problem with admin units in shared graph --- .../contact-data/delta-context-config.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/config/clb-consumer/contact-data/delta-context-config.js b/config/clb-consumer/contact-data/delta-context-config.js index b15b10e..baa4c87 100644 --- a/config/clb-consumer/contact-data/delta-context-config.js +++ b/config/clb-consumer/contact-data/delta-context-config.js @@ -129,6 +129,12 @@ const contextConfig = { } BIND( AS ?graphOne) } + OPTIONAL { + GRAPH { + ${subject} a ?type. + } + BIND( AS ?graphOne) + } OPTIONAL { GRAPH { ${subject} a ?type. @@ -175,6 +181,12 @@ const contextConfig = { } BIND( AS ?graphOne) } + OPTIONAL { + GRAPH { + ${subject} a ?type. + } + BIND( AS ?graphOne) + } OPTIONAL { GRAPH { ${subject} a ?type. From 6ef0386a2b20698ace837fa7094500f1bffe9973 Mon Sep 17 00:00:00 2001 From: Oscar Rodriguez Villalobos Date: Thu, 18 Apr 2024 09:43:42 +0200 Subject: [PATCH 2/2] Add clarifying comment --- config/clb-consumer/contact-data/delta-context-config.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config/clb-consumer/contact-data/delta-context-config.js b/config/clb-consumer/contact-data/delta-context-config.js index baa4c87..edbe30b 100644 --- a/config/clb-consumer/contact-data/delta-context-config.js +++ b/config/clb-consumer/contact-data/delta-context-config.js @@ -113,6 +113,7 @@ const contextConfig = { trigger: { // subjectType or predicateValue predicateValue: "org:hasSite" }, + //We assume that only administrative units are in the shared graph of OP due to the need of sharing the prefLabel with worships services queryTemplate: (subject) => ` ${PREFIXES} CONSTRUCT { @@ -165,6 +166,7 @@ const contextConfig = { trigger: { // subjectType or predicateValue predicateValue: "org:hasPrimarySite" }, + //We assume that only administrative units are in the shared graph of OP due to the need of sharing the prefLabel with worships services queryTemplate: (subject) => ` ${PREFIXES} CONSTRUCT {