marf.Storage
Interface IDatabase

All Superinterfaces:
java.io.Serializable
All Known Implementing Classes:
Database

public interface IDatabase
extends java.io.Serializable

Subject database interface.

$Id: IDatabase.java,v 1.8 2006/08/11 19:19:59 mokhov Exp $

Since:
0.3.0.2
Version:
$Revision: 1.8 $
Author:
Serguei Mokhov

Field Summary
static java.lang.String MARF_INTERFACE_CODE_REVISION
          Interface source code revision.
static long serialVersionUID
          For serialization versioning.
 
Method Summary
 void close()
          Closes (file) database connection.
 void connect()
          Connects to the database of subjects.
 int getIDByFilename(java.lang.String pstrFileName, boolean pbTraining)
          Given ID, fetches the corresponding filename.
 java.lang.String getName(int piID)
          Retrieves subject's name by their ID.
 void query()
          Retrieves subject's data from the database and populates internal data structures.
 

Field Detail

MARF_INTERFACE_CODE_REVISION

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

See Also:
Constant Field Values

serialVersionUID

static final long serialVersionUID
For serialization versioning. When adding new members or make other structural changes regenerate this number with the serialver tool that comes with JDK.

Since:
0.3.0.5
See Also:
Constant Field Values
Method Detail

getIDByFilename

int getIDByFilename(java.lang.String pstrFileName,
                    boolean pbTraining)
                    throws StorageException
Given ID, fetches the corresponding filename. Retrieves Speaker's ID by a sample filename.

Parameters:
pstrFileName - Name of a .wav file for which ID must be returned
pbTraining - indicates whether the filename is a training (true) sample or testing (false)
Returns:
int ID, -1 if not found
Throws:
StorageException

getName

java.lang.String getName(int piID)
                         throws StorageException
Retrieves subject's name by their ID.

Parameters:
piID - ID of a subject in the DB to return a name for
Returns:
name string
Throws:
StorageException

connect

void connect()
             throws StorageException
Connects to the database of subjects.

Throws:
StorageException

query

void query()
           throws StorageException
Retrieves subject's data from the database and populates internal data structures.

Throws:
StorageException

close

void close()
           throws StorageException
Closes (file) database connection.

Throws:
StorageException


SourceForge Logo