|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.xpath.Expression org.apache.xpath.patterns.UnionPattern
public class UnionPattern
This class represents a union pattern, which can have multiple individual StepPattern patterns.
Nested Class Summary | |
---|---|
(package private) class |
UnionPattern.UnionPathPartOwner
|
Field Summary | |
---|---|
private StepPattern[] |
m_patterns
Array of the contained step patterns to be tested. |
(package private) static long |
serialVersionUID
|
Constructor Summary | |
---|---|
UnionPattern()
|
Method Summary | |
---|---|
void |
callVisitors(ExpressionOwner owner,
XPathVisitor visitor)
This will traverse the heararchy, calling the visitor for each member. |
boolean |
canTraverseOutsideSubtree()
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. |
XObject |
execute(XPathContext xctxt)
Test a node to see if it matches any of the patterns in the union. |
void |
fixupVariables(java.util.Vector vars,
int globalsSize)
No arguments to process, so this does nothing. |
StepPattern[] |
getPatterns()
Get the contained step patterns to be tested. |
void |
setPatterns(StepPattern[] patterns)
Set the contained step patterns to be tested. |
Methods inherited from class org.apache.xpath.Expression |
---|
asIterator, asIteratorRaw, asNode, assertion, bool, error, execute, execute, execute, executeCharsToContentHandler, exprAddChild, exprGetChild, exprGetNumChildren, exprGetParent, exprSetParent, getColumnNumber, getExpressionOwner, getLineNumber, getPublicId, getSystemId, isNodesetExpr, isSameClass, isStableNumber, num, warn, xstr |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
static final long serialVersionUID
private StepPattern[] m_patterns
Constructor Detail |
---|
public UnionPattern()
Method Detail |
---|
public void fixupVariables(java.util.Vector vars, int globalsSize)
fixupVariables
in class Expression
vars
- List of QNames that correspond to variables. This list
should be searched backwards for the first qualified name that
corresponds to the variable reference qname. The position of the
QName in the vector from the start of the vector will be its position
in the stack frame (but variables above the globalsTop value will need
to be offset to the current stack frame).
NEEDSDOC @param globalsSizepublic boolean canTraverseOutsideSubtree()
canTraverseOutsideSubtree
in class Expression
public void setPatterns(StepPattern[] patterns)
patterns
- the contained step patterns to be tested.public StepPattern[] getPatterns()
public XObject execute(XPathContext xctxt) throws javax.xml.transform.TransformerException
execute
in class Expression
xctxt
- XPath runtime context.
NodeTest.SCORE_NODETEST
,
NodeTest.SCORE_NONE
,
NodeTest.SCORE_NSWILD
,
NodeTest.SCORE_QNAME
, or
NodeTest.SCORE_OTHER
.
javax.xml.transform.TransformerException
public void callVisitors(ExpressionOwner owner, XPathVisitor visitor)
XPathVisitable
owner
- The owner of the visitor, where that path may be
rewritten if needed.visitor
- The visitor whose appropriate method will be called.XPathVisitable.callVisitors(ExpressionOwner, XPathVisitor)
public boolean deepEquals(Expression expr)
Expression
deepEquals
in class Expression
expr
- Another expression object.
Expression.deepEquals(Expression)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |