This is an automated email from the ASF dual-hosted git repository.

git-site-role pushed a commit to branch asf-staging
in repository https://gitbox.apache.org/repos/asf/jena-site.git


The following commit(s) were added to refs/heads/asf-staging by this push:
     new be77c3979 Staged site from main-next 
(3c9589cfb09c1c61d724869f813191a8d70feb63)
be77c3979 is described below

commit be77c39792d7a628dcea536699559fd917a2f3fc
Author: jenkins <[email protected]>
AuthorDate: Thu Aug 25 09:21:12 2022 +0000

    Staged site from main-next (3c9589cfb09c1c61d724869f813191a8d70feb63)
---
 content/documentation/geosparql/index.html     |  7 +++-
 content/documentation/query/sparql-remote.html |  6 ++-
 content/documentation/shacl/index.html         | 56 ++++++++++++++++++++++++++
 content/sitemap.xml                            |  8 ++--
 4 files changed, 70 insertions(+), 7 deletions(-)

diff --git a/content/documentation/geosparql/index.html 
b/content/documentation/geosparql/index.html
index 8ec7aed22..f9715625e 100644
--- a/content/documentation/geosparql/index.html
+++ b/content/documentation/geosparql/index.html
@@ -470,6 +470,10 @@ large dataset.</p>
 maximum size and duration until unused items are removed.  Query rewriting can
 be switched on independently of the indexes, i.e. query rewriting can be
 performed but an index is configured to not store the result.</p>
+<p>As an extension to the standard, supplying a <code>Geometry Literal</code> 
is
+also permitted. For example:</p>
+<pre><code>    ?subj geo:sfContains &quot;POINT(0 0)&quot;^^geo:wktLiteral .
+</code></pre>
 <h3 id="dataset-conversion">Dataset Conversion</h3>
 <p>Methods to convert datasets between serialisations and spatial/coordinate
 reference systems are available in:
@@ -886,7 +890,8 @@ function and <code>geo:isValid</code> property for a 
Geometry resource are not p
 GeoSPARQL standard but have been included as a minor variation.</p>
 <h2 id="future-work">Future Work</h2>
 <ul>
-<li>Implementing GeoJSON as a <code>GeometryLiteral</code> serialisation (<a 
href="https://tools.ietf.org/html/rfc7946";>https://tools.ietf.org/html/rfc7946</a>).</li>
+<li>Implementing GeoJSON as a <code>GeometryLiteral</code> serialisation (<a 
href="https://tools.ietf.org/html/rfc7946";>https://tools.ietf.org/html/rfc7946</a>).
+Producing GeoJSON is already possible with 
<strong>geof:asGeoJSON</strong>(<em>?geometryLiteral</em>).</li>
 </ul>
 <h2 id="contributors">Contributors</h2>
 <p>The following individuals have made contributions to this project:</p>
diff --git a/content/documentation/query/sparql-remote.html 
b/content/documentation/query/sparql-remote.html
index 9c66c3958..e012d58d5 100644
--- a/content/documentation/query/sparql-remote.html
+++ b/content/documentation/query/sparql-remote.html
@@ -198,10 +198,12 @@ HTTP specific settings; the default should work in most 
cases.</p>
 <p>The results are held locally after remote execution and can be
 processed as usual.</p>
 <h2 id="from-the-command-line">From the command line</h2>
-<p>The <a href="cmds.html#arq.sparql"><code>arq.sparql</code> command</a> can 
issue remote
+<p>The <a href="cmds.html#arq.rsparql"><code>arq.rsparql</code> command</a> 
can issue remote
 query requests using the <code>--service</code> argument:</p>
-<pre><code>java -cp ... arq.query --service 'http://host/service' 'SELECT ?s 
WHERE {?s [] []}'
+<pre><code>java -cp ... arq.rsparql --service 'http://host/service' --query 
'SELECT ?s WHERE {?s [] []}'
 </code></pre>
+<p>Or:
+rsparql &ndash;service &lsquo;http://host/service&rsquo; &ndash;query 
&lsquo;SELECT ?s WHERE {?s [] []}&rsquo;</p>
 <p>This takes a URL that is the service location.</p>
 <p>The query given is parsed locally to check for syntax errors before
 sending.</p>
diff --git a/content/documentation/shacl/index.html 
b/content/documentation/shacl/index.html
index 19a6b0650..8ad37ad9b 100644
--- a/content/documentation/shacl/index.html
+++ b/content/documentation/shacl/index.html
@@ -305,6 +305,62 @@ for details.</p>
             }
             &quot;&quot;&quot; ;
     ] ;
+</code></pre><h2 id="validationlistener">ValidationListener</h2>
+<p>When given a <code>ValidationListener</code> the SHACL validation code 
emits events at each step of validation:</p>
+<ul>
+<li>when validation of a shape starts or finishes</li>
+<li>when the focus nodes of the shape have been identified</li>
+<li>when validation of a constraint begins, ends and yields positive or 
negative results</li>
+</ul>
+<p>For example, the following listener will just record all events in a 
List:</p>
+<pre><code>public class RecordingValidationListener implements 
ValidationListener {
+        private final List&lt;ValidationEvent&gt; events = new 
ArrayList&lt;&gt;();
+
+        @Override public void onValidationEvent(ValidationEvent e) {
+            events.add(e);
+        }
+
+        public List&lt;ValidationEvent&gt; getEvents() {
+            return events;
+        }
+    }
+</code></pre><p>The listener must be passed to the constructor of the 
<code>ValidationContext</code>.
+The following example validates the <code>dataGraph</code> according to the 
<code>shapesGraph</code> using the ValidationListener above:</p>
+<pre><code>    Graph shapesGraph = RDFDataMgr.loadGraph(shapesGraphUri); 
//assuming shapesGraphUri points to an RDF file
+    Graph dataGraph = RDFDataMgr.loadGraph(dataGraphUri); //assuming 
dataGraphUri points to an RDF file
+    RecordingValidationListener listener = new RecordingValidationListener();  
// see above
+    Shapes shapes = Shapes.parse(shapesGraph);
+    ValidationContext vCtx = ValidationContext.create(shapes, dataGraph, 
listener); // pass listener here
+    for (Shape shape : shapes.getTargetShapes()) {
+        Collection&lt;Node&gt; focusNodes = VLib.focusNodes(dataGraph, shape);
+        for (Node focusNode : focusNodes) {
+            VLib.validateShape(vCtx, dataGraph, shape, focusNode);
+        }
+    }
+    List&lt;ValidationEvent&gt; actualEvents = listener.getEvents(); // all 
events have been recorded
+</code></pre><p>The events thus generated might look like this 
(<code>event.toString()</code>, one per line):</p>
+<pre><code> 
FocusNodeValidationStartedEvent{focusNode=http://datashapes.org/sh/tests/core/node/class-001.test#Someone,
 
shape=NodeShape[http://datashapes.org/sh/tests/core/node/class-001.test#TestShape]}
+ 
ConstraintEvaluationForNodeShapeStartedEvent{constraint=ClassConstraint[&lt;http://datashapes.org/sh/tests/core/node/class-001.test#Person&gt;],
 focusNode=http://datashapes.org/sh/tests/core/node/class-001.test#Someone, 
shape=NodeShape[http://datashapes.org/sh/tests/core/node/class-001.test#TestShape]}
+ 
ConstraintEvaluatedOnFocusNodeEvent{constraint=ClassConstraint[&lt;http://datashapes.org/sh/tests/core/node/class-001.test#Person&gt;],
 focusNode=http://datashapes.org/sh/tests/core/node/class-001.test#Someone, 
shape=NodeShape[http://datashapes.org/sh/tests/core/node/class-001.test#TestShape],
 valid=true}
+ 
ConstraintEvaluationForNodeShapeFinishedEvent{constraint=ClassConstraint[&lt;http://datashapes.org/sh/tests/core/node/class-001.test#Person&gt;],
 focusNode=http://datashapes.org/sh/tests/core/node/class-001.test#Someone, 
shape=NodeShape[http://datashapes.org/sh/tests/core/node/class-001.test#TestShape]}
+ 
FocusNodeValidationFinishedEvent{focusNode=http://datashapes.org/sh/tests/core/node/class-001.test#Someone,
 
shape=NodeShape[http://datashapes.org/sh/tests/core/node/class-001.test#TestShape]}
+[...]    
+</code></pre><p>Many use cases can be addressed with the 
<code>HandlerBasedValidationListener</code>, which allows for registering event 
handlers on a per-event basis.
+For example:</p>
+<pre><code>    ValidationListener myListener = HandlerBasedValidationListener
+        .builder()
+        .forEventType(FocusNodeValidationStartedEvent.class)
+        .addSimpleHandler(e -&gt; {
+           // ... 
+        })
+        .forEventType(ConstraintEvaluatedEvent.class)
+        .addHandler(c -&gt; c
+            .iff(EventPredicates.isValid()) // use a 
Predicate&lt;ValidationEvent&gt; to select events
+            .handle(e -&gt; {
+                // ...
+            })
+        )
+        .build();
 </code></pre>
 
         </div>
diff --git a/content/sitemap.xml b/content/sitemap.xml
index b19eefd60..ae315cf39 100644
--- a/content/sitemap.xml
+++ b/content/sitemap.xml
@@ -69,7 +69,7 @@
   
   <url>
     <loc>https://jena.apache.org/documentation/geosparql/</loc>
-    <lastmod>2022-02-23T17:08:04+00:00</lastmod>
+    <lastmod>2022-08-25T11:16:58+02:00</lastmod>
   </url>
   
   <url>
@@ -94,7 +94,7 @@
   
   <url>
     <loc>https://jena.apache.org/documentation/shacl/</loc>
-    <lastmod>2022-01-21T10:23:11+00:00</lastmod>
+    <lastmod>2022-08-25T11:16:35+02:00</lastmod>
   </url>
   
   <url>
@@ -204,7 +204,7 @@
   
   <url>
     <loc>https://jena.apache.org/documentation/query/sparql-remote.html</loc>
-    <lastmod>2021-11-05T16:04:36+00:00</lastmod>
+    <lastmod>2022-08-25T11:17:26+02:00</lastmod>
   </url>
   
   <url>
@@ -329,7 +329,7 @@
   
   <url>
     <loc>https://jena.apache.org/documentation.html</loc>
-    <lastmod>2022-08-20T12:20:18+01:00</lastmod>
+    <lastmod>2022-08-25T11:17:26+02:00</lastmod>
   </url>
   
   <url>

Reply via email to