org.esa.beam.framework.dataio
Class ProductIOPlugInManager

java.lang.Object
  extended by org.esa.beam.framework.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$
Author:
Norman Fomferra

Constructor Summary
protected ProductIOPlugInManager()
          Protected constructor - singleton
 
Method Summary
 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[] getAllProductWriterFormatStrings()
          Returns a String[] 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProductIOPlugInManager

protected ProductIOPlugInManager()
Protected constructor - singleton

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 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 never Null.

Returns:
a String[] which contains all the product writer format strings of registered product writers.


Copyright © 2002-2012 Brockmann Consult GmbH. All Rights Reserved.