org.esa.beam.framework.processor
Class Request

java.lang.Object
  extended by org.esa.beam.framework.processor.Request
All Implemented Interfaces:
Serializable

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

@Deprecated
public class Request
extends Object
implements Serializable

The request class is a memory image of a single request in a request file. It is used to trigger processors and supply the information neede to perform the processing.

A request can contain the following entities:

See Also:
Serialized Form

Field Summary
static String METADATA_ATTRIB_NAME_PREFIX_INPUT_PRODUCT
          Deprecated.  
static String METADATA_ATTRIB_NAME_PREFIX_OUTPUT_PRODUCT
          Deprecated.  
static String METADATA_ATTRIB_NAME_VALUE
          Deprecated.  
static String METADATA_ELEM_NAME_INPUT_PRODUCTS
          Deprecated.  
static String METADATA_ELEM_NAME_OUTPUT_PRODUCTS
          Deprecated.  
static String METADATA_ELEM_NAME_PARAMETERS
          Deprecated.  
static String METADATA_ELEM_NAME_PROCESSING_REQUEST
          Deprecated.  
static String PREFIX_QUALIFIER
          Deprecated.  
 
Constructor Summary
Request()
          Deprecated. Constructs a new and empty request.
Request(ProductRef[] inputProducts, ProductRef[] outputProducts, Parameter[] parameters)
          Deprecated. Constructs a new request with the given input products, output products and processing parameters.
 
Method Summary
 void addInputProduct(ProductRef product)
          Deprecated. Adds an input product to the request.
 void addLogFileLocation(File logFile)
          Deprecated. Adds a logging file location to the curreent request.
 void addOutputProduct(ProductRef product)
          Deprecated. Adds an output product to the request.
 void addParameter(Parameter parameter)
          Deprecated. Adds a parameter to the request.
static void addProductAttribs(MetadataElement inputProductsElem, String s, ProductRef productRef)
          Deprecated.  
static void checkRequestType(Request request, String requestType)
          Deprecated. Checks if the given processing request is of the given request type and throws a processor exception if not.
 void clearInputProducts()
          Deprecated. Removes all input products from the request
 void clearLogFileLocations()
          Deprecated. Removes all logging file locations set in the request
 MetadataElement convertToMetadata()
          Deprecated. Converts this request to a metadata element.
 Parameter[] getAllParameters()
          Deprecated. Retrieves an array of all the parameters of this request.
 File getFile()
          Deprecated. Retrieves the request file from where this request originates.
 ProductRef getInputProductAt(int index)
          Deprecated. Retrieves the input product at a given index.
 File getLogFileLocationAt(int index)
          Deprecated. Retrieves the logging file location at a given index.
 int getNumInputProducts()
          Deprecated. Returns the number of input products contained in the request.
 int getNumLogFileLocations()
          Deprecated. Returns the number of logging file locations contained in the request.
 int getNumOutputProducts()
          Deprecated. Returns the number of output products contained in the request.
 int getNumParameters()
          Deprecated. Returns the number of parameters contained in the request.
 ProductRef getOutputProductAt(int index)
          Deprecated. Retrieves the output product at a given index.
 Parameter getParameter(String name)
          Deprecated. Retrieves a parameter by name.
 Parameter getParameterAt(int index)
          Deprecated. Retrieves the parameter at a given index.
 String getType()
          Deprecated. Retrieves the type of request.
 boolean isRequestType(String requestType)
          Deprecated. Tests whether or not this request is for the given request type.
 void removeInputProduct(ProductRef product)
          Deprecated. Removes an input product from the request.
 void removeLogFileLocation(File logFile)
          Deprecated. Removes a logging file location from the request.
 void removeOutputProduct(ProductRef product)
          Deprecated. Removes an output product from the request.
 void removeParameter(Parameter parameter)
          Deprecated. Removes a parameter from the request.
 void setFile(File requestFile)
          Deprecated. Sets the request file where this request originates
 void setType(String type)
          Deprecated. Sets the type of request.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

METADATA_ELEM_NAME_PROCESSING_REQUEST

public static final String METADATA_ELEM_NAME_PROCESSING_REQUEST
Deprecated. 
See Also:
Constant Field Values

METADATA_ELEM_NAME_INPUT_PRODUCTS

public static final String METADATA_ELEM_NAME_INPUT_PRODUCTS
Deprecated. 
See Also:
Constant Field Values

METADATA_ATTRIB_NAME_PREFIX_INPUT_PRODUCT

public static final String METADATA_ATTRIB_NAME_PREFIX_INPUT_PRODUCT
Deprecated. 
See Also:
Constant Field Values

METADATA_ATTRIB_NAME_PREFIX_OUTPUT_PRODUCT

public static final String METADATA_ATTRIB_NAME_PREFIX_OUTPUT_PRODUCT
Deprecated. 
See Also:
Constant Field Values

METADATA_ELEM_NAME_OUTPUT_PRODUCTS

public static final String METADATA_ELEM_NAME_OUTPUT_PRODUCTS
Deprecated. 
See Also:
Constant Field Values

METADATA_ELEM_NAME_PARAMETERS

public static final String METADATA_ELEM_NAME_PARAMETERS
Deprecated. 
See Also:
Constant Field Values

PREFIX_QUALIFIER

public static final String PREFIX_QUALIFIER
Deprecated. 
See Also:
Constant Field Values

METADATA_ATTRIB_NAME_VALUE

public static final String METADATA_ATTRIB_NAME_VALUE
Deprecated. 
See Also:
Constant Field Values
Constructor Detail

Request

public Request()
Deprecated. 
Constructs a new and empty request.


Request

public Request(ProductRef[] inputProducts,
               ProductRef[] outputProducts,
               Parameter[] parameters)
Deprecated. 
Constructs a new request with the given input products, output products and processing parameters.

Parameters:
inputProducts - array of input products
outputProducts - array of output products
parameters - array of parameters
Method Detail

addInputProduct

public void addInputProduct(ProductRef product)
Deprecated. 
Adds an input product to the request.

Parameters:
product - the product to be added
Throws:
IllegalArgumentException - when null is added

removeInputProduct

public void removeInputProduct(ProductRef product)
Deprecated. 
Removes an input product from the request.

Parameters:
product - the product to be removed

clearInputProducts

public void clearInputProducts()
Deprecated. 
Removes all input products from the request


getNumInputProducts

public int getNumInputProducts()
Deprecated. 
Returns the number of input products contained in the request.


getInputProductAt

public ProductRef getInputProductAt(int index)
Deprecated. 
Retrieves the input product at a given index.

Parameters:
index - the product index
Throws:
ArrayIndexOutOfBoundsException

addOutputProduct

public void addOutputProduct(ProductRef product)
Deprecated. 
Adds an output product to the request.

Parameters:
product - the product to be added
Throws:
IllegalArgumentException - when null is added

removeOutputProduct

public void removeOutputProduct(ProductRef product)
Deprecated. 
Removes an output product from the request.

Parameters:
product - the product to be removed

getNumOutputProducts

public int getNumOutputProducts()
Deprecated. 
Returns the number of output products contained in the request.


getOutputProductAt

public ProductRef getOutputProductAt(int index)
Deprecated. 
Retrieves the output product at a given index.

Parameters:
index - the product index
Throws:
ArrayIndexOutOfBoundsException

addLogFileLocation

public void addLogFileLocation(File logFile)
Deprecated. 
Adds a logging file location to the curreent request.

Parameters:
logFile - the logging file location.
Throws:
IllegalArgumentException - on null argument

removeLogFileLocation

public void removeLogFileLocation(File logFile)
Deprecated. 
Removes a logging file location from the request.

Parameters:
logFile - the logging file location to be removed

clearLogFileLocations

public void clearLogFileLocations()
Deprecated. 
Removes all logging file locations set in the request


getNumLogFileLocations

public int getNumLogFileLocations()
Deprecated. 
Returns the number of logging file locations contained in the request.


getLogFileLocationAt

public File getLogFileLocationAt(int index)
Deprecated. 
Retrieves the logging file location at a given index.

Parameters:
index - the logging file location index
Throws:
ArrayIndexOutOfBoundsException

addParameter

public void addParameter(Parameter parameter)
Deprecated. 
Adds a parameter to the request.

Parameters:
parameter - the parameter to be added
Throws:
IllegalArgumentException - when adding null parameter

removeParameter

public void removeParameter(Parameter parameter)
Deprecated. 
Removes a parameter from the request.

Parameters:
parameter - the parameter to be removed

getNumParameters

public int getNumParameters()
Deprecated. 
Returns the number of parameters contained in the request.


getParameterAt

public Parameter getParameterAt(int index)
Deprecated. 
Retrieves the parameter at a given index.

Parameters:
index - the parameter index
Throws:
ArrayIndexOutOfBoundsException

getParameter

public Parameter getParameter(String name)
Deprecated. 
Retrieves a parameter by name.

Parameters:
name - the parameter name to be found. Must not be null or empty
Returns:
a parameter with the given name or null if no parameter with the given name is found.

getAllParameters

public Parameter[] getAllParameters()
Deprecated. 
Retrieves an array of all the parameters of this request.

Returns:
an array of parameter. Returns never null.

getType

public String getType()
Deprecated. 
Retrieves the type of request.


setType

public void setType(String type)
Deprecated. 
Sets the type of request.

Parameters:
type - the request type
Throws:
IllegalArgumentException - when passing null as argument

getFile

public File getFile()
Deprecated. 
Retrieves the request file from where this request originates. Or null when the file information is not set yet.


setFile

public void setFile(File requestFile)
Deprecated. 
Sets the request file where this request originates

Parameters:
requestFile - the file

checkRequestType

public static void checkRequestType(Request request,
                                    String requestType)
                             throws ProcessorException
Deprecated. 
Checks if the given processing request is of the given request type and throws a processor exception if not.

Parameters:
request - the request for checking type
requestType - the request type for check
Throws:
ProcessorException - if the given request to check is null
ProcessorException - on invalid request type
IllegalArgumentException - if the given requestType is null or empty

isRequestType

public boolean isRequestType(String requestType)
Deprecated. 
Tests whether or not this request is for the given request type.

Parameters:
requestType - the request type for check
Returns:
true if so, otherwise false.

convertToMetadata

public MetadataElement convertToMetadata()
Deprecated. 
Converts this request to a metadata element.

Returns:
a metadata element representation of this processing request, never null.

addProductAttribs

public static void addProductAttribs(MetadataElement inputProductsElem,
                                     String s,
                                     ProductRef productRef)
Deprecated. 


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