insensa.connections
Class CErrorIndexation

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

public class CErrorIndexation
extends AbstractConnection
implements ConnectionFileChanger


Nested Class Summary
static class CErrorIndexation.Assignment
           
static class CErrorIndexation.Condition
           
 class CErrorIndexation.CThreshold
           
static class CErrorIndexation.Mode
           
 
Field Summary
static int BEST_CASE
           
private  int errorCase
           
private  java.util.List<java.lang.Float> lowerError
           
private  float maxValue
           
private  CIndexation.AggregationMethod method
           
private  float minValue
           
private  java.util.List<java.lang.Boolean> negWeightList
           
static int NORMAL
           
private  int rowCount
           
private  java.util.List<CErrorIndexation.CThreshold> threshold1
           
private  java.util.List<CErrorIndexation.CThreshold> threshold2
           
private  java.util.List<java.lang.Float> upperError
           
private  java.util.List<java.lang.Float> weightList
           
static int WORST_CASE
           
 
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
CErrorIndexation()
           
 
Method Summary
private  float calculateThreshold(double tmpValue, int fileIndex)
           
private  CRasterFileInformation fillPlaceholder(CRasterFileInformation tmpFile, CRasterFileInformation endFile)
           
 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 getErrorCase()
           
 java.util.List<java.lang.String> getInfoDependencies()
           
 java.util.List<java.lang.Float> getLowerError()
           
 CIndexation.AggregationMethod getMethod()
           
 java.util.List<java.lang.Boolean> getNegWeightList()
           
 java.util.List<CErrorIndexation.CThreshold> getThreshold1List()
           
 java.util.List<CErrorIndexation.CThreshold> getThreshold2List()
           
 java.util.List<java.lang.Float> getUpperError()
           
 java.util.List<java.lang.Float> getWeightList()
           
 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 setErrorCase(int errorCase)
           
 void setLowerError(java.util.List<java.lang.Float> lowerError)
           
 void setMethod(CIndexation.AggregationMethod method)
           
 void setNegWeightList(java.util.List<java.lang.Boolean> negWeightList)
           
 void setThreshold1List(java.util.List<CErrorIndexation.CThreshold> rewardList)
           
 void setThreshold2List(java.util.List<CErrorIndexation.CThreshold> penaltyList)
           
 void setUpperError(java.util.List<java.lang.Float> upperError)
           
 void setWeightList(java.util.List<java.lang.Float> weightList)
           
protected  void solveDependencies()
           
 void write()
           
private  void writeInFileAdditive(CRasterFileInformation file)
           
private  void writeInFileGeometric(CRasterFileInformation file)
           
 
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, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface insensa.connections.ConnectionFileChanger
getId, getOutputFile, getOutputFileName, getOutputFileSet, getSouceFileRelativePaths, getSourceFileList, getVariableList, isUsed, setId, setOutputFile, setOutputFileName, setOutputFileSet, setSourceFileList, setUsed, setVariableList, setWorkerStatus
 
Methods inherited from interface java.lang.Runnable
run
 
Methods inherited from interface insensa.FileObserver
notifyDelete
 

Field Detail

rowCount

private int rowCount

weightList

private java.util.List<java.lang.Float> weightList

negWeightList

private java.util.List<java.lang.Boolean> negWeightList

threshold1

private java.util.List<CErrorIndexation.CThreshold> threshold1

threshold2

private java.util.List<CErrorIndexation.CThreshold> threshold2

maxValue

private float maxValue

minValue

private float minValue

lowerError

private java.util.List<java.lang.Float> lowerError

upperError

private java.util.List<java.lang.Float> upperError

errorCase

private int errorCase

WORST_CASE

public static final int WORST_CASE
See Also:
Constant Field Values

BEST_CASE

public static final int BEST_CASE
See Also:
Constant Field Values

NORMAL

public static final int NORMAL
See Also:
Constant Field Values

method

private CIndexation.AggregationMethod method
Constructor Detail

CErrorIndexation

public CErrorIndexation()
Method Detail

calculateThreshold

private float calculateThreshold(double tmpValue,
                                 int fileIndex)
Parameters:
tmpValue -
fileIndex -
Returns:

fillPlaceholder

private CRasterFileInformation fillPlaceholder(CRasterFileInformation tmpFile,
                                               CRasterFileInformation endFile)
                                        throws java.io.IOException,
                                               CRasterFileException
Parameters:
tmpFile -
endFile -
Returns:
Throws:
java.io.IOException
CRasterFileException

getConnectionElement

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

getConnectionName

public java.lang.String getConnectionName()
Specified by:
getConnectionName in interface ConnectionFileChanger
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()

getErrorCase

public int getErrorCase()
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()

getLowerError

public java.util.List<java.lang.Float> getLowerError()
Returns:

getMethod

public CIndexation.AggregationMethod getMethod()
Returns:

getNegWeightList

public java.util.List<java.lang.Boolean> getNegWeightList()
Returns:

getThreshold1List

public java.util.List<CErrorIndexation.CThreshold> getThreshold1List()
Returns:

getThreshold2List

public java.util.List<CErrorIndexation.CThreshold> getThreshold2List()
Returns:

getUpperError

public java.util.List<java.lang.Float> getUpperError()
Returns:

getWeightList

public java.util.List<java.lang.Float> getWeightList()
Returns:

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)

setErrorCase

public void setErrorCase(int errorCase)
Parameters:
errorCase -

setLowerError

public void setLowerError(java.util.List<java.lang.Float> lowerError)
Parameters:
lowerError -

setMethod

public void setMethod(CIndexation.AggregationMethod method)
Parameters:
method -

setNegWeightList

public void setNegWeightList(java.util.List<java.lang.Boolean> negWeightList)
Parameters:
negWeightList -

setThreshold1List

public void setThreshold1List(java.util.List<CErrorIndexation.CThreshold> rewardList)
Parameters:
rewardList -

setThreshold2List

public void setThreshold2List(java.util.List<CErrorIndexation.CThreshold> penaltyList)
Parameters:
penaltyList -

setUpperError

public void setUpperError(java.util.List<java.lang.Float> upperError)
Parameters:
upperError -

setWeightList

public void setWeightList(java.util.List<java.lang.Float> weightList)
Parameters:
weightList -

solveDependencies

protected void solveDependencies()
                          throws java.io.IOException
Overrides:
solveDependencies in class AbstractConnection
Throws:
java.io.IOException
See Also:
AbstractConnection.solveDependencies()

write

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

writeInFileAdditive

private void writeInFileAdditive(CRasterFileInformation file)
                          throws java.io.IOException,
                                 CRasterFileException
Parameters:
file -
Throws:
java.io.IOException
CRasterFileException

writeInFileGeometric

private void writeInFileGeometric(CRasterFileInformation file)
                           throws java.io.IOException,
                                  CRasterFileException
Parameters:
file -
Throws:
java.io.IOException
CRasterFileException