public class TreeCompiler extends Object implements 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_ENDS_WITH, 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 and Description |
---|
TreeCompiler() |
Modifier and Type | Method and Description |
---|---|
Object |
and(Object[] arguments)
Produces an EXPRESSION object representing logical conjunction of
all arguments
|
Object |
divide(Object left,
Object right)
Produces an EXPRESSION object representing left divided by
right
|
Object |
equal(Object left,
Object right)
Produces an EXPRESSION object representing the comparison:
left equals to right
|
Object |
expressionPath(Object expression,
Object[] predicates,
Object[] steps)
Produces an EXPRESSION object representing a filter expression
|
Object |
function(int code,
Object[] args)
Produces an EXPRESSION object representing the computation of
a core function with the supplied arguments.
|
Object |
function(Object name,
Object[] args)
Produces an EXPRESSION object representing the computation of
a library function with the supplied arguments.
|
Object |
greaterThan(Object left,
Object right)
Produces an EXPRESSION object representing the comparison:
left greater than right
|
Object |
greaterThanOrEqual(Object left,
Object right)
Produces an EXPRESSION object representing the comparison:
left greater than or equal to right
|
Object |
lessThan(Object left,
Object right)
Produces an EXPRESSION object representing the comparison:
left less than right
|
Object |
lessThanOrEqual(Object left,
Object right)
Produces an EXPRESSION object representing the comparison:
left less than or equal to right
|
Object |
literal(String value)
Produces an EXPRESSION object that represents a string constant.
|
Object |
locationPath(boolean absolute,
Object[] steps)
Produces an EXPRESSION object representing a location path
|
Object |
minus(Object argument)
Produces an EXPRESSION object representing unary negation of the argument
|
Object |
minus(Object left,
Object right)
Produces an EXPRESSION object representing left minus right
|
Object |
mod(Object left,
Object right)
Produces an EXPRESSION object representing left modulo
right
|
Object |
multiply(Object left,
Object right)
Produces an EXPRESSION object representing left multiplied by
right
|
Object |
nodeNameTest(Object qname)
Produces a NODE_TEST object that represents a node name test.
|
Object |
nodeTypeTest(int nodeType)
Produces a NODE_TEST object that represents a node type test.
|
Object |
notEqual(Object left,
Object right)
Produces an EXPRESSION object representing the comparison:
left is not equal to right
|
Object |
number(String value)
Produces an EXPRESSION object that represents a numeric constant.
|
Object |
or(Object[] arguments)
Produces an EXPRESSION object representing logical disjunction of
all arguments
|
Object |
processingInstructionTest(String instruction)
Produces a NODE_TEST object that represents a processing instruction
test.
|
Object |
qname(String prefix,
String name)
Produces an QNAME that represents a name with an optional prefix.
|
Object |
step(int axis,
Object nodeTest,
Object[] predicates)
Produces a STEP object that represents a node test.
|
Object |
sum(Object[] arguments)
Produces an EXPRESSION object representing the sum of all argumens
|
Object |
union(Object[] arguments)
Produces an EXPRESSION object representing union of all node sets
|
Object |
variableReference(Object qName)
Produces an EXPRESSION object representing variable reference
|
public TreeCompiler()
public Object number(String value)
Compiler
public Object literal(String value)
Compiler
public Object qname(String prefix, String name)
Compiler
public Object sum(Object[] arguments)
Compiler
public Object minus(Object left, Object right)
Compiler
public Object multiply(Object left, Object right)
Compiler
public Object divide(Object left, Object right)
Compiler
public Object mod(Object left, Object right)
Compiler
public Object lessThan(Object left, Object right)
Compiler
public Object lessThanOrEqual(Object left, Object right)
Compiler
lessThanOrEqual
in interface Compiler
left
- is an EXPRESSION objectright
- is an EXPRESSION objectpublic Object greaterThan(Object left, Object right)
Compiler
greaterThan
in interface Compiler
left
- is an EXPRESSION objectright
- is an EXPRESSION objectpublic Object greaterThanOrEqual(Object left, Object right)
Compiler
greaterThanOrEqual
in interface Compiler
left
- is an EXPRESSION objectright
- is an EXPRESSION objectpublic Object equal(Object left, Object right)
Compiler
public Object notEqual(Object left, Object right)
Compiler
public Object minus(Object argument)
Compiler
public Object variableReference(Object qName)
Compiler
variableReference
in interface Compiler
qName
- is a QNAME objectpublic Object function(int code, Object[] args)
Compiler
public Object function(Object name, Object[] args)
Compiler
public Object and(Object[] arguments)
Compiler
public Object or(Object[] arguments)
Compiler
public Object union(Object[] arguments)
Compiler
public Object locationPath(boolean absolute, Object[] steps)
Compiler
locationPath
in interface Compiler
absolute
- indicates whether the path is absolutesteps
- are STEP objectspublic Object expressionPath(Object expression, Object[] predicates, Object[] steps)
Compiler
expressionPath
in interface Compiler
expression
- is an EXPRESSION objectpredicates
- are EXPRESSION objectssteps
- are STEP objectspublic Object nodeNameTest(Object qname)
Compiler
nodeNameTest
in interface Compiler
qname
- is a QNAME objectpublic Object nodeTypeTest(int nodeType)
Compiler
nodeTypeTest
in interface Compiler
nodeType
- is a NODE_TEST objectpublic Object processingInstructionTest(String instruction)
Compiler
processingInstructionTest
in interface Compiler
instruction
- is a NODE_TEST objectCopyright © 2001–2015 The Apache Software Foundation. All rights reserved.