diff --git a/config/clb-consumer/contact-data/delta-context-config.js b/config/clb-consumer/contact-data/delta-context-config.js index b15b10e..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 { @@ -129,6 +130,12 @@ const contextConfig = { } BIND( AS ?graphOne) } + OPTIONAL { + GRAPH { + ${subject} a ?type. + } + BIND( AS ?graphOne) + } OPTIONAL { GRAPH { ${subject} a ?type. @@ -159,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 { @@ -175,6 +183,12 @@ const contextConfig = { } BIND( AS ?graphOne) } + OPTIONAL { + GRAPH { + ${subject} a ?type. + } + BIND( AS ?graphOne) + } OPTIONAL { GRAPH { ${subject} a ?type.