This is an automated email from the ASF dual-hosted git repository.
git-site-role pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/jena-site.git
The following commit(s) were added to refs/heads/asf-site by this push:
new 6726ed364 Updated site from main
(97047cee872c23ad154d734ac19aedc1aba78258)
6726ed364 is described below
commit 6726ed364bb324a23a59897d38edc70ea4b127f8
Author: jenkins <[email protected]>
AuthorDate: Sat Jul 8 21:13:04 2023 +0000
Updated site from main (97047cee872c23ad154d734ac19aedc1aba78258)
---
content/documentation/fuseki2/fuseki-modules.html | 171 +++++++++++++++------
content/documentation/index.xml | 6 +-
content/documentation/io/rdf-output.html | 20 +++
.../documentation/query/javascript-functions.html | 29 +++-
content/index.json | 2 +-
content/index.xml | 6 +-
content/sitemap.xml | 8 +-
7 files changed, 185 insertions(+), 57 deletions(-)
diff --git a/content/documentation/fuseki2/fuseki-modules.html
b/content/documentation/fuseki2/fuseki-modules.html
index 505cc5f8e..4b36c3e16 100644
--- a/content/documentation/fuseki2/fuseki-modules.html
+++ b/content/documentation/fuseki2/fuseki-modules.html
@@ -181,57 +181,104 @@
<aside class="text-muted align-self-start mb-3 p-0 d-xl-none d-block">
<h2 class="h6 sticky-top m-0 p-2 bg-body-tertiary">On this page</h2>
- <nav id="TableOfContents"></nav>
+ <nav id="TableOfContents">
+ <ul>
+ <li>
+ <ul>
+ <li><a href="#automatically-loaded">Automatically loaded</a></li>
+ <li><a href="#programmaticaly-configuring-a-server">Programmaticaly
configuring a server</a></li>
+ <li><a href="#fuseki-module-operations">Fuseki Module
operations</a></li>
+ <li><a href="#fusekimodule-interface"><code>FusekiModule</code>
interface</a></li>
+ </ul>
+ </li>
+ </ul>
+</nav>
</aside>
<article class="flex-column me-lg-4">
<p><em>Fuseki modules</em> are a mechanism to include extension code into
a Fuseki
server. Modules are invoked during the process of building a <a
href="./fuseki-main.html">Fuseki
-Main</a> server. The module can modify the server
+Main</a> server. A module can modify the server
configuration, add new functionality, or react to a server being built and
started.</p>
-<p>This feature was added in Jena version 4.3.0. They are an expeirmental
feature
-that will evolve based on experineace and use cases.</p>
-<p>Fuseki Modules are loaded use the JDK
-<a href="https://www.baeldung.com/java-spi">ServiceLoader</a> by being placing
a jar file on the classpath,
-together with any additional dependencies. The service loader looks for files
-<code>META-INF/services/org.apache.jena.fuseki.main.sys.FusekiModule</code> in
the jar
+<p>This feature was added in Jena version 4.3.0. It is an experimental feature
+that will evolve based on feedback and use cases.</p>
+<p>The interface for modules is <code>FusekiModule</code>; if automatcally
loaded, the
+interface is <code>FusekiAutoModule</code> which extends
<code>FusekiModule</code>.</p>
+<p>Fuseki modules can be provided in two ways:</p>
+<ul>
+<li>Loaded from additional jars on the classpath</li>
+<li>Programmatically controlling the setup of the <code>FusekiServer</code>
server.</li>
+</ul>
+<h3 id="automatically-loaded">Automatically loaded</h3>
+<p>Fuseki Modules can be loaded using the JDK
+<a href="https://www.baeldung.com/java-spi">ServiceLoader</a> by being placing
+a jar file on the classpath,
+together with any additional dependencies. These provide interface
+<code>FusekiAutoModule</code>.
+The service loader is controlled by file resources
+<code>META-INF/services/org.apache.jena.fuseki.main.sys.FusekiAutoModule</code>
in the jar
file.
-This is often done by placing the file in the development code in
+The module class must have a no-argument constructor.</p>
+<p>This is often done by placing the file in the development code in
<code>src/main/resources/META-INF/services/</code>).
The file containing a line with the implementation full class name. If
<a href="../notes/jena-repack.html">repacking</a> Fuseki with the
maven-shade-plugin, make
-sure the <code>ServicesResourceTransformer</code> is used. The module must
have a no
-argument constructor.</p>
-<p>If using Fuseki as an <a href="./fuseki-embedded.html">embedded server</a>,
the module is
-added in code as:</p>
-<pre tabindex="0"><code> FusekiModule module = new MyModule();
- FusekiModules.add(module);
-</code></pre><p>The method <code>start</code> is called when the module is
loaded. Custom operations can
+sure the <code>ServicesResourceTransformer</code> is used.</p>
+<p>The method <code>start</code> is called when the module is loaded. Custom
operations can
be globally registered at this point (see the <a
href="https://github.com/apache/jena/tree/main/jena-fuseki2/jena-fuseki-main/src/test/java/org/apache/jena/fuseki/main/examples">Fuseki
examples</a> directory).</p>
+<p>A <code>FusekiAutoModule</code> can provide a level, an integer, to control
the order in which
+modules are invoked during server building. Lower numbers are invoked before
larger
+numbers at each step.</p>
+<h3 id="programmaticaly-configuring-a-server">Programmaticaly configuring a
server</h3>
+<p>If creating a Fuseki server from Java, the modules can be autoloaded as
described above,
+or explicitly added to the server builder.</p>
+<p>A <code>FusekiModules</code> object is collection of modules, called at
each point in the order
+given when creating the object.</p>
+<pre tabindex="0"><code> FusekiModule myModule = new MyModule();
+ FusekiModules fmods = FusekiModules.create(myModule);
+ FusekiServer server = FusekiServer.create()
+ ...
+ .fusekiModules(fmods)
+ ...
+ .build();
+</code></pre><h3 id="fuseki-module-operations">Fuseki Module operations</h3>
<p>The module lifecycle during creating a Fuseki server is:</p>
<ul>
-<li><code>configuration</code> - access and modify the setup.
-This is called after the server has been configured, just before the server is
built.</li>
-<li><code>server</code> - access the built server</li>
-<li><code>serverBeforeStarting</code> - about to call
“server.start()”</li>
-<li><code>serverAfterStarting</code> - just after calling
“server.start()”</li>
-<li><code>serverStopped</code> - called as the server stop
+<li><code>prepare</code> - called at the start of the server
+build steps before setting up the datasets.</li>
+<li><code>configured</code> - access and modify the setup.
+This is called after the server has been configured, before the server is
built.
+It defaults to calls to <code>configDataAccessPoint</code> for dataset being
hosted by the server.</li>
+<li><code>server</code> - called after the built, before the return of
<code>FusekiServerBuilder.build()</code></li>
+</ul>
+<p>There are also operations notified when a server is reloaded while
running.</p>
+<ul>
+<li><code>serverConfirmReload</code></li>
+<li><code>serveReload</code></li>
+</ul>
+<p>As of Jena 4.9.0, eeload is not yet supported.</p>
+<p>The Fuseki start up sequence is:</p>
+<ul>
+<li><code>serverBeforeStarting</code> - called at the start of
<code>server.start()</code></li>
+<li><code>serverAfterStarting</code> - called at the end of
<code>server.start()</code></li>
+<li><code>serverStopped</code> - called as just after the server
+has stopped in the <code>server.stop()</code> call.
(note, this is not always called because a server can simply exit the
JVM).</li>
</ul>
-<p>A Fuseki module does not need to implement all these steps, the default for
all
-of them is “do nothing”. Usually, an extension will only be
interested in
-certain stpes, like the configuration and registry information of
+<p>A Fuseki module does not need to implement all these steps. The default for
all
+steps is “do nothing”. Usually, an extension will only be
interested in
+certain steps, such as <code>prepare</code>, or the registry information of
<code>configuration</code>.</p>
-<p>During the configuration step, the Fuskei configuration file for the server
is
+<p>During the configuration step, the Fuseki configuration file for the server
is
available. If the server is built programmatically without a configuration
file,
this is null.</p>
<p>The configuration file can contain RDF information to build resources (e.g.
-contains assembler descriptions not directly linked to the server).</p>
+it can contain additional assembler descriptions not directly linked to the
server).</p>
<p>There is an <a
href="https://github.com/apache/jena/blob/main/jena-fuseki2/jena-fuseki-main/src/test/java/org/apache/jena/fuseki/main/examples/ExFusekiMain_3_FusekiModule.java">example
Fuseki
Module</a>
in the Fuseki examples directory.</p>
-<p><code>FusekiModule</code> interface:</p>
+<h3 id="fusekimodule-interface"><code>FusekiModule</code> interface</h3>
<div class="highlight"><pre tabindex="0"
style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code
class="language-java" data-lang="java"><span style="display:flex;"><span><span
style="color:#080;font-style:italic">/**
</span></span></span><span style="display:flex;"><span><span
style="color:#080;font-style:italic"> * Module interface for Fuseki.
</span></span></span><span style="display:flex;"><span><span
style="color:#080;font-style:italic"> * <p>
@@ -240,31 +287,39 @@ in the Fuseki examples directory.</p>
</span></span></span><span style="display:flex;"><span><span
style="color:#080;font-style:italic"> */</span>
</span></span><span style="display:flex;"><span><span
style="color:#a2f;font-weight:bold">public</span> <span
style="color:#a2f;font-weight:bold">interface</span> <span
style="color:#00f">FusekiModule</span> <span
style="color:#a2f;font-weight:bold">extends</span> SubsystemLifecycle <span
style="color:#666">{</span>
</span></span><span style="display:flex;"><span> <span
style="color:#080;font-style:italic">/**
-</span></span></span><span style="display:flex;"><span><span
style="color:#080;font-style:italic"> * Unique (within this server) name to
identify this module.
-</span></span></span><span style="display:flex;"><span><span
style="color:#080;font-style:italic"> * The default is to generate an UUID.
+</span></span></span><span style="display:flex;"><span><span
style="color:#080;font-style:italic"> * Display name to identify this
module.
</span></span></span><span style="display:flex;"><span><span
style="color:#080;font-style:italic"> */</span>
</span></span><span style="display:flex;"><span> <span
style="color:#a2f;font-weight:bold">public</span> String <span
style="color:#00a000">name</span><span style="color:#666">();</span>
</span></span><span style="display:flex;"><span>
-</span></span><span style="display:flex;"><span> <span
style="color:#080;font-style:italic">/** Module loaded */</span>
-</span></span><span style="display:flex;"><span> <span
style="color:#a2f">@Override</span>
-</span></span><span style="display:flex;"><span> <span
style="color:#a2f;font-weight:bold">public</span> <span
style="color:#a2f;font-weight:bold">default</span> <span
style="color:#0b0;font-weight:bold">void</span> <span
style="color:#00a000">start</span><span style="color:#666">()</span> <span
style="color:#666">{}</span>
-</span></span><span style="display:flex;"><span>
-</span></span><span style="display:flex;"><span> <span
style="color:#080;font-style:italic">// ---- Build cycle
+</span></span><span style="display:flex;"><span> <span
style="color:#080;font-style:italic">// -- Build cycle.
</span></span></span><span style="display:flex;"><span><span
style="color:#080;font-style:italic"></span>
</span></span><span style="display:flex;"><span> <span
style="color:#080;font-style:italic">/**
</span></span></span><span style="display:flex;"><span><span
style="color:#080;font-style:italic"> * Called at the start of
"build" step. The builder has been set according to the
-</span></span></span><span style="display:flex;"><span><span
style="color:#080;font-style:italic"> * configuration. The
"configModel" parameter is set if a configuration file was
-</span></span></span><span style="display:flex;"><span><span
style="color:#080;font-style:italic"> * used otherwise it is null.
+</span></span></span><span style="display:flex;"><span><span
style="color:#080;font-style:italic"> * configuration of API calls and
parsing configuration files. No build actions have been carried out yet.
+</span></span></span><span style="display:flex;"><span><span
style="color:#080;font-style:italic"> * The module can make further
FusekiServer.{@link Builder} calls.
+</span></span></span><span style="display:flex;"><span><span
style="color:#080;font-style:italic"> * The "configModel" parameter
is set if a configuration file was used otherwise it is null.
</span></span></span><span style="display:flex;"><span><span
style="color:#080;font-style:italic"> */</span>
-</span></span><span style="display:flex;"><span> <span
style="color:#a2f;font-weight:bold">public</span> <span
style="color:#a2f;font-weight:bold">default</span> <span
style="color:#0b0;font-weight:bold">void</span> <span
style="color:#00a000">configuration</span><span
style="color:#666">(</span>FusekiServer<span style="color:#666">.</span><span
style="color:#b44">Builder</span> builder<span style="color:#666">,</span>
DataAccessPointRegistry dapRegistry<span style="color:#666">,</spa [...]
-</span></span><span style="display:flex;"><span> dapRegistry<span
style="color:#666">.</span><span style="color:#b44">accessPoints</span><span
style="color:#666">().</span><span style="color:#b44">forEach</span><span
style="color:#666">(</span>accessPoint<span
style="color:#666">-></span>configDataAccessPoint<span
style="color:#666">(</span>builder<span style="color:#666">,</span>
accessPoint<span style="color:#666">,</span> configModel<span
style="color:#666">));</span>
+</span></span><span style="display:flex;"><span> <span
style="color:#a2f;font-weight:bold">public</span> <span
style="color:#a2f;font-weight:bold">default</span> <span
style="color:#0b0;font-weight:bold">void</span> <span
style="color:#00a000">prepare</span><span
style="color:#666">(</span>FusekiServer<span style="color:#666">.</span><span
style="color:#b44">Builder</span> serverBuilder<span
style="color:#666">,</span> Set<span style="color:#666"><</span>String<span
style="color:#6 [...]
+</span></span><span style="display:flex;"><span>
+</span></span><span style="display:flex;"><span> <span
style="color:#080;font-style:italic">/**
+</span></span></span><span style="display:flex;"><span><span
style="color:#080;font-style:italic"> * Called after the
DataAccessPointRegistry has been built.
+</span></span></span><span style="display:flex;"><span><span
style="color:#080;font-style:italic"> * <p>
+</span></span></span><span style="display:flex;"><span><span
style="color:#080;font-style:italic"> * The default implementation is to
call {@link #configDataAccessPoint(DataAccessPoint, Model)}
+</span></span></span><span style="display:flex;"><span><span
style="color:#080;font-style:italic"> * for each {@link DataAccessPoint}.
+</span></span></span><span style="display:flex;"><span><span
style="color:#080;font-style:italic"> * <pre>
+</span></span></span><span style="display:flex;"><span><span
style="color:#080;font-style:italic"> *
dapRegistry.accessPoints().forEach(accessPoint{@literal
->}configDataAccessPoint(accessPoint, configModel));
+</span></span></span><span style="display:flex;"><span><span
style="color:#080;font-style:italic"> * </pre>
+</span></span></span><span style="display:flex;"><span><span
style="color:#080;font-style:italic"> */</span>
+</span></span><span style="display:flex;"><span> <span
style="color:#a2f;font-weight:bold">public</span> <span
style="color:#a2f;font-weight:bold">default</span> <span
style="color:#0b0;font-weight:bold">void</span> <span
style="color:#00a000">configured</span><span
style="color:#666">(</span>FusekiServer<span style="color:#666">.</span><span
style="color:#b44">Builder</span> serverBuilder<span
style="color:#666">,</span> DataAccessPointRegistry dapRegistry<span
style="color:#666">,</ [...]
+</span></span><span style="display:flex;"><span> dapRegistry<span
style="color:#666">.</span><span style="color:#b44">accessPoints</span><span
style="color:#666">().</span><span style="color:#b44">forEach</span><span
style="color:#666">(</span>accessPoint<span
style="color:#666">-></span>configDataAccessPoint<span
style="color:#666">(</span>accessPoint<span style="color:#666">,</span>
configModel<span style="color:#666">));</span>
</span></span><span style="display:flex;"><span> <span
style="color:#666">}</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span> <span
style="color:#080;font-style:italic">/**
-</span></span></span><span style="display:flex;"><span><span
style="color:#080;font-style:italic"> * This method is called for each
{@link DataAccessPoint}
-</span></span></span><span style="display:flex;"><span><span
style="color:#080;font-style:italic"> * by the default implementation of
{@link #configuration}.
+</span></span></span><span style="display:flex;"><span><span
style="color:#080;font-style:italic"> * This method is called for each
{@link DataAccessPoint} by the default
+</span></span></span><span style="display:flex;"><span><span
style="color:#080;font-style:italic"> * implementation of {@link
#configured} after the new servers
+</span></span></span><span style="display:flex;"><span><span
style="color:#080;font-style:italic"> * DataAccessPointRegistry has been
built.
</span></span></span><span style="display:flex;"><span><span
style="color:#080;font-style:italic"> */</span>
-</span></span><span style="display:flex;"><span> <span
style="color:#a2f;font-weight:bold">public</span> <span
style="color:#a2f;font-weight:bold">default</span> <span
style="color:#0b0;font-weight:bold">void</span> <span
style="color:#00a000">configDataAccessPoint</span><span
style="color:#666">(</span>FusekiServer<span style="color:#666">.</span><span
style="color:#b44">Builder</span> builder<span style="color:#666">,</span>
DataAccessPoint dap<span style="color:#666">,</span> Model [...]
+</span></span><span style="display:flex;"><span> <span
style="color:#a2f;font-weight:bold">public</span> <span
style="color:#a2f;font-weight:bold">default</span> <span
style="color:#0b0;font-weight:bold">void</span> <span
style="color:#00a000">configDataAccessPoint</span><span
style="color:#666">(</span>DataAccessPoint dap<span style="color:#666">,</span>
Model configModel<span style="color:#666">)</span> <span
style="color:#666">{}</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span> <span
style="color:#080;font-style:italic">/**
</span></span></span><span style="display:flex;"><span><span
style="color:#080;font-style:italic"> * Built, not started, about to be
returned to the builder caller.
@@ -272,6 +327,18 @@ in the Fuseki examples directory.</p>
</span></span><span style="display:flex;"><span> <span
style="color:#a2f;font-weight:bold">public</span> <span
style="color:#a2f;font-weight:bold">default</span> <span
style="color:#0b0;font-weight:bold">void</span> <span
style="color:#00a000">server</span><span
style="color:#666">(</span>FusekiServer server<span style="color:#666">)</span>
<span style="color:#666">{</span> <span style="color:#666">}</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span> <span
style="color:#080;font-style:italic">/**
+</span></span></span><span style="display:flex;"><span><span
style="color:#080;font-style:italic"> * Confirm or reject a request to
reload.
+</span></span></span><span style="display:flex;"><span><span
style="color:#080;font-style:italic"> */</span>
+</span></span><span style="display:flex;"><span> <span
style="color:#a2f;font-weight:bold">public</span> <span
style="color:#a2f;font-weight:bold">default</span> <span
style="color:#0b0;font-weight:bold">boolean</span> <span
style="color:#00a000">serverConfirmReload</span><span
style="color:#666">(</span>FusekiServer server<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 [...]
+</span></span><span style="display:flex;"><span>
+</span></span><span style="display:flex;"><span> <span
style="color:#080;font-style:italic">/**
+</span></span></span><span style="display:flex;"><span><span
style="color:#080;font-style:italic"> * Perform any operations necessary
for a reload.
+</span></span></span><span style="display:flex;"><span><span
style="color:#080;font-style:italic"> */</span>
+</span></span><span style="display:flex;"><span> <span
style="color:#a2f;font-weight:bold">public</span> <span
style="color:#a2f;font-weight:bold">default</span> <span
style="color:#0b0;font-weight:bold">void</span> <span
style="color:#00a000">serverReload</span><span
style="color:#666">(</span>FusekiServer server<span style="color:#666">)</span>
<span style="color:#666">{</span> <span style="color:#666">}</span>
+</span></span><span style="display:flex;"><span>
+</span></span><span style="display:flex;"><span> <span
style="color:#080;font-style:italic">// -- Server start up
+</span></span></span><span style="display:flex;"><span><span
style="color:#080;font-style:italic"></span>
+</span></span><span style="display:flex;"><span> <span
style="color:#080;font-style:italic">/**
</span></span></span><span style="display:flex;"><span><span
style="color:#080;font-style:italic"> * Server starting - called just
before server.start happens.
</span></span></span><span style="display:flex;"><span><span
style="color:#080;font-style:italic"> */</span>
</span></span><span style="display:flex;"><span> <span
style="color:#a2f;font-weight:bold">public</span> <span
style="color:#a2f;font-weight:bold">default</span> <span
style="color:#0b0;font-weight:bold">void</span> <span
style="color:#00a000">serverBeforeStarting</span><span
style="color:#666">(</span>FusekiServer server<span style="color:#666">)</span>
<span style="color:#666">{</span> <span style="color:#666">}</span>
@@ -289,16 +356,30 @@ in the Fuseki examples directory.</p>
</span></span></span><span style="display:flex;"><span><span
style="color:#080;font-style:italic"> */</span>
</span></span><span style="display:flex;"><span> <span
style="color:#a2f;font-weight:bold">public</span> <span
style="color:#a2f;font-weight:bold">default</span> <span
style="color:#0b0;font-weight:bold">void</span> <span
style="color:#00a000">serverStopped</span><span
style="color:#666">(</span>FusekiServer server<span style="color:#666">)</span>
<span style="color:#666">{</span> <span style="color:#666">}</span>
</span></span><span style="display:flex;"><span>
-</span></span><span style="display:flex;"><span> <span
style="color:#080;font-style:italic">/** Module unloaded */</span>
+</span></span><span style="display:flex;"><span> <span
style="color:#080;font-style:italic">/** Module unloaded : do not rely on this
happening. */</span>
</span></span><span style="display:flex;"><span> <span
style="color:#a2f">@Override</span>
</span></span><span style="display:flex;"><span> <span
style="color:#a2f;font-weight:bold">public</span> <span
style="color:#a2f;font-weight:bold">default</span> <span
style="color:#0b0;font-weight:bold">void</span> <span
style="color:#00a000">stop</span><span style="color:#666">()</span> <span
style="color:#666">{}</span>
</span></span><span style="display:flex;"><span><span
style="color:#666">}</span>
-</span></span></code></pre></div>
+</span></span></code></pre></div><p><code>FusekiAutoModules</code> also
provide the
+<a
href="https://jena.apache.org/documentation/javadoc/jena/org.apache.jena.core/org/apache/jena/sys/JenaSubsystemLifecycle.html"><code>org.apache.jena.base.module.SubsystemLifecycle</code></a>
+interface.</p>
+
</article>
<aside class="text-muted align-self-start mb-3 mb-xl-5 p-0 d-none d-xl-flex
flex-column sticky-top">
<h2 class="h6 sticky-top m-0 p-2 bg-body-tertiary">On this page</h2>
- <nav id="TableOfContents"></nav>
+ <nav id="TableOfContents">
+ <ul>
+ <li>
+ <ul>
+ <li><a href="#automatically-loaded">Automatically loaded</a></li>
+ <li><a href="#programmaticaly-configuring-a-server">Programmaticaly
configuring a server</a></li>
+ <li><a href="#fuseki-module-operations">Fuseki Module
operations</a></li>
+ <li><a href="#fusekimodule-interface"><code>FusekiModule</code>
interface</a></li>
+ </ul>
+ </li>
+ </ul>
+</nav>
</aside>
</main>
diff --git a/content/documentation/index.xml b/content/documentation/index.xml
index 8067c2142..c7b451d86 100644
--- a/content/documentation/index.xml
+++ b/content/documentation/index.xml
@@ -810,9 +810,9 @@ Many web log analysers can process this
format.</description>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://jena.apache.org/documentation/fuseki2/fuseki-modules.html</guid>
- <description>Fuseki modules are a mechanism to include extension code
into a Fuseki server. Modules are invoked during the process of building a
Fuseki Main server. The module can modify the server configuration, add new
functionality, or react to a server being built and started.
-This feature was added in Jena version 4.3.0. They are an expeirmental feature
that will evolve based on experineace and use cases.
-Fuseki Modules are loaded use the JDK ServiceLoader by being placing a jar
file on the classpath, together with any additional dependencies.</description>
+ <description>Fuseki modules are a mechanism to include extension code
into a Fuseki server. Modules are invoked during the process of building a
Fuseki Main server. A module can modify the server configuration, add new
functionality, or react to a server being built and started.
+This feature was added in Jena version 4.3.0. It is an experimental feature
that will evolve based on feedback and use cases.
+The interface for modules is FusekiModule; if automatcally loaded, the
interface is FusekiAutoModule which extends FusekiModule.</description>
</item>
<item>
diff --git a/content/documentation/io/rdf-output.html
b/content/documentation/io/rdf-output.html
index ea2c59780..dfa5a9fa6 100644
--- a/content/documentation/io/rdf-output.html
+++ b/content/documentation/io/rdf-output.html
@@ -423,6 +423,10 @@ or write N-triples/N-Quads.</p>
:b foaf:knows :a .
</code></pre>
+<p>The default pretty printed output (shown above) aligns predicates
+and objects, which can result in wide lines. For a narrower
+indentation style, set <code>ttl:indentStyle</code> to <code>long</code>.
+See <a href="#opt-turtle-trig">Turtle and Trig format options</a>.</p>
<p>Pretty printed formats:</p>
<table>
<thead>
@@ -556,6 +560,11 @@ otherwise noted, the setting applies to both Turtle and
TriG.</p>
<td>“sparql”, “rdf11”, “at”,
“n3”</td>
</tr>
<tr>
+<td>RIOT.symTurtleIndentStyle</td>
+<td>“ttl:indentStyle”</td>
+<td>“wide”, “long”</td>
+</tr>
+<tr>
<td>RIOT.symTurtleOmitBase</td>
<td>“ttl:omitBase”</td>
<td>“true”, “false”</td>
@@ -594,6 +603,17 @@ otherwise noted, the setting applies to both Turtle and
TriG.</p>
.set(RIOT.symTurtleDirectiveStyle, "sparql")
.lang(Lang.TTL)
.output(System.out);
+</code></pre><h5 id="_setting-indent-style_"><em>Setting indent style</em></h5>
+<pre tabindex="0"><code> riot --set ttl:indentStyle=long --formatted=ttl
file1.rdf file2.nt ...
+</code></pre><p>and in code:</p>
+<pre tabindex="0"><code>RDFWriter.source(model)
+ .format(RDFFormat.TURTLE_LONG)
+ .output(System.out);
+</code></pre><p>or:</p>
+<pre tabindex="0"><code> RDFWriter.source(model)
+ .set(RIOT.symTurtleIndentStyle, "long")
+ .lang(Lang.TTL)
+ .output(System.out);
</code></pre><h5 id="_base-uri_"><em>Base URI</em></h5>
<p>Output can be written with relative URIs and no base. Note: such output is
not
portable; its meaning depends on the base URI at the time of reading.</p>
diff --git a/content/documentation/query/javascript-functions.html
b/content/documentation/query/javascript-functions.html
index bce078be2..146d56dc1 100644
--- a/content/documentation/query/javascript-functions.html
+++ b/content/documentation/query/javascript-functions.html
@@ -185,6 +185,7 @@
<ul>
<li><a href="#requirements">Requirements</a></li>
<li><a href="#enabling-and-loading-javascript-functions">Enabling and
Loading JavaScript functions</a></li>
+ <li><a href="#identifying-callable-functions">Identifying callable
functions</a></li>
<li><a href="#using-javascript-functions">Using JavaScript functions</a>
<ul>
<li><a href="#arguments-and-function-results">Arguments and Function
Results</a></li>
@@ -244,6 +245,25 @@ sparql --set arq:js-library=SomeFile.js --data ... --query
...
<p><strong>WARNING:</strong> Enabling this feature exposes the majority of the
underlying scripting engine directly to SPARQL queries so
may provide a vector for arbitrary code execution. Therefore it is
recommended that this feature remain disabled for
any publicly accessible deployment that utilises the ARQ query engine.</p>
+<h2 id="identifying-callable-functions">Identifying callable functions</h2>
+<p>The context setting ““<a
href="http://jena.apache.org/ARQ#scriptAllowList%22">http://jena.apache.org/ARQ#scriptAllowList"</a>
is used to
+provide a comma-separated list of function names, which are the local part of
+the URI, that are allowed to be called
+as custom script functions.</p>
+<p>This can be written as <code>arq:scriptAllowList</code> for commands and
Fuseki configuration files.
+It is the java constant <code>ARQ.symCustomFunctionScriptAllowList</code></p>
+<pre><code>sparql --set arq:js-library=SomeFile.js \
+ --set arq:scriptAllowList=toCamelCase,anotherFunction
+ --data ... --query ...
+</code></pre>
+<p>and a query of:</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>
<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>
@@ -314,7 +334,9 @@ SELECT ?input (js:toCamelCase(?input) AS ?X)
<p>The context setting can be provided on the command line starting the
server, for example:</p>
<pre><code>export JVM_ARGS=-Djena:scripting=true
-fuseki --set arq:js-library=functions.js --mem /ds
+fuseki --set arq:js-library=functions.js \
+ --set arq:scriptAllowList=toCamelCase \
+ --mem /ds
</code></pre>
<p>or it can be specified in the server configuration file
<code>config.ttl</code>:</p>
<pre><code>PREFIX : <#>
@@ -329,6 +351,10 @@ PREFIX ja:
<http://jena.hpl.hp.com/2005/11/Assembler#>
ja:cxtName "arq:js-library" ;
ja:cxtValue "/filepath/functions.js"
] ;
+ ja:context [
+ ja:cxtName "arq:scriptAllowList" ;
+ ja:cxtValue "toCamelCase"
+ ] ;
.
<#service> rdf:type fuseki:Service;
@@ -355,6 +381,7 @@ fuseki --conf config.ttl
<ul>
<li><a href="#requirements">Requirements</a></li>
<li><a href="#enabling-and-loading-javascript-functions">Enabling and
Loading JavaScript functions</a></li>
+ <li><a href="#identifying-callable-functions">Identifying callable
functions</a></li>
<li><a href="#using-javascript-functions">Using JavaScript functions</a>
<ul>
<li><a href="#arguments-and-function-results">Arguments and Function
Results</a></li>
diff --git a/content/index.json b/content/index.json
index 8fff22f6e..422c49885 100644
--- a/content/index.json
+++ b/content/index.json
@@ -1 +1 @@
-[{"categories":null,"contents":"This page is historical \u0026ldquo;for
information only\u0026rdquo; - there is no Apache release of Eyeball and the
code has not been updated for Jena3.\nThe original source code is available. So
you\u0026rsquo;ve got Eyeball installed and you\u0026rsquo;ve run it on one of
your files, and Eyeball doesn\u0026rsquo;t like it. You\u0026rsquo;re not sure
why, or what to do about it. Here\u0026rsquo;s what\u0026rsquo;s going
on.\nEyeball inspects your model a [...]
\ No newline at end of file
+[{"categories":null,"contents":"This page is historical \u0026ldquo;for
information only\u0026rdquo; - there is no Apache release of Eyeball and the
code has not been updated for Jena3.\nThe original source code is available. So
you\u0026rsquo;ve got Eyeball installed and you\u0026rsquo;ve run it on one of
your files, and Eyeball doesn\u0026rsquo;t like it. You\u0026rsquo;re not sure
why, or what to do about it. Here\u0026rsquo;s what\u0026rsquo;s going
on.\nEyeball inspects your model a [...]
\ No newline at end of file
diff --git a/content/index.xml b/content/index.xml
index b25200c0a..77226d382 100644
--- a/content/index.xml
+++ b/content/index.xml
@@ -872,9 +872,9 @@ Many web log analysers can process this
format.</description>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://jena.apache.org/documentation/fuseki2/fuseki-modules.html</guid>
- <description>Fuseki modules are a mechanism to include extension code
into a Fuseki server. Modules are invoked during the process of building a
Fuseki Main server. The module can modify the server configuration, add new
functionality, or react to a server being built and started.
-This feature was added in Jena version 4.3.0. They are an expeirmental feature
that will evolve based on experineace and use cases.
-Fuseki Modules are loaded use the JDK ServiceLoader by being placing a jar
file on the classpath, together with any additional dependencies.</description>
+ <description>Fuseki modules are a mechanism to include extension code
into a Fuseki server. Modules are invoked during the process of building a
Fuseki Main server. A module can modify the server configuration, add new
functionality, or react to a server being built and started.
+This feature was added in Jena version 4.3.0. It is an experimental feature
that will evolve based on feedback and use cases.
+The interface for modules is FusekiModule; if automatcally loaded, the
interface is FusekiAutoModule which extends FusekiModule.</description>
</item>
<item>
diff --git a/content/sitemap.xml b/content/sitemap.xml
index 16f3fe416..f08a10f2f 100644
--- a/content/sitemap.xml
+++ b/content/sitemap.xml
@@ -114,7 +114,7 @@
<lastmod>2021-11-05T08:11:46+00:00</lastmod>
</url><url>
<loc>https://jena.apache.org/documentation/query/javascript-functions.html</loc>
- <lastmod>2023-04-26T11:23:47+01:00</lastmod>
+ <lastmod>2023-07-08T22:09:07+01:00</lastmod>
</url><url>
<loc>https://jena.apache.org/documentation/query/lateral-join.html</loc>
<lastmod>2023-02-26T22:14:57+01:00</lastmod>
@@ -201,7 +201,7 @@
<lastmod>2023-04-09T15:11:22+02:00</lastmod>
</url><url>
<loc>https://jena.apache.org/documentation.html</loc>
- <lastmod>2023-07-04T08:38:43+01:00</lastmod>
+ <lastmod>2023-07-08T22:09:33+01:00</lastmod>
</url><url>
<loc>https://jena.apache.org/download.html</loc>
<lastmod>2023-04-16T17:26:15+01:00</lastmod>
@@ -249,7 +249,7 @@
<lastmod>2022-09-18T09:08:25+02:00</lastmod>
</url><url>
<loc>https://jena.apache.org/documentation/fuseki2/fuseki-modules.html</loc>
- <lastmod>2022-02-01T20:25:33+00:00</lastmod>
+ <lastmod>2023-07-08T22:09:33+01:00</lastmod>
</url><url>
<loc>https://jena.apache.org/documentation/fuseki2/fuseki-quick-start.html</loc>
<lastmod>2021-09-16T13:13:09+02:00</lastmod>
@@ -723,6 +723,6 @@
<lastmod>2023-02-20T16:01:22-05:00</lastmod>
</url><url>
<loc>https://jena.apache.org/documentation/io/rdf-output.html</loc>
- <lastmod>2022-08-26T15:49:37+01:00</lastmod>
+ <lastmod>2023-07-08T17:08:44-04:00</lastmod>
</url>
</urlset>