Class ProductIOPlugInManager

java.lang.Object
org.esa.snap.core.dataio.ProductIOPlugInManager

public class ProductIOPlugInManager extends Object
The ProductIOPlugInManager 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 Details

    • ProductIOPlugInManager

      protected ProductIOPlugInManager()
      Protected constructor - singleton
  • Method Details

    • 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 be null
      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 is null, 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 be null
      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 is null, 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 a String[] 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 a String[] 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.