Package com.twelvemonkeys.imageio
Class AbstractMetadata
- java.lang.Object
-
- javax.imageio.metadata.IIOMetadata
-
- com.twelvemonkeys.imageio.AbstractMetadata
-
- All Implemented Interfaces:
java.lang.Cloneable
public abstract class AbstractMetadata extends javax.imageio.metadata.IIOMetadata implements java.lang.Cloneable
AbstractMetadata- Version:
- $Id: AbstractMetadata.java,v 1.0 Nov 13, 2009 1:02:12 AM haraldk Exp$
- Author:
- Harald Kuhr, last modified by $Author: haraldk$
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractMetadata()
protected
AbstractMetadata(boolean standardFormatSupported, java.lang.String nativeFormatName, java.lang.String nativeFormatClassName, java.lang.String[] extraFormatNames, java.lang.String[] extraFormatClassNames)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
assertMutable()
Asserts that this meta data is mutable.org.w3c.dom.Node
getAsTree(java.lang.String formatName)
protected org.w3c.dom.Node
getNativeTree()
Default implementation that throwsUnsupportedOperationException
.boolean
isReadOnly()
Default implementation returnstrue
.void
mergeTree(java.lang.String formatName, org.w3c.dom.Node root)
void
reset()
protected static java.lang.String
toListString(short[] values)
protected void
validateFormatName(java.lang.String formatName)
-
Methods inherited from class javax.imageio.metadata.IIOMetadata
activateController, getController, getDefaultController, getExtraMetadataFormatNames, getMetadataFormat, getMetadataFormatNames, getNativeMetadataFormatName, getStandardChromaNode, getStandardCompressionNode, getStandardDataNode, getStandardDimensionNode, getStandardDocumentNode, getStandardTextNode, getStandardTileNode, getStandardTransparencyNode, getStandardTree, hasController, isStandardMetadataFormatSupported, setController, setFromTree
-
-
-
-
Method Detail
-
isReadOnly
public boolean isReadOnly()
Default implementation returnstrue
. Mutable subclasses should override this method.- Specified by:
isReadOnly
in classjavax.imageio.metadata.IIOMetadata
- Returns:
true
.
-
getAsTree
public org.w3c.dom.Node getAsTree(java.lang.String formatName)
- Specified by:
getAsTree
in classjavax.imageio.metadata.IIOMetadata
-
getNativeTree
protected org.w3c.dom.Node getNativeTree()
Default implementation that throwsUnsupportedOperationException
. Subclasses that supports formats other than standard metadata should override this method.- Throws:
java.lang.UnsupportedOperationException
-
mergeTree
public void mergeTree(java.lang.String formatName, org.w3c.dom.Node root) throws javax.imageio.metadata.IIOInvalidTreeException
- Specified by:
mergeTree
in classjavax.imageio.metadata.IIOMetadata
- Throws:
javax.imageio.metadata.IIOInvalidTreeException
-
reset
public void reset()
- Specified by:
reset
in classjavax.imageio.metadata.IIOMetadata
-
assertMutable
protected final void assertMutable()
Asserts that this meta data is mutable.- Throws:
java.lang.IllegalStateException
- ifisReadOnly()
returnstrue
.
-
validateFormatName
protected final void validateFormatName(java.lang.String formatName)
-
toListString
protected static java.lang.String toListString(short[] values)
-
-