org.sapia.util.xml
Class Namespace

java.lang.Object
  |
  +--org.sapia.util.xml.Namespace
All Implemented Interfaces:
Serializable

public class Namespace
extends Object
implements Serializable

The Namespace class is an object representation of a XML namespace definition. It has two arguments: a URI and a prefix.

Author:
Jean-Cedric Desrochers
Copyright:
Copyright © 2002-2003 Sapia Open Source Software. All Rights Reserved.
License:
Read the license.txt file of the jar or visit the license page at the Sapia OSS web site
See Also:
Serialized Form

Constructor Summary
Namespace()
          Creates a new Namespace instance.
Namespace(String anURI, String aPrefix)
          Creates a new Namespace instance with the passed in arguments.
 
Method Summary
 boolean equals(Object anObject)
          Returns true if the object passed in is of type Namespace and has the same URI and prefix as this namespace instance.
 String getPrefix()
          Returns the prefix of this namespace.
 String getURI()
          Returns the URI of this namespace.
 int hashCode()
          Returns the hash code of this namespace.
 void setPrefix(String aPrefix)
          Changes the prefix of this namespace.
 void setURI(String anURI)
          Changes the URI of this namespace.
 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

Namespace

public Namespace()
Creates a new Namespace instance.


Namespace

public Namespace(String anURI,
                 String aPrefix)
Creates a new Namespace instance with the passed in arguments.

Parameters:
anURI - The URI of this namespace.
aPrefix - The prefix of this namespace.
Method Detail

getURI

public String getURI()
Returns the URI of this namespace.

Returns:
The URI of this namespace.

getPrefix

public String getPrefix()
Returns the prefix of this namespace.

Returns:
The prefix of this namespace.

setURI

public void setURI(String anURI)
Changes the URI of this namespace.

Parameters:
anURI - The new URI of this namespace.

setPrefix

public void setPrefix(String aPrefix)
Changes the prefix of this namespace.

Parameters:
aPrefix - The new prefix of this namespace

hashCode

public int hashCode()
Returns the hash code of this namespace.

Overrides:
hashCode in class Object
Returns:
The hash code of this namespace.

equals

public boolean equals(Object anObject)
Returns true if the object passed in is of type Namespace and has the same URI and prefix as this namespace instance.

Overrides:
equals in class Object
Parameters:
anObject - The object to compare for equality.
Returns:
True if the object is equals, false otherwise.

toString

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

Overrides:
toString in class Object
Returns:
A string representation of this object.


Copyright © 2002 Sapia Open Source Software. All Rights Reserved.