2.14.1: 2009-11-05

net.sf.basedb.util.export.spotdata
Class AnnotationAssayField

java.lang.Object
  extended by net.sf.basedb.util.export.spotdata.AnnotationAssayField
All Implemented Interfaces:
AssayField, ExportableField

public class AnnotationAssayField
extends Object
implements AssayField

Assay field implementation that exports the annotations of a bioassay. Before it can be used an AnnotationType must be configured.

Version:
2.12
Author:
Nicklas
Last modified
$Date: 2009-10-13 12:44:33 +0200 (Tue, 13 Oct 2009) $

Field Summary
private  AnnotationType at
           
private  Formatter<?> formatter
           
private  SnapshotManager snapshotManager
           
 
Constructor Summary
AnnotationAssayField()
          Create a new annotation field.
 
Method Summary
 AnnotationType getAnnotationType()
          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<?> getFormatter()
          Get a formatter that converts the values in this field to strings.
 String getTitle()
          Returns the name of the configured annotation type, or the empty string if not configured.
 void setAnnotationType(AnnotationType at)
          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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

at

private AnnotationType at

formatter

private Formatter<?> formatter

snapshotManager

private SnapshotManager snapshotManager
Constructor Detail

AnnotationAssayField

public AnnotationAssayField()
Create a new annotation field. Call setAnnotationType(AnnotationType) before use.

Method Detail

getTitle

public String getTitle()
Returns the name of the configured annotation type, or the empty string if not configured.

Specified by:
getTitle in interface ExportableField

getAssayValue

public Collection<?> getAssayValue(DbControl dc,
                                   BioAssay ba)
Return all annotation values that are related to the specified bioassay, or null if not configured.

Specified by:
getAssayValue in interface AssayField
Parameters:
dc - The DbControl that is used for database access
ba - 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

getFormatter

public Formatter<?> getFormatter()
Description copied from interface: ExportableField
Get a formatter that converts the values in this field to strings.

Specified by:
getFormatter in interface ExportableField
Returns:
A formatter or null to use default formatting (normally this means calling the toString() method).

setAnnotationType

public void setAnnotationType(AnnotationType at)
Set the annotation type of the annotations that should be exported in this field.


getAnnotationType

public AnnotationType getAnnotationType()
Get the configured annotation type.


setFormatter

public void setFormatter(Formatter<?> formatter)
Set a formatter to use for formatting the exported values.


setSnapshotManager

public void setSnapshotManager(SnapshotManager snapshotManager)
Set the snapshot manager that should be used to load annotation values.

Since:
2.14

2.14.1: 2009-11-05