javax.imageio.metadata
Class IIOMetadata

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by javax.imageio.metadata.IIOMetadata

public abstract class IIOMetadata
extends Object sample code for java.lang.Object definition code for java.lang.Object

An 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 of 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.

See Also:
ImageReader.getImageMetadata(int) sample code for javax.imageio.ImageReader.getImageMetadata(int) definition code for javax.imageio.ImageReader.getImageMetadata(int) , ImageReader.getStreamMetadata() sample code for javax.imageio.ImageReader.getStreamMetadata() definition code for javax.imageio.ImageReader.getStreamMetadata() , ImageReader.readAll(int, javax.imageio.ImageReadParam) sample code for javax.imageio.ImageReader.readAll(int, javax.imageio.ImageReadParam) definition code for javax.imageio.ImageReader.readAll(int, javax.imageio.ImageReadParam) , ImageWriter.getDefaultStreamMetadata(javax.imageio.ImageWriteParam) sample code for javax.imageio.ImageWriter.getDefaultStreamMetadata(javax.imageio.ImageWriteParam) definition code for javax.imageio.ImageWriter.getDefaultStreamMetadata(javax.imageio.ImageWriteParam) , ImageWriter.getDefaultImageMetadata(javax.imageio.ImageTypeSpecifier, javax.imageio.ImageWriteParam) sample code for javax.imageio.ImageWriter.getDefaultImageMetadata(javax.imageio.ImageTypeSpecifier, javax.imageio.ImageWriteParam) definition code for javax.imageio.ImageWriter.getDefaultImageMetadata(javax.imageio.ImageTypeSpecifier, javax.imageio.ImageWriteParam) , ImageWriter.write(javax.imageio.metadata.IIOMetadata, javax.imageio.IIOImage, javax.imageio.ImageWriteParam) sample code for javax.imageio.ImageWriter.write(javax.imageio.metadata.IIOMetadata, javax.imageio.IIOImage, javax.imageio.ImageWriteParam) definition code for javax.imageio.ImageWriter.write(javax.imageio.metadata.IIOMetadata, javax.imageio.IIOImage, javax.imageio.ImageWriteParam) , ImageWriter.convertImageMetadata(javax.imageio.metadata.IIOMetadata, javax.imageio.ImageTypeSpecifier, javax.imageio.ImageWriteParam) sample code for javax.imageio.ImageWriter.convertImageMetadata(javax.imageio.metadata.IIOMetadata, javax.imageio.ImageTypeSpecifier, javax.imageio.ImageWriteParam) definition code for javax.imageio.ImageWriter.convertImageMetadata(javax.imageio.metadata.IIOMetadata, javax.imageio.ImageTypeSpecifier, javax.imageio.ImageWriteParam) , ImageWriter.convertStreamMetadata(javax.imageio.metadata.IIOMetadata, javax.imageio.ImageWriteParam) sample code for javax.imageio.ImageWriter.convertStreamMetadata(javax.imageio.metadata.IIOMetadata, javax.imageio.ImageWriteParam) definition code for javax.imageio.ImageWriter.convertStreamMetadata(javax.imageio.metadata.IIOMetadata, javax.imageio.ImageWriteParam) , IIOImage sample code for javax.imageio.IIOImage definition code for javax.imageio.IIOImage , ImageTranscoder sample code for javax.imageio.ImageTranscoder definition code for javax.imageio.ImageTranscoder

Field Summary
protected  IIOMetadataController sample code for javax.imageio.metadata.IIOMetadataController definition code for javax.imageio.metadata.IIOMetadataController controller sample code for javax.imageio.metadata.IIOMetadata.controller definition code for javax.imageio.metadata.IIOMetadata.controller
          The IIOMetadataController that will be used to provide settings for this IIOMetadata object when the activateController method is called.
protected  IIOMetadataController sample code for javax.imageio.metadata.IIOMetadataController definition code for javax.imageio.metadata.IIOMetadataController defaultController sample code for javax.imageio.metadata.IIOMetadata.defaultController definition code for javax.imageio.metadata.IIOMetadata.defaultController
          An IIOMetadataController that is suggested for use as the controller for this IIOMetadata object.
protected  String sample code for java.lang.String definition code for java.lang.String [] extraMetadataFormatClassNames sample code for javax.imageio.metadata.IIOMetadata.extraMetadataFormatClassNames definition code for javax.imageio.metadata.IIOMetadata.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  String sample code for java.lang.String definition code for java.lang.String [] extraMetadataFormatNames sample code for javax.imageio.metadata.IIOMetadata.extraMetadataFormatNames definition code for javax.imageio.metadata.IIOMetadata.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 sample code for java.lang.String definition code for java.lang.String nativeMetadataFormatClassName sample code for javax.imageio.metadata.IIOMetadata.nativeMetadataFormatClassName definition code for javax.imageio.metadata.IIOMetadata.nativeMetadataFormatClassName
          The name of the class implementing IIOMetadataFormat and representing the native metadata format, initialized to null and set via the constructor.
protected  String sample code for java.lang.String definition code for java.lang.String nativeMetadataFormatName sample code for javax.imageio.metadata.IIOMetadata.nativeMetadataFormatName definition code for javax.imageio.metadata.IIOMetadata.nativeMetadataFormatName
          The name of the native metadata format for this object, initialized to null and set via the constructor.
protected  boolean standardFormatSupported sample code for javax.imageio.metadata.IIOMetadata.standardFormatSupported definition code for javax.imageio.metadata.IIOMetadata.standardFormatSupported
          A boolean indicating whether the concrete subclass supports the standard metadata format, set via the constructor.
 
Constructor Summary
protected IIOMetadata sample code for javax.imageio.metadata.IIOMetadata.IIOMetadata() definition code for javax.imageio.metadata.IIOMetadata.IIOMetadata() ()
          Constructs an empty IIOMetadata object.
protected IIOMetadata sample code for javax.imageio.metadata.IIOMetadata.IIOMetadata(boolean, java.lang.String, java.lang.String, java.lang.String[], java.lang.String[]) definition code for javax.imageio.metadata.IIOMetadata.IIOMetadata(boolean, java.lang.String, java.lang.String, java.lang.String[], java.lang.String[]) (boolean standardMetadataFormatSupported, String sample code for java.lang.String definition code for java.lang.String  nativeMetadataFormatName, String sample code for java.lang.String definition code for java.lang.String  nativeMetadataFormatClassName, String sample code for java.lang.String definition code for java.lang.String [] extraMetadataFormatNames, String sample code for java.lang.String definition code for java.lang.String [] extraMetadataFormatClassNames)
          Constructs an IIOMetadata object with the given format names and format class names, as well as a boolean indicating whether the standard format is supported.
 
Method Summary
 boolean activateController sample code for javax.imageio.metadata.IIOMetadata.activateController() definition code for javax.imageio.metadata.IIOMetadata.activateController() ()
          Activates the installed IIOMetadataController for this IIOMetadata object and returns the resulting value.
abstract  Node sample code for org.w3c.dom.Node definition code for org.w3c.dom.Node getAsTree sample code for javax.imageio.metadata.IIOMetadata.getAsTree(java.lang.String) definition code for javax.imageio.metadata.IIOMetadata.getAsTree(java.lang.String) (String sample code for java.lang.String definition code for java.lang.String  formatName)
          Returns an XML DOM 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.
 IIOMetadataController sample code for javax.imageio.metadata.IIOMetadataController definition code for javax.imageio.metadata.IIOMetadataController getController sample code for javax.imageio.metadata.IIOMetadata.getController() definition code for javax.imageio.metadata.IIOMetadata.getController() ()
          Returns whatever IIOMetadataController is currently installed.
 IIOMetadataController sample code for javax.imageio.metadata.IIOMetadataController definition code for javax.imageio.metadata.IIOMetadataController getDefaultController sample code for javax.imageio.metadata.IIOMetadata.getDefaultController() definition code for javax.imageio.metadata.IIOMetadata.getDefaultController() ()
          Returns the default IIOMetadataController, if there is one, regardless of the currently installed controller.
 String sample code for java.lang.String definition code for java.lang.String [] getExtraMetadataFormatNames sample code for javax.imageio.metadata.IIOMetadata.getExtraMetadataFormatNames() definition code for javax.imageio.metadata.IIOMetadata.getExtraMetadataFormatNames() ()
          Returns an array of Strings 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.
 IIOMetadataFormat sample code for javax.imageio.metadata.IIOMetadataFormat definition code for javax.imageio.metadata.IIOMetadataFormat getMetadataFormat sample code for javax.imageio.metadata.IIOMetadata.getMetadataFormat(java.lang.String) definition code for javax.imageio.metadata.IIOMetadata.getMetadataFormat(java.lang.String) (String sample code for java.lang.String definition code for java.lang.String  formatName)
          Returns an IIOMetadataFormat object describing the given metadata format, or null if no description is available.
 String sample code for java.lang.String definition code for java.lang.String [] getMetadataFormatNames sample code for javax.imageio.metadata.IIOMetadata.getMetadataFormatNames() definition code for javax.imageio.metadata.IIOMetadata.getMetadataFormatNames() ()
          Returns an array of Strings containing the names of all metadata formats, including the native and standard formats, recognized by this plug-in's getAsTree, setFromTree, and mergeTree methods.
 String sample code for java.lang.String definition code for java.lang.String getNativeMetadataFormatName sample code for javax.imageio.metadata.IIOMetadata.getNativeMetadataFormatName() definition code for javax.imageio.metadata.IIOMetadata.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.
protected  IIOMetadataNode sample code for javax.imageio.metadata.IIOMetadataNode definition code for javax.imageio.metadata.IIOMetadataNode getStandardChromaNode sample code for javax.imageio.metadata.IIOMetadata.getStandardChromaNode() definition code for javax.imageio.metadata.IIOMetadata.getStandardChromaNode() ()
          Returns an IIOMetadataNode representing the chroma information of the standard javax_imageio_1.0 metadata format, or null if no such information is available.
protected  IIOMetadataNode sample code for javax.imageio.metadata.IIOMetadataNode definition code for javax.imageio.metadata.IIOMetadataNode getStandardCompressionNode sample code for javax.imageio.metadata.IIOMetadata.getStandardCompressionNode() definition code for javax.imageio.metadata.IIOMetadata.getStandardCompressionNode() ()
          Returns an IIOMetadataNode representing the compression information of the standard javax_imageio_1.0 metadata format, or null if no such information is available.
protected  IIOMetadataNode sample code for javax.imageio.metadata.IIOMetadataNode definition code for javax.imageio.metadata.IIOMetadataNode getStandardDataNode sample code for javax.imageio.metadata.IIOMetadata.getStandardDataNode() definition code for javax.imageio.metadata.IIOMetadata.getStandardDataNode() ()
          Returns an IIOMetadataNode representing the data format information of the standard javax_imageio_1.0 metadata format, or null if no such information is available.
protected  IIOMetadataNode sample code for javax.imageio.metadata.IIOMetadataNode definition code for javax.imageio.metadata.IIOMetadataNode getStandardDimensionNode sample code for javax.imageio.metadata.IIOMetadata.getStandardDimensionNode() definition code for javax.imageio.metadata.IIOMetadata.getStandardDimensionNode() ()
          Returns an IIOMetadataNode representing the dimension information of the standard javax_imageio_1.0 metadata format, or null if no such information is available.
protected  IIOMetadataNode sample code for javax.imageio.metadata.IIOMetadataNode definition code for javax.imageio.metadata.IIOMetadataNode getStandardDocumentNode sample code for javax.imageio.metadata.IIOMetadata.getStandardDocumentNode() definition code for javax.imageio.metadata.IIOMetadata.getStandardDocumentNode() ()
          Returns an IIOMetadataNode representing the document information of the standard javax_imageio_1.0 metadata format, or null if no such information is available.
protected  IIOMetadataNode sample code for javax.imageio.metadata.IIOMetadataNode definition code for javax.imageio.metadata.IIOMetadataNode getStandardTextNode sample code for javax.imageio.metadata.IIOMetadata.getStandardTextNode() definition code for javax.imageio.metadata.IIOMetadata.getStandardTextNode() ()
          Returns an IIOMetadataNode representing the textual information of the standard javax_imageio_1.0 metadata format, or null if no such information is available.
protected  IIOMetadataNode sample code for javax.imageio.metadata.IIOMetadataNode definition code for javax.imageio.metadata.IIOMetadataNode getStandardTileNode sample code for javax.imageio.metadata.IIOMetadata.getStandardTileNode() definition code for javax.imageio.metadata.IIOMetadata.getStandardTileNode() ()
          Returns an IIOMetadataNode representing the tiling information of the standard javax_imageio_1.0 metadata format, or null if no such information is available.
protected  IIOMetadataNode sample code for javax.imageio.metadata.IIOMetadataNode definition code for javax.imageio.metadata.IIOMetadataNode getStandardTransparencyNode sample code for javax.imageio.metadata.IIOMetadata.getStandardTransparencyNode() definition code for javax.imageio.metadata.IIOMetadata.getStandardTransparencyNode() ()
          Returns an IIOMetadataNode representing the transparency information of the standard javax_imageio_1.0 metadata format, or null if no such information is available.
protected  IIOMetadataNode sample code for javax.imageio.metadata.IIOMetadataNode definition code for javax.imageio.metadata.IIOMetadataNode getStandardTree sample code for javax.imageio.metadata.IIOMetadata.getStandardTree() definition code for javax.imageio.metadata.IIOMetadata.getStandardTree() ()
          A utility method to return a tree of IIOMetadataNodes representing the metadata contained within this object according to the conventions of the standard javax_imageio_1.0 metadata format.
 boolean hasController sample code for javax.imageio.metadata.IIOMetadata.hasController() definition code for javax.imageio.metadata.IIOMetadata.hasController() ()
          Returns true if there is a controller installed for this IIOMetadata object.
abstract  boolean isReadOnly sample code for javax.imageio.metadata.IIOMetadata.isReadOnly() definition code for javax.imageio.metadata.IIOMetadata.isReadOnly() ()
          Returns true if this object does not support the mergeTree, setFromTree, and reset methods.
 boolean isStandardMetadataFormatSupported sample code for javax.imageio.metadata.IIOMetadata.isStandardMetadataFormatSupported() definition code for javax.imageio.metadata.IIOMetadata.isStandardMetadataFormatSupported() ()
          Returns true if the standard metadata format is supported by getMetadataFormat, getAsTree, setFromTree, and mergeTree.
abstract  void mergeTree sample code for javax.imageio.metadata.IIOMetadata.mergeTree(java.lang.String, org.w3c.dom.Node) definition code for javax.imageio.metadata.IIOMetadata.mergeTree(java.lang.String, org.w3c.dom.Node) (String sample code for java.lang.String definition code for java.lang.String  formatName, Node sample code for org.w3c.dom.Node definition code for org.w3c.dom.Node  root)
          Alters the internal state of this IIOMetadata object from a tree of XML DOM Nodes whose syntax is defined by the given metadata format.
abstract  void reset sample code for javax.imageio.metadata.IIOMetadata.reset() definition code for javax.imageio.metadata.IIOMetadata.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.
 void setController sample code for javax.imageio.metadata.IIOMetadata.setController(javax.imageio.metadata.IIOMetadataController) definition code for javax.imageio.metadata.IIOMetadata.setController(javax.imageio.metadata.IIOMetadataController) (IIOMetadataController sample code for javax.imageio.metadata.IIOMetadataController definition code for javax.imageio.metadata.IIOMetadataController  controller)
          Sets the IIOMetadataController to be used to provide settings for this IIOMetadata object when the activateController method is called, overriding any default controller.
 void setFromTree sample code for javax.imageio.metadata.IIOMetadata.setFromTree(java.lang.String, org.w3c.dom.Node) definition code for javax.imageio.metadata.IIOMetadata.setFromTree(java.lang.String, org.w3c.dom.Node) (String sample code for java.lang.String definition code for java.lang.String  formatName, Node sample code for org.w3c.dom.Node definition code for org.w3c.dom.Node  root)
          Sets the internal state of this IIOMetadata object from a tree of XML DOM Nodes whose syntax is defined by the given metadata format.
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
clone sample code for java.lang.Object.clone() definition code for java.lang.Object.clone() , equals sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) , finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , hashCode sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , toString sample code for java.lang.Object.toString() definition code for java.lang.Object.toString() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 

Field Detail

standardFormatSupported sample code for javax.imageio.metadata.IIOMetadata.standardFormatSupported

protected boolean standardFormatSupported
A boolean indicating whether the concrete subclass supports the standard metadata format, set via the constructor.


nativeMetadataFormatName sample code for javax.imageio.metadata.IIOMetadata.nativeMetadataFormatName

protected String sample code for java.lang.String definition code for java.lang.String  nativeMetadataFormatName
The name of the native metadata format for this object, initialized to null and set via the constructor.


nativeMetadataFormatClassName sample code for javax.imageio.metadata.IIOMetadata.nativeMetadataFormatClassName

protected String sample code for java.lang.String definition code for java.lang.String  nativeMetadataFormatClassName
The name of the class implementing IIOMetadataFormat and representing the native metadata format, initialized to null and set via the constructor.


extraMetadataFormatNames sample code for javax.imageio.metadata.IIOMetadata.extraMetadataFormatNames

protected String sample code for java.lang.String definition code for java.lang.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.


extraMetadataFormatClassNames sample code for javax.imageio.metadata.IIOMetadata.extraMetadataFormatClassNames

protected String sample code for java.lang.String definition code for java.lang.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.


defaultController sample code for javax.imageio.metadata.IIOMetadata.defaultController

protected IIOMetadataController sample code for javax.imageio.metadata.IIOMetadataController definition code for javax.imageio.metadata.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.

See Also:
IIOMetadataController sample code for javax.imageio.metadata.IIOMetadataController definition code for javax.imageio.metadata.IIOMetadataController , getDefaultController() sample code for javax.imageio.metadata.IIOMetadata.getDefaultController() definition code for javax.imageio.metadata.IIOMetadata.getDefaultController()

controller sample code for javax.imageio.metadata.IIOMetadata.controller

protected IIOMetadataController sample code for javax.imageio.metadata.IIOMetadataController definition code for javax.imageio.metadata.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.

See Also:
IIOMetadataController sample code for javax.imageio.metadata.IIOMetadataController definition code for javax.imageio.metadata.IIOMetadataController , setController(IIOMetadataController) sample code for javax.imageio.metadata.IIOMetadata.setController(javax.imageio.metadata.IIOMetadataController) definition code for javax.imageio.metadata.IIOMetadata.setController(javax.imageio.metadata.IIOMetadataController) , hasController() sample code for javax.imageio.metadata.IIOMetadata.hasController() definition code for javax.imageio.metadata.IIOMetadata.hasController() , activateController() sample code for javax.imageio.metadata.IIOMetadata.activateController() definition code for javax.imageio.metadata.IIOMetadata.activateController()
Constructor Detail

IIOMetadata sample code for javax.imageio.metadata.IIOMetadata() definition code for javax.imageio.metadata.IIOMetadata()

protected IIOMetadata()
Constructs an empty 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 sample code for javax.imageio.metadata.IIOMetadata(boolean, java.lang.String, java.lang.String, java.lang.String[], java.lang.String[]) definition code for javax.imageio.metadata.IIOMetadata(boolean, java.lang.String, java.lang.String, java.lang.String[], java.lang.String[])

protected IIOMetadata(boolean standardMetadataFormatSupported,
                      String sample code for java.lang.String definition code for java.lang.String  nativeMetadataFormatName,
                      String sample code for java.lang.String definition code for java.lang.String  nativeMetadataFormatClassName,
                      String sample code for java.lang.String definition code for java.lang.String [] extraMetadataFormatNames,
                      String sample code for java.lang.String definition code for java.lang.String [] extraMetadataFormatClassNames)
Constructs an 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 getMetadataFormat.

Parameters:
standardMetadataFormatSupported - true if this object can return or accept a DOM tree using the standard metadata format.
nativeMetadataFormatName - the name of the native metadata format, as a String, or null if there is no native format.
nativeMetadataFormatClassName - the name of the class of the native metadata format, or null if there is no native format.
extraMetadataFormatNames - an array of Strings indicating additional formats supported by this object, or null if there are none.
extraMetadataFormatClassNames - an array of Strings indicating the class names of any additional formats supported by this object, or null if there are none.
Throws:
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - if extraMetadataFormatNames has length 0.
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - if extraMetadataFormatNames and extraMetadataFormatClassNames are neither both null, nor of the same length.
Method Detail

isStandardMetadataFormatSupported sample code for javax.imageio.metadata.IIOMetadata.isStandardMetadataFormatSupported() definition code for javax.imageio.metadata.IIOMetadata.isStandardMetadataFormatSupported()

public boolean isStandardMetadataFormatSupported()
Returns true if the standard metadata format is supported by getMetadataFormat, getAsTree, setFromTree, and mergeTree.

The default implementation returns the value of the standardFormatSupported instance variable.

Returns:
true if the standard metadata format is supported.
See Also:
getAsTree(java.lang.String) sample code for javax.imageio.metadata.IIOMetadata.getAsTree(java.lang.String) definition code for javax.imageio.metadata.IIOMetadata.getAsTree(java.lang.String) , setFromTree(java.lang.String, org.w3c.dom.Node) sample code for javax.imageio.metadata.IIOMetadata.setFromTree(java.lang.String, org.w3c.dom.Node) definition code for javax.imageio.metadata.IIOMetadata.setFromTree(java.lang.String, org.w3c.dom.Node) , mergeTree(java.lang.String, org.w3c.dom.Node) sample code for javax.imageio.metadata.IIOMetadata.mergeTree(java.lang.String, org.w3c.dom.Node) definition code for javax.imageio.metadata.IIOMetadata.mergeTree(java.lang.String, org.w3c.dom.Node) , getMetadataFormat(java.lang.String) sample code for javax.imageio.metadata.IIOMetadata.getMetadataFormat(java.lang.String) definition code for javax.imageio.metadata.IIOMetadata.getMetadataFormat(java.lang.String)

isReadOnly sample code for javax.imageio.metadata.IIOMetadata.isReadOnly() definition code for javax.imageio.metadata.IIOMetadata.isReadOnly()

public abstract boolean isReadOnly()
Returns true if this object does not support the mergeTree, setFromTree, and reset methods.

Returns:
true if this IIOMetadata object cannot be modified.

getNativeMetadataFormatName sample code for javax.imageio.metadata.IIOMetadata.getNativeMetadataFormatName() definition code for javax.imageio.metadata.IIOMetadata.getNativeMetadataFormatName()

public String sample code for java.lang.String definition code for java.lang.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, nullwill be returned.

The structure and contents of the "native" metadata format are defined by the plug-in that created this IIOMetadata object. Plug-ins for simple formats will usually create a dummy node for the root, and then a series of child nodes representing individual tags, chunks, or keyword/value pairs. A plug-in may choose whether or not to document its native format.

The default implementation returns the value of the nativeMetadataFormatName instance variable.

Returns:
the name of the native format, or null.
See Also:
getExtraMetadataFormatNames() sample code for javax.imageio.metadata.IIOMetadata.getExtraMetadataFormatNames() definition code for javax.imageio.metadata.IIOMetadata.getExtraMetadataFormatNames() , getMetadataFormatNames() sample code for javax.imageio.metadata.IIOMetadata.getMetadataFormatNames() definition code for javax.imageio.metadata.IIOMetadata.getMetadataFormatNames()

getExtraMetadataFormatNames sample code for javax.imageio.metadata.IIOMetadata.getExtraMetadataFormatNames() definition code for javax.imageio.metadata.IIOMetadata.getExtraMetadataFormatNames()

public String sample code for java.lang.String definition code for java.lang.String [] getExtraMetadataFormatNames()
Returns an array of Strings 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 extraMetadataFormatNames instance variable.

Returns:
an array of Strings with length at least 1, or null.
See Also:
getAsTree(java.lang.String) sample code for javax.imageio.metadata.IIOMetadata.getAsTree(java.lang.String) definition code for javax.imageio.metadata.IIOMetadata.getAsTree(java.lang.String) , setFromTree(java.lang.String, org.w3c.dom.Node) sample code for javax.imageio.metadata.IIOMetadata.setFromTree(java.lang.String, org.w3c.dom.Node) definition code for javax.imageio.metadata.IIOMetadata.setFromTree(java.lang.String, org.w3c.dom.Node) , mergeTree(java.lang.String, org.w3c.dom.Node) sample code for javax.imageio.metadata.IIOMetadata.mergeTree(java.lang.String, org.w3c.dom.Node) definition code for javax.imageio.metadata.IIOMetadata.mergeTree(java.lang.String, org.w3c.dom.Node) , getNativeMetadataFormatName() sample code for javax.imageio.metadata.IIOMetadata.getNativeMetadataFormatName() definition code for javax.imageio.metadata.IIOMetadata.getNativeMetadataFormatName() , getMetadataFormatNames() sample code for javax.imageio.metadata.IIOMetadata.getMetadataFormatNames() definition code for javax.imageio.metadata.IIOMetadata.getMetadataFormatNames()

getMetadataFormatNames sample code for javax.imageio.metadata.IIOMetadata.getMetadataFormatNames() definition code for javax.imageio.metadata.IIOMetadata.getMetadataFormatNames()

public String sample code for java.lang.String definition code for java.lang.String [] getMetadataFormatNames()
Returns an array of Strings 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 getNativeMetadataFormatName, isStandardMetadataFormatSupported, and getExtraMetadataFormatNames and returns the combined results.

Returns:
an array of Strings.
See Also:
getNativeMetadataFormatName() sample code for javax.imageio.metadata.IIOMetadata.getNativeMetadataFormatName() definition code for javax.imageio.metadata.IIOMetadata.getNativeMetadataFormatName() , isStandardMetadataFormatSupported() sample code for javax.imageio.metadata.IIOMetadata.isStandardMetadataFormatSupported() definition code for javax.imageio.metadata.IIOMetadata.isStandardMetadataFormatSupported() , getExtraMetadataFormatNames() sample code for javax.imageio.metadata.IIOMetadata.getExtraMetadataFormatNames() definition code for javax.imageio.metadata.IIOMetadata.getExtraMetadataFormatNames()

getMetadataFormat sample code for javax.imageio.metadata.IIOMetadata.getMetadataFormat(java.lang.String) definition code for javax.imageio.metadata.IIOMetadata.getMetadataFormat(java.lang.String)

public IIOMetadataFormat sample code for javax.imageio.metadata.IIOMetadataFormat definition code for javax.imageio.metadata.IIOMetadataFormat  getMetadataFormat(String sample code for java.lang.String definition code for java.lang.String  formatName)
Returns an 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 IIOMetadataFormat class from nativeMetadataFormatClassName or extraMetadataFormatClassNames as appropriate, and constructs an instance of that class using its getInstance method.

Parameters:
formatName - the desired metadata format.
Returns:
an IIOMetadataFormat object.
Throws:
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - if formatName is null or is not one of the names recognized by the plug-in.
IllegalStateException sample code for java.lang.IllegalStateException definition code for java.lang.IllegalStateException - if the class corresponding to the format name cannot be loaded.

getAsTree sample code for javax.imageio.metadata.IIOMetadata.getAsTree(java.lang.String) definition code for javax.imageio.metadata.IIOMetadata.getAsTree(java.lang.String)

public abstract Node sample code for org.w3c.dom.Node definition code for org.w3c.dom.Node  getAsTree(String sample code for java.lang.String definition code for java.lang.String  formatName)
Returns an XML DOM 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 getMetadataFormatNames method.

Parameters:
formatName - the desired metadata format.
Returns:
an XML DOM Node object forming the root of a tree.
Throws:
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - if formatName is null or is not one of the names returned by getMetadataFormatNames.
See Also:
getMetadataFormatNames() sample code for javax.imageio.metadata.IIOMetadata.getMetadataFormatNames() definition code for javax.imageio.metadata.IIOMetadata.getMetadataFormatNames() , setFromTree(java.lang.String, org.w3c.dom.Node) sample code for javax.imageio.metadata.IIOMetadata.setFromTree(java.lang.String, org.w3c.dom.Node) definition code for javax.imageio.metadata.IIOMetadata.setFromTree(java.lang.String, org.w3c.dom.Node) , mergeTree(java.lang.String, org.w3c.dom.Node) sample code for javax.imageio.metadata.IIOMetadata.mergeTree(java.lang.String, org.w3c.dom.Node) definition code for javax.imageio.metadata.IIOMetadata.mergeTree(java.lang.String, org.w3c.dom.Node)

mergeTree sample code for javax.imageio.metadata.IIOMetadata.mergeTree(java.lang.String, org.w3c.dom.Node) definition code for javax.imageio.metadata.IIOMetadata.mergeTree(java.lang.String, org.w3c.dom.Node)

public abstract void mergeTree(String sample code for java.lang.String definition code for java.lang.String  formatName,
                               Node sample code for org.w3c.dom.Node definition code for org.w3c.dom.Node  root)
                        throws IIOInvalidTreeException sample code for javax.imageio.metadata.IIOInvalidTreeException definition code for javax.imageio.metadata.IIOInvalidTreeException 
Alters the internal state of this IIOMetadata object from a tree of XML DOM Nodes 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.

Parameters:
formatName - the desired metadata format.
root - an XML DOM Node object forming the root of a tree.
Throws:
IllegalStateException sample code for java.lang.IllegalStateException definition code for java.lang.IllegalStateException - if this object is read-only.
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - if formatName is null or is not one of the names returned by getMetadataFormatNames.
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - if root is null.
IIOInvalidTreeException sample code for javax.imageio.metadata.IIOInvalidTreeException definition code for javax.imageio.metadata.IIOInvalidTreeException - if the tree cannot be parsed successfully using the rules of the given format.
See Also:
getMetadataFormatNames() sample code for javax.imageio.metadata.IIOMetadata.getMetadataFormatNames() definition code for javax.imageio.metadata.IIOMetadata.getMetadataFormatNames() , getAsTree(java.lang.String) sample code for javax.imageio.metadata.IIOMetadata.getAsTree(java.lang.String) definition code for javax.imageio.metadata.IIOMetadata.getAsTree(java.lang.String) , setFromTree(java.lang.String, org.w3c.dom.Node) sample code for javax.imageio.metadata.IIOMetadata.setFromTree(java.lang.String, org.w3c.dom.Node) definition code for javax.imageio.metadata.IIOMetadata.setFromTree(java.lang.String, org.w3c.dom.Node)

getStandardChromaNode sample code for javax.imageio.metadata.IIOMetadata.getStandardChromaNode() definition code for javax.imageio.metadata.IIOMetadata.getStandardChromaNode()

protected IIOMetadataNode sample code for javax.imageio.metadata.IIOMetadataNode definition code for javax.imageio.metadata.IIOMetadataNode  getStandardChromaNode()
Returns an 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 null.

Subclasses should override this method to produce an appropriate subtree if they wish to support the standard metadata format.

Returns:
an IIOMetadataNode, or null.
See Also:
getStandardTree() sample code for javax.imageio.metadata.IIOMetadata.getStandardTree() definition code for javax.imageio.metadata.IIOMetadata.getStandardTree()

getStandardCompressionNode sample code for javax.imageio.metadata.IIOMetadata.getStandardCompressionNode() definition code for javax.imageio.metadata.IIOMetadata.getStandardCompressionNode()

protected IIOMetadataNode sample code for javax.imageio.metadata.IIOMetadataNode definition code for javax.imageio.metadata.IIOMetadataNode  getStandardCompressionNode()
Returns an 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 null.

Subclasses should override this method to produce an appropriate subtree if they wish to support the standard metadata format.

Returns:
an IIOMetadataNode, or null.
See Also:
getStandardTree() sample code for javax.imageio.metadata.IIOMetadata.getStandardTree() definition code for javax.imageio.metadata.IIOMetadata.getStandardTree()

getStandardDataNode sample code for javax.imageio.metadata.IIOMetadata.getStandardDataNode() definition code for javax.imageio.metadata.IIOMetadata.getStandardDataNode()

protected IIOMetadataNode sample code for javax.imageio.metadata.IIOMetadataNode definition code for javax.imageio.metadata.IIOMetadataNode  getStandardDataNode()
Returns an 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 null.

Subclasses should override this method to produce an appropriate subtree if they wish to support the standard metadata format.

Returns:
an IIOMetadataNode, or null.
See Also:
getStandardTree() sample code for javax.imageio.metadata.IIOMetadata.getStandardTree() definition code for javax.imageio.metadata.IIOMetadata.getStandardTree()

getStandardDimensionNode sample code for javax.imageio.metadata.IIOMetadata.getStandardDimensionNode() definition code for javax.imageio.metadata.IIOMetadata.getStandardDimensionNode()

protected IIOMetadataNode sample code for javax.imageio.metadata.IIOMetadataNode definition code for javax.imageio.metadata.IIOMetadataNode  getStandardDimensionNode()
Returns an 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 null.

Subclasses should override this method to produce an appropriate subtree if they wish to support the standard metadata format.

Returns:
an IIOMetadataNode, or null.
See Also:
getStandardTree() sample code for javax.imageio.metadata.IIOMetadata.getStandardTree() definition code for javax.imageio.metadata.IIOMetadata.getStandardTree()

getStandardDocumentNode sample code for javax.imageio.metadata.IIOMetadata.getStandardDocumentNode() definition code for javax.imageio.metadata.IIOMetadata.getStandardDocumentNode()

protected IIOMetadataNode sample code for javax.imageio.metadata.IIOMetadataNode definition code for javax.imageio.metadata.IIOMetadataNode  getStandardDocumentNode()
Returns an 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 null.

Subclasses should override this method to produce an appropriate subtree if they wish to support the standard metadata format.

Returns:
an IIOMetadataNode, or null.
See Also:
getStandardTree() sample code for javax.imageio.metadata.IIOMetadata.getStandardTree() definition code for javax.imageio.metadata.IIOMetadata.getStandardTree()

getStandardTextNode sample code for javax.imageio.metadata.IIOMetadata.getStandardTextNode() definition code for javax.imageio.metadata.IIOMetadata.getStandardTextNode()

protected IIOMetadataNode sample code for javax.imageio.metadata.IIOMetadataNode definition code for javax.imageio.metadata.IIOMetadataNode  getStandardTextNode()
Returns an 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 null.

Subclasses should override this method to produce an appropriate subtree if they wish to support the standard metadata format.

Returns:
an IIOMetadataNode, or null.
See Also:
getStandardTree() sample code for javax.imageio.metadata.IIOMetadata.getStandardTree() definition code for javax.imageio.metadata.IIOMetadata.getStandardTree()

getStandardTileNode sample code for javax.imageio.metadata.IIOMetadata.getStandardTileNode() definition code for javax.imageio.metadata.IIOMetadata.getStandardTileNode()

protected IIOMetadataNode sample code for javax.imageio.metadata.IIOMetadataNode definition code for javax.imageio.metadata.IIOMetadataNode  getStandardTileNode()
Returns an 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 null.

Subclasses should override this method to produce an appropriate subtree if they wish to support the standard metadata format.

Returns:
an IIOMetadataNode, or null.
See Also:
getStandardTree() sample code for javax.imageio.metadata.IIOMetadata.getStandardTree() definition code for javax.imageio.metadata.IIOMetadata.getStandardTree()

getStandardTransparencyNode sample code for javax.imageio.metadata.IIOMetadata.getStandardTransparencyNode() definition code for javax.imageio.metadata.IIOMetadata.getStandardTransparencyNode()

protected IIOMetadataNode sample code for javax.imageio.metadata.IIOMetadataNode definition code for javax.imageio.metadata.IIOMetadataNode  getStandardTransparencyNode()
Returns an 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 null.

Subclasses should override this method to produce an appropriate subtree if they wish to support the standard metadata format.

Returns:
an IIOMetadataNode, or null.

getStandardTree sample code for javax.imageio.metadata.IIOMetadata.getStandardTree() definition code for javax.imageio.metadata.IIOMetadata.getStandardTree()

protected final IIOMetadataNode sample code for javax.imageio.metadata.IIOMetadataNode definition code for javax.imageio.metadata.IIOMetadataNode  getStandardTree()
A utility method to return a tree of IIOMetadataNodes 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 getStandard*Node methods to supply each of the subtrees rooted at the children of the root node. If any of those methods returns null, the corresponding subtree will be omitted. If all of them return null, a tree consisting of a single root node will be returned.

Returns:
an IIOMetadataNode representing the root of a metadata tree in the javax_imageio_1.0 format.
See Also:
getStandardChromaNode() sample code for javax.imageio.metadata.IIOMetadata.getStandardChromaNode() definition code for javax.imageio.metadata.IIOMetadata.getStandardChromaNode() , getStandardCompressionNode() sample code for javax.imageio.metadata.IIOMetadata.getStandardCompressionNode() definition code for javax.imageio.metadata.IIOMetadata.getStandardCompressionNode() , getStandardDataNode() sample code for javax.imageio.metadata.IIOMetadata.getStandardDataNode() definition code for javax.imageio.metadata.IIOMetadata.getStandardDataNode() , getStandardDimensionNode() sample code for javax.imageio.metadata.IIOMetadata.getStandardDimensionNode() definition code for javax.imageio.metadata.IIOMetadata.getStandardDimensionNode() , getStandardDocumentNode() sample code for javax.imageio.metadata.IIOMetadata.getStandardDocumentNode() definition code for javax.imageio.metadata.IIOMetadata.getStandardDocumentNode() , getStandardTextNode() sample code for javax.imageio.metadata.IIOMetadata.getStandardTextNode() definition code for javax.imageio.metadata.IIOMetadata.getStandardTextNode() , getStandardTileNode() sample code for javax.imageio.metadata.IIOMetadata.getStandardTileNode() definition code for javax.imageio.metadata.IIOMetadata.getStandardTileNode() , getStandardTransparencyNode() sample code for javax.imageio.metadata.IIOMetadata.getStandardTransparencyNode() definition code for javax.imageio.metadata.IIOMetadata.getStandardTransparencyNode()

setFromTree sample code for javax.imageio.metadata.IIOMetadata.setFromTree(java.lang.String, org.w3c.dom.Node) definition code for javax.imageio.metadata.IIOMetadata.setFromTree(java.lang.String, org.w3c.dom.Node)

public void setFromTree(String sample code for java.lang.String definition code for java.lang.String  formatName,
                        Node sample code for org.w3c.dom.Node definition code for org.w3c.dom.Node  root)
                 throws IIOInvalidTreeException sample code for javax.imageio.metadata.IIOInvalidTreeException definition code for javax.imageio.metadata.IIOInvalidTreeException 
Sets the internal state of this IIOMetadata object from a tree of XML DOM Nodes 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 reset followed by mergeTree(formatName, root).

Parameters:
formatName - the desired metadata format.
root - an XML DOM Node object forming the root of a tree.
Throws:
IllegalStateException sample code for java.lang.IllegalStateException definition code for java.lang.IllegalStateException - if this object is read-only.
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - if formatName is null or is not one of the names returned by getMetadataFormatNames.
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - if root is null.
IIOInvalidTreeException sample code for javax.imageio.metadata.IIOInvalidTreeException definition code for javax.imageio.metadata.IIOInvalidTreeException - if the tree cannot be parsed successfully using the rules of the given format.
See Also:
getMetadataFormatNames() sample code for javax.imageio.metadata.IIOMetadata.getMetadataFormatNames() definition code for javax.imageio.metadata.IIOMetadata.getMetadataFormatNames() , getAsTree(java.lang.String) sample code for javax.imageio.metadata.IIOMetadata.getAsTree(java.lang.String) definition code for javax.imageio.metadata.IIOMetadata.getAsTree(java.lang.String) , mergeTree(java.lang.String, org.w3c.dom.Node) sample code for javax.imageio.metadata.IIOMetadata.mergeTree(java.lang.String, org.w3c.dom.Node) definition code for javax.imageio.metadata.IIOMetadata.mergeTree(java.lang.String, org.w3c.dom.Node)

reset sample code for javax.imageio.metadata.IIOMetadata.reset() definition code for javax.imageio.metadata.IIOMetadata.reset()

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.

Throws:
IllegalStateException sample code for java.lang.IllegalStateException definition code for java.lang.IllegalStateException - if this object is read-only.
See Also:
ImageReader.getStreamMetadata() sample code for javax.imageio.ImageReader.getStreamMetadata() definition code for javax.imageio.ImageReader.getStreamMetadata() , ImageReader.getImageMetadata(int) sample code for javax.imageio.ImageReader.getImageMetadata(int) definition code for javax.imageio.ImageReader.getImageMetadata(int) , ImageWriter.getDefaultStreamMetadata(javax.imageio.ImageWriteParam) sample code for javax.imageio.ImageWriter.getDefaultStreamMetadata(javax.imageio.ImageWriteParam) definition code for javax.imageio.ImageWriter.getDefaultStreamMetadata(javax.imageio.ImageWriteParam) , ImageWriter.getDefaultImageMetadata(javax.imageio.ImageTypeSpecifier, javax.imageio.ImageWriteParam) sample code for javax.imageio.ImageWriter.getDefaultImageMetadata(javax.imageio.ImageTypeSpecifier, javax.imageio.ImageWriteParam) definition code for javax.imageio.ImageWriter.getDefaultImageMetadata(javax.imageio.ImageTypeSpecifier, javax.imageio.ImageWriteParam)

setController sample code for javax.imageio.metadata.IIOMetadata.setController(javax.imageio.metadata.IIOMetadataController) definition code for javax.imageio.metadata.IIOMetadata.setController(javax.imageio.metadata.IIOMetadataController)

public void setController(IIOMetadataController sample code for javax.imageio.metadata.IIOMetadataController definition code for javax.imageio.metadata.IIOMetadataController  controller)
Sets the 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 controller instance variable to the supplied value.

Parameters:
controller - An appropriate IIOMetadataController, or null.
See Also:
IIOMetadataController sample code for javax.imageio.metadata.IIOMetadataController definition code for javax.imageio.metadata.IIOMetadataController , getController() sample code for javax.imageio.metadata.IIOMetadata.getController() definition code for javax.imageio.metadata.IIOMetadata.getController() , getDefaultController() sample code for javax.imageio.metadata.IIOMetadata.getDefaultController() definition code for javax.imageio.metadata.IIOMetadata.getDefaultController() , hasController() sample code for javax.imageio.metadata.IIOMetadata.hasController() definition code for javax.imageio.metadata.IIOMetadata.hasController() , activateController() sample code for javax.imageio.metadata.IIOMetadata.activateController() definition code for javax.imageio.metadata.IIOMetadata.activateController()

getController sample code for javax.imageio.metadata.IIOMetadata.getController() definition code for javax.imageio.metadata.IIOMetadata.getController()

public IIOMetadataController sample code for javax.imageio.metadata.IIOMetadataController definition code for javax.imageio.metadata.IIOMetadataController  getController()
Returns whatever 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 controller instance variable.

Returns:
the currently installed IIOMetadataController, or null.
See Also:
IIOMetadataController sample code for javax.imageio.metadata.IIOMetadataController definition code for javax.imageio.metadata.IIOMetadataController , setController(javax.imageio.metadata.IIOMetadataController) sample code for javax.imageio.metadata.IIOMetadata.setController(javax.imageio.metadata.IIOMetadataController) definition code for javax.imageio.metadata.IIOMetadata.setController(javax.imageio.metadata.IIOMetadataController) , getDefaultController() sample code for javax.imageio.metadata.IIOMetadata.getDefaultController() definition code for javax.imageio.metadata.IIOMetadata.getDefaultController() , hasController() sample code for javax.imageio.metadata.IIOMetadata.hasController() definition code for javax.imageio.metadata.IIOMetadata.hasController() , activateController() sample code for javax.imageio.metadata.IIOMetadata.activateController() definition code for javax.imageio.metadata.IIOMetadata.activateController()

getDefaultController sample code for javax.imageio.metadata.IIOMetadata.getDefaultController() definition code for javax.imageio.metadata.IIOMetadata.getDefaultController()

public IIOMetadataController sample code for javax.imageio.metadata.IIOMetadataController definition code for javax.imageio.metadata.IIOMetadataController  getDefaultController()
Returns the default 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 defaultController instance variable.

Returns:
the default IIOMetadataController, or null.
See Also:
IIOMetadataController sample code for javax.imageio.metadata.IIOMetadataController definition code for javax.imageio.metadata.IIOMetadataController , setController(IIOMetadataController) sample code for javax.imageio.metadata.IIOMetadata.setController(javax.imageio.metadata.IIOMetadataController) definition code for javax.imageio.metadata.IIOMetadata.setController(javax.imageio.metadata.IIOMetadataController) , getController() sample code for javax.imageio.metadata.IIOMetadata.getController() definition code for javax.imageio.metadata.IIOMetadata.getController() , hasController() sample code for javax.imageio.metadata.IIOMetadata.hasController() definition code for javax.imageio.metadata.IIOMetadata.hasController() , activateController() sample code for javax.imageio.metadata.IIOMetadata.activateController() definition code for javax.imageio.metadata.IIOMetadata.activateController()

hasController sample code for javax.imageio.metadata.IIOMetadata.hasController() definition code for javax.imageio.metadata.IIOMetadata.hasController()

public boolean hasController()
Returns true if there is a controller installed for this IIOMetadata object.

The default implementation returns true if the getController method returns a non-null value.

Returns:
true if a controller is installed.
See Also:
IIOMetadataController sample code for javax.imageio.metadata.IIOMetadataController definition code for javax.imageio.metadata.IIOMetadataController , setController(IIOMetadataController) sample code for javax.imageio.metadata.IIOMetadata.setController(javax.imageio.metadata.IIOMetadataController) definition code for javax.imageio.metadata.IIOMetadata.setController(javax.imageio.metadata.IIOMetadataController) , getController() sample code for javax.imageio.metadata.IIOMetadata.getController() definition code for javax.imageio.metadata.IIOMetadata.getController() , getDefaultController() sample code for javax.imageio.metadata.IIOMetadata.getDefaultController() definition code for javax.imageio.metadata.IIOMetadata.getDefaultController() , activateController() sample code for javax.imageio.metadata.IIOMetadata.activateController() definition code for javax.imageio.metadata.IIOMetadata.activateController()

activateController sample code for javax.imageio.metadata.IIOMetadata.activateController() definition code for javax.imageio.metadata.IIOMetadata.activateController()

public boolean activateController()
Activates the installed 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 IIOMetadata for a particular plug-in. Controllers need not be GUIs, however.

The default implementation calls getController and the calls activate on the returned object if hasController returns true.

Returns:
true if the controller completed normally.
Throws:
IllegalStateException sample code for java.lang.IllegalStateException definition code for java.lang.IllegalStateException - if there is no controller currently installed.
See Also:
IIOMetadataController sample code for javax.imageio.metadata.IIOMetadataController definition code for javax.imageio.metadata.IIOMetadataController , setController(IIOMetadataController) sample code for javax.imageio.metadata.IIOMetadata.setController(javax.imageio.metadata.IIOMetadataController) definition code for javax.imageio.metadata.IIOMetadata.setController(javax.imageio.metadata.IIOMetadataController) , getController() sample code for javax.imageio.metadata.IIOMetadata.getController() definition code for javax.imageio.metadata.IIOMetadata.getController() , getDefaultController() sample code for javax.imageio.metadata.IIOMetadata.getDefaultController() definition code for javax.imageio.metadata.IIOMetadata.getDefaultController() , hasController() sample code for javax.imageio.metadata.IIOMetadata.hasController() definition code for javax.imageio.metadata.IIOMetadata.hasController()