public class ExtAttributes extends java.lang.Object implements java.lang.Iterable<ExtAttribute>
ExtAttribute objects and associated namespaces.| Constructor and Description |
|---|
ExtAttributes()
Creates a new empty
ExtAttributes object. |
ExtAttributes(ExtAttributes original)
Copy constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
deleteAttribute(java.lang.String namespaceURI,
java.lang.String localName)
Removes an attribute from this set.
|
ExtAttribute |
getAttribute(java.lang.String namespaceURI,
java.lang.String localName)
Gets an attribute if it exists.
|
java.lang.String |
getAttributeValue(java.lang.String namespaceURI,
java.lang.String localName)
Gets the value for a given attribute name of a given namespace.
|
java.lang.String |
getNamespacePrefix(java.lang.String namespaceURI)
Gets the prefix for a given namespace URI.
|
java.util.Set<java.lang.String> |
getNamespaces()
Gets the set of keys for the namespaces in this object.
|
boolean |
hasNamespace()
Indicates if this set has at least one namespace defined.
|
boolean |
isEmpty()
Indicates if this set is empty or not.
|
java.util.Iterator<ExtAttribute> |
iterator()
Creates an iterator for the attributes in this set.
|
ExtAttribute |
setAttribute(ExtAttribute attribute)
Sets a given attribute in this set.
|
ExtAttribute |
setAttribute(java.lang.String localName,
java.lang.String value)
Sets an attribute without namespace for this set.
|
ExtAttribute |
setAttribute(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String value)
Sets an attribute in this set.
|
void |
setNamespace(java.lang.String prefix,
java.lang.String namespaceURI)
Sets a namespace in this set.
|
int |
size()
Gets the number of attributes in this set.
|
public ExtAttributes()
ExtAttributes object.public ExtAttributes(ExtAttributes original)
original - the original object to duplicate.public java.lang.String getAttributeValue(java.lang.String namespaceURI,
java.lang.String localName)
namespaceURI - the namespace URI of the attribute.localName - the name of the attribute.public ExtAttribute getAttribute(java.lang.String namespaceURI, java.lang.String localName)
namespaceURI - the namespace URI of the attribute QName.localName - the local name of the attribute.public ExtAttribute setAttribute(ExtAttribute attribute)
attribute - the attribute to add/set.public ExtAttribute setAttribute(java.lang.String namespaceURI, java.lang.String localName, java.lang.String value)
namespaceURI - the namespace URI of the attribute.localName - the name of the attribute.value - the value of the attribute.public ExtAttribute setAttribute(java.lang.String localName, java.lang.String value)
localName - the name of the attribute.value - the value of the attribute.public void deleteAttribute(java.lang.String namespaceURI,
java.lang.String localName)
namespaceURI - the namespace URI of the attribute.localName - the name of the attribute.public boolean isEmpty()
public int size()
public java.util.Iterator<ExtAttribute> iterator()
iterator in interface java.lang.Iterable<ExtAttribute>public void setNamespace(java.lang.String prefix,
java.lang.String namespaceURI)
prefix - the namespace prefix.namespaceURI - the namsepace URI.public java.lang.String getNamespacePrefix(java.lang.String namespaceURI)
namespaceURI - the namespace URI.public boolean hasNamespace()
public java.util.Set<java.lang.String> getNamespaces()