|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Expression represents a XPath expression. An Expression can be evaluated with respect to a XPath context. An expression is evaluated to yield an object, which has one of the four basic XPath types: node-set, boolean, number or string,
Field Summary | |
static int |
DEP_CONTEXT_NODE
|
static int |
DEP_CONTEXT_POSITION
|
static int |
DEP_CONTEXT_SIZE
|
static int |
DEP_CONTEXT_STATIC
|
static int |
DEP_NONE
|
static int |
DEP_UNKNOWN
|
Method Summary | |
void |
accept(ExpressionVisitor visitor)
Accept a ExpressionVisitor. |
int |
getContextDependencies()
Return a bitfield indicating the expression dependencies on the XPath context. |
int |
getResultType()
Return the type of the result object, before any conversions to the desired result type are performed. |
boolean |
hasContextDependencies(int dependencies)
Test if the expression has special dependecies. |
boolean |
isUniqueFilter()
Test if this expression only matches one node when used as a predicate filter for a node-set. |
boolean |
matchesFilter(XPathContext context)
Evaluate the expression and return if the context node matches the expression when used as predicate filter. |
boolean |
toBooleanValue(XPathContext context)
Evaluate the Expression to a boolean. |
XPathNode |
toNode(XPathContext context)
Evaluate the Expression to a XPathNode, i.e. |
XNodeSet |
toNodeSet(XPathContext context,
int ordering)
Evaluate the Expression to a XNodeSet. |
double |
toNumberValue(XPathContext context)
Evaluate the Expression to a number. |
String |
toString()
Return a string representation of the expression. |
String |
toStringValue(XPathContext context)
Evaluate the Expression to a String. |
XObject |
toXObject(XPathContext context)
Evaluate the expression to a XObject. |
Field Detail |
public static final int DEP_NONE
public static final int DEP_CONTEXT_STATIC
public static final int DEP_CONTEXT_SIZE
public static final int DEP_CONTEXT_POSITION
public static final int DEP_CONTEXT_NODE
public static final int DEP_UNKNOWN
Method Detail |
public XObject toXObject(XPathContext context)
context
- the evaluation contextpublic double toNumberValue(XPathContext context)
context
- the evaluation contextpublic String toStringValue(XPathContext context)
context
- the evaluation contextpublic boolean toBooleanValue(XPathContext context)
context
- the evaluation contextpublic XNodeSet toNodeSet(XPathContext context, int ordering)
context
- the evaluation contextordering
- the ordering which the returned node-set must havepublic XPathNode toNode(XPathContext context)
context
- the evaluation contextpublic int getResultType()
public boolean matchesFilter(XPathContext context)
public boolean isUniqueFilter()
public int getContextDependencies()
public boolean hasContextDependencies(int dependencies)
dependencies
- the dependency constants merge together with bitwise orpublic void accept(ExpressionVisitor visitor)
public String toString()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |