Package org.esa.snap.core.dataop.barithm
Class RasterDataSymbol
- java.lang.Object
-
- org.esa.snap.core.dataop.barithm.RasterDataSymbol
-
- Direct Known Subclasses:
SingleFlagSymbol
public class RasterDataSymbol extends Object implements Symbol, Cloneable
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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
RasterDataSymbol.Source
Lists possible source image types.
-
Field Summary
Fields Modifier and Type Field Description protected ProductData
data
static RasterDataSymbol.Source
GEOPHYSICAL
static RasterDataSymbol.Source
RAW
-
Constructor Summary
Constructors Constructor Description RasterDataSymbol(String symbolName, Mask mask)
RasterDataSymbol(String symbolName, RasterDataNode raster, RasterDataSymbol.Source source)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RasterDataSymbol
clone()
boolean
evalB(EvalEnv env)
Evaluates this symbol to aboolean
value.double
evalD(EvalEnv env)
Evaluates this symbol to adouble
value.int
evalI(EvalEnv env)
Evaluates this symbol to anint
value.String
evalS(EvalEnv env)
Evaluates this symbol to aString
value.String
getName()
Gets the symbol's name.RasterDataNode
getRaster()
int
getRetType()
Gets the symbol's return type.RasterDataSymbol.Source
getSource()
boolean
isConst()
void
setData(Object data)
-
-
-
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, RasterDataNode raster, RasterDataSymbol.Source source)
-
-
Method Detail
-
getRetType
public int getRetType()
Description copied from interface:Symbol
Gets the symbol's return type.- Specified by:
getRetType
in interfaceSymbol
- Returns:
- the type, should always be one of the
TYPE_
X constants defined in theTerm
class.
-
isConst
public boolean isConst()
-
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 aboolean
value.- Specified by:
evalB
in interfaceSymbol
- 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 anint
value.- Specified by:
evalI
in interfaceSymbol
- 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 adouble
value.- Specified by:
evalD
in interfaceSymbol
- 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 aString
value.- Specified by:
evalS
in interfaceSymbol
- Parameters:
env
- the application dependant environment.- Returns:
- a
double
value - Throws:
EvalException
- if the evaluation fails
-
clone
public RasterDataSymbol clone()
-
-