Main Page | Class Hierarchy | Class List | Class Members

org::jdom::Namespace Class Reference

List of all members.

Public Member Functions

String getPrefix ()
String getURI ()
boolean equals (Object ob)
String toString ()
int hashCode ()

Static Public Member Functions

Namespace getNamespace (String prefix, String uri)
Namespace getNamespace (String uri)

Static Public Attributes

final Namespace NO_NAMESPACE = new Namespace("", "")
final Namespace XML_NAMESPACE

Static Package Functions

 [static initializer]

Detailed Description

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.41
,
Date
2004/02/27 11:32:57
Author:
Brett McLaughlin

Elliotte Rusty Harold

Jason Hunter

Wesley Biggs


Member Function Documentation

org::jdom::Namespace::[static initializer]  )  [inline, static, package]
 

This static initializer acts as a factory contructor. It sets up storage and required initial values.

boolean org::jdom::Namespace::equals Object  ob  )  [inline]
 

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.
Returns:
boolean - whether the supplied object is equal to this Namespace.

Namespace org::jdom::Namespace::getNamespace String  uri  )  [inline, static]
 

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.
Returns:
Namespace - ready to use namespace.

Namespace org::jdom::Namespace::getNamespace String  prefix,
String  uri
[inline, static]
 

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.
uri String URI of new Namespace.
Returns:
Namespace - ready to use namespace.
Exceptions:
IllegalNameException if the given prefix and uri make up an illegal namespace name.

String org::jdom::Namespace::getPrefix  )  [inline]
 

This returns the prefix mapped to this Namespace.

Returns:
String - prefix for this Namespace.

String org::jdom::Namespace::getURI  )  [inline]
 

This returns the namespace URI for this Namespace.

Returns:
String - URI for this Namespace.

int org::jdom::Namespace::hashCode  )  [inline]
 

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.

Returns:
int - hash code for this Namespace.

String org::jdom::Namespace::toString  )  [inline]
 

This returns a String representation of this Namespace, suitable for use in debugging.

Returns:
String - information about this instance.


Member Data Documentation

final Namespace org::jdom::Namespace::NO_NAMESPACE = new Namespace("", "") [static]
 

Define a Namespace for when not in a namespace

final Namespace org::jdom::Namespace::XML_NAMESPACE [static]
 

Initial value:

        new Namespace("xml", "http://www.w3.org/XML/1998/namespace")
Define a Namespace for the standard xml prefix.


The documentation for this class was generated from the following file:
Generated on Thu Dec 9 10:42:05 2004 for JDOM by  doxygen 1.3.9.1