Qizx/Open v0.4

net.xfra.qizxopen.util
Class QName

java.lang.Object
  |
  +--net.xfra.qizxopen.util.QName

public final class QName
extends java.lang.Object

Representation of a Qualified Name: Namespace + localName.

A QName has a unique representation: comparison can be performed with ==

This object has no notion of prefix.


Field Summary
static QName XML_BASE
          the xml:base qualified name
static QName XML_LANG
          the xml:lang qualified name
static QName XML_SPACE
          the xml:space qualified name
static QName XSI_NIL
          the xsi:nil qualified name
static QName XSI_NO_NAMESPACE_SCHEMA_LOCATION
          the xsi:noNamespaceSchemaLocation qualified name
static QName XSI_SCHEMA_LOCATION
          the xsi:schemaLocation qualified name
static QName XSI_TYPE
          the xsi:type qualified name
 
Method Summary
 int compareTo(QName other)
           
 boolean equals(java.lang.Object other)
           
static QName get(Namespace namespace, java.lang.String localName)
          Obtains a unique representation of a QName from a Namespace object and a NCname.
static QName get(java.lang.String localName)
          Obtains a unique representation of a QName with empty namespace.
static QName get(java.lang.String namespaceURI, java.lang.String localName)
          Obtains a unique representation of a QName from a namespace URI and a NCname.
 java.lang.String getLocalName()
          Returns the localname as a String
 Namespace getNamespace()
          Returns the namespace as an interned Namespace object
 java.lang.String getURI()
          Returns the namespace URI as a String
 int hashCode()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

XML_LANG

public static final QName XML_LANG
the xml:lang qualified name


XML_SPACE

public static final QName XML_SPACE
the xml:space qualified name


XML_BASE

public static final QName XML_BASE
the xml:base qualified name


XSI_TYPE

public static final QName XSI_TYPE
the xsi:type qualified name


XSI_NIL

public static final QName XSI_NIL
the xsi:nil qualified name


XSI_SCHEMA_LOCATION

public static final QName XSI_SCHEMA_LOCATION
the xsi:schemaLocation qualified name


XSI_NO_NAMESPACE_SCHEMA_LOCATION

public static final QName XSI_NO_NAMESPACE_SCHEMA_LOCATION
the xsi:noNamespaceSchemaLocation qualified name

Method Detail

get

public static QName get(java.lang.String namespaceURI,
                        java.lang.String localName)
Obtains a unique representation of a QName from a namespace URI and a NCname.


get

public static QName get(Namespace namespace,
                        java.lang.String localName)
Obtains a unique representation of a QName from a Namespace object and a NCname.


get

public static QName get(java.lang.String localName)
Obtains a unique representation of a QName with empty namespace.


equals

public boolean equals(java.lang.Object other)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

getNamespace

public Namespace getNamespace()
Returns the namespace as an interned Namespace object


getURI

public java.lang.String getURI()
Returns the namespace URI as a String


getLocalName

public java.lang.String getLocalName()
Returns the localname as a String


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

compareTo

public int compareTo(QName other)

 Copyright Xavier FRANC 2003-2004