insensa.connections
Class CSubtraction

java.lang.Object
  extended by insensa.connections.AbstractConnection
      extended by insensa.connections.CSubtraction
All Implemented Interfaces:
ConnectionFileChanger, FileObserver, java.lang.Runnable

public class CSubtraction
extends AbstractConnection


Field Summary
private  boolean absolute
           
private  int divByZeroOption
           
private  float dummyValue
           
private  boolean ignoreNodataValues
           
private  CRasterFileInformation minuend
           
private  boolean relative
           
static int SET_DUMMY
           
static int SET_MAX_PRECISION
           
static int SET_NODATA
           
 
Fields inherited from class insensa.connections.AbstractConnection
E_OUTPUT_NAME, E_OUTPUT_PATH, fileNameList, id, ID, OUTPUT_NAME, OUTPUT_SET, outputFile, outputFileName, outputFileSet, rasterFileList, separator, used, USED, workerStatus, XML_ELEMENT_FILE
 
Constructor Summary
CSubtraction()
           
 
Method Summary
 boolean getAbsolute()
           
 org.jdom.Element getConnectionElement()
          Build a xml Element with the attributes id used fileset name output file name source files full name (absolute) output name output path (relative) .
 java.lang.String getConnectionName()
           
 AttributeTable getData()
           
 int getDivByZeroOption()
           
 float getDummyValue()
           
 boolean getIgnoreNodata()
           
 java.util.List<java.lang.String> getInfoDependencies()
           
 CRasterFileInformation getMinuend()
           
 boolean getRelative()
           
 void setAbsolute(boolean absolute)
           
 void setConnectionElement(org.jdom.Element eCon)
          WARNING:
In case that this Connection is unused, you have to set the sourceFileList before invoking this function

.
 void setDivByZeroOption(int divByZeroOption)
           
 void setDummyValue(float dummyValue)
           
 void setIgnoreNodata(boolean ignoreNodata)
           
 void setMinuend(CRasterFileInformation minuend)
           
 void setRelative(boolean relative)
           
 void write()
           
private  void writeInFile(CRasterFileInformation file)
          Minuend - Subtrahent = Differenz Rel = Differenz / Subtrahent.
 
Methods inherited from class insensa.connections.AbstractConnection
addAttributeValue, addElement, check, getChildElement, getFileNameList, getId, getOutputFile, getOutputFileName, getOutputFileSet, getRasterFileList, getSouceFileRelativePaths, getSourceFileList, getVariableList, isUsed, notifyDelete, run, setId, setOutputFile, setOutputFileName, setOutputFileSet, setSourceFileList, setUsed, setVariableList, setWorkerStatus, solveDependencies, solveDependencies, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

minuend

private CRasterFileInformation minuend

relative

private boolean relative

ignoreNodataValues

private boolean ignoreNodataValues

absolute

private boolean absolute

dummyValue

private float dummyValue

SET_NODATA

public static final int SET_NODATA
See Also:
Constant Field Values

SET_MAX_PRECISION

public static final int SET_MAX_PRECISION
See Also:
Constant Field Values

SET_DUMMY

public static final int SET_DUMMY
See Also:
Constant Field Values

divByZeroOption

private int divByZeroOption
Constructor Detail

CSubtraction

public CSubtraction()
Method Detail

getAbsolute

public boolean getAbsolute()
Returns:

getConnectionElement

public org.jdom.Element getConnectionElement()
Description copied from class: AbstractConnection
Build a xml Element with the attributes

getConnectionName

public java.lang.String getConnectionName()
Returns:
See Also:
ConnectionFileChanger.getConnectionName()

getData

public AttributeTable getData()
Specified by:
getData in interface ConnectionFileChanger
Overrides:
getData in class AbstractConnection
Returns:
See Also:
AbstractConnection.getData()

getDivByZeroOption

public int getDivByZeroOption()
Returns:

getDummyValue

public float getDummyValue()
Returns:

getIgnoreNodata

public boolean getIgnoreNodata()
Returns:

getInfoDependencies

public java.util.List<java.lang.String> getInfoDependencies()
Specified by:
getInfoDependencies in interface ConnectionFileChanger
Overrides:
getInfoDependencies in class AbstractConnection
Returns:
See Also:
AbstractConnection.getInfoDependencies()

getMinuend

public CRasterFileInformation getMinuend()
Returns:

getRelative

public boolean getRelative()
Returns:

setAbsolute

public void setAbsolute(boolean absolute)
Parameters:
absolute -

setConnectionElement

public void setConnectionElement(org.jdom.Element eCon)
                          throws java.io.IOException
Description copied from class: AbstractConnection
WARNING:
In case that this Connection is unused, you have to set the sourceFileList before invoking this function

.

Specified by:
setConnectionElement in interface ConnectionFileChanger
Overrides:
setConnectionElement in class AbstractConnection
Throws:
java.io.IOException
See Also:
AbstractConnection.setConnectionElement(org.jdom.Element)

setDivByZeroOption

public void setDivByZeroOption(int divByZeroOption)
Parameters:
divByZeroOption -

setDummyValue

public void setDummyValue(float dummyValue)
Parameters:
dummyValue -

setIgnoreNodata

public void setIgnoreNodata(boolean ignoreNodata)
Parameters:
ignoreNodata -

setMinuend

public void setMinuend(CRasterFileInformation minuend)
Parameters:
minuend -

setRelative

public void setRelative(boolean relative)
Parameters:
relative -

write

public void write()
           throws java.io.IOException,
                  org.jdom.JDOMException,
                  CRasterFileException
Throws:
java.io.IOException
org.jdom.JDOMException
CRasterFileException
See Also:
ConnectionFileChanger.write()

writeInFile

private void writeInFile(CRasterFileInformation file)
                  throws java.io.IOException,
                         CRasterFileException
Minuend - Subtrahent = Differenz Rel = Differenz / Subtrahent.

Parameters:
file -
Throws:
java.io.IOException
CRasterFileException