Package org.jaxen.expr
Class DefaultStep
java.lang.Object
org.jaxen.expr.DefaultStep
- All Implemented Interfaces:
Serializable
,Predicated
,Step
- Direct Known Subclasses:
DefaultAllNodeStep
,DefaultCommentNodeStep
,DefaultNameStep
,DefaultProcessingInstructionNodeStep
,DefaultTextNodeStep
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addPredicate
(Predicate predicate) Add an additional predicate to this object.axisIterator
(Object contextNode, ContextSupport support) Get an Iterator for the current axis starting in the given contextNode.For each node in the given context calls matches() for every node on the axis, then filters the result by each of the predicates.int
getAxis()
Get an identifier for the current axis.Returns a possibly empty list of predicates.Returns a possibly empty set of predicates.getText()
Returns aString
containing the XPath expression.void
simplify()
Simplifies the XPath step.toString()
-
Method Details
-
addPredicate
Description copied from interface:Predicated
Add an additional predicate to this object.- Specified by:
addPredicate
in interfacePredicated
- Parameters:
predicate
- the predicate to add
-
getPredicates
Description copied from interface:Predicated
Returns a possibly empty list of predicates.- Specified by:
getPredicates
in interfacePredicated
- Returns:
- the list of predicates
-
getPredicateSet
Description copied from interface:Predicated
Returns a possibly empty set of predicates.- Specified by:
getPredicateSet
in interfacePredicated
- Returns:
- the set of predicates
-
getAxis
public int getAxis()Description copied from interface:Step
Get an identifier for the current axis. -
getIterableAxis
-
getAxisName
-
getText
Description copied from interface:Step
Returns aString
containing the XPath expression. -
toString
-
simplify
public void simplify()Description copied from interface:Step
Simplifies the XPath step. In practice, this is usually a noop. Jaxen does not currently perform any simplification. -
axisIterator
public Iterator axisIterator(Object contextNode, ContextSupport support) throws UnsupportedAxisException Description copied from interface:Step
Get an Iterator for the current axis starting in the given contextNode.- Specified by:
axisIterator
in interfaceStep
- Parameters:
contextNode
- the node from which to follow this stepsupport
- the remaining context for the traversal- Returns:
- an iterator over the nodes along the axis
- Throws:
UnsupportedAxisException
- if the navigator does not support this step's axis
-
evaluate
Description copied from interface:Step
For each node in the given context calls matches() for every node on the axis, then filters the result by each of the predicates.- Specified by:
evaluate
in interfaceStep
- Parameters:
context
- the node in context of its position in the document- Returns:
- a list of matching nodes
- Throws:
JaxenException
-