Class OfflineEventDataUnit

All Implemented Interfaces:
Comparable<PamDataUnit>, PamDetection, AcousticDataUnit
Direct Known Subclasses:
ClickTrainDetection

public class OfflineEventDataUnit extends GroupDetection<PamDataUnit>
OfflineEventDataUnit replicates the RainbowClick functionality in OfflineRCEvent.

A lot of the functionality required to associate clicks with an event is already wrapped up in the base classes of PamDataBlock and PamDataUnit.

March 2016. Am merging online and offline click tracking functionality, so this has now been declared abstract to stop them being created directly and TrackedClickGroup has been made to subclass this, so that both now have the same functionality. May at a later date remove trackedclickGroup and go back to just having the one class of OfflineEventDataUnit - or better, EventDataUnit.

Author:
Doug Gillespie
  • Constructor Details

    • OfflineEventDataUnit

      public OfflineEventDataUnit(ClickDetection firstClick)
    • OfflineEventDataUnit

      public OfflineEventDataUnit(long timeMilliseconds, int channelBitmap, long startSample, long duration)
    • OfflineEventDataUnit

      public OfflineEventDataUnit(String eventType, Integer nominalEventId, ClickDetection firstClick)
      Called whena new event is created.
      Parameters:
      eventType -
      firstClick -
      colourIndex -
  • Method Details

    • getEventType

      public String getEventType()
      Returns:
      the eventType
    • getColourIndex

      public int getColourIndex()
      Description copied from class: PamDataUnit
      Get a colour id. this can be pretty much anything and will be scaled, looped, to fit in the range of whale id colours. Mostly used for superdetection display, but can be used by anything.
      Overrides:
      getColourIndex in class PamDataUnit<PamDataUnit,SuperDetection>
      Returns:
      any integer.
    • setColourIndex

      public void setColourIndex(int colourIndex)
    • setEventType

      public void setEventType(String eventType)
      Parameters:
      eventType - the eventType to set
    • getComment

      public String getComment()
      Returns:
      the comment
    • setComment

      public void setComment(String comment)
      Parameters:
      comment - the comment to set
    • getEventNumber

      public int getEventNumber()
      Returns:
      the eventNumber which is the same as the database index.
    • getMinNumber

      public Short getMinNumber()
    • setMinNumber

      public void setMinNumber(Short minNumber)
    • getBestNumber

      public Short getBestNumber()
    • setBestNumber

      public void setBestNumber(Short bestNumber)
    • getMaxNumber

      public Short getMaxNumber()
    • setMaxNumber

      public void setMaxNumber(Short maxNumber)
    • getNClicks

      public int getNClicks()
    • isSuspectEventTimes

      public boolean isSuspectEventTimes()
      Returns:
      the suspectEventTimes
    • setSuspectEventTimes

      public void setSuspectEventTimes(boolean suspectEventTimes)
      Parameters:
      suspectEventTimes - the suspectEventTimes to set
    • notifyUpdate

      public void notifyUpdate()
      Quick way for events to tell observers of the data block that they have updated.