org.jaxen.pattern

Class NamespaceTest

public class NamespaceTest extends NodeTest

NamespaceTest tests for a given namespace URI.

Version: $Revision: 1.6 $

Author: James Strachan

Field Summary
shortnodeType
The type of node to match - either attribute or element
Stringprefix
The prefix to match against
Constructor Summary
NamespaceTest(String prefix, short nodeType)
Method Summary
shortgetMatchType()
doublegetPriority()
StringgetText()
protected StringgetURI(Object node, Context context)
Returns the URI of the current prefix or "" if no URI can be found
booleanmatches(Object node, Context context)
StringtoString()

Field Detail

nodeType

private short nodeType
The type of node to match - either attribute or element

prefix

private String prefix
The prefix to match against

Constructor Detail

NamespaceTest

public NamespaceTest(String prefix, short nodeType)

Method Detail

getMatchType

public short getMatchType()

getPriority

public double getPriority()

getText

public String getText()

getURI

protected String getURI(Object node, Context context)
Returns the URI of the current prefix or "" if no URI can be found

matches

public boolean matches(Object node, Context context)

Returns: true if the pattern matches the given node

toString

public String toString()