Class CallGranularityHandler

java.lang.Object
tethys.detection.GranularityHandler
tethys.detection.CallGranularityHandler
Direct Known Subclasses:
GroupedGranularityHandler

public class CallGranularityHandler extends GranularityHandler
  • Constructor Details

  • Method Details

    • prepare

      public void prepare(long timeMillis)
      Description copied from class: GranularityHandler
      Prepare to start, passing the start time of the effort or of the first time bin for binned granularity types.
      Specified by:
      prepare in class GranularityHandler
      Parameters:
      timeMillis -
    • addDataUnit

      public nilus.Detection[] addDataUnit(PamDataUnit dataUnit)
      Description copied from class: GranularityHandler
      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
      Specified by:
      addDataUnit in class GranularityHandler
      Parameters:
      dataUnit -
      Returns:
      Detection object, but only when ready to be added to Detections
    • cleanup

      public nilus.Detection[] cleanup(long timeMillis)
      Description copied from class: GranularityHandler
      Called after end end of all data units to get the last bin / encounter.

      Specified by:
      cleanup in class GranularityHandler
      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.
    • autoEffortFix

      protected boolean autoEffortFix(nilus.Detections detections, nilus.Detection det)
      Description copied from class: GranularityHandler
      Automatically fix mismatches between effort and detections. This will be called if a detection or part of a detection is outside of the start and end defined by the effort. If it's a small difference, i.e. if the detection at least overlaps the effort then it can be automatically fixed by truncating the detection (for binned types) or by a small extension to the effort (for encounter and call types).
      Specified by:
      autoEffortFix in class GranularityHandler
      Parameters:
      detections - nilus Detections object
      det - a single detection
      Returns:
      true if it was fixed automatically. False otherwise.