APIdia Launch Partner
Top Description Fields Constructors Methods
com.sun.org.apache.xerces.internal.xni

public Class QName

extends Object
implements Cloneable
Class Inheritance
All Implemented Interfaces
java.lang.Cloneable
Known Direct Subclasses
com.sun.xml.internal.stream.writers.XMLStreamWriterImpl.ElementState, com.sun.xml.internal.stream.writers.XMLStreamWriterImpl.Attribute, com.sun.org.apache.xerces.internal.impl.dv.xs.QNameDV.XQName

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.

Authors
Andy Clark, IBM Better performance patch for the equals method by Daniel Petersson: refer to jaxp issue 61; == were used to compare strings, Joe Wang, Oracle
See Also
com.sun.org.apache.xerces.internal.util.SymbolTable

Field Summary

Modifier and TypeField and Description
public String
localpart

The qname localpart.

public String
prefix

The qname prefix.

public String
rawname

The qname rawname.

public String
uri

The URI to which the qname prefix is bound.

Constructor Summary

AccessConstructor and Description
public
QName()

Default constructor.

public
QName(String prefix, String localpart, String rawname, String uri)

Constructs a QName with the specified values.

public
QName(QName qname)

Constructs a copy of the specified QName.

Method Summary

Modifier and TypeMethod and Description
public void
clear()

Clears the values of the qname components.

public Object
clone()

Overrides java.lang.Object.clone.

Returns a clone of this object.

public boolean
equals(Object object)

Overrides java.lang.Object.equals.

Returns true if the two objects are equal.

public int
hashCode()

Overrides java.lang.Object.hashCode.

Returns the hashcode for this object.

public void
setValues(QName qname)

Convenience method to set the values of the qname components.

public void
setValues(String
The qname prefix. (e.g. "a")
prefix
,
String
The qname localpart. (e.g. "foo")
localpart
,
String
The qname rawname. (e.g. "a:foo")
rawname
,
String
The URI binding. (e.g. "http://foo.com/mybinding")
uri
)

Convenience method to set the values of the qname components.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of this object.

Inherited from java.lang.Object:
finalizegetClassnotifynotifyAllwaitwaitwait

Field Detail

localpartback to summary
public String localpart

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

prefixback to summary
public String prefix

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

rawnameback to summary
public String rawname

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

uriback to summary
public String uri

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

Constructor Detail

QNameback to summary
public QName()

Default constructor.

QNameback to summary
public QName(String prefix, String localpart, String rawname, String uri)

Constructs a QName with the specified values.

QNameback to summary
public QName(QName qname)

Constructs a copy of the specified QName.

Method Detail

clearback to summary
public void clear()

Clears the values of the qname components.

cloneback to summary
public Object clone()

Overrides java.lang.Object.clone.

Returns a clone of this object.

equalsback to summary
public boolean equals(Object object)

Overrides java.lang.Object.equals.

Returns true if the two objects are equal.

hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Returns the hashcode for this object.

setValuesback to summary
public void setValues(QName qname)

Convenience method to set the values of the qname components.

setValuesback to summary
public void setValues(String prefix, String localpart, String rawname, String uri)

Convenience method to set the values of the qname components.

Parameters
prefix:String

The qname prefix. (e.g. "a")

localpart:String

The qname localpart. (e.g. "foo")

rawname:String

The qname rawname. (e.g. "a:foo")

uri:String

The URI binding. (e.g. "http://foo.com/mybinding")

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Returns a string representation of this object.