marf.Storage
Interface IStorageManager

All Superinterfaces:
java.io.Serializable
All Known Implementing Classes:
AddDelta, AddOne, BandpassFilter, Cepstral, ChebyshevDistance, Classification, Database, DiffDistance, Distance, Dummy, Endpoint, EuclideanDistance, F0, FeatureExtraction, FFT, FFTFilter, GLI, GoodTuring, GrammarCompiler, HighFrequencyBoost, HighPassFilter, KatzBackoff, LowPassFilter, LPC, MahalanobisDistance, Markov, MaxProbabilityClassifier, MinkowskiDistance, MinMaxAmplitudes, MLE, NeuralNetwork, Preprocessing, ProbabilisticGrammarCompiler, ProbabilisticParser, RandomClassification, RandomFeatureExtraction, Raw, Segmentation, SLI, Smoothing, Spectrogram, StatisticalEstimator, Stochastic, StorageManager, TrainingSet, WaveGrapher, WittenBell, ZipfLaw

public interface IStorageManager
extends java.io.Serializable

Almost every concrete module must implement this interface if it cannot extend from the StorageManager class.

$Id: IStorageManager.java,v 1.9 2005/06/12 23:09:37 mokhov Exp $

Since:
0.3.0
Version:
$Revision: 1.9 $
Author:
Serguei Mokhov

Field Summary
static int DUMP_BINARY
          Indicates to dump/restore set data as uncompressed binary file.
static int DUMP_CSV_TEXT
          Indicates to dump/restore data as CSV text file.
static int DUMP_GZIP_BINARY
          Indicates to dump/restore data as gzipped binary file.
static int DUMP_HTML
          Indicates to dump/restore data as an HTML file.
static int DUMP_SQL
          Indicates to dump/restore data as a set of SQL commands.
static int DUMP_XML
          Indicates to dump/restore data as XML file.
static java.lang.String MARF_INTERFACE_CODE_REVISION
          Interface source code revision.
static java.lang.String[] STORAGE_FILE_EXTENSIONS
          Maps DUMP_ constants to default filename extensions.
 
Method Summary
 void dump()
          An object must know how dump itself to a file.
 void dumpBinary()
          Implement to save data structures as binary.
 void dumpCSV()
          Implement to save data structures in CSV format.
 void dumpGzipBinary()
          Implement to save data structures as compressed binary.
 void dumpHTML()
          Implement to save data structures as HTML document.
 void dumpSQL()
          Implement to save data structures as SQL script.
 void dumpXML()
          Implement to save data structures as XML document.
 void restore()
          An object must know how retore its non-transient data structures from a file.
 void restoreBinary()
          Implement to load data structures in binary form.
 void restoreCSV()
          Implement to load data structures in CSV format.
 void restoreGzipBinary()
          Implement to load data structures in compressed binary form.
 void restoreHTML()
          Implement to load data structures from an HTML document.
 void restoreSQL()
          Implement to load data structures from an SQL script.
 void restoreXML()
          Implement to load data structures from an XML document.
 

Field Detail

DUMP_GZIP_BINARY

static final int DUMP_GZIP_BINARY
Indicates to dump/restore data as gzipped binary file.

See Also:
Constant Field Values

DUMP_CSV_TEXT

static final int DUMP_CSV_TEXT
Indicates to dump/restore data as CSV text file.

See Also:
Constant Field Values

DUMP_BINARY

static final int DUMP_BINARY
Indicates to dump/restore set data as uncompressed binary file.

See Also:
Constant Field Values

DUMP_XML

static final int DUMP_XML
Indicates to dump/restore data as XML file.

See Also:
Constant Field Values

DUMP_HTML

static final int DUMP_HTML
Indicates to dump/restore data as an HTML file.

See Also:
Constant Field Values

DUMP_SQL

static final int DUMP_SQL
Indicates to dump/restore data as a set of SQL commands.

See Also:
Constant Field Values

MARF_INTERFACE_CODE_REVISION

static final java.lang.String MARF_INTERFACE_CODE_REVISION
Interface source code revision.

See Also:
Constant Field Values

STORAGE_FILE_EXTENSIONS

static final java.lang.String[] STORAGE_FILE_EXTENSIONS
Maps DUMP_ constants to default filename extensions. The order must follow the order of the constants as they are used as indices for this array.

Method Detail

dump

void dump()
          throws StorageException
An object must know how dump itself to a file. Options are: object serialization (possibly compressed), XML, CSV, HTML, and SQL.

Throws:
StorageException - if there was a problem saving the object

restore

void restore()
             throws StorageException
An object must know how retore its non-transient data structures from a file. Options are: object serialization (possibly compressed), XML, CSV, HTML, and SQL.

Throws:
StorageException - if there was a problem (re)loading the object

dumpGzipBinary

void dumpGzipBinary()
                    throws StorageException
Implement to save data structures as compressed binary.

Throws:
StorageException - in case of I/O or otherwise error

dumpBinary

void dumpBinary()
                throws StorageException
Implement to save data structures as binary.

Throws:
StorageException - in case of I/O or otherwise error

dumpCSV

void dumpCSV()
             throws StorageException
Implement to save data structures in CSV format.

Throws:
StorageException - in case of I/O or otherwise error

dumpXML

void dumpXML()
             throws StorageException
Implement to save data structures as XML document.

Throws:
StorageException - in case of I/O or otherwise error

dumpHTML

void dumpHTML()
              throws StorageException
Implement to save data structures as HTML document.

Throws:
StorageException - in case of I/O or otherwise error

dumpSQL

void dumpSQL()
             throws StorageException
Implement to save data structures as SQL script.

Throws:
StorageException - in case of I/O or otherwise error

restoreBinary

void restoreBinary()
                   throws StorageException
Implement to load data structures in binary form.

Throws:
StorageException - in case of I/O or otherwise error

restoreGzipBinary

void restoreGzipBinary()
                       throws StorageException
Implement to load data structures in compressed binary form.

Throws:
StorageException - in case of I/O or otherwise error

restoreCSV

void restoreCSV()
                throws StorageException
Implement to load data structures in CSV format.

Throws:
StorageException - in case of I/O or otherwise error

restoreXML

void restoreXML()
                throws StorageException
Implement to load data structures from an XML document.

Throws:
StorageException - in case of I/O or otherwise error

restoreHTML

void restoreHTML()
                 throws StorageException
Implement to load data structures from an HTML document.

Throws:
StorageException - in case of I/O or otherwise error

restoreSQL

void restoreSQL()
                throws StorageException
Implement to load data structures from an SQL script.

Throws:
StorageException - in case of I/O or otherwise error