Class AnnotationAssayField
java.lang.Object
net.sf.basedb.util.export.spotdata.AnnotationAssayField
- All Implemented Interfaces:
AssayField
,ExportableField
Assay field implementation that exports the annotations of a
bioassay. Before it can be used an
AnnotationType
must be configured. One instance of this class is considered to
be equal to another if they are configured with the same annotation
type and title.- Version:
- 2.12
- Author:
- Nicklas
- Last modified
- $Date: 2010-08-03 11:11:54 +0200 (ti, 03 aug 2010) $
-
Field Summary
Modifier and TypeFieldDescriptionprivate AnnotationType
private Formatter<?>
private SnapshotManager
private String
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
An assay field is equal to another assay field if it uses the same annotation type and has the same title.Get the configured annotation type.Collection<?>
getAssayValue
(DbControl dc, BioAssay ba) Return all annotation values that are related to the specified bioassay, or null if not configured.Formatter<?>
Get a formatter that converts the values in this field to strings.getTitle()
Returns the name of the configured annotation type, or the empty string if not configured.getType()
Return the value type of the annotation type, or null if not configured.int
hashCode()
boolean
A boolean flag indicating if the field is an annotation or not.void
Set the annotation type of the annotations that should be exported in this field.void
setFormatter
(Formatter<?> formatter) Set a formatter to use for formatting the exported values.void
setSnapshotManager
(SnapshotManager snapshotManager) Set the snapshot manager that should be used to load annotation values.void
Set a custom title for the assay field.toString()
-
Field Details
-
at
-
title
-
formatter
-
snapshotManager
-
-
Constructor Details
-
AnnotationAssayField
public AnnotationAssayField()Create a new annotation field. CallsetAnnotationType(AnnotationType)
before use.
-
-
Method Details
-
getTitle
Returns the name of the configured annotation type, or the empty string if not configured.- Specified by:
getTitle
in interfaceExportableField
-
getAssayValue
Return all annotation values that are related to the specified bioassay, or null if not configured.- Specified by:
getAssayValue
in interfaceAssayField
- Parameters:
dc
- The DbControl that is used for database accessba
- The bioassay to get the value(s) from- Returns:
- A collection with one or more values, or null or an empty collection if there is no value for the given bioassay
-
getType
Return the value type of the annotation type, or null if not configured.- Specified by:
getType
in interfaceExportableField
- Returns:
- A type object or null if not known
- Since:
- 2.15
-
getFormatter
Description copied from interface:ExportableField
Get a formatter that converts the values in this field to strings.- Specified by:
getFormatter
in interfaceExportableField
- Returns:
- A formatter or null to use default formatting (normally this means calling the toString() method).
-
isAnnotation
public boolean isAnnotation()Description copied from interface:AssayField
A boolean flag indicating if the field is an annotation or not.- Specified by:
isAnnotation
in interfaceAssayField
- Returns:
- Always TRUE
-
equals
An assay field is equal to another assay field if it uses the same annotation type and has the same title. -
hashCode
public int hashCode() -
toString
-
setAnnotationType
Set the annotation type of the annotations that should be exported in this field. -
getAnnotationType
Get the configured annotation type. -
setFormatter
Set a formatter to use for formatting the exported values. -
setSnapshotManager
Set the snapshot manager that should be used to load annotation values.- Since:
- 2.14
-
setTitle
Set a custom title for the assay field.- Parameters:
title
- The custom title or null to use the name of the annotation type
-