Class AudioAnnotations

  • All Implemented Interfaces:
    adams.core.CloneHandler, adams.core.Mergeable<adams.data.container.DataContainer>, adams.core.UniqueIDHandler, adams.data.container.DataContainer<AudioAnnotation>, adams.data.id.IDHandler, adams.data.id.MutableIDHandler, adams.data.NotesHandler, adams.data.report.MutableReportHandler<adams.data.report.Report>, adams.data.report.ReportHandler<adams.data.report.Report>, adams.data.spreadsheet.SpreadSheetSupporter, adams.data.statistics.InformativeStatisticSupporter<AudioAnnotationsStatistic>, Serializable, Comparable, Iterable<AudioAnnotation>, Collection<AudioAnnotation>

    public class AudioAnnotations
    extends adams.data.container.AbstractDataContainer<AudioAnnotation>
    implements adams.data.report.MutableReportHandler<adams.data.report.Report>, adams.data.NotesHandler, adams.data.spreadsheet.SpreadSheetSupporter, adams.data.statistics.InformativeStatisticSupporter<AudioAnnotationsStatistic>
    Encapsulates a series of audio annotations.
    Author:
    FracPete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Detail

      • m_Report

        protected adams.data.report.Report m_Report
        the attached report.
      • m_Notes

        protected adams.data.Notes m_Notes
        the notes.
    • Constructor Detail

      • AudioAnnotations

        public AudioAnnotations()
        Initializes the trail.
    • Method Detail

      • newComparator

        public AudioAnnotationComparator newComparator()
        Returns a new instance of the default comparator.
        Specified by:
        newComparator in interface adams.data.container.DataContainer<AudioAnnotation>
        Returns:
        the comparator instance
      • getComparator

        public adams.data.container.DataPointComparator<AudioAnnotation> getComparator()
        Returns the comparator in use.
        Specified by:
        getComparator in interface adams.data.container.DataContainer<AudioAnnotation>
        Returns:
        the comparator in use
      • newPoint

        public AudioAnnotation newPoint()
        Returns a new instance of a DataContainer point.
        Specified by:
        newPoint in interface adams.data.container.DataContainer<AudioAnnotation>
        Returns:
        the new DataContainer point
      • assign

        public void assign​(adams.data.container.DataContainer<AudioAnnotation> other)
        Obtains the stored variables from the other data point, but not the actual data points.
        Specified by:
        assign in interface adams.data.container.DataContainer<AudioAnnotation>
        Overrides:
        assign in class adams.data.container.AbstractDataContainer<AudioAnnotation>
        Parameters:
        other - the data point to get the values from
      • getNotes

        public adams.data.Notes getNotes()
        Returns the currently stored notes.
        Specified by:
        getNotes in interface adams.data.NotesHandler
        Returns:
        the current notes
      • setReport

        public void setReport​(adams.data.report.Report value)
        Sets a new report.
        Specified by:
        setReport in interface adams.data.report.MutableReportHandler<adams.data.report.Report>
        Parameters:
        value - the new report
      • hasReport

        public boolean hasReport()
        Checks whether a report is present.
        Specified by:
        hasReport in interface adams.data.report.ReportHandler<adams.data.report.Report>
        Returns:
        true if a report is present
      • getReport

        public adams.data.report.Report getReport()
        Returns the report.
        Specified by:
        getReport in interface adams.data.report.ReportHandler<adams.data.report.Report>
        Returns:
        the report, can be null if none available
      • getStep

        public AudioAnnotation getStep​(adams.core.TimeMsec timestamp)
        Returns the step associated with the given timestamp.
        Parameters:
        timestamp - the timestamp to get the step for
        Returns:
        the associated step or null if none available for the timestamp
      • toSpreadSheet

        public adams.data.spreadsheet.SpreadSheet toSpreadSheet()
        Returns the content as spreadsheet.
        Specified by:
        toSpreadSheet in interface adams.data.spreadsheet.SpreadSheetSupporter
        Returns:
        the content
      • toStatistic

        public AudioAnnotationsStatistic toStatistic()
        Returns a statistic object for this object.
        Specified by:
        toStatistic in interface adams.data.statistics.InformativeStatisticSupporter<AudioAnnotationsStatistic>
        Returns:
        statistics for this object
      • toString

        public String toString()
        Returns a string representation of the sequence.
        Overrides:
        toString in class adams.data.container.AbstractDataContainer<AudioAnnotation>
        Returns:
        the string representation