Class SuperDetDataBlock<Tunit extends SuperDetection,TSubDet extends PamDataUnit>

java.lang.Object
PamguardMVC.PamObservable
PamguardMVC.PamDataBlock<Tunit>
PamguardMVC.superdet.SuperDetDataBlock<Tunit,TSubDet>
Direct Known Subclasses:
ClickTrainDataBlock, CPODClickTrainDataBlock, DetectionGroupDataBlock, Group3DDataBlock, MarkGroupDataBlock, OfflineEventDataBlock, QADataBlock, QASequenceDataBlock, QATestDataBlock

public class SuperDetDataBlock<Tunit extends SuperDetection,TSubDet extends PamDataUnit> extends PamDataBlock<Tunit>
  • Constructor Details

  • Method Details

    • dummyClassResolve

      public TSubDet dummyClassResolve()
      This is a dummy method which is not used for anything apart from a call to resolve the return type.
      Returns:
      null. This is never used, but don't delete it!
    • getSubDetectionClass

      public Class<TSubDet> getSubDetectionClass()
    • canSuperDetection

      public boolean canSuperDetection(PamDataBlock subDataBlock)
      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.
      Parameters:
      subDataBlock - Sub detection data block
      Returns:
      true if this data can hold those sub data.
    • getSubtableData

      public ArrayList<PamSubtableData> getSubtableData()
      Returns the list of subtable data that gets generated when the PamDataBlock is loaded from the database. The list contains information about all the subdetections in each of the PamDataUnits contained in the PamDataBlock. It will be used to re-attach the subdetections
      Returns:
    • setSubtableData

      public void setSubtableData(ArrayList<PamSubtableData> subTableDataList, ViewLoadObserver loadObserver)
      Called from the database when subtable data are loaded. The SuperDetection data units will have been loaded at this point, to it's OK to go ahead and sort the subtable data into their SuperDetecitons. However, its possible that the binary data won't have loaded yet, so it may not yet be possible to link the SubdetectionInfo objects to their subdetection data units. That is done in reattach subdetections.
      Parameters:
      subTableDataList -
      loadObserver -
    • reattachSubdetections

      public boolean reattachSubdetections(ViewLoadObserver viewLoadObserver)
      New version of this call that only has to link data units into their sub detections since the SubdetectionInfo lists are already in place in the SuperDetections.
      Parameters:
      viewLoadObserver -
      Returns:
    • findSubDetDataBlock

      public PamDataBlock findSubDetDataBlock(String dataLongName)
      find the datablock for the subdetection. Generally, this is just the normal datablock, but in some silly circumstances, it may need to change to something more bespoke (e.g. in QA module).
      Parameters:
      dataLongName - data name
      Returns:
      data block,null if nothing found.
    • makeSubDetectionInfo

      public SubdetectionInfo<TSubDet> makeSubDetectionInfo(TSubDet subDetection, Tunit superDetection)
    • getLogging

      public SuperDetLogging getLogging()
      Overrides:
      getLogging in class PamDataBlock<Tunit extends SuperDetection>
    • clearOnViewerLoad

      public boolean clearOnViewerLoad()
      Description copied from class: PamDataBlock
      Clear all data units on viewer load.
      Overrides:
      clearOnViewerLoad in class PamDataBlock<Tunit extends SuperDetection>
      Returns:
      true for normal operations, may be overridded for some types of super detection
    • getViewerLoadPolicy

      public SuperDetDataBlock.ViewerLoadPolicy getViewerLoadPolicy()
      Returns:
      the viewerLoadPolicy
    • setViewerLoadPolicy

      public void setViewerLoadPolicy(SuperDetDataBlock.ViewerLoadPolicy viewerLoadPolicy)
      Parameters:
      viewerLoadPolicy - the viewerLoadPolicy to set