You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jena.apache.org by an...@apache.org on 2022/06/16 19:53:49 UTC
[jena-site] branch main updated: Note that a javascript engine is required
This is an automated email from the ASF dual-hosted git repository.
andy pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/jena-site.git
The following commit(s) were added to refs/heads/main by this push:
new 71016fb25 Note that a javascript engine is required
71016fb25 is described below
commit 71016fb251d339a894481a7612aaf1e98e0d233a
Author: Andy Seaborne <an...@apache.org>
AuthorDate: Thu Jun 16 20:53:40 2022 +0100
Note that a javascript engine is required
---
source/documentation/query/javascript-functions.md | 27 +++++++++++++++++++++-
1 file changed, 26 insertions(+), 1 deletion(-)
diff --git a/source/documentation/query/javascript-functions.md b/source/documentation/query/javascript-functions.md
index f3f096217..9d079d45c 100644
--- a/source/documentation/query/javascript-functions.md
+++ b/source/documentation/query/javascript-functions.md
@@ -2,7 +2,7 @@
title: ARQ - JavaScript SPARQL Functions
---
-ARQ supports (Jena v3.7.0 onwards) writing
+ARQ supports writing
[custom SPARQL functions](https://www.w3.org/TR/sparql11-query/#extensionFunctions)
in JavaScript. These functions can be used in FILTERs and for calculating
values to assign with AS in BIND and SELECT expressions.
@@ -11,6 +11,31 @@ 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`.
+## Requirements
+
+ARQ requires a javascript engine such as [GraalVM](https://www.graalvm.org/) to
+be added to the classpath.
+
+```
+ <properties>
+ <ver.graalvm>....</ver.graalvm>
+ ...
+```
+
+```
+ <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>
+```
+
## Loading JavaScript functions
JavaScript is loaded from an external file using the context setting