com.google.gdata.util.common.xml
Class XmlNamespace

java.lang.Object
  extended by com.google.gdata.util.common.xml.XmlNamespace
Direct Known Subclasses:
XmlWriter.Namespace

public class XmlNamespace
extends java.lang.Object

Represents an XML namespace, including the associated namespace URI and an optional alias prefix to use in XML output.


Constructor Summary
XmlNamespace(java.lang.String uri)
          Constructs a new namespace with the specified namespace URI and no defined prefix alias.
XmlNamespace(java.lang.String alias, java.lang.String uri)
          Constructs a new namespace with the specified prefix alias and namespace URI.
 
Method Summary
 boolean equals(java.lang.Object obj)
          Returns true if the target object is a Namespace instance that has a matching namespace URI and prefix (if specified).
 java.lang.String getAlias()
          Returns the prefix alias for the namespace or null if undefined.
 java.lang.String getUri()
          Returns the fully qualified URI for the namespace.
 int hashCode()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XmlNamespace

public XmlNamespace(java.lang.String uri)
Constructs a new namespace with the specified namespace URI and no defined prefix alias.


XmlNamespace

public XmlNamespace(java.lang.String alias,
                    java.lang.String uri)
Constructs a new namespace with the specified prefix alias and namespace URI.

Method Detail

getAlias

public final java.lang.String getAlias()
Returns the prefix alias for the namespace or null if undefined.


getUri

public final java.lang.String getUri()
Returns the fully qualified URI for the namespace.


equals

public boolean equals(java.lang.Object obj)
Returns true if the target object is a Namespace instance that has a matching namespace URI and prefix (if specified).

Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object