org.gcube.dataanalysis.ecoengine.transducers
Class OccurrencePointsMerger
java.lang.Object
org.gcube.dataanalysis.ecoengine.transducers.OccurrencePointsMerger
- All Implemented Interfaces:
- ComputationalAgent, Transducerer
- Direct Known Subclasses:
- OccurrencePointsDuplicatesDeleter, OccurrencePointsInSeaOnEarth, OccurrencePointsIntersector, OccurrencePointsSubtraction
public class OccurrencePointsMerger
- extends Object
- implements Transducerer
Method Summary |
void |
compute()
|
void |
computeRange()
|
static String |
convert2conventionalFormat(Calendar date)
|
protected float |
extProb(OccurrencePointsMerger.OccurrenceRecord right,
OccurrencePointsMerger.OccurrenceRecord left)
|
void |
extractColumnNames()
|
String |
getDescription()
|
INFRASTRUCTURE |
getInfrastructure()
|
List<StatisticalType> |
getInputParameters()
|
int |
getNumLeftObjects()
|
int |
getNumRightObjects()
|
StatisticalType |
getOutput()
|
String |
getResourceLoad()
|
String |
getResources()
|
float |
getStatus()
|
void |
init()
|
void |
initDB(boolean buildTable)
|
protected void |
insertBuffer(StringBuffer buffer)
|
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()
|
void |
postProcess()
|
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()
|
protected String |
takeEssential(OccurrencePointsMerger.OccurrenceRecord record)
|
void |
takeFullRanges()
|
void |
takeRange(int offsetLeft,
int numLeft,
int offsetRight,
int numRight)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
finalTableNameL
protected static String finalTableNameL
longitudeColumn
protected static String longitudeColumn
latitudeColumn
protected static String latitudeColumn
recordedByColumn
protected static String recordedByColumn
scientificNameColumn
protected static String scientificNameColumn
eventDateColumn
protected static String eventDateColumn
lastModificationColumn
protected static String lastModificationColumn
rightTableNameF
protected static String rightTableNameF
leftTableNameF
protected static String leftTableNameF
finalTableNameF
protected static String finalTableNameF
spatialTolerance
protected static String spatialTolerance
confidence
protected static String confidence
sqlDateFormat
protected static String sqlDateFormat
javaDateFormat
protected static String javaDateFormat
tableNameF
protected static String tableNameF
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
firstbest
protected boolean firstbest
leftRows
public List<Object> leftRows
rightRows
public List<Object> rightRows
OccurrencePointsMerger
public OccurrencePointsMerger()
convert2conventionalFormat
public static String convert2conventionalFormat(Calendar date)
row2OccurrenceRecord
public OccurrencePointsMerger.OccurrenceRecord row2OccurrenceRecord(Object[] row)
takeEssential
protected String takeEssential(OccurrencePointsMerger.OccurrenceRecord record)
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
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
insertBuffer
protected void insertBuffer(StringBuffer buffer)
throws Exception
- Throws:
Exception
prepareFinalTable
protected void prepareFinalTable()
throws Exception
- Throws:
Exception
extractColumnNames
public void extractColumnNames()
throws Exception
- Throws:
Exception
initDB
public void initDB(boolean buildTable)
throws Exception
- Throws:
Exception
shutdown
public void shutdown()
- Specified by:
shutdown
in interface ComputationalAgent
getNumLeftObjects
public int getNumLeftObjects()
getNumRightObjects
public int getNumRightObjects()
takeFullRanges
public void takeFullRanges()
takeRange
public void takeRange(int offsetLeft,
int numLeft,
int offsetRight,
int numRight)
computeRange
public void computeRange()
throws Exception
- Throws:
Exception
compute
public void compute()
throws Exception
- Specified by:
compute
in interface ComputationalAgent
- Throws:
Exception
postProcess
public void postProcess()
throws Exception
- Throws:
Exception
main
public static void main(String[] args)
throws Exception
- Throws:
Exception
Copyright © 2013. All Rights Reserved.