Package com.twelvemonkeys.imageio
Class AbstractMetadata
- java.lang.Object
-
- javax.imageio.metadata.IIOMetadata
-
- com.twelvemonkeys.imageio.AbstractMetadata
-
- All Implemented Interfaces:
java.lang.Cloneable
- Direct Known Subclasses:
BMPMetadata,JPEGImage10Metadata,PSDMetadata,StandardImageMetadataSupport,TIFFImageMetadata
public abstract class AbstractMetadata extends javax.imageio.metadata.IIOMetadata implements java.lang.CloneableAbstractMetadata- Version:
- $Id: AbstractMetadata.java,v 1.0 Nov 13, 2009 1:02:12 AM haraldk Exp$
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractMetadata()protectedAbstractMetadata(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 voidassertMutable()Asserts that this meta data is mutable.org.w3c.dom.NodegetAsTree(java.lang.String formatName)protected org.w3c.dom.NodegetNativeTree()Default implementation that throwsUnsupportedOperationException.booleanisReadOnly()Default implementation returnstrue.voidmergeTree(java.lang.String formatName, org.w3c.dom.Node root)voidreset()protected static java.lang.StringtoListString(short[] values)protected voidvalidateFormatName(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:
isReadOnlyin classjavax.imageio.metadata.IIOMetadata- Returns:
true.
-
getAsTree
public org.w3c.dom.Node getAsTree(java.lang.String formatName)
- Specified by:
getAsTreein 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:
mergeTreein classjavax.imageio.metadata.IIOMetadata- Throws:
javax.imageio.metadata.IIOInvalidTreeException
-
reset
public void reset()
- Specified by:
resetin 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)
-
-