2.17.2: 2011-06-17

net.sf.basedb.core.plugin
Interface AutoDetectingImporter

All Superinterfaces:
Plugin
All Known Implementing Classes:
AbstractFlatFileImporter, AbstractItemImporter, AnnotationFlatFileImporter, ArrayBatchImporter, ArrayDesignImporter, ArraySlideImporter, BioPlateImporter, BioSourceImporter, CdfFileReporterImporter, ExtractImporter, HelpImporter, HybridizationImporter, IlluminaRawDataImporter, LabeledExtractImporter, PlateFlatFileImporter, PlateMappingImporter, PluginConfigurationImporter, PrintMapFlatFileImporter, RawBioAssayImporter, RawDataFlatFileImporter, ReporterFlatFileImporter, ReporterMapFlatFileImporter, SampleImporter, ScanImporter

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:

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
 void doImport(InputStream in, ProgressReporter progress)
          Import the data from the given InputStream.
 boolean isImportable(InputStream in)
          Check if the given InputStream can be imported by this plugin.
 
Methods inherited from interface net.sf.basedb.core.plugin.Plugin
done, getAbout, getMainType, getPermissions, init, requiresConfiguration, run, supportsConfigurations
 

Method Detail

isImportable

boolean isImportable(InputStream in)
                     throws BaseException
Check if the given InputStream 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 given InputStream.

Parameters:
in - The input stream to read from
progress - Progress reporter used by the caller to keep track of the progress. Null is allowed
Throws:
BaseException - If something goes wrong

2.17.2: 2011-06-17