Java Doc for IIOMetadata.java in  » 6.0-JDK-Core » image » javax » imageio » metadata » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Home
Java Source Code / Java Documentation
1.6.0 JDK Core
2.6.0 JDK Modules
3.6.0 JDK Modules com.sun
4.6.0 JDK Modules com.sun.java
5.6.0 JDK Modules sun
6.6.0 JDK Platform
7.Ajax
8.Apache Harmony Java SE
9.Aspect oriented
10.Authentication Authorization
11.Blogger System
12.Build
13.Byte Code
14.Cache
15.Chart
16.Chat
17.Code Analyzer
18.Collaboration
19.Content Management System
20.Database Client
21.Database DBMS
22.Database JDBC Connection Pool
23.Database ORM
24.Development
25.EJB Server
26.ERP CRM Financial
27.ESB
28.Forum
29.Game
30.GIS
31.Graphic 3D
32.Graphic Library
33.Groupware
34.HTML Parser
35.IDE
36.IDE Eclipse
37.IDE Netbeans
38.Installer
39.Internationalization Localization
40.Inversion of Control
41.Issue Tracking
42.J2EE
43.J2ME
44.JBoss
45.JMS
46.JMX
47.Library
48.Mail Clients
49.Music
50.Net
51.Parser
52.PDF
53.Portal
54.Profiler
55.Project Management
56.Report
57.RSS RDF
58.Rule Engine
59.Science
60.Scripting
61.Search Engine
62.Security
63.Sevlet Container
64.Source Control
65.Swing Library
66.Template Engine
67.Test Coverage
68.Testing
69.UML
70.Web Crawler
71.Web Framework
72.Web Mail
73.Web Server
74.Web Services
75.Web Services apache cxf 2.2.6
76.Web Services AXIS2
77.Wiki Engine
78.Workflow Engines
79.XML
80.XML UI
Java Source Code / Java Documentation » 6.0 JDK Core » image » javax.imageio.metadata 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   javax.imageio.metadata.IIOMetadata

IIOMetadata
abstract public class IIOMetadata (Code)
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:   javax.imageio.ImageReader.getImageMetadata
See Also:   javax.imageio.ImageReader.getStreamMetadata
See Also:   javax.imageio.ImageReader.readAll
See Also:   javax.imageio.ImageWriter.getDefaultStreamMetadata
See Also:   javax.imageio.ImageWriter.getDefaultImageMetadata
See Also:   javax.imageio.ImageWriter.write
See Also:   javax.imageio.ImageWriter.convertImageMetadata
See Also:   javax.imageio.ImageWriter.convertStreamMetadata
See Also:   javax.imageio.IIOImage
See Also:   javax.imageio.ImageTranscoder
version:
   0.5


Field Summary
protected  IIOMetadataControllercontroller
     The IIOMetadataController that will be used to provide settings for this IIOMetadata object when the activateController method is called.
protected  IIOMetadataControllerdefaultController
     An IIOMetadataController that is suggested for use as the controller for this IIOMetadata object.
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  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  StringnativeMetadataFormatClassName
     The name of the class implementing IIOMetadataFormat and representing the native metadata format, initialized to null and set via the constructor.
protected  StringnativeMetadataFormatName
     The name of the native metadata format for this object, initialized to null and set via the constructor.
protected  booleanstandardFormatSupported
     A boolean indicating whether the concrete subclass supports the standard metadata format, set via the constructor.

Constructor Summary
protected  IIOMetadata()
     Constructs an empty IIOMetadata object.
protected  IIOMetadata(boolean standardMetadataFormatSupported, String nativeMetadataFormatName, String nativeMetadataFormatClassName, String[] extraMetadataFormatNames, 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.


Method Summary
public  booleanactivateController()
     Activates the installed IIOMetadataController for this IIOMetadata object and returns the resulting value.
abstract public  NodegetAsTree(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.

public  IIOMetadataControllergetController()
     Returns whatever IIOMetadataController is currently installed.
public  IIOMetadataControllergetDefaultController()
     Returns the default IIOMetadataController, if there is one, regardless of the currently installed controller.
public  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.
public  IIOMetadataFormatgetMetadataFormat(String formatName)
     Returns an IIOMetadataFormat object describing the given metadata format, or null if no description is available.
public  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.
public  StringgetNativeMetadataFormatName()
     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  IIOMetadataNodegetStandardChromaNode()
     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  IIOMetadataNodegetStandardCompressionNode()
     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  IIOMetadataNodegetStandardDataNode()
     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  IIOMetadataNodegetStandardDimensionNode()
     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  IIOMetadataNodegetStandardDocumentNode()
     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  IIOMetadataNodegetStandardTextNode()
     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  IIOMetadataNodegetStandardTileNode()
     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  IIOMetadataNodegetStandardTransparencyNode()
     Returns an IIOMetadataNode representing the transparency information of the standard javax_imageio_1.0 metadata format, or null if no such information is available.
final protected  IIOMetadataNodegetStandardTree()
     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.

public  booleanhasController()
     Returns true if there is a controller installed for this IIOMetadata object.
abstract public  booleanisReadOnly()
     Returns true if this object does not support the mergeTree, setFromTree, and reset methods.
public  booleanisStandardMetadataFormatSupported()
     Returns true if the standard metadata format is supported by getMetadataFormat, getAsTree, setFromTree, and mergeTree.
abstract public  voidmergeTree(String formatName, 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 public  voidreset()
     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  voidsetController(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.
public  voidsetFromTree(String formatName, 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.

Field Detail
controller
protected IIOMetadataController controller(Code)
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
See Also:   IIOMetadata.setController(IIOMetadataController)
See Also:   IIOMetadata.hasController()
See Also:   IIOMetadata.activateController()



defaultController
protected IIOMetadataController defaultController(Code)
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
See Also:   IIOMetadata.getDefaultController



extraMetadataFormatClassNames
protected String[] extraMetadataFormatClassNames(Code)
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.



extraMetadataFormatNames
protected String[] extraMetadataFormatNames(Code)
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.



nativeMetadataFormatClassName
protected String nativeMetadataFormatClassName(Code)
The name of the class implementing IIOMetadataFormat and representing the native metadata format, initialized to null and set via the constructor.



nativeMetadataFormatName
protected String nativeMetadataFormatName(Code)
The name of the native metadata format for this object, initialized to null and set via the constructor.



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




Constructor Detail
IIOMetadata
protected IIOMetadata()(Code)
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
protected IIOMetadata(boolean standardMetadataFormatSupported, String nativeMetadataFormatName, String nativeMetadataFormatClassName, String[] extraMetadataFormatNames, String[] extraMetadataFormatClassNames)(Code)
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 ifthis object can return or accept a DOM tree using the standardmetadata format.
Parameters:
  nativeMetadataFormatName - the name of the native metadataformat, as a String, or null if thereis no native format.
Parameters:
  nativeMetadataFormatClassName - the name of the class of the native metadata format, or null if there isno native format.
Parameters:
  extraMetadataFormatNames - an array of Stringsindicating additional formats supported by this object, ornull if there are none.
Parameters:
  extraMetadataFormatClassNames - an array of Stringsindicating the class names of any additional formats supported bythis object, or null if there are none.
exception:
  IllegalArgumentException - ifextraMetadataFormatNames has length 0.
exception:
  IllegalArgumentException - ifextraMetadataFormatNames andextraMetadataFormatClassNames are neither bothnull, nor of the same length.





Method Detail
activateController
public boolean activateController()(Code)
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. true if the controller completed normally.
exception:
  IllegalStateException - if there is no controllercurrently installed.
See Also:   IIOMetadataController
See Also:   IIOMetadata.setController(IIOMetadataController)
See Also:   IIOMetadata.getController
See Also:   IIOMetadata.getDefaultController
See Also:   IIOMetadata.hasController




getAsTree
abstract public Node getAsTree(String formatName)(Code)
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. an XML DOM Node object forming theroot of a tree.
exception:
  IllegalArgumentException - if formatNameis null or is not one of the names returned bygetMetadataFormatNames.
See Also:   IIOMetadata.getMetadataFormatNames
See Also:   IIOMetadata.setFromTree
See Also:   IIOMetadata.mergeTree




getController
public IIOMetadataController getController()(Code)
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. the currently installedIIOMetadataController, or null.
See Also:   IIOMetadataController
See Also:   IIOMetadata.setController
See Also:   IIOMetadata.getDefaultController
See Also:   IIOMetadata.hasController
See Also:   IIOMetadata.activateController()




getDefaultController
public IIOMetadataController getDefaultController()(Code)
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. the default IIOMetadataController, ornull.
See Also:   IIOMetadataController
See Also:   IIOMetadata.setController(IIOMetadataController)
See Also:   IIOMetadata.getController
See Also:   IIOMetadata.hasController
See Also:   IIOMetadata.activateController()




getExtraMetadataFormatNames
public String[] getExtraMetadataFormatNames()(Code)
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. an array of Strings with length at least1, or null.
See Also:   IIOMetadata.getAsTree
See Also:   IIOMetadata.setFromTree
See Also:   IIOMetadata.mergeTree
See Also:   IIOMetadata.getNativeMetadataFormatName
See Also:   IIOMetadata.getMetadataFormatNames




getMetadataFormat
public IIOMetadataFormat getMetadataFormat(String formatName)(Code)
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. an IIOMetadataFormat object.
exception:
  IllegalArgumentException - if formatNameis null or is not one of the names recognized bythe plug-in.
exception:
  IllegalStateException - if the class corresponding tothe format name cannot be loaded.




getMetadataFormatNames
public String[] getMetadataFormatNames()(Code)
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. an array of Strings.
See Also:   IIOMetadata.getNativeMetadataFormatName
See Also:   IIOMetadata.isStandardMetadataFormatSupported
See Also:   IIOMetadata.getExtraMetadataFormatNames




getNativeMetadataFormatName
public String getNativeMetadataFormatName()(Code)
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. the name of the native format, or null.
See Also:   IIOMetadata.getExtraMetadataFormatNames
See Also:   IIOMetadata.getMetadataFormatNames




getStandardChromaNode
protected IIOMetadataNode getStandardChromaNode()(Code)
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. an IIOMetadataNode, or null.
See Also:   IIOMetadata.getStandardTree




getStandardCompressionNode
protected IIOMetadataNode getStandardCompressionNode()(Code)
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. an IIOMetadataNode, or null.
See Also:   IIOMetadata.getStandardTree




getStandardDataNode
protected IIOMetadataNode getStandardDataNode()(Code)
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. an IIOMetadataNode, or null.
See Also:   IIOMetadata.getStandardTree




getStandardDimensionNode
protected IIOMetadataNode getStandardDimensionNode()(Code)
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. an IIOMetadataNode, or null.
See Also:   IIOMetadata.getStandardTree




getStandardDocumentNode
protected IIOMetadataNode getStandardDocumentNode()(Code)
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. an IIOMetadataNode, or null.
See Also:   IIOMetadata.getStandardTree




getStandardTextNode
protected IIOMetadataNode getStandardTextNode()(Code)
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. an IIOMetadataNode, or null.
See Also:   IIOMetadata.getStandardTree




getStandardTileNode
protected IIOMetadataNode getStandardTileNode()(Code)
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. an IIOMetadataNode, or null.
See Also:   IIOMetadata.getStandardTree




getStandardTransparencyNode
protected IIOMetadataNode getStandardTransparencyNode()(Code)
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. an IIOMetadataNode, or null.




getStandardTree
final protected IIOMetadataNode getStandardTree()(Code)
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. an IIOMetadataNode representing the rootof a metadata tree in the javax_imageio_1.0format.
See Also:   IIOMetadata.getStandardChromaNode
See Also:   IIOMetadata.getStandardCompressionNode
See Also:   IIOMetadata.getStandardDataNode
See Also:   IIOMetadata.getStandardDimensionNode
See Also:   IIOMetadata.getStandardDocumentNode
See Also:   IIOMetadata.getStandardTextNode
See Also:   IIOMetadata.getStandardTileNode
See Also:   IIOMetadata.getStandardTransparencyNode




hasController
public boolean hasController()(Code)
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. true if a controller is installed.
See Also:   IIOMetadataController
See Also:   IIOMetadata.setController(IIOMetadataController)
See Also:   IIOMetadata.getController
See Also:   IIOMetadata.getDefaultController
See Also:   IIOMetadata.activateController()




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



isStandardMetadataFormatSupported
public boolean isStandardMetadataFormatSupported()(Code)
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. true if the standard metadata formatis supported.
See Also:   IIOMetadata.getAsTree
See Also:   IIOMetadata.setFromTree
See Also:   IIOMetadata.mergeTree
See Also:   IIOMetadata.getMetadataFormat




mergeTree
abstract public void mergeTree(String formatName, Node root) throws IIOInvalidTreeException(Code)
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.
Parameters:
  root - an XML DOM Node object forming theroot of a tree.
exception:
  IllegalStateException - if this object is read-only.
exception:
  IllegalArgumentException - if formatNameis null or is not one of the names returned bygetMetadataFormatNames.
exception:
  IllegalArgumentException - if root isnull.
exception:
  IIOInvalidTreeException - if the tree cannot be parsedsuccessfully using the rules of the given format.
See Also:   IIOMetadata.getMetadataFormatNames
See Also:   IIOMetadata.getAsTree
See Also:   IIOMetadata.setFromTree




reset
abstract public void reset()(Code)
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.
exception:
  IllegalStateException - if this object is read-only.
See Also:   javax.imageio.ImageReader.getStreamMetadata
See Also:   javax.imageio.ImageReader.getImageMetadata
See Also:   javax.imageio.ImageWriter.getDefaultStreamMetadata
See Also:   javax.imageio.ImageWriter.getDefaultImageMetadata



setController
public void setController(IIOMetadataController controller)(Code)
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
See Also:   IIOMetadata.getController
See Also:   IIOMetadata.getDefaultController
See Also:   IIOMetadata.hasController
See Also:   IIOMetadata.activateController()




setFromTree
public void setFromTree(String formatName, Node root) throws IIOInvalidTreeException(Code)
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.
Parameters:
  root - an XML DOM Node object forming theroot of a tree.
exception:
  IllegalStateException - if this object is read-only.
exception:
  IllegalArgumentException - if formatNameis null or is not one of the names returned bygetMetadataFormatNames.
exception:
  IllegalArgumentException - if root isnull.
exception:
  IIOInvalidTreeException - if the tree cannot be parsedsuccessfully using the rules of the given format.
See Also:   IIOMetadata.getMetadataFormatNames
See Also:   IIOMetadata.getAsTree
See Also:   IIOMetadata.mergeTree




Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.