generalDatabase
Class PamDetectionLogging

java.lang.Object
  extended by generalDatabase.SQLLogging
      extended by generalDatabase.PamDetectionLogging
Direct Known Subclasses:
ClickLogger, GroupDetectionLogging, IshLogger, TowedArray3DSQLLogging, WhistleLogger, WhistleToneLogging

public class PamDetectionLogging
extends SQLLogging

Standard logging class for any PamDetection, but you'll want to extend it for any additional information your detector outputs.

Handles data from all fields in the PamDetection class.

Handles data from expected fields in associated localisation data.

N.B. Not all databases support huge (64 bit) integers, so the sample number is written as a 32 bit integer, but the detection time is also written as a double number of seconds from the start of the run, so any overflow should show up clearly (and seconds are much easier to deal with in any offline analysis of data from the database).

Author:
Doug Gillespie

Field Summary
(package private)  PamTableItem amplitude
           
(package private)  PamTableItem[] bearing
           
(package private)  PamTableItem bearingAmbiguity
           
(package private)  PamTableItem[] bearingError
           
(package private)  PamTableItem channelMap
           
(package private)  PamTableItem[] depth
           
(package private)  PamTableItem[] depthError
           
(package private)  PamTableItem detectionType
           
(package private)  PamTableItem duration
           
(package private)  PamTableItem highFreq
           
(package private)  PamTableItem[] latitude
           
(package private)  int localisationFlags
           
(package private)  PamTableItem[] longitude
           
(package private)  PamTableItem lowFreq
           
(package private)  int nSides
           
(package private)  PamTableItem[] parallelError
           
(package private)  PamTableItem[] perpError
           
(package private)  PamTableItem[] range
           
(package private)  PamTableItem[] rangeError
           
(package private)  PamTableItem[] referenceAngle
           
(package private)  PamTableItem startSample
           
(package private)  PamTableItem startSeconds
           
(package private)  PamTableDefinition tableDefinition
           
 
Fields inherited from class generalDatabase.SQLLogging
UPDATE_POLICY_OVERWRITE, UPDATE_POLICY_WRITENEW
 
Constructor Summary
PamDetectionLogging(PamDataBlock pamDataBlock, int updatePolicy)
           
 
Method Summary
protected  boolean fillDataUnit(PamDetection pamDetection)
          PamDetection is nearly always overridden (Not sure why it's not declared abstract) so it's quite difficult for createDataUnit to fill and do anything with these in the general class.
 PamTableItem getAmplitude()
           
 PamTableItem[] getBearing()
           
 PamTableItem getBearingAmbiguity()
           
 PamTableItem[] getBearingError()
           
 PamTableItem getChannelMap()
           
 PamTableItem[] getDepth()
           
 PamTableItem[] getDepthError()
           
 PamTableItem getDetectionType()
           
 PamTableItem getDuration()
           
 PamTableItem getHighFreq()
           
 PamTableItem[] getLatitude()
           
 int getLocalisationFlags()
           
 PamTableItem[] getLongitude()
           
 PamTableItem getLowFreq()
           
 int getNSides()
           
 PamTableItem[] getParallelError()
           
 PamTableItem[] getPerpError()
           
 PamTableItem[] getRange()
           
 PamTableItem[] getRangeError()
           
 PamTableItem[] getReferenceAngle()
           
 PamTableItem getStartSample()
           
 PamTableItem getStartSeconds()
           
protected  void makeStandardTableDefinition()
          Make a standard table for detection and localisation data.
private  void setNullData(PamTableItem tableItem)
           
private  void setNullData(PamTableItem[] tableItems)
           
 void setTableData(PamDataUnit pamDataUnit)
          Callback function when new data are created that allows the user to set the data for each column.
 
Methods inherited from class generalDatabase.SQLLogging
createDataUnit, createInClause, createViewResultSet, doExtraChecks, fillTableData, finalize, findLogger, getIdListUpdatClause, getLastTime, getPamDataBlock, getTableDefinition, getTimesUpdateClause, getUpdatePolicy, getViewerCursorFinder, getViewerLoadClause, getViewerUpdateClause, isCanView, isLoadViewData, loadViewData, loadViewerData, logData, prepareEmulation, prepareForMixedMode, readLastData, readMixedModeData, readNextEmulation, reCheckTable, reLogData, saveOfflineData, setCanView, setColumnData, setLoadViewData, setTableDefinition, setUpdatePolicy, transferDataFromResult
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

tableDefinition

PamTableDefinition tableDefinition

channelMap

PamTableItem channelMap

startSample

PamTableItem startSample

startSeconds

PamTableItem startSeconds

duration

PamTableItem duration

lowFreq

PamTableItem lowFreq

highFreq

PamTableItem highFreq

amplitude

PamTableItem amplitude

detectionType

PamTableItem detectionType

bearingAmbiguity

PamTableItem bearingAmbiguity

bearing

PamTableItem[] bearing

range

PamTableItem[] range

depth

PamTableItem[] depth

bearingError

PamTableItem[] bearingError

rangeError

PamTableItem[] rangeError

depthError

PamTableItem[] depthError

latitude

PamTableItem[] latitude

longitude

PamTableItem[] longitude

parallelError

PamTableItem[] parallelError

perpError

PamTableItem[] perpError

referenceAngle

PamTableItem[] referenceAngle

localisationFlags

int localisationFlags

nSides

int nSides
Constructor Detail

PamDetectionLogging

public PamDetectionLogging(PamDataBlock pamDataBlock,
                           int updatePolicy)
Method Detail

makeStandardTableDefinition

protected void makeStandardTableDefinition()
Make a standard table for detection and localisation data.


setTableData

public void setTableData(PamDataUnit pamDataUnit)
Description copied from class: SQLLogging
Callback function when new data are created that allows the user to set the data for each column. Columns that have data which can be filled automatically (counters, primary keys and columns cross referenced to data in other tables) are filled automatically in fillTableData()

Specified by:
setTableData in class SQLLogging

setNullData

private void setNullData(PamTableItem tableItem)

setNullData

private void setNullData(PamTableItem[] tableItems)

fillDataUnit

protected boolean fillDataUnit(PamDetection pamDetection)
PamDetection is nearly always overridden (Not sure why it's not declared abstract) so it's quite difficult for createDataUnit to fill and do anything with these in the general class. Therefore, assume that createDataUnit will be overridden in more concrete classes and just provide a function here to fill the data in to a newDataUnit from standard database columns


getAmplitude

public PamTableItem getAmplitude()

getBearing

public PamTableItem[] getBearing()

getBearingAmbiguity

public PamTableItem getBearingAmbiguity()

getBearingError

public PamTableItem[] getBearingError()

getChannelMap

public PamTableItem getChannelMap()

getDepth

public PamTableItem[] getDepth()

getDepthError

public PamTableItem[] getDepthError()

getDetectionType

public PamTableItem getDetectionType()

getDuration

public PamTableItem getDuration()

getHighFreq

public PamTableItem getHighFreq()

getLatitude

public PamTableItem[] getLatitude()

getLocalisationFlags

public int getLocalisationFlags()

getLongitude

public PamTableItem[] getLongitude()

getLowFreq

public PamTableItem getLowFreq()

getNSides

public int getNSides()

getParallelError

public PamTableItem[] getParallelError()

getPerpError

public PamTableItem[] getPerpError()

getRange

public PamTableItem[] getRange()

getRangeError

public PamTableItem[] getRangeError()

getReferenceAngle

public PamTableItem[] getReferenceAngle()

getStartSample

public PamTableItem getStartSample()

getStartSeconds

public PamTableItem getStartSeconds()