org.jaxen.expr
Class DefaultNameStep

java.lang.Object
  |
  +--org.jaxen.expr.DefaultStep
        |
        +--org.jaxen.expr.DefaultNameStep
All Implemented Interfaces:
NameStep, Predicated, Serializable, Step, Visitable

public class DefaultNameStep
extends DefaultStep
implements NameStep

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)
See Also:
Serialized Form

Constructor Summary
DefaultNameStep(IterableAxis axis, String prefix, String localName, PredicateSet predicateSet)
           
 
Method Summary
 void accept(Visitor visitor)
           
 String getLocalName()
           
 String getPrefix()
           
 String getText()
           
 boolean isMatchesAnyName()
           
 boolean matches(Object node, ContextSupport contextSupport)
          Performs the node-test part of evaluating the step for the given node (which must be on the axis).
protected  boolean matchesNamespaceURIs(String u1, String u2)
           
 String toString()
           
 
Methods inherited from class org.jaxen.expr.DefaultStep
addPredicate, axisIterator, evaluate, 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, evaluate, getAxis, simplify
 
Methods inherited from interface org.jaxen.expr.Predicated
addPredicate, getPredicates, getPredicateSet
 

Constructor Detail

DefaultNameStep

public DefaultNameStep(IterableAxis axis,
                       String prefix,
                       String localName,
                       PredicateSet predicateSet)
Method Detail

getPrefix

public String getPrefix()
Specified by:
getPrefix in interface NameStep

getLocalName

public String getLocalName()
Specified by:
getLocalName in interface NameStep

isMatchesAnyName

public boolean isMatchesAnyName()

getText

public String getText()
Specified by:
getText in interface Step
Overrides:
getText in class DefaultStep

toString

public String toString()
Overrides:
toString in class DefaultStep

matches

public boolean matches(Object node,
                       ContextSupport contextSupport)
Description copied from interface: Step
Performs the node-test part of evaluating the step for the given node (which must be on the axis).

Specified by:
matches in interface Step

matchesNamespaceURIs

protected boolean matchesNamespaceURIs(String u1,
                                       String u2)
Returns:
true if the two namespace URIs are equal Note that we may wish to consider null being equal to ""

accept

public void accept(Visitor visitor)
Specified by:
accept in interface Visitable


Copyright © 2001-2003 Codehaus. All Rights Reserved.