org.esa.beam.framework.dataop.barithm
Class RasterDataSymbol

java.lang.Object
  extended by org.esa.beam.framework.dataop.barithm.RasterDataSymbol
All Implemented Interfaces:
Symbol
Direct Known Subclasses:
SingleFlagSymbol

public class RasterDataSymbol
extends Object
implements Symbol

Represents a read-only symbol. A symbol can be a named constant or variable. It has a return type an can be evaluated. This class is based on RasterData.

Within an expression, a reference to a symbol is created if the parser encounters a name and this name can be resolved through the parser's current namespace. The resulting term in this case is an instance of Term.Ref.

Version:
$Revision$ $Date$
Author:
Norman Fomferra (norman.fomferra@brockmann-consult.de)

Nested Class Summary
static class RasterDataSymbol.Source
          Lists possible source image types.
 
Field Summary
protected  ProductData data
           
static RasterDataSymbol.Source GEOPHYSICAL
           
static RasterDataSymbol.Source RAW
           
 
Constructor Summary
RasterDataSymbol(String symbolName, Mask mask)
           
RasterDataSymbol(String symbolName, RasterDataNode raster, RasterDataSymbol.Source source)
           
 
Method Summary
 boolean evalB(EvalEnv env)
          Evaluates this symbol to a boolean value.
 double evalD(EvalEnv env)
          Evaluates this symbol to a double value.
 int evalI(EvalEnv env)
          Evaluates this symbol to an int value.
 String evalS(EvalEnv env)
          Evaluates this symbol to a String value.
 String getName()
          Gets the symbol's name.
 RasterDataNode getRaster()
           
 int getRetType()
          Gets the symbol's return type.
 RasterDataSymbol.Source getSource()
           
 void setData(Object data)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RAW

public static final RasterDataSymbol.Source RAW

GEOPHYSICAL

public static final RasterDataSymbol.Source GEOPHYSICAL

data

protected ProductData data
Constructor Detail

RasterDataSymbol

public RasterDataSymbol(String symbolName,
                        Mask mask)

RasterDataSymbol

public RasterDataSymbol(String symbolName,
                        RasterDataNode raster,
                        RasterDataSymbol.Source source)
Method Detail

getName

public String getName()
Description copied from interface: Symbol
Gets the symbol's name.

Specified by:
getName in interface Symbol
Returns:
the name, should never be null

getRetType

public int getRetType()
Description copied from interface: Symbol
Gets the symbol's return type.

Specified by:
getRetType in interface Symbol
Returns:
the type, should always be one of the TYPE_X constants defined in the Term class.

getSource

public RasterDataSymbol.Source getSource()
Returns:
The source image type.
Since:
BEAM 4.7

getRaster

public RasterDataNode getRaster()

setData

public void setData(Object data)

evalB

public boolean evalB(EvalEnv env)
              throws EvalException
Description copied from interface: Symbol
Evaluates this symbol to a boolean value.

Specified by:
evalB in interface Symbol
Parameters:
env - the application dependant environment.
Returns:
a boolean value
Throws:
EvalException - if the evaluation fails

evalI

public int evalI(EvalEnv env)
          throws EvalException
Description copied from interface: Symbol
Evaluates this symbol to an int value.

Specified by:
evalI in interface Symbol
Parameters:
env - the application dependant environment.
Returns:
an int value
Throws:
EvalException - if the evaluation fails

evalD

public double evalD(EvalEnv env)
             throws EvalException
Description copied from interface: Symbol
Evaluates this symbol to a double value.

Specified by:
evalD in interface Symbol
Parameters:
env - the application dependant environment.
Returns:
a double value
Throws:
EvalException - if the evaluation fails

evalS

public String evalS(EvalEnv env)
             throws EvalException
Description copied from interface: Symbol
Evaluates this symbol to a String value.

Specified by:
evalS in interface Symbol
Parameters:
env - the application dependant environment.
Returns:
a double value
Throws:
EvalException - if the evaluation fails


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