From 435b3e34f0f8a279c2e7c1df9c3493caf2a751e8 Mon Sep 17 00:00:00 2001 From: Norman Radtke Date: Thu, 15 Aug 2024 13:44:41 +0200 Subject: [PATCH] Add triple for NodeShape in Construct --- src/helpers/queries.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/helpers/queries.js b/src/helpers/queries.js index b03cb29..b2dcc42 100644 --- a/src/helpers/queries.js +++ b/src/helpers/queries.js @@ -12,7 +12,8 @@ function getShapeQuery4Target (targetClassIri) { PREFIX rdf: PREFIX rdfs: CONSTRUCT { - ?node_s ?node_p ?node_o . + ?node_s ?node_p ?node_o ; + a sh:NodeShape . ?prop_s ?prop_p ?prop_o . ?prop_s sh:in ?list . ?elt rdf:rest ?rest . @@ -50,16 +51,15 @@ function getShapeQuery4Instance (instanceIri) { PREFIX rdf: PREFIX rdfs: CONSTRUCT { - ?node_s ?node_p ?node_o . + ?node_s ?node_p ?node_o ; + a sh:NodeShape . ?prop_s ?prop_p ?prop_o . #?node_s ?p ?o . ?prop_s sh:in ?list . ?elt rdf:rest ?rest . ?elt rdf:first ?val . } WHERE { - { <${instanceIri}> rdf:type ?class . - #?node_s ?p ?o . { ?node_s sh:targetClass ?class . ?node_s ?node_p ?node_o . @@ -78,7 +78,6 @@ function getShapeQuery4Instance (instanceIri) { ?elt rdf:first ?val . FILTER(?node_o = ?prop_s) } - } }` }