com.hp.hpl.jena.sparql.function
Class FunctionBase

java.lang.Object
  extended by com.hp.hpl.jena.sparql.function.FunctionBase
All Implemented Interfaces:
Function
Direct Known Subclasses:
FN_StrConcat, FN_StrSubstring, FunctionBase0, FunctionBase1, FunctionBase2, FunctionBase3, FunctionBase4, strjoin, substring

public abstract class FunctionBase
extends Object
implements Function

Interface to value-testing extensions to the expression evaluator.


Constructor Summary
FunctionBase()
           
 
Method Summary
 void build(String uri, ExprList args)
          Called during query plan construction immediately after the construction of the extension instance.
abstract  void checkBuild(String uri, ExprList args)
           
 NodeValue exec(Binding binding, ExprList args, String uri, FunctionEnv env)
          Test a list of values - argument will not be null but may have the wrong number of arguments.
abstract  NodeValue exec(List<NodeValue> args)
          Function call to a list of evaluated argument values
 Context getContext()
          Return the Context object for this execution
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FunctionBase

public FunctionBase()
Method Detail

build

public final void build(String uri,
                        ExprList args)
Description copied from interface: Function
Called during query plan construction immediately after the construction of the extension instance. Can throw ExprBuildException if something is wrong (like wrong number of arguments).

Specified by:
build in interface Function
args - The parsed arguements

exec

public NodeValue exec(Binding binding,
                      ExprList args,
                      String uri,
                      FunctionEnv env)
Description copied from interface: Function
Test a list of values - argument will not be null but may have the wrong number of arguments. FunctionBase provides a more convenient way to implement a function. Can throw ExprEvalsException if something goes wrong.

Specified by:
exec in interface Function
Parameters:
binding - The current solution
args - A list of unevaluated expressions
uri - The name of this
env - The execution context
Returns:
NodeValue - a value

getContext

public Context getContext()
Return the Context object for this execution


exec

public abstract NodeValue exec(List<NodeValue> args)
Function call to a list of evaluated argument values


checkBuild

public abstract void checkBuild(String uri,
                                ExprList args)


Licenced under the Apache License, Version 2.0