Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members  

Annotation Class Reference

#include <Annotation.h>

Collaboration diagram for Annotation:

Collaboration graph
[legend]
List of all members.

Public Methods

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

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

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

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

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

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

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

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

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

void deleteFeature (FeatureName featureName)
 Delete the specified feature. More...

StringSet getFeatureNames ()
Features getFeatures ()
void unsetFeatures ()
string toString ()
 Dump the annotation in AIF format. More...

Annotation operator= (const Annotation &)

Protected Methods

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

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

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


Friends

class  AG
class  AnnotationIndex
bool operator< (const Annotation &, const Annotation &)
bool operator== (const Annotation &, const Annotation &)

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(s):
Xiaoyi Ma


Constructor & Destructor Documentation

Annotation::Annotation ( Id id,
const Annotation * )
 

Copy an annotation, using the given identifier.

Annotation::Annotation ( Id id,
Anchor * start,
Anchor * end,
String type )
 

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

void Annotation::deleteFeature ( FeatureName featureName )
 

Delete the specified feature.

bool Annotation::existsFeature ( FeatureName featureName )
 

Test if the specified feature exists.

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.

Anchor * Annotation::getEndAnchor ( ) const [inline]
 

Get the end anchor of the annotation.

FeatureValue Annotation::getFeature ( const FeatureName & )
 

Get the specified feature of the annotation.

const char * Annotation::getFeatureC ( const FeatureName & )
 

Get the value of specified feature.

const FeatureMap Annotation::getFeatureMap ( ) const [inline]
 

Get the featuremap of the annotation.

StringSet Annotation::getFeatureNames ( )
 

Get feature names

Returns:
string set which contains all the feature names

Features Annotation::getFeatures ( )
 

Get all the features in a single string. returns all features in a single string in Dublin Core Structured Values DCSV (Cox & Iannella) format. For example, "name=Stone Philips; phone=(215)555-8888; age=40"

Note:
see http://dublincore.org/documents/2000/07/28/dcmi-dcsv/ for details about DCSV format.

Id Annotation::getId ( ) const [inline]
 

Get the id of the annotation.

Anchor * Annotation::getStartAnchor ( ) const [inline]
 

Get the start anchor of the annotation.

String Annotation::getType ( ) const [inline]
 

Get the type of the annotation.

Annotation Annotation::operator= ( const Annotation & )
 

void Annotation::setEndAnchor ( Anchor * a ) [inline, protected]
 

set the end anchor of the annotation.

void Annotation::setFeature ( const FeatureName & feature,
const FeatureValue & value ) [protected]
 

Set a feature and its value.

void Annotation::setStartAnchor ( Anchor * a ) [inline, protected]
 

set the start anchor of the annotation.

string Annotation::toString ( )
 

Dump the annotation in AIF format.

void Annotation::unsetFeatures ( )
 

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


Friends And Related Function Documentation

class AG [friend]
 

class AnnotationIndex [friend]
 

bool operator< ( const Annotation &,
const Annotation & ) [friend]
 

bool operator== ( const Annotation &,
const Annotation & ) [friend]
 


The documentation for this class was generated from the following file:
Generated at Wed Jul 3 14:55:14 2002 for Annotation Graph API by doxygen1.2.7 written by Dimitri van Heesch, © 1997-2001