The parsing of files for importing data is handled entirely by plugins.
The core will include a plugin for parsing tab-separated files.
Insertion of parsed data into the database can be done
in two ways:
The plugin uses the core API to insert the data
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.
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.
A plugin may need input parameters from the user to
select options for the export.
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.
The plugin should use the core API to read the data.