Package org.esa.snap.core.dataio
Class ProductIOPlugInManager
- java.lang.Object
-
- org.esa.snap.core.dataio.ProductIOPlugInManager
-
public class ProductIOPlugInManager extends Object
TheProductIOPlugInManager
class is used to manage all registered reader and writer plug-ins.This class implements the singleton design pattern, since only one manager instance is required in the system.
- Version:
- $Revision$ $Date$
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
ProductIOPlugInManager()
Protected constructor - singleton
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addReaderPlugIn(ProductReaderPlugIn readerPlugIn)
Registers the specified reader plug-in by adding it to this manager.void
addWriterPlugIn(ProductWriterPlugIn writerPlugIn)
Registers the specified writer plug-in by adding it to this manager.String[]
getAllProductReaderFormatStrings()
Returns aString[]
which contains all the product reader format strings of registered product readers, never Null.String[]
getAllProductWriterFormatStrings()
Returns aString[]
which contains all the product writer format strings of registered product writers, never Null.Iterator<ProductReaderPlugIn>
getAllReaderPlugIns()
Gets all registered reader plug-ins.Iterator<ProductWriterPlugIn>
getAllWriterPlugIns()
Gets all registered writer plug-ins.static ProductIOPlugInManager
getInstance()
Gets this's managers singleton instance.Iterator<ProductReaderPlugIn>
getReaderPlugIns(String formatName)
Gets all reader plug-ins which support the given format name.Iterator<ProductWriterPlugIn>
getWriterPlugIns(String formatName)
Gets all writer plug-ins which support the given format name.boolean
removeReaderPlugIn(ProductReaderPlugIn readerPlugIn)
Removes the first occurrence of the specified reader plug-in.boolean
removeWriterPlugIn(ProductWriterPlugIn writerPlugIn)
Removes the first occurrence of the specified writer plug-in.
-
-
-
Method Detail
-
getInstance
public static ProductIOPlugInManager getInstance()
Gets this's managers singleton instance.
-
getAllReaderPlugIns
public Iterator<ProductReaderPlugIn> getAllReaderPlugIns()
Gets all registered reader plug-ins. In the case that no reader plug-ins are registered, an empty iterator is returned.- Returns:
- an iterator containing all registered reader plug-ins
-
getReaderPlugIns
public Iterator<ProductReaderPlugIn> getReaderPlugIns(String formatName)
Gets all reader plug-ins which support the given format name. In the case that no reader plug-in is found, an empty iterator is returned.- Parameters:
formatName
- the name of the format, must not benull
- Returns:
- an iterator containing all reader plug-ins supporting the given format
-
addReaderPlugIn
public void addReaderPlugIn(ProductReaderPlugIn readerPlugIn)
Registers the specified reader plug-in by adding it to this manager. If the given reader plug-in isnull
, nothing happens.- Parameters:
readerPlugIn
- the reader plug-in to be added to this manager
-
removeReaderPlugIn
public boolean removeReaderPlugIn(ProductReaderPlugIn readerPlugIn)
Removes the first occurrence of the specified reader plug-in. If this manager does not contain the reader, it is unchanged.- Parameters:
readerPlugIn
- the reader plug-in to be removed from this manager, if present- Returns:
true
if this manager contained the specified reader plug-in
-
getAllWriterPlugIns
public Iterator<ProductWriterPlugIn> getAllWriterPlugIns()
Gets all registered writer plug-ins. In the case that no writer plug-ins are registered, an empty iterator is returned.- Returns:
- an iterator containing all registered writer plug-ins
-
getWriterPlugIns
public Iterator<ProductWriterPlugIn> getWriterPlugIns(String formatName)
Gets all writer plug-ins which support the given format name. In the case that no writer plug-in is found, an empty iterator is returned.- Parameters:
formatName
- the name of the format, must not benull
- Returns:
- an iterator containing all writer plug-ins supporting the given format
-
addWriterPlugIn
public void addWriterPlugIn(ProductWriterPlugIn writerPlugIn)
Registers the specified writer plug-in by adding it to this manager. If the given writer plug-in isnull
, nothing happens.- Parameters:
writerPlugIn
- the writer plug-in to be added to this manager
-
removeWriterPlugIn
public boolean removeWriterPlugIn(ProductWriterPlugIn writerPlugIn)
Removes the first occurrence of the specified writer plug-in. If this manager does not contain the writer, it is unchanged.- Parameters:
writerPlugIn
- the writer plug-in to be removed from this manager, if present- Returns:
true
if this manager contained the specified writer plug-in
-
getAllProductWriterFormatStrings
public String[] getAllProductWriterFormatStrings()
Returns aString[]
which contains all the product writer format strings of registered product writers, never Null.- Returns:
- a
String[]
which contains all the product writer format strings of registered product writers.
-
getAllProductReaderFormatStrings
public String[] getAllProductReaderFormatStrings()
Returns aString[]
which contains all the product reader format strings of registered product readers, never Null.- Returns:
- a
String[]
which contains all the product reader format strings of registered product reader.
-
-