public class AssayPropertyField extends java.lang.Object implements AssayField
Modifier and Type | Field and Description |
---|---|
private Formatter<?> |
formatter |
private Metadata<BioAssay> |
metadata |
private java.lang.String |
property |
private Metadata.PropertyPath<BioAssay,?> |
propertyPath |
private java.lang.String |
title |
private Type |
type |
Constructor and Description |
---|
AssayPropertyField()
Create a new annotation field.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj)
An assay field is equal to another assay field if it uses the same
property and has the same title.
|
java.util.Collection<?> |
getAssayValue(DbControl dc,
BioAssay ba)
Return all values that are given by the specified property.
|
Formatter<?> |
getFormatter()
Get a formatter that converts the values in this field to strings.
|
java.lang.String |
getProperty()
Get the configured property.
|
java.lang.String |
getTitle()
Get the column header.
|
Type |
getType()
Get the data type of the field.
|
int |
hashCode() |
boolean |
isAnnotation()
A boolean flag indicating if the field is an annotation or not.
|
void |
setFormatter(Formatter<?> formatter)
Set a formatter to use for formatting the exported values.
|
void |
setProperty(java.lang.String property)
Set the property that should be exported.
|
void |
setTitle(java.lang.String title)
Set the title of the exported property.
|
void |
setType(Type type)
Set the data type of the exported property.
|
java.lang.String |
toString() |
private Metadata.PropertyPath<BioAssay,?> propertyPath
private java.lang.String property
private java.lang.String title
private Type type
private Formatter<?> formatter
public AssayPropertyField()
setProperty(String)
and setTitle(String)
to change.public java.lang.String getTitle()
ExportableField
getTitle
in interface ExportableField
public java.util.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()
ExportableField
getType
in interface ExportableField
public Formatter<?> getFormatter()
ExportableField
getFormatter
in interface ExportableField
public boolean isAnnotation()
AssayField
isAnnotation
in interface AssayField
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public void setProperty(java.lang.String property)
Metadata.getPropertyPath(String, boolean)
.
Do not forget to also change the title.public java.lang.String getProperty()
public void setTitle(java.lang.String title)
public void setType(Type type)
public void setFormatter(Formatter<?> formatter)