org.jbind.xml.base
Interface IQName

All Superinterfaces:
java.io.Serializable
All Known Implementing Classes:
QName

public interface IQName
extends java.io.Serializable

Represents a qualified name. A qualified name consists of a prefix and a local part. Attention: if the QName has no prefix then the empty string is returned as its prefix.


Method Summary
 boolean equals(java.lang.Object anObject)
          Checks equalitiy.
 java.lang.String getLocalPart()
          Gets the local part.
 java.lang.String getNamespace()
          Gets the namespace.
 java.lang.String getPrefix()
          Gets the prefix.
 int hashCode()
          Returns the sum of the hash codes of the namespace and the local part.
 java.lang.String toString()
          Gets the string representation of the QName.
 

Method Detail

getPrefix

public java.lang.String getPrefix()
Gets the prefix.

Attention: If the prefix is null then this does not mean that the QName has no prefix. It means only that a prefix for the QName has not yet been determined. The empty string is used to indicate that the QName has prefix.

Returns:
(optional).

getLocalPart

public java.lang.String getLocalPart()
Gets the local part.

Returns:
(required).

getNamespace

public java.lang.String getNamespace()
Gets the namespace. QNames of elements in the default namespace and QNames of local attributes return the empty string.

Returns:
(required).

toString

public java.lang.String toString()
Gets the string representation of the QName. If the prefix of the QName is not null and not equal to the empty string then the concatentation of the prefix, a colon, and the local part is returned. If the prefix is null then the concatentation of "?:" and the local part is returned. If the prefix is equal to the empty string then the local part is returned.

Returns:
(required).

hashCode

public int hashCode()
Returns the sum of the hash codes of the namespace and the local part. The prefix is not considered.

Returns:
A value based hash code.

equals

public boolean equals(java.lang.Object anObject)
Checks equalitiy.

Returns:
Returns true iff the other object is of type IQName and if the namespace and the local parts are equal. The prefix is not considered.