Package org.exolab.adaptx.xpath
Interface XPathExpression
- All Known Subinterfaces:
BinaryExpr
,EqualityExpr
,FilterExpr
,GroupedExpression
,LocationStep
,NodeExpression
,PathComponent
- All Known Implementing Classes:
AbstractPathComponent
,BooleanFunctionCall
,Concat
,Contains
,CountFunctionCall
,ErrorExpr
,ErrorFunctionCall
,ExtensionFunctionCall
,FalseFunctionCall
,FormatNumber
,FunctionCall
,FunctionCallImpl
,IdFunctionCall
,IdRefFunctionCall
,LangFunctionCall
,LastFunctionCall
,Normalize
,NotFunctionCall
,NumberFunctionCall
,PathExpr
,PositionFunctionCall
,PredicateExpr
,PrimaryExpr
,SelectExpr
,StartsWith
,StringFunctionCall
,StringLength
,Substring
,SubstringAfter
,SubstringBefore
,SumFunctionCall
,TextFunctionCall
,Translate
,TrueFunctionCall
,UnionExpr
,VariableReference
,XMLNamesFunctionCall
public interface XPathExpression
Interface representing an XPath expression. An XPath expression
is thread-safe and can be evaluated multiple times concurrently.
It is a compiled version of the textual XPath expression and can be
cached for later use.
- Version:
- $Revision: 3738 $
- Author:
- Keith Visco, Assaf Arkin
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final short
The Boolean expression type.static final short
Expression of type error.static final short
The FilterExpr expression type.static final short
The LocationPath expression type.static final short
The NodeTest expressions typestatic final short
The NodeTest expressions typestatic final short
The PathExpr expression type.static final short
The Primary expression type.static final short
The Step expression type.static final short
The String expression type.static final short
The union expression type. -
Method Summary
Modifier and TypeMethodDescriptionevaluate
(XPathContext context) Evaluates the expression and returns the XPath result.short
Returns the type of this expression.toString()
Returns the XPath expression as a string.
-
Field Details
-
ERROR
static final short ERRORExpression of type error.- See Also:
-
BOOLEAN
static final short BOOLEANThe Boolean expression type.- See Also:
-
FILTER_EXPR
static final short FILTER_EXPRThe FilterExpr expression type.- See Also:
-
LOCATION_PATH
static final short LOCATION_PATHThe LocationPath expression type.- See Also:
-
NODE_TEST
static final short NODE_TESTThe NodeTest expressions type- See Also:
-
NUMBER
static final short NUMBERThe NodeTest expressions type- See Also:
-
PATH_EXPR
static final short PATH_EXPRThe PathExpr expression type.- See Also:
-
PRIMARY
static final short PRIMARYThe Primary expression type.- See Also:
-
STEP
static final short STEPThe Step expression type.- See Also:
-
STRING
static final short STRINGThe String expression type.- See Also:
-
UNION_EXPR
static final short UNION_EXPRThe union expression type.- See Also:
-
-
Method Details
-
getExprType
short getExprType()Returns the type of this expression.- Returns:
- The type of this expression
-
evaluate
Evaluates the expression and returns the XPath result.- Parameters:
context
- The XPathContext to use during evaluation.- Returns:
- The XPathResult (not null).
- Throws:
XPathException
- if an error occured while evaluating this expression.
-
toString
String toString()Returns the XPath expression as a string. The returned value is a valid XPath expression that can be parsed into an equivalentXPathExpression
object.
-