java.lang.ObjectAn abstract class to be extended by objects that represent metadata (non-image data) associated with images and streams. Plug-ins represent metadata using opaque, plug-in specific objects. These objects, however, provide the ability to access their internal information as a tree ofjavax.imageio.metadata.IIOMetadata
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 transfering
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.Field Summary | ||
---|---|---|
protected boolean | standardFormatSupported | A boolean indicating whether the concrete subclass supports the standard metadata format, set via the constructor. |
protected String | nativeMetadataFormatName | The name of the native metadata format for this object,
initialized to null and set via the constructor. |
protected String | nativeMetadataFormatClassName | The name of the class implementing IIOMetadataFormat
and representing the native metadata format, initialized to
null and set via the constructor. |
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 null and set via the constructor. |
protected String[] | extraMetadataFormatClassNames | An array of names of classes implementing IIOMetadataFormat
and representing the metadata formats, other than the standard and
native formats, that are supported by this plug-in,
initialized to null and set via the constructor. |
protected IIOMetadataController | defaultController | An IIOMetadataController that is suggested for use
as the controller for this IIOMetadata object. It
may be retrieved via getDefaultController . To
install the default controller, call
setController(getDefaultController()) . This
instance variable should be set by subclasses that choose to
provide their own default controller, usually a GUI, for
setting parameters. |
protected IIOMetadataController | controller | The IIOMetadataController that will be
used to provide settings for this IIOMetadata
object when the activateController method
is called. This value overrides any default controller,
even when null . |
Constructor: |
---|
IIOMetadata object. The
subclass is responsible for suppying values for all protected
instance variables that will allow any non-overridden default
implemtations of methods to satisfy their contracts. For example,
extraMetadataFormatNames should not have length 0. |
IIOMetadata object with the given
format names and format class names, as well as a boolean
indicating whether the standard format is supported.
This constructor does not attempt to check the class names
for validity. Invalid class names may cause exceptions in
subsequent calls to
|
Methods from java.lang.Object: |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method from javax.imageio.metadata.IIOMetadata Detail: |
---|
IIOMetadataController for
this IIOMetadata object and returns the resulting
value. When this method returns true , all values for this
IIOMetadata object will be ready for the next write
operation. If false is
returned, no settings in this object will have been disturbed
(i.e., the user canceled the operation).
Ordinarily, the controller will be a GUI providing a user
interface for a subclass of The default implementation calls |
Node object that represents the
root of a tree of metadata contained within this object
according to the conventions defined by a given metadata
format.
The names of the available metadata formats may be queried
using the |
IIOMetadataController is currently
installed. This could be the default if there is one,
null , or the argument of the most recent call
to setController .
The default implementation returns the value of the
|
IIOMetadataController , if there
is one, regardless of the currently installed controller. If
there is no default controller, returns null .
The default implementation returns the value of the
|
String s containing the names
of additional metadata formats, other than the native and standard
formats, recognized by this plug-in's
getAsTree , setFromTree , and
mergeTree methods. If there are no such additional
formats, null is returned.
The default implementation returns a clone of the
|
IIOMetadataFormat object describing the
given metadata format, or null if no description
is available. The supplied name must be one of those returned
by getMetadataFormatNames (i.e., either the
native format name, the standard format name, or one of those
returned by getExtraMetadataFormatNames ).
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
|
String s containing the names
of all metadata formats, including the native and standard
formats, recognized by this plug-in's getAsTree ,
setFromTree , and mergeTree methods.
If there are no such formats, null is returned.
The default implementation calls
|
null will be returned.
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
|
IIOMetadataNode representing the chroma
information of the standard javax_imageio_1.0
metadata format, or null if no such information is
available. This method is intended to be called by the utility
routine getStandardTree .
The default implementation returns Subclasses should override this method to produce an appropriate subtree if they wish to support the standard metadata format. |
IIOMetadataNode representing the
compression information of the standard
javax_imageio_1.0 metadata format, or
null if no such information is available. This
method is intended to be called by the utility routine
getStandardTree .
The default implementation returns Subclasses should override this method to produce an appropriate subtree if they wish to support the standard metadata format. |
IIOMetadataNode representing the data
format information of the standard
javax_imageio_1.0 metadata format, or
null if no such information is available. This
method is intended to be called by the utility routine
getStandardTree .
The default implementation returns Subclasses should override this method to produce an appropriate subtree if they wish to support the standard metadata format. |
IIOMetadataNode representing the
dimension information of the standard
javax_imageio_1.0 metadata format, or
null if no such information is available. This
method is intended to be called by the utility routine
getStandardTree .
The default implementation returns Subclasses should override this method to produce an appropriate subtree if they wish to support the standard metadata format. |
IIOMetadataNode representing the document
information of the standard javax_imageio_1.0
metadata format, or null if no such information is
available. This method is intended to be called by the utility
routine getStandardTree .
The default implementation returns Subclasses should override this method to produce an appropriate subtree if they wish to support the standard metadata format. |
IIOMetadataNode representing the textual
information of the standard javax_imageio_1.0
metadata format, or null if no such information is
available. This method is intended to be called by the utility
routine getStandardTree .
The default implementation returns Subclasses should override this method to produce an appropriate subtree if they wish to support the standard metadata format. |
IIOMetadataNode representing the tiling
information of the standard javax_imageio_1.0
metadata format, or null if no such information is
available. This method is intended to be called by the utility
routine getStandardTree .
The default implementation returns Subclasses should override this method to produce an appropriate subtree if they wish to support the standard metadata format. |
IIOMetadataNode representing the
transparency information of the standard
javax_imageio_1.0 metadata format, or
null if no such information is available. This
method is intended to be called by the utility routine
getStandardTree .
The default implementation returns Subclasses should override this method to produce an appropriate subtree if they wish to support the standard metadata format. |
IIOMetadataNode s representing the metadata
contained within this object according to the conventions of
the standard javax_imageio_1.0 metadata format.
This method calls the various |
true if there is a controller installed
for this IIOMetadata object.
The default implementation returns |
true if this object does not support the
mergeTree , setFromTree , and
reset methods. |
true if the standard metadata format is
supported by getMetadataFormat ,
getAsTree , setFromTree , and
mergeTree .
The default implementation returns the value of the
|
IIOMetadata
object from a tree of XML DOM Node s whose syntax
is defined by the given metadata format. The previous state is
altered only as necessary to accomodate the nodes that are
present in the given tree. If the tree structure or contents
are invalid, an IIOInvalidTreeException will be
thrown.
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. |
|
IIOMetadataController to be used
to provide settings for this IIOMetadata
object when the activateController method
is called, overriding any default controller. If the
argument is null , no controller will be
used, including any default. To restore the default, use
setController(getDefaultController()) .
The default implementation sets the |
IIOMetadata object
from a tree of XML DOM Node s whose syntax is
defined by the given metadata format. The previous state is
discarded. If the tree's structure or contents are invalid, an
IIOInvalidTreeException will be thrown.
The default implementation calls |