Home » openjdk-7 » javax » imageio » metadata » [javadoc | source]
javax.imageio.metadata
public class: IIOMetadataNode [javadoc | source]
java.lang.Object
   javax.imageio.metadata.IIOMetadataNode

All Implemented Interfaces:
    NodeList, Element

Direct Known Subclasses:
    IIOAttr

A class representing a node in a meta-data tree, which implements the 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 {@code Node}, {@code Element} and {@code Attr} interfaces that are not of value to the {@code IIOMetadataNode} implementation or specification. Calling such methods on an {@code IIOMetadataNode}, or an {@code Attr} instance returned from an {@code IIOMetadataNode} will result in a {@code DOMException} being thrown.

Constructor:
 public IIOMetadataNode() 
 public IIOMetadataNode(String nodeName) 
    Constructs an IIOMetadataNode with a given node name.
    Parameters:
    nodeName - the name of the node, as a String.
Method from javax.imageio.metadata.IIOMetadataNode Summary:
appendChild,   cloneNode,   compareDocumentPosition,   getAttribute,   getAttributeNS,   getAttributeNode,   getAttributeNodeNS,   getAttributes,   getBaseURI,   getChildNodes,   getElementsByTagName,   getElementsByTagNameNS,   getFeature,   getFirstChild,   getLastChild,   getLength,   getLocalName,   getNamespaceURI,   getNextSibling,   getNodeName,   getNodeType,   getNodeValue,   getOwnerDocument,   getParentNode,   getPrefix,   getPreviousSibling,   getSchemaTypeInfo,   getTagName,   getTextContent,   getUserData,   getUserObject,   hasAttribute,   hasAttributeNS,   hasAttributes,   hasChildNodes,   insertBefore,   isDefaultNamespace,   isEqualNode,   isSameNode,   isSupported,   item,   lookupNamespaceURI,   lookupPrefix,   normalize,   removeAttribute,   removeAttributeNS,   removeAttributeNode,   removeChild,   replaceChild,   setAttribute,   setAttributeNS,   setAttributeNode,   setAttributeNodeNS,   setIdAttribute,   setIdAttributeNS,   setIdAttributeNode,   setNodeValue,   setPrefix,   setTextContent,   setUserData,   setUserObject
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from javax.imageio.metadata.IIOMetadataNode Detail:
 public Node appendChild(Node newChild) 
    Adds the node newChild to the end of the list of children of this node.
 public Node cloneNode(boolean deep) 
    Returns a duplicate of this node. The duplicate node has no parent (getParentNode returns null). If a shallow clone is being performed (deep is false), the new node will not have any children or siblings. If a deep clone is being performed, the new node will form the root of a complete cloned subtree.
 public short compareDocumentPosition(Node other) throws DOMException 
    This DOM Level 3 method is not supported for {@code IIOMetadataNode} and will throw a {@code DOMException}.
 public String getAttribute(String name) 
    Retrieves an attribute value by name.
 public String getAttributeNS(String namespaceURI,
    String localName) 
    Equivalent to getAttribute(localName).
 public Attr getAttributeNode(String name) 
 public Attr getAttributeNodeNS(String namespaceURI,
    String localName) 
    Equivalent to getAttributeNode(localName).
 public NamedNodeMap getAttributes() 
    Returns a NamedNodeMap containing the attributes of this node.
 public String getBaseURI() throws DOMException 
    This DOM Level 3 method is not supported for {@code IIOMetadataNode} and will throw a {@code DOMException}.
 public NodeList getChildNodes() 
    Returns a NodeList that contains all children of this node. If there are no children, this is a NodeList containing no nodes.
 public NodeList getElementsByTagName(String name) 
 public NodeList getElementsByTagNameNS(String namespaceURI,
    String localName) 
    Equivalent to getElementsByTagName(localName).
 public Object getFeature(String feature,
    String version) throws DOMException 
    This DOM Level 3 method is not supported for {@code IIOMetadataNode} and will throw a {@code DOMException}.
 public Node getFirstChild() 
    Returns the first child of this node, or null if the node has no children.
 public Node getLastChild() 
    Returns the last child of this node, or null if the node has no children.
 public int getLength() 
 public String getLocalName() 
    Equivalent to getNodeName.
 public String getNamespaceURI() throws DOMException 
    Returns null, since namespaces are not supported.
 public Node getNextSibling() 
    Returns the next sibling of this node, or null if the node has no next sibling.
 public String getNodeName() 
    Returns the node name associated with this node.
 public short getNodeType() 
    Returns the node type, which is always ELEMENT_NODE.
 public String getNodeValue() 
    Returns the value associated with this node.
 public Document getOwnerDocument() 
    Returns null, since IIOMetadataNodes do not belong to any Document.
 public Node getParentNode() 
    Returns the parent of this node. A null value indicates that the node is the root of its own tree. To add a node to an existing tree, use one of the insertBefore, replaceChild, or appendChild methods.
 public String getPrefix() 
    Returns null, since namespaces are not supported.
 public Node getPreviousSibling() 
    Returns the previous sibling of this node, or null if this node has no previous sibling.
 public TypeInfo getSchemaTypeInfo() throws DOMException 
    This DOM Level 3 method is not supported for {@code IIOMetadataNode} and will throw a {@code DOMException}.
 public String getTagName() 
    Equivalent to getNodeName.
 public String getTextContent() throws DOMException 
    This DOM Level 3 method is not supported for {@code IIOMetadataNode} and will throw a {@code DOMException}.
 public Object getUserData(String key) throws DOMException 
    This DOM Level 3 method is not supported for {@code IIOMetadataNode} and will throw a {@code DOMException}.
 public Object getUserObject() 
    Returns the Object value associated with this node.
 public boolean hasAttribute(String name) 
 public boolean hasAttributeNS(String namespaceURI,
    String localName) 
    Equivalent to hasAttribute(localName).
 public boolean hasAttributes() 
 public boolean hasChildNodes() 
    Returns true if this node has child nodes.
 public Node insertBefore(Node newChild,
    Node refChild) 
    Inserts the node newChild before the existing child node refChild. If refChild is null, insert newChild at the end of the list of children.
 public boolean isDefaultNamespace(String namespaceURI) throws DOMException 
    This DOM Level 3 method is not supported for {@code IIOMetadataNode} and will throw a {@code DOMException}.
 public boolean isEqualNode(Node node) throws DOMException 
    This DOM Level 3 method is not supported for {@code IIOMetadataNode} and will throw a {@code DOMException}.
 public boolean isSameNode(Node node) throws DOMException 
    This DOM Level 3 method is not supported for {@code IIOMetadataNode} and will throw a {@code DOMException}.
 public boolean isSupported(String feature,
    String version) 
    Returns false since DOM features are not supported.
 public Node item(int index) 
 public String lookupNamespaceURI(String prefix) throws DOMException 
    This DOM Level 3 method is not supported for {@code IIOMetadataNode} and will throw a {@code DOMException}.
 public String lookupPrefix(String namespaceURI) throws DOMException 
    This DOM Level 3 method is not supported for {@code IIOMetadataNode} and will throw a {@code DOMException}.
 public  void normalize() 
    Does nothing, since IIOMetadataNodes do not contain Text children.
 public  void removeAttribute(String name) 
 public  void removeAttributeNS(String namespaceURI,
    String localName) 
    Equivalent to removeAttribute(localName).
 public Attr removeAttributeNode(Attr oldAttr) 
 public Node removeChild(Node oldChild) 
    Removes the child node indicated by oldChild from the list of children, and returns it.
 public Node replaceChild(Node newChild,
    Node oldChild) 
    Replaces the child node oldChild with newChild in the list of children, and returns the oldChild node.
 public  void setAttribute(String name,
    String value) 
 public  void setAttributeNS(String namespaceURI,
    String qualifiedName,
    String value) 
    Equivalent to setAttribute(qualifiedName, value).
 public Attr setAttributeNode(Attr newAttr) throws DOMException 
 public Attr setAttributeNodeNS(Attr newAttr) 
    Equivalent to setAttributeNode(newAttr).
 public  void setIdAttribute(String name,
    boolean isId) throws DOMException 
    This DOM Level 3 method is not supported for {@code IIOMetadataNode} and will throw a {@code DOMException}.
 public  void setIdAttributeNS(String namespaceURI,
    String localName,
    boolean isId) throws DOMException 
    This DOM Level 3 method is not supported for {@code IIOMetadataNode} and will throw a {@code DOMException}.
 public  void setIdAttributeNode(Attr idAttr,
    boolean isId) throws DOMException 
    This DOM Level 3 method is not supported for {@code IIOMetadataNode} and will throw a {@code DOMException}.
 public  void setNodeValue(String nodeValue) 
    Sets the String value associated with this node.
 public  void setPrefix(String prefix) 
    Does nothing, since namespaces are not supported.
 public  void setTextContent(String textContent) throws DOMException 
    This DOM Level 3 method is not supported for {@code IIOMetadataNode} and will throw a {@code DOMException}.
 public Object setUserData(String key,
    Object data,
    UserDataHandler handler) throws DOMException 
    This DOM Level 3 method is not supported for {@code IIOMetadataNode} and will throw a {@code DOMException}.
 public  void setUserObject(Object userObject) 
    Sets the value associated with this node.