< prev index next >

src/java.xml/share/classes/javax/xml/namespace/QName.java

Print this page




  42  * <p>The value of a <code>QName</code> contains a <strong>Namespace
  43  * URI</strong>, <strong>local part</strong> and
  44  * <strong>prefix</strong>.</p>
  45  *
  46  * <p>The prefix is included in <code>QName</code> to retain lexical
  47  * information <strong><em>when present</em></strong> in an {@link
  48  * javax.xml.transform.Source XML input source}. The prefix is
  49  * <strong><em>NOT</em></strong> used in {@link #equals(Object)
  50  * QName.equals(Object)} or to compute the {@link #hashCode()
  51  * QName.hashCode()}.  Equality and the hash code are defined using
  52  * <strong><em>only</em></strong> the Namespace URI and local part.</p>
  53  *
  54  * <p>If not specified, the Namespace URI is set to {@link
  55  * javax.xml.XMLConstants#NULL_NS_URI XMLConstants.NULL_NS_URI}.
  56  * If not specified, the prefix is set to {@link
  57  * javax.xml.XMLConstants#DEFAULT_NS_PREFIX
  58  * XMLConstants.DEFAULT_NS_PREFIX}.</p>
  59  *
  60  * <p><code>QName</code> is immutable.</p>
  61  *
  62  * @author <a href="mailto:Jeff.Suttor@Sun.com">Jeff Suttor</a>
  63  * @see <a href="http://www.w3.org/TR/xmlschema-2/#QName">
  64  *   XML Schema Part2: Datatypes specification</a>
  65  * @see <a href="http://www.w3.org/TR/REC-xml-names/#ns-qualnames">
  66  *   Namespaces in XML</a>
  67  * @see <a href="http://www.w3.org/XML/xml-names-19990114-errata">
  68  *   Namespaces in XML Errata</a>
  69  * @since 1.5
  70  */
  71 
  72 public class QName implements Serializable {
  73     // tests show that the ID is the same from JDK 1.5 through JDK 9
  74     private static final long serialVersionUID = -9120448754896609940L;
  75 
  76     /**
  77      * <p>Namespace URI of this <code>QName</code>.</p>
  78      */
  79     private final String namespaceURI;
  80 
  81     /**
  82      * <p>local part of this <code>QName</code>.</p>




  42  * <p>The value of a <code>QName</code> contains a <strong>Namespace
  43  * URI</strong>, <strong>local part</strong> and
  44  * <strong>prefix</strong>.</p>
  45  *
  46  * <p>The prefix is included in <code>QName</code> to retain lexical
  47  * information <strong><em>when present</em></strong> in an {@link
  48  * javax.xml.transform.Source XML input source}. The prefix is
  49  * <strong><em>NOT</em></strong> used in {@link #equals(Object)
  50  * QName.equals(Object)} or to compute the {@link #hashCode()
  51  * QName.hashCode()}.  Equality and the hash code are defined using
  52  * <strong><em>only</em></strong> the Namespace URI and local part.</p>
  53  *
  54  * <p>If not specified, the Namespace URI is set to {@link
  55  * javax.xml.XMLConstants#NULL_NS_URI XMLConstants.NULL_NS_URI}.
  56  * If not specified, the prefix is set to {@link
  57  * javax.xml.XMLConstants#DEFAULT_NS_PREFIX
  58  * XMLConstants.DEFAULT_NS_PREFIX}.</p>
  59  *
  60  * <p><code>QName</code> is immutable.</p>
  61  *
  62  * @author Jeff Suttor
  63  * @see <a href="http://www.w3.org/TR/xmlschema-2/#QName">
  64  *   XML Schema Part2: Datatypes specification</a>
  65  * @see <a href="http://www.w3.org/TR/REC-xml-names/#ns-qualnames">
  66  *   Namespaces in XML</a>
  67  * @see <a href="http://www.w3.org/XML/xml-names-19990114-errata">
  68  *   Namespaces in XML Errata</a>
  69  * @since 1.5
  70  */
  71 
  72 public class QName implements Serializable {
  73     // tests show that the ID is the same from JDK 1.5 through JDK 9
  74     private static final long serialVersionUID = -9120448754896609940L;
  75 
  76     /**
  77      * <p>Namespace URI of this <code>QName</code>.</p>
  78      */
  79     private final String namespaceURI;
  80 
  81     /**
  82      * <p>local part of this <code>QName</code>.</p>


< prev index next >