Main Page   Class Hierarchy   Compound List   Compound Members  

Annotation Class Reference

List of all members.

Public Methods

 Annotation (Id id, const Annotation *)
 Copy an annotation, using the given identifier.

 Annotation (Id id, Anchor *start, Anchor *end, String type)
Id getId () const
 Get the id of the annotation.

AnchorgetStartAnchor () const
 Get the start anchor of the annotation.

AnchorgetEndAnchor () const
 Get the end anchor of the annotation.

String getAnnotationInfo ()
String getType () const
 Get the type of the annotation.

const FeatureMap getFeatureMap () const
 Get the featuremap of the annotation.

FeatureValue getFeature (const FeatureName &)
 Get the specified feature of the annotation.

const char * getFeatureC (const FeatureName &)
 Get the value of specified feature.

bool existsFeature (FeatureName featureName)
 Test if the specified feature exists.

void deleteFeature (FeatureName featureName)
 Delete the specified feature.

set< string > getFeatureNames ()
map< string, string > getFeatures ()
void unsetFeatures ()
AGgetAGRef ()
 Get a reference of the annotation graph containing this annotation.

string toString ()
 Dump the annotation in AIF format.


Protected Methods

void setStartAnchor (Anchor *a)
 set the start anchor of the annotation

void setEndAnchor (Anchor *a)
 set the end anchor of the annotation

void setFeature (const FeatureName &feature, const FeatureValue &value)
 Set a feature and its value.


Detailed Description

An annotation associates symbolic information to a region of signal. An annotation has a start anchor and an end anchor which defines what region of which signals are being annotated. An annotation also contains feature value pairs as its content.
Version:
1.5 September 21, 2001
Author:
Xiaoyi Ma


Constructor & Destructor Documentation

Annotation::Annotation Id    id,
Anchor   start,
Anchor   end,
String    type
[inline]
 

A constructor. Create an annotation with given identifier, for the specified region and type.

Parameters:
id  the id of the annotation
start  the start anchor of the annotation
end  the end anchor of the annotation
type  the type of the annotation


Member Function Documentation

String Annotation::getAnnotationInfo  
 

Get all the information of the annotation Get all the information of the specified annotation

Returns:
a string containing annotation type, start anchor offset, end anchor offset, start anchor id, end anchor id and all features in DCSV format.
Note:
see http://dublincore.org/documents/2000/07/28/dcmi-dcsv/ for details about DCSV format.

set<string> Annotation::getFeatureNames  
 

Get feature names

Returns:
string set which contains all the feature names

map<string,string> Annotation::getFeatures   [inline]
 

Get all the features. Returns all features in a hash table of feature-value pairs.

void Annotation::unsetFeatures  
 

Unset all the features. Set all the features to empty string.