Top Description Fields Constructors Methods
org.apache.xerces.xni

public Class QName

extends Object
implements Cloneable
Class Inheritance
All Implemented Interfaces
java.lang.Cloneable
Known Direct Subclasses
org.apache.xerces.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.

Author
Andy Clark, IBM
Version
$Id: QName.java 447247 2006-09-18 05:23:52Z mrglavas $
See Also
org.apache.xerces.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
the reference object with which to compare.
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
The qualified name to be copied.
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.

Returns:Object

Doc from java.lang.Object.clone.

a clone of this instance.

equalsback to summary
public boolean equals(Object object)

Overrides java.lang.Object.equals.

Returns true if the two objects are equal.

Parameters
object:Object

Doc from java.lang.Object.equals.

the reference object with which to compare.

Returns:boolean

Doc from java.lang.Object.equals.

true if this object is the same as the obj argument; false otherwise.

hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Returns the hashcode for this object.

Returns:int

Doc from java.lang.Object.hashCode.

a hash code value for this object.

setValuesback to summary
public void setValues(QName qname)

Convenience method to set the values of the qname components.

Parameters
qname:QName

The qualified name to be copied.

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.

Returns:String

Doc from java.lang.Object.toString.

a string representation of the object.