Class TreeCompiler
- java.lang.Object
-
- org.apache.commons.jxpath.ri.compiler.TreeCompiler
-
-
Field Summary
-
Fields 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 Constructor Description TreeCompiler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Objectand(Object[] arguments)Produces an EXPRESSION object representing logical conjunction of all argumentsObjectdivide(Object left, Object right)Produces an EXPRESSION object representing left divided by rightObjectequal(Object left, Object right)Produces an EXPRESSION object representing the comparison: left equals to rightObjectexpressionPath(Object expression, Object[] predicates, Object[] steps)Produces an EXPRESSION object representing a filter expressionObjectfunction(int code, Object[] args)Produces an EXPRESSION object representing the computation of a core function with the supplied arguments.Objectfunction(Object name, Object[] args)Produces an EXPRESSION object representing the computation of a library function with the supplied arguments.ObjectgreaterThan(Object left, Object right)Produces an EXPRESSION object representing the comparison: left greater than rightObjectgreaterThanOrEqual(Object left, Object right)Produces an EXPRESSION object representing the comparison: left greater than or equal to rightObjectlessThan(Object left, Object right)Produces an EXPRESSION object representing the comparison: left less than rightObjectlessThanOrEqual(Object left, Object right)Produces an EXPRESSION object representing the comparison: left less than or equal to rightObjectliteral(String value)Produces an EXPRESSION object that represents a string constant.ObjectlocationPath(boolean absolute, Object[] steps)Produces an EXPRESSION object representing a location pathObjectminus(Object argument)Produces an EXPRESSION object representing unary negation of the argumentObjectminus(Object left, Object right)Produces an EXPRESSION object representing left minus rightObjectmod(Object left, Object right)Produces an EXPRESSION object representing left modulo rightObjectmultiply(Object left, Object right)Produces an EXPRESSION object representing left multiplied by rightObjectnodeNameTest(Object qname)Produces a NODE_TEST object that represents a node name test.ObjectnodeTypeTest(int nodeType)Produces a NODE_TEST object that represents a node type test.ObjectnotEqual(Object left, Object right)Produces an EXPRESSION object representing the comparison: left is not equal to rightObjectnumber(String value)Produces an EXPRESSION object that represents a numeric constant.Objector(Object[] arguments)Produces an EXPRESSION object representing logical disjunction of all argumentsObjectprocessingInstructionTest(String instruction)Produces a NODE_TEST object that represents a processing instruction test.Objectqname(String prefix, String name)Produces an QNAME that represents a name with an optional prefix.Objectstep(int axis, Object nodeTest, Object[] predicates)Produces a STEP object that represents a node test.Objectsum(Object[] arguments)Produces an EXPRESSION object representing the sum of all argumensObjectunion(Object[] arguments)Produces an EXPRESSION object representing union of all node setsObjectvariableReference(Object qName)Produces an EXPRESSION object representing variable reference
-
-
-
Method Detail
-
number
public Object number(String value)
Description copied from interface:CompilerProduces an EXPRESSION object that represents a numeric constant.
-
literal
public Object literal(String value)
Description copied from interface:CompilerProduces an EXPRESSION object that represents a string constant.
-
qname
public Object qname(String prefix, String name)
Description copied from interface:CompilerProduces an QNAME that represents a name with an optional prefix.
-
sum
public Object sum(Object[] arguments)
Description copied from interface:CompilerProduces an EXPRESSION object representing the sum of all argumens
-
minus
public Object minus(Object left, Object right)
Description copied from interface:CompilerProduces an EXPRESSION object representing left minus right
-
multiply
public Object multiply(Object left, Object right)
Description copied from interface:CompilerProduces an EXPRESSION object representing left multiplied by right
-
divide
public Object divide(Object left, Object right)
Description copied from interface:CompilerProduces an EXPRESSION object representing left divided by right
-
mod
public Object mod(Object left, Object right)
Description copied from interface:CompilerProduces an EXPRESSION object representing left modulo right
-
lessThan
public Object lessThan(Object left, Object right)
Description copied from interface:CompilerProduces an EXPRESSION object representing the comparison: left less than right
-
lessThanOrEqual
public Object lessThanOrEqual(Object left, Object right)
Description copied from interface:CompilerProduces an EXPRESSION object representing the comparison: left less than or equal to right- Specified by:
lessThanOrEqualin interfaceCompiler- Parameters:
left- is an EXPRESSION objectright- is an EXPRESSION object- Returns:
- Object
-
greaterThan
public Object greaterThan(Object left, Object right)
Description copied from interface:CompilerProduces an EXPRESSION object representing the comparison: left greater than right- Specified by:
greaterThanin interfaceCompiler- Parameters:
left- is an EXPRESSION objectright- is an EXPRESSION object- Returns:
- Object
-
greaterThanOrEqual
public Object greaterThanOrEqual(Object left, Object right)
Description copied from interface:CompilerProduces an EXPRESSION object representing the comparison: left greater than or equal to right- Specified by:
greaterThanOrEqualin interfaceCompiler- Parameters:
left- is an EXPRESSION objectright- is an EXPRESSION object- Returns:
- Object
-
equal
public Object equal(Object left, Object right)
Description copied from interface:CompilerProduces an EXPRESSION object representing the comparison: left equals to right
-
notEqual
public Object notEqual(Object left, Object right)
Description copied from interface:CompilerProduces an EXPRESSION object representing the comparison: left is not equal to right
-
minus
public Object minus(Object argument)
Description copied from interface:CompilerProduces an EXPRESSION object representing unary negation of the argument
-
variableReference
public Object variableReference(Object qName)
Description copied from interface:CompilerProduces an EXPRESSION object representing variable reference- Specified by:
variableReferencein interfaceCompiler- Parameters:
qName- is a QNAME object- Returns:
- Object
-
function
public Object function(int code, Object[] args)
Description copied from interface:CompilerProduces an EXPRESSION object representing the computation of a core function with the supplied arguments.
-
function
public Object function(Object name, Object[] args)
Description copied from interface:CompilerProduces an EXPRESSION object representing the computation of a library function with the supplied arguments.
-
and
public Object and(Object[] arguments)
Description copied from interface:CompilerProduces an EXPRESSION object representing logical conjunction of all arguments
-
or
public Object or(Object[] arguments)
Description copied from interface:CompilerProduces an EXPRESSION object representing logical disjunction of all arguments
-
union
public Object union(Object[] arguments)
Description copied from interface:CompilerProduces an EXPRESSION object representing union of all node sets
-
locationPath
public Object locationPath(boolean absolute, Object[] steps)
Description copied from interface:CompilerProduces an EXPRESSION object representing a location path- Specified by:
locationPathin interfaceCompiler- Parameters:
absolute- indicates whether the path is absolutesteps- are STEP objects- Returns:
- Object
-
expressionPath
public Object expressionPath(Object expression, Object[] predicates, Object[] steps)
Description copied from interface:CompilerProduces an EXPRESSION object representing a filter expression- Specified by:
expressionPathin interfaceCompiler- Parameters:
expression- is an EXPRESSION objectpredicates- are EXPRESSION objectssteps- are STEP objects- Returns:
- Object
-
nodeNameTest
public Object nodeNameTest(Object qname)
Description copied from interface:CompilerProduces a NODE_TEST object that represents a node name test.- Specified by:
nodeNameTestin interfaceCompiler- Parameters:
qname- is a QNAME object- Returns:
- Object
-
nodeTypeTest
public Object nodeTypeTest(int nodeType)
Description copied from interface:CompilerProduces a NODE_TEST object that represents a node type test.- Specified by:
nodeTypeTestin interfaceCompiler- Parameters:
nodeType- is a NODE_TEST object- Returns:
- Object
-
processingInstructionTest
public Object processingInstructionTest(String instruction)
Description copied from interface:CompilerProduces a NODE_TEST object that represents a processing instruction test.- Specified by:
processingInstructionTestin interfaceCompiler- Parameters:
instruction- is a NODE_TEST object- Returns:
- Object
-
-