Interface AutoDetectingImporter

All Superinterfaces:
Plugin
All Known Implementing Classes:
AbstractFlatFileImporter, AbstractItemImporter, AnnotationFlatFileImporter, AnnotationTypeImporter, AnyToAnyImporter, ArrayBatchImporter, ArrayDesignImporter, ArraySlideImporter, BioPlateImporter, BioSourceImporter, CdfFileReporterImporter, DerivedBioAssayImporter, ExtractImporter, FileImporter, GtfReporterImporter, GtfReporterMapImporter, HelpImporter, IlluminaRawDataImporter, KitImporter, PhysicalBioAssayImporter, PlateFlatFileImporter, PlateMappingImporter, PluginConfigurationImporter, PrintMapFlatFileImporter, RawBioAssayImporter, RawDataFlatFileImporter, ReporterFlatFileImporter, ReporterMapFlatFileImporter, SampleImporter, TagImporter

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$
  • Method Details

    • 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