org.pentaho.reporting.libraries.xmlns.common
public class AttributeList extends Object
Nested Class Summary | |
---|---|
static class | AttributeList.AttributeEntry
A name/value pair of the attribute list. |
Field Summary | |
---|---|
static String | XMLNS_NAMESPACE
A constant containing the XML-Namespace namespace identifier. |
static String | XML_NAMESPACE
A constant containing the XML namespace identifier. |
Constructor Summary | |
---|---|
AttributeList()
Creates an empty attribute list with no default values. |
Method Summary | |
---|---|
void | addNamespaceDeclaration(String prefix, String namespaceUri)
Adds a namespace declaration. |
String | getAttribute(String namespace, String name)
Returns the attribute value for the given attribute name or null, if the
attribute is not defined in this list.
|
String | getAttribute(String namespace, String name, String defaultValue)
Returns the attribute value for the given attribute name or the given
defaultvalue, if the attribute is not defined in this list.
|
boolean | isEmpty()
Checks, whether this list is empty.
|
boolean | isNamespacePrefixDefined(String prefix)
Checks, whether the given prefix is defined.
|
boolean | isNamespaceUriDefined(String uri)
Checks, whether the given namespace URI has a defined prefix.
|
Iterator | iterator()
Returns an iterator over the entry list. |
void | removeAttribute(String namespace, String name)
Removes the attribute with the given name from the list.
|
void | removeNamespaceDeclaration(String prefix)
Removes a namespace declaration from this attribute list.
|
void | setAttribute(String namespace, String name, String value)
Defines an attribute.
|
AttributeList.AttributeEntry[] | toArray() |
Parameters: prefix the desired namespace prefix (can be null or empty to define the default namespace. namespaceUri the URI of the namespace.
Parameters: namespace the namespace of the attribute. name the name of the attribute
Returns: the attribute value or null.
Parameters: namespace the namespace of the attribute. name the name of the attribute. defaultValue the default value.
Returns: the attribute value or the defaultValue.
Returns: true, if the list is empty, false otherwise.
Parameters: prefix the namespace prefix.
Returns: true, if the prefix is defined, false otherwise.
Parameters: uri the uri.
Returns: true, if there is at least one namespace declaration matching the given URI, false otherwise.
Deprecated: use toArray instead.
Returns an iterator over the entry list. The iterator returns AttributeList.AttributeEntry objects.Returns: the iterator over the entries contained in this list.
Parameters: namespace the namespace of the attribute that should be removed. name the name of the attribute which should be removed..
Parameters: prefix the declared namespace prefix.
Parameters: namespace the namespace of the attribute. name the name of the attribute to be defined value the value of the attribute.