Class FunctionTable

java.lang.Object
org.loboevolution.apache.xpath.compiler.FunctionTable

public class FunctionTable extends Object
The function table for XPath.
  • Field Details

    • FUNC_CURRENT

      public static final int FUNC_CURRENT
      The 'current()' id.
      See Also:
    • FUNC_LAST

      public static final int FUNC_LAST
      The 'last()' id.
      See Also:
    • FUNC_POSITION

      public static final int FUNC_POSITION
      The 'position()' id.
      See Also:
    • FUNC_COUNT

      public static final int FUNC_COUNT
      The 'count()' id.
      See Also:
    • FUNC_ID

      public static final int FUNC_ID
      The 'id()' id.
      See Also:
    • FUNC_LOCAL_PART

      public static final int FUNC_LOCAL_PART
      The 'local-name()' id.
      See Also:
    • FUNC_NAMESPACE

      public static final int FUNC_NAMESPACE
      The 'namespace-uri()' id.
      See Also:
    • FUNC_QNAME

      public static final int FUNC_QNAME
      The 'name()' id.
      See Also:
    • FUNC_NOT

      public static final int FUNC_NOT
      The 'not()' id.
      See Also:
    • FUNC_TRUE

      public static final int FUNC_TRUE
      The 'true()' id.
      See Also:
    • FUNC_FALSE

      public static final int FUNC_FALSE
      The 'false()' id.
      See Also:
    • FUNC_BOOLEAN

      public static final int FUNC_BOOLEAN
      The 'boolean()' id.
      See Also:
    • FUNC_NUMBER

      public static final int FUNC_NUMBER
      The 'number()' id.
      See Also:
    • FUNC_FLOOR

      public static final int FUNC_FLOOR
      The 'floor()' id.
      See Also:
    • FUNC_CEILING

      public static final int FUNC_CEILING
      The 'ceiling()' id.
      See Also:
    • FUNC_ROUND

      public static final int FUNC_ROUND
      The 'round()' id.
      See Also:
    • FUNC_SUM

      public static final int FUNC_SUM
      The 'sum()' id.
      See Also:
    • FUNC_STRING

      public static final int FUNC_STRING
      The 'string()' id.
      See Also:
    • FUNC_STARTS_WITH

      public static final int FUNC_STARTS_WITH
      The 'starts-with()' id.
      See Also:
    • FUNC_CONTAINS

      public static final int FUNC_CONTAINS
      The 'contains()' id.
      See Also:
    • FUNC_SUBSTRING_BEFORE

      public static final int FUNC_SUBSTRING_BEFORE
      The 'substring-before()' id.
      See Also:
    • FUNC_SUBSTRING_AFTER

      public static final int FUNC_SUBSTRING_AFTER
      The 'substring-after()' id.
      See Also:
    • FUNC_NORMALIZE_SPACE

      public static final int FUNC_NORMALIZE_SPACE
      The 'normalize-space()' id.
      See Also:
    • FUNC_TRANSLATE

      public static final int FUNC_TRANSLATE
      The 'translate()' id.
      See Also:
    • FUNC_CONCAT

      public static final int FUNC_CONCAT
      The 'concat()' id.
      See Also:
    • FUNC_SUBSTRING

      public static final int FUNC_SUBSTRING
      The 'substring()' id.
      See Also:
    • FUNC_STRING_LENGTH

      public static final int FUNC_STRING_LENGTH
      The 'string-length()' id.
      See Also:
    • FUNC_LANG

      public static final int FUNC_LANG
      The 'lang()' id.
      See Also:
  • Constructor Details

    • FunctionTable

      public FunctionTable()
  • Method Details

    • installFunction

      public int installFunction(String name, Class<?> func)
      Install a built-in function.
      Parameters:
      name - The unqualified name of the function, must not be null
      func - A Implementation of an XPath Function object.
      Returns:
      the position of the function in the internal index.
    • functionAvailable

      public boolean functionAvailable(String methName)
      Tell if a built-in, non-namespaced function is available.
      Parameters:
      methName - The local name of the function.
      Returns:
      True if the function can be executed.