The regular expressions for fan:localname and afn:namespace were incorrect. SPARQL allows custom functions in expressions so that queries can be used on domain-specific data. SPARQL defines a function by URI (or prefixed name) in FILTER expressions. ARQ provides a function library and supports application-provided functions. Functions and property functions can be registered or dynamically loaded.
Applications can also provide their own functions.
ARQ also provides an implementation the Leviathan Function Library.
XQuery/XPath Functions and Operators supported
ARQ supports the scalar functions and operators from “XQuery 1.0 and XPath 2.0 Functions and Operators v3.1”.
Functions in involving sequences are not supported.
See also the property functions library page.
(The old prefix of
<http://jena.hpl.hp.com/ARQ/function#> continues to
work. Applications are encouraged to switch.)
Direct loading using a URI prefix of
<java:org.apache.jena.sparql.function.library.> (note the final
dot) is deprecated.
XPath and XQuery function namespace).
The statistical aggregates are provided are:
These are modelled after SQL aggregate functions
These, as keywords, are available in ARQ’s extended SPARQL (parse using
Additional Functions Provided by ARQ
Most of these have equivalents, or near equivalents, in SPARQL or as an XQuery function and are to be preferred. These ARQ-specific versions remain for compatibility.
RDF Graph Functions
||Return the blank node label if ?x is a blank node.||
||The local name of ?x||`REPLACE(STR(?x), “^(.*)(/|
||The namespace of ?x||`REPLACE(STR(?x), “^(.*)(/|
The prefix and local name of a IRI is based on splitting the IRI, not on any prefixes in the query or dataset.
||Make a string from the format string and the RDF terms.|
||Substring, Java style using
||Synonym for afn:substr|
||Concatenate string together, with a separator.|
||Calculate the SHA1 checksum of a literal or URI||
- Strings in “XQuery 1.0 and XPath 2.0 Functions and Operators” start from character position one, unlike Java and C# where strings start from zero.
fn:substringoperation takes an optional length, like C# but different from Java, where it is the endIndex of the first character after the substring.
||Return the minimum of two numbers||
||Return the maximum of two numbers||
||The value of pi, as an XSD double||
||The value of e, as an XSD double||
||The square root of num||
||Current time. Actually, the time the query started.||
||Calculate the SHA1 checksum||