getNamespace(String) and getNamespace(String, String))
are thread-safe.
See NamespaceAware for additional notes on how Namespaces are
'in-scope' in JDOM content, and how those in-scope Namespaces are accessed.
NamespaceAware
| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private static final ConcurrentMap | namespacemap
Factory list of namespaces. |
| public static final Namespace | NO_NAMESPACE
Define a |
| private final transient String | prefix
The prefix mapped to this namespace |
| private static final long | serialVersionUID
JDOM 2.0.0 Serialization version |
| private final transient String | uri
The URI for this namespace |
| public static final Namespace | XML_NAMESPACE
Define a |
| private static final Namespace |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | Returns: boolean - whether the supplied object is equal to
this Namespace.Object to compare to this Namespace.Overrides java. Namespaces
are equal if and only if their URIs are byte-for-byte equals.
|
| public static Namespace | Returns: Namespace - ready to use namespace.String prefix to map to
Namespace.String URI of new Namespace.This will retrieve (if in existence) or create (if not) a
|
| public static Namespace | Returns: Namespace - ready to use namespace.String URI of new Namespace.This will retrieve (if in existence) or create (if not) a
|
| public String | Returns: String - prefix for this Namespace.This returns the prefix mapped to this |
| public String | |
| public int | Returns: int - hash code for this Namespace.Overrides java. Namespace that conforms
to the 'equals()' contract.
|
| private Object | Returns: nothing.Because Namespace is serialized by proxy, the reading of direct Namespace instances is illegal and prohibited. |
| public String | Returns: String - information about this instance.Overrides java. String representation of this
Namespace, suitable for use in debugging.
|
| private Object | Returns: the Namespace proxy instance.Serializes Namespace by using a proxy serialization instance. |
| namespacemap | back to summary |
|---|---|
| private static final ConcurrentMap<String, ConcurrentMap<String, Namespace>> namespacemap Factory list of namespaces. Keys are URI&prefix. Values are Namespace objects | |
| NO_NAMESPACE | back to summary |
|---|---|
| public static final Namespace NO_NAMESPACE Define a | |
| prefix | back to summary |
|---|---|
| private final transient String prefix The prefix mapped to this namespace | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID JDOM 2.0.0 Serialization version | |
| uri | back to summary |
|---|---|
| private final transient String uri The URI for this namespace | |
| XML_NAMESPACE | back to summary |
|---|---|
| public static final Namespace XML_NAMESPACE Define a | |
| XMLNS_NAMESPACE | back to summary |
|---|---|
| private static final Namespace XMLNS_NAMESPACE | |
| Namespace | back to summary |
|---|---|
| private Namespace(final String prefix, final String uri) This constructor handles creation of a | |
| equals | back to summary |
|---|---|
| public boolean equals(final Object ob) Overrides java. This tests for equality - Two | |
| getNamespace | back to summary |
|---|---|
| public static Namespace getNamespace(final String prefix, final String uri) This will retrieve (if in existence) or create (if not) a
| |
| getNamespace | back to summary |
|---|---|
| public static Namespace getNamespace(final String uri) This will retrieve (if in existence) or create (if not) a
| |
| getPrefix | back to summary |
|---|---|
| public String getPrefix() This returns the prefix mapped to this
| |
| getURI | back to summary |
|---|---|
| public String getURI() This returns the namespace URI for this
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. This returns the hash code for the If two namespaces have the same URI, they are equal and have the same hash code, even if they have different prefixes.
| |
| readResolve | back to summary |
|---|---|
| private Object readResolve() throws InvalidObjectException Because Namespace is serialized by proxy, the reading of direct Namespace instances is illegal and prohibited.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. This returns a | |
| writeReplace | back to summary |
|---|---|
| private Object writeReplace() Serializes Namespace by using a proxy serialization instance.
| |
| Modifier and Type | Field and Description |
|---|---|
| private final String | |
| private final String | |
| private static final long |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private Object |
| pprefix | back to summary |
|---|---|
| private final String pprefix | |
| puri | back to summary |
|---|---|
| private final String puri | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| NamespaceSerializationProxy | back to summary |
|---|---|
| public NamespaceSerializationProxy(String pprefix, String puri) | |
| readResolve | back to summary |
|---|---|
| private Object readResolve() | |