IIOMetadataNode objects that
support the XML DOM interfaces as well as additional interfaces for
storing non-textual data and retrieving information about legal
data values. The format of such trees is plug-in dependent, but
plug-ins may choose to support a plug-in neutral format described
below. A single plug-in may support multiple metadata formats,
whose names maybe determined by calling
getMetadataFormatNames. The plug-in may also support
a single special format, referred to as the "native" format, which
is designed to encode its metadata losslessly. This format will
typically be designed specifically to work with a specific file
format, so that images may be loaded and saved in the same format
with no loss of metadata, but may be less useful for transferring
metadata between an ImageReader and an
ImageWriter for different image formats. To convert
between two native formats as losslessly as the image file formats
will allow, an ImageTranscoder object must be used.
javax.imageio.ImageReader#getImageMetadata , javax.imageio.ImageReader#getStreamMetadata , javax.imageio.ImageReader#readAll , javax.imageio.ImageWriter#getDefaultStreamMetadata , javax.imageio.ImageWriter#getDefaultImageMetadata , javax.imageio.ImageWriter#write , javax.imageio.ImageWriter#convertImageMetadata , javax.imageio.ImageWriter#convertStreamMetadata , javax.imageio.IIOImage , javax.imageio.ImageTranscoder
| Modifier and Type | Field and Description |
|---|---|
| protected IIOMetadataController | controller
The |
| protected IIOMetadataController | defaultController
An |
| protected String[] | extraMetadataFormatClassNames
An array of names of classes implementing |
| protected String[] | extraMetadataFormatNames
An array of names of formats, other than the standard and
native formats, that are supported by this plug-in,
initialized to |
| protected String | nativeMetadataFormatClassName
The name of the class implementing |
| protected String | nativeMetadataFormatName
The name of the native metadata format for this object,
initialized to |
| protected boolean | standardFormatSupported
A boolean indicating whether the concrete subclass supports the standard metadata format, set via the constructor. |
| Access | Constructor and Description |
|---|---|
| protected | |
| protected | IIOMetadata(boolean
true if
this object can return or accept a DOM tree using the standard
metadata format.the name of the native metadata
format, as a nativeMetadataFormatName, String String, or null if there
is no native format.the name of the class of
the native metadata format, or nativeMetadataFormatClassName, String[] null if there is
no native format.an array of extraMetadataFormatNames, String[] Strings
indicating additional formats supported by this object, or
null if there are none.an array of extraMetadataFormatClassNames)Strings
indicating the class names of any additional formats supported by
this object, or null if there are none.Constructs an |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | Returns: true if the controller completed normally.Activates the installed |
| private void | append(IIOMetadataNode root, IIOMetadataNode node)
Appends a new node to an existing node, if the new node is
non- |
| public abstract Node | |
| public IIOMetadataController | Returns: the currently installedIIOMetadataController, or null.Returns whatever |
| public IIOMetadataController | Returns: the defaultIIOMetadataController, or
null.Returns the default |
| public String[] | Returns: an array ofStrings with length at least
1, or null.Returns an array of |
| public IIOMetadataFormat | Returns: anIIOMetadataFormat object.the desired metadata format. formatName)Returns an |
| private Class | |
| public String[] | Returns: an array ofStrings.Returns an array of |
| public String | Returns: the name of the native format, ornull.Returns the name of the "native" metadata format for this
plug-in, which typically allows for lossless encoding and
transmission of the metadata stored in the format handled by
this plug-in. If no such format is supported,
|
| protected IIOMetadataNode | Returns: anIIOMetadataNode, or null.Returns an |
| protected IIOMetadataNode | Returns: anIIOMetadataNode, or null.Returns an |
| protected IIOMetadataNode | Returns: anIIOMetadataNode, or null.Returns an |
| protected IIOMetadataNode | Returns: anIIOMetadataNode, or null.Returns an |
| protected IIOMetadataNode | Returns: anIIOMetadataNode, or null.Returns an |
| protected IIOMetadataNode | Returns: anIIOMetadataNode, or null.Returns an |
| protected IIOMetadataNode | Returns: anIIOMetadataNode, or null.Returns an |
| protected IIOMetadataNode | Returns: anIIOMetadataNode, or null.Returns an |
| protected final IIOMetadataNode | Returns: anIIOMetadataNode representing the root
of a metadata tree in the javax_imageio_1.0
format.A utility method to return a tree of
|
| public boolean | Returns: true if a controller is installed.Returns |
| public abstract boolean | Returns: true if thisIIOMetadata object cannot be
modified.Returns |
| public boolean | Returns: true if the standard metadata format
is supported.Returns |
| public abstract void | |
| public abstract void | reset()
Resets all the data stored in this object to default values, usually to the state this object was in immediately after construction, though the precise semantics are plug-in specific. |
| public void | setController(IIOMetadataController
An appropriate
controller)IIOMetadataController, or null.Sets the |
| public void | setFromTree(String
the desired metadata format. formatName, Node an XML DOM root)Node object forming the
root of a tree.Sets the internal state of this |
| controller | back to summary |
|---|---|
| protected IIOMetadataController controller The | |
| defaultController | back to summary |
|---|---|
| protected IIOMetadataController defaultController An
| |
| extraMetadataFormatClassNames | back to summary |
|---|---|
| protected String[] extraMetadataFormatClassNames An array of names of classes implementing | |
| extraMetadataFormatNames | back to summary |
|---|---|
| protected String[] extraMetadataFormatNames An array of names of formats, other than the standard and
native formats, that are supported by this plug-in,
initialized to | |
| nativeMetadataFormatClassName | back to summary |
|---|---|
| protected String nativeMetadataFormatClassName The name of the class implementing | |
| nativeMetadataFormatName | back to summary |
|---|---|
| protected String nativeMetadataFormatName The name of the native metadata format for this object,
initialized to | |
| standardFormatSupported | back to summary |
|---|---|
| protected boolean standardFormatSupported A boolean indicating whether the concrete subclass supports the standard metadata format, set via the constructor. | |
| IIOMetadata | back to summary |
|---|---|
| protected IIOMetadata() Constructs an empty | |
| IIOMetadata | back to summary |
|---|---|
| protected IIOMetadata(boolean standardMetadataFormatSupported, String nativeMetadataFormatName, String nativeMetadataFormatClassName, String[] extraMetadataFormatNames, String[] extraMetadataFormatClassNames) Constructs an This constructor does not attempt to check the class names
for validity. Invalid class names may cause exceptions in
subsequent calls to
| |
| activateController | back to summary |
|---|---|
| public boolean activateController() Activates the installed Ordinarily, the controller will be a GUI providing a user
interface for a subclass of The default implementation calls
| |
| append | back to summary |
|---|---|
| private void append(IIOMetadataNode root, IIOMetadataNode node) Appends a new node to an existing node, if the new node is
non- | |
| getAsTree | back to summary |
|---|---|
| public abstract Node getAsTree(String formatName) Returns an XML DOM The names of the available metadata formats may be queried
using the
| |
| getController | back to summary |
|---|---|
| public IIOMetadataController getController() Returns whatever The default implementation returns the value of the
| |
| getDefaultController | back to summary |
|---|---|
| public IIOMetadataController getDefaultController() Returns the default The default implementation returns the value of the
| |
| getExtraMetadataFormatNames | back to summary |
|---|---|
| public String[] getExtraMetadataFormatNames() Returns an array of The default implementation returns a clone of the
| |
| getMetadataFormat | back to summary |
|---|---|
| public IIOMetadataFormat getMetadataFormat(String formatName) Returns an The default implementation checks the name against the
global standard metadata format name, and returns that format
if it is supported. Otherwise, it checks against the native
format names followed by any additional format names. If a
match is found, it retrieves the name of the
| |
| getMetadataFormatClass | back to summary |
|---|---|
| private Class | |
| getMetadataFormatNames | back to summary |
|---|---|
| public String[] getMetadataFormatNames() Returns an array of The default implementation calls
| |
| getNativeMetadataFormatName | back to summary |
|---|---|
| public String getNativeMetadataFormatName() Returns the name of the "native" metadata format for this
plug-in, which typically allows for lossless encoding and
transmission of the metadata stored in the format handled by
this plug-in. If no such format is supported,
The structure and contents of the "native" metadata format
are defined by the plug-in that created this
The default implementation returns the value of the
| |
| getStandardChromaNode | back to summary |
|---|---|
| protected IIOMetadataNode getStandardChromaNode() Returns an The default implementation returns Subclasses should override this method to produce an appropriate subtree if they wish to support the standard metadata format.
| |
| getStandardCompressionNode | back to summary |
|---|---|
| protected IIOMetadataNode getStandardCompressionNode() Returns an The default implementation returns Subclasses should override this method to produce an appropriate subtree if they wish to support the standard metadata format.
| |
| getStandardDataNode | back to summary |
|---|---|
| protected IIOMetadataNode getStandardDataNode() Returns an The default implementation returns Subclasses should override this method to produce an appropriate subtree if they wish to support the standard metadata format.
| |
| getStandardDimensionNode | back to summary |
|---|---|
| protected IIOMetadataNode getStandardDimensionNode() Returns an The default implementation returns Subclasses should override this method to produce an appropriate subtree if they wish to support the standard metadata format.
| |
| getStandardDocumentNode | back to summary |
|---|---|
| protected IIOMetadataNode getStandardDocumentNode() Returns an The default implementation returns Subclasses should override this method to produce an appropriate subtree if they wish to support the standard metadata format.
| |
| getStandardTextNode | back to summary |
|---|---|
| protected IIOMetadataNode getStandardTextNode() Returns an The default implementation returns Subclasses should override this method to produce an appropriate subtree if they wish to support the standard metadata format.
| |
| getStandardTileNode | back to summary |
|---|---|
| protected IIOMetadataNode getStandardTileNode() Returns an The default implementation returns Subclasses should override this method to produce an appropriate subtree if they wish to support the standard metadata format.
| |
| getStandardTransparencyNode | back to summary |
|---|---|
| protected IIOMetadataNode getStandardTransparencyNode() Returns an The default implementation returns Subclasses should override this method to produce an appropriate subtree if they wish to support the standard metadata format.
| |
| getStandardTree | back to summary |
|---|---|
| protected final IIOMetadataNode getStandardTree() A utility method to return a tree of
This method calls the various
| |
| hasController | back to summary |
|---|---|
| public boolean hasController() Returns The default implementation returns
| |
| isReadOnly | back to summary |
|---|---|
| public abstract boolean isReadOnly() Returns
| |
| isStandardMetadataFormatSupported | back to summary |
|---|---|
| public boolean isStandardMetadataFormatSupported() Returns The default implementation returns the value of the
| |
| mergeTree | back to summary |
|---|---|
| public abstract void mergeTree(String formatName, Node root) throws IIOInvalidTreeException Alters the internal state of this As the semantics of how a tree or subtree may be merged with another tree are completely format-specific, plug-in authors may implement this method in whatever manner is most appropriate for the format, including simply replacing all existing state with the contents of the given tree.
| |
| reset | back to summary |
|---|---|
| public abstract void reset() Resets all the data stored in this object to default values, usually to the state this object was in immediately after construction, though the precise semantics are plug-in specific. Note that there are many possible default values, depending on how the object was created.
| |
| setController | back to summary |
|---|---|
| public void setController(IIOMetadataController controller) Sets the The default implementation sets the
| |
| setFromTree | back to summary |
|---|---|
| public void setFromTree(String formatName, Node root) throws IIOInvalidTreeException Sets the internal state of this The default implementation calls
| |