|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjd.xml.xpath.expr.ExpressionImpl
jd.xml.xpath.expr.NodeSetExpression
jd.xml.xpath.expr.path.LocationStep
jd.xml.xpath.expr.path.FilteredLocationStep
A FilteredLocationStep is a LocationStep with a simple filter predicate that uses axis iterators for evaluation and is therefore faster than a heavyweight PredicateExpression. - and a forward axis or a reverse axis and a unique filter expression The implementation uses axis iterators and applies the predicate filter directly to all iterated nodes which pass the nodetest (instead of evaluating the pure location step and then filtering the returned node-set with a PredicateExpression. Because iterators are used the context size is not known and therefore the filter expression may not contain last().
Field Summary |
Fields inherited from class jd.xml.xpath.expr.path.LocationStep |
axis_, maxAxisResultSize_, nodeTest_ |
Fields inherited from interface jd.xml.xpath.expr.Expression |
DEP_CONTEXT_NODE, DEP_CONTEXT_POSITION, DEP_CONTEXT_SIZE, DEP_CONTEXT_STATIC, DEP_NONE, DEP_UNKNOWN |
Method Summary | |
void |
accept(ExpressionVisitor visitor)
Accept a ExpressionVisitor. |
static FilteredLocationStep |
create(SimpleLocationStep step,
Expression filter)
Create a FilteredLocationStep if possible |
int |
getContextDependencies()
Return a bitfield indicating the expression dependencies. |
int |
getMaxResultSize()
Return the maximum size of the returned NodeSet or 0 if not known. |
void |
getNodes(XPathContext context,
XMutableNodeSet nodeSet)
Evaluate the FilteredLocationStep. |
XNodeSet |
toNodeSet(XPathContext context,
int nodeSetOrdering)
Evaluate the FilteredLocationStep. |
Methods inherited from class jd.xml.xpath.expr.path.LocationStep |
getAxis, getNodeTest |
Methods inherited from class jd.xml.xpath.expr.NodeSetExpression |
canCreateModelWalker, getMaxResultSize, getMinResultSize, getMinResultSize, getModelWalker, getResultType, toBooleanValue, toNumberValue, toStringValue, toXObject |
Methods inherited from class jd.xml.xpath.expr.ExpressionImpl |
hasContextDependencies, isUniqueFilter, matchesFilter, toNode, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
public static FilteredLocationStep create(SimpleLocationStep step, Expression filter)
public int getMaxResultSize()
NodeSetExpression
getMaxResultSize
in class LocationStep
public XNodeSet toNodeSet(XPathContext context, int nodeSetOrdering)
toNodeSet
in interface Expression
toNodeSet
in class ExpressionImpl
public void getNodes(XPathContext context, XMutableNodeSet nodeSet)
getNodes
in class LocationStep
context
- the evaluation contextnodeSet
- a NodeSet where to store the resulting nodespublic int getContextDependencies()
getContextDependencies
in interface Expression
getContextDependencies
in class LocationStep
public void accept(ExpressionVisitor visitor)
Expression
accept
in interface Expression
accept
in class LocationStep
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |