Package org.jaxen.expr
Class DefaultNameStep
- java.lang.Object
-
- org.jaxen.expr.DefaultStep
-
- org.jaxen.expr.DefaultNameStep
-
- All Implemented Interfaces:
java.io.Serializable,NameStep,Predicated,Step
public class DefaultNameStep extends DefaultStep implements NameStep
Deprecated.this class will become non-public in the future; use the interface insteadExpression 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".
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private booleanhasPrefixDeprecated.Quick flag denoting if we have a namespace prefixprivate java.lang.StringlocalNameDeprecated.Our local-name.private booleanmatchesAnyNameDeprecated.Quick flag denoting if the local name was '*'private java.lang.StringprefixDeprecated.Our prefix, bound through the current Context.private static longserialVersionUIDDeprecated.
-
Constructor Summary
Constructors Constructor Description DefaultNameStep(IterableAxis axis, java.lang.String prefix, java.lang.String localName, PredicateSet predicateSet)Deprecated.Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.util.Listevaluate(Context context)Deprecated.Evaluate the context node set to find the new node set.java.lang.StringgetLocalName()Deprecated.Gets the local name.java.lang.StringgetPrefix()Deprecated.Gets the namespace prefix.java.lang.StringgetText()Deprecated.Gets the step as a fully defined XPath.private booleanhasNamespace(java.lang.String uri)Deprecated.Checks whether the URI represents a namespace.booleanisMatchesAnyName()Deprecated.Does this step match any name? (i.e.booleanmatches(java.lang.Object node, ContextSupport contextSupport)Deprecated.Checks whether the node matches this step.protected booleanmatchesNamespaceURIs(java.lang.String uri1, java.lang.String uri2)Deprecated.Compares two namespace URIs, handling null.java.lang.StringtoString()Deprecated.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
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
Deprecated.- See Also:
- Constant Field Values
-
prefix
private java.lang.String prefix
Deprecated.Our prefix, bound through the current Context. The empty-string ("") if no prefix was specified. Decidedly NOT-NULL, due to SAXPath constraints. This is the 'foo' in 'foo:bar'.
-
localName
private java.lang.String localName
Deprecated.Our local-name. This is the 'bar' in 'foo:bar'.
-
matchesAnyName
private boolean matchesAnyName
Deprecated.Quick flag denoting if the local name was '*'
-
hasPrefix
private boolean hasPrefix
Deprecated.Quick flag denoting if we have a namespace prefix
-
-
Constructor Detail
-
DefaultNameStep
public DefaultNameStep(IterableAxis axis, java.lang.String prefix, java.lang.String localName, PredicateSet predicateSet)
Deprecated.Constructor.- Parameters:
axis- the axis to work throughprefix- the name prefixlocalName- the local namepredicateSet- the set of predicates
-
-
Method Detail
-
getPrefix
public java.lang.String getPrefix()
Deprecated.Gets the namespace prefix.
-
getLocalName
public java.lang.String getLocalName()
Deprecated.Gets the local name.- Specified by:
getLocalNamein interfaceNameStep- Returns:
- the local name
-
isMatchesAnyName
public boolean isMatchesAnyName()
Deprecated.Does this step match any name? (i.e. Is it '*'?)- Returns:
- true if it matches any name
-
getText
public java.lang.String getText()
Deprecated.Gets the step as a fully defined XPath.- Specified by:
getTextin interfaceStep- Overrides:
getTextin classDefaultStep- Returns:
- the full XPath for this step
-
evaluate
public java.util.List evaluate(Context context) throws JaxenException
Deprecated.Evaluate the context node set to find the new node set.This method overrides the version in
DefaultStepfor performance.- Specified by:
evaluatein interfaceStep- Overrides:
evaluatein classDefaultStep- Returns:
- a list of matching nodes
- Throws:
JaxenException
-
matches
public boolean matches(java.lang.Object node, ContextSupport contextSupport) throws JaxenExceptionDeprecated.Checks whether the node matches this step.- Specified by:
matchesin interfaceStep- Parameters:
node- the node to checkcontextSupport- the context support- Returns:
- true if matches
- Throws:
JaxenException
-
hasNamespace
private boolean hasNamespace(java.lang.String uri)
Deprecated.Checks whether the URI represents a namespace.- Parameters:
uri- the URI to check- Returns:
- true if non-null and non-empty
-
matchesNamespaceURIs
protected boolean matchesNamespaceURIs(java.lang.String uri1, java.lang.String uri2)Deprecated.Compares two namespace URIs, handling null.- Parameters:
uri1- the first URIuri2- the second URI- Returns:
- true if equal, where null==""
-
toString
public java.lang.String toString()
Deprecated.Returns a full information debugging string.- Overrides:
toStringin classDefaultStep- Returns:
- a debugging string
-
-