|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.imageio.metadata.IIOMetadataNode
public class IIOMetadataNode
Disabled: no SafeJ information.
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
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(java.lang.String)
,
IIOMetadata.setFromTree(java.lang.String, org.w3c.dom.Node)
,
IIOMetadata.mergeTree(java.lang.String, org.w3c.dom.Node)
Field Summary |
---|
Fields inherited from interface org.w3c.dom.Node |
---|
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE |
Constructor Summary | |
---|---|
IIOMetadataNode()
Constructs an empty IIOMetadataNode . |
|
IIOMetadataNode(String nodeName)
Constructs an IIOMetadataNode with a given node
name. |
Method Summary | |
---|---|
org.w3c.dom.Node |
appendChild(org.w3c.dom.Node newChild)
Adds the node newChild to the end of the list of
children of this node. |
org.w3c.dom.Node |
cloneNode(boolean deep)
Returns a duplicate of this node. |
short |
compareDocumentPosition(org.w3c.dom.Node other)
This DOM Level 3 method is not supported for IIOMetadataNode
and will throw a DOMException . |
String |
getAttribute(String name)
Retrieves an attribute value by name. |
org.w3c.dom.Attr |
getAttributeNode(String name)
|
org.w3c.dom.Attr |
getAttributeNodeNS(String namespaceURI,
String localName)
Equivalent to getAttributeNode(localName) . |
String |
getAttributeNS(String namespaceURI,
String localName)
Equivalent to getAttribute(localName) . |
org.w3c.dom.NamedNodeMap |
getAttributes()
Returns a NamedNodeMap containing the attributes of
this node. |
String |
getBaseURI()
This DOM Level 3 method is not supported for IIOMetadataNode
and will throw a DOMException . |
org.w3c.dom.NodeList |
getChildNodes()
Returns a NodeList that contains all children of this node. |
org.w3c.dom.NodeList |
getElementsByTagName(String name)
|
org.w3c.dom.NodeList |
getElementsByTagNameNS(String namespaceURI,
String localName)
Equivalent to getElementsByTagName(localName) . |
Object |
getFeature(String feature,
String version)
This DOM Level 3 method is not supported for IIOMetadataNode
and will throw a DOMException . |
org.w3c.dom.Node |
getFirstChild()
Returns the first child of this node, or null if
the node has no children. |
org.w3c.dom.Node |
getLastChild()
Returns the last child of this node, or null if
the node has no children. |
int |
getLength()
|
String |
getLocalName()
Equivalent to getNodeName . |
String |
getNamespaceURI()
Returns null , since namespaces are not supported. |
org.w3c.dom.Node |
getNextSibling()
Returns the next sibling of this node, or null if
the node has no next sibling. |
String |
getNodeName()
Returns the node name associated with this node. |
short |
getNodeType()
Returns the node type, which is always ELEMENT_NODE . |
String |
getNodeValue()
Returns the value associated with this node. |
org.w3c.dom.Document |
getOwnerDocument()
Returns null , since IIOMetadataNode s
do not belong to any Document . |
org.w3c.dom.Node |
getParentNode()
Returns the parent of this node. |
String |
getPrefix()
Returns null , since namespaces are not supported. |
org.w3c.dom.Node |
getPreviousSibling()
Returns the previous sibling of this node, or null
if this node has no previous sibling. |
org.w3c.dom.TypeInfo |
getSchemaTypeInfo()
This DOM Level 3 method is not supported for IIOMetadataNode
and will throw a DOMException . |
String |
getTagName()
Equivalent to getNodeName . |
String |
getTextContent()
This DOM Level 3 method is not supported for IIOMetadataNode
and will throw a DOMException . |
Object |
getUserData(String key)
This DOM Level 3 method is not supported for IIOMetadataNode
and will throw a DOMException . |
Object |
getUserObject()
Returns the Object value associated with this node. |
boolean |
hasAttribute(String name)
|
boolean |
hasAttributeNS(String namespaceURI,
String localName)
Equivalent to hasAttribute(localName) . |
boolean |
hasAttributes()
|
boolean |
hasChildNodes()
Returns true if this node has child nodes. |
org.w3c.dom.Node |
insertBefore(org.w3c.dom.Node newChild,
org.w3c.dom.Node refChild)
Inserts the node newChild before the existing
child node refChild . |
boolean |
isDefaultNamespace(String namespaceURI)
This DOM Level 3 method is not supported for IIOMetadataNode
and will throw a DOMException . |
boolean |
isEqualNode(org.w3c.dom.Node node)
This DOM Level 3 method is not supported for IIOMetadataNode
and will throw a DOMException . |
boolean |
isSameNode(org.w3c.dom.Node node)
This DOM Level 3 method is not supported for IIOMetadataNode
and will throw a DOMException . |
boolean |
isSupported(String feature,
String version)
Returns false since DOM features are not
supported. |
org.w3c.dom.Node |
item(int index)
|
String |
lookupNamespaceURI(String prefix)
This DOM Level 3 method is not supported for IIOMetadataNode
and will throw a DOMException . |
String |
lookupPrefix(String namespaceURI)
This DOM Level 3 method is not supported for IIOMetadataNode
and will throw a DOMException . |
void |
normalize()
Does nothing, since IIOMetadataNode s do not
contain Text children. |
void |
removeAttribute(String name)
|
org.w3c.dom.Attr |
removeAttributeNode(org.w3c.dom.Attr oldAttr)
|
void |
removeAttributeNS(String namespaceURI,
String localName)
Equivalent to removeAttribute(localName) . |
org.w3c.dom.Node |
removeChild(org.w3c.dom.Node oldChild)
Removes the child node indicated by oldChild from
the list of children, and returns it. |
org.w3c.dom.Node |
replaceChild(org.w3c.dom.Node newChild,
org.w3c.dom.Node oldChild)
Replaces the child node oldChild with
newChild in the list of children, and returns the
oldChild node. |
void |
setAttribute(String name,
String value)
|
org.w3c.dom.Attr |
setAttributeNode(org.w3c.dom.Attr newAttr)
|
org.w3c.dom.Attr |
setAttributeNodeNS(org.w3c.dom.Attr newAttr)
Equivalent to setAttributeNode(newAttr) . |
void |
setAttributeNS(String namespaceURI,
String qualifiedName,
String value)
Equivalent to setAttribute(qualifiedName, value) . |
void |
setIdAttribute(String name,
boolean isId)
This DOM Level 3 method is not supported for IIOMetadataNode
and will throw a DOMException . |
void |
setIdAttributeNode(org.w3c.dom.Attr idAttr,
boolean isId)
This DOM Level 3 method is not supported for IIOMetadataNode
and will throw a DOMException . |
void |
setIdAttributeNS(String namespaceURI,
String localName,
boolean isId)
This DOM Level 3 method is not supported for IIOMetadataNode
and will throw a DOMException . |
void |
setNodeValue(String nodeValue)
Sets the String value associated with this node. |
void |
setPrefix(String prefix)
Does nothing, since namespaces are not supported. |
void |
setTextContent(String textContent)
This DOM Level 3 method is not supported for IIOMetadataNode
and will throw a DOMException . |
Object |
setUserData(String key,
Object data,
org.w3c.dom.UserDataHandler handler)
This DOM Level 3 method is not supported for IIOMetadataNode
and will throw a DOMException . |
void |
setUserObject(Object userObject)
Sets the value associated with this node. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public IIOMetadataNode()
IIOMetadataNode
.
public IIOMetadataNode(String nodeName)
IIOMetadataNode
with a given node
name.
nodeName
- the name of the node, as a String
.Method Detail |
---|
public String getNodeName()
getNodeName
in interface org.w3c.dom.Node
String
.public String getNodeValue()
getNodeValue
in interface org.w3c.dom.Node
String
.public void setNodeValue(String nodeValue)
String
value associated with this node.
setNodeValue
in interface org.w3c.dom.Node
public short getNodeType()
ELEMENT_NODE
.
getNodeType
in interface org.w3c.dom.Node
short
value ELEMENT_NODE
.public org.w3c.dom.Node getParentNode()
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.
getParentNode
in interface org.w3c.dom.Node
Node
.insertBefore(org.w3c.dom.Node, org.w3c.dom.Node)
,
replaceChild(org.w3c.dom.Node, org.w3c.dom.Node)
,
appendChild(org.w3c.dom.Node)
public org.w3c.dom.NodeList getChildNodes()
NodeList
that contains all children of this node.
If there are no children, this is a NodeList
containing
no nodes.
getChildNodes
in interface org.w3c.dom.Node
NodeList
public org.w3c.dom.Node getFirstChild()
null
if
the node has no children.
getFirstChild
in interface org.w3c.dom.Node
Node
, or
null
public org.w3c.dom.Node getLastChild()
null
if
the node has no children.
getLastChild
in interface org.w3c.dom.Node
Node
, or
null
.public org.w3c.dom.Node getPreviousSibling()
null
if this node has no previous sibling.
getPreviousSibling
in interface org.w3c.dom.Node
Node
, or
null
.public org.w3c.dom.Node getNextSibling()
null
if
the node has no next sibling.
getNextSibling
in interface org.w3c.dom.Node
Node
, or
null
.public org.w3c.dom.NamedNodeMap getAttributes()
NamedNodeMap
containing the attributes of
this node.
getAttributes
in interface org.w3c.dom.Node
NamedNodeMap
containing the attributes of
this node.public org.w3c.dom.Document getOwnerDocument()
null
, since IIOMetadataNode
s
do not belong to any Document
.
getOwnerDocument
in interface org.w3c.dom.Node
null
.public org.w3c.dom.Node insertBefore(org.w3c.dom.Node newChild, org.w3c.dom.Node refChild)
newChild
before the existing
child node refChild
. If refChild
is
null
, insert newChild
at the end of
the list of children.
insertBefore
in interface org.w3c.dom.Node
newChild
- the Node
to insert.refChild
- the reference Node
.
IllegalArgumentException
- if newChild
is
null
.public org.w3c.dom.Node replaceChild(org.w3c.dom.Node newChild, org.w3c.dom.Node oldChild)
oldChild
with
newChild
in the list of children, and returns the
oldChild
node.
replaceChild
in interface org.w3c.dom.Node
newChild
- the Node
to insert.oldChild
- the Node
to be replaced.
IllegalArgumentException
- if newChild
is
null
.public org.w3c.dom.Node removeChild(org.w3c.dom.Node oldChild)
oldChild
from
the list of children, and returns it.
removeChild
in interface org.w3c.dom.Node
oldChild
- the Node
to be removed.
IllegalArgumentException
- if oldChild
is
null
.public org.w3c.dom.Node appendChild(org.w3c.dom.Node newChild)
newChild
to the end of the list of
children of this node.
appendChild
in interface org.w3c.dom.Node
newChild
- the Node
to insert.
IllegalArgumentException
- if newChild
is
null
.public boolean hasChildNodes()
true
if this node has child nodes.
hasChildNodes
in interface org.w3c.dom.Node
true
if this node has children.public org.w3c.dom.Node cloneNode(boolean deep)
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.
cloneNode
in interface org.w3c.dom.Node
deep
- if true
, recursively clone the subtree
under the specified node; if false
, clone only the
node itself.
public void normalize()
IIOMetadataNode
s do not
contain Text
children.
normalize
in interface org.w3c.dom.Node
public boolean isSupported(String feature, String version)
false
since DOM features are not
supported.
isSupported
in interface org.w3c.dom.Node
feature
- a String
, which is ignored.version
- a String
, which is ignored.
false
.public String getNamespaceURI() throws org.w3c.dom.DOMException
null
, since namespaces are not supported.
getNamespaceURI
in interface org.w3c.dom.Node
org.w3c.dom.DOMException
public String getPrefix()
null
, since namespaces are not supported.
getPrefix
in interface org.w3c.dom.Node
null
.setPrefix(java.lang.String)
public void setPrefix(String prefix)
setPrefix
in interface org.w3c.dom.Node
prefix
- a String
, which is ignored.getPrefix()
public String getLocalName()
getNodeName
.
getLocalName
in interface org.w3c.dom.Node
String
.public String getTagName()
getNodeName
.
getTagName
in interface org.w3c.dom.Element
String
public String getAttribute(String name)
getAttribute
in interface org.w3c.dom.Element
name
- The name of the attribute to retrieve.
Attr
value as a string, or the empty string
if that attribute does not have a specified or default value.public String getAttributeNS(String namespaceURI, String localName)
getAttribute(localName)
.
getAttributeNS
in interface org.w3c.dom.Element
setAttributeNS(java.lang.String, java.lang.String, java.lang.String)
public void setAttribute(String name, String value)
setAttribute
in interface org.w3c.dom.Element
public void setAttributeNS(String namespaceURI, String qualifiedName, String value)
setAttribute(qualifiedName, value)
.
setAttributeNS
in interface org.w3c.dom.Element
getAttributeNS(java.lang.String, java.lang.String)
public void removeAttribute(String name)
removeAttribute
in interface org.w3c.dom.Element
public void removeAttributeNS(String namespaceURI, String localName)
removeAttribute(localName)
.
removeAttributeNS
in interface org.w3c.dom.Element
public org.w3c.dom.Attr getAttributeNode(String name)
getAttributeNode
in interface org.w3c.dom.Element
public org.w3c.dom.Attr getAttributeNodeNS(String namespaceURI, String localName)
getAttributeNode(localName)
.
getAttributeNodeNS
in interface org.w3c.dom.Element
setAttributeNodeNS(org.w3c.dom.Attr)
public org.w3c.dom.Attr setAttributeNode(org.w3c.dom.Attr newAttr) throws org.w3c.dom.DOMException
setAttributeNode
in interface org.w3c.dom.Element
org.w3c.dom.DOMException
public org.w3c.dom.Attr setAttributeNodeNS(org.w3c.dom.Attr newAttr)
setAttributeNode(newAttr)
.
setAttributeNodeNS
in interface org.w3c.dom.Element
getAttributeNodeNS(java.lang.String, java.lang.String)
public org.w3c.dom.Attr removeAttributeNode(org.w3c.dom.Attr oldAttr)
removeAttributeNode
in interface org.w3c.dom.Element
public org.w3c.dom.NodeList getElementsByTagName(String name)
getElementsByTagName
in interface org.w3c.dom.Element
public org.w3c.dom.NodeList getElementsByTagNameNS(String namespaceURI, String localName)
getElementsByTagName(localName)
.
getElementsByTagNameNS
in interface org.w3c.dom.Element
public boolean hasAttributes()
hasAttributes
in interface org.w3c.dom.Node
public boolean hasAttribute(String name)
hasAttribute
in interface org.w3c.dom.Element
public boolean hasAttributeNS(String namespaceURI, String localName)
hasAttribute(localName)
.
hasAttributeNS
in interface org.w3c.dom.Element
public int getLength()
getLength
in interface org.w3c.dom.NodeList
public org.w3c.dom.Node item(int index)
item
in interface org.w3c.dom.NodeList
public Object getUserObject()
Object
value associated with this node.
Object
.setUserObject(java.lang.Object)
public void setUserObject(Object userObject)
userObject
- the user Object
.getUserObject()
public void setIdAttribute(String name, boolean isId) throws org.w3c.dom.DOMException
IIOMetadataNode
and will throw a DOMException
.
setIdAttribute
in interface org.w3c.dom.Element
org.w3c.dom.DOMException
- - always.public void setIdAttributeNS(String namespaceURI, String localName, boolean isId) throws org.w3c.dom.DOMException
IIOMetadataNode
and will throw a DOMException
.
setIdAttributeNS
in interface org.w3c.dom.Element
org.w3c.dom.DOMException
- - always.public void setIdAttributeNode(org.w3c.dom.Attr idAttr, boolean isId) throws org.w3c.dom.DOMException
IIOMetadataNode
and will throw a DOMException
.
setIdAttributeNode
in interface org.w3c.dom.Element
org.w3c.dom.DOMException
- - always.public org.w3c.dom.TypeInfo getSchemaTypeInfo() throws org.w3c.dom.DOMException
IIOMetadataNode
and will throw a DOMException
.
getSchemaTypeInfo
in interface org.w3c.dom.Element
org.w3c.dom.DOMException
- - always.public Object setUserData(String key, Object data, org.w3c.dom.UserDataHandler handler) throws org.w3c.dom.DOMException
IIOMetadataNode
and will throw a DOMException
.
setUserData
in interface org.w3c.dom.Node
org.w3c.dom.DOMException
- - always.public Object getUserData(String key) throws org.w3c.dom.DOMException
IIOMetadataNode
and will throw a DOMException
.
getUserData
in interface org.w3c.dom.Node
org.w3c.dom.DOMException
- - always.public Object getFeature(String feature, String version) throws org.w3c.dom.DOMException
IIOMetadataNode
and will throw a DOMException
.
getFeature
in interface org.w3c.dom.Node
org.w3c.dom.DOMException
- - always.public boolean isSameNode(org.w3c.dom.Node node) throws org.w3c.dom.DOMException
IIOMetadataNode
and will throw a DOMException
.
isSameNode
in interface org.w3c.dom.Node
org.w3c.dom.DOMException
- - always.public boolean isEqualNode(org.w3c.dom.Node node) throws org.w3c.dom.DOMException
IIOMetadataNode
and will throw a DOMException
.
isEqualNode
in interface org.w3c.dom.Node
org.w3c.dom.DOMException
- - always.public String lookupNamespaceURI(String prefix) throws org.w3c.dom.DOMException
IIOMetadataNode
and will throw a DOMException
.
lookupNamespaceURI
in interface org.w3c.dom.Node
org.w3c.dom.DOMException
- - always.public boolean isDefaultNamespace(String namespaceURI) throws org.w3c.dom.DOMException
IIOMetadataNode
and will throw a DOMException
.
isDefaultNamespace
in interface org.w3c.dom.Node
org.w3c.dom.DOMException
- - always.public String lookupPrefix(String namespaceURI) throws org.w3c.dom.DOMException
IIOMetadataNode
and will throw a DOMException
.
lookupPrefix
in interface org.w3c.dom.Node
org.w3c.dom.DOMException
- - always.public String getTextContent() throws org.w3c.dom.DOMException
IIOMetadataNode
and will throw a DOMException
.
getTextContent
in interface org.w3c.dom.Node
org.w3c.dom.DOMException
- - always.public void setTextContent(String textContent) throws org.w3c.dom.DOMException
IIOMetadataNode
and will throw a DOMException
.
setTextContent
in interface org.w3c.dom.Node
org.w3c.dom.DOMException
- - always.public short compareDocumentPosition(org.w3c.dom.Node other) throws org.w3c.dom.DOMException
IIOMetadataNode
and will throw a DOMException
.
compareDocumentPosition
in interface org.w3c.dom.Node
org.w3c.dom.DOMException
- - always.public String getBaseURI() throws org.w3c.dom.DOMException
IIOMetadataNode
and will throw a DOMException
.
getBaseURI
in interface org.w3c.dom.Node
org.w3c.dom.DOMException
- - always.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |