NASA World Wind

gov.nasa.worldwind.data
Class AbstractDataRasterReader

java.lang.Object
  extended by gov.nasa.worldwind.avlist.AVListImpl
      extended by gov.nasa.worldwind.data.AbstractDataRasterReader
All Implemented Interfaces:
AVList, DataRasterReader
Direct Known Subclasses:
BILRasterReader, DDSRasterReader, DTEDRasterReader, GDALDataRasterReader, GeotiffRasterReader, ImageIORasterReader, RPFRasterReader

public abstract class AbstractDataRasterReader
extends AVListImpl
implements DataRasterReader

Abstract base class for most DataRasterReader implementations.


Field Summary
protected  String description
           
protected  String[] mimeTypes
           
protected  String[] suffixes
           
 
Constructor Summary
protected AbstractDataRasterReader(String description)
           
  AbstractDataRasterReader(String[] mimeTypes, String[] suffixes)
           
  AbstractDataRasterReader(String description, String[] mimeTypes, String[] suffixes)
           
 
Method Summary
 boolean canRead(Object source, AVList params)
          Indicates whether this reader can read a specified data source.
protected  boolean canReadSuffix(Object source)
           
protected abstract  boolean doCanRead(Object source, AVList params)
           
protected abstract  DataRaster[] doRead(Object source, AVList params)
           
protected abstract  void doReadMetadata(Object source, AVList params)
           
 String getDescription()
          
 String[] getMimeTypes()
           
 String[] getSuffixes()
          
 boolean isElevationsRaster(Object source, AVList params)
          Indicates whether a data source is elevation data.
 boolean isImageryRaster(Object source, AVList params)
          Indicates whether a data source is imagery.
 DataRaster[] read(Object source, AVList params)
          Reads and returns the DataRaster instances from a data source.
 AVList readMetadata(Object source, AVList params)
          Reads and returns the metadata from a data source.
protected  String validateMetadata(Object source, AVList params)
           
 
Methods inherited from class gov.nasa.worldwind.avlist.AVListImpl
addPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getBooleanValue, getBooleanValue, getChangeSupport, getDoubleValue, getDoubleValue, getEntries, getIntegerValue, getIntegerValue, getLongValue, getLongValue, getRestorableStateForAVPair, getStringValue, getStringValue, getStringValue, getValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue, setValues
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface gov.nasa.worldwind.avlist.AVList
addPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getEntries, getStringValue, getValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue, setValues
 

Field Detail

description

protected final String description

mimeTypes

protected final String[] mimeTypes

suffixes

protected final String[] suffixes
Constructor Detail

AbstractDataRasterReader

protected AbstractDataRasterReader(String description)

AbstractDataRasterReader

public AbstractDataRasterReader(String[] mimeTypes,
                                String[] suffixes)

AbstractDataRasterReader

public AbstractDataRasterReader(String description,
                                String[] mimeTypes,
                                String[] suffixes)
Method Detail

canRead

public boolean canRead(Object source,
                       AVList params)
Indicates whether this reader can read a specified data source. The source may be one of the following:
  • InputStream
  • URL

  • canReadSuffix

    protected boolean canReadSuffix(Object source)

    doCanRead

    protected abstract boolean doCanRead(Object source,
                                         AVList params)

    doRead

    protected abstract DataRaster[] doRead(Object source,
                                           AVList params)
                                    throws IOException
    Throws:
    IOException

    doReadMetadata

    protected abstract void doReadMetadata(Object source,
                                           AVList params)
                                    throws IOException
    Throws:
    IOException

    getDescription

    public String getDescription()

    Specified by:
    getDescription in interface DataRasterReader

    getMimeTypes

    public String[] getMimeTypes()

    getSuffixes

    public String[] getSuffixes()

    Specified by:
    getSuffixes in interface DataRasterReader

    isElevationsRaster

    public boolean isElevationsRaster(Object source,
                                      AVList params)
    Indicates whether a data source is elevation data. TODO: Identify when parameters must be passed. The source may be one of the following:
  • InputStream
  • URL

  • isImageryRaster

    public boolean isImageryRaster(Object source,
                                   AVList params)
    Indicates whether a data source is imagery. TODO: Identify when parameters must be passed. The source may be one of the following:
  • InputStream
  • URL

  • read

    public DataRaster[] read(Object source,
                             AVList params)
                      throws IOException
    Reads and returns the DataRaster instances from a data source. The source may be one of the following: The source may be one of the following:
  • InputStream
  • URL

  • readMetadata

    public AVList readMetadata(Object source,
                               AVList params)
                        throws IOException
    Reads and returns the metadata from a data source. The source may be one of the following:
  • InputStream
  • URL

  • validateMetadata

    protected String validateMetadata(Object source,
                                      AVList params)

    NASA World Wind