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.7 2005/12/24 19:47:39 mokhov Exp $

Since:
0.3.0
Version:
$Revision: 1.7 $
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

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

See Also:
Constant Field Values

serialVersionUID

public 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

public 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

public 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

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

Throws:
StorageException

query

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

Throws:
StorageException

close

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

Throws:
StorageException


SourceForge Logo