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 reference
    SoloAnnotationType
  • Field Details Link icon

  • Constructor Details Link icon

    • DataAnnotationType Link icon

      public DataAnnotationType()
  • Method Details Link icon

    • getAnnotationName Link icon

      public abstract String getAnnotationName()
    • toString Link icon

      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 Link icon

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

      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 Link icon

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

      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 Link icon

      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.
    • getXMLWriter Link icon

      public AnnotationXMLWriter<TDataAnnotation> getXMLWriter()
      Get something that can write an annotation as XML
      Returns:
    • getBinaryHandler Link icon

      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 Link icon

      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 Link icon

      public AnnotationSettingsPanel getSettingsPanel()
    • hasSettingsPanel Link icon

      public boolean hasSettingsPanel()
    • getAnnotationOptions Link icon

      public AnnotationOptions getAnnotationOptions()
      Returns:
      the annotationOptions
    • setAnnotationOptions Link icon

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

      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 Link icon

      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 Link icon

      public String toString()
      Overrides:
      toString in class Object
    • getDataSelectCreator Link icon

      protected AnnotationDataSelCreator getDataSelectCreator(String selectorName, boolean allowScores)
    • getDataSelector Link icon

      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 Link icon

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

      public PamDataBlock getTargetDataBlock()
      Returns:
      the targetDataBlock
    • setTargetDataBlock Link icon

      public void setTargetDataBlock(PamDataBlock targetDataBlock)
      Parameters:
      targetDataBlock - the targetDataBlock to set
    • getDataBlockSpeciesManager Link icon

      public DataBlockSpeciesManager getDataBlockSpeciesManager()
      Annotations may have a species manager. Most won't.
      Returns: