|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object marf.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 IDatabase
pstrFileName
- 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 IDatabase
piID
- ID of a subject in the DB to return a name for
StorageException
public void connect() throws StorageException
connect
in interface IDatabase
StorageException
public void query() throws StorageException
query
in interface IDatabase
StorageException
public void close() throws StorageException
close
in interface IDatabase
StorageException
public void backSynchronizeObject()
backSynchronizeObject
in class StorageManager
StorageManager.restore()
public java.lang.String toString()
toString
in class StorageManager
Object.toString()
public java.lang.Object clone()
clone
in class StorageManager
Object.clone()
public static java.lang.String getMARFSourceCodeRevision()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |