|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.pentaho.reporting.libraries.xmlns.writer.DeclaredNamespaces
public final class DeclaredNamespaces
A immutable namespace collection. Any attempt to modify the declared namespaces creates a new copy of the map.
Constructor Summary | |
---|---|
DeclaredNamespaces()
Creates a new namespaces collection. |
|
DeclaredNamespaces(DeclaredNamespaces namespaces)
Creates a new namespaces collection using the given namespaces as initial values. |
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DeclaredNamespaces()
public DeclaredNamespaces(DeclaredNamespaces namespaces)
namespaces
- the namespaces, never null.Method Detail |
---|
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.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |