java.lang.Object
marf.Storage.StorageManager
marf.Storage.Database
- All Implemented Interfaces:
- IDatabase, IStorageManager, java.io.Serializable
- public class Database
- extends StorageManager
- implements IDatabase
Subject database.
To be used by an application to contain information
about known subjects (speakers, instruments, languages, etc).
- Since:
- 0.3.0
- Version:
- $Revision: 1.9 $
|
Field Summary |
protected boolean |
bConnected
Indicates whether we are connected or not. |
private static long |
serialVersionUID
For serialization versioning. |
|
Constructor Summary |
Database()
Default constructor with the StorageManager. |
| Methods inherited from class marf.Storage.StorageManager |
backSynchronizeObject, dump, dumpBinary, dumpCSV, dumpGzipBinary, dumpHTML, dumpSQL, dumpXML, enableDumpOnNotFound, 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 |
bConnected
protected boolean bConnected
- Indicates whether we are connected or not.
serialVersionUID
private 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.4
- See Also:
- Constant Field Values
Database
public Database()
- Default constructor with the StorageManager.
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.
- Specified by:
getIDByFilename in interface IDatabase
getName
public java.lang.String getName(int piID)
throws StorageException
- Retrieves subject's name by their ID.
- Specified by:
getName in interface IDatabase
connect
public void connect()
throws StorageException
- Connects to the database of subjects.
- Specified by:
connect in interface IDatabase
query
public void query()
throws StorageException
- Retrieves subject's data from the database and populates
internal data structures.
- Specified by:
query in interface IDatabase
close
public void close()
throws StorageException
- Closes (file) database connection.
- Specified by:
close in interface IDatabase
getMARFSourceCodeRevision
public static java.lang.String getMARFSourceCodeRevision()
- Returns source code revision information.