Class DetectionGroupDataBlock


public class DetectionGroupDataBlock extends SuperDetDataBlock<DetectionGroupDataUnit,PamDataUnit>
  • Constructor Details Link icon

  • Method Details Link icon

    • saveViewerData Link icon

      public boolean saveViewerData()
      Description copied from class: PamDataBlock
      Saves data in this data block in offline viewer mode.
      Overrides:
      saveViewerData in class PamDataBlock<DetectionGroupDataUnit>
      Returns:
      true if data found and saved.
    • addPamData Link icon

      public void addPamData(DetectionGroupDataUnit pamDataUnit)
      Description copied from class: PamDataBlock
      Adds a new PamDataUnit to the PamDataBlock. When the data unit is added, PamObservers that have subscribed to the block will be notified.
      If the data unit already has a UID, it will be left as is.
      Overrides:
      addPamData in class PamDataBlock<DetectionGroupDataUnit>
      Parameters:
      pamDataUnit - Reference to a PamDataUnit
    • addPamData Link icon

      public void addPamData(DetectionGroupDataUnit pamDataUnit, Long uid)
      Description copied from class: PamDataBlock
      Adds a new PamDataUnit to the PamDataBlock and force the UID to a specific value. This should only be used in very specific circumstances - nromally, programmers should call addPamData(Tunit pamDataUnit) and let PAMGuard handle the UID's.
      Overrides:
      addPamData in class PamDataBlock<DetectionGroupDataUnit>
      Parameters:
      pamDataUnit - Reference to a PamDataUnit
      uid - Unique identifier for data unit.
    • updatePamData Link icon

      public void updatePamData(DetectionGroupDataUnit pamDataUnit, long updateTimeMillis)
      Description copied from class: PamDataBlock
      update a dataunit. Does little except flag that the data unit is updated (so it will get saved), and sends notifications to other modules.
      Overrides:
      updatePamData in class PamDataBlock<DetectionGroupDataUnit>
      Parameters:
      pamDataUnit -
      updateTimeMillis -
    • removeOldUnitsT Link icon

      protected int removeOldUnitsT(long currentTimeMS)
      Description copied from class: PamDataBlock
      Removes olderPamDataUnits from memory, starting at the first unit and continuing until if finds one with data coming earlier than the given time in milliseconds.

      If the data are acoustic, it tries to find the data source and looks to see how much data has been placed in the source data unit and does the calculation in samples.

      Overrides:
      removeOldUnitsT in class PamDataBlock<DetectionGroupDataUnit>
      Parameters:
      currentTimeMS - Time in milliseconds of the first data which must be kept
      Returns:
      the number of units removed
    • removeOldUnitsS Link icon

      protected int removeOldUnitsS(long mastrClockSample)
      Overrides:
      removeOldUnitsS in class PamDataBlock<DetectionGroupDataUnit>
    • needViewerDataLoad Link icon

      public boolean needViewerDataLoad(OfflineDataLoadInfo offlineDataLoadInfo)
      Description copied from class: PamDataBlock
      Do we need to reload offline data ? Default behaviour is to reurn true if the time periods of the data load have changed, false otherwise.
      Overrides:
      needViewerDataLoad in class PamDataBlock<DetectionGroupDataUnit>
      Parameters:
      offlineDataLoadInfo -
      Returns:
      true if we need to reload offline data.
    • clearAll Link icon

      public void clearAll()
      Description copied from class: PamDataBlock
      Clears all PamDataUnits from memory

      In viewer mode, data are also re-saved.

      Overrides:
      clearAll in class PamDataBlock<DetectionGroupDataUnit>
    • canSuperDetection Link icon

      public boolean canSuperDetection(PamDataBlock subDataBlock)
      Description copied from class: SuperDetDataBlock
      Return whether this type of super detection can hold the passed sub detection data. Default is based on class compatibility, but some super det datablocks should override this if they only manage one stream of data.
      Overrides:
      canSuperDetection in class SuperDetDataBlock<DetectionGroupDataUnit,PamDataUnit>
      Parameters:
      subDataBlock - Sub detection data block
      Returns:
      true if this data can hold those sub data.
    • getTethysDataProvider Link icon

      public TethysDataProvider getTethysDataProvider(TethysControl tethysControl)
      Description copied from class: PamDataBlock
      Gets a data provider for Tethys. These will probably need to be bespoke, but for now will autogenerate based on the SQLLogging information.
      Overrides:
      getTethysDataProvider in class PamDataBlock<DetectionGroupDataUnit>
      Returns:
      the tethysDataProvider
    • getDatablockSpeciesManager Link icon

      public DataBlockSpeciesManager<DetectionGroupDataUnit> getDatablockSpeciesManager()
      Description copied from class: PamDataBlock
      Get information about species types that may occur within this data block. Primarily for conversion into Tethys compatible data, but may prove to have other uses.
      Overrides:
      getDatablockSpeciesManager in class PamDataBlock<DetectionGroupDataUnit>
      Returns:
      Types of species information available within this datablock.