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
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 Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionautoAnnotate
(PamDataUnit pamDataUnit) Automatically annotate the data unit with this annotation.abstract boolean
canAnnotate
(Class dataUnitType) Find out whether or not a particular type of data can be annotatedboolean
abstract Class
abstract String
Get an optional AnnotationBinaryHandler which can be used to add the annotation information for binary files and also read data back from them.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 selectionsGet a dialog component that can be incorporated into a larger dialog.A short identifying code which MUST be unique to the data annotation and MUST be four characters long.Get an SQLLogging add on.getSymbolModifier
(PamSymbolChooser symbolChooser) Some annotations may be able to set the type of symbol.boolean
boolean
isAnnotating
(PamDataBlock pamDataBlock) Is this type annotating a particular datablock.void
setAnnotationOptions
(AnnotationOptions annotationOptions) void
setTargetDataBlock
(PamDataBlock targetDataBlock) toString()
toString
(TDataAnnotation dataAnnotation) Get the annotation as a string for use in tables, tool tips, etc.
-
Field Details
-
SHORTIDCODELENGTH
public static final int SHORTIDCODELENGTH- See Also:
-
-
Constructor Details
-
DataAnnotationType
public DataAnnotationType()
-
-
Method Details
-
getAnnotationName
-
toString
Get the annotation as a string for use in tables, tool tips, etc.- Parameters:
dataAnnotation
- Data Annotation- Returns:
- String representation of the data
-
getAnnotationClass
- Returns:
- Class type for the annotations
-
canAnnotate
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
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
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
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
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
-
hasSettingsPanel
public boolean hasSettingsPanel() -
getAnnotationOptions
- Returns:
- the annotationOptions
-
setAnnotationOptions
- Parameters:
annotationOptions
- the annotationOptions to set
-
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
Some annotations may be able to set the type of symbol. This will be accessed from a datablocks SymbolManager- Returns:
-
toString
-
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
Is this type annotating a particular datablock.- Parameters:
pamDataBlock
-- Returns:
-
getTargetDataBlock
- Returns:
- the targetDataBlock
-
setTargetDataBlock
- Parameters:
targetDataBlock
- the targetDataBlock to set
-