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 AudioAnnotationComparatorm_Comparatorthe comparator to use.protected adams.data.Notesm_Notesthe notes.protected adams.data.report.Reportm_Reportthe attached report.static StringPREFIX_META
-
Constructor Summary
Constructors Constructor Description AudioAnnotations()Initializes the trail.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidassign(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.NotesgetNotes()Returns the currently stored notes.adams.data.report.ReportgetReport()Returns the report.AudioAnnotationgetStep(adams.core.TimeMsec timestamp)Returns the step associated with the given timestamp.booleanhasReport()Checks whether a report is present.AudioAnnotationComparatornewComparator()Returns a new instance of the default comparator.AudioAnnotationnewPoint()Returns a new instance of a DataContainer point.voidsetReport(adams.data.report.Report value)Sets a new report.adams.data.spreadsheet.SpreadSheettoSpreadSheet()Returns the content as spreadsheet.AudioAnnotationsStatistictoStatistic()Returns a statistic object for this object.StringtoString()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:
newComparatorin interfaceadams.data.container.DataContainer<AudioAnnotation>- Returns:
- the comparator instance
-
getComparator
public adams.data.container.DataPointComparator<AudioAnnotation> getComparator()
Returns the comparator in use.- Specified by:
getComparatorin interfaceadams.data.container.DataContainer<AudioAnnotation>- Returns:
- the comparator in use
-
newPoint
public AudioAnnotation newPoint()
Returns a new instance of a DataContainer point.- Specified by:
newPointin 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:
assignin interfaceadams.data.container.DataContainer<AudioAnnotation>- Overrides:
assignin 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:
getNotesin interfaceadams.data.NotesHandler- Returns:
- the current notes
-
setReport
public void setReport(adams.data.report.Report value)
Sets a new report.- Specified by:
setReportin 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:
hasReportin 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:
getReportin 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:
toSpreadSheetin interfaceadams.data.spreadsheet.SpreadSheetSupporter- Returns:
- the content
-
toStatistic
public AudioAnnotationsStatistic toStatistic()
Returns a statistic object for this object.- Specified by:
toStatisticin interfaceadams.data.statistics.InformativeStatisticSupporter<AudioAnnotationsStatistic>- Returns:
- statistics for this object
-
toString
public String toString()
Returns a string representation of the sequence.- Overrides:
toStringin classadams.data.container.AbstractDataContainer<AudioAnnotation>- Returns:
- the string representation
-
-