|
|||||||||||
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
Subject database. To be used by an application to contain information about known subjects (speakers, instruments, languages, etc).
Field Summary | |
protected boolean |
bConnected
Indicates whether we are connected or not. |
Fields inherited from class marf.Storage.StorageManager |
iCurrentDumpMode, oObjectToSerialize, strFilename |
Fields inherited from interface marf.Storage.IDatabase |
INTERFACE_CODE_REVISION |
Fields inherited from interface marf.Storage.IStorageManager |
DUMP_BINARY, DUMP_CSV_TEXT, DUMP_GZIP_BINARY, DUMP_HTML, DUMP_SQL, DUMP_XML, INTERFACE_CODE_REVISION, sastrExtensionsMap |
Constructor Summary | |
Database()
Default constructor with the StorageManager. |
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. |
static java.lang.String |
getRevision()
Returns source code revision information. |
void |
query()
Retrieves subject's data from the database and populates internal data structures. |
Methods inherited from class marf.Storage.StorageManager |
backSynchronizeObject, dump, dumpBinary, dumpCSV, dumpGzipBinary, dumpHTML, dumpSQL, dumpXML, getDefaultExtension, getDefaultExtension, getDumpMode, getFilename, restore, restoreBinary, restoreCSV, restoreGzipBinary, restoreHTML, restoreSQL, restoreXML, setDumpMode, setFilename |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, 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 static java.lang.String getRevision()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |