001: package it.geosolutions.imageio.plugins.jhdf;
002:
003: import it.geosolutions.imageio.plugins.jhdf.pool.DatasetPoolManager;
004:
005: import java.io.IOException;
006: import java.util.Locale;
007:
008: import javax.imageio.ImageReader;
009: import javax.imageio.spi.ImageReaderSpi;
010:
011: /**
012: * WORK IN PROGRESS - NOT YET COMPLETED - ACTUALLY ABANDONED
013: */
014:
015: public class JHDFImageReaderSpi extends ImageReaderSpi {
016:
017: public final DatasetPoolManager dsPoolManager = new DatasetPoolManager();
018:
019: static final String[] suffixes = { "hdf" };
020:
021: static final String[] formatNames = { "HDF", "HDF4", "HDF5" };
022:
023: static final String[] MIMETypes = { "image/hdf" };
024:
025: static final String version = "1.0";
026:
027: static final String readerCN = "it.geosolutions.imageio.plugins.jhdf.JHDFImageReader";
028:
029: static final String vendorName = "GeoSolutions";
030:
031: // writerSpiNames
032: static final String[] wSN = { null };
033:
034: // StreamMetadataFormatNames and StreamMetadataFormatClassNames
035: static final boolean supportsStandardStreamMetadataFormat = false;
036:
037: static final String nativeStreamMetadataFormatName = null;
038:
039: static final String nativeStreamMetadataFormatClassName = null;
040:
041: static final String[] extraStreamMetadataFormatNames = { null };
042:
043: static final String[] extraStreamMetadataFormatClassNames = { null };
044:
045: // ImageMetadataFormatNames and ImageMetadataFormatClassNames
046: static final boolean supportsStandardImageMetadataFormat = false;
047:
048: static final String nativeImageMetadataFormatName = null;
049:
050: static final String nativeImageMetadataFormatClassName = null;
051:
052: static final String[] extraImageMetadataFormatNames = { null };
053:
054: static final String[] extraImageMetadataFormatClassNames = { null };
055:
056: public JHDFImageReaderSpi() {
057: super (
058: vendorName,
059: version,
060: formatNames,
061: suffixes,
062: MIMETypes,
063: readerCN, // readerClassName
064: STANDARD_INPUT_TYPE,
065: wSN, // writer Spi Names
066: supportsStandardStreamMetadataFormat,
067: nativeStreamMetadataFormatName,
068: nativeStreamMetadataFormatClassName,
069: extraStreamMetadataFormatNames,
070: extraStreamMetadataFormatClassNames,
071: supportsStandardImageMetadataFormat,
072: nativeImageMetadataFormatName,
073: nativeImageMetadataFormatClassName,
074: extraImageMetadataFormatNames,
075: extraImageMetadataFormatClassNames);
076: }
077:
078: /**
079: * This method checks if the provided input can be decoded from this SPI
080: */
081: public boolean canDecodeInput(Object input) throws IOException {
082: return true;
083: }
084:
085: /**
086: * Returns an instance of the JHDFImageReader
087: *
088: * @see javax.imageio.spi.ImageReaderSpi#createReaderInstance(java.lang.Object)
089: */
090: public ImageReader createReaderInstance(Object source)
091: throws IOException {
092: return new JHDFImageReader(this );
093: }
094:
095: /**
096: * @see javax.imageio.spi.IIOServiceProvider#getDescription(java.util.Locale)
097: */
098: public String getDescription(Locale locale) {
099: return new StringBuffer("JHDF Image Reader, version ").append(
100: version).toString();
101: }
102:
103: }
|