Class DetectionsHandler

java.lang.Object
tethys.CollectionHandler
tethys.detection.DetectionsHandler

public class DetectionsHandler extends CollectionHandler
Functions for handling output of Detections documents. Works closely with a TethysDataProvider and DataBlockSpeciesManager to generate Detections elements for an xml doc to export to Tethys.
Author:
dg50
  • Field Details

  • Constructor Details

    • DetectionsHandler

      public DetectionsHandler(TethysControl tethysControl)
      Parameters:
      tethysControl -
  • Method Details

    • getStreamDetections

      public StreamDetectionsSummary<NilusDataWrapper<PDetections>> getStreamDetections(PamDataBlock dataBlock)
      Get a list of Detections documents associated with a particular data stream for this data set (not the entire project).
      Parameters:
      dataBlock -
    • getStreamDetections

      public StreamDetectionsSummary<NilusDataWrapper<PDetections>> getStreamDetections(PamDataBlock dataBlock, ArrayList<PDeployment> deployments)
      Get a list of Detections documents associated with a particular data block for the list of deployments documents. Group them by abstract or something
      Parameters:
      dataBlock -
      deployments -
      Returns:
    • startExportThread

      public void startExportThread(PamDataBlock pamDataBlock, StreamExportParams streamExportParams, DetectionExportObserver exportObserver)
      Detections will be exported in a separate worker thread since export may take some time and the user should be given ample opportunity to cancel it.
      Parameters:
      pamDataBlock -
      streamExportParams -
      exportWorkerCard -
    • cancelExport

      public void cancelExport()
      send a cancel command to export thread if it's running
    • roundDownBinStart

      public static long roundDownBinStart(long binStart, long binInterval)
      Round a bin start so that it's aligned correctly with day starts.
      Parameters:
      binStart - in milliseconds
      binInterval - in milliseconds
      Returns:
      rounded time.
    • exportDataBlock

      public void exportDataBlock(PamDataBlock dataBlock)
      Export data from given block, using appropriate species checks and other dialogs.
      Parameters:
      dataBlock -
    • getHelpPoint

      public String getHelpPoint()
      Specified by:
      getHelpPoint in class CollectionHandler