Package org.jaxen.expr
Class DefaultNameStep
java.lang.Object
org.jaxen.expr.DefaultStep
org.jaxen.expr.DefaultNameStep
- All Implemented Interfaces:
Serializable
,NameStep
,Predicated
,Step
Expression object that represents any flavor
of name-test steps within an XPath.
This includes simple steps, such as "foo", non-default-axis steps, such as "following-sibling::foo" or "@foo", and namespace-aware steps, such as "foo:bar".
- Author:
- bob mcwhirter (bob@werken.com), Stephen Colebourne
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultNameStep
(IterableAxis axis, String prefix, String localName, PredicateSet predicateSet) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionEvaluate the context node set to find the new node set.Gets the local name.Gets the namespace prefix.getText()
Gets the step as a fully defined XPath.boolean
Does this step match any name? (i.e.boolean
matches
(Object node, ContextSupport contextSupport) Checks whether the node matches this step.toString()
Returns a full information debugging string.Methods inherited from class org.jaxen.expr.DefaultStep
addPredicate, axisIterator, getAxis, getAxisName, getIterableAxis, getPredicates, getPredicateSet, simplify
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.jaxen.expr.Predicated
addPredicate, getPredicates, getPredicateSet
Methods inherited from interface org.jaxen.expr.Step
axisIterator, getAxis, simplify
-
Constructor Details
-
DefaultNameStep
public DefaultNameStep(IterableAxis axis, String prefix, String localName, PredicateSet predicateSet) Constructor.- Parameters:
axis
- the axis to work throughprefix
- the name prefixlocalName
- the local namepredicateSet
- the set of predicates
-
-
Method Details
-
getPrefix
Gets the namespace prefix. -
getLocalName
Gets the local name.- Specified by:
getLocalName
in interfaceNameStep
- Returns:
- the local name
-
isMatchesAnyName
public boolean isMatchesAnyName()Does this step match any name? (i.e. Is it '*'?)- Returns:
- true if it matches any name
-
getText
Gets the step as a fully defined XPath.- Specified by:
getText
in interfaceStep
- Overrides:
getText
in classDefaultStep
- Returns:
- the full XPath for this step
-
evaluate
Evaluate the context node set to find the new node set.This method overrides the version in
DefaultStep
for performance.- Specified by:
evaluate
in interfaceStep
- Overrides:
evaluate
in classDefaultStep
- Parameters:
context
- the node in context of its position in the document- Returns:
- a list of matching nodes
- Throws:
JaxenException
-
matches
Checks whether the node matches this step.- Specified by:
matches
in interfaceStep
- Parameters:
node
- the node to checkcontextSupport
- the context support- Returns:
- true if matches
- Throws:
JaxenException
-
toString
Returns a full information debugging string.- Overrides:
toString
in classDefaultStep
- Returns:
- a debugging string
-