Class ClickTrainDataBlock<T extends CTDetectionGroupDataUnit>


public class ClickTrainDataBlock<T extends CTDetectionGroupDataUnit> extends SuperDetDataBlock<T,PamDataUnit>
The click train detector data block. Holds all detected click trains in ClickTrainDataUnits which themselves contain a list of detected data units within a train.
Author:
Jamie Macaulay
  • Constructor Details

  • Method Details

    • saveViewerData

      public boolean saveViewerData()
      Description copied from class: PamDataBlock
      Saves data in this data block in offline viewer mode.
      Overrides:
      saveViewerData in class PamDataBlock<T extends CTDetectionGroupDataUnit>
      Returns:
      true if data found and saved.
    • loadViewerData

      public boolean loadViewerData(OfflineDataLoadInfo offlineDataLoadInfo, ViewLoadObserver loadObserver)
      Description copied from class: PamDataBlock
      Instruction from the viewer scroll manager to load new data.
      Overrides:
      loadViewerData in class PamDataBlock<T extends CTDetectionGroupDataUnit>
      Parameters:
      offlineDataLoadInfo - - the load object which contains all info on the data to be loaded.
      loadObserver - - the load observer. Can be used as a callback for load progress.
    • addPamData

      public void addPamData(T 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<T extends CTDetectionGroupDataUnit>
      Parameters:
      pamDataUnit - Reference to a PamDataUnit
    • addPamData

      public void addPamData(T 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<T extends CTDetectionGroupDataUnit>
      Parameters:
      pamDataUnit - Reference to a PamDataUnit
      uid - Unique identifier for data unit.
    • updatePamData

      public void updatePamData(T 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<T extends CTDetectionGroupDataUnit>
    • getSampleRate

      public float getSampleRate()
      Overrides:
      getSampleRate in class PamDataBlock<T extends CTDetectionGroupDataUnit>
      Returns:
      The sample rate of the data contained in the block
    • needViewerDataLoad

      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<T extends CTDetectionGroupDataUnit>
      Returns:
      true if we need to reload offline data.
    • shouldNotify

      public boolean shouldNotify()
      Overrides:
      shouldNotify in class PamDataBlock<T extends CTDetectionGroupDataUnit>
    • getClickTrainControl

      public ClickTrainControl getClickTrainControl()
      Get the click train control.
      Returns:
      the click train control.
    • getDataSelectCreator

      public DataSelectorCreator getDataSelectCreator()
      Overrides:
      getDataSelectCreator in class PamDataBlock<T extends CTDetectionGroupDataUnit>
      Returns:
      an object that can create data selectors to sub select data from within this type of data block.