|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.pentaho.reporting.libraries.xmlns.common.AttributeList
public class AttributeList
The attribute list is used by a writer to specify the attributes of an XML element in a certain order.
Nested Class Summary | |
---|---|
static class |
AttributeList.AttributeEntry
A name/value pair of the attribute list. |
Field Summary | |
---|---|
static java.lang.String |
XML_NAMESPACE
A constant containing the XML namespace identifier. |
static java.lang.String |
XMLNS_NAMESPACE
A constant containing the XML-Namespace namespace identifier. |
Constructor Summary | |
---|---|
AttributeList()
Creates an empty attribute list with no default values. |
Method Summary | |
---|---|
void |
addNamespaceDeclaration(java.lang.String prefix,
java.lang.String namespaceUri)
Adds a namespace declaration. |
java.lang.String |
getAttribute(java.lang.String namespace,
java.lang.String name)
Returns the attribute value for the given attribute name or null, if the attribute is not defined in this list. |
java.lang.String |
getAttribute(java.lang.String namespace,
java.lang.String name,
java.lang.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(java.lang.String prefix)
Checks, whether the given prefix is defined. |
boolean |
isNamespaceUriDefined(java.lang.String uri)
Checks, whether the given namespace URI has a defined prefix. |
java.util.Iterator |
iterator()
Deprecated. use toArray instead. |
void |
removeAttribute(java.lang.String namespace,
java.lang.String name)
Removes the attribute with the given name from the list. |
void |
removeNamespaceDeclaration(java.lang.String prefix)
Removes a namespace declaration from this attribute list. |
void |
setAttribute(java.lang.String namespace,
java.lang.String name,
java.lang.String value)
Defines an attribute. |
AttributeList.AttributeEntry[] |
toArray()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String XMLNS_NAMESPACE
public static final java.lang.String XML_NAMESPACE
Constructor Detail |
---|
public AttributeList()
Method Detail |
---|
public java.util.Iterator iterator()
public AttributeList.AttributeEntry[] toArray()
public void setAttribute(java.lang.String namespace, java.lang.String name, java.lang.String value)
namespace
- the namespace of the attribute.name
- the name of the attribute to be definedvalue
- the value of the attribute.public java.lang.String getAttribute(java.lang.String namespace, java.lang.String name)
namespace
- the namespace of the attribute.name
- the name of the attribute
public java.lang.String getAttribute(java.lang.String namespace, java.lang.String name, java.lang.String defaultValue)
namespace
- the namespace of the attribute.name
- the name of the attribute.defaultValue
- the default value.
public void removeAttribute(java.lang.String namespace, java.lang.String name)
namespace
- the namespace of the attribute that should be removed.name
- the name of the attribute which should be removed..public boolean isEmpty()
public void addNamespaceDeclaration(java.lang.String prefix, java.lang.String namespaceUri)
prefix
- the desired namespace prefix (can be null or empty to
define the default namespace.namespaceUri
- the URI of the namespace.public void removeNamespaceDeclaration(java.lang.String prefix)
prefix
- the declared namespace prefix.public boolean isNamespacePrefixDefined(java.lang.String prefix)
prefix
- the namespace prefix.
public boolean isNamespaceUriDefined(java.lang.String uri)
uri
- the uri.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |