name: TranscriptionDatabase
synopsis:

>     g++ [flags ...] file ... -l /isip/tools/lib/$ISIP_BINARY/lib_mmedia.a

>     #include <TranscriptionDatabase.h>

>     String& getDataBaseName();
>     boolean setDataBaseName(String& arg);
>     boolean removeRecord(String& identifier);
>     boolean insertRecord(String& identifier, AnnotationGraph& graph);
>     boolean getRecord(String& identifier, AnnotationGraph& graph);
>     boolean getRecord(String& identifier, String& feature, String& value, DoubleLinkedList<String>& records);
>     boolean getRecord(String& identifier, String& feature, String& value, DoubleLinkedList<Annotation>& records);
>     boolean load(Sdb& sdb_a, Filename& trans_file);
>     boolean load(Sdb& sdb_a, Filename& trans_file_a, Filename& lexicon_file_a, Filename& systactic_file_a);

quick start:

>     TranscriptionDatabase trans_00;

>     String name_00(L"TIDIGITS");
>     trans_00.setDataBaseName(name_00);

>     String ident_00(L"id_00");
>     AnnotationGraph angr_00;

>     trans_00.insertRecord(ident_00, angr_00);

description:
This class facilitates the interface between the transcription database and other applications or classes.
dependencies:

- Vector.h
- AnnotationGraph

public constants:

- define the class name:

      static const String CLASS_NAME;

- define i/o related constants:

      static const String DEF_PARAM;

      static const String PARAM_KEYS;

      static const String PARAM_NAME;

      static const String PARAM_VALUES;

error codes:

- error codes indicating general errors:

      static const long ERR = 50500;

protected data:

- declare define the database name:

      String name_d;

- declare define the container object:

      HashTable<String, AnnotationGraph> hash_d;

- declare the debugging parameters:

      static Integral::DEBUG debug_level_d;

- declare the memory manager:

      static MemoryManager mgr_d;

required public methods:

- static methods:

      static const String& name();

- debug methods:

      static boolean diagnose(Integral::DEBUG debug_level);

      boolean debug(const unichar* msg) const;

      static boolean setDebug(Integral::DEBUG arg);

- destructor/constructor(s):

      ~TranscriptionDatabase();

      TranscriptionDatabase();

      TranscriptionDatabase(const TranscriptionDatabase& arg);

- assign methods:

      boolean assign(const TranscriptionDatabase& arg);

- operator= method:

      not present.

- i/o methods:

      long sofSize() const;

      boolean read(Sof& sof, long tag);

      boolean read(Sof& sof, long tag, const String& name);

      boolean readData(Sof& sof, const String& pname = DEF_PARAM, long size = SofParser::FULL_OBJECT, boolean param = true, boolean nested = false);

      boolean write(Sof& sof, long tag) const;

      boolean write(Sof& sof, long tag, const String& name) const;

      boolean writeData(Sof& sof, const String& pname = DEF_PARAM) const;

- equality methods:

      boolean eq(const TranscriptionDatabase& arg) const;

- memory management methods:

      static void* operator new(size_t arg);

      static void* operator new[](size_t arg);

      static void operator delete(void* arg);

      static void operator delete[](void* arg);

      static boolean setGrowSize(long arg);

      boolean clear(Integral::CMODE cmode = Integral::DEF_CMODE);

class-specific public methods:

- declare database name methods:

      String& getDataBaseName();

      boolean setDataBaseName(String& arg);

- declare database access methods:

      boolean removeRecord(String& identifier);

      boolean insertRecord(String& identifier, AnnotationGraph& graph);

      boolean getRecord(String& identifier, AnnotationGraph& graph);

      boolean getRecord(String& identifier, String& feature, String& value, Vector& annotations, VectorFloat& start_times, VectorFloat& end_times;

      boolean getRecord(String& identifier, String& feature, String& value, String& type, Vector& annotations, VectorFloat& start_times, VectorFloat& end_times);

      boolean getRecord(String& identifier, String& feature, String& value, DoubleLinkedList<String>& records);

      boolean getRecord(String& identifier, String& feature, String& value, DoubleLinkedList<Annotation>& records);

      boolean getRecord(String& identifier, Vector<String>& values, String& record);

- declare database open and methods:

      boolean open(const Filename& filename);

      boolean close();

- declare database i/o methods:

      boolean load(Filename& trans_file, String& name, String& level);

      boolean load(Sdb& sdb_a, Filename& trans_file);

      boolean load(Sdb& sdb_a, Filename& trans_file, Filename& lexicon_file, boolean flag = true);

      boolean load(Sdb& sdb_a, Filename& trans_file_a, Filename& lexicon_file_a, Filename& systactic_file_a);

      boolean store(Sof& db_sof, long tag);

      boolean load(Filename& trans_file, String& name, String& level, Sof& db_sof, long tag);

      boolean storePartial(Sdb& db_sof, long tag, Vector& keys);

      boolean storePartial(Sdb& db_sof, long tag, AnnotationGraph& graph);

- method to retrieve the hypotheses in NIST_TRN format

      boolean getHypothesesNistTrn(Sdb& ident_list_sdb, String& feature, Vector& nist_hypotheses);

- method to retrieve the alignments in HYP_ALIGN format

      boolean getAlignmentsHypAlign(Sdb& ident_list_sdb, String& levels, Vector<String>& alignments);

- method to get all the identifiers in the database

      boolean getIdentifiers(Vector& identifiers);

private methods:

- method to parse the inpt string containing level(s)

      boolean parseLevels(const String& input, Vector<String>& levels);

examples:

- none

notes:

- none.