Additional top-level classes in compilation unit: IIODOMException, IIONamedNodeMap, IIONodeList, IIOAttr.
org.w3c.dom.Element interface and additionally allows
for the storage of non-textual objects via the
getUserObject and setUserObject methods.
This class is not intended to be used for general XML
processing. In particular, Element nodes created
within the Image I/O API are not compatible with those created by
Sun's standard implementation of the org.w3.dom API.
In particular, the implementation is tuned for simple uses and may
not perform well for intensive processing.
Namespaces are ignored in this implementation. The terms "tag name" and "node name" are always considered to be synonymous
Note
The DOM Level 3 specification added a number of new methods to the
Node, Element and Attr interfaces that are not
of value to the IIOMetadataNode implementation or specification.
Calling such methods on an IIOMetadataNode, or an Attr
instance returned from an IIOMetadataNode will result in a
DOMException being thrown.
IIOMetadata#getAsTree, IIOMetadata#setFromTree, IIOMetadata#mergeTree
| Modifier and Type | Field and Description |
|---|---|
| private List | attributes
A |
| private IIOMetadataNode | firstChild
The first (leftmost) child node of this node, or
|
| private IIOMetadataNode | lastChild
The last (rightmost) child node of this node, or
|
| private IIOMetadataNode | nextSibling
The next (right) sibling node of this node, or
|
| private String | nodeName
The name of the node as a |
| private String | nodeValue
The value of the node as a |
| private int | numChildren
The number of child nodes. |
| private IIOMetadataNode | parent
The parent node of this node, or |
| private IIOMetadataNode | previousSibling
The previous (left) sibling node of this node, or
|
| private Object | userObject
The |
| Access | Constructor and Description |
|---|---|
| public | |
| public | IIOMetadataNode(String
the name of the node, as a nodeName)String.Constructs an |
| Modifier and Type | Method and Description |
|---|---|
| public Node | Returns: the node added.the newChild)Node to insert.Implements org. Adds the node |
| private void | |
| public Node | Returns: the duplicate node.if deep)true, recursively clone the subtree
under the specified node; if false, clone only the
node itself.Implements org. Returns a duplicate of this node. |
| public short | compareDocumentPosition(Node other)
Implements org. This DOM Level 3 method is not supported for |
| public String | Returns: TheAttr value as a string, or the empty string
if that attribute does not have a specified or default value.The name of the attribute to retrieve. name)Implements org. Retrieves an attribute value by name. |
| public Attr | getAttributeNode(String name)
Implements org. Retrieves an attribute node by name. |
| public Attr | getAttributeNodeNS(String namespaceURI, String localName)
Implements org. Equivalent to |
| public String | getAttributeNS(String namespaceURI, String localName)
Implements org. Equivalent to |
| public NamedNodeMap | Returns: aNamedNodeMap containing the attributes of
this node.Implements org. Returns a |
| public String | getBaseURI()
Implements org. This DOM Level 3 method is not supported for |
| public NodeList | Returns: the children as aNodeListImplements org. Returns a |
| public NodeList | getElementsByTagName(String name)
Implements org. Returns a |
| private void | |
| public NodeList | getElementsByTagNameNS(String namespaceURI, String localName)
Implements org. Equivalent to |
| public Object | getFeature(String feature, String version)
Implements org. This DOM Level 3 method is not supported for |
| public Node | Returns: the first child, as aNode, or
nullImplements org. Returns the first child of this node, or |
| public Node | Returns: the last child, as aNode, or
null.Implements org. Returns the last child of this node, or |
| public int | |
| public String | Returns: the node name, as aString.Implements org. Equivalent to |
| public String | getNamespaceURI()
Implements org. Returns |
| public Node | Returns: the next sibling, as aNode, or
null.Implements org. Returns the next sibling of this node, or |
| public String | Returns: the node name, as aString.Implements org. Returns the node name associated with this node. |
| public short | Returns: theshort value ELEMENT_NODE.Implements org. Returns the node type, which is always
|
| public String | Returns: the node value, as aString.Implements org. Returns the value associated with this node. |
| public Document | Returns: null.Implements org. Returns |
| public Node | Returns: the parent, as aNode.Implements org. Returns the parent of this node. |
| public String | Returns: null.Implements org. Returns |
| public Node | Returns: the previous sibling, as aNode, or
null.Implements org. Returns the previous sibling of this node, or |
| public TypeInfo | getSchemaTypeInfo()
Implements org. This DOM Level 3 method is not supported for |
| public String | Returns: the node name, as aStringImplements org. Equivalent to |
| public String | getTextContent()
Implements org. This DOM Level 3 method is not supported for |
| public Object | getUserData(String key)
Implements org. This DOM Level 3 method is not supported for |
| public Object | |
| public boolean | hasAttribute(String name)
Implements org. Returns |
| public boolean | hasAttributeNS(String namespaceURI, String localName)
Implements org. Equivalent to |
| public boolean | hasAttributes()
Implements org. Returns whether this node (if it is an element) has any attributes. |
| public boolean | Returns: true if this node has children.Implements org. Returns |
| public Node | Returns: the node being inserted.the newChild, Node Node to insert.the reference refChild)Node.Implements org. Inserts the node |
| public boolean | isDefaultNamespace(String namespaceURI)
Implements org. This DOM Level 3 method is not supported for |
| public boolean | isEqualNode(Node node)
Implements org. This DOM Level 3 method is not supported for |
| public boolean | isSameNode(Node node)
Implements org. This DOM Level 3 method is not supported for |
| public boolean | Returns: false.a feature, String String, which is ignored.a version)String, which is ignored.Implements org. Returns |
| public Node | |
| public String | lookupNamespaceURI(String prefix)
Implements org. This DOM Level 3 method is not supported for |
| public String | lookupPrefix(String namespaceURI)
Implements org. This DOM Level 3 method is not supported for |
| public void | normalize()
Implements org. Does nothing, since |
| public void | removeAttribute(String name)
Implements org. Removes an attribute by name. |
| private void | |
| public Attr | removeAttributeNode(Attr oldAttr)
Implements org. Removes the specified attribute node. |
| public void | removeAttributeNS(String namespaceURI, String localName)
Implements org. Equivalent to |
| public Node | Returns: the node removed.the oldChild)Node to be removed.Implements org. Removes the child node indicated by |
| public Node | Returns: the node replaced.the newChild, Node Node to insert.the oldChild)Node to be replaced.Implements org. Replaces the child node |
| public void | setAttribute(String name, String value)
Implements org. Adds a new attribute. |
| public Attr | setAttributeNode(Attr newAttr)
Implements org. Adds a new attribute node. |
| public Attr | setAttributeNodeNS(Attr newAttr)
Implements org. Equivalent to |
| public void | setAttributeNS(String namespaceURI, String qualifiedName, String value)
Implements org. Equivalent to |
| public void | setIdAttribute(String name, boolean isId)
Implements org. This DOM Level 3 method is not supported for |
| public void | setIdAttributeNode(Attr idAttr, boolean isId)
Implements org. This DOM Level 3 method is not supported for |
| public void | setIdAttributeNS(String namespaceURI, String localName, boolean isId)
Implements org. This DOM Level 3 method is not supported for |
| public void | setNodeValue(String nodeValue)
Implements org. Sets the |
| public void | setPrefix(String
a prefix)String, which is ignored.Implements org. Does nothing, since namespaces are not supported. |
| public void | setTextContent(String textContent)
Implements org. This DOM Level 3 method is not supported for |
| public Object | setUserData(String key, Object data, UserDataHandler handler)
Implements org. This DOM Level 3 method is not supported for |
| public void |
| attributes | back to summary |
|---|---|
| private List<IIOAttr> attributes A | |
| firstChild | back to summary |
|---|---|
| private IIOMetadataNode firstChild The first (leftmost) child node of this node, or
| |
| lastChild | back to summary |
|---|---|
| private IIOMetadataNode lastChild The last (rightmost) child node of this node, or
| |
| nextSibling | back to summary |
|---|---|
| private IIOMetadataNode nextSibling The next (right) sibling node of this node, or
| |
| nodeName | back to summary |
|---|---|
| private String nodeName The name of the node as a | |
| nodeValue | back to summary |
|---|---|
| private String nodeValue The value of the node as a | |
| numChildren | back to summary |
|---|---|
| private int numChildren The number of child nodes. | |
| parent | back to summary |
|---|---|
| private IIOMetadataNode parent The parent node of this node, or | |
| previousSibling | back to summary |
|---|---|
| private IIOMetadataNode previousSibling The previous (left) sibling node of this node, or
| |
| userObject | back to summary |
|---|---|
| private Object userObject The | |
| IIOMetadataNode | back to summary |
|---|---|
| public IIOMetadataNode() Constructs an empty | |
| IIOMetadataNode | back to summary |
|---|---|
| public IIOMetadataNode(String nodeName) Constructs an
| |
| appendChild | back to summary |
|---|---|
| public Node appendChild(Node newChild) Implements org. Adds the node
| |
| checkNode | back to summary |
|---|---|
| private void checkNode(Node node) throws DOMException Check that the node is either
| |
| cloneNode | back to summary |
|---|---|
| public Node cloneNode(boolean deep) Implements org. Returns a duplicate of this node. The duplicate node has no
parent (
| |
| compareDocumentPosition | back to summary |
|---|---|
| public short compareDocumentPosition(Node other) throws DOMException Implements org. This DOM Level 3 method is not supported for
| |
| getAttribute | back to summary |
|---|---|
| public String getAttribute(String name) Implements org. Retrieves an attribute value by name. | |
| getAttributeNode | back to summary |
|---|---|
| public Attr getAttributeNode(String name) Implements org. Doc from org. Retrieves an attribute node by name.
| |
| getAttributeNodeNS | back to summary |
|---|---|
| public Attr getAttributeNodeNS(String namespaceURI, String localName) Implements org. Equivalent to
| |
| getAttributeNS | back to summary |
|---|---|
| public String getAttributeNS(String namespaceURI, String localName) Implements org. Equivalent to
| |
| getAttributes | back to summary |
|---|---|
| public NamedNodeMap getAttributes() Implements org. Returns a
| |
| getBaseURI | back to summary |
|---|---|
| public String getBaseURI() throws DOMException Implements org. This DOM Level 3 method is not supported for
| |
| getChildNodes | back to summary |
|---|---|
| public NodeList getChildNodes() Implements org. Returns a
| |
| getElementsByTagName | back to summary |
|---|---|
| public NodeList getElementsByTagName(String name) Implements org. Doc from org. Returns a | |
| getElementsByTagName | back to summary |
|---|---|
| private void getElementsByTagName(String name, List<Node> l) | |
| getElementsByTagNameNS | back to summary |
|---|---|
| public NodeList getElementsByTagNameNS(String namespaceURI, String localName) Implements org. Equivalent to | |
| getFeature | back to summary |
|---|---|
| public Object getFeature(String feature, String version) throws DOMException Implements org. This DOM Level 3 method is not supported for
| |
| getFirstChild | back to summary |
|---|---|
| public Node getFirstChild() Implements org. Returns the first child of this node, or
| |
| getLastChild | back to summary |
|---|---|
| public Node getLastChild() Implements org. Returns the last child of this node, or
| |
| getLength | back to summary |
|---|---|
| public int getLength() Implements org. Doc from org. The number of nodes in the list. The range of valid child node indices
is 0 to | |
| getLocalName | back to summary |
|---|---|
| public String getLocalName() Implements org. Equivalent to
| |
| getNamespaceURI | back to summary |
|---|---|
| public String getNamespaceURI() throws DOMException Implements org. Returns | |
| getNextSibling | back to summary |
|---|---|
| public Node getNextSibling() Implements org. Returns the next sibling of this node, or
| |
| getNodeName | back to summary |
|---|---|
| public String getNodeName() Implements org. Returns the node name associated with this node.
| |
| getNodeType | back to summary |
|---|---|
| public short getNodeType() Implements org. Returns the node type, which is always
| |
| getNodeValue | back to summary |
|---|---|
| public String getNodeValue() Implements org. Returns the value associated with this node.
| |
| getOwnerDocument | back to summary |
|---|---|
| public Document getOwnerDocument() Implements org. Returns
| |
| getParentNode | back to summary |
|---|---|
| public Node getParentNode() Implements org. Returns the parent of this node. A
| |
| getPrefix | back to summary |
|---|---|
| public String getPrefix() Implements org. Returns | |
| getPreviousSibling | back to summary |
|---|---|
| public Node getPreviousSibling() Implements org. Returns the previous sibling of this node, or
| |
| getSchemaTypeInfo | back to summary |
|---|---|
| public TypeInfo getSchemaTypeInfo() throws DOMException Implements org. This DOM Level 3 method is not supported for
| |
| getTagName | back to summary |
|---|---|
| public String getTagName() Implements org. Equivalent to
| |
| getTextContent | back to summary |
|---|---|
| public String getTextContent() throws DOMException Implements org. This DOM Level 3 method is not supported for
| |
| getUserData | back to summary |
|---|---|
| public Object getUserData(String key) throws DOMException Implements org. This DOM Level 3 method is not supported for
| |
| getUserObject | back to summary |
|---|---|
| public Object getUserObject() Returns the
| |
| hasAttribute | back to summary |
|---|---|
| public boolean hasAttribute(String name) Implements org. Doc from org. Returns | |
| hasAttributeNS | back to summary |
|---|---|
| public boolean hasAttributeNS(String namespaceURI, String localName) Implements org. Equivalent to | |
| hasAttributes | back to summary |
|---|---|
| public boolean hasAttributes() Implements org. Doc from org. Returns whether this node (if it is an element) has any attributes. | |
| hasChildNodes | back to summary |
|---|---|
| public boolean hasChildNodes() Implements org. Returns
| |
| insertBefore | back to summary |
|---|---|
| public Node insertBefore(Node newChild, Node refChild) Implements org. Inserts the node
| |
| isDefaultNamespace | back to summary |
|---|---|
| public boolean isDefaultNamespace(String namespaceURI) throws DOMException Implements org. This DOM Level 3 method is not supported for
| |
| isEqualNode | back to summary |
|---|---|
| public boolean isEqualNode(Node node) throws DOMException Implements org. This DOM Level 3 method is not supported for
| |
| isSameNode | back to summary |
|---|---|
| public boolean isSameNode(Node node) throws DOMException Implements org. This DOM Level 3 method is not supported for
| |
| isSupported | back to summary |
|---|---|
| public boolean isSupported(String feature, String version) Implements org. Returns | |
| item | back to summary |
|---|---|
| public Node item(int index) Implements org. Doc from org. Returns the | |
| lookupNamespaceURI | back to summary |
|---|---|
| public String lookupNamespaceURI(String prefix) throws DOMException Implements org. This DOM Level 3 method is not supported for
| |
| lookupPrefix | back to summary |
|---|---|
| public String lookupPrefix(String namespaceURI) throws DOMException Implements org. This DOM Level 3 method is not supported for
| |
| normalize | back to summary |
|---|---|
| public void normalize() Implements org. Does nothing, since | |
| removeAttribute | back to summary |
|---|---|
| public void removeAttribute(String name) Implements org. Doc from org. Removes an attribute by name. If a default value for the removed
attribute is defined in the DTD, a new attribute immediately appears
with the default value as well as the corresponding namespace URI,
local name, and prefix when applicable. The implementation may handle
default values from other schemas similarly but applications should
use | |
| removeAttribute | back to summary |
|---|---|
| private void removeAttribute(String name, boolean checkPresent) | |
| removeAttributeNode | back to summary |
|---|---|
| public Attr removeAttributeNode(Attr oldAttr) Implements org. Doc from org. Removes the specified attribute node. If a default value for the
removed | |
| removeAttributeNS | back to summary |
|---|---|
| public void removeAttributeNS(String namespaceURI, String localName) Implements org. Equivalent to | |
| removeChild | back to summary |
|---|---|
| public Node removeChild(Node oldChild) Implements org. Removes the child node indicated by
| |
| replaceChild | back to summary |
|---|---|
| public Node replaceChild(Node newChild, Node oldChild) Implements org. Replaces the child node
| |
| setAttribute | back to summary |
|---|---|
| public void setAttribute(String name, String value) Implements org. Doc from org. Adds a new attribute. If an attribute with that name is already present
in the element, its value is changed to be that of the value
parameter. This value is a simple string; it is not parsed as it is
being set. So any markup (such as syntax to be recognized as an
entity reference) is treated as literal text, and needs to be
appropriately escaped by the implementation when it is written out.
In order to assign an attribute value that contains entity
references, the user must create an | |
| setAttributeNode | back to summary |
|---|---|
| public Attr setAttributeNode(Attr newAttr) throws DOMException Implements org. Doc from org. Adds a new attribute node. If an attribute with that name (
| |
| setAttributeNodeNS | back to summary |
|---|---|
| public Attr setAttributeNodeNS(Attr newAttr) Implements org. Equivalent to
| |
| setAttributeNS | back to summary |
|---|---|
| public void setAttributeNS(String namespaceURI, String qualifiedName, String value) Implements org. Equivalent to
| |
| setIdAttribute | back to summary |
|---|---|
| public void setIdAttribute(String name, boolean isId) throws DOMException Implements org. This DOM Level 3 method is not supported for
| |
| setIdAttributeNode | back to summary |
|---|---|
| public void setIdAttributeNode(Attr idAttr, boolean isId) throws DOMException Implements org. This DOM Level 3 method is not supported for
| |
| setIdAttributeNS | back to summary |
|---|---|
| public void setIdAttributeNS(String namespaceURI, String localName, boolean isId) throws DOMException Implements org. This DOM Level 3 method is not supported for
| |
| setNodeValue | back to summary |
|---|---|
| public void setNodeValue(String nodeValue) Implements org. Sets the | |
| setPrefix | back to summary |
|---|---|
| public void setPrefix(String prefix) Implements org. Does nothing, since namespaces are not supported. | |
| setTextContent | back to summary |
|---|---|
| public void setTextContent(String textContent) throws DOMException Implements org. This DOM Level 3 method is not supported for
| |
| setUserData | back to summary |
|---|---|
| public Object setUserData(String key, Object data, UserDataHandler handler) throws DOMException Implements org. This DOM Level 3 method is not supported for
| |
| setUserObject | back to summary |
|---|---|
| public void setUserObject(Object userObject) Sets the value associated with this node.
| |