public class AnnotationAssayField extends Object implements AssayField
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.Modifier and Type | Field and Description |
---|---|
private AnnotationType |
at |
private Formatter<?> |
formatter |
private SnapshotManager |
snapshotManager |
private String |
title |
Constructor and Description |
---|
AnnotationAssayField()
Create a new annotation field.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj)
An assay field is equal to another assay field if it uses the same
annotation type and has the same title.
|
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.
|
Type |
getType()
Return the value type of the annotation type, or null if not
configured.
|
int |
hashCode() |
boolean |
isAnnotation()
A boolean flag indicating if the field is an annotation or not.
|
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.
|
void |
setTitle(String title)
Set a custom title for the assay field.
|
String |
toString() |
private AnnotationType at
private String title
private Formatter<?> formatter
private SnapshotManager snapshotManager
public AnnotationAssayField()
setAnnotationType(AnnotationType)
before use.public String getTitle()
getTitle
in interface ExportableField
public Collection<?> getAssayValue(DbControl dc, BioAssay ba)
getAssayValue
in interface AssayField
dc
- The DbControl that is used for database accessba
- The bioassay to get the value(s) frompublic Type getType()
getType
in interface ExportableField
public Formatter<?> getFormatter()
ExportableField
getFormatter
in interface ExportableField
public boolean isAnnotation()
AssayField
isAnnotation
in interface AssayField
public boolean equals(Object obj)
public void setAnnotationType(AnnotationType at)
public AnnotationType getAnnotationType()
public void setFormatter(Formatter<?> formatter)
public void setSnapshotManager(SnapshotManager snapshotManager)
public void setTitle(String title)
title
- The custom title or null to use the name
of the annotation type