Class UnionExpr
java.lang.Object
org.exolab.adaptx.xpath.expressions.UnionExpr
- All Implemented Interfaces:
MatchExpression
,XPathExpression
An abstract class that represents an XPath Union expression
UnionExpr ::= PathExpr | (PathExpr '|' UnionExpr)
- Version:
- $Revision: 3734 $ $Date: 2003-05-13 09:55:04 +0200 (Tue, 13 May 2003) $
- Author:
- Keith Visco
-
Field Summary
Fields inherited from interface org.exolab.adaptx.xpath.XPathExpression
BOOLEAN, ERROR, FILTER_EXPR, LOCATION_PATH, NODE_TEST, NUMBER, PATH_EXPR, PRIMARY, STEP, STRING, UNION_EXPR
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal short
Returns the type of Expr this Expr representsgetMatchingExpr
(XPathNode node, XPathContext context) Retrieves the PathExpr that matches the given node.abstract PathExpr
Returns the PathExpr of this UnionExpr.abstract UnionExpr
Returns the UnionExpr that this UnionExpr is in union with.abstract boolean
matches
(XPathNode node, XPathContext context) Determines if the given node is matched by this MatchExpr with respect to the given context.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.exolab.adaptx.xpath.XPathExpression
evaluate, toString
-
Constructor Details
-
UnionExpr
public UnionExpr()
-
-
Method Details
-
getPathExpr
Returns the PathExpr of this UnionExpr. A UnionExpr is defined by XPath 1.0 as:UnionExpr ::= PathExpr | (PathExpr '|' UnionExpr)
- Returns:
- the PathExpr of this UnionExpr.
-
getUnionExpr
Returns the UnionExpr that this UnionExpr is in union with. A UnionExpr is defined by XPath 1.0 as:UnionExpr ::= PathExpr | (PathExpr '|' UnionExpr)
- Returns:
- the UnionExpr that this UnionExpr is in union with, or null if this is UnionExpr only contains a PathExpr.
- See Also:
-
getExprType
public final short getExprType()Returns the type of Expr this Expr represents- Specified by:
getExprType
in interfaceXPathExpression
- Returns:
- the type of Expr this Expr represents
-
getMatchingExpr
Retrieves the PathExpr that matches the given node. If more than one PathExpr matches the given node, the most specific PathExpr will be returned.- Parameters:
node
- the node to test for matching- Returns:
- the matching PathExpr or null if none match
- Throws:
XPathException
-
matches
Determines if the given node is matched by this MatchExpr with respect to the given context.- Specified by:
matches
in interfaceMatchExpression
- Parameters:
node
- the node to determine a match forcontext
- the XPathContext- Returns:
- true if the given node is matched by this MatchExpr
- Throws:
XPathException
- when an error occurs during evaluation
-