Class FunctionTable
java.lang.Object
org.loboevolution.apache.xpath.compiler.FunctionTable
The function table for XPath.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
The 'boolean()' id.static final int
The 'ceiling()' id.static final int
The 'concat()' id.static final int
The 'contains()' id.static final int
The 'count()' id.static final int
The 'current()' id.static final int
The 'false()' id.static final int
The 'floor()' id.static final int
The 'id()' id.static final int
The 'lang()' id.static final int
The 'last()' id.static final int
The 'local-name()' id.static final int
The 'namespace-uri()' id.static final int
The 'normalize-space()' id.static final int
The 'not()' id.static final int
The 'number()' id.static final int
The 'position()' id.static final int
The 'name()' id.static final int
The 'round()' id.static final int
The 'starts-with()' id.static final int
The 'string()' id.static final int
The 'string-length()' id.static final int
The 'substring()' id.static final int
The 'substring-after()' id.static final int
The 'substring-before()' id.static final int
The 'sum()' id.static final int
The 'translate()' id.static final int
The 'true()' id. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
functionAvailable
(String methName) Tell if a built-in, non-namespaced function is available.int
installFunction
(String name, Class<?> func) Install a built-in function.
-
Field Details
-
FUNC_CURRENT
public static final int FUNC_CURRENTThe 'current()' id.- See Also:
-
FUNC_LAST
public static final int FUNC_LASTThe 'last()' id.- See Also:
-
FUNC_POSITION
public static final int FUNC_POSITIONThe 'position()' id.- See Also:
-
FUNC_COUNT
public static final int FUNC_COUNTThe 'count()' id.- See Also:
-
FUNC_ID
public static final int FUNC_IDThe 'id()' id.- See Also:
-
FUNC_LOCAL_PART
public static final int FUNC_LOCAL_PARTThe 'local-name()' id.- See Also:
-
FUNC_NAMESPACE
public static final int FUNC_NAMESPACEThe 'namespace-uri()' id.- See Also:
-
FUNC_QNAME
public static final int FUNC_QNAMEThe 'name()' id.- See Also:
-
FUNC_NOT
public static final int FUNC_NOTThe 'not()' id.- See Also:
-
FUNC_TRUE
public static final int FUNC_TRUEThe 'true()' id.- See Also:
-
FUNC_FALSE
public static final int FUNC_FALSEThe 'false()' id.- See Also:
-
FUNC_BOOLEAN
public static final int FUNC_BOOLEANThe 'boolean()' id.- See Also:
-
FUNC_NUMBER
public static final int FUNC_NUMBERThe 'number()' id.- See Also:
-
FUNC_FLOOR
public static final int FUNC_FLOORThe 'floor()' id.- See Also:
-
FUNC_CEILING
public static final int FUNC_CEILINGThe 'ceiling()' id.- See Also:
-
FUNC_ROUND
public static final int FUNC_ROUNDThe 'round()' id.- See Also:
-
FUNC_SUM
public static final int FUNC_SUMThe 'sum()' id.- See Also:
-
FUNC_STRING
public static final int FUNC_STRINGThe 'string()' id.- See Also:
-
FUNC_STARTS_WITH
public static final int FUNC_STARTS_WITHThe 'starts-with()' id.- See Also:
-
FUNC_CONTAINS
public static final int FUNC_CONTAINSThe 'contains()' id.- See Also:
-
FUNC_SUBSTRING_BEFORE
public static final int FUNC_SUBSTRING_BEFOREThe 'substring-before()' id.- See Also:
-
FUNC_SUBSTRING_AFTER
public static final int FUNC_SUBSTRING_AFTERThe 'substring-after()' id.- See Also:
-
FUNC_NORMALIZE_SPACE
public static final int FUNC_NORMALIZE_SPACEThe 'normalize-space()' id.- See Also:
-
FUNC_TRANSLATE
public static final int FUNC_TRANSLATEThe 'translate()' id.- See Also:
-
FUNC_CONCAT
public static final int FUNC_CONCATThe 'concat()' id.- See Also:
-
FUNC_SUBSTRING
public static final int FUNC_SUBSTRINGThe 'substring()' id.- See Also:
-
FUNC_STRING_LENGTH
public static final int FUNC_STRING_LENGTHThe 'string-length()' id.- See Also:
-
FUNC_LANG
public static final int FUNC_LANGThe 'lang()' id.- See Also:
-
-
Constructor Details
-
FunctionTable
public FunctionTable()
-
-
Method Details
-
installFunction
Install a built-in function.- Parameters:
name
- The unqualified name of the function, must not be nullfunc
- A Implementation of an XPath Function object.- Returns:
- the position of the function in the internal index.
-
functionAvailable
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.
-