Class AssayPropertyField
java.lang.Object
net.sf.basedb.util.export.spotdata.AssayPropertyField
- All Implemented Interfaces:
AssayField
,ExportableField
Assay field implementation that exports a named property
from a bioassay. The default setting will export the "name"
property. One instance of this class is considered to
be equal to another if they are configured with the same property
and title.
- Since:
- 2.15
- Author:
- Nicklas
- Last modified
- $Date: 2015-04-20 11:08:18 +0200 (må, 20 apr 2015) $
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
An assay field is equal to another assay field if it uses the same property and has the same title.Collection<?>
getAssayValue
(DbControl dc, BioAssay ba) Return all values that are given by the specified property.Formatter<?>
Get a formatter that converts the values in this field to strings.Get the configured property.getTitle()
Get the column header.getType()
Get the data type of the field.int
hashCode()
boolean
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
(String property) Set the property that should be exported.void
Set the title of the exported property.void
Set the data type of the exported property.toString()
-
Field Details
-
metadata
-
propertyPath
-
property
-
title
-
type
-
formatter
-
-
Constructor Details
-
AssayPropertyField
public AssayPropertyField()Create a new annotation field. The property is automatically set to "name". CallsetProperty(String)
andsetTitle(String)
to change.
-
-
Method Details
-
getTitle
Description copied from interface:ExportableField
Get the column header.- Specified by:
getTitle
in interfaceExportableField
-
getAssayValue
Return all values that are given by the specified property.- 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
Description copied from interface:ExportableField
Get the data type of the field.- Specified by:
getType
in interfaceExportableField
- Returns:
- A type object or null if not known
-
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 FALSE
-
equals
An assay field is equal to another assay field if it uses the same property and has the same title. -
hashCode
public int hashCode() -
toString
-
setProperty
Set the property that should be exported. For syntax seeMetadata.getPropertyPath(String, boolean)
. Do not forget to also change the title. -
getProperty
Get the configured property. -
setTitle
Set the title of the exported property. -
setType
Set the data type of the exported property.- Since:
- 2.15
-
setFormatter
Set a formatter to use for formatting the exported values.
-