Package org.esa.snap.core.dataio.rgb
Class ImageProductReaderPlugIn
- java.lang.Object
-
- org.esa.snap.core.dataio.rgb.ImageProductReaderPlugIn
-
- All Implemented Interfaces:
ProductIOPlugIn
,ProductReaderPlugIn
public class ImageProductReaderPlugIn extends Object implements ProductReaderPlugIn
-
-
Field Summary
Fields Modifier and Type Field Description static String
FORMAT_NAME
-
Constructor Summary
Constructors Constructor Description ImageProductReaderPlugIn()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ProductReader
createReaderInstance()
Creates an instance of the actual product reader class.DecodeQualification
getDecodeQualification(Object object)
Gets the qualification of the product reader to decode a given input object.String[]
getDefaultFileExtensions()
Gets the default file extensions associated with each of the format names returned by theProductIOPlugIn.getFormatNames()
method.String
getDescription(Locale name)
Gets a short description of this plug-in.String[]
getFormatNames()
Gets the names of the product formats handled by this product I/O plug-in.Class[]
getInputTypes()
Returns an array containing the classes that represent valid input types for this reader.SnapFileFilter
getProductFileFilter()
Gets an instance ofSnapFileFilter
for use in aJFileChooser
.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.esa.snap.core.dataio.ProductReaderPlugIn
getMetadataInspector
-
-
-
-
Field Detail
-
FORMAT_NAME
public static final String FORMAT_NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
getFormatNames
public String[] getFormatNames()
Description copied from interface:ProductIOPlugIn
Gets the names of the product formats handled by this product I/O plug-in.- Specified by:
getFormatNames
in interfaceProductIOPlugIn
- Returns:
- the names of the product formats handled by this product I/O plug-in, never
null
-
getDefaultFileExtensions
public String[] getDefaultFileExtensions()
Description copied from interface:ProductIOPlugIn
Gets the default file extensions associated with each of the format names returned by theProductIOPlugIn.getFormatNames()
method.The string array returned shall have the same length as the array returned by the
ProductIOPlugIn.getFormatNames()
method.The extensions returned in the string array also shall always include a leading colon ('.') character, e.g.
".hdf"
. If there is no default files extensions an empty array can be returned.- Specified by:
getDefaultFileExtensions
in interfaceProductIOPlugIn
- Returns:
- the default file extensions for this product I/O plug-in, never
null
-
getDescription
public String getDescription(Locale name)
Description copied from interface:ProductIOPlugIn
Gets a short description of this plug-in. If the given locale is set tonull
the default locale is used.In a GUI, the description returned could be used as tool-tip text.
- Specified by:
getDescription
in interfaceProductIOPlugIn
- Parameters:
name
- the local for the given description string, ifnull
the default locale is used- Returns:
- a textual description of this product reader/writer
-
getDecodeQualification
public DecodeQualification getDecodeQualification(Object object)
Description copied from interface:ProductReaderPlugIn
Gets the qualification of the product reader to decode a given input object. Things to consider when implementing this method:- make sure method always succeeds; ensure that no exception is thrown
- make sure that it is fast (terminates within milliseconds)
- make sure method is thread safe
- use the INTENDED qualification with care; generic readers shall return SUITABLE at most
- Specified by:
getDecodeQualification
in interfaceProductReaderPlugIn
- Parameters:
object
- the input object- Returns:
- the decode qualification
-
getInputTypes
public Class[] getInputTypes()
Description copied from interface:ProductReaderPlugIn
Returns an array containing the classes that represent valid input types for this reader.Instances of the classes returned in this array are valid objects for the
setInput
method of theProductReader
interface (the method will not throw anInvalidArgumentException
in this case).- Specified by:
getInputTypes
in interfaceProductReaderPlugIn
- Returns:
- an array containing valid input types, never
null
-
createReaderInstance
public ProductReader createReaderInstance()
Description copied from interface:ProductReaderPlugIn
Creates an instance of the actual product reader class. This method should never returnnull
.- Specified by:
createReaderInstance
in interfaceProductReaderPlugIn
- Returns:
- a new reader instance, never
null
-
getProductFileFilter
public SnapFileFilter getProductFileFilter()
Description copied from interface:ProductIOPlugIn
Gets an instance ofSnapFileFilter
for use in aJFileChooser
.- Specified by:
getProductFileFilter
in interfaceProductIOPlugIn
- Returns:
- a file filter or
null
if this plugin doesn't support file filter. If not provided, the reader will not be available in SNAP Desktop.
-
-