Xerces Native Interface: Class QName

Overview | Package | Class | Tree | Serialized | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.xerces.xni
Class QName

    java.lang.Object
      |
      +--org.apache.xerces.xni.QName

All Implemented Interfaces:
  java.lang.Cloneable

public class QName
extends java.lang.Object
implements java.lang.Cloneable

A structure that holds the components of an XML Namespaces qualified name.

To be used correctly, the strings must be identical references for equal strings. Within the parser, these values are considered symbols and should always be retrieved from the `SymbolTable`.

Version:
  $Id: QName.java 447247 2006-09-18 05:23:52Z mrglavas $
Author:
  Andy Clark, IBM
See Also:
  org.apache.xerces.util.SymbolTable

Field Summary
`java.lang.String` | `localpart` The qname localpart.
`java.lang.String` | `prefix` The qname prefix.
`java.lang.String` | `rawname` The qname rawname.
`java.lang.String` | `uri` The URI to which the qname prefix is bound.

Constructor Summary
`QName()` Default constructor.
`QName(QName qname)` Constructs a copy of the specified QName.
`QName(java.lang.String prefix, java.lang.String localpart, java.lang.String rawname, java.lang.String uri)` Constructs a QName with the specified values.

Method Summary
`void` | `clear()` Clears the values of the qname components.
`java.lang.Object` | `clone()` Returns a clone of this object.
`boolean` | `equals(java.lang.Object object)` Returns true if the two objects are equal.
`int` | `hashCode()` Returns the hashcode for this object.
`void` | `setValues(QName qname)` Convenience method to set the values of the qname components.
`void` | `setValues(java.lang.String prefix, java.lang.String localpart, java.lang.String rawname, java.lang.String uri)` Convenience method to set the values of the qname components.
`java.lang.String` | `toString()` Returns a string representation of this object.

Methods inherited from class java.lang.Object
`finalize, getClass, notify, notifyAll, wait, wait, wait`

Field Detail

### prefix

    public java.lang.String prefix

  The qname prefix. For example, the prefix for the qname "a:foo" is "a".

### localpart

    public java.lang.String localpart

  The qname localpart. For example, the localpart for the qname "a:foo" is "foo".

### rawname

    public java.lang.String rawname

  The qname rawname. For example, the rawname for the qname "a:foo" is "a:foo".

### uri

    public java.lang.String uri

  The URI to which the qname prefix is bound. This binding must be performed by a XML Namespaces aware processor.

Constructor Detail

### QName

    public QName()

  Default constructor.

### QName

    public QName(java.lang.String prefix,
                 java.lang.String localpart,
                 java.lang.String rawname,
                 java.lang.String uri)

  Constructs a QName with the specified values.

### QName

    public QName(QName qname)

  Constructs a copy of the specified QName.

Method Detail

### setValues

    public void setValues(QName qname)

  Convenience method to set the values of the qname components.
  Parameters:
    `qname` - The qualified name to be copied.

### setValues

    public void setValues(java.lang.String prefix,
                          java.lang.String localpart,
                          java.lang.String rawname,
                          java.lang.String uri)

  Convenience method to set the values of the qname components.
  Parameters:
    `prefix` - The qname prefix. (e.g. "a")
    `localpart` - The qname localpart. (e.g. "foo")
    `rawname` - The qname rawname. (e.g. "a:foo")
    `uri` - The URI binding. (e.g. "http://foo.com/mybinding")

### clear

    public void clear()

  Clears the values of the qname components.

### clone

    public java.lang.Object clone()

  Returns a clone of this object.
  Overrides:
    `clone` in class `java.lang.Object`

### hashCode

    public int hashCode()

  Returns the hashcode for this object.
  Overrides:
    `hashCode` in class `java.lang.Object`

### equals

    public boolean equals(java.lang.Object object)

  Returns true if the two objects are equal.
  Overrides:
    `equals` in class `java.lang.Object`

### toString

    public java.lang.String toString()

  Returns a string representation of this object.
  Overrides:
    `toString` in class `java.lang.Object`

Overview | Package | Class | Tree | Serialized | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 1999-2010 The Apache Software Foundation. All Rights Reserved.