Class GranularityHandler

java.lang.Object
tethys.detection.GranularityHandler
Direct Known Subclasses:
BinnedGranularityHandler, CallGranularityHandler, EncounterGranularityHandler

public abstract class GranularityHandler extends Object
  • Constructor Details

  • Method Details

    • prepare

      public abstract void prepare(long timeMillis)
      Prepare to start, passing the start time of the effort or of the first time bin for binned granularity types.
      Parameters:
      timeMillis -
    • addDataUnit

      public abstract nilus.Detection[] addDataUnit(PamDataUnit dataUnit)
      Put a data unit into a Detection object. for Call granularity this will probably return every time. For binned and encounter types this will only return at the end of a bin / encounter
      Parameters:
      dataUnit -
      Returns:
      Detection object, but only when ready to be added to Detections
    • getCallGroupName

      public String getCallGroupName(PamDataUnit dataUnit)
      Get a grouping name for the call. This may just be the calls species code, or it may be appended with the channel number. This is used to find bin and encounter data in HashMaps in
      Parameters:
      dataUnit -
      Returns:
    • cleanup

      public abstract nilus.Detection[] cleanup(long timeMillis)
      Called after end end of all data units to get the last bin / encounter.

      Parameters:
      timeMillis - end time of effort or last bin in milliseconds.
      Returns:
      null for Call granularity, otherwise may be non null for binned or encounter.
    • getHandler

      public static GranularityHandler getHandler(nilus.GranularityEnumType granularity, TethysControl tethysControl, PamDataBlock dataBlock, TethysExportParams tethysExportParams, StreamExportParams streamExportParams)
      Create the correct type of granularity handler to put individual data units into Detection objects.
      Parameters:
      granularity -
      tethysControl -
      dataBlock -
      tethysExportParams -
      streamExportParams -
      Returns: