<?php $isip_window_title = "ISIP Homepage"; ?>
<?php include("/data/isip/www/templates/documentation/header/header.html"); ?>

<!--#set var="isip_page_title" value="Annotation" -->
<?php include("/data/isip/www/templates/documentation/body/index_class.html"); ?>
<?php include("/data/isip/www/templates/documentation/body/bar.html"); ?>

<a name="name">
<b>

name:
<a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Annotation/Annotation.h">Annotation</a>

</b>
<br><br>

<a name="synopsis">
<b>synopsis:</b>
<br><br>

<blockquote>
<pre>

g++ [flags ...] file ... -l /isip/tools/lib/$ISIP_BINARY/lib_mmedia_a

#include &lt;Annotation.h&gt;

static boolean diagnose(Integral::DEBUG debug_level);
String getId() const;
boolean setStartAnchor(Anchor* arg);
boolean setEndAnchor(Anchor* arg);
boolean setChannel(long arg);
Anchor* getStartAnchor() const;
Anchor* getEndAnchor() const;
String getType() const;
Long getChannel() const;
HashTable&lt;String, String&gt;& getFeatureMap();
boolean setFeatureMap(HashTable&lt;String, String&gt;& arg);
boolean existsFeature(const String& feature);
boolean deleteFeature(const String& feature);
boolean setFeature(String& feature, String& value);
String getFeature(const String& feature);
boolean getFeatureNames(Vector&lt;String&gt;& features);
boolean unsetFeatures();
</pre>
</blockquote>

<a name="quick_start">
<b>quick start:</b>
<br><br>

<blockquote>
<pre>

Annotation anno_00;
Anchor start_00;
Anchor end_00;
anno_00.setStartAnchor(&start_00);
anno_00.setEndAnchor(&end_00); 

</pre>
</blockquote>

<a name="description">
<b>description:</b>
<br><br>

This class is used to represent an annotation in the annotation graph.

<ul>
[1] S. Bird, M. Liberman, A Formal Framework for Linguistic Annotation, Linguistic Data Consortium, University of Pennsylvania, Philadelphia, Pennsylvania, USA, 2000.

[2] K. Maeda, X. Ma, H. Lee, S. Bird, The Annotation Graph Toolkit: Application Developer's Manual (Draft), Linguistic Data Consortium, University of Pennsylvania, Philadelphia, Pennsylvania, USA, 2001.
</ul>

<br><br>

<a name="dependencies">
<b>dependencies:</b>
<br><br>

<ul>
  <li> <a href="../../math/scalar/String/">String.h</a>
  <li> <a href="../../dstr/HashTable/">HashTable.h</a>
</ul>

<a name="constants">
<b>public constants:</b>
<br><br>

<ul>
  <li> define the class name:

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Annotation/anno_00.cc&constant=CLASS_NAME">static const String CLASS_NAME = L"Annotation";</a></pre>

  <li> define i/o related constants:

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Annotation/anno_00.cc&constant=DEF_PARAM">static const String DEF_PARAM;</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Annotation/anno_00.cc&constant=PARAM_ID">static const String PARAM_ID;</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Annotation/anno_00.cc&constant=PARAM_TYPE">static const String PARAM_TYPE;</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Annotation/anno_00.cc&constant=PARAM_START">static const String PARAM_START;</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Annotation/anno_00.cc&constant=PARAM_END">static const String PARAM_END;</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Annotation/anno_00.cc&constant=PARAM_FEATURES">static const String PARAM_FEATURES;</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Annotation/anno_00.cc&constant=PARAM_CHANNEL_INDEX">static const String PARAM_CHANNEL_INDEX;</a></pre>

  <li> define default values:
       
       <pre>static const long DEF_CHANNEL_INDEX = 0;</pre>
       
</ul>

<a name="error">
<b>error codes:</b>
<br><br>

<ul>
  <li> error codes indicating general errors:

</ul>

<a name="protected">
<b>protected data:</b>
<br><br>

<ul>
  <li> declare the annotation id:

       <pre>String id_d;</pre>

  <li> declare the annotation type:

       <pre>String type_d;</pre>

  <li> declare the start anchor:

       <pre>Anchor* start_d;</pre>

  <li> declare the end anchor:

       <pre>Anchor* end_d;</pre>

  <li> declare the channel index:

       <pre>Long channel_index_d;</pre>

  <li> declare the annotation feature map:

       <pre>HashTable&lt;String, String&gt; feature_map_d;</pre>

  <li> declare the debugging parameters:

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Annotation/anno_00.cc&static=debug_level_d">static Integral::DEBUG debug_level_d;</a></pre>

  <li> declare the memory manager:

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Annotation/anno_00.cc&static=mgr_d">static MemoryManager mgr_d;</a></pre>

</ul>

<a name="public">
<b>required public methods:</b>
<br><br>

<ul>
  <li> static methods:

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Annotation/Annotation.h&method=name&instance=0">static const String& name();</a></pre>

  <li> debug methods:

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Annotation/anno_01.cc&method=debug&instance=0">boolean debug(const unichar* msg) const;</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Annotation/Annotation.h&method=setDebug&instance=0">static boolean setDebug(Integral::DEBUG arg);</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Annotation/anno_02.cc&method=diagnose&instance=0">static boolean diagnose(Integral::DEBUG debug_level);</a></pre>
       
  <li> destructor/constructor(s):

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Annotation/Annotation.h&method=destructor&instance=0">~Annotation();</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Annotation/Annotation.h&method=default+constructor&instance=0">Annotation();</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Annotation/Annotation.h&method=copy+constructor&instance=0">Annotation(const Annotation& arg);</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Annotation/anno_00.cc&method=default+constructor&instance=1">Annotation(String& id, const Annotation* arg);</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Annotation/anno_00.cc&method=default+constructor&instance=2">Annotation(String& id, Anchor* start, Anchor* end, String& type, long channel_index = DEF_CHANNEL_INDEX);</a></pre>

  <li> assign methods:

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Annotation/anno_05.cc&method=assign&instance=0">boolean assign(const Annotation& arg);</a></pre>

  <li> operator= method:

       <pre>not present.</pre>

  <li> i/o methods:

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Annotation/anno_05.cc&method=sofSize&instance=0">long sofSize() const;</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Annotation/Annotation.h&method=read&instance=0">boolean read(Sof& sof, long tag);</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Annotation/anno_03.cc&method=read&instance=0">boolean read(Sof& sof, long tag, const String& name);</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Annotation/Annotation.h&method=write&instance=0">boolean write(Sof& sof, long tag) const;</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Annotation/anno_04.cc&method=write&instance=0">boolean write(Sof& sof, long tag, const String& name) const;</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Annotation/anno_03.cc&method=readData&instance=0">boolean readData(Sof& sof, const String& pname = DEF_PARAM, long size = SofParser::FULL_OBJECT, boolean param = true, boolean nested = false);</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Annotation/anno_04.cc&method=writeData&instance=0">boolean writeData(Sof& sof, const String& pname =  DEF_PARAM) const;</a></pre>

  <li> equality methods:

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Annotation/anno_05.cc&method=eq&instance=0">boolean eq(const Annotation& arg) const;</a></pre>

  <li> memory management methods:

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Annotation/Annotation.h&method=new&instance=0">static void* operator new(size_t arg);</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Annotation/Annotation.h&method=new\[\]&instance=0">static void* operator new[](size_t arg);</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Annotation/Annotation.h&method=delete&instance=0">static void operator delete(void* arg);</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Annotation/Annotation.h&method=delete\[\]&instance=0">static void operator delete[](void* arg);</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Annotation/Annotation.h&method=setGrowSize&instance=0">static boolean setGrowSize(long arg);</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Annotation/anno_05.cc&method=clear&instance=0">boolean clear(Integral::CMODE cmode = Integral::DEF_CMODE);</a></pre>

</ul>

<a name="specific">
<b>class-specific public methods:</b>
<br><br>

<ul>
  <li> declare annotation property methods:

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Annotation/Annotation.h&method=getId&instance=0">String getId() const;</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Annotation/Annotation.h&method=getType&instance=0">String getType() const;</a></pre>

  <li> declare anchor methods:
       
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Annotation/Annotation.h&method=setStartAnchor&instance=0">boolean setStartAnchor(Anchor* arg);</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Annotation/Annotation.h&method=setEndAnchor&instance=0">boolean setEndAnchor(Anchor* arg);</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Annotation/Annotation.h&method=getStartAnchor&instance=0">Anchor* getStartAnchor() const;</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Annotation/Annotation.h&method=getEndAnchor&instance=0">Anchor* getEndAnchor() const;</a></pre>      

  <li> declare channel methods:

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Annotation/Annotation.h&method=getChannel&instance=0">Long getChannel() const;</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Annotation/Annotation.h&method=setChannel&instance=0">boolean setChannel(long arg);</a></pre>

  <li> declare feature map methods:
       
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Annotation/Annotation.h&method=getFeatureMap&instance=0">HashTable&lt;String, String&gt;& getFeatureMap();</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Annotation/Annotation.h&method=setFeatureMap&instance=0">boolean setFeatureMap(HashTable&lt;String, String&gt;& arg);</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Annotation/Annotation.h&method=existsFeature&instance=0">boolean existsFeature(const String& feature);</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Annotation/Annotation.h&method=deleteFeature&instance=0">boolean deleteFeature(const String& feature);</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Annotation/Annotation.h&method=setFeature&instance=0">boolean setFeature(String& feature, String& value);</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Annotation/anno_05.cc&method=getFeature&instance=0">String getFeature(const String& feature);</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Annotation/anno_05.cc&method=getFeatureNames&instance=0">boolean getFeatureNames(Vector&lt;String&gt;& features);</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Annotation/anno_05.cc&method=unsetFeatures&instance=0">boolean unsetFeatures();</a></pre>

</ul>

<a name="private">
<b>private methods:</b>
<br><br>

<ul>
  <li> declare friend classes:
       
       <pre>friend class AnnotationGraph;</pre>
       
  <li> declare private methods:

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Annotation/anno_05.cc&method=compare&instance=0">boolean compare(const String& arg1, const String& arg2) const;</a></pre>

</ul>

<a name="examples">
<b>examples:</b>
<br><br>

<ul>

    <li> This <a href="/perl/ifc_document.pl?file=$isip/doc/examples/class/mmedia/mmedia_example_04/example.cc">example</a> shows how to use the Annotation object.
	 
</ul>

<a name="notes">
<b>notes:</b>
<br><br>

<ul>
  <li> none.
</ul>

<!--#include virtual="/hse/ies/templates/documentation/footer/footer.html" -->
