Package com.luciad.format.xml
Class TLcdXMLName
java.lang.Object
com.luciad.format.xml.TLcdXMLName
A qualified XML name, containing an XML namespace part and a local name.
Note: XML names are currently implemented using the flyweight design pattern: for each XML name
(namespace/local name combination), only one instance can exist, thereby enabling fast object
comparisons. There is no guarantee that is will remain so in the future. Therefore, the
equals
method should always be used for comparisons, not the direct object reference
test (==
).
No constructors are available for this class; names need to be constructed via the static
getInstance
method.-
Method Summary
Modifier and TypeMethodDescriptionasQName()
Returns a QName instance corresponding to thisTLcdXMLName
.boolean
Returnstrue
if and only if the namespace of the compared objects are equal, and the local names of both objects are equal.static TLcdXMLName
getInstance
(String aNamespaceURI, String aLocalName) Returns aTLcdXMLName
instance containing the given namespace and local name.static TLcdXMLName
getInstance
(QName aQName) Returns aTLcdXMLName
instance based on the given QName.Returns the local part of this XML name.Returns the namespace part of this XML name.int
hashCode()
toString()
Returns a String representation of this XML name (a space-separated concatenation of the namespace and local name).
-
Method Details
-
getInstance
Returns aTLcdXMLName
instance containing the given namespace and local name.- Parameters:
aNamespaceURI
- the namespace of the XML name instance to be returned.aLocalName
- the local name of the XML name instance to be returned.- Returns:
- a
TLcdXMLName
instance containing the given namespace and local name.
-
getInstance
Returns aTLcdXMLName
instance based on the given QName.- Parameters:
aQName
- theQName
for which to return an equivalentTLcdXMLName
, never null- Returns:
- a
TLcdXMLName
instance containing the namespace and local name of the givenQName
.
-
getLocalName
Returns the local part of this XML name.- Returns:
- the local part of this XML name.
-
getNameSpaceURI
Returns the namespace part of this XML name.- Returns:
- the namespace part of this XML name.
-
asQName
Returns a QName instance corresponding to thisTLcdXMLName
. If thisTLcdXMLName
was originally created from aQName
, the returnedQName
will preserve the prefix of the original one.- Returns:
- a QName instance corresponding to this
TLcdXMLName
.
-
equals
Returnstrue
if and only if the namespace of the compared objects are equal, and the local names of both objects are equal. -
hashCode
public int hashCode() -
toString
Returns a String representation of this XML name (a space-separated concatenation of the namespace and local name).
-