From 195dd342fa136bdb07919369abc459547651259b Mon Sep 17 00:00:00 2001 From: Martynas Date: Thu, 19 Dec 2024 00:03:40 +0100 Subject: [PATCH] Updated the `ldh:ChildrenViewContructor` as well as the CLI script to match the new `ldh:View` structure (embedded via `ldh:Object`) --- scripts/{add-view-block.sh => add-view.sh} | 20 ------------------- .../com/atomgraph/linkeddatahub/ldh.ttl | 7 +++++-- 2 files changed, 5 insertions(+), 22 deletions(-) rename scripts/{add-view-block.sh => add-view.sh} (82%) mode change 100755 => 100644 diff --git a/scripts/add-view-block.sh b/scripts/add-view.sh old mode 100755 new mode 100644 similarity index 82% rename from scripts/add-view-block.sh rename to scripts/add-view.sh index a693e5f05..3d1a0e804 --- a/scripts/add-view-block.sh +++ b/scripts/add-view.sh @@ -36,11 +36,6 @@ do shift # past argument shift # past value ;; - --proxy) - proxy="$2" - shift # past argument - shift # past value - ;; -b|--base) base="$2" shift # past argument @@ -96,20 +91,6 @@ if [ -z "$query" ] ; then exit 1 fi -target="$1" - -ntriples=$(./get.sh \ - -f "$cert_pem_file" \ - -p "$cert_password" \ - --proxy "$proxy" \ - --accept 'application/n-triples' \ - "$target") - -# extract the numbers from the sequence properties -sequence_number=$(echo "$ntriples" | grep "<${target}> ' -f 1 | sort -nr | head -n1) -sequence_number=$((sequence_number + 1)) # increase the counter -sequence_property="http://www.w3.org/1999/02/22-rdf-syntax-ns#_${sequence_number}" - args+=("-f") args+=("$cert_pem_file") args+=("-p") @@ -127,7 +108,6 @@ fi turtle+="@prefix ldh: .\n" turtle+="@prefix dct: .\n" turtle+="@prefix spin: .\n" -turtle+="<${target}> <${sequence_property}> ${subject} .\n" turtle+="${subject} a ldh:View .\n" turtle+="${subject} spin:query <${query}> .\n" diff --git a/src/main/resources/com/atomgraph/linkeddatahub/ldh.ttl b/src/main/resources/com/atomgraph/linkeddatahub/ldh.ttl index 322cf23da..fc9eec4a1 100644 --- a/src/main/resources/com/atomgraph/linkeddatahub/ldh.ttl +++ b/src/main/resources/com/atomgraph/linkeddatahub/ldh.ttl @@ -574,8 +574,11 @@ dh:Item spin:constructor :TitleConstructor, :DescriptionConstructor, :PrimaryTop PREFIX spin: CONSTRUCT { - $this rdf:_1 [ a ldh:View ; - spin:query ldh:SelectChildren + $this rdf:_1 [ a ldh:Object ; + rdf:value [ + a ldh:View ; + spin:query ldh:SelectChildren + ] ] . } WHERE {}""" ;