Class ClickTrainDetLogging

java.lang.Object
generalDatabase.SQLLogging
generalDatabase.SuperDetLogging
clickTrainDetector.logging.ClickTrainDetLogging

public class ClickTrainDetLogging extends SuperDetLogging
Functions for saving a click train.
Author:
Jamie Macaulay
  • Constructor Details Link icon

  • Method Details Link icon

    • createBaseTable Link icon

      public PamTableDefinition createBaseTable()
      Create the basic table definition for the group detection.
      Returns:
      basic table - annotations will be added shortly !
    • setTableData Link icon

      public void setTableData(SQLTypes sqlTypes, 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
      Parameters:
      pamDataUnit -
    • getClickTrainControl Link icon

      public ClickTrainControl getClickTrainControl()
      Reference to the click train control.
      Returns:
      the detectionGroupControl.
    • createDataUnit Link icon

      protected CTDataUnit createDataUnit(SQLTypes sqlTypes, long timeMilliseconds, int databaseIndex)
      Description copied from class: SQLLogging
      Turn the data, which have been transferred back into the PamTableItems back into a usable data. Don't add to datablock. This will happen in calling function after additional add-ons and annotations have been added to the data unit. .
      Overrides:
      createDataUnit in class SQLLogging
      Returns:
      true if a data unit was successfully created
    • getViewerLoadClause Link icon

      public String getViewerLoadClause(SQLTypes sqlTypes, PamViewParameters pvp)
      Description copied from class: SQLLogging
      Get a standard select clause for loading viewer data, this is basically that UTC is between two times.
      Overrides:
      getViewerLoadClause in class SQLLogging
      Parameters:
      sqlTypes - SQL types - database specific functions
      pvp - load parameters.
      Returns:
      Clause, in the form WHERE UTC BETWEEN A and B ORDER BY UTC
    • logData Link icon

      public boolean logData(PamConnection con, PamDataUnit dataUnit, PamDataUnit superDetection)
      Description copied from class: SQLLogging
      Called when a new PamDataUnit is added to a PamDataBlock to write those data to the database. Functionality moved down to PamCursor so that exact writing method can become database specific if necessary.
      Overrides:
      logData in class SuperDetLogging
      Parameters:
      con - Database Connection
      dataUnit - Pamguard Data unit.
      superDetection - reference to a super detection so additional cross referencing can be filled
      Returns:
      true if written and new index of dataUnit retrieved OK
      See Also:
    • reLogData Link icon

      public boolean reLogData(PamConnection con, PamDataUnit dataUnit, PamDataUnit superDetection)
      Description copied from class: SQLLogging
      Called when an old PamDataUnit is updated. The record is either updated or a new record is written, but cross referenced to the old unit for bookkeeping purposes based on the updatePolicy flag.
      Overrides:
      reLogData in class SuperDetLogging
      Parameters:
      con - Database Connection
      dataUnit - Pamguard Data unit.
      superDetection - reference to a super detection so additional cross referencing can be filled
      Returns:
      the number of rows written to the database.
      See Also: