|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jaxen.expr.DefaultStep
org.jaxen.expr.DefaultNameStep
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".
Constructor Summary | |
DefaultNameStep(IterableAxis axis,
java.lang.String prefix,
java.lang.String localName,
PredicateSet predicateSet)
Constructor. |
Method Summary | |
void |
accept(Visitor visitor)
Visitor pattern for the step. |
java.util.List |
evaluate(Context context)
Evaluate the context node set to find the new node set. |
java.lang.String |
getLocalName()
Gets the local name. |
java.lang.String |
getPrefix()
Gets the namespace prefix. |
java.lang.String |
getText()
Gets the step as a fully defined xpath. |
boolean |
isMatchesAnyName()
Does this step match any name (xpath of '*'). |
boolean |
matches(java.lang.Object node,
ContextSupport contextSupport)
Checks whether the node matches this step. |
protected boolean |
matchesNamespaceURIs(java.lang.String uri1,
java.lang.String uri2)
Compares two namespace URIs, handling null. |
java.lang.String |
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.Step |
axisIterator, getAxis, simplify |
Methods inherited from interface org.jaxen.expr.Predicated |
addPredicate, getPredicates, getPredicateSet |
Constructor Detail |
public DefaultNameStep(IterableAxis axis, java.lang.String prefix, java.lang.String localName, PredicateSet predicateSet)
axis
- the axis to work throughprefix
- the name prefixlocalName
- the local namepredicateSet
- the set of predicatesMethod Detail |
public java.lang.String getPrefix()
getPrefix
in interface NameStep
public java.lang.String getLocalName()
getLocalName
in interface NameStep
public boolean isMatchesAnyName()
public java.lang.String getText()
getText
in interface Step
getText
in class DefaultStep
public java.util.List evaluate(Context context) throws JaxenException
This method overrides the version in DefaultStep for performance.
evaluate
in interface Step
evaluate
in class DefaultStep
JaxenException
public boolean matches(java.lang.Object node, ContextSupport contextSupport) throws JaxenException
matches
in interface Step
node
- the node to checkcontextSupport
- the context support
JaxenException
protected boolean matchesNamespaceURIs(java.lang.String uri1, java.lang.String uri2)
uri1
- the first URIuri2
- the second URI
public void accept(Visitor visitor)
accept
in interface Visitable
visitor
- the visitor objectpublic java.lang.String toString()
toString
in class DefaultStep
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |