Class StandardFieldConverter

java.lang.Object
net.sf.basedb.util.export.spotdata.AbstractFieldConverter
net.sf.basedb.util.export.spotdata.StandardFieldConverter
All Implemented Interfaces:
ExportableFieldConverter
Direct Known Subclasses:
AdvancedFieldConverter, Base1FieldConverter

public class StandardFieldConverter extends AbstractFieldConverter
Default field converter implementation that works mainly by checking names and/or external id values of formulas, extra values, experimental factors etc.
Since:
2.15
Author:
nicklas
  • Constructor Details

    • StandardFieldConverter

      public StandardFieldConverter(DbControl dc, BioAssaySet source)
      Create a new standard field converter.
      Parameters:
      dc - A DbControl to use for database access
      source - The source bioassay set
  • Method Details

    • getAssayField

      public AssayField getAssayField(String name, boolean required)
      Find an assay field. This method will try to locate a field in the following order:
      1. Check if there is an experimental factor with the given name (case-sensitivity depends on the database that is used).
      2. Check if there is an assay-level annotation type with the given name.
      3. If name is 'name', 'description' or another static property (case-insensitive) the corresponding assay value is used.
      Parameters:
      name - The name to find
      required - If TRUE and no field is found this method will throw an ItemNotFoundException
      Returns:
      The field or null
    • getReporterField

      public DynamicField getReporterField(String name, boolean required)
      Find a reporter dynamic field. This method will try to locate a field in the following order:
      1. Check if there is an position extra value with the given name (case-sensitivity depends on the database that is used).
      2. Check if there is a formula with the given name (case-sensitivity depends on the database that is used).
      3. If name is 'name', 'externalId', 'description' or another static property (case-insensitive) the corresponding reporter value is used.
      4. Special case for "External ID" and "Internal ID" to simplify pass-throguh to the BFS importer which expects at least one of those columns.
      Parameters:
      name - The name to find
      required - If TRUE and no field is found this method will throw an ItemNotFoundException
      Returns:
      The field or null
    • getSpotField

      public DynamicField getSpotField(String name, boolean required)
      Find a spot dynamic field. This method will try to locate a field in the following order:
      1. Check if there is a spot extra value with the given name (case-sensitivity depends on the database that is used).
      2. Check if there is a formula with the given name (case-sensitivity depends on the database that is used).
      3. Check if there is a raw data property that matches the name (case-insensitive)
      4. Special values: Ch 1, Ch2, etc. to get channel intensities (case-insensitive)
      Parameters:
      name - The name to find
      required - If TRUE and no field is found this method will throw an ItemNotFoundException
      Returns:
      The field or null