|
2.14.1: 2009-11-05 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.basedb.util.importer.spotdata.BaseFileImporter
public class BaseFileImporter
Imports spot data from a serial or matrix BASEfile. Before it can be used various configuration properties must be set.
setDbControl(DbControl)
setSourceFile(File)
setTransformation(Transformation)
setProgressReporter(ProgressReporter)
setIntensityTransform(IntensityTransform)
.
If not set, the same intensity transform as for the parent
bioassay set is used
The importer will create a new child bioassay set. Child bioassays are created according to the data found in the BASEfile. The importer will create a new datacube if the reporter/position mapping has changed or if the child/parent bioassay relationship is not 1:1. The importer supports extra values (float) and will create missing extra value types if needed.
Nested Class Summary | |
---|---|
(package private) static class |
BaseFileImporter.RawDataProxy
|
(package private) static class |
BaseFileImporter.ReporterProxy
|
Field Summary | |
---|---|
private DbControl |
dc
|
private BaseFileParser |
parser
|
private String |
positionColumn
|
private ProgressReporter |
progress
|
private String |
reporterColumn
|
private File |
sourceFile
|
private IntensityTransform |
transform
|
private Transformation |
transformation
|
Constructor Summary | |
---|---|
BaseFileImporter()
Create a new importer object. |
Method Summary | |
---|---|
protected void |
checkInterrupted()
Checks if the currently executing thread has been interrupted and throws a SignalException if it has. |
void |
createChildBioAssays(DbControl dc,
BioAssaySet childSet,
BaseFileInfo info,
boolean useNewDataCube)
Helper method for creating new child bioassays using the information found in the BaseFileInfo object. |
BioAssaySet |
createChildBioAssaySet(DbControl dc,
BaseFileInfo info,
Transformation t,
boolean useNewDataCube)
Helper method for creating a child bioassay set using the information in the BaseFileInfo object. |
void |
createChildPositionReporterMapping(BioAssaySet child,
BaseFileInfo info,
ProgressReporter progress)
Helper method for creating position/reporter mappings for the child bioassay set (which must be in a new datacube). |
void |
createChildRawDataMapping(BioAssaySet child,
BioAssaySet parent,
BaseFileInfo info,
ProgressReporter progress)
Helper method for creating a rawdata mapping for the child bioassay set. |
BioAssaySet |
doImport()
Start the import. |
BaseFileParser |
getBaseFileParser()
Get the underlying parser for the BASEfile. |
DbControl |
getDbControl()
Get the current DbControl. |
IntensityTransform |
getIntensityTransform()
Get the intensity transform |
ProgressReporter |
getProgressReporter()
Get the progress reporter. |
File |
getSourceFile()
Get the source file. |
Transformation |
getTransformation()
Get the destination transformation. |
void |
setDbControl(DbControl dc)
Set's the DbControl that should be used to get data from the database. |
void |
setIntensityTransform(IntensityTransform transform)
Set the intensity transform that have been applied to the spot data in the file. |
protected void |
setProgress(int percent,
String message)
Update the progress of the export. |
void |
setProgressReporter(ProgressReporter progress)
Set the progress reporter that is used to report progress. |
void |
setSourceFile(File source)
Set the source BASEfile to import data from. |
void |
setTransformation(Transformation transformation)
Set the destination transformation. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private final BaseFileParser parser
private DbControl dc
private ProgressReporter progress
private File sourceFile
private Transformation transformation
private IntensityTransform transform
private String reporterColumn
private String positionColumn
Constructor Detail |
---|
public BaseFileImporter()
Method Detail |
---|
public void setDbControl(DbControl dc)
public DbControl getDbControl()
public void setProgressReporter(ProgressReporter progress)
setProgress(int, String)
to update the current status.
public ProgressReporter getProgressReporter()
public void setSourceFile(File source)
source
- The filepublic File getSourceFile()
public void setTransformation(Transformation transformation)
transformation
- The transformationpublic Transformation getTransformation()
public void setIntensityTransform(IntensityTransform transform)
transform
- The intensity transformpublic IntensityTransform getIntensityTransform()
public BaseFileParser getBaseFileParser()
protected void checkInterrupted()
SignalException
if it has.
protected void setProgress(int percent, String message)
ProgressReporter
public BioAssaySet doImport() throws IOException
IOException
public BioAssaySet createChildBioAssaySet(DbControl dc, BaseFileInfo info, Transformation t, boolean useNewDataCube)
dc
- A DbControl to use for database accessinfo
- Information from the parsed BASEfilet
- The parent transformationuseNewDataCube
- TRUE to create the child bioassay set in a new
datacube, FALSE to use the same as the parent bioassay set
public void createChildBioAssays(DbControl dc, BioAssaySet childSet, BaseFileInfo info, boolean useNewDataCube)
BaseFileInfo.getChildAssays()
public void createChildPositionReporterMapping(BioAssaySet child, BaseFileInfo info, ProgressReporter progress)
child
- The new child bioassay setinfo
- Information about the position/reporter mapping
is found in BaseFileInfo.getChildReporterPositions()
progress
- Optional progress reporterpublic void createChildRawDataMapping(BioAssaySet child, BioAssaySet parent, BaseFileInfo info, ProgressReporter progress)
Child/parent mapping is taken from the BaseFileInfo object. See
BaseFileInfo.getChildColumns(short)
. This mapping automatically
created by createChildBioAssays(DbControl, BioAssaySet, BaseFileInfo, boolean)
.
child
- The new child bioassay setparent
- The parent bioassay setinfo
- Information about the child/parent mapping
is found in BaseFileInfo.getChildColumns(short)
progress
- Optional progress reporter
|
2.14.1: 2009-11-05 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |