Main Page   Class Hierarchy   Compound List   Compound Members  

AGSet Class Reference

List of all members.

Public Methods

 AGSet (AGSetId id)
 A constructor.

 ~AGSet ()
 A destructor.

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

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

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

set< AGId > getAGIds ()
 Get all AG ids.

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

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

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

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

set< string > getFeatureNames ()
 Get all feature names in the metadata.

void getAnnotationFeatureNames (set< string > &S, const AnnotationType &type)
void getAnnotationTypes (set< string > &S)
void setFeatures (map< string, string > &features)
map< string, string > getFeatures ()
void unsetFeatures ()
 Unset all features in the metadata.

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

string toString ()

Detailed Description

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


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::getAnnotationFeatureNames set< string > &    S,
const AnnotationType &    type
 

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.
type  If given, only the annotations of the given type is considered in the computation -- things will get slow.

void AGSet::getAnnotationTypes set< string > &    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.

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

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

void AGSet::setFeatures map< string, string > &    features [inline]
 

Set multiple features in a hash table of feature-value pairs.

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