|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectmarf.Storage.StorageManager
marf.Storage.Database
public class Database
Subject database. To be used by an application to contain information about known subjects (speakers, instruments, languages, etc).
$Id: Database.java,v 1.11 2007/12/23 06:29:46 mokhov Exp $
| Field Summary | |
|---|---|
protected boolean |
bConnected
Indicates whether we are connected or not. |
| Fields inherited from class marf.Storage.StorageManager |
|---|
bDumpOnNotFound, iCurrentDumpMode, oObjectToSerialize, strFilename |
| Fields inherited from interface marf.Storage.IDatabase |
|---|
MARF_INTERFACE_CODE_REVISION |
| Fields inherited from interface marf.Storage.IStorageManager |
|---|
DUMP_BINARY, DUMP_CSV_TEXT, DUMP_GZIP_BINARY, DUMP_HTML, DUMP_SQL, DUMP_XML, MARF_INTERFACE_CODE_REVISION, STORAGE_FILE_EXTENSIONS |
| Constructor Summary | |
|---|---|
Database()
Default constructor with the StorageManager. |
|
| Method Summary | |
|---|---|
void |
backSynchronizeObject()
Implementation of back-synchronization of Database loaded object. |
java.lang.Object |
clone()
Implements Cloneable interface for the Database object. |
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. |
static java.lang.String |
getMARFSourceCodeRevision()
Returns source code revision information. |
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. |
java.lang.String |
toString()
Default implementation of the toString() for all storage manager derivatives. |
| Methods inherited from class marf.Storage.StorageManager |
|---|
dump, dumpBinary, dumpCSV, dumpGzipBinary, dumpHTML, dumpSQL, dumpXML, enableDumpOnNotFound, equals, getDefaultExtension, getDefaultExtension, getDumpMode, getFilename, getObjectToSerialize, hashCode, restore, restoreBinary, restoreCSV, restoreGzipBinary, restoreHTML, restoreSQL, restoreXML, setDumpMode, setFilename |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected boolean bConnected
| Constructor Detail |
|---|
public Database()
StorageManager| Method Detail |
|---|
public int getIDByFilename(java.lang.String pstrFileName,
boolean pbTraining)
throws StorageException
getIDByFilename in interface IDatabasepstrFileName - Name of a .wav file for which ID must be returnedpbTraining - indicates whether the filename is a training (true) sample or testing (false)
StorageException
public java.lang.String getName(int piID)
throws StorageException
getName in interface IDatabasepiID - ID of a subject in the DB to return a name for
StorageException
public void connect()
throws StorageException
connect in interface IDatabaseStorageException
public void query()
throws StorageException
query in interface IDatabaseStorageException
public void close()
throws StorageException
close in interface IDatabaseStorageExceptionpublic void backSynchronizeObject()
backSynchronizeObject in class StorageManagerStorageManager.restore()public java.lang.String toString()
toString in class StorageManagerObject.toString()public java.lang.Object clone()
clone in class StorageManagerObject.clone()public static java.lang.String getMARFSourceCodeRevision()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||