Package net.sf.basedb.core.plugin
Interface AutoDetectingImporter
-
- All Superinterfaces:
Plugin
- All Known Implementing Classes:
AbstractFlatFileImporter
,AbstractItemImporter
,AnnotationFlatFileImporter
,AnnotationTypeImporter
,ArrayBatchImporter
,ArrayDesignImporter
,ArraySlideImporter
,BioPlateImporter
,BioSourceImporter
,CdfFileReporterImporter
,DerivedBioAssayImporter
,ExtractImporter
,FileImporter
,GtfReporterImporter
,GtfReporterMapImporter
,HelpImporter
,IlluminaRawDataImporter
,KitImporter
,PhysicalBioAssayImporter
,PlateFlatFileImporter
,PlateMappingImporter
,PluginConfigurationImporter
,PrintMapFlatFileImporter
,RawBioAssayImporter
,RawDataFlatFileImporter
,ReporterFlatFileImporter
,ReporterMapFlatFileImporter
,SampleImporter
public interface AutoDetectingImporter extends Plugin
This interface should be implemented by an import plugin that supports auto-detection of the file format.The plugin will be loaded and initialised normally, but instead of the
Plugin.run(Request, Response, ProgressReporter)
method the methods in this interface are used. There are some additional requirements for an auto-detecting plugin:- All data must be in a single file
- No additional runtime parameters are supported
Note that it is only if the user chooses to use the auto-detect function in the (web) client application that the methods in this interface are used. If the user manually selects to use a specific plugin the normal
Plugin.run(Request, Response, ProgressReporter)
method is used. In other words, the plugin must support both methods of importing.- Version:
- 2.0
- Author:
- Enell
- Last modified
- $Date$
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.sf.basedb.core.plugin.Plugin
Plugin.MainType
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
doImport(InputStream in, ProgressReporter progress)
Import the data from the givenInputStream
.boolean
isImportable(InputStream in)
Check if the givenInputStream
can be imported by this plugin.-
Methods inherited from interface net.sf.basedb.core.plugin.Plugin
done, getMainType, getPermissions, init, requiresConfiguration, run, supportsConfigurations
-
-
-
-
Method Detail
-
isImportable
boolean isImportable(InputStream in) throws BaseException
Check if the givenInputStream
can be imported by this plugin.- Parameters:
in
- The input stream to check- Returns:
- TRUE if the stream can be imported, FALSE otherwise
- Throws:
BaseException
- If something goes wrong
-
doImport
void doImport(InputStream in, ProgressReporter progress) throws BaseException
Import the data from the givenInputStream
.- Parameters:
in
- The input stream to read fromprogress
- Progress reporter used by the caller to keep track of the progress. Null is allowed- Throws:
BaseException
- If something goes wrong
-
-