Package annotation

Class DataAnnotationType<TDataAnnotation extends DataAnnotation>

java.lang.Object
annotation.DataAnnotationType<TDataAnnotation>
Direct Known Subclasses:
BaseClassificationAnnotationType, BearingAnnotationType, BearingLocAnnotationType, BFAnnotationType, ClickClassificationType, DLAnnotationType, DummyAnnotationType, MatchedClickAnnotationType, SNRAnnotationType, SPLAnnotationType, StringAnnotationType, TimestampAnnotationType, TMAnnotationType, UserFormAnnotationType, WavAnnotationType

public abstract class DataAnnotationType<TDataAnnotation extends DataAnnotation> extends Object
Something that can tell us a little more about a type of DataAnnotation, such as how to store and display and edit the data in that annotation.

This base type is intended for annotations which are genuinely annotations of existing data units. Stand alone annotations, which create their own dataunit should base upon SoloAnnotationType

Author:
Doug Gillespie
See Also:
  • invalid @see
    SoloAnnotationType
  • Field Details

  • Constructor Details

    • DataAnnotationType

      public DataAnnotationType()
  • Method Details

    • getAnnotationName

      public abstract String getAnnotationName()
    • toString

      public String toString(TDataAnnotation dataAnnotation)
      Get the annotation as a string for use in tables, tool tips, etc.
      Parameters:
      dataAnnotation - Data Annotation
      Returns:
      String representation of the data
    • getAnnotationClass

      public abstract Class getAnnotationClass()
      Returns:
      Class type for the annotations
    • canAnnotate

      public abstract boolean canAnnotate(Class dataUnitType)
      Find out whether or not a particular type of data can be annotated
      Parameters:
      dataUnitType - Class of a type of data unit. Can be null in which case annotation can be stand alone.
      Returns:
      true if the data unit Class can be annotated.
    • canAutoAnnotate

      public boolean canAutoAnnotate()
      Returns:
      True if annotation can be automatic (i.e. calculated rather than input by user).
    • autoAnnotate

      public TDataAnnotation autoAnnotate(PamDataUnit pamDataUnit)
      Automatically annotate the data unit with this annotation.
      Parameters:
      pamDataUnit - data unit to annotate
      Returns:
      the annotation (though this should have already been added to the data unit).
    • getSQLLoggingAddon

      public SQLLoggingAddon getSQLLoggingAddon()
      Get an SQLLogging add on. For stand alone annotations, this will be used to generate a stand alone database table. For annotations of existing data this will be used to add additional columns to the existing data tables.
      Returns:
      An SQLLoggingAddon or null if SQL logging unavailable for this type of annotation.
    • getBinaryHandler

      public AnnotationBinaryHandler<TDataAnnotation> getBinaryHandler()
      Get an optional AnnotationBinaryHandler which can be used to add the annotation information for binary files and also read data back from them.
      Returns:
      handler for binary data i/o.
    • getDialogPanel

      public AnnotationDialogPanel getDialogPanel()
      Get a dialog component that can be incorporated into a larger dialog.

      Note that this is for setting the data for a specific annotation, NOT the dialog for setting options controlling how the annotation type works.

      Returns:
      a dialog panel (contains a component = a few other functions).
    • getSettingsPanel

      public AnnotationSettingsPanel getSettingsPanel()
    • hasSettingsPanel

      public boolean hasSettingsPanel()
    • getAnnotationOptions

      public AnnotationOptions getAnnotationOptions()
      Returns:
      the annotationOptions
    • setAnnotationOptions

      public void setAnnotationOptions(AnnotationOptions annotationOptions)
      Parameters:
      annotationOptions - the annotationOptions to set
    • getShortIdCode

      public String getShortIdCode()
      A short identifying code which MUST be unique to the data annotation and MUST be four characters long. Classes can override this with something even more cryptic so long as it remains unique.
      Returns:
      a four character id string.
    • getSymbolModifier

      public SymbolModifier getSymbolModifier(PamSymbolChooser symbolChooser)
      Some annotations may be able to set the type of symbol. This will be accessed from a datablocks SymbolManager
      Returns:
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getDataSelector

      public DataSelector getDataSelector(PamDataBlock pamDataBlock, String selectorName, boolean allowScores, String selectorType)
      Get a data selector specific to this annotation, which will merge seamlessly into a master data selector combining data unit specific and annotation selections
      Parameters:
      pamDataBlock -
      selectorName -
      allowScores -
      Returns:
      data selector
    • isAnnotating

      public boolean isAnnotating(PamDataBlock pamDataBlock)
      Is this type annotating a particular datablock.
      Parameters:
      pamDataBlock -
      Returns:
    • getTargetDataBlock

      public PamDataBlock getTargetDataBlock()
      Returns:
      the targetDataBlock
    • setTargetDataBlock

      public void setTargetDataBlock(PamDataBlock targetDataBlock)
      Parameters:
      targetDataBlock - the targetDataBlock to set