Data import and export

This document covers details for data import and export and how it can be extended to support more file formats by the use of plugins.

Contents
  1. Import
  2. Export

Last updated: $Date: 2009-04-06 14:52:39 +0200 (må, 06 apr 2009) $

1. Import

  1. The parsing of files for importing data is handled entirely by plugins.
  2. The core will include a plugin for parsing tab-separated files.
  3. Insertion of parsed data into the database can be done in two ways:
    1. The plugin uses the core API to insert the data
    2. The plugin returns the information to the core which inserts the data
    [NOTE] The first method is the most flexible and allows a plugin to parse files with more than one type of items. The second method requires that the core knows what types of items are in the file. An exemple of the first type is a plugin that parses an XML file containing structured biomaterial data, ie. samples, extracts and labeled extracts. All file formats that are used in BASE 1.x can be implemented as a type 2 plugin.
  4. A plugin should be able to check if a file is parsable by that plugin. For example, a plugin that expects XML data should not be used on tab-separated data. The plugin may also check headers, the number of columns, and other information appearing in the file.

2. Export

  1. Exporting data is handled entirely by plugins.
  2. A plugin may need input parameters from the user to select options for the export.
  3. The type and acceptable values of the input parameters must be defined in a standardised way to allow various client applications to display a form asking for values.
  4. The plugin should use the core API to read the data.