org.eclipse.emf.ecore.xml.type.internal
Class QName

java.lang.Object
  extended byorg.eclipse.emf.ecore.xml.type.internal.QName

public final class QName
extends Object

A structure that holds the components of an XML Namespaces qualified name. Two QNames are equal iff they both have same namespaceURI and same localPart. Note: prefix is not used in QName.equals(Object). If not specified, the prefix is set to empty string (""). If not specified, the namespace uri is set to empty string ("");

NOTE: this class is for internal use only.


Constructor Summary
QName(String qname)
          Constructs a QName.
QName(String namespaceURI, String localPart, String prefix)
          Constructs a QName with the specified values.
 
Method Summary
 boolean equals(Object object)
          Returns true if the two objects are equal.
 String getLocalPart()
           
 String getNamespaceURI()
           
 String getPrefix()
           
 int hashCode()
           
 void setLocalPart(String localpart)
           
 void setNamespaceURI(String namespaceUri)
           
 void setPrefix(String prefix)
           
 String toString()
          Returns a string representation of this object.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

QName

public QName(String qname)
Constructs a QName.

Parameters:
qname - a qualified name Throws Exception if value is not legal qualified name

QName

public QName(String namespaceURI,
             String localPart,
             String prefix)
Constructs a QName with the specified values.

Method Detail

equals

public boolean equals(Object object)
Returns true if the two objects are equal.


hashCode

public int hashCode()

toString

public String toString()
Returns a string representation of this object.


getLocalPart

public String getLocalPart()
Returns:
Returns the localpart.

setLocalPart

public void setLocalPart(String localpart)
Parameters:
localpart - The localpart to set.

getNamespaceURI

public String getNamespaceURI()
Returns:
Returns the namespaceURI.

setNamespaceURI

public void setNamespaceURI(String namespaceUri)
Parameters:
namespaceUri - The namespaceURI to set.

getPrefix

public String getPrefix()
Returns:
Returns the prefix.

setPrefix

public void setPrefix(String prefix)
Parameters:
prefix - The prefix to set.

Copyright 2001-2006 IBM Corporation and others.
All Rights Reserved.