Class UserDefinedFunction

    • Constructor Detail

      • UserDefinedFunction

        public UserDefinedFunction​(UserDefinedFunctionDefinition def)
        Creates a new user defined function
        def - Function Definition
      • UserDefinedFunction

        public UserDefinedFunction​(java.lang.String url,
                                   Expr e,
                                   java.util.List<Var> argList)
        Creates a user defined function
        url - Function URL
        e - Expression
        argList - Arguments
    • 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:
        build in interface Function
        args - The parsed arguments
        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
        Specified by:
        exec in interface Function
        binding - The current solution
        args - A list of unevaluated expressions
        uri - The name of this
        env - The execution context
        NodeValue - a value
      • getActualExpr

        public Expr getActualExpr()
        Gets the actual expression that was built for the function, assuming build(String, ExprList) has been called
        Expression if built, null otherwise