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 8f524230a Staged site from main-next
(b22a26fc053962f8e2ce50f58056a879b799a32a)
8f524230a is described below
commit 8f524230ad95b279713dcde33202dd9ec04ac71e
Author: jenkins <[email protected]>
AuthorDate: Sat Aug 20 11:06:43 2022 +0000
Staged site from main-next (b22a26fc053962f8e2ce50f58056a879b799a32a)
---
content/about_jena/contributions.html | 11 +-
.../fuseki2/fuseki-server-protocol.html | 3 +-
content/documentation/index.xml | 17 +-
content/documentation/io/rdf-input.html | 2 +-
...unctions.html => custom_service_executors.html} | 186 +++++++--------------
content/documentation/query/index.html | 47 ++----
.../documentation/query/javascript-functions.html | 21 ++-
content/documentation/rdfconnection/index.html | 27 +--
content/documentation/tdb2/tdb2_admin.html | 5 +-
content/documentation/tdb2/tdb2_cmds.html | 5 +
content/documentation/tools/index.html | 2 +-
content/getting_involved/index.html | 2 +-
content/index.xml | 17 +-
content/sitemap.xml | 37 ++--
14 files changed, 172 insertions(+), 210 deletions(-)
diff --git a/content/about_jena/contributions.html
b/content/about_jena/contributions.html
index a2af2018d..ae64ddbfa 100644
--- a/content/about_jena/contributions.html
+++ b/content/about_jena/contributions.html
@@ -205,7 +205,7 @@ Jira issue with the details to be published.</p>
<td>HTTP server application compliant with the GeoSPARQL standard using
GeoSPARQL Jena library and Apache Jena Fuseki server</td>
<td>Apache 2.0</td>
<td>Greg Albiston</td>
-<td><a href="https://github.com/galbiston/geosparql-fuskei">geosparql-fuseki
at GitHub</a></td>
+<td><a href="https://github.com/galbiston/geosparql-fuseki">geosparql-fuseki
at GitHub</a></td>
</tr>
<tr>
<td>Jastor</td>
@@ -310,14 +310,7 @@ Jira issue with the details to be published.</p>
<td>JDBC 4 SPARQL is a type 4 JDBC Driver that uses a SPARQL endpoint (or Jena
Model) as the data store. Presents graph data as relational data to tools that
understand SQL and utilize JDBC</td>
<td>Apache 2.0 (Some components GNU LGPL V3.0)</td>
<td>Claude Warren</td>
-<td>[jdbc4sparql at</td>
-</tr>
-<tr>
-<td>GitHub](<a
href="https://github.com/Claudenw/jdbc4sparql">https://github.com/Claudenw/jdbc4sparql</a>)</td>
-<td></td>
-<td></td>
-<td></td>
-<td></td>
+<td><a href="https://github.com/Claudenw/jdbc4sparql">jdbc4sparql at
GitHub</a></td>
</tr>
</tbody>
</table>
diff --git a/content/documentation/fuseki2/fuseki-server-protocol.html
b/content/documentation/fuseki2/fuseki-server-protocol.html
index e47a1b06c..f04cd3ac5 100644
--- a/content/documentation/fuseki2/fuseki-server-protocol.html
+++ b/content/documentation/fuseki2/fuseki-server-protocol.html
@@ -311,7 +311,7 @@ Further operations may be added within this naming
scheme.</p>
</tr>
<tr>
<td><tt>POST</tt></td>
-<td><code>/$/compact/{name}</code></td>
+<td><code>/$/compact/{name}?deleteOld=true</code></td>
<td></td>
</tr>
<tr>
@@ -435,6 +435,7 @@ a list of file names.</p>
<h3 id="compact">Compact</h3>
<p>Pattern: <code>/$/compact/{name}</code></p>
<p>This operations initiates a database compaction task and returns a JSON
object with the task Id in it.</p>
+<p>The optional parameter and value <code>deleteOld=true</code> deletes the
database which currently is compacted after compacting completion.</p>
<p>Compaction <strong>ONLY</strong> applies to TDB2 datasets, see <a
href="../tdb2/tdb2_admin.html#compaction">TDB2 Database Administration</a>
for more details of this operation.</p>
<p>You can monitor the status of the task via the Tasks portion of the API. A
successful compaction will have
diff --git a/content/documentation/index.xml b/content/documentation/index.xml
index 19f61aab0..c1b03ef98 100644
--- a/content/documentation/index.xml
+++ b/content/documentation/index.xml
@@ -297,6 +297,17 @@ In order to eliminate this limitation, Jena ARQ extends
the grammar of the CONST
See jena-examples:arq/examples/aggregates.</description>
</item>
+ <item>
+ <title>ARQ - Custom Service Executors</title>
+
<link>https://jena.apache.org/documentation/query/custom_service_executors.html</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+
<guid>https://jena.apache.org/documentation/query/custom_service_executors.html</guid>
+ <description>Since Jena 4.2.0, ARQ features a plugin system for custom
service executors. The relevant classes are located in the package
org.apache.jena.sparql.service and are summarized as follows:
+ ServiceExecutorRegistry: A registry that holds a list of service executors.
When Jena starts up, it configures a default registry to handle SERVICE
requests against HTTP SPARQL endpoints and registers it with the global ARQ
context accessible under ARQ.getContext().
+ ServiceExecutorFactory: This is the main interface for custom SERVICE
handler implementations:</description>
+ </item>
+
<item>
<title>ARQ - Extending Query Execution</title>
<link>https://jena.apache.org/documentation/query/arq-query-eval.html</link>
@@ -357,9 +368,9 @@ ARQ consists of the following parts:
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://jena.apache.org/documentation/query/javascript-functions.html</guid>
- <description>ARQ supports (Jena v3.7.0 onwards) writing custom SPARQL
functions in JavaScript. These functions can be used in FILTERs and for
calculating values to assign with AS in BIND and SELECT expressions.
+ <description>ARQ supports writing custom SPARQL functions in JavaScript.
These functions can be used in FILTERs and for calculating values to assign
with AS in BIND and SELECT expressions.
XSD datatypes for strings, numbers and booleans are converted to the native
JavaScript datatypes. RDFterms that do not fit easily into JavaScript datatypes
are handled with a object class NV.
-Loading JavaScript functions JavaScript is loaded from an external file using
the context setting &ldquo;http://jena.</description>
+Requirements ARQ requires a javascript engine such as GraalVM to be added to
the classpath.</description>
</item>
<item>
@@ -1855,7 +1866,7 @@ Compared to TDB1:
<description>TDB2 is not compatible with TDB1
Do not run TDB1 tools on a TDB2 database, nor run TDB2 tools on a TDB1
database.
These scripts are available jena binary distribution.
- tdb2.tdbbackup tdb2.tdbdump tdb2.tdbcompact tdb2.tdbloader tdb2.tdbquery
tdb2.tdbupdate On MS Windows, these commands are called tdb2_tdbquery etc.
+ tdb2.tdbbackup tdb2.tdbdump tdb2.tdbcompact tdb2.tdbloader tdb2.tdbquery
tdb2.tdbupdate tdb2.tdbstats On MS Windows, these commands are called
tdb2_tdbquery etc.
Example usage:
tdb2.tdbloader --loc &lt;DB location&gt; file1 file2 ... Note:
tdbloader2 is a TDB1 command tool.
diff --git a/content/documentation/io/rdf-input.html
b/content/documentation/io/rdf-input.html
index 1d5f81106..3d02a168b 100644
--- a/content/documentation/io/rdf-input.html
+++ b/content/documentation/io/rdf-input.html
@@ -407,7 +407,7 @@ copies of import http resources).</p>
<h3 id="configuring-a-locationmapper">Configuring a
<code>LocationMapper</code></h3>
<p>Location mapping files are RDF, usually written in Turtle although
an RDF syntax can be used.</p>
-<pre><code>@prefix lm: <http://jena.hpl.hp.com/2004/08/location-mapping#>
+<pre><code>@prefix lm:
<http://jena.hpl.hp.com/2004/08/location-mapping#> .
[] lm:mapping
[ lm:name "file:foo.ttl" ; lm:altName
"file:etc/foo.ttl" ] ,
diff --git a/content/documentation/query/javascript-functions.html
b/content/documentation/query/custom_service_executors.html
similarity index 50%
copy from content/documentation/query/javascript-functions.html
copy to content/documentation/query/custom_service_executors.html
index 646804458..06573ec17 100644
--- a/content/documentation/query/javascript-functions.html
+++ b/content/documentation/query/custom_service_executors.html
@@ -3,7 +3,7 @@
<head>
- <title>Apache Jena - ARQ - JavaScript SPARQL Functions</title>
+ <title>Apache Jena - ARQ - Custom Service Executors</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
@@ -124,7 +124,7 @@
- <li id="edit"><a
href="https://github.com/apache/jena-site/edit/main/source/documentation/query/javascript-functions.md"
title="Edit this page on GitHub"><span class="glyphicon
glyphicon-pencil"></span> Edit this page</a></li>
+ <li id="edit"><a
href="https://github.com/apache/jena-site/edit/main/source/documentation/query/custom_service_executors.md"
title="Edit this page on GitHub"><span class="glyphicon
glyphicon-pencil"></span> Edit this page</a></li>
</ul>
</div>
</div>
@@ -167,7 +167,7 @@
- <li class="active">JAVASCRIPT FUNCTIONS</li>
+ <li class="active">CUSTOM SERVICE EXECUTORS</li>
@@ -179,129 +179,65 @@
</div>
- <h1 class="title">ARQ - JavaScript SPARQL Functions</h1>
+ <h1 class="title">ARQ - Custom Service Executors</h1>
- <p>ARQ supports (Jena v3.7.0 onwards) writing
-<a href="https://www.w3.org/TR/sparql11-query/#extensionFunctions">custom
SPARQL functions</a>
-in JavaScript. These functions can be used in FILTERs and for calculating
-values to assign with AS in BIND and SELECT expressions.</p>
-<p>XSD datatypes for strings, numbers and booleans are converted to the
-native JavaScript datatypes. RDFterms that do not fit easily into
-JavaScript datatypes are handled with a object class <code>NV</code>.</p>
-<h2 id="loading-javascript-functions">Loading JavaScript functions</h2>
-<p>JavaScript is loaded from an external file using the context setting
-“<a
href="http://jena.apache.org/ARQ#js-library%22">http://jena.apache.org/ARQ#js-library"</a>.
This can be written as
-<code>arq:js-library</code> for commands and Fuseki configuration files.</p>
-<p>Example:</p>
-<pre><code>sparql --set arq:js-library=SomeFile.js --data ... --query ...
-</code></pre>
-<p>will execute on the data with the JavaScript functions from file
-“SomeFile.js” available.</p>
-<p>JavScript functions can also be set from a string directly from within Java
using constant
-<code>ARQ.symJavaScriptFunctions</code> (“<a
href="http://jena.apache.org/ARQ#js-functions%22)">http://jena.apache.org/ARQ#js-functions")</a>.</p>
-<h2 id="using-javascript-functions">Using JavaScript functions</h2>
-<p>SPARQL functions implemented in JavaScript are automatically called when a
-URI starting “<a
href="http://jena.apache.org/ARQ/jsFunction#%22">http://jena.apache.org/ARQ/jsFunction#"</a>
used.</p>
-<p>This can conveniently be abbreviated by:</p>
-<pre><code>PREFIX js: <http://jena.apache.org/ARQ/jsFunction#>
-</code></pre>
-<h3 id="arguments-and-function-results">Arguments and Function Results</h3>
-<p><code>xsd:string</code> (a string with no language tag), any XSD numbers
(integer,
-decimal, float, double and all the derived types) and <code>xsd:boolean</code>
are
-converted to JavaScript string, number and boolean respectively.</p>
-<p>SPARQL functions must return a value. When a function returns a value,
-it can be one of these JavaScript native datatypes, in which case the
-reverse conversion is applied back to XSD datatypes. For numbers, the
-conversion is back to <code>xsd:integer</code> (if it has no fractional part)
or
-<code>xsd:double</code>.</p>
-<p>The JavaScript function can also create <code>NodeValue</code> (or
<code>NV</code>) objects
-for other datatypes by calling Java from within the JavaScript script
-engine of the Java runtime.</p>
-<p>URIs are passed as <code>NV</code> object and are available in JavaScript
as a string.</p>
-<p>The class <code>NV</code> is used for all other RDF terms.</p>
-<p>Returning JavaScript <code>null</code> is the error indicator and a SPARQL
-expression error (<code>ExprEvalException</code>) is raised, like any other
-expression error in SPARQL. That, in turn, will cause the whole
-expression the function is part of to evaluate to an error (unless
-a special form like <code>COALESCE</code> is used). In a <code>FILTER</code>
that typically
-makes the filter evaluate to “false”.</p>
-<h2 id="example">Example</h2>
-<p>Suppose “functions.js” contains code to camel case words in a
string.
-For example, “some words to process " becomes
“someWordsToProcess”.</p>
-<pre><code>// CamelCase a string
-// Words to be combined are separated by a space in the string.
-
-function toCamelCase(str) {
- return str.split(' ')
- .map(cc)
- .join('');
-}
-
-function ucFirst(word) {
- return word.charAt(0).toUpperCase() + word.slice(1).toLowerCase();
-}
-
-function lcFirst(word) {
- return word.toLowerCase();
-}
-
-function cc(word,index) {
- return (index == 0) ? lcFirst(word) : ucFirst(word);
-}
-</code></pre>
-<p>and the query <code>Q.rq</code></p>
-<pre><code>PREFIX js: <http://jena.apache.org/ARQ/jsFunction#>
-
-SELECT ?input (js:toCamelCase(?input) AS ?X)
-{
- VALUES ?input { "some woRDs to PROCESS" }
-}
-</code></pre>
-<p>which can be executed with:</p>
-<pre><code>sparql --set arq:js-library=functions.js --query Q.rq
-</code></pre>
-<p>and it results in:</p>
-<pre><code>--------------------------------------------------
-| input | X |
-==================================================
-| "some woRDs to PROCESS" | "someWordsToProcess" |
---------------------------------------------------
-</code></pre>
-<h2 id="use-with-fuseki">Use with Fuseki</h2>
-<p>The context setting can be provided on the command line starting the
-server, for example:</p>
-<pre><code>fuseki --set arq:js-library=functions.js --mem /ds
-</code></pre>
-<p>or it can be specified in the server configuration file
<code>config.ttl</code>:</p>
-<pre><code>PREFIX : <#>
-PREFIX fuseki: <http://jena.apache.org/fuseki#>
-PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
-PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
-PREFIX ja: <http://jena.hpl.hp.com/2005/11/Assembler#>
-
-[] rdf:type fuseki:Server ;
- # Set the server-wide context
- ja:context [
- ja:cxtName "arq:js-library" ;
- ja:cxtValue "/filepath/functions.js"
- ] ;
-.
-
-<#service> rdf:type fuseki:Service;
- rdfs:label "Dataset";
- fuseki:name "ds";
- fuseki:serviceQuery "sparql";
- fuseki:dataset <#dataset> ;
- .
-
-<#dataset> rdf:type ja:DatasetTxnMem;
- ja:data <file:D.trig>;
-.
-</code></pre>
-<p>and used as:</p>
-<pre><code>fuseki --conf config.ttl
-</code></pre>
-
+ <p>Since Jena 4.2.0, ARQ features a plugin system for custom service
executors.
+The relevant classes are located in the package
<code>org.apache.jena.sparql.service</code> and are summarized as follows:</p>
+<ul>
+<li>
+<p><code>ServiceExecutorRegistry</code>: A registry that holds a list of
service executors. When Jena starts up, it configures a default registry to
handle <code>SERVICE</code> requests against HTTP SPARQL endpoints and
registers it with the global ARQ context accessible under
<code>ARQ.getContext()</code>.</p>
+</li>
+<li>
+<p><code>ServiceExecutorFactory</code>: This is the main interface for custom
SERVICE handler implementations:</p>
+</li>
+</ul>
+<div class="highlight"><pre
style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code
class="language-java" data-lang="java"><span
style="color:#a2f;font-weight:bold">public</span> <span
style="color:#a2f;font-weight:bold">interface</span> <span
style="color:#00f">ServiceExecutorFactory</span> <span
style="color:#666">{</span>
+ <span style="color:#a2f;font-weight:bold">public</span> ServiceExecution
<span style="color:#00a000">createExecutor</span><span
style="color:#666">(</span>OpService substituted<span
style="color:#666">,</span> OpService original<span style="color:#666">,</span>
Binding binding<span style="color:#666">,</span> ExecutionContext execCxt<span
style="color:#666">);</span>
+<span style="color:#666">}</span>
+</code></pre></div><p>The second OpService parameter represents the original
<code>SERVICE</code> clause as it occurs in the query, whereas the first
parameter is the OpService obtained after substitution of all mentioned
variables w.r.t. the current binding.
+A <code>ServiceExecutorFactory</code> can indicate its non-applicability for
handling a request simply by returning <code>null</code>. In that case, Jena
will ask the next service executor factory in the registry. If a request
remains unhandled then the QueryExecException <code>No SERVICE handler</code>
is raised.</p>
+<ul>
+<li><code>ServiceExecution</code>: If a <code>ServiceExectorFactory</code> can
handle a request then it needs to returns a <code>ServiceExecution</code>
instance:</li>
+</ul>
+<div class="highlight"><pre
style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code
class="language-java" data-lang="java"><span
style="color:#a2f;font-weight:bold">public</span> <span
style="color:#a2f;font-weight:bold">interface</span> <span
style="color:#00f">ServiceExecution</span> <span style="color:#666">{</span>
+ <span style="color:#a2f;font-weight:bold">public</span> QueryIterator
<span style="color:#00a000">exec</span><span style="color:#666">();</span>
+<span style="color:#666">}</span>
+</code></pre></div><p>The actual execution is started by calling the
<code>exec()</code> method which returns a <code>QueryIterator</code>.
+Note, that there are uses cases where ServiceExecution instances may not have
to be executed. For example, one may analyze which service executor factories
among a set of them claim to be capable of handling a request. This can be
useful for debugging or display in a dashboard of applicable service
executors.</p>
+<h2 id="examples">Examples</h2>
+<p>A runnable example suite is located in the jena-examples module at <a
href="https://github.com/apache/jena/blob/main/jena-examples/src/main/java/arq/examples/service/CustomServiceExecutor.java">CustomServiceExecutor.java</a>.</p>
+<p>In the remainder we summarize the essentials of setting up a custom service
executor.
+The following snippet sets up a simple service executor factory that relays
queries targeted at Wikidata to DBpedia:</p>
+<div class="highlight"><pre
style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code
class="language-java" data-lang="java">Node WIKIDATA <span
style="color:#666">=</span> NodeFactory<span style="color:#666">.</span><span
style="color:#b44">createURI</span><span style="color:#666">(</span><span
style="color:#b44">"http://query.wikidata.org/sparql"</span><span
style="color:#666">);</span>
+Node DBPEDIA <span style="color:#666">=</span> NodeFactory<span
style="color:#666">.</span><span style="color:#b44">createURI</span><span
style="color:#666">(</span><span
style="color:#b44">"http://dbpedia.org/sparql"</span><span
style="color:#666">);</span>
+
+ServiceExecutorFactory myExecutorFactory <span style="color:#666">=</span>
<span style="color:#666">(</span>opExecute<span style="color:#666">,</span>
original<span style="color:#666">,</span> binding<span
style="color:#666">,</span> execCxt<span style="color:#666">)</span> <span
style="color:#666">-></span> <span style="color:#666">{</span>
+ <span style="color:#a2f;font-weight:bold">if</span> <span
style="color:#666">(</span>opExecute<span style="color:#666">.</span><span
style="color:#b44">getService</span><span style="color:#666">().</span><span
style="color:#b44">equals</span><span style="color:#666">(</span>WIKIDATA<span
style="color:#666">))</span> <span style="color:#666">{</span>
+ opExecute <span style="color:#666">=</span> <span
style="color:#a2f;font-weight:bold">new</span> OpService<span
style="color:#666">(</span>DBPEDIA<span style="color:#666">,</span>
opExecute<span style="color:#666">.</span><span
style="color:#b44">getSubOp</span><span style="color:#666">(),</span>
opExecute<span style="color:#666">.</span><span
style="color:#b44">getSilent</span><span style="color:#666">());</span>
+ <span style="color:#a2f;font-weight:bold">return</span>
ServiceExecutorRegistry<span style="color:#666">.</span><span
style="color:#b44">httpService</span><span style="color:#666">.</span><span
style="color:#b44">createExecutor</span><span
style="color:#666">(</span>opExecute<span style="color:#666">,</span>
original<span style="color:#666">,</span> binding<span
style="color:#666">,</span> execCxt<span style="color:#666">);</span>
+ <span style="color:#666">}</span>
+ <span style="color:#a2f;font-weight:bold">return</span> <span
style="color:#a2f;font-weight:bold">null</span><span style="color:#666">;</span>
+<span style="color:#666">};</span>
+</code></pre></div><h3
id="global-vs-local-service-executor-registration">Global vs Local Service
Executor Registration</h3>
+<p>The global registry can be accessed and modified as shown below:</p>
+<div class="highlight"><pre
style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code
class="language-java" data-lang="java">ServiceExecutorRegistry globalRegistry
<span style="color:#666">=</span> ServiceExecutorRegistry<span
style="color:#666">.</span><span style="color:#b44">get</span><span
style="color:#666">();</span>
+
+<span style="color:#080;font-style:italic">// Note: registry.add() prepends
executor factories to the internal list such
+</span><span style="color:#080;font-style:italic">// that they are consulted
first!
+</span><span style="color:#080;font-style:italic"></span>globalRegistry<span
style="color:#666">.</span><span style="color:#b44">add</span><span
style="color:#666">(</span>myExecutorFactory<span style="color:#666">);</span>
+
+</code></pre></div><p>The following snippet shows how a custom service
executor can be configured locally for an individual query execution:</p>
+<div class="highlight"><pre
style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code
class="language-java" data-lang="java">Context cxt <span
style="color:#666">=</span> ARQ<span style="color:#666">.</span><span
style="color:#b44">getContext</span><span style="color:#666">().</span><span
style="color:#b44">copy</span><span style="color:#666">();</span>
+ServiceExecutorRegistry localRegistry <span style="color:#666">=</span>
ServiceExecutorRegistry<span style="color:#666">().</span><span
style="color:#b44">get</span><span style="color:#666">().</span><span
style="color:#b44">copy</span><span style="color:#666">();</span>
+localRegistry<span style="color:#666">.</span><span
style="color:#b44">add</span><span
style="color:#666">(</span>myExecutorFactory<span style="color:#666">);</span>
+
+String queryStr <span style="color:#666">=</span> <span
style="color:#b44">"SELECT * { SERVICE
<http://query.wikidata.org/sparql> { ?s ?p "</span>Apache Jena<span
style="color:#b44">"@en } }"</span><span style="color:#666">;</span>
+<span style="color:#a2f;font-weight:bold">try</span> <span
style="color:#666">(</span>QueryExecution qe <span style="color:#666">=</span>
QueryExecutionFactory<span style="color:#666">.</span><span
style="color:#b44">create</span><span style="color:#666">(</span>queryStr<span
style="color:#666">))</span> <span style="color:#666">{</span>
+ ServiceExecutorRegistry<span style="color:#666">.</span><span
style="color:#b44">set</span><span style="color:#666">(</span>qe<span
style="color:#666">.</span><span style="color:#b44">getContext</span><span
style="color:#666">(),</span> registry<span style="color:#666">);</span>
+ <span style="color:#080;font-style:italic">// ...
+</span><span style="color:#080;font-style:italic"></span><span
style="color:#666">}</span>
+
+</code></pre></div>
</div>
</div>
diff --git a/content/documentation/query/index.html
b/content/documentation/query/index.html
index 101297549..318d1f323 100644
--- a/content/documentation/query/index.html
+++ b/content/documentation/query/index.html
@@ -221,50 +221,29 @@ application usages</li>
</ul>
<p>Features of ARQ that are legal SPARQL syntax</p>
<ul>
-<li>
-<p><a href="function_forms.html">Conditions in FILTERs</a></p>
-</li>
-<li>
-<p><a href="text-query.html">Free text searches</a></p>
-</li>
-<li>
-<p><a href="rdf_lists.html">Accessing lists</a> (RDF collections)</p>
-</li>
-<li>
-<p><a href="extension.html">Extension mechanisms</a></p>
+<li><a href="function_forms.html">Conditions in FILTERs</a></li>
+<li><a href="text-query.html">Free text searches</a></li>
+<li><a href="rdf_lists.html">Accessing lists</a> (RDF collections)</li>
+<li><a href="extension.html">Extension mechanisms</a>
<ul>
<li><a href="extension.html#valueFunctions">Custom Expression
Functions</a></li>
<li><a href="extension.html#property-functions">Property Functions</a></li>
</ul>
</li>
-<li>
-<p>Library</p>
+<li>Library
<ul>
<li><a href="library-function.html">Expression function library</a></li>
<li><a href="library-propfunc.html">Property function library</a></li>
</ul>
</li>
-<li>
-<p><a href="writing_functions.html">Writing SPARQL functions</a></p>
-</li>
-<li>
-<p><a href="javascript-functions.html">Writing SPARQL functions in
JavaScript</a></p>
-</li>
-<li>
-<p><a href="programmatic.html">Constructing queries programmatically</a></p>
-</li>
-<li>
-<p><a href="parameterized-sparql-strings.html">Parameterized query
strings</a></p>
-</li>
-<li>
-<p><a href="algebra.html">ARQ and the SPARQL algebra</a></p>
-</li>
-<li>
-<p><a href="arq-query-eval.html">Extending ARQ query execution and accessing
different storage implementations</a></p>
-</li>
-<li>
-<p><a href="custom_aggregates.html">Custom aggregates</a></p>
-</li>
+<li><a href="writing_functions.html">Writing SPARQL functions</a></li>
+<li><a href="javascript-functions.html">Writing SPARQL functions in
JavaScript</a></li>
+<li><a href="custom_service_executors.html">Custom execution of
<code>SERVICE</code></a></li>
+<li><a href="programmatic.html">Constructing queries programmatically</a></li>
+<li><a href="parameterized-sparql-strings.html">Parameterized query
strings</a></li>
+<li><a href="algebra.html">ARQ and the SPARQL algebra</a></li>
+<li><a href="arq-query-eval.html">Extending ARQ query execution and accessing
different storage implementations</a></li>
+<li><a href="custom_aggregates.html">Custom aggregates</a></li>
</ul>
<h2 id="extensions">Extensions</h2>
<p>Feature of ARQ that go beyond SPARQL syntax. The default query
diff --git a/content/documentation/query/javascript-functions.html
b/content/documentation/query/javascript-functions.html
index 646804458..6ffbac151 100644
--- a/content/documentation/query/javascript-functions.html
+++ b/content/documentation/query/javascript-functions.html
@@ -181,14 +181,31 @@
</div>
<h1 class="title">ARQ - JavaScript SPARQL Functions</h1>
- <p>ARQ supports (Jena v3.7.0 onwards) writing
+ <p>ARQ supports writing
<a href="https://www.w3.org/TR/sparql11-query/#extensionFunctions">custom
SPARQL functions</a>
in JavaScript. These functions can be used in FILTERs and for calculating
values to assign with AS in BIND and SELECT expressions.</p>
<p>XSD datatypes for strings, numbers and booleans are converted to the
native JavaScript datatypes. RDFterms that do not fit easily into
JavaScript datatypes are handled with a object class <code>NV</code>.</p>
-<h2 id="loading-javascript-functions">Loading JavaScript functions</h2>
+<h2 id="requirements">Requirements</h2>
+<p>ARQ requires a javascript engine such as <a
href="https://www.graalvm.org/">GraalVM</a> to
+be added to the classpath.</p>
+<pre><code> <properties>
+ <ver.graalvm>....</ver.graalvm>
+ ...
+</code></pre><pre><code> <dependency>
+ <groupId>org.graalvm.js</groupId>
+ <artifactId>js</artifactId>
+ <version>${ver.graalvm}/version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.graalvm.js</groupId>
+ <artifactId>js-scriptengine</artifactId>
+ <version>${ver.graalvm}/version>
+ </dependency>
+</code></pre><h2 id="loading-javascript-functions">Loading JavaScript
functions</h2>
<p>JavaScript is loaded from an external file using the context setting
“<a
href="http://jena.apache.org/ARQ#js-library%22">http://jena.apache.org/ARQ#js-library"</a>.
This can be written as
<code>arq:js-library</code> for commands and Fuseki configuration files.</p>
diff --git a/content/documentation/rdfconnection/index.html
b/content/documentation/rdfconnection/index.html
index e4c34fbe6..6b41be07d 100644
--- a/content/documentation/rdfconnection/index.html
+++ b/content/documentation/rdfconnection/index.html
@@ -195,9 +195,9 @@ passing styles, as well the more basic sequence of methods
calls.</p>
some data, and one to make a query can be written as:</p>
<pre><code>try ( RDFConnection conn = RDFConnection.connect(...) ) {
conn.load("data.ttl") ;
- conn.querySelect("SELECT DISTINCT ?s { ?s ?p ?o }", (qs)->
+ conn.querySelect("SELECT DISTINCT ?s { ?s ?p ?o }", (qs) -> {
Resource subject = qs.getResource("s") ;
- System.out.println("Subject: "+subject) ;
+ System.out.println("Subject: " + subject) ;
}) ;
}
</code></pre>
@@ -210,7 +210,7 @@ ResultSet rs = qExec.execSelect() ;
while(rs.hasNext()) {
QuerySolution qs = rs.next() ;
Resource subject = qs.getResource("s") ;
- System.out.println("Subject: "+subject) ;
+ System.out.println("Subject: " + subject) ;
}
qExec.close() ;
conn.close() ;
@@ -224,12 +224,12 @@ to excessive overhead.</p>
<p>The <code>Txn</code> class provides a Java8-style transaction API.
Transactions are
code passed in the <code>Txn</code> library that handles the transaction
lifecycle.</p>
<pre><code>try ( RDFConnection conn = RDFConnection.connect(...) ) {
- Txn.execWrite(conn, ()-> {
+ Txn.execWrite(conn, () -> {
conn.load("data1.ttl") ;
conn.load("data2.ttl") ;
- conn.querySelect("SELECT DISTINCT ?s { ?s ?p ?o }", (qs)->
+ conn.querySelect("SELECT DISTINCT ?s { ?s ?p ?o }", (qs)
->
Resource subject = qs.getResource("s") ;
- System.out.println("Subject: "+subject) ;
+ System.out.println("Subject: " + subject) ;
}) ;
}) ;
}
@@ -240,9 +240,9 @@ code passed in the <code>Txn</code> library that handles
the transaction lifecyc
try {
conn.load("data1.ttl") ;
conn.load("data2.ttl") ;
- conn.querySelect("SELECT DISTINCT ?s { ?s ?p ?o }", (qs)->
+ conn.querySelect("SELECT DISTINCT ?s { ?s ?p ?o }", (qs)
-> {
Resource subject = qs.getResource("s") ;
- System.out.println("Subject: "+subject) ;
+ System.out.println("Subject: " + subject) ;
}) ;
conn.commit() ;
} finally { conn.end() ; }
@@ -299,7 +299,7 @@ add more RDF data into a graph, and delete a graph from a
dataset.</p>
<pre><code>try ( RDFConnection conn = RDFConnection.connect(...) ) {
conn.load("data1.ttl") ;
conn.load("data2.nt") ;
- }
+}
</code></pre>
<p>The file extension is used to determine the syntax.</p>
<p>There is also a set of scripts to help do these operations from the command
@@ -339,9 +339,9 @@ the application should create a copy which is not attached
to any external syste
with <code>ResultSetFactory.copyResults</code>.</p>
<pre><code> try ( RDFConnection conn =
RDFConnection.connect("https://...") ) {
ResultSet safeCopy =
- Txn.execReadReturn(conn, ()-> {
+ Txn.execReadReturn(conn, () -> {
// Process results by row:
- conn.querySelect("SELECT DISTINCT ?s { ?s ?p ?o }",
(qs)->{
+ conn.querySelect("SELECT DISTINCT ?s { ?s ?p ?o }",
(qs) -> {
Resource subject = qs.getResource("s") ;
System.out.println("Subject: "+subject) ;
}) ;
@@ -353,10 +353,11 @@ with <code>ResultSetFactory.copyResults</code>.</p>
<h2 id="update-usage">Update Usage</h2>
<p>SPARQL Update operations can be performed and mixed with other
operations.</p>
<pre><code> try ( RDFConnection conn = RDFConnection.connect(...) ) {
- Txn.execWrite(conn, ()-> {
+ Txn.execWrite(conn, () -> {
conn.update("DELETE DATA { ... }" ) ;
conn.load("data.ttl") ;
- }) ;
+ }) ;
+ }
</code></pre>
<h2 id="dataset-operations">Dataset operations</h2>
<p>In addition to the SPARQL Graph Store Protocol, operations on whole
diff --git a/content/documentation/tdb2/tdb2_admin.html
b/content/documentation/tdb2/tdb2_admin.html
index 52562e21b..143176eff 100644
--- a/content/documentation/tdb2/tdb2_admin.html
+++ b/content/documentation/tdb2/tdb2_admin.html
@@ -209,7 +209,10 @@ can be a long time for large databases.</p>
latest view of the RDF dataset into that directory, then switch to using
that generation of the database.</p>
<p>There is also a command line tool <code>tdb2.tdbcompact</code> to run the
-compaction process on a database not in use.</p>
+compaction process on a database not in use. The command line
+option <code>--deleteOld</code> removes the last database after
compaction.</p>
+<p>Compaction can also be called from <a
href="/documentation/fuseki2/fuseki-server-protocol.html#compact">the Fuseki
HTTP Administration Protocol</a>
+for live <a href="/documentation/fuseki2/fuseki-webapp.html">Fuseki
webapps</a>.</p>
<h2 id="backup">Backup</h2>
<p>A TDB2 database can be backed up by calling:</p>
<pre><code>DatabaseMgr.backup(dataset.asDatasetGraph());
diff --git a/content/documentation/tdb2/tdb2_cmds.html
b/content/documentation/tdb2/tdb2_cmds.html
index a684959ce..d4f2df2af 100644
--- a/content/documentation/tdb2/tdb2_cmds.html
+++ b/content/documentation/tdb2/tdb2_cmds.html
@@ -191,6 +191,7 @@
<li><code>tdb2.tdbloader</code></li>
<li><code>tdb2.tdbquery</code></li>
<li><code>tdb2.tdbupdate</code></li>
+<li><code>tdb2.tdbstats</code></li>
</ul>
<p>On MS Windows, these commands are called <code>tdb2_tdbquery</code> etc.</p>
<p>Example usage:</p>
@@ -256,6 +257,10 @@ and then 2 threads in parallel for building the other
indexes.</p>
performance providing enough RAM is available and the persistent storage
is SSD. It can consume all hardware resources, greatly impacting
any other applications running.</p>
+<h2 id="tdb2tdbstats"><code>tdb2.tdbstats</code></h2>
+<p>Produce statistics for the dataset, which can be used for optimization
rules. See the
+<a href="../tdb/optimizer.html#statistics-rule-file">TDB Optimizer
description.</a>.</p>
+<p>For TDB2 the statistic files is read and placed in the
<code>Data-NNNN</code> directory (<code>Data-0001/stats.opt</code>).</p>
</div>
diff --git a/content/documentation/tools/index.html
b/content/documentation/tools/index.html
index c1feaa31c..7dc42ceb2 100644
--- a/content/documentation/tools/index.html
+++ b/content/documentation/tools/index.html
@@ -290,7 +290,7 @@ pages describe these further.</p>
<p><strong><code>tdbbackup</code></strong>,
<strong><code>tdb2.tdbbackup</code></strong>: create a gzipped copy of the
Fuseki dataset’s triples.</p>
</li>
<li>
-<p><strong><code>tdbcompact</code></strong>,
<strong><code>tdb2.tdbcompact</code></strong>: reduce the size of the Fuseki
dataset.</p>
+<p><strong>not implemented for TDB1</strong>,
<strong><code>tdb2.tdbcompact</code></strong>: reduce the size of the Fuseki
dataset.</p>
</li>
</ul>
<h4 id="other-handy-command-line-tools">Other Handy Command Line Tools</h4>
diff --git a/content/getting_involved/index.html
b/content/getting_involved/index.html
index 61a770e69..a303de078 100644
--- a/content/getting_involved/index.html
+++ b/content/getting_involved/index.html
@@ -199,7 +199,7 @@ cd jena-site
<p>See also how to <a href="/download/maven.html">use Jena with Maven</a>.</p>
<p>If you have problems with any of our SNAPSHOTs, <a
href="/help_and_support/">let us know</a>.</p>
<p>You can check the state of each Jena development builds
-on the <a href="https://builds.apache.org/pview/?match=Jena_.*">Apache Jenkins
continuous integration server</a>.</p>
+on the <a href="https://builds.apache.org/job/Jena/">Apache Jenkins continuous
integration server</a>.</p>
<h3 id="git-repository">Git repository</h3>
<p>You can find the Jena source code in the Apache git repository:
<a
href="https://gitbox.apache.org/repos/asf/jena.git">https://gitbox.apache.org/repos/asf/jena.git</a></p>
diff --git a/content/index.xml b/content/index.xml
index 6bd65ed52..1308e6003 100644
--- a/content/index.xml
+++ b/content/index.xml
@@ -340,6 +340,17 @@ In order to eliminate this limitation, Jena ARQ extends
the grammar of the CONST
See jena-examples:arq/examples/aggregates.</description>
</item>
+ <item>
+ <title>ARQ - Custom Service Executors</title>
+
<link>https://jena.apache.org/documentation/query/custom_service_executors.html</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+
<guid>https://jena.apache.org/documentation/query/custom_service_executors.html</guid>
+ <description>Since Jena 4.2.0, ARQ features a plugin system for custom
service executors. The relevant classes are located in the package
org.apache.jena.sparql.service and are summarized as follows:
+ ServiceExecutorRegistry: A registry that holds a list of service executors.
When Jena starts up, it configures a default registry to handle SERVICE
requests against HTTP SPARQL endpoints and registers it with the global ARQ
context accessible under ARQ.getContext().
+ ServiceExecutorFactory: This is the main interface for custom SERVICE
handler implementations:</description>
+ </item>
+
<item>
<title>ARQ - Extending Query Execution</title>
<link>https://jena.apache.org/documentation/query/arq-query-eval.html</link>
@@ -400,9 +411,9 @@ ARQ consists of the following parts:
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://jena.apache.org/documentation/query/javascript-functions.html</guid>
- <description>ARQ supports (Jena v3.7.0 onwards) writing custom SPARQL
functions in JavaScript. These functions can be used in FILTERs and for
calculating values to assign with AS in BIND and SELECT expressions.
+ <description>ARQ supports writing custom SPARQL functions in JavaScript.
These functions can be used in FILTERs and for calculating values to assign
with AS in BIND and SELECT expressions.
XSD datatypes for strings, numbers and booleans are converted to the native
JavaScript datatypes. RDFterms that do not fit easily into JavaScript datatypes
are handled with a object class NV.
-Loading JavaScript functions JavaScript is loaded from an external file using
the context setting &ldquo;http://jena.</description>
+Requirements ARQ requires a javascript engine such as GraalVM to be added to
the classpath.</description>
</item>
<item>
@@ -2138,7 +2149,7 @@ Compared to TDB1:
<description>TDB2 is not compatible with TDB1
Do not run TDB1 tools on a TDB2 database, nor run TDB2 tools on a TDB1
database.
These scripts are available jena binary distribution.
- tdb2.tdbbackup tdb2.tdbdump tdb2.tdbcompact tdb2.tdbloader tdb2.tdbquery
tdb2.tdbupdate On MS Windows, these commands are called tdb2_tdbquery etc.
+ tdb2.tdbbackup tdb2.tdbdump tdb2.tdbcompact tdb2.tdbloader tdb2.tdbquery
tdb2.tdbupdate tdb2.tdbstats On MS Windows, these commands are called
tdb2_tdbquery etc.
Example usage:
tdb2.tdbloader --loc &lt;DB location&gt; file1 file2 ... Note:
tdbloader2 is a TDB1 command tool.
diff --git a/content/sitemap.xml b/content/sitemap.xml
index 8df679150..f55e6dc61 100644
--- a/content/sitemap.xml
+++ b/content/sitemap.xml
@@ -9,7 +9,7 @@
<url>
<loc>https://jena.apache.org/about_jena.html</loc>
- <lastmod>2022-01-21T20:55:23+00:00</lastmod>
+ <lastmod>2022-07-16T22:27:24+02:00</lastmod>
</url>
<url>
@@ -104,12 +104,12 @@
<url>
<loc>https://jena.apache.org/documentation/sparql-apis/</loc>
- <lastmod>2022-06-24T14:57:51+01:00</lastmod>
+ <lastmod>2022-08-20T12:05:43+01:00</lastmod>
</url>
<url>
<loc>https://jena.apache.org/documentation/query/</loc>
- <lastmod>2021-11-05T16:04:36+00:00</lastmod>
+ <lastmod>2022-05-31T09:58:44+01:00</lastmod>
</url>
<url>
@@ -129,7 +129,7 @@
<url>
<loc>https://jena.apache.org/documentation/query/service.html</loc>
- <lastmod>2022-06-24T14:57:51+01:00</lastmod>
+ <lastmod>2022-08-20T12:05:43+01:00</lastmod>
</url>
<url>
@@ -157,6 +157,11 @@
<lastmod>2021-11-15T19:40:46+00:00</lastmod>
</url>
+ <url>
+
<loc>https://jena.apache.org/documentation/query/custom_service_executors.html</loc>
+ <lastmod>2022-05-31T09:58:44+01:00</lastmod>
+ </url>
+
<url>
<loc>https://jena.apache.org/documentation/query/arq-query-eval.html</loc>
<lastmod>2021-11-15T19:40:46+00:00</lastmod>
@@ -184,7 +189,7 @@
<url>
<loc>https://jena.apache.org/documentation/query/javascript-functions.html</loc>
- <lastmod>2020-08-10T23:07:00+12:00</lastmod>
+ <lastmod>2022-06-16T20:53:40+01:00</lastmod>
</url>
<url>
@@ -269,7 +274,7 @@
<url>
<loc>https://jena.apache.org/documentation/tools/</loc>
- <lastmod>2021-09-04T18:49:14+01:00</lastmod>
+ <lastmod>2022-07-27T16:28:14+02:00</lastmod>
</url>
<url>
@@ -324,7 +329,7 @@
<url>
<loc>https://jena.apache.org/documentation.html</loc>
- <lastmod>2022-06-24T14:57:51+01:00</lastmod>
+ <lastmod>2022-08-20T12:05:43+01:00</lastmod>
</url>
<url>
@@ -394,7 +399,7 @@
<url>
<loc>https://jena.apache.org/documentation/fuseki2/fuseki-server-protocol.html</loc>
- <lastmod>2021-03-29T09:48:59+01:00</lastmod>
+ <lastmod>2022-07-27T16:28:14+02:00</lastmod>
</url>
<url>
@@ -454,7 +459,7 @@
<url>
<loc>https://jena.apache.org/getting_involved/</loc>
- <lastmod>2021-06-26T10:19:21+01:00</lastmod>
+ <lastmod>2022-07-16T22:27:24+02:00</lastmod>
</url>
<url>
@@ -464,7 +469,7 @@
<url>
<loc>https://jena.apache.org/getting_involved.html</loc>
- <lastmod>2021-06-26T10:19:21+01:00</lastmod>
+ <lastmod>2022-07-16T22:27:24+02:00</lastmod>
</url>
<url>
@@ -484,7 +489,7 @@
<url>
<loc>https://jena.apache.org/documentation/sparql-apis/http-auth.html</loc>
- <lastmod>2022-05-24T13:22:20+01:00</lastmod>
+ <lastmod>2022-08-20T12:04:21+01:00</lastmod>
</url>
<url>
@@ -614,7 +619,7 @@
<url>
<loc>https://jena.apache.org/about_jena/contributions.html</loc>
- <lastmod>2020-02-28T13:09:12+01:00</lastmod>
+ <lastmod>2022-07-16T22:27:24+02:00</lastmod>
</url>
<url>
@@ -674,7 +679,7 @@
<url>
<loc>https://jena.apache.org/documentation/rdfconnection/</loc>
- <lastmod>2021-11-15T19:40:46+00:00</lastmod>
+ <lastmod>2022-06-15T14:52:32+02:00</lastmod>
</url>
<url>
@@ -694,7 +699,7 @@
<url>
<loc>https://jena.apache.org/documentation/io/rdf-input.html</loc>
- <lastmod>2022-03-02T23:34:42+00:00</lastmod>
+ <lastmod>2022-07-19T19:17:05+02:00</lastmod>
</url>
<url>
@@ -1014,12 +1019,12 @@
<url>
<loc>https://jena.apache.org/documentation/tdb2/tdb2_cmds.html</loc>
- <lastmod>2021-06-18T18:11:15+02:00</lastmod>
+ <lastmod>2022-07-27T16:28:14+02:00</lastmod>
</url>
<url>
<loc>https://jena.apache.org/documentation/tdb2/tdb2_admin.html</loc>
- <lastmod>2020-02-28T13:09:12+01:00</lastmod>
+ <lastmod>2022-07-27T16:28:14+02:00</lastmod>
</url>
<url>