org.geotools.coverage.grid.io.imageio
Class IIOMetadataDumper

java.lang.Object
  extended by org.geotools.coverage.grid.io.imageio.IIOMetadataDumper

public final class IIOMetadataDumper
extends java.lang.Object

Utility calss that can be used to dump a DOM tree in a formatted way.

It is useful for inspecting the metadata inside GeoTiff files.

Since:
2.3.x
Author:
Simone Giannecchini

Constructor Summary
IIOMetadataDumper(javax.imageio.metadata.IIOMetadataNode rootNode)
          Constructor for a IIOMetadataDumper accepting an IIOMetadataNode.
IIOMetadataDumper(javax.imageio.metadata.IIOMetadata metadata, java.lang.String name)
          Constructor for a IIOMetadataDumper accepting and IIOMetadata and a String for the format name of the XML metadata to use.
 
Method Summary
 java.lang.String getFormatName()
          Retrieves the name of the format we want to get the XML representation for.
 java.lang.String getMetadata()
          Allows me to get the generated XML representation for the underlying tree;
 void setFormatName(java.lang.String formatName)
          Sets the name of the format we want to get the XML representation for.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IIOMetadataDumper

public IIOMetadataDumper(javax.imageio.metadata.IIOMetadata metadata,
                         java.lang.String name)
Constructor for a IIOMetadataDumper accepting and IIOMetadata and a String for the format name of the XML metadata to use.

Parameters:
metadata - The metadta to display.
name - The format of the metaata to display.

IIOMetadataDumper

public IIOMetadataDumper(javax.imageio.metadata.IIOMetadataNode rootNode)
Constructor for a IIOMetadataDumper accepting an IIOMetadataNode. It has no way to choose the format of the metadata to parse since this choice has been alreadu done previously.

Parameters:
rootNode -
Method Detail

getMetadata

public java.lang.String getMetadata()
Allows me to get the generated XML representation for the underlying tree;

Returns:
A formatted XML string.

getFormatName

public java.lang.String getFormatName()
Retrieves the name of the format we want to get the XML representation for.

Returns:
The name of the format we want to get the XML representation for.

setFormatName

public void setFormatName(java.lang.String formatName)
Sets the name of the format we want to get the XML representation for.

This method causes a new generation of the string representation if the format is different from the one stored.

Parameters:
formatName - The name of the format we want to get the XML representation for.


Copyright © 1996-2010 Geotools. All Rights Reserved.