Class SimpleDynamicField
java.lang.Object
net.sf.basedb.util.export.spotdata.SimpleDynamicField
- All Implemented Interfaces:
DynamicField
,ExportableField
Represents an exported data field. The object consists
of a predefined query expression that can be used in the
export query to select the data that is going to be exported, and
a title that is exported as part of the table header. One
instance of this class is considered to be equal to another if
they are configured with the same expression and title.
- Version:
- 2.12
- Author:
- Nicklas
- Last modified
- $Date: 2010-08-13 12:48:17 +0200 (fr, 13 aug 2010) $
-
Field Summary
Modifier and TypeFieldDescriptionprivate Formula.AverageMethod
private Expression
private Formatter<?>
private String
private Type
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
A dynamic field is equal to another field if it uses the same expression and has the same title.Get the average method to use if the exporter is exporting averaged data.Get the configured express.getExpression
(DbControl dc, DynamicQuery query, BioAssaySet source, boolean forAverage) Returns the configured expression.Formatter<?>
Get a formatter that converts the values in this field to strings.getTitle()
Get the column header.getType()
Get the data type of the field.int
hashCode()
void
setAverageMethod
(Formula.AverageMethod averageMethod) Set the average method to use when exporting averaged data.void
setExpression
(Expression expression) Set the expression used to select data in the query.void
setFormatter
(Formatter<?> formatter) Set a formatter to use for formatting the exported values.void
Set the column header title.void
Set the data type of the exported field.toString()
-
Field Details
-
expression
-
averageMethod
-
formatter
-
title
-
type
-
-
Constructor Details
-
SimpleDynamicField
public SimpleDynamicField()Create a new object. Before it can be used it must be configured.
-
-
Method Details
-
getTitle
Description copied from interface:ExportableField
Get the column header.- Specified by:
getTitle
in interfaceExportableField
-
getExpression
public Expression getExpression(DbControl dc, DynamicQuery query, BioAssaySet source, boolean forAverage) Returns the configured expression. If 'forAverage' is TRUE the confguredFormula.AverageMethod
is allowed to transform the expression. If no average method has been configured the average method specified by theIntensityTransform
from the 'source' bioassay set is used.- Specified by:
getExpression
in interfaceDynamicField
- Parameters:
dc
- The DbControl that is used for database accessquery
- The query the expression will be used withsource
- The source bioassay setforAverage
- TRUE if the expression should generate an average of multiple values- Returns:
- An expression, or null if it is not possible to create an expression in the given case (this will normally be replaced with an empty column in the output)
-
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).
-
equals
A dynamic field is equal to another field if it uses the same expression and has the same title. -
hashCode
public int hashCode() -
toString
-
getExpression
Get the configured express. -
setExpression
Set the expression used to select data in the query. -
setTitle
Set the column header title. -
setType
Set the data type of the exported field.- Since:
- 2.15
-
getAverageMethod
Get the average method to use if the exporter is exporting averaged data. If no average method has been configured, the everage method specified by theIntensityTransform
of the source bioassay set is used. -
setAverageMethod
Set the average method to use when exporting averaged data. -
setFormatter
Set a formatter to use for formatting the exported values.
-