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

AGSet Class Reference

#include <AGSet.h>

Collaboration diagram for AGSet:

Collaboration graph
[legend]
List of all members.

Public Methods

 AGSet (AGSetId id)
 A constructor. More...

 ~AGSet ()
 A destructor. More...

Id getId () const
 Get the id of the AGSet. More...

TimelineId createTimeline (Id id) throw (AGException)
void deleteTimeline (TimelineId timelineId) throw (AGException)
 Delete the specified timeline. More...

AGId createAG (Id id, Timeline *timeline=NULL) throw (AGException)
void deleteAG (AGId agId)
 Delete the specified AG. More...

IdSet getAGIds ()
 Get all AG ids. More...

void addFeatureName (FeatureName feature)
void setFeature (FeatureName featureName, FeatureValue featureValue)
 Set the value of a feature in the metadata. More...

bool existsFeature (FeatureName featureName)
 Test if a feature exists in the metadata. More...

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

string getFeature (FeatureName featureName)
 Get the feature value of the specified feature in the metadata. More...

StringSet getFeatureNames ()
 Get all feature names in the metadata. More...

void getAnnotationFeatureNames (StringSet &S)
void getAnnotationTypes (StringSet &S)
void setFeatures (Features features)
Features getFeatures ()
void unsetFeatures ()
 Unset all features in the metadata. More...

string toXML (AGId agId)
list<string> storeSQLs ()
 Create list of SQLs used to save the AGSet to the DB server. More...

string toString ()

Detailed Description

An AGSet contains a set AGs (Annotation Graphs)
Author(s):
Xiaoyi Ma
See also:
AG


Constructor & Destructor Documentation

AGSet::AGSet ( AGSetId id )
 

A constructor.

AGSet::~AGSet ( )
 

A destructor.


Member Function Documentation

void AGSet::addFeatureName ( FeatureName feature ) [inline]
 

Add a feature name to the feature name set. When a database server is used, the current schema stores the annotation features of each AGSet in a separate table which stores all the features of an annotation in a single record and use the FeatureName as the column heading. In order to create such a table, an AGSet has to keep track of how many feature names are there and what they are.

The strategy is to keep a set of feature names in the AGSet, and add a feature's name to the set everytime a SetFeature is called and its id is an AnnotationId. addFeatureName adds a feature name to the set.

AGId AGSet::createAG ( Id id,
Timeline * timeline = NULL ) throw (AGException)
 

Create a new AG and add it to the AGSet.

Parameters:
id   might be AGSetId or AGId. If id is a AGSetId, the id issuer will generate a new AGId. If id is a AGId, it will try the given id first, if it's taken, generate a new AGId.
Returns:
AGId of the new AG.
Exceptions:
AGException   IF (the id given is invalid)
Note:
default value for timeline is NULL.

TimelineId AGSet::createTimeline ( Id id ) throw (AGException)
 

Create a new timeline and add it to the AGSet.

Parameters:
id   might be AGSetId or TimelineId. If id is an AGSetId, a TimelineId will be assigned to the new timeline. If id is a TimelineId, it will try the given id first, if it's taken, assign a new TimelineId.
Returns:
TimelineId of the new timeline.
Exceptions:
AGException   IF (the id given is invalid)

void AGSet::deleteAG ( AGId agId )
 

Delete the specified AG.

void AGSet::deleteFeature ( FeatureName featureName )
 

Delete the specified feature in the metadata.

void AGSet::deleteTimeline ( TimelineId timelineId ) throw (AGException)
 

Delete the specified timeline.

bool AGSet::existsFeature ( FeatureName featureName )
 

Test if a feature exists in the metadata.

IdSet AGSet::getAGIds ( )
 

Get all AG ids.

void AGSet::getAnnotationFeatureNames ( StringSet & S )
 

Get all feature names of all annotations in this AGSet.

Parameters:
S   The container for this method to put the results. Note that this method doesn't clean S before it puts the results.

void AGSet::getAnnotationTypes ( StringSet & S )
 

Get types of all annotations in this AGSet.

Parameters:
S   The container for this method to put the results. Note that this method doesn't clean S before it puts the results.

string AGSet::getFeature ( FeatureName featureName )
 

Get the feature value of the specified feature in the metadata.

StringSet AGSet::getFeatureNames ( )
 

Get all feature names in the metadata.

Features AGSet::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 AGSet::getId ( ) const [inline]
 

Get the id of the AGSet.

void AGSet::setFeature ( FeatureName featureName,
FeatureValue featureValue )
 

Set the value of a feature in the metadata.

void AGSet::setFeatures ( Features features )
 

Set multiple features in a single string. Set multiple 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.

list< string > AGSet::storeSQLs ( )
 

Create list of SQLs used to save the AGSet to the DB server.

string AGSet::toString ( )
 

dump the AGSet in ATLAS Level 0 form

See also:
ag.dtd

string AGSet::toXML ( AGId agId )
 

dump the specified AG in ATLAS Level 0 form

See also:
ag.dtd

void AGSet::unsetFeatures ( )
 

Unset all features in the metadata.


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