|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.novell.xml.util.ExpandedQName
Class to contain an expanded QName. An expanded QName has the namespace prefix expanded to the actual URI value (the namespace name)
Field Summary | |
static String |
UNKNOWN_NAMESPACE
|
Constructor Summary | |
ExpandedQName(NamespaceName namespace_name,
String local_part)
Construct an expanded qname from a NamespaceName and a local_part. |
|
ExpandedQName(NamespaceName namespace_name,
String local_part,
String prefix)
Construct an expanded qname from a namespace name and a local-part. |
|
ExpandedQName(Node node)
Construct an expanded QName for a node |
|
ExpandedQName(String qName,
Node contextNode)
Construct an expanded QName from an unexpanded QName and a context node. |
|
ExpandedQName(String namespace_name,
String local_part)
Construct an expanded qname from a uri (namespace name) and a local_part. |
|
ExpandedQName(String prefix,
String local_part,
Node contextNode)
Construct an expanded QName from a prefix, a local-part and a context node. |
|
ExpandedQName(String namespace_name,
String local_part,
String prefix)
Construct an expanded qname from a uri (namespace name) and a local_part. |
Method Summary | |
int |
compareTo(Object rhs)
Implementation of Comparable interface. |
boolean |
equals(ExpandedQName rhs)
Compare this ExpandedQName instance with another ExpandedQName instance. |
boolean |
equals(Object rhs)
Compare this object with another object. |
String |
getLocalPart()
Return the local part of the expanded qname. |
NamespaceName |
getNamespaceName()
Return the namespace name of the expaned qname (the URI part) |
String |
getNamespaceURI()
Return the namespace URI string of the namespace name part of this ExpandedQName |
String |
getPrefix()
Return the prefix for the expanded QName, if known. |
String |
getQName()
Return the expanded QName in its original form, if possible |
int |
hashCode()
Return a hash code based on the uri and local-part of this ExpandedQName |
boolean |
localPartEquals(ExpandedQName rhs)
Return true if the local parts of this ExpandedQName and the passed ExpandedQName are equal. |
boolean |
localPartEquals(String rhs)
Return true if the local-part of this object is equal to the passed string |
boolean |
namespaceNameEquals(ExpandedQName rhs)
Return true if the namespace names (URIs) of this
ExpandedQName and the passed ExpandedQName are equal.
|
boolean |
namespaceNameEquals(NamespaceName rhs)
Return true if the passed NamespaceName is equal to
the namespace name of this ExpandedQName |
boolean |
namespaceNameEquals(String rhs)
Return true if the namespace name for this object is equal to the passed string |
String |
toString()
Convert the expanded QName to a single string. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final String UNKNOWN_NAMESPACE
Constructor Detail |
public ExpandedQName(String namespace_name, String local_part)
namespace_name
- The expanded prefix (URI)local_part
- The local part of the QNamepublic ExpandedQName(NamespaceName namespace_name, String local_part)
namespace_name
- The namespace namelocal_part
- The local part of the QNamepublic ExpandedQName(Node node)
node
- The node for which the ExpandedQName is to be createdpublic ExpandedQName(String qName, Node contextNode)
qName
- The unexpanded QName. This must follow the production for
QName in http://www.w3.org/TR/1999/REC-xml-namescontextNode
- The node relative to which to resolve the QName prefix.public ExpandedQName(String prefix, String local_part, Node contextNode)
prefix
- The QName namespace prefix.local_part
- The QName local partcontextNode
- The node relative to which to resolve the QName prefix.public ExpandedQName(String namespace_name, String local_part, String prefix)
namespace_name
- The expanded prefix (URI)local_part
- The local part of the QNameprefix
- The original prefix part of the QNamepublic ExpandedQName(NamespaceName namespace_name, String local_part, String prefix)
namespace_name
- The namespace namelocal_part
- The local part of the QNameprefix
- The original prefix part of the QNameMethod Detail |
public int hashCode()
public boolean equals(Object rhs)
rhs
- The object to compare to/
public boolean equals(ExpandedQName rhs)
ExpandedQName
instance with another ExpandedQName
instance.
rhs
- The ExpandedQName
instance against which to compare
true
if both the namespace name and local parts of the two ExpandedQName
s are equalpublic boolean namespaceNameEquals(ExpandedQName rhs)
true
if the namespace names (URIs) of this
ExpandedQName
and the passed ExpandedQName
are equal.
This method should be used rather than comparing the
strings because the underlying implementation of
ExpandedQName
will be faster.
rhs
- The ExpandedQName
with which to compare
namespace names
true
if the passed namespace name is equal
to this namespace namepublic boolean namespaceNameEquals(NamespaceName rhs)
true
if the passed NamespaceName
is equal to
the namespace name of this ExpandedQName
rhs
- The namespace name to which to compare
true
if the namespace name of this object
is equal to the passed namespace name.public boolean namespaceNameEquals(String rhs)
rhs
- The string to compare against
public boolean localPartEquals(ExpandedQName rhs)
rhs
- The ExpandedQName with which to compare
namespace names
public boolean localPartEquals(String rhs)
rhs
- The string to compare against
public int compareTo(Object rhs)
compareTo
in interface Comparable
rhs
- Object to compare to
public String toString()
public String getQName()
public NamespaceName getNamespaceName()
public String getNamespaceURI()
public String getLocalPart()
public String getPrefix()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |