From 91ec684edae59c5119ac4cb5e923a5ad7890c223 Mon Sep 17 00:00:00 2001 From: Martynas Date: Sun, 15 Dec 2024 23:12:20 +0100 Subject: [PATCH 01/33] `ldh:ViewQueryLoad` now sets both `$this` and `$about` on the view query --- .../com/atomgraph/linkeddatahub/app/admin/adm.ttl | 4 ++-- .../xsl/bootstrap/2.3.2/client/block/view.xsl | 8 ++++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/main/resources/com/atomgraph/linkeddatahub/app/admin/adm.ttl b/src/main/resources/com/atomgraph/linkeddatahub/app/admin/adm.ttl index 4c09fa8ce..7caea6f54 100644 --- a/src/main/resources/com/atomgraph/linkeddatahub/app/admin/adm.ttl +++ b/src/main/resources/com/atomgraph/linkeddatahub/app/admin/adm.ttl @@ -90,7 +90,7 @@ WHERE { { ?class a owl:Class } UNION { ?class a rdfs:Class } - ?class rdfs:isDefinedBy $this + ?class rdfs:isDefinedBy $about } } """ . @@ -234,7 +234,7 @@ PREFIX acl: SELECT DISTINCT ?agent WHERE { GRAPH ?authGraph - { $this acl:agent ?agent } + { $about acl:agent ?agent } } """ ; rdfs:isDefinedBy : . diff --git a/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block/view.xsl b/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block/view.xsl index 9d44ec2b0..36cfabead 100644 --- a/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block/view.xsl +++ b/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block/view.xsl @@ -76,12 +76,13 @@ exclude-result-prefixes="#all" - + + - + ldh:View ldh:RenderBlock $about: @@ -97,6 +98,7 @@ exclude-result-prefixes="#all" + @@ -111,6 +113,7 @@ exclude-result-prefixes="#all" + @@ -127,6 +130,7 @@ exclude-result-prefixes="#all" + $select-string: From 406cd255c090a8610c5742d8ccca07b82d5167f7 Mon Sep 17 00:00:00 2001 From: Martynas Date: Sun, 15 Dec 2024 23:21:19 +0100 Subject: [PATCH 02/33] `$about` in the query gets set to the `@about` of the *parent* block --- .../linkeddatahub/xsl/bootstrap/2.3.2/client/block/view.xsl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block/view.xsl b/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block/view.xsl index 36cfabead..b967c5ff3 100644 --- a/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block/view.xsl +++ b/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block/view.xsl @@ -77,7 +77,7 @@ exclude-result-prefixes="#all" - + @@ -98,7 +98,7 @@ exclude-result-prefixes="#all" - + From 32f15dc917f261cf4ba01b0d5d72e0b1e205ce5d Mon Sep 17 00:00:00 2001 From: Martynas Date: Sun, 15 Dec 2024 23:29:47 +0100 Subject: [PATCH 03/33] Fixed `$select-string` expression --- .../linkeddatahub/xsl/bootstrap/2.3.2/client/block/view.xsl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block/view.xsl b/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block/view.xsl index b967c5ff3..b68a06ad2 100644 --- a/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block/view.xsl +++ b/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block/view.xsl @@ -130,7 +130,7 @@ exclude-result-prefixes="#all" - + $select-string: From 2f857101c764741212e4327b97310c0718e4c2fc Mon Sep 17 00:00:00 2001 From: Martynas Date: Sun, 15 Dec 2024 23:52:37 +0100 Subject: [PATCH 04/33] Fixed var name in `$template-query` --- .../com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/layout.xsl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/layout.xsl b/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/layout.xsl index 0f6fd765a..0e84c2b9b 100644 --- a/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/layout.xsl +++ b/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/layout.xsl @@ -174,7 +174,7 @@ LIMIT 100 SELECT * WHERE { - $Type ldh:template ?content + $Type ldh:template ?block } ]]> From 8b42c024351217d2747b3e233bf85282732025e8 Mon Sep 17 00:00:00 2001 From: Martynas Date: Mon, 16 Dec 2024 22:41:22 +0100 Subject: [PATCH 05/33] Attempt to unify `bs2:Row` templates --- .../xsl/bootstrap/2.3.2/resource.xsl | 25 +++++++++++++------ 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/resource.xsl b/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/resource.xsl index 0099f5dc7..e96886de2 100644 --- a/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/resource.xsl +++ b/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/resource.xsl @@ -606,15 +606,15 @@ extension-element-prefixes="ixsl" - - + + take care not to load unnecessary documents over HTTP when $typeof is empty @@ -622,7 +622,7 @@ extension-element-prefixes="ixsl"
- + unset @id @@ -630,11 +630,11 @@ extension-element-prefixes="ixsl" - + render contents attached to the types of this resource using ldh:template - + unset the @about @@ -652,7 +652,7 @@ extension-element-prefixes="ixsl" - + --> @@ -663,6 +663,8 @@ extension-element-prefixes="ixsl" + +
@@ -712,6 +714,15 @@ extension-element-prefixes="ixsl" + + + + + + + + +
From d778d7e3ae20bf7074bbe00ddff5208157d6472f Mon Sep 17 00:00:00 2001 From: Martynas Date: Mon, 16 Dec 2024 22:59:48 +0100 Subject: [PATCH 06/33] Attempt to fix `bs2:Row` --- .../xsl/bootstrap/2.3.2/resource.xsl | 46 +++++++++++-------- 1 file changed, 27 insertions(+), 19 deletions(-) diff --git a/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/resource.xsl b/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/resource.xsl index e96886de2..efe283d84 100644 --- a/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/resource.xsl +++ b/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/resource.xsl @@ -606,23 +606,42 @@ extension-element-prefixes="ixsl" - - take care not to load unnecessary documents over HTTP when $typeof is empty + -
+
+ + + + + + + + + + + +
- unset @id + @@ -630,11 +649,11 @@ extension-element-prefixes="ixsl" - render contents attached to the types of this resource using ldh:template + - unset the @about + @@ -652,7 +671,7 @@ extension-element-prefixes="ixsl" - --> + @@ -663,8 +682,6 @@ extension-element-prefixes="ixsl" - -
@@ -714,15 +731,6 @@ extension-element-prefixes="ixsl" - - - - - - - - -
From 72c6bb980ba494510babca3d350f0a1be14dea31 Mon Sep 17 00:00:00 2001 From: Martynas Date: Mon, 16 Dec 2024 23:14:33 +0100 Subject: [PATCH 07/33] `$about` param is unused --- .../linkeddatahub/xsl/bootstrap/2.3.2/client/block/view.xsl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block/view.xsl b/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block/view.xsl index b68a06ad2..a83fb4d14 100644 --- a/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block/view.xsl +++ b/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block/view.xsl @@ -75,7 +75,7 @@ exclude-result-prefixes="#all" - + @@ -85,8 +85,9 @@ exclude-result-prefixes="#all" - ldh:View ldh:RenderBlock $about: + ldh:View $query-uri: + ldh:View $parent-about: From 5d2f13aa4e3735f80af651b75478bb69fcab5654 Mon Sep 17 00:00:00 2001 From: Martynas Date: Tue, 17 Dec 2024 23:00:29 +0100 Subject: [PATCH 08/33] Set unique `@about` for blocks loaded from `ldh:template`s --- .../atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/resource.xsl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/resource.xsl b/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/resource.xsl index efe283d84..edf589686 100644 --- a/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/resource.xsl +++ b/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/resource.xsl @@ -653,7 +653,7 @@ extension-element-prefixes="ixsl" - + From c0d1dc8fc2323d40956ebaa0de5bf886f2269c88 Mon Sep 17 00:00:00 2001 From: Martynas Date: Tue, 17 Dec 2024 23:14:54 +0100 Subject: [PATCH 09/33] Fixed `$about` expression --- .../atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/resource.xsl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/resource.xsl b/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/resource.xsl index edf589686..c22b4ed1d 100644 --- a/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/resource.xsl +++ b/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/resource.xsl @@ -649,11 +649,12 @@ extension-element-prefixes="ixsl" + - + From 34c89731b7f80068cbf5b2e59a2a224fb16e782c Mon Sep 17 00:00:00 2001 From: Martynas Date: Wed, 18 Dec 2024 13:05:02 +0100 Subject: [PATCH 10/33] Set `@id` on blocks from `$block-values` --- .../atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/resource.xsl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/resource.xsl b/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/resource.xsl index c22b4ed1d..c8453e2cb 100644 --- a/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/resource.xsl +++ b/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/resource.xsl @@ -653,8 +653,10 @@ extension-element-prefixes="ixsl" + - + + From cc5cc2878a18c81a942f182f97b229cd79ff1085 Mon Sep 17 00:00:00 2001 From: Martynas Date: Wed, 18 Dec 2024 13:39:51 +0100 Subject: [PATCH 11/33] Fixed `$id` value --- .../atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/resource.xsl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/resource.xsl b/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/resource.xsl index c8453e2cb..d3d429bb9 100644 --- a/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/resource.xsl +++ b/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/resource.xsl @@ -653,9 +653,9 @@ extension-element-prefixes="ixsl" - + - + From c14c1490e3d2bfe225c13bd0f70e21b66adb7262 Mon Sep 17 00:00:00 2001 From: Martynas Date: Wed, 18 Dec 2024 23:04:23 +0100 Subject: [PATCH 12/33] SNAPSHOT bump --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 5d8e81b68..7333a70de 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ com.atomgraph linkeddatahub - 5.0.4-SNAPSHOT + 5.0.5-SNAPSHOT ${packaging.type} AtomGraph LinkedDataHub From 195dd342fa136bdb07919369abc459547651259b Mon Sep 17 00:00:00 2001 From: Martynas Date: Thu, 19 Dec 2024 00:03:40 +0100 Subject: [PATCH 13/33] 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 {}""" ; From 273e80239984e09ad0750229e5b1cd221dd48395 Mon Sep 17 00:00:00 2001 From: Martynas Date: Thu, 19 Dec 2024 22:15:30 +0100 Subject: [PATCH 14/33] chmod script --- scripts/add-view.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 scripts/add-view.sh diff --git a/scripts/add-view.sh b/scripts/add-view.sh old mode 100644 new mode 100755 From 295b1897b50b4beed879046b96ea3d208b1842b2 Mon Sep 17 00:00:00 2001 From: Martynas Date: Thu, 19 Dec 2024 22:34:00 +0100 Subject: [PATCH 15/33] Made `$title` arg optional in `add-object-block` CLI script --- scripts/add-object-block.sh | 4 ---- 1 file changed, 4 deletions(-) diff --git a/scripts/add-object-block.sh b/scripts/add-object-block.sh index d0bc7bcef..5e2d7e2f3 100755 --- a/scripts/add-object-block.sh +++ b/scripts/add-object-block.sh @@ -91,10 +91,6 @@ if [ -z "$base" ] ; then print_usage exit 1 fi -if [ -z "$title" ] ; then - print_usage - exit 1 -fi if [ -z "$value" ] ; then print_usage exit 1 From 06fd3b64eafee8c74dc4dcb200736192a6d01ce3 Mon Sep 17 00:00:00 2001 From: Martynas Date: Fri, 20 Dec 2024 22:28:27 +0100 Subject: [PATCH 16/33] Fixed `$form-actions` cardinality --- .../linkeddatahub/xsl/bootstrap/2.3.2/client/block/chart.xsl | 2 +- .../atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/document.xsl | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block/chart.xsl b/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block/chart.xsl index df2b1b9c5..374973cf3 100644 --- a/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block/chart.xsl +++ b/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block/chart.xsl @@ -218,7 +218,7 @@ exclude-result-prefixes="#all" - +
- -
@@ -1607,9 +1605,6 @@ exclude-result-prefixes="#all" - - - diff --git a/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/resource.xsl b/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/resource.xsl index d3d429bb9..504dd31a1 100644 --- a/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/resource.xsl +++ b/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/resource.xsl @@ -507,7 +507,7 @@ extension-element-prefixes="ixsl"
-
+
From c278d25c5d1fde7fdb5c1687c66b440a4690e4f8 Mon Sep 17 00:00:00 2001 From: Martynas Date: Fri, 20 Dec 2024 23:56:32 +0100 Subject: [PATCH 20/33] Make sure view and chart rendering hides the row with the block controls --- .../xsl/bootstrap/2.3.2/client/block/chart.xsl | 12 +++++++++++- .../xsl/bootstrap/2.3.2/client/block/view.xsl | 2 ++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block/chart.xsl b/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block/chart.xsl index f6415d21c..753ba3f7e 100644 --- a/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block/chart.xsl +++ b/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block/chart.xsl @@ -622,6 +622,7 @@ exclude-result-prefixes="#all" + @@ -660,6 +661,7 @@ exclude-result-prefixes="#all" + @@ -713,8 +715,16 @@ $series: - + + + + + + + + diff --git a/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block/view.xsl b/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block/view.xsl index 58472c78d..179441b4b 100644 --- a/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block/view.xsl +++ b/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block/view.xsl @@ -715,6 +715,8 @@ exclude-result-prefixes="#all" + + From b84e38369658efd97cf0b8aea4c6b9437634b9ec Mon Sep 17 00:00:00 2001 From: Martynas Date: Sat, 21 Dec 2024 00:11:58 +0100 Subject: [PATCH 21/33] Fix the `div.span12` expression --- .../linkeddatahub/xsl/bootstrap/2.3.2/client/block/chart.xsl | 2 +- .../linkeddatahub/xsl/bootstrap/2.3.2/client/block/view.xsl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block/chart.xsl b/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block/chart.xsl index 753ba3f7e..0938a88cd 100644 --- a/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block/chart.xsl +++ b/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block/chart.xsl @@ -721,7 +721,7 @@ $series: - + diff --git a/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block/view.xsl b/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block/view.xsl index 179441b4b..7f2adcefa 100644 --- a/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block/view.xsl +++ b/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block/view.xsl @@ -718,7 +718,7 @@ exclude-result-prefixes="#all" - + From 2176027be01d8848a35189e872f594773e65ef09 Mon Sep 17 00:00:00 2001 From: Martynas Date: Sat, 21 Dec 2024 00:30:57 +0100 Subject: [PATCH 22/33] Do not set `z-index` --- .../linkeddatahub/xsl/bootstrap/2.3.2/client/block/chart.xsl | 3 +-- .../linkeddatahub/xsl/bootstrap/2.3.2/client/block/view.xsl | 2 -- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block/chart.xsl b/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block/chart.xsl index 0938a88cd..1c84948bf 100644 --- a/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block/chart.xsl +++ b/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block/chart.xsl @@ -718,8 +718,7 @@ $series: - - + diff --git a/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block/view.xsl b/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block/view.xsl index 7f2adcefa..891c7138c 100644 --- a/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block/view.xsl +++ b/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block/view.xsl @@ -715,8 +715,6 @@ exclude-result-prefixes="#all" - - From e270cbc08a7276eda1621b5afc7a839ba6b2f618 Mon Sep 17 00:00:00 2001 From: Martynas Date: Sat, 21 Dec 2024 00:57:19 +0100 Subject: [PATCH 23/33] Attempt to fix progress bar expression --- .../linkeddatahub/xsl/bootstrap/2.3.2/client/block/chart.xsl | 2 +- .../linkeddatahub/xsl/bootstrap/2.3.2/client/block/view.xsl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block/chart.xsl b/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block/chart.xsl index 1c84948bf..fb3af0038 100644 --- a/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block/chart.xsl +++ b/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block/chart.xsl @@ -720,7 +720,7 @@ $series: --> - + diff --git a/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block/view.xsl b/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block/view.xsl index 891c7138c..33c7ce901 100644 --- a/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block/view.xsl +++ b/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block/view.xsl @@ -716,7 +716,7 @@ exclude-result-prefixes="#all" - + From 7377c6102ac67ed0373c88797a31fdbc401d2ccf Mon Sep 17 00:00:00 2001 From: Martynas Date: Sat, 21 Dec 2024 01:09:24 +0100 Subject: [PATCH 24/33] Hide progress bar in default `ldh:RenderRow` --- .../linkeddatahub/xsl/bootstrap/2.3.2/client/block.xsl | 8 ++++++++ .../xsl/bootstrap/2.3.2/client/block/chart.xsl | 2 +- .../xsl/bootstrap/2.3.2/client/block/object.xsl | 4 +++- .../xsl/bootstrap/2.3.2/client/block/view.xsl | 2 +- 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block.xsl b/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block.xsl index 7d436c4b4..6552f297d 100644 --- a/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block.xsl +++ b/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block.xsl @@ -118,7 +118,15 @@ exclude-result-prefixes="#all" + + + + + + + + diff --git a/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block/chart.xsl b/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block/chart.xsl index fb3af0038..5ee62b92d 100644 --- a/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block/chart.xsl +++ b/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block/chart.xsl @@ -720,7 +720,7 @@ $series: --> - + diff --git a/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block/object.xsl b/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block/object.xsl index e91b88d27..184609fc6 100644 --- a/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block/object.xsl +++ b/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block/object.xsl @@ -188,7 +188,9 @@ exclude-result-prefixes="#all"
- + + + diff --git a/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block/view.xsl b/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block/view.xsl index 33c7ce901..21be6d30b 100644 --- a/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block/view.xsl +++ b/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block/view.xsl @@ -716,7 +716,7 @@ exclude-result-prefixes="#all" - + From 290bd7311fc7723379f50187c451ad013954d8a3 Mon Sep 17 00:00:00 2001 From: Martynas Date: Sat, 21 Dec 2024 01:16:05 +0100 Subject: [PATCH 25/33] Try to fix XPath --- .../linkeddatahub/xsl/bootstrap/2.3.2/client/block.xsl | 4 +--- .../linkeddatahub/xsl/bootstrap/2.3.2/client/block/object.xsl | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block.xsl b/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block.xsl index 6552f297d..415bdcc0a 100644 --- a/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block.xsl +++ b/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block.xsl @@ -118,11 +118,9 @@ exclude-result-prefixes="#all" - - - + diff --git a/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block/object.xsl b/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block/object.xsl index 184609fc6..e91b88d27 100644 --- a/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block/object.xsl +++ b/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block/object.xsl @@ -188,9 +188,7 @@ exclude-result-prefixes="#all"
- - - + From b2ddc4f6503d1dfc5b9f1f1b2999176a683f4d89 Mon Sep 17 00:00:00 2001 From: Martynas Date: Sun, 22 Dec 2024 21:12:18 +0200 Subject: [PATCH 26/33] Attempt to hide the progress bar by adding an override of `ldh:RenderRow` in object.xsl --- .../xsl/bootstrap/2.3.2/client/block.xsl | 6 ------ .../xsl/bootstrap/2.3.2/client/block/chart.xsl | 2 +- .../xsl/bootstrap/2.3.2/client/block/object.xsl | 11 +++++++++++ .../xsl/bootstrap/2.3.2/client/block/view.xsl | 2 +- 4 files changed, 13 insertions(+), 8 deletions(-) diff --git a/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block.xsl b/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block.xsl index 415bdcc0a..7d436c4b4 100644 --- a/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block.xsl +++ b/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block.xsl @@ -119,12 +119,6 @@ exclude-result-prefixes="#all" - - - - - - diff --git a/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block/chart.xsl b/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block/chart.xsl index 5ee62b92d..7f90096bb 100644 --- a/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block/chart.xsl +++ b/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block/chart.xsl @@ -203,7 +203,7 @@ exclude-result-prefixes="#all" - + diff --git a/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block/object.xsl b/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block/object.xsl index e91b88d27..07a88f1e8 100644 --- a/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block/object.xsl +++ b/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block/object.xsl @@ -207,4 +207,15 @@ exclude-result-prefixes="#all" + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block/view.xsl b/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block/view.xsl index 21be6d30b..6585f076a 100644 --- a/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block/view.xsl +++ b/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block/view.xsl @@ -73,7 +73,7 @@ exclude-result-prefixes="#all" - + From 0d1a9b324f36c8bd48598c6f48396cfd5f51e422 Mon Sep 17 00:00:00 2001 From: Martynas Date: Sun, 22 Dec 2024 21:21:08 +0200 Subject: [PATCH 27/33] Try to fix `@typeof` pattern --- .../linkeddatahub/xsl/bootstrap/2.3.2/client/block/object.xsl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block/object.xsl b/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block/object.xsl index 07a88f1e8..6ee3f9b49 100644 --- a/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block/object.xsl +++ b/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block/object.xsl @@ -207,7 +207,7 @@ exclude-result-prefixes="#all" - + From e1534f6999860e9bec295d379e0a9844c7930662 Mon Sep 17 00:00:00 2001 From: Martynas Date: Fri, 3 Jan 2025 10:55:02 +0100 Subject: [PATCH 28/33] Removed `[@about]` from the chart match pattern in `ldh:RenderRow` mode Block's inner content is always `.row-fluid` Fix all progress bar selectors Attempt to fix the progress bar selector Change `@class` value depending on `$show-row-block-controls` Pass `$show-row-block-controls` client-side Blocks nested within `ldh:Object` do not show their own progress bars Hide progress bar of query blocks Fixed XPath syntax Only ldh:Object can nest blocks Query/chart blocks also get progress bar
s --- .../xsl/bootstrap/2.3.2/client/block.xsl | 12 ++++++ .../bootstrap/2.3.2/client/block/chart.xsl | 6 +-- .../bootstrap/2.3.2/client/block/object.xsl | 12 +----- .../bootstrap/2.3.2/client/block/query.xsl | 7 ++++ .../xsl/bootstrap/2.3.2/client/block/view.xsl | 6 +-- .../xsl/bootstrap/2.3.2/document.xsl | 2 +- .../xsl/bootstrap/2.3.2/layout.xsl | 2 +- .../xsl/bootstrap/2.3.2/resource.xsl | 42 +++++++++---------- 8 files changed, 48 insertions(+), 41 deletions(-) diff --git a/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block.xsl b/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block.xsl index 7d436c4b4..01d3ae496 100644 --- a/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block.xsl +++ b/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block.xsl @@ -117,6 +117,18 @@ exclude-result-prefixes="#all" + + + + + + + + + + + + diff --git a/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block/chart.xsl b/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block/chart.xsl index 7f90096bb..c8ddd0aa6 100644 --- a/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block/chart.xsl +++ b/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block/chart.xsl @@ -203,7 +203,7 @@ exclude-result-prefixes="#all" - + @@ -719,8 +719,8 @@ $series: --> - - + + diff --git a/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block/object.xsl b/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block/object.xsl index 6ee3f9b49..5b4e944d1 100644 --- a/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block/object.xsl +++ b/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block/object.xsl @@ -172,6 +172,7 @@ exclude-result-prefixes="#all" + @@ -206,16 +207,5 @@ exclude-result-prefixes="#all" - - - - - - - - - - - \ No newline at end of file diff --git a/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block/query.xsl b/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block/query.xsl index d827f4d8a..8ddaa83ef 100644 --- a/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block/query.xsl +++ b/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block/query.xsl @@ -233,6 +233,13 @@ exclude-result-prefixes="#all" + + + + + + + diff --git a/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block/view.xsl b/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block/view.xsl index 6585f076a..0d1b04a64 100644 --- a/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block/view.xsl +++ b/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/block/view.xsl @@ -75,14 +75,12 @@ exclude-result-prefixes="#all" - - @@ -715,8 +713,8 @@ exclude-result-prefixes="#all" - - + + diff --git a/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/document.xsl b/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/document.xsl index 8cb9207ae..2cb0c8c48 100644 --- a/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/document.xsl +++ b/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/document.xsl @@ -13,8 +13,8 @@ - + diff --git a/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/layout.xsl b/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/layout.xsl index 0e84c2b9b..26b18ca2f 100644 --- a/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/layout.xsl +++ b/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/layout.xsl @@ -21,8 +21,8 @@ - + diff --git a/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/resource.xsl b/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/resource.xsl index 504dd31a1..1ab3ea7c8 100644 --- a/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/resource.xsl +++ b/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/resource.xsl @@ -18,8 +18,8 @@ - + @@ -460,21 +460,16 @@ extension-element-prefixes="ixsl" - - - - - - - + + @@ -498,24 +493,29 @@ extension-element-prefixes="ixsl" -
-
-
- - - -
-
+
+ + + +
+
+ + + +
+
+
-
+ - - + + +
From 441ece5690749630e65f020513cc5af42f1e8b71 Mon Sep 17 00:00:00 2001 From: Martynas Date: Sat, 4 Jan 2025 14:56:28 +0100 Subject: [PATCH 29/33] Debug anchor onclick template match --- .../static/com/atomgraph/linkeddatahub/xsl/client.xsl | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/client.xsl b/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/client.xsl index 1e5698f55..bdd16cfeb 100644 --- a/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/client.xsl +++ b/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/client.xsl @@ -954,7 +954,7 @@ WHERE - + @@ -978,6 +978,12 @@ WHERE + + WTF + starts-with(resolve-uri(@href, ldh:base-uri(.)): + + + From 91aee0e3e94117e8ea6703ddf6557014e4a9b31b Mon Sep 17 00:00:00 2001 From: Martynas Date: Sat, 4 Jan 2025 14:59:02 +0100 Subject: [PATCH 30/33] XPath fix --- .../webapp/static/com/atomgraph/linkeddatahub/xsl/client.xsl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/client.xsl b/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/client.xsl index bdd16cfeb..ee65f7a76 100644 --- a/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/client.xsl +++ b/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/client.xsl @@ -980,7 +980,7 @@ WHERE WTF - starts-with(resolve-uri(@href, ldh:base-uri(.)): + resolve-uri(@href, ldh:base-uri(.)): From c658636ac62982777be8b3ffe8b0d61419b13245 Mon Sep 17 00:00:00 2001 From: Martynas Date: Sat, 4 Jan 2025 15:21:43 +0100 Subject: [PATCH 31/33] In the `ldh:base-uri` function, make sure to strip the fragment ID from the `location.href` value --- .../linkeddatahub/xsl/bootstrap/2.3.2/client/functions.xsl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/functions.xsl b/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/functions.xsl index 1796a3527..f7eeab1f2 100644 --- a/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/functions.xsl +++ b/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/functions.xsl @@ -37,7 +37,7 @@ exclude-result-prefixes="#all" - + From afca8c33095b9607b1810b4be983e83af08f754b Mon Sep 17 00:00:00 2001 From: Martynas Date: Sat, 4 Jan 2025 15:58:15 +0100 Subject: [PATCH 32/33] Undo debug output --- .../static/com/atomgraph/linkeddatahub/xsl/client.xsl | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/client.xsl b/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/client.xsl index ee65f7a76..1e5698f55 100644 --- a/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/client.xsl +++ b/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/client.xsl @@ -954,7 +954,7 @@ WHERE - + @@ -978,12 +978,6 @@ WHERE - - WTF - resolve-uri(@href, ldh:base-uri(.)): - - - From 4f8d966822ec2179ea24ea61d29f7b53aa4ea75d Mon Sep 17 00:00:00 2001 From: Martynas Date: Fri, 13 Dec 2024 22:24:30 +0100 Subject: [PATCH 33/33] Set `mem_limit` on `linkeddatahub` service Set a custom `HttpRequestRetryHandler` lambda on the `ApacheConnector` --- docker-compose.yml | 5 ++- .../atomgraph/linkeddatahub/Application.java | 41 ++++++++++++++++++- 2 files changed, 42 insertions(+), 4 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 26a5f9a7b..25109191c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -28,6 +28,7 @@ services: linkeddatahub: user: root # otherwise the ldh user does not have permissions to the mounted folder which is owner by root build: . + mem_limit: 2048m depends_on: - fuseki-admin - fuseki-end-user @@ -117,7 +118,7 @@ services: - CLIENT_HOST=linkeddatahub - VARNISH_SIZE=1G entrypoint: /bin/sh -c "cp /etc/varnish/default.vcl.template /etc/varnish/default.vcl && sed -i 's|$${BACKEND_HOST}|'"$$BACKEND_HOST"'|g' /etc/varnish/default.vcl && sed -i 's|$${BACKEND_PORT}|'"$$BACKEND_PORT"'|g' /etc/varnish/default.vcl && sed -i 's|$${CLIENT_HOST}|'"$$CLIENT_HOST"'|g' /etc/varnish/default.vcl && /usr/local/bin/docker-varnish-entrypoint \"$$0\" \"$$@\"" - command: [ "-t", "86400" ] # time to live + command: [ "-t", "86400", "-p", "timeout_idle=60s" ] # time to live volumes: - ./platform/varnish-backend.vcl.template:/etc/varnish/default.vcl.template:ro varnish-end-user: @@ -132,7 +133,7 @@ services: - CLIENT_HOST=linkeddatahub - VARNISH_SIZE=1G entrypoint: /bin/sh -c "cp /etc/varnish/default.vcl.template /etc/varnish/default.vcl && sed -i 's|$${BACKEND_HOST}|'"$$BACKEND_HOST"'|g' /etc/varnish/default.vcl && sed -i 's|$${BACKEND_PORT}|'"$$BACKEND_PORT"'|g' /etc/varnish/default.vcl && sed -i 's|$${CLIENT_HOST}|'"$$CLIENT_HOST"'|g' /etc/varnish/default.vcl && /usr/local/bin/docker-varnish-entrypoint \"$$0\" \"$$@\"" - command: [ "-t", "86400" ] # time to live + command: [ "-t", "86400", "-p", "timeout_idle=60s" ] # time to live volumes: - ./platform/varnish-backend.vcl.template:/etc/varnish/default.vcl.template:ro email-server: diff --git a/src/main/java/com/atomgraph/linkeddatahub/Application.java b/src/main/java/com/atomgraph/linkeddatahub/Application.java index f1d51f147..a18fd0260 100644 --- a/src/main/java/com/atomgraph/linkeddatahub/Application.java +++ b/src/main/java/com/atomgraph/linkeddatahub/Application.java @@ -204,7 +204,9 @@ import net.sf.saxon.s9api.XsltExecutable; import nu.xom.XPathException; import org.apache.http.HttpClientConnection; +import org.apache.http.HttpHost; import org.apache.http.HttpResponse; +import org.apache.http.client.HttpRequestRetryHandler; import org.apache.http.config.Registry; import org.apache.http.config.RegistryBuilder; import org.apache.http.conn.ConnectionKeepAliveStrategy; @@ -214,6 +216,7 @@ import org.apache.http.conn.ssl.SSLConnectionSocketFactory; import org.apache.http.impl.conn.PoolingHttpClientConnectionManager; import org.apache.http.protocol.HttpContext; +import org.apache.http.protocol.HttpCoreContext; import org.apache.jena.query.DatasetFactory; import org.apache.jena.rdf.model.ModelFactory; import org.apache.jena.rdf.model.ResIterator; @@ -230,7 +233,6 @@ import org.glassfish.hk2.utilities.binding.AbstractBinder; import org.glassfish.jersey.client.ClientConfig; import org.glassfish.jersey.apache.connector.ApacheClientProperties; -import org.glassfish.jersey.apache.connector.ApacheConnectionClosingStrategy; import org.glassfish.jersey.apache.connector.ApacheConnectorProvider; import org.glassfish.jersey.client.ClientProperties; import org.glassfish.jersey.client.RequestEntityProcessing; @@ -1384,7 +1386,8 @@ public void releaseConnection(final HttpClientConnection managedConn, final Obje }; if (maxConnPerRoute != null) conman.setDefaultMaxPerRoute(maxConnPerRoute); if (maxTotalConn != null) conman.setMaxTotal(maxTotalConn); - + int maxRetryCount = 3; + ClientConfig config = new ClientConfig(); config.connectorProvider(new ApacheConnectorProvider()); config.register(MultiPartFeature.class); @@ -1396,6 +1399,23 @@ public void releaseConnection(final HttpClientConnection managedConn, final Obje config.property(ClientProperties.FOLLOW_REDIRECTS, true); config.property(ClientProperties.REQUEST_ENTITY_PROCESSING, RequestEntityProcessing.BUFFERED); // https://stackoverflow.com/questions/42139436/jersey-client-throws-cannot-retry-request-with-a-non-repeatable-request-entity config.property(ApacheClientProperties.CONNECTION_MANAGER, conman); + config.property(ApacheClientProperties.RETRY_HANDLER, (HttpRequestRetryHandler) (IOException ex, int executionCount, HttpContext context) -> + { + // Extract the HTTP host from the context + HttpHost targetHost = (HttpHost) context.getAttribute(HttpCoreContext.HTTP_TARGET_HOST); + String serverName = targetHost != null ? targetHost.getHostName() : "Unknown"; + + if (executionCount > maxRetryCount) { + if (log.isWarnEnabled()) log.warn("Maximum tries reached for client HTTP pool to server '{}'", serverName); + return false; + } + if (ex instanceof org.apache.http.NoHttpResponseException) { + if (log.isWarnEnabled()) log.warn("No response from server '{}' on {} call", serverName, executionCount); + return true; + } + return false; + }); + //config.property(ApacheClientProperties.CONNECTION_CLOSING_STRATEGY, new ApacheConnectionClosingStrategy.GracefulClosingStrategy()); if (keepAliveStrategy != null) config.property(ApacheClientProperties.KEEPALIVE_STRATEGY, keepAliveStrategy); @@ -1461,6 +1481,7 @@ public void releaseConnection(final HttpClientConnection managedConn, final Obje }; if (maxConnPerRoute != null) conman.setDefaultMaxPerRoute(maxConnPerRoute); if (maxTotalConn != null) conman.setMaxTotal(maxTotalConn); + int maxRetryCount = 3; ClientConfig config = new ClientConfig(); config.connectorProvider(new ApacheConnectorProvider()); @@ -1473,7 +1494,23 @@ public void releaseConnection(final HttpClientConnection managedConn, final Obje config.property(ClientProperties.FOLLOW_REDIRECTS, true); config.property(ClientProperties.REQUEST_ENTITY_PROCESSING, RequestEntityProcessing.BUFFERED); // https://stackoverflow.com/questions/42139436/jersey-client-throws-cannot-retry-request-with-a-non-repeatable-request-entity config.property(ApacheClientProperties.CONNECTION_MANAGER, conman); + config.property(ApacheClientProperties.RETRY_HANDLER, (HttpRequestRetryHandler) (IOException ex, int executionCount, HttpContext context) -> + { + // Extract the HTTP host from the context + HttpHost targetHost = (HttpHost) context.getAttribute(HttpCoreContext.HTTP_TARGET_HOST); + String serverName = targetHost != null ? targetHost.getHostName() : "Unknown"; + if (executionCount > maxRetryCount) { + if (log.isWarnEnabled()) log.warn("Maximum tries reached for client HTTP pool to server '{}'", serverName); + return false; + } + if (ex instanceof org.apache.http.NoHttpResponseException) { + if (log.isWarnEnabled()) log.warn("No response from server '{}' on {} call", serverName, executionCount); + return true; + } + return false; + }); + return ClientBuilder.newBuilder(). withConfig(config). sslContext(ctx).