org.gcube.dataanalysis.ecoengine.transducers
Class OccurrencePointsMerger

java.lang.Object
  extended by org.gcube.dataanalysis.ecoengine.transducers.OccurrencePointsMerger
All Implemented Interfaces:
ComputationalAgent, Transducerer
Direct Known Subclasses:
OccurrencePointsDuplicatesDeleter, OccurrencePointsInSeaOnEarth, OccurrencePointsIntersector

public class OccurrencePointsMerger
extends Object
implements Transducerer


Nested Class Summary
protected  class OccurrencePointsMerger.OccurrenceRecord
           
 
Field Summary
protected  StringBuffer columns
           
protected  List<Object> columnsNames
           
protected  float confidenceValue
           
protected  AlgorithmConfiguration config
           
protected  org.hibernate.SessionFactory dbconnection
           
protected  String eventDatFld
           
protected  String finalTableLabel
           
protected  String finalTableName
           
protected static String finalTableNameL
           
protected  String latFld
           
protected  String leftTableName
           
protected  String lonFld
           
protected  String modifDatFld
           
protected  List<OccurrencePointsMerger.OccurrenceRecord> objectstodelete
           
protected  List<OccurrencePointsMerger.OccurrenceRecord> objectstoinsert
           
protected  String recordedByFld
           
protected  List<OccurrencePointsMerger.OccurrenceRecord> records_left
           
protected  List<OccurrencePointsMerger.OccurrenceRecord> records_right
           
protected  String rightTableName
           
protected  String scientificNameFld
           
protected  float spatialToleranceValue
           
protected  float status
           
 
Constructor Summary
OccurrencePointsMerger()
           
 
Method Summary
 void compute()
           
static String convert2conventionalFormat(Calendar date)
           
protected  float extProb(OccurrencePointsMerger.OccurrenceRecord right, OccurrencePointsMerger.OccurrenceRecord left)
           
protected  void extractColumnNames()
           
 String getDescription()
           
 INFRASTRUCTURE getInfrastructure()
           
 List<StatisticalType> getInputParameters()
           
 StatisticalType getOutput()
           
 String getResourceLoad()
           
 String getResources()
           
 float getStatus()
           
 void init()
           
static void main(String[] args)
           
protected  void manageHighProbability(float probability, OccurrencePointsMerger.OccurrenceRecord leftOcc, OccurrencePointsMerger.OccurrenceRecord rightOcc)
           
protected  void manageLowProbability(float probability, OccurrencePointsMerger.OccurrenceRecord leftOcc, OccurrencePointsMerger.OccurrenceRecord rightOcc)
           
 String occurrenceRecord2String(OccurrencePointsMerger.OccurrenceRecord record)
           
protected  void persist()
           
protected  void prepareFinalTable()
           
protected  float probabilityDates(Calendar first, Calendar second)
           
protected  float probabilityStrings(String first, String second)
           
 OccurrencePointsMerger.OccurrenceRecord row2OccurrenceRecord(Object[] row)
           
 void setConfiguration(AlgorithmConfiguration config)
           
 void shutdown()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

finalTableNameL

protected static String finalTableNameL

records_left

protected List<OccurrencePointsMerger.OccurrenceRecord> records_left

records_right

protected List<OccurrencePointsMerger.OccurrenceRecord> records_right

config

protected AlgorithmConfiguration config

lonFld

protected String lonFld

latFld

protected String latFld

recordedByFld

protected String recordedByFld

scientificNameFld

protected String scientificNameFld

eventDatFld

protected String eventDatFld

modifDatFld

protected String modifDatFld

leftTableName

protected String leftTableName

rightTableName

protected String rightTableName

finalTableName

protected String finalTableName

finalTableLabel

protected String finalTableLabel

spatialToleranceValue

protected float spatialToleranceValue

confidenceValue

protected float confidenceValue

columns

protected StringBuffer columns

objectstoinsert

protected List<OccurrencePointsMerger.OccurrenceRecord> objectstoinsert

objectstodelete

protected List<OccurrencePointsMerger.OccurrenceRecord> objectstodelete

columnsNames

protected List<Object> columnsNames

dbconnection

protected org.hibernate.SessionFactory dbconnection

status

protected float status
Constructor Detail

OccurrencePointsMerger

public OccurrencePointsMerger()
Method Detail

convert2conventionalFormat

public static String convert2conventionalFormat(Calendar date)

row2OccurrenceRecord

public OccurrencePointsMerger.OccurrenceRecord row2OccurrenceRecord(Object[] row)

occurrenceRecord2String

public String occurrenceRecord2String(OccurrencePointsMerger.OccurrenceRecord record)

getInputParameters

public List<StatisticalType> getInputParameters()
Specified by:
getInputParameters in interface ComputationalAgent

getResources

public String getResources()
Specified by:
getResources in interface ComputationalAgent

getResourceLoad

public String getResourceLoad()
Specified by:
getResourceLoad in interface ComputationalAgent

getStatus

public float getStatus()
Specified by:
getStatus in interface ComputationalAgent

getInfrastructure

public INFRASTRUCTURE getInfrastructure()
Specified by:
getInfrastructure in interface ComputationalAgent

getOutput

public StatisticalType getOutput()
Specified by:
getOutput in interface ComputationalAgent

init

public void init()
          throws Exception
Specified by:
init in interface ComputationalAgent
Throws:
Exception

setConfiguration

public void setConfiguration(AlgorithmConfiguration config)
Specified by:
setConfiguration in interface ComputationalAgent

shutdown

public void shutdown()
Specified by:
shutdown in interface ComputationalAgent

getDescription

public String getDescription()
Specified by:
getDescription in interface ComputationalAgent

probabilityStrings

protected float probabilityStrings(String first,
                                   String second)

probabilityDates

protected float probabilityDates(Calendar first,
                                 Calendar second)

extProb

protected float extProb(OccurrencePointsMerger.OccurrenceRecord right,
                        OccurrencePointsMerger.OccurrenceRecord left)

manageHighProbability

protected void manageHighProbability(float probability,
                                     OccurrencePointsMerger.OccurrenceRecord leftOcc,
                                     OccurrencePointsMerger.OccurrenceRecord rightOcc)

manageLowProbability

protected void manageLowProbability(float probability,
                                    OccurrencePointsMerger.OccurrenceRecord leftOcc,
                                    OccurrencePointsMerger.OccurrenceRecord rightOcc)

persist

protected void persist()
                throws Exception
Throws:
Exception

prepareFinalTable

protected void prepareFinalTable()
                          throws Exception
Throws:
Exception

extractColumnNames

protected void extractColumnNames()
                           throws Exception
Throws:
Exception

compute

public void compute()
             throws Exception
Specified by:
compute in interface ComputationalAgent
Throws:
Exception

main

public static void main(String[] args)
                 throws Exception
Throws:
Exception


Copyright © 2012. All Rights Reserved.