Class ExportableFieldFactory

java.lang.Object
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: 2011-03-16 12:48:47 +0100 (on, 16 mar 2011) $
  • Constructor Details

    • ExportableFieldFactory

      public ExportableFieldFactory()
  • Method Details

    • 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:
    • 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:
    • 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.getPropertyPath(String, boolean) 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

      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:
    • 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

      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, 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