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 Link icon

    • PamDetectionLogging Link icon

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

    • makeStandardTableDefinition Link icon

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

      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 Link icon

      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 Link icon

      public PamTableItem getAmplitude()
    • getBearing Link icon

      public PamTableItem[] getBearing()
    • getBearingAmbiguity Link icon

      public PamTableItem getBearingAmbiguity()
    • getBearingError Link icon

      public PamTableItem[] getBearingError()
    • getChannelMap Link icon

      public PamTableItem getChannelMap()
    • getDepth Link icon

      public PamTableItem[] getDepth()
    • getDepthError Link icon

      public PamTableItem[] getDepthError()
    • getDetectionType Link icon

      public PamTableItem getDetectionType()
    • getDuration Link icon

      public PamTableItem getDuration()
    • getHighFreq Link icon

      public PamTableItem getHighFreq()
    • getLatitude Link icon

      public PamTableItem[] getLatitude()
    • getLocalisationFlags Link icon

      public int getLocalisationFlags()
    • getLongitude Link icon

      public PamTableItem[] getLongitude()
    • getLowFreq Link icon

      public PamTableItem getLowFreq()
    • getNSides Link icon

      public int getNSides()
    • getParallelError Link icon

      public PamTableItem[] getParallelError()
    • getPerpError Link icon

      public PamTableItem[] getPerpError()
    • getRange Link icon

      public PamTableItem[] getRange()
    • getRangeError Link icon

      public PamTableItem[] getRangeError()
    • getReferenceAngle Link icon

      public PamTableItem[] getReferenceAngle()
    • getStartSample Link icon

      public PamTableItem getStartSample()
    • getStartSeconds Link icon

      public PamTableItem getStartSeconds()
    • getUIDMatchClause Link icon

      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)