Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| deegree 2.4 (2010/11/11 10:47 build-27-official)
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.deegree.model.coverage.grid
Class AbstractGridCoverageWriter

    java.lang.Object
      org.deegree.model.coverage.grid.AbstractGridCoverageWriter

All Implemented Interfaces:
  GridCoverageWriter

Direct Known Subclasses:
  GeoTIFFGridCoverageWriter, GMLGridCoverageWriter, ImageGridCoverageWriter, XYZGridCoverageWriter

    public abstract class AbstractGridCoverageWriter

extends Object
implements GridCoverageWriter

Since:
  2.0
Version:
  $Revision: 18195 $, 1.0. $Revision: 18195 $, $Date: 2009-06-18 17:55:39 +0200 (Do, 18. Jun 2009) $
Author:
  Andreas Poth, last edited by: $Author: mschneider $

Field Summary
`protected Object` | `destination`
`protected Format` | `format`
`protected Map<String,Object>` | `metadata`

Constructor Summary
`AbstractGridCoverageWriter(Object destination, Map<String,Object> metadata, String[] subNames, String currentSubname, Format format)`

Method Summary
`String` | `getCurrentSubname()` Returns the name for the next grid coverage to be read from the output destination.
`Object` | `getDestination()` Returns the output destination.
`Format` | `getFormat()` Returns the format handled by this `GridCoverageWriter`.
`String[]` | `getMetadataNames()` Returns the list of metadata keywords associated with the output destination as a whole (not associated with any particular grid coverage).
`Object` | `getMetadataValue(String name)` Retrieve the metadata value for a given metadata name.
`String[]` | `listSubNames()` Retrieve the list of grid coverages contained within the input source.
`void` | `setCurrentSubname(String name)` Set the name for the next grid coverage to GridCoverageWriter.write(GridCoverage, GeneralParameterValue[]) within theoutput destination.
`void` | `setMetadataValue(String name, String value)` Sets the metadata value for a given metadata name.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface org.deegree.model.coverage.grid.GridCoverageWriter
`dispose, write`

Field Detail

### destination

    protected Object destination

### metadata

    protected Map<String,Object> metadata

### format

    protected Format format

Constructor Detail

### AbstractGridCoverageWriter

    public AbstractGridCoverageWriter(Object destination,
                                      Map<String,Object> metadata,
                                      String[] subNames,
                                      String currentSubname,
                                      Format format)

Parameters:
  `destination` -
  `metadata` -
  `subNames` -
  `currentSubname` -
  `format` -

Method Detail

### getFormat

    public Format getFormat()

  Returns the format handled by this `GridCoverageWriter`.

  Specified by:
    `getFormat` in interface `GridCoverageWriter`
  Returns:
    the format handled by this `GridCoverageWriter`.

### getDestination

    public Object getDestination()

  Returns the output destination. This is the object passed to the !unknown! method. It can be a `String`, an `OutputStream`, a `FileChannel`, etc.

  Specified by:
    `getDestination` in interface `GridCoverageWriter`
  Returns:
    the output destination

### getMetadataNames

    public String[] getMetadataNames()

  Returns the list of metadata keywords associated with the output destination as a whole (not associated with any particular grid coverage). If no metadata is allowed, the array will be empty.

  Specified by:
    `getMetadataNames` in interface `GridCoverageWriter`
  Returns:
    The list of metadata keywords for the output destination.
  revisit
    This javadoc may not apply thats well in the iterator scheme.

### getMetadataValue

    public Object getMetadataValue(String name)
                            throws IOException,
                                   MetadataNameNotFoundException

  Retrieve the metadata value for a given metadata name.

  Specified by:
    `getMetadataValue` in interface `GridCoverageWriter`
  Parameters:
    `name` - Metadata keyword for which to retrieve metadata.
  Returns:
    The metadata value for the given metadata name. Should be one of the name returned by `getMetadataNames()`.
  Throws:
    `IOException` - if an error occurs during reading.
    `MetadataNameNotFoundException` - if there is no value for the specified metadata name.
  revisit
    This javadoc may not apply thats well in the iterator scheme.

### setMetadataValue

    public void setMetadataValue(String name,
                                 String value)
                          throws IOException,
                                 MetadataNameNotFoundException

  Sets the metadata value for a given metadata name.

  Specified by:
    `setMetadataValue` in interface `GridCoverageWriter`
  Parameters:
    `name` - Metadata keyword for which to set the metadata.
    `value` - The metadata value for the given metadata name.
  Throws:
    `IOException` - if an error occurs during writing.
    `MetadataNameNotFoundException` - if the specified metadata name is not handled for this format.
  revisit
    This javadoc may not apply thats well in the iterator scheme.

### listSubNames

    public String[] listSubNames()
                          throws IOException

  Retrieve the list of grid coverages contained within the input source. Each grid can have a different coordinate system, number of dimensions and grid geometry. For example, a HDF-EOS file (GRID.HDF) contains 6 grid coverages each having a different projection. An empty array will be returned if no sub names exist.

  Specified by:
    `listSubNames` in interface `GridCoverageWriter`
  Returns:
    The list of grid coverages contained within the input source.
  Throws:
    `IOException` - if an error occurs during reading.
  revisit
    The javadoc should also be more explicit about hierarchical format. Should the names be returned as paths? Explain what to return if the GridCoverage are accessible by index only. A proposal is to name them "grid1", "grid2", etc.

### getCurrentSubname

    public String getCurrentSubname()
                             throws IOException

  Returns the name for the next grid coverage to be read from the output destination.

  Specified by:
    `getCurrentSubname` in interface `GridCoverageWriter`
  Returns:
    the name for the next grid coverage to be
  Throws:
    `IOException` - if an error occurs during reading.
  revisit
    Do we need a special method for that, or should it be a metadata?

### setCurrentSubname

    public void setCurrentSubname(String name)
                           throws IOException

  Set the name for the next grid coverage to GridCoverageWriter.write(GridCoverage, GeneralParameterValue[]) within theoutput destination. The subname can been fetch later at reading time.

  Specified by:
    `setCurrentSubname` in interface `GridCoverageWriter`
  Throws:
    `IOException` - if an error occurs during writing.
  revisit
    Do we need a special method for that, or should it be a metadata?

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| deegree 2.4 (2010/11/11 10:47 build-27-official)
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org