org.esa.beam.framework.processor
Class Processor

java.lang.Object
  extended by org.esa.beam.framework.processor.Processor

Deprecated. since BEAM 4.11. Use the Graph Processing Framework instead.

@Deprecated
public abstract class Processor
extends Object

Base class for all scientific processors using the processor framework. Override this class to create new processors.


Constructor Summary
protected Processor()
          Deprecated. Constructs a new processor with default parameters.
 
Method Summary
 boolean addProcessorStatusListener(ProcessorStatusListener listener)
          Deprecated. Adds a ProcessorStatusListener to this processor runner.
protected  void addToBandNamesToCopy(String bandName)
          Deprecated. Adds the band name to the internal list of band which shall be copied.
protected  void checkParamNotNull(Object param, String description)
          Deprecated. Checks that the given parameter is not null.
protected  void cleanupAfterFailure()
          Deprecated. Called after an exception is caught during the processing to give the processor an opportuninty to perform "after-crash-cleanup"
protected  void copyBand(String bandName, Product inputProduct, Product outputProduct)
          Deprecated. Copies the band with the given bandName from the inputProduct to the outputProduct, if the band exists in the inputProduct.
protected  void copyBandData(String[] bandNames, Product inputProduct, Product outputProduct, com.bc.ceres.core.ProgressMonitor pm)
          Deprecated. Copies the data for the bands with the given band names from input product to output product.
protected  void copyBandData(String bandName, Product inputProduct, Product outputProduct, com.bc.ceres.core.ProgressMonitor pm)
          Deprecated. Copies the data for the band with the given band name from input product to output product.
protected  void copyFlagBandData(Product inputProduct, Product outputProduct, com.bc.ceres.core.ProgressMonitor pm)
          Deprecated. since BEAM 4.6.2, use copyFlagBands(Product, Product) instead.
protected  void copyFlagBands(Product inputProduct, Product outputProduct)
          Deprecated. Copies all flag bands together with their flagcoding from the input product to the outout product.
protected  void copyGeoCoding(Product inputProduct, Product outputProduct)
          Deprecated. Copies the geo-coding from the input to the output product.
protected  void copyRequestMetaData(Product outputProduct)
          Deprecated.  
 ProcessorUI createUI()
          Deprecated. Creates the UI for the processor.
protected  void fireStatusChanged(int oldStatus)
          Deprecated. Dispatches a status changed message to all listeners attached.
 File getAuxdataInstallDir()
          Deprecated.  
protected  String[] getBandNamesToCopy()
          Deprecated. Gets all band names which shall be copied to the output product.
 String getCompletionMessage()
          Deprecated. Retrieve a message to be displayed on completion.
abstract  String getCopyrightInformation()
          Deprecated. Retrieves copyright information of the processor
 int getCurrentStatus()
          Deprecated. Returns the current state of this processor.
 File getDefaultAuxdataInstallDir()
          Deprecated.  
 String getDefaultHelpId()
          Deprecated.  
 String getDefaultHelpSetPath()
          Deprecated.  
abstract  String getName()
          Deprecated. Retrieves the name of the processor
 JFrame getParentFrame()
          Deprecated. Retrieves the parent frame containing the processor specific UI
 int getProgressDepth()
          Deprecated. Gets the number of different progress levels during the processing.
 String getProgressMessage(Request request)
          Deprecated. Gets a progress message for the request passed in.
 Request getRequest()
          Deprecated. Retrieves the current request.
 RequestElementFactory getRequestElementFactory()
          Deprecated. Retrieves the request element facory for this processor.
 String getResourceBundleName()
          Deprecated. Gets the name of the resource bundle to be used for the application.
 String getSymbolicName()
          Deprecated. Returns the symbolic name of the processor.
 String getUITitle()
          Deprecated. Retrieves the title to be shown in the user interface.
abstract  String getVersion()
          Deprecated. Retrieves a version string of the processor
 String[] getWarningMessages()
          Deprecated. Retrieves the warning messages that occurred during processing (if any).
 void initProcessor()
          Deprecated. Initializes the processor.
 void installAuxdata()
          Deprecated.  
protected  void installAuxdata(URL sourceLocation, String sourceRelPath, File auxdataInstallDir)
          Deprecated.  
protected  void installAuxdata(URL sourceLocation, String relSourcePath, URL targetLocation)
          Deprecated. in 4.1, use installAuxdata(java.net.URL, String, java.io.File) instead
 boolean isAborted()
          Deprecated. Retrieves whether the processor has the aborted flag set - or not.
 boolean isFailed()
          Deprecated. Retrieves whether the processor has the failed flag set - or not.
protected  Product loadInputProduct(int index)
          Deprecated.  
protected  void logHeader()
          Deprecated. Logs the processor specific logging file header information.
protected  void logRequest()
          Deprecated. Logs the request currently used to the logging file.
 void printUsage()
          Deprecated. Prints a general help message when no commandline is supplied
 void process()
          Deprecated. in 4.0, override process(com.bc.ceres.core.ProgressMonitor) instead
 void process(com.bc.ceres.core.ProgressMonitor pm)
          Deprecated. Worker method.
 void processRequest(Request request)
          Deprecated. in 4.0, use processRequest(Request, ProgressMonitor)
 void processRequest(Request request, com.bc.ceres.core.ProgressMonitor pm)
          Deprecated. Template method.
 void removeProcessorStatusListener(ProcessorStatusListener listener)
          Deprecated. Removes a ProcessorStatusListener from this product.
protected  void setAuxdataInstallDir(File auxdataInstallDir)
          Deprecated.  
protected  void setAuxdataInstallDir(String auxdataDirPropertyName, File defaultAuxdataInstallDir)
          Deprecated.  
 void setCurrentStatus(int state)
          Deprecated. Sets the current state of this processor.
 void setDefaultHelpId(String defaultHelpId)
          Deprecated.  
 void setDefaultHelpSetPath(String defaultHelpSetPath)
          Deprecated.  
 void setParentFrame(JFrame parent)
          Deprecated. Sets the UI parent frame containing the processor specific UI.
 void setRequest(Request request)
          Deprecated. Initializes the processor.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Processor

protected Processor()
Deprecated. 
Constructs a new processor with default parameters.

Method Detail

getRequest

public final Request getRequest()
Deprecated. 
Retrieves the current request.


isAborted

public final boolean isAborted()
Deprecated. 
Retrieves whether the processor has the aborted flag set - or not.


isFailed

public final boolean isFailed()
Deprecated. 
Retrieves whether the processor has the failed flag set - or not.


getCurrentStatus

public int getCurrentStatus()
Deprecated. 
Returns the current state of this processor.

Returns:
the current state, normally always one of the PSTATE_XXX constants defined in this class.

getWarningMessages

public String[] getWarningMessages()
Deprecated. 
Retrieves the warning messages that occurred during processing (if any). This string is shown in the application dialog popping up after the processor ended processing with warnings. Override to perform processor specific warning messages.

Returns:
the messages

setRequest

public void setRequest(Request request)
Deprecated. 
Initializes the processor. Override to perform processor specific initializations.

Parameters:
request - the request to be processed next
Throws:
IllegalArgumentException - when called with null argument

getParentFrame

public JFrame getParentFrame()
Deprecated. 
Retrieves the parent frame containing the processor specific UI


getUITitle

public String getUITitle()
Deprecated. 
Retrieves the title to be shown in the user interface. Override this method to set a processor specific title string.


createUI

public ProcessorUI createUI()
                     throws ProcessorException
Deprecated. 
Creates the UI for the processor. Override to perform processor specific UI initializations.

Throws:
ProcessorException

getResourceBundleName

public String getResourceBundleName()
Deprecated. 
Gets the name of the resource bundle to be used for the application.

Returns:
the resource bundle's name or null if not set

getDefaultHelpId

public String getDefaultHelpId()
Deprecated. 

setDefaultHelpId

public void setDefaultHelpId(String defaultHelpId)
Deprecated. 

getDefaultHelpSetPath

public String getDefaultHelpSetPath()
Deprecated. 

setDefaultHelpSetPath

public void setDefaultHelpSetPath(String defaultHelpSetPath)
Deprecated. 

initProcessor

public void initProcessor()
                   throws ProcessorException
Deprecated. 
Initializes the processor. Override to perform processor specific initialization. Called by the framework after the logging is initialized.

Throws:
ProcessorException

process

public void process()
             throws ProcessorException
Deprecated. in 4.0, override process(com.bc.ceres.core.ProgressMonitor) instead

Throws:
ProcessorException

process

public void process(com.bc.ceres.core.ProgressMonitor pm)
             throws ProcessorException
Deprecated. 
Worker method. Override to perform processor specific processing

Throws:
ProcessorException

getName

public abstract String getName()
Deprecated. 
Retrieves the name of the processor


getSymbolicName

public String getSymbolicName()
Deprecated. 
Returns the symbolic name of the processor.


getVersion

public abstract String getVersion()
Deprecated. 
Retrieves a version string of the processor


getCopyrightInformation

public abstract String getCopyrightInformation()
Deprecated. 
Retrieves copyright information of the processor


processRequest

public void processRequest(Request request)
                    throws ProcessorException
Deprecated. in 4.0, use processRequest(Request, ProgressMonitor)

Throws:
ProcessorException

processRequest

public void processRequest(Request request,
                           com.bc.ceres.core.ProgressMonitor pm)
                    throws ProcessorException
Deprecated. 
Template method. Performa all actions needed to process one request. The following steps are run: Additionally the method traces the processor state according to the success or failure of the processing

Throws:
ProcessorException

addProcessorStatusListener

public boolean addProcessorStatusListener(ProcessorStatusListener listener)
Deprecated. 
Adds a ProcessorStatusListener to this processor runner. The ProcessorStatusListener is informed each time a processor in this processor runner fire an event.

Parameters:
listener - the listener to be added
Returns:
boolean if listener was added or not

removeProcessorStatusListener

public void removeProcessorStatusListener(ProcessorStatusListener listener)
Deprecated. 
Removes a ProcessorStatusListener from this product.


setParentFrame

public void setParentFrame(JFrame parent)
Deprecated. 
Sets the UI parent frame containing the processor specific UI.


printUsage

public void printUsage()
Deprecated. 
Prints a general help message when no commandline is supplied


getCompletionMessage

public String getCompletionMessage()
Deprecated. 
Retrieve a message to be displayed on completion.


setCurrentStatus

public void setCurrentStatus(int state)
Deprecated. 
Sets the current state of this processor. If the status changes, all registered ProcessorStatusListener are informed about the change.

Parameters:
state - the new state, normally always one of the PSTATE_XXX constants defined in this class.

getRequestElementFactory

public RequestElementFactory getRequestElementFactory()
Deprecated. 
Retrieves the request element facory for this processor. Override this method to provide a processor specific element factory.


getProgressDepth

public int getProgressDepth()
Deprecated. 
Gets the number of different progress levels during the processing. The value is used e.g. to set the number of progress bars in the processors UI. By default, 1 is returned.

Returns:
the number progress levels

getProgressMessage

public String getProgressMessage(Request request)
Deprecated. 
Gets a progress message for the request passed in. Override this method if you need custom messaging.

Parameters:
request -
Returns:
a progress message, never null

fireStatusChanged

protected void fireStatusChanged(int oldStatus)
Deprecated. 
Dispatches a status changed message to all listeners attached.

Parameters:
oldStatus - the status before the status change

logHeader

protected void logHeader()
Deprecated. 
Logs the processor specific logging file header information. Such as:

This method is called by the processor runner initially after a logging sink has been created.

The default implementation does nothing. Override this method to perform processor specific stuff.


logRequest

protected void logRequest()
Deprecated. 
Logs the request currently used to the logging file. This method is invoked by the processor framework each time before the process() method is invoked.


checkParamNotNull

protected void checkParamNotNull(Object param,
                                 String description)
                          throws ProcessorException
Deprecated. 
Checks that the given parameter is not null. When it is - throws a ProcessorException.

Parameters:
param - the parameter to be checked
description - a textual description of the parameter checked
Throws:
ProcessorException

cleanupAfterFailure

protected void cleanupAfterFailure()
Deprecated. 
Called after an exception is caught during the processing to give the processor an opportuninty to perform "after-crash-cleanup"


loadInputProduct

protected Product loadInputProduct(int index)
                            throws ProcessorException,
                                   IOException
Deprecated. 
Throws:
ProcessorException
IOException

copyRequestMetaData

protected void copyRequestMetaData(Product outputProduct)
Deprecated. 

copyFlagBandData

@Deprecated
protected final void copyFlagBandData(Product inputProduct,
                                                 Product outputProduct,
                                                 com.bc.ceres.core.ProgressMonitor pm)
                               throws IOException,
                                      ProcessorException
Deprecated. since BEAM 4.6.2, use copyFlagBands(Product, Product) instead.

Copies the flags bands data from input to output product

Throws:
IOException
ProcessorException

copyBandData

protected final void copyBandData(String[] bandNames,
                                  Product inputProduct,
                                  Product outputProduct,
                                  com.bc.ceres.core.ProgressMonitor pm)
                           throws IOException,
                                  ProcessorException
Deprecated. 
Copies the data for the bands with the given band names from input product to output product.

Parameters:
bandNames - the names for all the bands for which data will be copied.
inputProduct - the product that contains the source bands
outputProduct - the product that contains the destination bands
pm - a monitor to inform the user about progress
Throws:
IOException - if the data could not be copied because of an I/O error
ProcessorException - if the data could not be copied because any other reason

copyBandData

protected void copyBandData(String bandName,
                            Product inputProduct,
                            Product outputProduct,
                            com.bc.ceres.core.ProgressMonitor pm)
                     throws ProcessorException,
                            IOException
Deprecated. 
Copies the data for the band with the given band name from input product to output product.

Parameters:
bandName - the name of the bands which data will be copied.
inputProduct - the product that should contain the source band.
outputProduct - the product that should contain the destination band.
pm - a monitor to inform the user about progress
Throws:
IOException
ProcessorException

getBandNamesToCopy

protected String[] getBandNamesToCopy()
Deprecated. 
Gets all band names which shall be copied to the output product.

Returns:
The names of bands to be copied.
See Also:
addToBandNamesToCopy(String), copyBand(String, Product, Product), copyFlagBands(Product, Product)

addToBandNamesToCopy

protected void addToBandNamesToCopy(String bandName)
Deprecated. 
Adds the band name to the internal list of band which shall be copied.

Parameters:
bandName - The name of the band.
See Also:
getBandNamesToCopy(), copyBand(String, Product, Product), copyFlagBands(Product, Product)

copyBand

protected void copyBand(String bandName,
                        Product inputProduct,
                        Product outputProduct)
Deprecated. 
Copies the band with the given bandName from the inputProduct to the outputProduct, if the band exists in the inputProduct.

The band is added to the copy list by calling addToBandNamesToCopy(bandName).

Parameters:
bandName - The name of the band to be copied.
inputProduct - The input product.
outputProduct - The output product.
See Also:
copyBandData(String[], Product, Product, ProgressMonitor), (String), getBandNamesToCopy()

copyGeoCoding

protected void copyGeoCoding(Product inputProduct,
                             Product outputProduct)
Deprecated. 
Copies the geo-coding from the input to the output product.

Parameters:
inputProduct - The input product.
outputProduct - The output product.

copyFlagBands

protected void copyFlagBands(Product inputProduct,
                             Product outputProduct)
Deprecated. 
Copies all flag bands together with their flagcoding from the input product to the outout product. The band will be remembered in a list which can be retrieved by getBandNamesToCopy() and copying with the copyBandData(String[], Product, Product, ProgressMonitor) method.

Parameters:
inputProduct - The input product.
outputProduct - The output product.

installAuxdata

protected void installAuxdata(URL sourceLocation,
                              String relSourcePath,
                              URL targetLocation)
Deprecated. in 4.1, use installAuxdata(java.net.URL, String, java.io.File) instead


installAuxdata

public void installAuxdata()
                    throws ProcessorException
Deprecated. 
Throws:
ProcessorException

installAuxdata

protected void installAuxdata(URL sourceLocation,
                              String sourceRelPath,
                              File auxdataInstallDir)
                       throws IOException
Deprecated. 
Throws:
IOException

getDefaultAuxdataInstallDir

public File getDefaultAuxdataInstallDir()
Deprecated. 

getAuxdataInstallDir

public File getAuxdataInstallDir()
Deprecated. 

setAuxdataInstallDir

protected void setAuxdataInstallDir(File auxdataInstallDir)
Deprecated. 

setAuxdataInstallDir

protected void setAuxdataInstallDir(String auxdataDirPropertyName,
                                    File defaultAuxdataInstallDir)
Deprecated. 


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