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.booleanReturnstrueif and only if the namespace of the compared objects are equal, and the local names of both objects are equal.static TLcdXMLNamegetInstance(String aNamespaceURI, String aLocalName) Returns aTLcdXMLNameinstance containing the given namespace and local name.static TLcdXMLNamegetInstance(QName aQName) Returns aTLcdXMLNameinstance based on the given QName.Returns the local part of this XML name.Returns the namespace part of this XML name.inthashCode()toString()Returns a String representation of this XML name (a space-separated concatenation of the namespace and local name).
-
Method Details
-
getInstance
Returns aTLcdXMLNameinstance 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
TLcdXMLNameinstance containing the given namespace and local name.
-
getInstance
Returns aTLcdXMLNameinstance based on the given QName.- Parameters:
aQName- theQNamefor which to return an equivalentTLcdXMLName, never null- Returns:
- a
TLcdXMLNameinstance 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 thisTLcdXMLNamewas originally created from aQName, the returnedQNamewill preserve the prefix of the original one.- Returns:
- a QName instance corresponding to this
TLcdXMLName.
-
equals
Returnstrueif 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).
-