insensa.inforeader
Class CQuantileBreaksValues

java.lang.Object
  extended by insensa.inforeader.AbstractInfoReader
      extended by insensa.inforeader.CQuantileBreaksValues
All Implemented Interfaces:
BreaksValues, InfoReader, java.io.Serializable, java.lang.Runnable

public class CQuantileBreaksValues
extends AbstractInfoReader
implements BreaksValues

Creates Quantile Breaks for a raster based dataset There are 9 possible Calculation methods for Breaks based on the article from XXXXX. Default is 8; If a breaks has the same Value as the last Breaks, this breaks shifts right. If this shift is not possible, an Exception will be thrown

Author:
Dennis Biber
See Also:
Serialized Form

Field Summary
 java.util.List<InfoReader> iReaderList
           
 java.util.List<InfoReader> iReaderListDep
           
private  int numOfClasses
           
private  java.lang.String precisionString
           
static java.lang.String QUANTILE_BREAKS_VALUES
           
private  java.util.List<ClassificationRange> rangeList
           
private static long serialVersionUID
           
private  int type
           
 
Fields inherited from class insensa.inforeader.AbstractInfoReader
dependencer, processStatus, read, targetFile, workerStatus
 
Constructor Summary
CQuantileBreaksValues()
           
 
Method Summary
private  java.lang.Float[] getBreakValues(CCountValues countValues, int numOfClasses)
           
 java.util.List<java.lang.String> getDependencies()
          Returns a list with names of InfoReaders that have to be executed before this InfoReader can be executed.
 org.jdom.Element getInfoElement()
           
 java.lang.String getInfoName()
           
 java.util.Vector<java.util.Vector<java.lang.String>> getInfos()
           
private  java.lang.Float getNearestData(java.lang.Float data, java.util.TreeMap<java.lang.Float,java.lang.Integer> dataMap)
           
private  java.lang.Float getNthData(java.util.Map<java.lang.Float,java.lang.Integer> dataMap, int index)
           
 int getNumOfClasses()
           
 java.util.List<ClassificationRange> getRangeList()
           
 int getType()
           
 void readInfos(CRasterFileInformation file)
          This method will try to receive all informations from dependent InfoReader You can get InfoReader with file.getInfoReader(nameOfInfoReader);
 void setInfos(org.jdom.Element eInfo)
          Restore saved data
 void setNumOfClasses(int numOfClasses)
           
 void setTargetFile(CRasterFileInformation targetFile)
          determines the target file for this InfoReader.
 void setType(int type)
           
 void setUnread()
          Set InfoReader to unread to execute it again
 java.lang.String toString()
          Note
Can be used to determine the human readable text for this InfoReader
.
 
Methods inherited from class insensa.inforeader.AbstractInfoReader
getErrorMassage, getPrecisionString, getTargetFile, getVariableList, isRead, run, setDependencyChecker, setVariableList, setWorkerStatus
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

QUANTILE_BREAKS_VALUES

public static final java.lang.String QUANTILE_BREAKS_VALUES
See Also:
Constant Field Values

precisionString

private java.lang.String precisionString

numOfClasses

private int numOfClasses

type

private int type

rangeList

private java.util.List<ClassificationRange> rangeList

iReaderList

public java.util.List<InfoReader> iReaderList

iReaderListDep

public java.util.List<InfoReader> iReaderListDep
Constructor Detail

CQuantileBreaksValues

public CQuantileBreaksValues()
Method Detail

getBreakValues

private java.lang.Float[] getBreakValues(CCountValues countValues,
                                         int numOfClasses)
                                  throws java.io.IOException
Parameters:
countValues -
numOfClasses -
Returns:
Throws:
java.io.IOException

getDependencies

public java.util.List<java.lang.String> getDependencies()
Description copied from class: AbstractInfoReader
Returns a list with names of InfoReaders that have to be executed before this InfoReader can be executed.

Implementations of class AbstractInfoReader should override this method if dependencies are necessary. Example:
List<String> depList = super.getDependencies();
depList.add("countValues");
depList.add("equalBreaksValues");
return depList;

Specified by:
getDependencies in interface InfoReader
Overrides:
getDependencies in class AbstractInfoReader
Returns:
List<String>List with named of InfoReaders(dependencies) for this InfoReader
See Also:
AbstractInfoReader.getDependencies()

getInfoElement

public org.jdom.Element getInfoElement()
Specified by:
getInfoElement in interface InfoReader
Overrides:
getInfoElement in class AbstractInfoReader
Returns:
See Also:
AbstractInfoReader.getInfoElement()

getInfoName

public java.lang.String getInfoName()
Specified by:
getInfoName in interface InfoReader
Returns:
The name of this InfoReader
See Also:
InfoReader.getInfoName()

getInfos

public java.util.Vector<java.util.Vector<java.lang.String>> getInfos()
Specified by:
getInfos in interface InfoReader
Returns:
Information to Display in Data Table
See Also:
InfoReader.getInfos()

getNearestData

private java.lang.Float getNearestData(java.lang.Float data,
                                       java.util.TreeMap<java.lang.Float,java.lang.Integer> dataMap)
Parameters:
data -
dataMap -
Returns:

getNthData

private java.lang.Float getNthData(java.util.Map<java.lang.Float,java.lang.Integer> dataMap,
                                   int index)
Parameters:
dataMap -
index -
Returns:

getNumOfClasses

public int getNumOfClasses()
Specified by:
getNumOfClasses in interface BreaksValues
Returns:
See Also:
BreaksValues.getNumOfClasses()

getRangeList

public java.util.List<ClassificationRange> getRangeList()
Specified by:
getRangeList in interface BreaksValues
Returns:
See Also:
BreaksValues.getRangeList()

getType

public int getType()
Returns:

readInfos

public void readInfos(CRasterFileInformation file)
               throws java.io.FileNotFoundException,
                      java.io.IOException
Description copied from interface: InfoReader
This method will try to receive all informations from dependent InfoReader You can get InfoReader with file.getInfoReader(nameOfInfoReader);

Specified by:
readInfos in interface InfoReader
Parameters:
file - File that holds this InfoReader
Throws:
java.io.FileNotFoundException
java.io.IOException
See Also:
InfoReader.readInfos(insensa.CRasterFileInformation)

setInfos

public void setInfos(org.jdom.Element eInfo)
              throws java.io.IOException
Description copied from interface: InfoReader
Restore saved data

Specified by:
setInfos in interface InfoReader
Throws:
java.io.IOException
See Also:
InfoReader.setInfos(org.jdom.Element)

setNumOfClasses

public void setNumOfClasses(int numOfClasses)
Specified by:
setNumOfClasses in interface BreaksValues
See Also:
BreaksValues.setNumOfClasses(int)

setTargetFile

public void setTargetFile(CRasterFileInformation targetFile)
Description copied from interface: InfoReader
determines the target file for this InfoReader.

Specified by:
setTargetFile in interface InfoReader
Overrides:
setTargetFile in class AbstractInfoReader
Parameters:
targetFile - Target file of type CRasterFileInformation for this InfoReader
See Also:
AbstractInfoReader.setTargetFile(insensa.CRasterFileInformation)

setType

public void setType(int type)
Parameters:
type -

setUnread

public void setUnread()
Description copied from interface: InfoReader
Set InfoReader to unread to execute it again

Specified by:
setUnread in interface InfoReader
Overrides:
setUnread in class AbstractInfoReader
See Also:
AbstractInfoReader.setUnread()

toString

public java.lang.String toString()
Description copied from class: AbstractInfoReader
Note
Can be used to determine the human readable text for this InfoReader
.

Overrides:
toString in class AbstractInfoReader
Returns:
a String that returns InfoReader.getInfoName() with the fist letter in upper case
See Also:
AbstractInfoReader.toString()