org.exolab.adaptx.xpath.engine

Class SelectExpr

Implemented Interfaces:
XPathExpression

public final class SelectExpr
extends java.lang.Object
implements XPathExpression

This class represents a SelectExpr
 [1] SelectExpr ::= UnionExpr
 

Version:
$Revision: 1.2 $ $Date: 2003/05/13 07:59:08 $

Author:
Keith Visco

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

SelectExpr()
Creates a new SelectExpr.

Method Summary

XPathResult
evaluate(XPathContext context)
Evaluates the expression and returns the XPath result.
short
getExprType()
Returns the type of this expression.
UnionExpr
getUnionExpr()
String
toString()
Returns the XPath expression as a string.

Constructor Details

SelectExpr

public SelectExpr()
Creates a new SelectExpr. This SelectExpr will select the empty node set by default.

Method Details

evaluate

public XPathResult evaluate(XPathContext context)
            throws XPathException
Evaluates the expression and returns the XPath result.
Specified by:
evaluate in interface XPathExpression

Parameters:
context - The XPathContext to use during evaluation.

Returns:
The XPathResult (not null).

Throws:
XPathException - if an error occured while evaluating this expression.


getExprType

public short getExprType()
Returns the type of this expression.
Specified by:
getExprType in interface XPathExpression

Returns:
The type of this expression


getUnionExpr

public UnionExpr getUnionExpr()


toString

public String toString()
Specified by:
toString in interface XPathExpression

Returns:
The XPath expression as a string