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

AGAPI Interface Reference

#include <ag.idl>

List of all members.

Public Types

typedef string Id
typedef string AGSetId
 AGSet identifier. More...

typedef string AGId
 AG identifier. More...

typedef string AGIds
 AG identifiers (space separated list). More...

typedef string AnnotationId
 Annotation identifier. More...

typedef string AnnotationType
 Annotation type. More...

typedef string AnnotationIds
 Annotation identifiers (list). More...

typedef string AnchorId
 Anchor identifier. More...

typedef string AnchorIds
 Anchor identifiers (list). More...

typedef string TimelineId
 Timeline identifier. More...

typedef string SignalId
 Signal identifier. More...

typedef string SignalIds
 Signal identifiers (list). More...

typedef string FeatureName
 feature name. More...

typedef string FeatureNames
 feature name (list). More...

typedef string FeatureValue
 feature value. More...

typedef string Features
 feature=value pairs (list). More...

typedef string URI
 a uniform resource identifier. More...

typedef string MimeClass
 the MIME class. More...

typedef string MimeType
 the MIME type. More...

typedef string Encoding
 the signal encoding. More...

typedef string Unit
 the unit for offsets. More...

typedef double Offset
 the offset into a signal. More...

typedef string Track
 the track of a signal. More...


Public Methods

AGSetId CreateAGSet (in AGSetId agSetId)
boolean ExistsAGSet (in AGSetId agSetId)
 Test if an AGSet exists. More...

void DeleteAGSet (in AGSetId agSetId)
AGId CreateAG (in Id id) AGId CreateAG(in Id id, in TimelineId timelineId)
boolean ExistsAG (in AGId agId)
 Test if an AG exists. More...

void DeleteAG (in AGId agId)
 Delete an AG. More...

AGIds GetAGIds (in AGSetId agSetId)
TimelineId CreateTimeline (in Id id)
boolean ExistsTimeline (in TimelineId timelineId)
 Test if a timeline exists. More...

void DeleteTimeline (in TimelineId timelineId)
 Delete a timeline. More...

SignalId CreateSignal (in Id id, in URI uri, in MimeClass mimeClass, in MimeType mimeType, in Encoding encoding, in Unit unit, in Track track)
boolean ExistsSignal (in SignalId signalId)
 Test if a signal exists. More...

void DeleteSignal (in SignalId signalId)
 Delete a signal. More...

SignalIds GetSignals (in TimelineId timelineId)
void SetOffsetUnit (in AnchorId anchorId, in Unit unit)
 Set the unit of the offset of an anchor. More...

Unit GetOffsetUnit (in AnchorId anchorId)
 Get the unit of the offset of an anchor. More...

void SetAnchorSignalIds (in AnchorId anchorId, in SignalIds signalIds)
 Set the signal Ids associated with the given anchor. More...

SignalIds GetAnchorSignalIds (in AnchorId anchorId)
 Get the signal Ids associated with the given anchor. More...

MimeClass GetSignalMimeClass (in SignalId signalId)
 Get the MimeClass of the specified signal. More...

MimeType GetSignalMimeType (in SignalId signalId)
 Get the MimeType of the specified signal. More...

Encoding GetSignalEncoding (in SignalId signalId)
 Get the encoding of the specified signal. More...

string GetSignalXlinkType (in SignalId signalId)
 Get the XlinkType of the specified signal. More...

string GetSignalXlinkHref (in SignalId signalId)
 Get the XlinkHref of the specified signal. More...

string GetSignalUnit (in SignalId signalId)
 Get the unit of the specified signal. More...

Track GetSignalTrack (in SignalId signalId)
 Get the track of the specified signal. More...

AnnotationId CreateAnnotation (in Id id, in AnchorId start, in AnchorId end, in AnnotationType annotationType)
boolean ExistsAnnotation (in AnnotationId annotationId)
 Test if an annotation exists. More...

void DeleteAnnotation (in AnnotationId annotationId)
 Delete an annotation. More...

AnnotationId CopyAnnotation (in AnnotationId annotationId)
AnnotationIds SplitAnnotation (in AnnotationId annotationId)
AnnotationIds NSplitAnnotation (in AnnotationId annotationId, in short N)
AnnotationType GetAnnotationType (in AnnoationId annotationId)
 Get the type of the annotation. More...

AnchorId GetStartAnchor (in AnnotationId annotationId)
 Get the start anchor. More...

AnchorId GetEndAnchor (in AnnotationId annotationId)
 Get the end anchor. More...

string GetAnnotationInfo (in AnnoationId annotationId)
 Set the start of an annotation to the specified anchor. More...

void SetStartAnchor (in AnnotationId annotationId, in AnchorId anchorId)
void SetEndAnchor (in AnnotationId annotationId, in AnchorId anchorId)
 Set the end of an annotation to the specified anchor. More...

Offset GetStartOffset (in AnnotationId annotationId)
 Get the offset of the start anchor of an annotatino. More...

Offset GetEndOffset (in AnnotationId annotationId)
 Get the offset of the end anchor of an annotation. More...

void SetStartOffset (in AnnotationId annotationId, in Offset offset)
 Set the offset of the start anchor of an annotation. More...

void SetEndOffset (in AnnotationId annotationId, in Offset offset)
 Set the offset of the end anchor of an annotation. More...

sequence<AnnotationTypeGetAnnotationTypes (in Id id)
 Get types of all annotations in an AGSet, AG, or Annotation. More...

sequence<FeatureNameGetAnnotationFeatureNames (in Id id)
 Get feature names of all annotations in an AGSet, AG, or Annotation. More...

void SetFeature (in Id id, in FeatureName featureName, in FeatureValue featureValue)
boolean ExistsFeature (in Id id, in FeatureName featureName)
void DeleteFeature (in Id id, in FeatureName featureName)
string GetFeature (in Id id, in FeatureName featureName)
void UnsetFeature (in Id id, in FeatureName featureName)
FeatureNames GetFeatureNames (in Id id)
void SetFeatures (in Id id, in Features features)
Features GetFeatures (in Id id)
void UnsetFeatures (in Id id)
AnchorId CreateAnchor (in Id id, in Offset offset, in Unit unit, in SignalIds signalIds)
AnchorId CreateAnchor (in Id id, in SignalIds signalIds)
AnchorId CreateAnchor (in Id id)
boolean ExistsAnchor (in AnchorId anchorId)
 Test if an anchor exists. More...

void DeleteAnchor (in AnchorId anchorId)
 Delete an anchor. More...

void SetAnchorOffset (in AnchorId anchorId, in Offset offset)
 Set the offset of an anchor. More...

Offset GetAnchorOffset (in AnchorId anchorId)
 Get the offset of an anchor. More...

boolean GetAnchored (in AnchorId anchorId)
 Test if an anchor is anchored (has offset). More...

void UnsetAnchorOffset (in AnchorId anchorId)
AnchorId SplitAnchor (in AnchorId anchorId)
AnnotationIds GetIncomingAnnotationSet (in AnchorId anchorId)
 Get the incoming annotations of an anchor. More...

AnnotationIds GetIncomigAnnotationSetByType (in AnchorId anchorId, in AnnotationType type)
 Get the incoming annotations with specified type. More...

AnnotationIds GetOutgoingAnnotationSet (in AnchorId anchorId)
 Get the outgoing annotations of an anchor. More...

AnnotationIds GetOutfoingAnnotationSet (in AnchorId anchorId, in AnnotationType type)
 Get the outgoing annotations with specified type. More...

AnchorIds GetAnchorSet (in AGId agId)
 Get all the anchors in an AG. More...

AnchorIds GetAnchorSetByOffset (in AGId agId, in Offset offset)
AnchorIds GetAnchorSetByOffset (in AGId agId, in Offset offset, in float epsilon)
AnchorIds GetAnchorSetNearestOffset (in AGId agId, in Offset offset)
AnnotationIds GetAnnotationSetByFeature (in AGId agId, in FeatureName featureName, in FeatureValue featureValue)
 Get all annotations whose specified feature equals to the specified value. More...

AnnotationIds GetAnnotationSetByOffset (in AGId agId, in Offset offset)
AnnotationIds GetAnnotationSetByType (in AGId agId, in AnnotationType annotationType)
 Get all annotations of the given type. More...

AnnotationIds GetAnnotationSeqByOffset (in AGId agId)
AnnotationIds GetAnnotationSeqByOffset (in AGId agId, in Offset begin)
AnnotationIds GetAnnotationSeqByOffset (in AGId agId, in Offset begin, in Offset end)
AGSetId GetAGSetId (in Id id)
AGId GetAGId (in Id id)
TimelineId GetTimelineId (in Id id)
bool SPrecedes (in AnnotationId annotationId1, in AnnotationId annotationId2)
 Test structural precedence of one annotation over the other. More...

string toXML (in AGSetId id)
 Dump the specified AGSet in ATLAS Level 0 format. More...

string toXML (in AGId agId)
 Dump the specified AG in ATLAS Level 0 forma. More...

bool LoadFromDB (in string connStr, in AGSetId agsetId)
bool StoreToDB (in string connStr in AGSetId agsetId)
AGIds Load (in string format, in string annotationFile, in string id, in string[10][2] signalInfo, in string[10][2] options)
 Load an annotation file. More...

void Store (in string format, in string filename, in string agIds, in string[10][2] options)
 Store annotation graphs in native format. More...

boolean CheckAnchorOffsetTotal (in Id agId, in AnnotationType type)
boolean CheckAnchorOffsetBounded (in Id agId, in AnnotationType type)
boolean CheckFeatureExists (in Id agId, in AnnotationType type, in FeatureName featureName)
boolean CheckFeatureIsAnnotationId (in Id agId, in AnnotationType type, in FeatureName featureName)
boolean CheckLinear (in Id agId, in AnnotationType type)
boolean CheckConnected (in Id agId, in AnnotationType type)
boolean CheckCoextensive (in Id agId, in AnnotationType type1, in AnnotationType type2)
boolean CheckSpan (in Id agId, in AnnotationType spanType, in AnnotationType spannedType)


Detailed Description

AGAPI interface. IDL definition for flat AG API
Author(s):
Steven Bird, Xiaoyi Ma(LDC)
Version:
1.3.4 2002-05-16


Member Typedef Documentation

typedef string AGAPI::AGId
 

AG identifier.

typedef string AGAPI::AGIds
 

AG identifiers (space separated list).

typedef string AGAPI::AGSetId
 

AGSet identifier.

typedef string AGAPI::AnchorId
 

Anchor identifier.

typedef string AGAPI::AnchorIds
 

Anchor identifiers (list).

typedef string AGAPI::AnnotationId
 

Annotation identifier.

typedef string AGAPI::AnnotationIds
 

Annotation identifiers (list).

typedef string AGAPI::AnnotationType
 

Annotation type.

typedef string AGAPI::Encoding
 

the signal encoding.

typedef string AGAPI::FeatureName
 

feature name.

typedef string AGAPI::FeatureNames
 

feature name (list).

typedef string AGAPI::FeatureValue
 

feature value.

typedef string AGAPI::Features
 

feature=value pairs (list).

typedef string AGAPI::Id
 

Generic identifier. Id can be from any of AGSetId, AGId, AnnotationId, TimelineId, SignalId

typedef string AGAPI::MimeClass
 

the MIME class.

typedef string AGAPI::MimeType
 

the MIME type.

typedef double AGAPI::Offset
 

the offset into a signal.

typedef string AGAPI::SignalId
 

Signal identifier.

typedef string AGAPI::SignalIds
 

Signal identifiers (list).

typedef string AGAPI::TimelineId
 

Timeline identifier.

typedef string AGAPI::Track
 

the track of a signal.

typedef string AGAPI::URI
 

a uniform resource identifier.

typedef string AGAPI::Unit
 

the unit for offsets.


Member Function Documentation

boolean AGAPI::CheckAnchorOffsetBounded ( in Id agId,
in AnnotationType type )
 

Check that all anchors of annotations of a given type are bounded by anchors that have an offset, following paths of this type.

Parameters:
ag, an   annotation graph
type, an   annotation type
Returns:
boolean indicating whether all anchors are bounded

boolean AGAPI::CheckAnchorOffsetTotal ( in Id agId,
in AnnotationType type )
 

Check that all anchors of annotations of a given type have an offset.

Parameters:
ag, an   annotation graph
type, an   annotation type
Returns:
boolean indicating whether all anchors have an offset

boolean AGAPI::CheckCoextensive ( in Id agId,
in AnnotationType type1,
in AnnotationType type2 )
 

Check that all annotations of type type1 are coextensive with an annotation of type type2, and vice versa (an existence not uniqueness test).

Parameters:
ag, an   annotation graph
type1, an   annotation type
type2, an   annotation type
Returns:
boolean indicating whether the types are coextensive

boolean AGAPI::CheckConnected ( in Id agId,
in AnnotationType type )
 

Check that all annotations of a given type form a connected subgraph.

Parameters:
ag, an   annotation graph
type, an   annotation type
Returns:
boolean indicating whether the set of annotations is connected

boolean AGAPI::CheckFeatureExists ( in Id agId,
in AnnotationType type,
in FeatureName featureName )
 

Check that all annotations of a given type have the specified feature.

Parameters:
ag, an   annotation graph
type, an   annotation type
featureName, the   name of the feature
Returns:
boolean indicating whether all annotations have the feature

boolean AGAPI::CheckFeatureIsAnnotationId ( in Id agId,
in AnnotationType type,
in FeatureName featureName )
 

Check that all annotations of a given type have the specified feature and that its value is a valid AnnotationId.

Parameters:
ag, an   annotation graph
type, an   annotation type
featureName, the   name of the feature
Returns:
boolean indicating whether all instances of the feature are AnnotationIds

boolean AGAPI::CheckLinear ( in Id agId,
in AnnotationType type )
 

Check that all annotations of a given type form a connected linear sequence.

Parameters:
ag, an   annotation graph
type, an   annotation type
Returns:
boolean indicating whether the set of annotations is linear

boolean AGAPI::CheckSpan ( in Id agId,
in AnnotationType spanType,
in AnnotationType spannedType )
 

Check that all annotations of type spanType span annotations of type spannedType and that all annotations of type spannedType are spanned by annotations of type spanType.

Parameters:
ag, an   annotation graph
spanType, the   spanning type
spanedType, the   spanned type
Returns:
boolean indicating whether the spanning relationship holds

AnnotationId AGAPI::CopyAnnotation ( in AnnotationId annotationId )
 

Clone an annotation. Make a copy of the specified annotation, assign the new annotation a new AnnotationId.

Parameters:
annotationId   the original annotation
Returns:
the AnnotationId of the clone

AGId AGAPI::CreateAG ( in Id id )
 

Create a new AG and add it to the AGSet.

Parameters:
id   might be AGSetId or AGId. If id is an AGSetId, an AGId will be assigned to the new AG. If id is an AGId, it will try the given id first, if it's taken, assign a new AGId.
timelineId   the id of the timeline with which the new AG will be associated.
Returns:
the AGId of the new AG.
Exceptions:
AGException   IF (the id given is invalid OR the timeline doesn't exist)

AGSetId AGAPI::CreateAGSet ( in AGSetId agSetId )
 

Create a new AGSet.

Parameters:
agSetId   the id of the new AGSet
Returns:
the AGSetId of the new AGSet.
Exceptions:
AGException   IF (the an AGSet with the same id already exists)

AnchorId AGAPI::CreateAnchor ( in Id id )
 

Create an anchor.

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

AnchorId AGAPI::CreateAnchor ( in Id id,
in SignalIds signalIds )
 

Create an anchor with specified signals.

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

AnchorId AGAPI::CreateAnchor ( in Id id,
in Offset offset,
in Unit unit,
in SignalIds signalIds )
 

Create an anchor with specified offset, unit and signals.

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

AnnotationId AGAPI::CreateAnnotation ( in Id id,
in AnchorId start,
in AnchorId end,
in AnnotationType annotationType )
 

Create a new annotation.

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

SignalId AGAPI::CreateSignal ( in Id id,
in URI uri,
in MimeClass mimeClass,
in MimeType mimeType,
in Encoding encoding,
in Unit unit,
in Track track )
 

Create a new signal and add it to the timeline.

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

TimelineId AGAPI::CreateTimeline ( in Id id )
 

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 AGAPI::DeleteAG ( in AGId agId )
 

Delete an AG.

void AGAPI::DeleteAGSet ( in AGSetId agSetId )
 

Delete an AGSet.

Parameters:
agSetId   the AGSet to be deleted
Exceptions:
AGException   IF (the AGSet does not exist)

void AGAPI::DeleteAnchor ( in AnchorId anchorId )
 

Delete an anchor.

void AGAPI::DeleteAnnotation ( in AnnotationId annotationId )
 

Delete an annotation.

void AGAPI::DeleteFeature ( in Id id,
in FeatureName featureName )
 

Delete a feature. This is for both the features of an annotation, and for the metadata associated with AGSets, AGs, Timelines and Signals.

Parameters:
id   the Id of the entity whose feature will be deleted
featureName   the name of the feature
Note:
id can be AGSetId, AGId, TimelineId, SignalId or AnnotationID. If the id is AGSetId, AGId, TimelineId or SignalId, delete the feature in its Metadata. If the id is an AnnotationId, delete the feature in the annotation.

void AGAPI::DeleteSignal ( in SignalId signalId )
 

Delete a signal.

void AGAPI::DeleteTimeline ( in TimelineId timelineId )
 

Delete a timeline.

boolean AGAPI::ExistsAG ( in AGId agId )
 

Test if an AG exists.

boolean AGAPI::ExistsAGSet ( in AGSetId agSetId )
 

Test if an AGSet exists.

boolean AGAPI::ExistsAnchor ( in AnchorId anchorId )
 

Test if an anchor exists.

boolean AGAPI::ExistsAnnotation ( in AnnotationId annotationId )
 

Test if an annotation exists.

boolean AGAPI::ExistsFeature ( in Id id,
in FeatureName featureName )
 

Test if a feature exists. This is for both the features of an annotation, and for the metadata associated with AGSets, AGs, Timelines and Signals.

Parameters:
id   the Id of the entity whose feature's existence will be tested
featureName   the name of the feature
Note:
id can be AGSetId, AGId, TimelineId, SignalId or AnnotationID. If the id is AGSetId, AGId, TimelineId or SignalId, test the feature in its Metadata. If the id is an AnnotationId, test the feature in the annotation.

boolean AGAPI::ExistsSignal ( in SignalId signalId )
 

Test if a signal exists.

boolean AGAPI::ExistsTimeline ( in TimelineId timelineId )
 

Test if a timeline exists.

AGId AGAPI::GetAGId ( in Id id )
 

Get the AGId of the given id.

Note:
id may be AnnotationId or AnchorId.

AGIds AGAPI::GetAGIds ( in AGSetId agSetId )
 

Get all the Ids of AGs which belong to the specified AGSet.

Parameters:
agSetId   the AGSet
Returns:
AGIds
Note:
AGIds is space separated list of AGId. For example:
     "CALLHOME:19990320 CALLHOME:19990322 CALLHOME:19990323"
 

AGSetId AGAPI::GetAGSetId ( in Id id )
 

Get the AGSetId of the given id.

Note:
id may be AGId, AnnotationId, AnchorId, TimelineId, or SignalId.

Offset AGAPI::GetAnchorOffset ( in AnchorId anchorId )
 

Get the offset of an anchor.

AnchorIds AGAPI::GetAnchorSet ( in AGId agId )
 

Get all the anchors in an AG.

AnchorIds AGAPI::GetAnchorSetByOffset ( in AGId agId,
in Offset offset,
in float epsilon )
 

Get all anchors which are anchored within specified distance of the given offset.

Parameters:
agId   the id of the AG within which to search qualified anchors
offset   the offset
epsilon   the distance
Returns:
all anchors which are in the specified AG and are anchored at the given offset.
Note:
An anchor a is returned if a belongs the AG AND a is anchored AND the offset of a >= offset-epsilon AND the offset of a<= offset+epsilon

AnchorIds AGAPI::GetAnchorSetByOffset ( in AGId agId,
in Offset offset )
 

Get all anchors which are anchored at the given offset.

Parameters:
agId   the id of the AG within which to search qualified anchors
offset   the offset
Returns:
all anchors which are in the specified AG and are anchored at the given offset.
Note:
An anchor a is returned if a belongs the AG AND a is anchored AND the offset of a equals to offset.

AnchorIds AGAPI::GetAnchorSetNearestOffset ( in AGId agId,
in Offset offset )
 

Get all anchors which are anchored at the closest offset to the given offset. This function first finds the existing offset o which is nearest to the given offset, then returns all the anchors that anchor at offset o.

SignalIds AGAPI::GetAnchorSignalIds ( in AnchorId anchorId )
 

Get the signal Ids associated with the given anchor.

boolean AGAPI::GetAnchored ( in AnchorId anchorId )
 

Test if an anchor is anchored (has offset).

sequence< FeatureName > AGAPI::GetAnnotationFeatureNames ( in Id id )
 

Get feature names of all annotations in an AGSet, AG, or Annotation.

string AGAPI::GetAnnotationInfo ( in AnnoationId annotationId )
 

Set the start of an annotation to the specified anchor.

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.

AnnotationIds AGAPI::GetAnnotationSeqByOffset ( in AGId agId,
in Offset begin,
in Offset end )
 

Get annotation sequence by offset, starting from the given offset, and ending at another given offset. Get all the annotations with start anchor offset in between the specified offsets, sort by using start anchor offset as first sorting key and end anchor offset as the second.

AnnotationIds AGAPI::GetAnnotationSeqByOffset ( in AGId agId,
in Offset begin )
 

Get annotation sequence by offset, starting from a given offset. Get all the annotations with start offset are greater than or equal to specified offset, sort by using start anchor offset as first sorting key and end anchor offset as the second.

AnnotationIds AGAPI::GetAnnotationSeqByOffset ( in AGId agId )
 

Get annotation sequence by offset. Get all the annotations sorted by using start anchor offset as first sorting key and end anchor offset as the second.

AnnotationIds AGAPI::GetAnnotationSetByFeature ( in AGId agId,
in FeatureName featureName,
in FeatureValue featureValue )
 

Get all annotations whose specified feature equals to the specified value.

AnnotationIds AGAPI::GetAnnotationSetByOffset ( in AGId agId,
in Offset offset )
 

Get all annotations which hangs over a given offset. Return all annotations whose start offset is smaller than or equal to the given offset AND whose end offset is greater than or equal to the given offset.

AnnotationIds AGAPI::GetAnnotationSetByType ( in AGId agId,
in AnnotationType annotationType )
 

Get all annotations of the given type.

AnnotationType AGAPI::GetAnnotationType ( in AnnoationId annotationId )
 

Get the type of the annotation.

sequence< AnnotationType > AGAPI::GetAnnotationTypes ( in Id id )
 

Get types of all annotations in an AGSet, AG, or Annotation.

AnchorId AGAPI::GetEndAnchor ( in AnnotationId annotationId )
 

Get the end anchor.

Offset AGAPI::GetEndOffset ( in AnnotationId annotationId )
 

Get the offset of the end anchor of an annotation.

string AGAPI::GetFeature ( in Id id,
in FeatureName featureName )
 

Get the value of a feature. This is for both the features of an annotation, and for the metadata associated with AGSets, AGs, Timelines and Signals.

Parameters:
id   the Id of the entity whose feature value will be returned
featureName   the name of the feature
Note:
id can be AGSetId, AGId, TimelineId, SignalId or AnnotationID. If the id is AGSetId, AGId, TimelineId or SignalId, get the value of the feature in its Metadata. If the id is an AnnotationId, get the value the feature in the annotation.

FeatureNames AGAPI::GetFeatureNames ( in Id id )
 

Get all feature names. Get all feature names in a space separated list. This is for both the features of an annotation, and for the metadata associated with AGSets, AGs, Timelines and Signals.

Parameters:
id   the Id of the entity whose feature names will be returned
featureName   the name of the feature
Note:
id can be AGSetId, AGId, TimelineId, SignalId or AnnotationID. If the id is AGSetId, AGId, TimelineId or SignalId, return the feature names in its Metadata. If the id is an AnnotationId, return the feature names in the annotation.

Features AGAPI::GetFeatures ( in Id id )
 

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

Parameters:
id   the Id of the entity whose feature names will be returned
Returns:
feature value string in DCSV format
Note:
id can be AGSetId, AGId, TimelineId, SignalId or AnnotationID. If the id is AGSetId, AGId, TimelineId or SignalId, return the feature names and values in its Metadata. If the id is an AnnotationId, return the feature names and values in the annotation.
DCSV format: To allow the recording of generic Structured Values, we introduce the Dublin Core Structured Values (DCSV) scheme.

We distinguish between two types of substring - labels and values, where a label is the name of the type of a value, and a value is the data itself. Furthermore, we allow a complete value to be disaggregated into set of components, each of which has its own label and value. A value that is comprised of components in this way is called a structured value.

Punctuation characters are used in recording a structured value as follows:

  • equals-signs (=) separate plain-text labels of structured value-components from the values themselves
  • semi-colons (;) separate (optionally labelled) value-components within a list
  • dots (.) indicate hierachical structure in labels, if required.
The labels and the component values themselves each consist of a text-string. The intention is that the label will be a word or code corresponding to the name of the value-component. Labels may be absent, in which case the entire sub-string delimited by semi-colons (;) or the end of the string comprise a component value.

The following patterns show how structured values may be recorded in strings using DCSV:

"u1; u2; u3" "cA=v1" "cA=v1; cB.part1=v2; cB.part2=v3" "cA=v1; u2; u3"

where u1, u2 and u3 are unlabelled components, cA and cB are the labels of Structured Value components, part1 and part2 are sub-components of cB, and v1, v2 and v3 are values of the components.

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

AnnotationIds AGAPI::GetIncomigAnnotationSetByType ( in AnchorId anchorId,
in AnnotationType type )
 

Get the incoming annotations with specified type.

AnnotationIds AGAPI::GetIncomingAnnotationSet ( in AnchorId anchorId )
 

Get the incoming annotations of an anchor.

Unit AGAPI::GetOffsetUnit ( in AnchorId anchorId )
 

Get the unit of the offset of an anchor.

AnnotationIds AGAPI::GetOutfoingAnnotationSet ( in AnchorId anchorId,
in AnnotationType type )
 

Get the outgoing annotations with specified type.

AnnotationIds AGAPI::GetOutgoingAnnotationSet ( in AnchorId anchorId )
 

Get the outgoing annotations of an anchor.

Encoding AGAPI::GetSignalEncoding ( in SignalId signalId )
 

Get the encoding of the specified signal.

MimeClass AGAPI::GetSignalMimeClass ( in SignalId signalId )
 

Get the MimeClass of the specified signal.

MimeType AGAPI::GetSignalMimeType ( in SignalId signalId )
 

Get the MimeType of the specified signal.

Track AGAPI::GetSignalTrack ( in SignalId signalId )
 

Get the track of the specified signal.

string AGAPI::GetSignalUnit ( in SignalId signalId )
 

Get the unit of the specified signal.

string AGAPI::GetSignalXlinkHref ( in SignalId signalId )
 

Get the XlinkHref of the specified signal.

string AGAPI::GetSignalXlinkType ( in SignalId signalId )
 

Get the XlinkType of the specified signal.

SignalIds AGAPI::GetSignals ( in TimelineId timelineId )
 

Get all the Ids of sigals which belong to the specified timeline.

Parameters:
timelineId   the id of the timeline
Returns:
SignalIds
Note:
SignalIds is a space separated list of SignalId. For example:
     "CALLHOME:signal19990320 CALLHOME:signal19990322 CALLHOME:signal19990323"
 

AnchorId AGAPI::GetStartAnchor ( in AnnotationId annotationId )
 

Get the start anchor.

Offset AGAPI::GetStartOffset ( in AnnotationId annotationId )
 

Get the offset of the start anchor of an annotatino.

TimelineId AGAPI::GetTimelineId ( in Id id )
 

Get the TimelineId of the given id.

Note:
id may be AGId or SignalId.

AGIds AGAPI::Load ( in string format,
in string annotationFile,
in string id,
in string signalInfo[10][2],
in string options[10][2] )
 

Load an annotation file.

Parameters:
format   Annotation file format. Possible formats are: AIF, TIMIT, BU, TreeBank, SwitchBoard, BAS, TF, TDF, CSV, LCF, and XLabel.
annotationFile   The name of the annotation file to load.
id   Specifies the ag where the file will be loaded. If this is omitted, arbitrary id will be used.
signalInfo   Feature-value map for signal information.
options   Feature-value map for format specific options.

bool AGAPI::LoadFromDB ( in string connStr,
in AGSetId agsetId )
 

LoadFromDB loads the specified AGSet from the database server.

Parameters:
connStr   the connect string, which specifies the connection string that ODBC uses to connect to the server. It contains information such as hostname, database name, user name, password etc.

The following table shows some of the parameters used in a connect string. For a complete list, see http://www.mysql.com/doc/M/y/MyODBC_connect_parameters.html

ODBC connect string argumentsWhat the argument specifies
DSNRegistered ODBC Data Source Name.
SERVERThe hostname of the database server.
UIDUser name as established on the server.
PWDPassword that corresponds with the logon name.
DATABASEDatabase to connect to. If not given, DSN is used.

DSN is the registered ODBC Data Source Name, it should be defined in the .odbc.ini file in your home directory. All other arguments can be either defined in the .odbc.ini file, or defined in the connect string itself.

To gain access to most ODBC data sources, you must provide a valid user ID and corresponding password. These values are initially registered by the database administrator.

Probably the easiest way is to define every argument in the .odbc.ini file in your home directory. The following is a sample driver section for DSN 'talkbank' in the configuration file for iODBC. To make the explanation easier, line numbers are included. Please notice that UID and PWD become USER and PASSWORD, respectively, in iODBC's configuration file.

 1  [talkbank]
 2  Driver   = /pkg/ldc/lib/libmyodbc.so
 3  DSN      = talkbank
 4  SERVER   = talkbank.ldc.upenn.edu
 5  USER     = myuserid
 6  PASSWORD = mypasswd
 7  DATABASE = talkbank
 

Line 1 is the name of the driver section, which is 'talkbank'. You can have multiple driver sections in one configuration file. Line 2 specifies the ODBC driver to use. Line 3 gives the name of the DSN, which is 'talkbank'. Line 4 specifies the hostname of the machine on which the database server is running. Line 5 is the user name to use to connect to the server. Line 6 is the password associated with the user name. Line 7 is the database to connect to.

If you have all required arguments specified in your .odbc.ini file like the one above, the connect string can simply be:

DSN=talkbank;

If you have not specified some of the arguments, say USER and PASSWORD, in the configuration file, you can still specify them in your connect string:

DSN=talkbank;UID=myuserid;PWD=mypasswd;

AnnotationIds AGAPI::NSplitAnnotation ( in AnnotationId annotationId,
in short N )
 

Split an annotation to n annotations. A version of split which does the split operation n-1 times, i.e. split the original annotation into n annotations.

Parameters:
original, the   annotation to be split.
n   an integer specifying the number of annotations to split into.
Returns:
the set of new annotations, including the original one.
See also:
splitAnnotation

bool AGAPI::SPrecedes ( in AnnotationId annotationId1,
in AnnotationId annotationId2 )
 

Test structural precedence of one annotation over the other.

void AGAPI::SetAnchorOffset ( in AnchorId anchorId,
in Offset offset )
 

Set the offset of an anchor.

void AGAPI::SetAnchorSignalIds ( in AnchorId anchorId,
in SignalIds signalIds )
 

Set the signal Ids associated with the given anchor.

void AGAPI::SetEndAnchor ( in AnnotationId annotationId,
in AnchorId anchorId )
 

Set the end of an annotation to the specified anchor.

void AGAPI::SetEndOffset ( in AnnotationId annotationId,
in Offset offset )
 

Set the offset of the end anchor of an annotation.

void AGAPI::SetFeature ( in Id id,
in FeatureName featureName,
in FeatureValue featureValue )
 

Set the value of a feature. This is for both the features of an annotation, and for the metadata associated with AGSets, AGs, Timelines and Signals.

Parameters:
id   the Id of the entity whose feature will be set
featureName   the name of the feature
featureValue   the value of the feature
Note:
id can be AGSetId, AGId, TimelineId, SignalId or AnnotationID. If the id is AGSetId, AGId, TimelineId or SignalId, the feature in its Metadata will be set. If the id is an AnnotationId, the feature in the annotation will be set.

void AGAPI::SetFeatures ( in Id id,
in 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"

Parameters:
id   the Id of the entity whose feature names will be returned
features   the feature string in DCSV format
Note:
id can be AGSetId, AGId, TimelineId, SignalId or AnnotationID. If the id is AGSetId, AGId, TimelineId or SignalId, set the feature values names in its Metadata. If the id is an AnnotationId, return the feature values names in the annotation.
DCSV format: To allow the recording of generic Structured Values, we introduce the Dublin Core Structured Values (DCSV) scheme.

We distinguish between two types of substring - labels and values, where a label is the name of the type of a value, and a value is the data itself. Furthermore, we allow a complete value to be disaggregated into set of components, each of which has its own label and value. A value that is comprised of components in this way is called a structured value.

Punctuation characters are used in recording a structured value as follows:

  • equals-signs (=) separate plain-text labels of structured value-components from the values themselves
  • semi-colons (;) separate (optionally labelled) value-components within a list
  • dots (.) indicate hierachical structure in labels, if required.
The labels and the component values themselves each consist of a text-string. The intention is that the label will be a word or code corresponding to the name of the value-component. Labels may be absent, in which case the entire sub-string delimited by semi-colons (;) or the end of the string comprise a component value.

The following patterns show how structured values may be recorded in strings using DCSV:

     "u1; u2; u3"
     "cA=v1"
     "cA=v1; cB.part1=v2; cB.part2=v3"
     "cA=v1; u2; u3"
 
where u1, u2 and u3 are unlabelled components, cA and cB are the labels of Structured Value components, part1 and part2 are sub-components of cB, and v1, v2 and v3 are values of the components.

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

void AGAPI::SetOffsetUnit ( in AnchorId anchorId,
in Unit unit )
 

Set the unit of the offset of an anchor.

void AGAPI::SetStartAnchor ( in AnnotationId annotationId,
in AnchorId anchorId )
 

void AGAPI::SetStartOffset ( in AnnotationId annotationId,
in Offset offset )
 

Set the offset of the start anchor of an annotation.

AnchorId AGAPI::SplitAnchor ( in AnchorId anchorId )
 

Split an anchor in two. Split an anchor a in two, creating a new anchor a' having the same offset as the original one. Anchor a has all the incoming annotations, while anchor a' has all the outgoing annotations.

Returns:
the id of the new anchor a'.

AnnotationIds AGAPI::SplitAnnotation ( in AnnotationId annotationId )
 

Split an annotation a in two. Split an annotation a in two, creating a new annotation a' having the same label data as the original one. The two annotations a, a' connect head-to-tail at a new anchor. The new annotation and anchor have identifiers assign from the specified identifier spaces. The new anchor is unanchored, i.e. has no offset.

Parameters:
original, the   annotation to be split.
Returns:
the AnnotationIds of the a and a'.

void AGAPI::Store ( in string format,
in string filename,
in string agIds,
in string options[10][2] )
 

Store annotation graphs in native format.

Parameters:
format   Annotation file format. Possible formats are: TreeBank, SwitchBoard, TF, TDF, CSV, LCF. Storing in AIF format is supported by toXML() function.
filename   The name of the file to be stored.
agIds   Space separated string of ag ids.
options   Feature-value map for format specific options.

bool AGAPI::StoreToDB ( in string connStr in AGSetId agsetId )
 

StoreToDB stores the specified AGSet to the database server.

Parameters:
connStr   the connect string, which specifies the connection string that ODBC uses to connect to the server. It contains information such as hostname, database name, user name, password etc.

The following table shows some of the parameters used in a connect string. For a complete list, see http://www.mysql.com/doc/M/y/MyODBC_connect_parameters.html

ODBC connect string argumentsWhat the argument specifies
DSNRegistered ODBC Data Source Name.
SERVERThe hostname of the database server.
UIDUser name as established on the server.
PWDPassword that corresponds with the logon name.
DATABASEDatabase to connect to. If not given, DSN is used.

DSN is the registered ODBC Data Source Name, it should be defined in the .odbc.ini file in your home directory. All other arguments can be either defined in the .odbc.ini file, or defined in the connect string itself.

To gain access to most ODBC data sources, you must provide a valid user ID and corresponding password. These values are initially registered by the database administrator.

Probably the easiest way is to define every argument in the .odbc.ini file in your home directory. The following is a sample driver section for DSN 'talkbank' in the configuration file for iODBC. To make the explanation easier, line numbers are included. Please notice that UID and PWD become USER and PASSWORD, respectively, in iODBC's configuration file.

 1  [talkbank]
 2  Driver   = /pkg/ldc/lib/libmyodbc.so
 3  DSN      = talkbank
 4  SERVER   = talkbank.ldc.upenn.edu
 5  USER     = myuserid
 6  PASSWORD = mypasswd
 7  DATABASE = talkbank
 

Line 1 is the name of the driver section, which is 'talkbank'. You can have multiple driver sections in one configuration file. Line 2 specifies the ODBC driver to use. Line 3 gives the name of the DSN, which is 'talkbank'. Line 4 specifies the hostname of the machine on which the database server is running. Line 5 is the user name to use to connect to the server. Line 6 is the password associated with the user name. Line 7 is the database to connect to.

If you have all required arguments specified in your .odbc.ini file like the one above, the connect string can simply be:

DSN=talkbank;

If you have not specified some of the arguments, say USER and PASSWORD, in the configuration file, you can still specify them in your connect string:

DSN=talkbank;UID=myuserid;PWD=mypasswd;

void AGAPI::UnsetAnchorOffset ( in AnchorId anchorId )
 

Unset the offset of an anchor. The anchor becomes unanchored after being unset.

void AGAPI::UnsetFeature ( in Id id,
in FeatureName featureName )
 

Unset a feature. Set the feature to empty. This is for both the features of an annotation, and for the metadata associated with AGSets, AGs, Timelines and Signals.

Parameters:
id   the Id of the entity whose feature will be unset
featureName   the name of the feature
Note:
id can be AGSetId, AGId, TimelineId, SignalId or AnnotationID. If the id is AGSetId, AGId, TimelineId or SignalId, unset the feature in its Metadata. If the id is an AnnotationId, unset the feature in the annotation.

void AGAPI::UnsetFeatures ( in Id id )
 

Unset all features Set all features to empty. This is for both the features of an annotation, and for the metadata associated with AGSets, AGs, Timelines and Signals.

Parameters:
id   the Id of the entity whose feature will be unset
featureName   the name of the feature
Note:
id can be AGSetId, AGId, TimelineId, SignalId or AnnotationID. If the id is AGSetId, AGId, TimelineId or SignalId, unset all features in its Metadata. If the id is an AnnotationId, unset all features in the annotation.

string AGAPI::toXML ( in AGId agId )
 

Dump the specified AG in ATLAS Level 0 forma.

string AGAPI::toXML ( in AGSetId id )
 

Dump the specified AGSet in ATLAS Level 0 format.


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