| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.cdmckay.coffeedom.Namespace
public final class Namespace
An XML namespace representation, as well as a factory for creating XML namespace objects. Namespaces are not Serializable, however objects that use namespaces have special logic to handle serialization manually. These classes call the getNamespace() method on deserialization to ensure there is one unique Namespace object for any unique prefix/uri pair.
| Field Summary | |
|---|---|
| static Namespace | NO_NAMESPACEDefine a Namespacefor when not in a namespace | 
| static Namespace | XML_NAMESPACEDefine a Namespacefor the standard xml prefix. | 
| Method Summary | |
|---|---|
|  boolean | equals(Object object)This tests for equality - Two Namespacesare equal if and only if their URIs are byte-for-byte
 equals. | 
| static Namespace | getNamespace(String uri)This will retrieve (if in existence) or create (if not) a Namespacefor the supplied URI, and make
 it usable as a default namespace, as no prefix is supplied. | 
| static Namespace | getNamespace(String prefix,
             String uri)This will retrieve (if in existence) or create (if not) a Namespacefor the supplied prefix and
 URI. | 
|  String | getPrefix()This returns the prefix mapped to this Namespace. | 
|  String | getURI()This returns the namespace URI for this Namespace. | 
|  int | hashCode()This returns a probably unique hash code for the Namespace. | 
|  String | toString()This returns a Stringrepresentation of thisNamespace, suitable for use in debugging. | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, finalize, getClass, notify, notifyAll, wait, wait, wait | 
| Field Detail | 
|---|
public static final Namespace NO_NAMESPACE
Namespace for when not in a namespace
public static final Namespace XML_NAMESPACE
Namespace for the standard xml prefix.
| Method Detail | 
|---|
public static Namespace getNamespace(String prefix,
                                     String uri)
Namespace for the supplied prefix and
 URI.
prefix - String prefix to map to Namespace.uri - String URI of new Namespace.
Namespace - ready to use namespace.
IllegalNameException - if the given prefix and uri make up an illegal namespace name.public static Namespace getNamespace(String uri)
Namespace for the supplied URI, and make
 it usable as a default namespace, as no prefix is supplied.
uri - String URI of new Namespace.
Namespace - ready to use namespace.public String getPrefix()
Namespace.
String - prefix for this Namespace.public String getURI()
Namespace.
String - URI for this Namespace.public boolean equals(Object object)
Namespaces are equal if and only if their URIs are byte-for-byte
 equals.
equals in class Objectobject - Object to compare to this Namespace.
boolean - whether the supplied object is equal to this Namespace.public String toString()
String representation of this Namespace, suitable for use in debugging.
toString in class ObjectString - information about this instance.public int hashCode()
Namespace. If two namespaces have the same URI,
 they are equal and have the same hash code, even if they have different prefixes.
hashCode in class Objectint - hash code for this Namespace.| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||