public final class DeclaredNamespaces
extends java.lang.Object
| Constructor | Description |
|---|---|
DeclaredNamespaces() |
Creates a new namespaces collection.
|
DeclaredNamespaces(DeclaredNamespaces namespaces) |
Creates a new namespaces collection using the given namespaces as initial values.
|
| Modifier and Type | Method | Description |
|---|---|---|
DeclaredNamespaces |
add(java.lang.String uri,
java.lang.String prefix) |
Adds a single namespace definition to the collection.
|
DeclaredNamespaces |
add(java.util.HashMap newNamespaces) |
Adds all namespaces from the given hashmap into this map.
|
DeclaredNamespaces |
add(AttributeList attributes) |
Adds all declared namespaces from the given attribute-list into the namespaces collection.
|
java.util.Map |
getNamespaces() |
Returns all known namespaces as unmodifiable map.
|
java.lang.String |
getPrefix(java.lang.String uri) |
Looksup the prefix for the given URI.
|
boolean |
isNamespaceDefined(java.lang.String uri) |
Checks, whether the namespace marked by the given URI is defined in this collection.
|
boolean |
isPrefixDefined(java.lang.String prefix) |
Checks whether the given prefix is already defined in the collection.
|
public DeclaredNamespaces()
public DeclaredNamespaces(DeclaredNamespaces namespaces)
namespaces - the namespaces, never null.public DeclaredNamespaces add(java.util.HashMap newNamespaces)
newNamespaces - the namespaces collection.public DeclaredNamespaces add(AttributeList attributes)
attributes - the attribute list containing namespace definitions.public DeclaredNamespaces add(java.lang.String uri, java.lang.String prefix)
uri - the URI of the namespace.prefix - the prefix to be used for the namespace.public java.lang.String getPrefix(java.lang.String uri)
uri - the URI.public boolean isNamespaceDefined(java.lang.String uri)
uri - the URI to be checked.public java.util.Map getNamespaces()
public boolean isPrefixDefined(java.lang.String prefix)
prefix - the prefix.