org.gcube.dataanalysis.ecoengine.interfaces
Class DataAnalysis

java.lang.Object
  extended by org.gcube.dataanalysis.ecoengine.interfaces.DataAnalysis
All Implemented Interfaces:
ComputationalAgent, Evaluator
Direct Known Subclasses:
DiscrepancyAnalysis, DistributionQualityAnalysis, HabitatRepresentativeness

public abstract class DataAnalysis
extends Object
implements Evaluator

Implements a mono-thread data analysis process Status is managed outside the class and analysis is simply conducted by initializing and applying procedure

Author:
coro

Field Summary
protected  int processedRecords
           
protected  ResourceFactory resourceManager
           
protected  float status
           
 
Constructor Summary
DataAnalysis()
           
 
Method Summary
abstract  HashMap<String,String> analyze(AlgorithmConfiguration config)
          Executed the core of the algorithm
abstract  void end()
          ends the processing, e.g.
 INFRASTRUCTURE getInfrastructure()
          The weight of this procedure is the lowest as it runs on local machine
abstract  List<StatisticalType> getInputParameters()
          establishes input parameters for this algorithm along with their type
 String getResourceLoad()
          calculates the number of processed records per unity of time: the timing is calculated internally by the resourceManager and used when the method is interrogated
 String getResources()
          gets the occupancy of the resource: in this case one thread
 float getStatus()
          gets the internal status of the operation
abstract  void init(AlgorithmConfiguration config)
          initializes the procedure e.g.
 StatisticalType process(AlgorithmConfiguration config)
          Processing skeleton : init-analyze-end
static void visualizeResults(HashMap<String,String> results)
          visualizes the results of the analysis
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.gcube.dataanalysis.ecoengine.interfaces.ComputationalAgent
getOutput
 

Field Detail

resourceManager

protected ResourceFactory resourceManager

processedRecords

protected int processedRecords

status

protected float status
Constructor Detail

DataAnalysis

public DataAnalysis()
Method Detail

getInputParameters

public abstract List<StatisticalType> getInputParameters()
establishes input parameters for this algorithm along with their type

Specified by:
getInputParameters in interface ComputationalAgent

analyze

public abstract HashMap<String,String> analyze(AlgorithmConfiguration config)
                                        throws Exception
Executed the core of the algorithm

Parameters:
config -
Returns:
Throws:
Exception

init

public abstract void init(AlgorithmConfiguration config)
                   throws Exception
initializes the procedure e.g. connects to the database

Specified by:
init in interface Evaluator
Parameters:
config -
Throws:
Exception

end

public abstract void end()
ends the processing, e.g. closes connections

Specified by:
end in interface Evaluator
Throws:
Exception

process

public StatisticalType process(AlgorithmConfiguration config)
                        throws Exception
Processing skeleton : init-analyze-end

Specified by:
process in interface Evaluator
Parameters:
config -
Returns:
Throws:
Exception

getResourceLoad

public String getResourceLoad()
calculates the number of processed records per unity of time: the timing is calculated internally by the resourceManager and used when the method is interrogated

Specified by:
getResourceLoad in interface ComputationalAgent

getResources

public String getResources()
gets the occupancy of the resource: in this case one thread

Specified by:
getResources in interface ComputationalAgent

getInfrastructure

public INFRASTRUCTURE getInfrastructure()
The weight of this procedure is the lowest as it runs on local machine

Specified by:
getInfrastructure in interface ComputationalAgent

getStatus

public float getStatus()
gets the internal status of the operation

Specified by:
getStatus in interface ComputationalAgent

visualizeResults

public static void visualizeResults(HashMap<String,String> results)
visualizes the results of the analysis

Parameters:
results -


Copyright © 2012. All Rights Reserved.