org.exolab.adaptx.xpath.expressions
Interface NodeExpression

All Superinterfaces:
MatchExpression, XPathExpression

public interface NodeExpression
extends XPathExpression, MatchExpression

Represents an XPath node expression.

Author:
Keith Visco

Field Summary
static short ANY_EXPR
          The node expression type that selects or matches "any" node.
static short ATTRIBUTE_EXPR
          The node expression type that selects or matches attribute nodes
static short COMMENT_EXPR
          The node expression type that selects or matches comment nodes
static short ELEMENT_EXPR
          The node expression type that selects or matches element nodes
static short ID_EXPR
          The node expression type that selects or matches any element node with a specific ID
static short IDENTITY_EXPR
          The node expression type that selects or matches the current context node
static short NAMESPACE_EXPR
          The node expression type that selects or matches namespace nodes
static short PARENT_EXPR
          The node expression type that selects or matches the parent node of the current context node.
static short PI_EXPR
          The node expression type that selects or matches Processing Instruction nodes
static short TEXT_EXPR
          The node expression type that selects or matches text nodes
static short WILDCARD_EXPR
          The node expression type that selects or matches any element node
 
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
 
Method Summary
 java.lang.String getName()
          Returns the QName matched by this NodeExpression.
 short getNodeExprType()
          Returns the type of this Node exprression, the value must be one of the value Node expression types.
 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 interface org.exolab.adaptx.xpath.XPathExpression
evaluate, getExprType, toString
 

Field Detail

ANY_EXPR

static final short ANY_EXPR
The node expression type that selects or matches "any" node.

See Also:
Constant Field Values

ATTRIBUTE_EXPR

static final short ATTRIBUTE_EXPR
The node expression type that selects or matches attribute nodes

See Also:
Constant Field Values

ELEMENT_EXPR

static final short ELEMENT_EXPR
The node expression type that selects or matches element nodes

See Also:
Constant Field Values

ID_EXPR

static final short ID_EXPR
The node expression type that selects or matches any element node with a specific ID

See Also:
Constant Field Values

IDENTITY_EXPR

static final short IDENTITY_EXPR
The node expression type that selects or matches the current context node

See Also:
Constant Field Values

PARENT_EXPR

static final short PARENT_EXPR
The node expression type that selects or matches the parent node of the current context node.

See Also:
Constant Field Values

TEXT_EXPR

static final short TEXT_EXPR
The node expression type that selects or matches text nodes

See Also:
Constant Field Values

COMMENT_EXPR

static final short COMMENT_EXPR
The node expression type that selects or matches comment nodes

See Also:
Constant Field Values

PI_EXPR

static final short PI_EXPR
The node expression type that selects or matches Processing Instruction nodes

See Also:
Constant Field Values

WILDCARD_EXPR

static final short WILDCARD_EXPR
The node expression type that selects or matches any element node

See Also:
Constant Field Values

NAMESPACE_EXPR

static final short NAMESPACE_EXPR
The node expression type that selects or matches namespace nodes

See Also:
Constant Field Values
Method Detail

getNodeExprType

short getNodeExprType()
Returns the type of this Node exprression, the value must be one of the value Node expression types.

Returns:
the type of this Node expression

getName

java.lang.String getName()
Returns the QName matched by this NodeExpression. The value may be null, for example if this is a TEXT_EXPR or a WILDCARD_EXPR.

Returns:
the QName matched by this NodeExpression.

matches

boolean matches(XPathNode node,
                XPathContext context)
                throws XPathException
Determines if the given node is matched by this MatchExpr with respect to the given context.

Specified by:
matches in interface MatchExpression
Parameters:
node - the node to determine a match for
context - the XPathContext
Returns:
true if the given node is matched by this MatchExpr
Throws:
XPathException - when an error occurs during evaluation