Class TreeCompiler
java.lang.Object
org.apache.commons.jxpath.ri.compiler.TreeCompiler
- All Implemented Interfaces:
Compiler
- Version:
- $Revision: 652845 $ $Date: 2008-05-02 12:46:46 -0500 (Fri, 02 May 2008) $
-
Field Summary
FieldsFields inherited from interface org.apache.commons.jxpath.ri.Compiler
AXIS_ANCESTOR, AXIS_ANCESTOR_OR_SELF, AXIS_ATTRIBUTE, AXIS_CHILD, AXIS_DESCENDANT, AXIS_DESCENDANT_OR_SELF, AXIS_FOLLOWING, AXIS_FOLLOWING_SIBLING, AXIS_NAMESPACE, AXIS_PARENT, AXIS_PRECEDING, AXIS_PRECEDING_SIBLING, AXIS_SELF, FUNCTION_BOOLEAN, FUNCTION_CEILING, FUNCTION_CONCAT, FUNCTION_CONTAINS, FUNCTION_COUNT, FUNCTION_FALSE, FUNCTION_FLOOR, FUNCTION_FORMAT_NUMBER, FUNCTION_ID, FUNCTION_KEY, FUNCTION_LANG, FUNCTION_LAST, FUNCTION_LOCAL_NAME, FUNCTION_NAME, FUNCTION_NAMESPACE_URI, FUNCTION_NORMALIZE_SPACE, FUNCTION_NOT, FUNCTION_NULL, FUNCTION_NUMBER, FUNCTION_POSITION, FUNCTION_ROUND, FUNCTION_STARTS_WITH, FUNCTION_STRING, FUNCTION_STRING_LENGTH, FUNCTION_SUBSTRING, FUNCTION_SUBSTRING_AFTER, FUNCTION_SUBSTRING_BEFORE, FUNCTION_SUM, FUNCTION_TRANSLATE, FUNCTION_TRUE, NODE_TYPE_COMMENT, NODE_TYPE_NODE, NODE_TYPE_PI, NODE_TYPE_TEXT
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionProduces an EXPRESSION object representing logical conjunction of all argumentsProduces an EXPRESSION object representing left divided by rightProduces an EXPRESSION object representing the comparison: left equals to rightexpressionPath
(Object expression, Object[] predicates, Object[] steps) Produces an EXPRESSION object representing a filter expressionProduces an EXPRESSION object representing the computation of a core function with the supplied arguments.Produces an EXPRESSION object representing the computation of a library function with the supplied arguments.greaterThan
(Object left, Object right) Produces an EXPRESSION object representing the comparison: left greater than rightgreaterThanOrEqual
(Object left, Object right) Produces an EXPRESSION object representing the comparison: left greater than or equal to rightprivate boolean
Learn whether arg is a name attribute test.Produces an EXPRESSION object representing the comparison: left less than rightlessThanOrEqual
(Object left, Object right) Produces an EXPRESSION object representing the comparison: left less than or equal to rightProduces an EXPRESSION object that represents a string constant.locationPath
(boolean absolute, Object[] steps) Produces an EXPRESSION object representing a location pathProduces an EXPRESSION object representing unary negation of the argumentProduces an EXPRESSION object representing left minus rightProduces an EXPRESSION object representing left modulo rightProduces an EXPRESSION object representing left multiplied by rightnodeNameTest
(Object qname) Produces a NODE_TEST object that represents a node name test.nodeTypeTest
(int nodeType) Produces a NODE_TEST object that represents a node type test.Produces an EXPRESSION object representing the comparison: left is not equal to rightProduces an EXPRESSION object that represents a numeric constant.Produces an EXPRESSION object representing logical disjunction of all argumentsprocessingInstructionTest
(String instruction) Produces a NODE_TEST object that represents a processing instruction test.Produces an QNAME that represents a name with an optional prefix.Produces a STEP object that represents a node test.Produces an EXPRESSION object representing the sum of all argumensprivate Expression[]
toExpressionArray
(Object[] array) Get an Object[] as an Expression[].private Step[]
toStepArray
(Object[] array) Get an Object[] as a Step[].Produces an EXPRESSION object representing union of all node setsvariableReference
(Object qName) Produces an EXPRESSION object representing variable reference
-
Field Details
-
QNAME_NAME
-
-
Constructor Details
-
TreeCompiler
public TreeCompiler()
-
-
Method Details
-
number
Description copied from interface:Compiler
Produces an EXPRESSION object that represents a numeric constant. -
literal
Description copied from interface:Compiler
Produces an EXPRESSION object that represents a string constant. -
qname
Description copied from interface:Compiler
Produces an QNAME that represents a name with an optional prefix. -
sum
Description copied from interface:Compiler
Produces an EXPRESSION object representing the sum of all argumens -
minus
Description copied from interface:Compiler
Produces an EXPRESSION object representing left minus right -
multiply
Description copied from interface:Compiler
Produces an EXPRESSION object representing left multiplied by right -
divide
Description copied from interface:Compiler
Produces an EXPRESSION object representing left divided by right -
mod
Description copied from interface:Compiler
Produces an EXPRESSION object representing left modulo right -
lessThan
Description copied from interface:Compiler
Produces an EXPRESSION object representing the comparison: left less than right -
lessThanOrEqual
Description copied from interface:Compiler
Produces an EXPRESSION object representing the comparison: left less than or equal to right- Specified by:
lessThanOrEqual
in interfaceCompiler
- Parameters:
left
- is an EXPRESSION objectright
- is an EXPRESSION object- Returns:
- Object
-
greaterThan
Description copied from interface:Compiler
Produces an EXPRESSION object representing the comparison: left greater than right- Specified by:
greaterThan
in interfaceCompiler
- Parameters:
left
- is an EXPRESSION objectright
- is an EXPRESSION object- Returns:
- Object
-
greaterThanOrEqual
Description copied from interface:Compiler
Produces an EXPRESSION object representing the comparison: left greater than or equal to right- Specified by:
greaterThanOrEqual
in interfaceCompiler
- Parameters:
left
- is an EXPRESSION objectright
- is an EXPRESSION object- Returns:
- Object
-
equal
Description copied from interface:Compiler
Produces an EXPRESSION object representing the comparison: left equals to right -
notEqual
Description copied from interface:Compiler
Produces an EXPRESSION object representing the comparison: left is not equal to right -
minus
Description copied from interface:Compiler
Produces an EXPRESSION object representing unary negation of the argument -
variableReference
Description copied from interface:Compiler
Produces an EXPRESSION object representing variable reference- Specified by:
variableReference
in interfaceCompiler
- Parameters:
qName
- is a QNAME object- Returns:
- Object
-
function
Description copied from interface:Compiler
Produces an EXPRESSION object representing the computation of a core function with the supplied arguments. -
function
Description copied from interface:Compiler
Produces an EXPRESSION object representing the computation of a library function with the supplied arguments. -
and
Description copied from interface:Compiler
Produces an EXPRESSION object representing logical conjunction of all arguments -
or
Description copied from interface:Compiler
Produces an EXPRESSION object representing logical disjunction of all arguments -
union
Description copied from interface:Compiler
Produces an EXPRESSION object representing union of all node sets -
locationPath
Description copied from interface:Compiler
Produces an EXPRESSION object representing a location path- Specified by:
locationPath
in interfaceCompiler
- Parameters:
absolute
- indicates whether the path is absolutesteps
- are STEP objects- Returns:
- Object
-
expressionPath
Description copied from interface:Compiler
Produces an EXPRESSION object representing a filter expression- Specified by:
expressionPath
in interfaceCompiler
- Parameters:
expression
- is an EXPRESSION objectpredicates
- are EXPRESSION objectssteps
- are STEP objects- Returns:
- Object
-
nodeNameTest
Description copied from interface:Compiler
Produces a NODE_TEST object that represents a node name test.- Specified by:
nodeNameTest
in interfaceCompiler
- Parameters:
qname
- is a QNAME object- Returns:
- Object
-
nodeTypeTest
Description copied from interface:Compiler
Produces a NODE_TEST object that represents a node type test.- Specified by:
nodeTypeTest
in interfaceCompiler
- Parameters:
nodeType
- is a NODE_TEST object- Returns:
- Object
-
processingInstructionTest
Description copied from interface:Compiler
Produces a NODE_TEST object that represents a processing instruction test.- Specified by:
processingInstructionTest
in interfaceCompiler
- Parameters:
instruction
- is a NODE_TEST object- Returns:
- Object
-
step
Description copied from interface:Compiler
Produces a STEP object that represents a node test. -
toExpressionArray
Get an Object[] as an Expression[].- Parameters:
array
- Object[]- Returns:
- Expression[]
-
toStepArray
Get an Object[] as a Step[].- Parameters:
array
- Object[]- Returns:
- Step[]
-
isNameAttributeTest
Learn whether arg is a name attribute test.- Parameters:
arg
- Expression to test- Returns:
- boolean
-