insensa.connections
Class CIndexation

java.lang.Object
  extended by insensa.connections.AbstractConnection
      extended by insensa.connections.CIndexation
All Implemented Interfaces:
ConnectionFileChanger, FileObserver, java.lang.Runnable
Direct Known Subclasses:
CSesitivity

public class CIndexation
extends AbstractConnection
implements ConnectionFileChanger


Nested Class Summary
static class CIndexation.AggregationMethod
           
static class CIndexation.Assignment
           
static class CIndexation.Condition
           
 class CIndexation.CThreshold
           
static class CIndexation.Mode
           
 
Field Summary
private  boolean hasThreshold
           
private  float maxValue
           
private  CIndexation.AggregationMethod method
           
private  float minValue
           
private  java.util.List<java.lang.Boolean> negWeightList
           
private  int rowCount
           
private  java.util.List<CIndexation.CThreshold> threshold1
           
private  java.util.List<CIndexation.CThreshold> threshold2
           
private  java.util.List<java.lang.Float> weightList
           
 
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
CIndexation()
           
 
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()
           
 java.util.List<java.lang.String> getInfoDependencies()
           
 CIndexation.AggregationMethod getMethod()
           
 java.util.List<java.lang.Boolean> getNegWeightList()
           
 java.util.List<CIndexation.CThreshold> getThreshold1List()
           
 java.util.List<CIndexation.CThreshold> getThreshold2List()
           
 java.util.List<java.lang.Float> getWeightList()
           
 void setConnectionElement(org.jdom.Element eCon)
          In case that this Connection is unused, you have to set the sourceFileList before invoking this function.
 void setMethod(CIndexation.AggregationMethod method)
           
 void setNegWeightList(java.util.List<java.lang.Boolean> negWeightList)
           
 void setThreshold1List(java.util.List<CIndexation.CThreshold> rewardList)
           
 void setThreshold2List(java.util.List<CIndexation.CThreshold> penaltyList)
           
 void setWeightList(java.util.List<java.lang.Float> weightList)
           
protected  void solveDependencies()
           
 void write()
           
private  void writeInFileAdditive(CRasterFileInformation file)
           
private  void writeInFileGeometric(CRasterFileInformation file)
           
private  void writeInFileWithoutThesholdAdditive(CRasterFileInformation file)
           
private  void writeInFileWithoutThesholdGeometric(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

hasThreshold

private boolean hasThreshold

threshold1

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

threshold2

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

maxValue

private float maxValue

minValue

private float minValue

method

private CIndexation.AggregationMethod method
Constructor Detail

CIndexation

public CIndexation()
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()

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()

getMethod

public CIndexation.AggregationMethod getMethod()
Returns:

getNegWeightList

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

getThreshold1List

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

getThreshold2List

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

getWeightList

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

setConnectionElement

public void setConnectionElement(org.jdom.Element eCon)
                          throws java.io.IOException
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
Parameters:
eCon -
Throws:
java.io.IOException

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<CIndexation.CThreshold> rewardList)
Parameters:
rewardList -

setThreshold2List

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

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

writeInFileWithoutThesholdAdditive

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

writeInFileWithoutThesholdGeometric

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