public abstract class AbstractFieldConverter extends java.lang.Object implements ExportableFieldConverter
ExportableFieldConverter
.
It contains a lot of helper method for locating formulas, extra values,
experimental factors, etc.Modifier and Type | Field and Description |
---|---|
private ItemQuery<AnnotationType> |
assayAnnotationQuery |
private DbControl |
dc |
private ItemQuery<ExtraValue> |
extraQuery |
private ItemQuery<AnnotationType> |
factorQuery |
private ItemQuery<Formula> |
formulaQuery |
private SnapshotManager |
snapshotManager |
private BioAssaySet |
source |
Modifier | Constructor and Description |
---|---|
protected |
AbstractFieldConverter(DbControl dc,
BioAssaySet source)
Creates a new field converter to be used with a specific
bioassay set source.
|
Modifier and Type | Method and Description |
---|---|
protected AnnotationAssayField |
getAssayAnnotationField(java.lang.String name,
java.lang.String exportTitle)
Get an assay annotation field.
|
protected AssayPropertyField |
getAssayPropertyField(java.lang.String name,
java.lang.String exportTitle)
Get a static assay property field, such as name, description or id.
|
protected DbControl |
getDbControl()
Get the DbControl to use for database access.
|
protected AnnotationAssayField |
getExperimentalFactorField(java.lang.String name,
java.lang.String exportTitle)
Get an experimental factor assay field.
|
protected DynamicField |
getExtraValueField(java.lang.String name,
ExtraValue.CoordinateType type,
java.lang.String exportTitle)
Get an extra value dynamic field.
|
protected DynamicField |
getFormulaField(java.lang.String name,
java.lang.String exportTitle)
Get a formula dynamic field.
|
protected DynamicField |
getIntensityField(java.lang.String fieldName,
java.lang.String exportTitle)
Create a dynamic field for spot intensity if the field name has
the pattern 'Ch X' where 'X' is a channel number between 1
and the number of channels in the raw data type used by the
source bioassay set.
|
protected DynamicField |
getRawDataProperty(java.lang.String name,
java.lang.String exportTitle)
Find an extended raw data property with the given name and create
a dynamic field from it using exportTitle as the title.
|
protected DynamicField |
getReporterProperty(java.lang.String name,
java.lang.String exportTitle)
Get a static or extended reporter property field, such as name, description
or id.
|
SnapshotManager |
getSnapshotManager()
Get the snapshot manager to use with annotation-based fields.
|
protected BioAssaySet |
getSource()
Get the source bioassay set.
|
void |
setSnapshotManager(SnapshotManager snapshotManager)
Set a snapshot manager that should be used with annotation-based
fields.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getAssayField, getReporterField, getSpotField
private final DbControl dc
private final BioAssaySet source
private SnapshotManager snapshotManager
private ItemQuery<AnnotationType> factorQuery
private ItemQuery<AnnotationType> assayAnnotationQuery
private ItemQuery<ExtraValue> extraQuery
protected AbstractFieldConverter(DbControl dc, BioAssaySet source)
dc
- A DbControl to use for database accesssource
- The source bioassay setprotected DbControl getDbControl()
protected BioAssaySet getSource()
public void setSnapshotManager(SnapshotManager snapshotManager)
snapshotManager
- The snapshot manager to usepublic SnapshotManager getSnapshotManager()
protected AssayPropertyField getAssayPropertyField(java.lang.String name, java.lang.String exportTitle)
name
- The property nameexportTitle
- The title as it should be in the exported fileprotected AnnotationAssayField getExperimentalFactorField(java.lang.String name, java.lang.String exportTitle)
name
- The name or external id of the experimental factor to findexportTitle
- The title as it should be in the exported file or null
to use the name of the experimental factorprotected AnnotationAssayField getAssayAnnotationField(java.lang.String name, java.lang.String exportTitle)
name
- The name or external id of the annotation type to findexportTitle
- The title as it should be in the exported file or null
to use the name of the annotation typeprotected DynamicField getReporterProperty(java.lang.String name, java.lang.String exportTitle)
name
- The name of the reporter propertyexportTitle
- The exported title or null to use the title
of the extended property (which can be different from the name)protected DynamicField getRawDataProperty(java.lang.String name, java.lang.String exportTitle)
name
- The name of the extended raw data propertyexportTitle
- The exported title or null to use the title
of the extended property (which can be different from the name)protected DynamicField getExtraValueField(java.lang.String name, ExtraValue.CoordinateType type, java.lang.String exportTitle)
name
- The name or external id of the experimental factor to findtype
- The coordinate type of the extra value (eg. POSITION for reporter
extra values, and SPOT for spot extra values)exportTitle
- The title as it should be in the exported file or null
to use the name of the extra valueprotected DynamicField getFormulaField(java.lang.String name, java.lang.String exportTitle)
Formula.Type.COLUMN_EXPRESSION
and be suitable for the RawDataType
and IntensityTransform
used by the source bioassay set. Depending on the underlying database,
the lookup may be case-sensitive or case-insensitive. If more than
one formula is found an exception is thrown.name
- The name of the formula to findexportTitle
- The title as it should be in the exported file or null
to use the name of the formulaprotected DynamicField getIntensityField(java.lang.String fieldName, java.lang.String exportTitle)
fieldName
- The field name