public class FunctionJavaScript extends FunctionBase
NV, a
JavaScript object providing access to the RDF features such as datatype.
NV.toString() returns a string so a function working with URIs can treat URIs as
strings which is natural in JavaScript and aligned to
rdfjs/representation-task-force.
Functions are executed in EnvJavaScript. There is a global
EnvJavaScript and it can also be set specifically for a query execution.
See EnvJavaScript for details of configuration.
Note: there is an
attempt to reconstruct the datatype of the result of the function into
xsd:integer and xsd:double.
Functions that return null or undefined will result in a ExprEvalException.
EnvJavaScript,
NV| Constructor and Description |
|---|
FunctionJavaScript(String functionName,
EnvJavaScript env) |
| Modifier and Type | Method and Description |
|---|---|
void |
checkBuild(String uri,
ExprList args) |
NodeValue |
exec(List<NodeValue> args)
Function call to a list of evaluated argument values
|
build, evalArgs, execpublic FunctionJavaScript(String functionName, EnvJavaScript env)
public void checkBuild(String uri, ExprList args)
checkBuild in class FunctionBasepublic NodeValue exec(List<NodeValue> args)
FunctionBaseexec in class FunctionBaseLicenced under the Apache License, Version 2.0