Package adams.data.audioannotations
Class AudioAnnotations
- java.lang.Object
-
- adams.data.container.AbstractDataContainer<AudioAnnotation>
-
- adams.data.audioannotations.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 Summary
Fields Modifier and Type Field Description protected static AudioAnnotationComparator
m_Comparator
the comparator to use.protected adams.data.Notes
m_Notes
the notes.protected adams.data.report.Report
m_Report
the attached report.static String
PREFIX_META
-
Constructor Summary
Constructors Constructor Description AudioAnnotations()
Initializes the trail.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
assign(adams.data.container.DataContainer<AudioAnnotation> other)
Obtains the stored variables from the other data point, but not the actual data points.adams.data.container.DataPointComparator<AudioAnnotation>
getComparator()
Returns the comparator in use.adams.data.Notes
getNotes()
Returns the currently stored notes.adams.data.report.Report
getReport()
Returns the report.AudioAnnotation
getStep(adams.core.TimeMsec timestamp)
Returns the step associated with the given timestamp.boolean
hasReport()
Checks whether a report is present.AudioAnnotationComparator
newComparator()
Returns a new instance of the default comparator.AudioAnnotation
newPoint()
Returns a new instance of a DataContainer point.void
setReport(adams.data.report.Report value)
Sets a new report.adams.data.spreadsheet.SpreadSheet
toSpreadSheet()
Returns the content as spreadsheet.AudioAnnotationsStatistic
toStatistic()
Returns a statistic object for this object.String
toString()
Returns a string representation of the sequence.-
Methods inherited from class adams.data.container.AbstractDataContainer
add, addAll, clear, compareTo, compareToData, compareToHeader, contains, containsAll, ensureCapacity, equals, equalsData, equalsHeader, getClone, getHeader, getID, getUniqueID, hashCode, isEmpty, iterator, mergeWith, modifiedListener, newInstance, remove, removeAll, retainAll, setID, size, toArray, toArray, toList, toList, toTreeSet, toTreeSet, trimToSize
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, spliterator, stream, toArray
-
-
-
-
Field Detail
-
PREFIX_META
public static final String PREFIX_META
- See Also:
- Constant Field Values
-
m_Report
protected adams.data.report.Report m_Report
the attached report.
-
m_Notes
protected adams.data.Notes m_Notes
the notes.
-
m_Comparator
protected static AudioAnnotationComparator m_Comparator
the comparator to use.
-
-
Method Detail
-
newComparator
public AudioAnnotationComparator newComparator()
Returns a new instance of the default comparator.- Specified by:
newComparator
in interfaceadams.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 interfaceadams.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 interfaceadams.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 interfaceadams.data.container.DataContainer<AudioAnnotation>
- Overrides:
assign
in classadams.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 interfaceadams.data.NotesHandler
- Returns:
- the current notes
-
setReport
public void setReport(adams.data.report.Report value)
Sets a new report.- Specified by:
setReport
in interfaceadams.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 interfaceadams.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 interfaceadams.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 interfaceadams.data.spreadsheet.SpreadSheetSupporter
- Returns:
- the content
-
toStatistic
public AudioAnnotationsStatistic toStatistic()
Returns a statistic object for this object.- Specified by:
toStatistic
in interfaceadams.data.statistics.InformativeStatisticSupporter<AudioAnnotationsStatistic>
- Returns:
- statistics for this object
-
toString
public String toString()
Returns a string representation of the sequence.- Overrides:
toString
in classadams.data.container.AbstractDataContainer<AudioAnnotation>
- Returns:
- the string representation
-
-