2.17.2: 2011-06-17

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

java.lang.Object
  extended by net.sf.basedb.util.export.spotdata.ExportableFieldFactory

public class ExportableFieldFactory
extends Object

Utility class with factory methods that helps with the creation of exportable fields.

Version:
2.12
Author:
Nicklas
Last modified
$Date: 2010-08-13 12:48:17 +0200 (Fri, 13 Aug 2010) $

Constructor Summary
ExportableFieldFactory()
           
 
Method Summary
static AnnotationAssayField annotation(AnnotationType at, Formatter<?> formatter)
          Create an annotation assay field.
static AnnotationAssayField annotation(AnnotationType at, String title, Formatter<?> formatter)
          Create an annotation assay field, overriding the title of the annotation type.
static AssayPropertyField assayProperty(String property, String title, Type type, Formatter<?> formatter)
          Create a property assay field.
static SimpleDynamicField channel(int channel, String title, Formatter<?> formatter)
          Create a simple dynamic field that exports the channel intensity of the given channel.
static JepDynamicField extraValue(ExtraValueType extra, String title, Formatter<?> formatter)
          Create a JEP dynamic field that exports an extra value.
static JepDynamicField formula(Formula f, String title, Formatter<?> formatter)
          Create a JEP dynamic field that exports the result of the JEP expression in a formula.
static JepDynamicField jep(String jep, String title, Formula.AverageMethod averageMethod, Formatter<?> formatter)
          Deprecated. In 2.15, use jep(String, String, Type, net.sf.basedb.core.Formula.AverageMethod, Formatter) instead
static JepDynamicField jep(String jep, String title, Type type, Formula.AverageMethod averageMethod, Formatter<?> formatter)
          Create a JEP dynamic field.
static SimpleDynamicField rawData(RawDataProperty property, String title, Formatter<?> formatter)
          Create a simple dynamic field that exports a raw data value.
static SimpleDynamicField rawData(String property, String title, Formula.AverageMethod averageMethod, Formatter<?> formatter)
          Deprecated. In 2.15, use rawData(String, String, Type, net.sf.basedb.core.Formula.AverageMethod, Formatter) instead
static SimpleDynamicField rawData(String property, String title, Type type, Formula.AverageMethod averageMethod, Formatter<?> formatter)
          Create a simple dynamic field that exports a raw data value.
static SimpleDynamicField reporter(ExtendedProperty property, String title, Formatter<?> formatter)
          Create a simple dynamic field that exports reporter annotation values.
static DynamicField reporter(String property, String title, Formula.AverageMethod averageMethod, Formatter<?> formatter)
          Deprecated. In 2.15, use reporter(String, String, Type, net.sf.basedb.core.Formula.AverageMethod, Formatter) instead
static DynamicField reporter(String property, String title, Type type, Formula.AverageMethod averageMethod, Formatter<?> formatter)
          Create a simple dynamic field that exports reporter annotation values.
static SimpleDynamicField simple(Expression e, String title, Formula.AverageMethod averageMethod, Formatter<?> formatter)
          Deprecated. In 2.15, use simple(Expression, String, Type, net.sf.basedb.core.Formula.AverageMethod, Formatter) instead
static SimpleDynamicField simple(Expression e, String title, Type type, Formula.AverageMethod averageMethod, Formatter<?> formatter)
          Create a simple dynamic field.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExportableFieldFactory

public ExportableFieldFactory()
Method Detail

annotation

public static AnnotationAssayField annotation(AnnotationType at,
                                              Formatter<?> formatter)
Create an annotation assay field.

Parameters:
at - The annotation type
formatter - A formatter or null
See Also:
AnnotationAssayField

annotation

public static AnnotationAssayField annotation(AnnotationType at,
                                              String title,
                                              Formatter<?> formatter)
Create an annotation assay field, overriding the title of the annotation type.

Parameters:
at - The annotation type
title - A custom title for the assay field, or null to use the name of the annotation type
formatter - A formatter or null
Since:
2.15
See Also:
AnnotationAssayField

assayProperty

public static AssayPropertyField assayProperty(String property,
                                               String title,
                                               Type type,
                                               Formatter<?> formatter)
Create a property assay field. This field is used to export, for example, name and description, from the bioassay.

Parameters:
property - The property to export, see Metadata.getPropertyValue(net.sf.basedb.core.DbControl, Object, String) for more information about the syntax of this parameter.
title - The column title
formatter - A formatter or null
Returns:
An AssayPropertyField object
Since:
2.15

simple

@Deprecated
public static SimpleDynamicField simple(Expression e,
                                                   String title,
                                                   Formula.AverageMethod averageMethod,
                                                   Formatter<?> formatter)
Deprecated. In 2.15, use simple(Expression, String, Type, net.sf.basedb.core.Formula.AverageMethod, Formatter) instead


simple

public static SimpleDynamicField simple(Expression e,
                                        String title,
                                        Type type,
                                        Formula.AverageMethod averageMethod,
                                        Formatter<?> formatter)
Create a simple dynamic field.

Parameters:
e - The expression to export
title - The column title
averageMethod - Average method to use or null to use the average method specified by the bioassay set
formatter - A formatter or null
Since:
2.15
See Also:
SimpleDynamicField

jep

@Deprecated
public static JepDynamicField jep(String jep,
                                             String title,
                                             Formula.AverageMethod averageMethod,
                                             Formatter<?> formatter)
Deprecated. In 2.15, use jep(String, String, Type, net.sf.basedb.core.Formula.AverageMethod, Formatter) instead


jep

public static JepDynamicField jep(String jep,
                                  String title,
                                  Type type,
                                  Formula.AverageMethod averageMethod,
                                  Formatter<?> formatter)
Create a JEP dynamic field.

Parameters:
jep - The JEP expression
title - The column title
type - The data type of the expression
averageMethod - Average method to use or null to use the average method specified by the bioassay set
formatter - A formatter or null

channel

public static SimpleDynamicField channel(int channel,
                                         String title,
                                         Formatter<?> formatter)
Create a simple dynamic field that exports the channel intensity of the given channel. This method uses Dynamic.column(VirtualColumn) and VirtualColumn.channelRaw(int) to generate the expression. It uses the average method specified by the bioassay set.

Parameters:
channel - The channel number
title - The column title. If null, the title is generated as 'intensity' + channel
formatter - A formatter for numeric data or null

rawData

public static SimpleDynamicField rawData(RawDataProperty property,
                                         String title,
                                         Formatter<?> formatter)
Create a simple dynamic field that exports a raw data value. This method uses Dynamic.rawData(String) to generate the expression and uses the average method specified by the raw data property.

Parameters:
property - The raw data property
title - The column title, or null to use the title of the property
formatter - A formatter or null

rawData

@Deprecated
public static SimpleDynamicField rawData(String property,
                                                    String title,
                                                    Formula.AverageMethod averageMethod,
                                                    Formatter<?> formatter)
Deprecated. In 2.15, use rawData(String, String, Type, net.sf.basedb.core.Formula.AverageMethod, Formatter) instead


rawData

public static SimpleDynamicField rawData(String property,
                                         String title,
                                         Type type,
                                         Formula.AverageMethod averageMethod,
                                         Formatter<?> formatter)
Create a simple dynamic field that exports a raw data value. This method uses Dynamic.rawData(String) to generate the expression.

Parameters:
property - The raw data property
title - The column title, or null to use the property as title
averageMethod - Average method to use or null to use Formula.AverageMethod.NONE
formatter - A formatter or null
Since:
2.15

reporter

public static SimpleDynamicField reporter(ExtendedProperty property,
                                          String title,
                                          Formatter<?> formatter)
Create a simple dynamic field that exports reporter annotation values. This method uses Dynamic.reporter(String) to generate the expression and uses the average method specified by the reporter property.

Parameters:
property - The reporter property
title - The column title, or null to use the title of the property
formatter - A formatter or null

reporter

public static DynamicField reporter(String property,
                                    String title,
                                    Formula.AverageMethod averageMethod,
                                    Formatter<?> formatter)
Deprecated. In 2.15, use reporter(String, String, Type, net.sf.basedb.core.Formula.AverageMethod, Formatter) instead


reporter

public static DynamicField reporter(String property,
                                    String title,
                                    Type type,
                                    Formula.AverageMethod averageMethod,
                                    Formatter<?> formatter)
Create a simple dynamic field that exports reporter annotation values. This method uses Dynamic.reporter(String) to generate the expression.

Parameters:
property - The reporter property
title - The column title, or null to use the property as title
averageMethod - Average method to use or null to use Formula.AverageMethod.NONE
formatter - A formatter or null
Since:
2.15

formula

public static JepDynamicField formula(Formula f,
                                      String title,
                                      Formatter<?> formatter)
Create a JEP dynamic field that exports the result of the JEP expression in a formula. This method doesn't check the type of the formula or the number of expressions stored in the formula. It just takes the first expression it finds.

Parameters:
f - The formula
title - The column title, or null to use the name of the formula as the title
formatter - A formatter or null

extraValue

public static JepDynamicField extraValue(ExtraValueType extra,
                                         String title,
                                         Formatter<?> formatter)
Create a JEP dynamic field that exports an extra value.

Parameters:
extra - The extra value type
title - The column title, or null to use the name of the formula as the title
formatter - A formatter or null

2.17.2: 2011-06-17