Class UserDefinedFunction
- java.lang.Object
-
- org.apache.jena.sparql.function.user.UserDefinedFunctionDefinition
-
- org.apache.jena.sparql.function.user.UserDefinedFunction
-
- All Implemented Interfaces:
Function
public class UserDefinedFunction extends UserDefinedFunctionDefinition implements Function
Represents a user defined function
-
-
Field Summary
-
Fields inherited from class org.apache.jena.sparql.function.user.UserDefinedFunctionDefinition
warnOnUnusedVariable
-
-
Constructor Summary
Constructors Constructor Description UserDefinedFunction(java.lang.String url, Expr e, java.util.List<Var> argList)Creates a user defined functionUserDefinedFunction(UserDefinedFunctionDefinition def)Creates a new user defined function
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbuild(java.lang.String uri, ExprList args)Builds the expression substituting the arguments given into the base expression to yield the actual expression to evaluateNodeValueexec(Binding binding, ExprList args, java.lang.String uri, FunctionEnv env)Executes the functionExprgetActualExpr()Gets the actual expression that was built for the function, assumingbuild(String, ExprList)has been called-
Methods inherited from class org.apache.jena.sparql.function.user.UserDefinedFunctionDefinition
getArgList, getBaseExpr, getUri, newFunctionInstance
-
-
-
-
Constructor Detail
-
UserDefinedFunction
public UserDefinedFunction(UserDefinedFunctionDefinition def)
Creates a new user defined function- Parameters:
def- Function Definition
-
-
Method Detail
-
build
public void build(java.lang.String uri, ExprList args)Builds the expression substituting the arguments given into the base expression to yield the actual expression to evaluate- Specified by:
buildin interfaceFunctionargs- The parsed arguments- Throws:
ExprBuildException- Thrown if an expression cannot be generated
-
exec
public NodeValue exec(Binding binding, ExprList args, java.lang.String uri, FunctionEnv env)
Executes the function
-
getActualExpr
public Expr getActualExpr()
Gets the actual expression that was built for the function, assumingbuild(String, ExprList)has been called- Returns:
- Expression if built, null otherwise
-
-