Class UnionPattern
java.lang.Object
org.loboevolution.apache.xpath.Expression
org.loboevolution.apache.xpath.patterns.UnionPattern
- All Implemented Interfaces:
SourceLocator
,ExpressionNode
,XPathVisitable
This class represents a union pattern, which can have multiple individual StepPattern patterns.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
callVisitors
(XPathVisitor visitor) This will traverse the hierarchy, calling the visitor for each member.boolean
Tell if this expression or it's subexpressions can traverse outside the current subtree.boolean
deepEquals
(Expression expr) Compare this object with another object and see if they are equal, include the sub heararchy.execute
(XPathContext xctxt) Execute an expression in the XPath runtime context, and return the result of the expression.void
setPatterns
(StepPattern[] patterns) Set the contained step patterns to be tested.Methods inherited from class org.loboevolution.apache.xpath.Expression
asIterator, asNode, assertion, bool, error, execute, execute, execute, exprGetParent, exprSetParent, getColumnNumber, getExpressionOwner, getLineNumber, getPublicId, getSystemId, isSameClass, isStableNumber, num
-
Constructor Details
-
UnionPattern
public UnionPattern()
-
-
Method Details
-
canTraverseOutsideSubtree
public boolean canTraverseOutsideSubtree()Tell if this expression or it's subexpressions can traverse outside the current subtree.- Overrides:
canTraverseOutsideSubtree
in classExpression
- Returns:
- true if traversal outside the context node's subtree can occur.
-
setPatterns
Set the contained step patterns to be tested.- Parameters:
patterns
- the contained step patterns to be tested.
-
execute
Execute an expression in the XPath runtime context, and return the result of the expression.- Specified by:
execute
in classExpression
- Parameters:
xctxt
- The XPath runtime context.- Returns:
- The result of the expression in the form of a
XObject
. - Throws:
TransformerException
- if a runtime exception occurs.
-
callVisitors
This will traverse the hierarchy, calling the visitor for each member. If the called visitor method returns false, the subtree should not be called.- Parameters:
visitor
- The visitor whose appropriate method will be called.
-
deepEquals
Compare this object with another object and see if they are equal, include the sub heararchy.- Specified by:
deepEquals
in classExpression
- Parameters:
expr
- Another expression object.- Returns:
- true if this objects class and the expr object's class are the same, and the data contained within both objects are considered equal.
-