org.geotoolkit.image.io.plugin
Class NetcdfImageReader.Spi

Object
  extended by IIOServiceProvider
      extended by ImageReaderWriterSpi
          extended by ImageReaderSpi
              extended by SpatialImageReader.Spi
                  extended by StreamImageReader.Spi
                      extended by NetcdfImageReader.Spi
All Implemented Interfaces:
RegisterableService
Enclosing class:
NetcdfImageReader

public static class NetcdfImageReader.Spi
extends StreamImageReader.Spi

The service provider for NetcdfImageReader. This SPI provides necessary implementation for creating default NetcdfImageReader.

The default constructor initializes the fields to the values listed below. Users wanting different values should create a subclass of Spi and set the desired values in their constructor.

FieldValue
 ImageReaderWriterSpi.names   "NetCDF" 
 ImageReaderWriterSpi.MIMETypes   "application/netcdf", "application/x-netcdf" 
 ImageReaderWriterSpi.pluginClassName   "org.geotoolkit.image.io.plugin.NetcdfImageReader" 
 IIOServiceProvider.vendorName   "Geotoolkit.org" 
 IIOServiceProvider.version   Version.GEOTOOLKIT 
See super-class javadoc for remaining fields

Since:
3.08 (derived from 2.4)
Version:
3.15
Author:
Martin Desruisseaux (Geomatys), Antoine Hnawia (IRD)
Module:
coverage/geotk-coverageio-netcdf (download)    View source code for this class

Field Summary
 
Fields inherited from class ImageReaderSpi
inputTypes, STANDARD_INPUT_TYPE, writerSpiNames
 
Fields inherited from class ImageReaderWriterSpi
extraImageMetadataFormatClassNames, extraImageMetadataFormatNames, extraStreamMetadataFormatClassNames, extraStreamMetadataFormatNames, MIMETypes, names, nativeImageMetadataFormatClassName, nativeImageMetadataFormatName, nativeStreamMetadataFormatClassName, nativeStreamMetadataFormatName, pluginClassName, suffixes, supportsStandardImageMetadataFormat, supportsStandardStreamMetadataFormat
 
Fields inherited from class IIOServiceProvider
vendorName, version
 
Constructor Summary
NetcdfImageReader.Spi()
          Constructs a default NetcdfImageReader.Spi.
 
Method Summary
 boolean canDecodeInput(Object source)
          Checks if the specified input seems to be a readable NetCDF file.
 ImageReader createReaderInstance(Object extension)
          Returns an instance of the NetcdfImageReader implementation associated with this service provider.
 String getDescription(Locale locale)
          Returns a description for this provider.
 
Methods inherited from class SpatialImageReader.Spi
getImageMetadataFormat, getStreamMetadataFormat
 
Methods inherited from class ImageReaderSpi
createReaderInstance, getImageWriterSpiNames, getInputTypes, isOwnReader
 
Methods inherited from class ImageReaderWriterSpi
getExtraImageMetadataFormatNames, getExtraStreamMetadataFormatNames, getFileSuffixes, getFormatNames, getMIMETypes, getNativeImageMetadataFormatName, getNativeStreamMetadataFormatName, getPluginClassName, isStandardImageMetadataFormatSupported, isStandardStreamMetadataFormatSupported
 
Methods inherited from class IIOServiceProvider
getVendorName, getVersion, onDeregistration, onRegistration
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NetcdfImageReader.Spi

public NetcdfImageReader.Spi()
Constructs a default NetcdfImageReader.Spi. The fields are initialized as documented in the class javadoc. Subclasses can modify those values if desired.

For efficiency reasons, the fields are initialized to shared arrays. Subclasses can assign new arrays, but should not modify the default array content.

Method Detail

getDescription

public String getDescription(Locale locale)
Returns a description for this provider.

Specified by:
getDescription in class IIOServiceProvider
TODO:
Localize

canDecodeInput

public boolean canDecodeInput(Object source)
                       throws IOException
Checks if the specified input seems to be a readable NetCDF file. If the given input is a stream like ImageInputStream, then this method conservatively returns false because testing this stream would require copying it to a temporary file.

Specified by:
canDecodeInput in class ImageReaderSpi
Parameters:
source - the object (typically a File) to be decoded.
Returns:
true if it is likely that the given source can be decoded.
Throws:
IOException - If an error occurred while opening the file.

createReaderInstance

public ImageReader createReaderInstance(Object extension)
                                 throws IOException
Returns an instance of the NetcdfImageReader implementation associated with this service provider.

Specified by:
createReaderInstance in class ImageReaderSpi
Parameters:
extension - An optional extension object, which may be null.
Returns:
An image reader instance.
Throws:
IOException - if the attempt to instantiate the reader fails.


Copyright © 2009-2012 Geotoolkit.org. All Rights Reserved.