fedora.common.xml.namespace
Class XMLNamespace

java.lang.Object
  extended by fedora.common.xml.namespace.XMLNamespace
Direct Known Subclasses:
FedoraAccessNamespace, FedoraAPINamespace, FedoraAuditNamespace, FedoraBatchModifyNamespace, FedoraBESecurityNamespace, FedoraBindingSpecNamespace, FedoraDSCompositeModelNamespace, FedoraFCFGNamespace, FedoraManagementNamespace, FedoraMethodMapNamespace, FedoraServiceProfileNamespace, FedoraTypesNamespace, FOXMLNamespace, METSNamespace, OAIDCNamespace, OAIFriendsNamespace, OAIIdentifierNamespace, OAIPMHNamespace, OAIProvenanceNamespace, OldXLinkNamespace, SOAPEncNamespace, SOAPNamespace, WSDLHTTPNamespace, WSDLMIMENamespace, WSDLNamespace, XLinkNamespace, XMLNSNamespace, XMLXSDNamespace, XSINamespace

public class XMLNamespace
extends java.lang.Object

An XML namespace.

Author:
cwilper@cs.cornell.edu

Field Summary
 java.lang.String prefix
          The preferred prefix for this namespace when used in instance documents.
 java.lang.String uri
          The URI of this namespace.
 
Constructor Summary
XMLNamespace(java.lang.String uri, java.lang.String prefix)
          Constructs an instance.
 
Method Summary
 boolean equals(java.lang.Object o)
          Returns true iff the given object is an instance of this class and has the same URI.
 int hashCode()
          
 java.lang.String toString()
          Returns the URI of the namespace.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

uri

public final java.lang.String uri
The URI of this namespace.


prefix

public final java.lang.String prefix
The preferred prefix for this namespace when used in instance documents.

Constructor Detail

XMLNamespace

public XMLNamespace(java.lang.String uri,
                    java.lang.String prefix)
Constructs an instance.

Parameters:
uri - the URI of the namespace.
prefix - the preferred prefix.
Throws:
java.lang.IllegalArgumentException - if either parameter is null.
Method Detail

toString

public java.lang.String toString()
Returns the URI of the namespace.

Overrides:
toString in class java.lang.Object

equals

public boolean equals(java.lang.Object o)
Returns true iff the given object is an instance of this class and has the same URI.

Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()

Overrides:
hashCode in class java.lang.Object