Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

javax.imageio.metadata
Class IIOMetadataFormatImpl.IIOMetadataNodeAttr  view IIOMetadataFormatImpl.IIOMetadataNodeAttr download IIOMetadataFormatImpl.IIOMetadataNodeAttr.java

java.lang.Object
  extended byjavax.imageio.metadata.IIOMetadataNode
      extended byjavax.imageio.metadata.IIOMetadataFormatImpl.IIOMetadataNodeAttr
All Implemented Interfaces:
org.w3c.dom.Attr, org.w3c.dom.Element, org.w3c.dom.Node, org.w3c.dom.NodeList
Direct Known Subclasses:
IIOMetadataFormatImpl.IIOMetadataNodeAttrBounded, IIOMetadataFormatImpl.IIOMetadataNodeAttrEnumerated, IIOMetadataFormatImpl.IIOMetadataNodeAttrList
Enclosing class:
IIOMetadataFormatImpl

static class IIOMetadataFormatImpl.IIOMetadataNodeAttr
extends IIOMetadataNode
implements org.w3c.dom.Attr


Nested Class Summary
 
Nested classes inherited from class javax.imageio.metadata.IIOMetadataNode
 
Field Summary
protected  int dataType
           
protected  java.lang.String defaultValue
           
protected  java.lang.String name
           
protected  org.w3c.dom.Element owner
           
protected  boolean required
           
 
Fields inherited from class javax.imageio.metadata.IIOMetadataNode
 
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
IIOMetadataFormatImpl.IIOMetadataNodeAttr(org.w3c.dom.Element owner, java.lang.String name, int dataType, boolean required, java.lang.String defaultValue)
           
IIOMetadataFormatImpl.IIOMetadataNodeAttr(org.w3c.dom.Element owner, java.lang.String name, java.lang.String defaultValue)
           
 
Method Summary
 int getDataType()
           
 java.lang.String getName()
          Returns the name of this attribute.
 org.w3c.dom.Element getOwnerElement()
          The Element node this attribute is attached to or null if this attribute is not in use.
 org.w3c.dom.TypeInfo getSchemaTypeInfo()
          The type information associated with this attribute.
 boolean getSpecified()
          True if this attribute was explicitly given a value in the instance document, false otherwise.
 java.lang.String getValue()
          On retrieval, the value of the attribute is returned as a string.
 boolean isId()
          Returns whether this attribute is known to be of type ID (i.e.
 boolean isRequired()
           
 void setValue(java.lang.String value)
          On retrieval, the value of the attribute is returned as a string.
 
Methods inherited from class javax.imageio.metadata.IIOMetadataNode
appendChild, cloneNode, compareDocumentPosition, getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getAttributes, getBaseURI, getChildNodes, getElementsByTagName, getElementsByTagNameNS, getFeature, getFirstChild, getLastChild, getLength, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTagName, getTextContent, getUserData, getUserObject, hasAttribute, hasAttributeNS, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, item, lookupNamespaceURI, lookupPrefix, normalize, removeAttribute, removeAttributeNode, removeAttributeNS, removeChild, replaceChild, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS, setIdAttribute, setIdAttributeNode, setIdAttributeNS, setNodeValue, setPrefix, setTextContent, setUserData, setUserObject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.w3c.dom.Node
appendChild, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData
 

Field Detail

owner

protected org.w3c.dom.Element owner

name

protected java.lang.String name

dataType

protected int dataType

required

protected boolean required

defaultValue

protected java.lang.String defaultValue
Constructor Detail

IIOMetadataFormatImpl.IIOMetadataNodeAttr

public IIOMetadataFormatImpl.IIOMetadataNodeAttr(org.w3c.dom.Element owner,
                                                 java.lang.String name,
                                                 java.lang.String defaultValue)

IIOMetadataFormatImpl.IIOMetadataNodeAttr

public IIOMetadataFormatImpl.IIOMetadataNodeAttr(org.w3c.dom.Element owner,
                                                 java.lang.String name,
                                                 int dataType,
                                                 boolean required,
                                                 java.lang.String defaultValue)
Method Detail

getName

public java.lang.String getName()
Description copied from interface: org.w3c.dom.Attr
Returns the name of this attribute. If Node.localName is different from null, this attribute is a qualified name.

Specified by:
getName in interface org.w3c.dom.Attr

getOwnerElement

public org.w3c.dom.Element getOwnerElement()
Description copied from interface: org.w3c.dom.Attr
The Element node this attribute is attached to or null if this attribute is not in use.

Specified by:
getOwnerElement in interface org.w3c.dom.Attr

getDataType

public int getDataType()

getSchemaTypeInfo

public org.w3c.dom.TypeInfo getSchemaTypeInfo()
Description copied from interface: org.w3c.dom.Attr
The type information associated with this attribute. While the type information contained in this attribute is guarantee to be correct after loading the document or invoking Document.normalizeDocument(), schemaTypeInfo may not be reliable if the node was moved.

Specified by:
getSchemaTypeInfo in interface org.w3c.dom.Attr
Overrides:
getSchemaTypeInfo in class IIOMetadataNode

getSpecified

public boolean getSpecified()
Description copied from interface: org.w3c.dom.Attr
True if this attribute was explicitly given a value in the instance document, false otherwise. If the application changed the value of this attribute node (even if it ends up having the same value as the default value) then it is set to true. The implementation may handle attributes with default values from other schemas similarly but applications should use Document.normalizeDocument() to guarantee this information is up-to-date.

Specified by:
getSpecified in interface org.w3c.dom.Attr

getValue

public java.lang.String getValue()
Description copied from interface: org.w3c.dom.Attr
On retrieval, the value of the attribute is returned as a string. Character and general entity references are replaced with their values. See also the method getAttribute on the Element interface.
On setting, this creates a Text node with the unparsed contents of the string, i.e. any characters that an XML processor would recognize as markup are instead treated as literal text. See also the method Element.setAttribute().
Some specialized implementations, such as some [SVG 1.1] implementations, may do normalization automatically, even after mutation; in such case, the value on retrieval may differ from the value on setting.

Specified by:
getValue in interface org.w3c.dom.Attr

isId

public boolean isId()
Description copied from interface: org.w3c.dom.Attr
Returns whether this attribute is known to be of type ID (i.e. to contain an identifier for its owner element) or not. When it is and its value is unique, the ownerElement of this attribute can be retrieved using the method Document.getElementById . The implementation could use several ways to determine if an attribute node is known to contain an identifier:
  • If validation occurred using an XML Schema [XML Schema Part 1] while loading the document or while invoking Document.normalizeDocument(), the post-schema-validation infoset contributions (PSVI contributions) values are used to determine if this attribute is a schema-determined ID attribute using the schema-determined ID definition in [XPointer] .
  • If validation occurred using a DTD while loading the document or while invoking Document.normalizeDocument(), the infoset [type definition] value is used to determine if this attribute is a DTD-determined ID attribute using the DTD-determined ID definition in [XPointer] .
  • from the use of the methods Element.setIdAttribute(), Element.setIdAttributeNS(), or Element.setIdAttributeNode(), i.e. it is an user-determined ID attribute;

    Note: XPointer framework (see section 3.2 in [XPointer] ) consider the DOM user-determined ID attribute as being part of the XPointer externally-determined ID definition.

  • using mechanisms that are outside the scope of this specification, it is then an externally-determined ID attribute. This includes using schema languages different from XML schema and DTD.

If validation occurred while invoking Document.normalizeDocument(), all user-determined ID attributes are reset and all attribute nodes ID information are then reevaluated in accordance to the schema used. As a consequence, if the Attr.schemaTypeInfo attribute contains an ID type, isId will always return true.

Specified by:
isId in interface org.w3c.dom.Attr

setValue

public void setValue(java.lang.String value)
Description copied from interface: org.w3c.dom.Attr
On retrieval, the value of the attribute is returned as a string. Character and general entity references are replaced with their values. See also the method getAttribute on the Element interface.
On setting, this creates a Text node with the unparsed contents of the string, i.e. any characters that an XML processor would recognize as markup are instead treated as literal text. See also the method Element.setAttribute().
Some specialized implementations, such as some [SVG 1.1] implementations, may do normalization automatically, even after mutation; in such case, the value on retrieval may differ from the value on setting.

Specified by:
setValue in interface org.w3c.dom.Attr

isRequired

public boolean isRequired()