Interface Function

All Known Implementing Classes:
AFN_AdjustToTimezone, AFN_SystemTimezone, bnode, cartesian, collation, context, cos, cos1, cosec, cosec1, cot, cot1, cube, date, degreesToRadians, e, e, eval, evenInteger, execTime, factorial, FN_Abs, FN_AdjustDatetimeToTimezone, FN_AdjustDateToTimezone, FN_AdjustTimeToTimezone, FN_Apply, FN_BEV, FN_Ceiling, FN_CollationKey, FN_DateTime, FN_DayFromDate, FN_DayFromDateTime, FN_DaysFromDuration, FN_Error, FN_Floor, FN_FormatNumber, FN_HoursFromDateTime, FN_HoursFromDuration, FN_HoursFromTime, FN_ImplicitTimezone, FN_Matches, FN_MinutesFromDateTime, FN_MinutesFromDuration, FN_MinutesFromTime, FN_MonthFromDate, FN_MonthFromDateTime, FN_MonthsFromDuration, FN_Not, FN_Round, FN_Round_Half_Even, FN_SecondsFromDateTime, FN_SecondsFromDuration, FN_SecondsFromTime, FN_StrAfter, FN_StrBefore, FN_StrConcat, FN_StrContains, FN_StrEncodeForURI, FN_StrEndsWith, FN_StrLength, FN_StrLowerCase, FN_StrNormalizeSpace, FN_StrNormalizeUnicode, FN_StrReplace, FN_StrStartsWith, FN_StrSubstring, FN_StrUpperCase, FN_Timezone, FN_TimezoneFromDate, FN_TimezoneFromDateTime, FN_TimezoneFromTime, FN_YearFromDate, FN_YearFromDateTime, FN_YearsFromDuration, FunctionBase, FunctionBase0, FunctionBase1, FunctionBase2, FunctionBase3, FunctionBase4, FunctionBase5, FunctionCastXSD, IsTripleTerm, langeq, ln, localname, log, Math_atan2, Math_exp, Math_exp10, Math_log, Math_log10, Math_pow, max, md5hash, min, namespace, now, nowtz, Op_NumericIntegerDivide, Op_NumericMod, pi, pow, print, pythagoras, radiansToDegrees, reciprocal, rnd, root, ScriptFunction, sec, sec1, sha1sum, sha256hash, sin, sin1, sprintf, sq, sqrt, sqrt, strjoin, strlen, struuid, substr, substring, SystemVar, tan, tan1, ten, timezone, TripleObject, TriplePredicate, TripleSubject, TripleTerm, UserDefinedFunction, uuid, version, wait

public interface Function
Interface to function extensions of the expression evaluator. This includes "functional forms" - functions that take expressions for argument, rather than the usual value from already evaluated argument (hence they are not mathematical functions).
  • Method Details

    • build

      void build(String uri, ExprList args, Context context)
      Called during query plan construction immediately after the construction of the extension instance. A function can throw ExprException if something is wrong (like wrong number of arguments).
      Parameters:
      uri - The function URI
      args - The parsed arguments
      context - The build context.
    • exec

      NodeValue exec(Binding binding, ExprList args, String uri, FunctionEnv env)
      Call a function. The argument list will not be null but may have the wrong number of arguments. FunctionBase provides a more convenient way to implement a function. Functions can throw ExprEvalException if something goes wrong.
      Parameters:
      binding - The current solution
      args - A list of unevaluated expressions
      uri - The name of this
      env - The execution context
      Returns:
      NodeValue - a value