Class PamDetectionLogging

java.lang.Object
generalDatabase.SQLLogging
generalDatabase.PamDetectionLogging
Direct Known Subclasses:
ClickLogger, GroupLocInfoLogging, IshLocSqlLogging, 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
  • Constructor Details

    • PamDetectionLogging

      public PamDetectionLogging(PamDataBlock pamDataBlock, int updatePolicy)
  • Method Details

    • makeStandardTableDefinition

      protected void makeStandardTableDefinition(int updatePolicy)
      Make a standard table for detection and localisation data.
      Parameters:
      updatePolicy -
    • setTableData

      public void setTableData(SQLTypes sqlTypes, PamDataUnit pamDetection)
      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
      Parameters:
      pamDetection -
    • fillDataUnit

      protected boolean fillDataUnit(SQLTypes sqlTypes, PamDataUnit 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()
    • getUIDMatchClause

      public String getUIDMatchClause(PamDataUnit pamDataUnit, SQLTypes sqlTypes)
      Description copied from class: SQLLogging
      Get a string used to match binary data with the database records.
      Overrides:
      getUIDMatchClause in class SQLLogging
      Parameters:
      pamDataUnit - Data unit to match
      sqlTypes - type for specific formatting.
      Returns:
      WHERE type clause (without the WHERE)