| java.lang.Object org.jdom.Namespace
Namespace | final public class Namespace (Code) | | 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.
version: $Revision: 1.2 $, $Date: 2005/05/03 07:02:04 $ author: Brett McLaughlin author: Elliotte Rusty Harold author: Jason Hunter author: Wesley Biggs |
Method Summary | |
public boolean | equals(Object ob) This tests for equality - Two Namespaces
are equal if and only if their URIs are byte-for-byte equals.
Parameters: ob - Object to compare to this Namespace . | public static Namespace | getNamespace(String prefix, String uri) This will retrieve (if in existence) or create (if not) a
Namespace for the supplied prefix and URI.
Parameters: prefix - String prefix to map to Namespace . Parameters: uri - String URI of new Namespace . | public static Namespace | getNamespace(String uri) This will retrieve (if in existence) or create (if not) a
Namespace for the supplied URI, and make it usable
as a default namespace, as no prefix is supplied.
Parameters: uri - String URI of new Namespace . | public String | getPrefix() This returns the prefix mapped to this Namespace . | public String | getURI() This returns the namespace URI for this Namespace . | public int | hashCode() This returns a probably unique hash code for the Namespace . | public String | toString() This returns a String representation of this
Namespace , suitable for use in debugging. |
NO_NAMESPACE | final public static Namespace NO_NAMESPACE(Code) | | Define a Namespace for when not in a namespace
|
XML_NAMESPACE | final public static Namespace XML_NAMESPACE(Code) | | Define a Namespace for the standard xml prefix.
|
equals | public boolean equals(Object ob)(Code) | | This tests for equality - Two Namespaces
are equal if and only if their URIs are byte-for-byte equals.
Parameters: ob - Object to compare to this Namespace . boolean - whether the supplied object is equal tothis Namespace . |
getNamespace | public static Namespace getNamespace(String prefix, String uri)(Code) | | This will retrieve (if in existence) or create (if not) a
Namespace for the supplied prefix and URI.
Parameters: prefix - String prefix to map to Namespace . Parameters: uri - String URI of new Namespace . Namespace - ready to use namespace. throws: IllegalNameException - if the given prefix and uri make upan illegal namespace name. |
getNamespace | public static Namespace getNamespace(String uri)(Code) | | This will retrieve (if in existence) or create (if not) a
Namespace for the supplied URI, and make it usable
as a default namespace, as no prefix is supplied.
Parameters: uri - String URI of new Namespace . Namespace - ready to use namespace. |
getPrefix | public String getPrefix()(Code) | | This returns the prefix mapped to this Namespace .
String - prefix for this Namespace . |
getURI | public String getURI()(Code) | | This returns the namespace URI for this Namespace .
String - URI for this Namespace . |
hashCode | public int hashCode()(Code) | | This returns a probably unique hash code for the Namespace .
If two namespaces have the same URI, they are equal and have the same
hash code, even if they have different prefixes.
int - hash code for this Namespace . |
toString | public String toString()(Code) | | This returns a String representation of this
Namespace , suitable for use in debugging.
String - information about this instance. |
|
|