public final class DeclaredNamespaces extends Object
| Constructor and 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 and Description |
|---|---|
DeclaredNamespaces |
add(AttributeList attributes)
Adds all declared namespaces from the given attribute-list into the namespaces collection.
|
DeclaredNamespaces |
add(HashMap newNamespaces)
Adds all namespaces from the given hashmap into this map.
|
DeclaredNamespaces |
add(String uri,
String prefix)
Adds a single namespace definition to the collection.
|
Map |
getNamespaces()
Returns all known namespaces as unmodifiable map.
|
String |
getPrefix(String uri)
Looksup the prefix for the given URI.
|
boolean |
isNamespaceDefined(String uri)
Checks, whether the namespace marked by the given URI is defined in this collection.
|
boolean |
isPrefixDefined(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(HashMap newNamespaces)
newNamespaces - the namespaces collection.public DeclaredNamespaces add(AttributeList attributes)
attributes - the attribute list containing namespace definitions.public DeclaredNamespaces add(String uri, String prefix)
uri - the URI of the namespace.prefix - the prefix to be used for the namespace.public String getPrefix(String uri)
uri - the URI.public boolean isNamespaceDefined(String uri)
uri - the URI to be checked.public Map getNamespaces()
public boolean isPrefixDefined(String prefix)
prefix - the prefix.