insensa.inforeader
Class AbstractInfoReader

java.lang.Object
  extended by insensa.inforeader.AbstractInfoReader
All Implemented Interfaces:
InfoReader, java.io.Serializable, java.lang.Runnable
Direct Known Subclasses:
CCountIntervalValues, CCountValues, CCountValuesBlocksize, CEqualBreaksValues, CGetPointInformation, CJenksOptimalBreaksValues, CKMeansValues, CMeanValue, CMedianValue, CMinMaxValues, CPrecisionValues, CPrioritizationValues, CQuantileBreaksValues, CQuartileValues, CStandardDeviationValue, CVariableBreaksValues, CZeroRangeValues

public abstract class AbstractInfoReader
extends java.lang.Object
implements InfoReader, java.io.Serializable

See Also:
Serialized Form

Field Summary
protected  DependencyChecker dependencer
           
private  java.lang.String errorMassage
           
protected  float processStatus
           
protected  boolean read
           
private static long serialVersionUID
           
protected  CRasterFileInformation targetFile
           
protected  WorkerStatus workerStatus
           
 
Constructor Summary
AbstractInfoReader()
           
 
Method Summary
 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.
 java.lang.String getErrorMassage()
           
 org.jdom.Element getInfoElement()
           
protected  java.lang.String getPrecisionString(java.lang.String floatString)
           
 CRasterFileInformation getTargetFile()
          Returns the file of type CRasterFileInformation that holds this InfoReader targetFile will only be set if the InfoReader operation was performed, otherwise null
 java.util.List<VariableValue<java.lang.String>> getVariableList()
           
 boolean isRead()
           
 void run()
           
 void setDependencyChecker(DependencyChecker mDep)
          Set dependency checker
 void setTargetFile(CRasterFileInformation targetFile)
          determines the target file for this InfoReader.
 void setUnread()
          Set InfoReader to unread to execute it again
 void setVariableList(java.util.List<VariableValue<java.lang.String>> varList)
          Configure InfoReader
 void setWorkerStatus(WorkerStatus mWorkerStatus)
          Determines a WorkerStatus to listen to execution progress
 java.lang.String toString()
          Note
Can be used to determine the human readable text for this InfoReader
.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface insensa.inforeader.InfoReader
getInfoName, getInfos, readInfos, setInfos
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

read

protected boolean read

workerStatus

protected WorkerStatus workerStatus

targetFile

protected CRasterFileInformation targetFile

processStatus

protected float processStatus

dependencer

protected DependencyChecker dependencer

errorMassage

private java.lang.String errorMassage
Constructor Detail

AbstractInfoReader

public AbstractInfoReader()
Method Detail

getDependencies

public 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.

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
Returns:
List<String>List with named of InfoReaders(dependencies) for this InfoReader
See Also:
insensa.inforeader.EInfo} {@link insensa.extensions.ExtensionManager#getInfoReaderServices()}

getErrorMassage

public java.lang.String getErrorMassage()
Specified by:
getErrorMassage in interface InfoReader
Returns:
The error message if an error occurs
See Also:
InfoReader.getErrorMassage()

getInfoElement

public org.jdom.Element getInfoElement()
                                throws java.io.IOException
Specified by:
getInfoElement in interface InfoReader
Returns:
Throws:
java.io.IOException
See Also:
InfoReader.getInfoElement()

getPrecisionString

protected java.lang.String getPrecisionString(java.lang.String floatString)
Parameters:
floatString -
Returns:

getTargetFile

public CRasterFileInformation getTargetFile()
Description copied from interface: InfoReader
Returns the file of type CRasterFileInformation that holds this InfoReader targetFile will only be set if the InfoReader operation was performed, otherwise null

Specified by:
getTargetFile in interface InfoReader
Returns:
the file that holds this InfoReader
See Also:
InfoReader.getTargetFile()

getVariableList

public java.util.List<VariableValue<java.lang.String>> getVariableList()
Specified by:
getVariableList in interface InfoReader
Returns:
the variables that can be set or null if there is none
See Also:
InfoReader.getVariableList()

isRead

public boolean isRead()
Specified by:
isRead in interface InfoReader
Returns:
true is already executed
See Also:
InfoReader.isRead()

run

public void run()
Specified by:
run in interface java.lang.Runnable
See Also:
Runnable.run()

setDependencyChecker

public void setDependencyChecker(DependencyChecker mDep)
Description copied from interface: InfoReader
Set dependency checker

Specified by:
setDependencyChecker in interface InfoReader
See Also:
InfoReader.setDependencyChecker(insensa.helpers.DependencyChecker)

setTargetFile

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

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

setUnread

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

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

setVariableList

public void setVariableList(java.util.List<VariableValue<java.lang.String>> varList)
Description copied from interface: InfoReader
Configure InfoReader

Specified by:
setVariableList in interface InfoReader
Parameters:
varList - the List of Variables to be set
See Also:
InfoReader.setVariableList(java.util.List)

setWorkerStatus

public void setWorkerStatus(WorkerStatus mWorkerStatus)
Description copied from interface: InfoReader
Determines a WorkerStatus to listen to execution progress

Specified by:
setWorkerStatus in interface InfoReader
See Also:
InfoReader.setWorkerStatus(insensa.WorkerStatus)

toString

public java.lang.String toString()
Note
Can be used to determine the human readable text for this InfoReader
.

Overrides:
toString in class java.lang.Object
Returns:
a String that returns InfoReader.getInfoName() with the fist letter in upper case