|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.util.AbstractCollection<E>
java.util.AbstractSet<E>
java.util.TreeSet
ag.AG
public class AG
| Field Summary | |
|---|---|
static java.lang.String |
ANCHOR_ID_NAME
|
static java.lang.String |
ANNOTATION_ID_NAME
|
| Constructor Summary | |
|---|---|
AG(org.w3c.dom.Element element)
|
|
| Method Summary | |
|---|---|
void |
addAnchor(Anchor a)
Adds an anchor to this AG. |
void |
addAnnotation(Annotation a)
Adds a new annotation to this AG. |
int |
compareTo(java.lang.Object that)
|
java.lang.String |
copyAnchor(Anchor anchor)
Creates a new anchor with new id but same values as specified argument, anchor. |
java.lang.String |
createAnchor(java.lang.String id,
float offset,
java.lang.String unit,
java.lang.String signals)
Creates an anchor with specified offset, unit and signals. |
java.lang.String |
createAnchor(java.lang.String id,
java.lang.String unit,
java.lang.String signals)
Creates an anchor with specified unit and signals. |
java.lang.String |
createAnnotation(java.lang.String id,
Anchor anchor1,
Anchor anchor2,
java.lang.String annotationType)
Creates a new annotation and adds it to the AG. |
void |
deleteAnchor(Anchor a)
Deletes an anchor from this AG. |
void |
deleteAnnotation(Annotation a)
Delete the annotation from the AG. |
void |
deleteFeature(java.lang.String id,
java.lang.String featureName)
Delete the specified feature from the metadata or annotation. |
boolean |
existsFeature(java.lang.String id,
java.lang.String featureName)
Test if a feature exists in the metadata or annotation. |
Anchor |
getAnchorById(java.lang.String id)
Gets an anchor by its id. |
java.util.HashSet |
getAnchorSetByOffset(float offset,
float epsilon)
Gets a set containing those anchors with offset between offset +/- epsilon. |
java.util.Set |
getAnchorSetNearestOffset(float offset)
Gets a set containing those anchors with offset nearest to a specified offset. |
java.util.Set |
getAnnotationSeqByOffset(float begin,
float end)
Gets all annotations with its start anchor offset in between the specified values. |
java.lang.String |
getFeature(java.lang.String id,
java.lang.String featureName)
Get the value of the specified feature in the metadata or annotation. |
java.util.Set |
getFeatureNames(java.lang.String id)
Gets all feature names from the metadata or annotation. |
java.util.Set |
getFeatures(java.lang.String id)
Gets all the feature values in the specified metadata or annotation. |
Timeline |
getTimeline()
Gets the Timeline of the AG. |
java.lang.String |
getType()
Gets the type of this AG. |
java.util.HashSet |
nSplitAnnotation(Annotation a,
int n)
Split an annotation n times. |
void |
printAnnotationSetInfo()
|
void |
setAnchorOffset(Anchor a,
float o)
Sets the specified anchor's offset to the specified offset. |
void |
setEndAnchor(Annotation annotation,
Anchor anchor)
Assigns the annotation a new end anchor. |
void |
setEndOffset(Annotation ann,
float offset)
Sets the specified annotation's end anchor's offset to the specified offset. |
void |
setFeature(Annotation a,
java.lang.String featureName,
java.lang.String featureValue)
Set a feature of an annotation to the specified value, updating the index. |
void |
setFeature(java.lang.String id,
java.lang.String featureName,
java.lang.String featureValue)
Set feature value of the metadata or annotation. |
void |
setFeatures(java.lang.String id,
java.lang.String features)
Set multiple features in a single string. |
void |
setStartAnchor(Annotation annotation,
Anchor anchor)
Assigns the annotation a new start anchor. |
void |
setStartOffset(Annotation ann,
float offset)
Sets the specified annotation's start anchor's offset to the specified offset. |
void |
setType(java.lang.String type)
Sets the type of the AG. |
Annotation |
splitAnnotation(Annotation a1)
Split an annotation a in two. |
java.util.Vector |
storeSQLs(java.lang.String agSetId,
java.util.Set featureNames)
|
java.lang.String |
toString()
Creates a string representation of this AG. |
void |
unsetFeatures(java.lang.String id)
Unsets all features in the metadata or annotation. |
| Methods inherited from class java.util.TreeSet |
|---|
add, addAll, clear, clone, comparator, contains, first, headSet, isEmpty, iterator, last, remove, size, subSet, tailSet |
| Methods inherited from class java.util.AbstractSet |
|---|
equals, hashCode, removeAll |
| Methods inherited from class java.util.AbstractCollection |
|---|
containsAll, retainAll, toArray, toArray |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.Set |
|---|
containsAll, equals, hashCode, removeAll, retainAll, toArray, toArray |
| Field Detail |
|---|
public static final java.lang.String ANCHOR_ID_NAME
public static final java.lang.String ANNOTATION_ID_NAME
| Constructor Detail |
|---|
public AG(org.w3c.dom.Element element) throws AGException
AGException| Method Detail |
|---|
public void setType(java.lang.String type)
type, - the new type for this AG.public java.lang.String getType()
public Timeline getTimeline()
public java.lang.String createAnchor(java.lang.String id,
float offset,
java.lang.String unit,
java.lang.String signals)
throws AGException
id, - might be AGId or AnchorId.
AGException - IF (the id given is invalid)
public java.lang.String createAnchor(java.lang.String id,
java.lang.String unit,
java.lang.String signals)
throws AGException
id - might be AGId or AnchorId.
AGException - IF (the id given is invalid)
public java.lang.String copyAnchor(Anchor anchor)
throws AGException
anchor, - the anchor to be copied.
AGException, - if the anchor does not exist in this AG.
AGExceptionpublic void addAnchor(Anchor a)
a, - the anchor to be added.AnnotationIndex.addAnchor.
public void deleteAnchor(Anchor a)
throws AGException
a, - the anchor to be deleted.
AGException - if the anchor does not exist in this AG.AnnotationIndex.deleteAnchor.
public void setAnchorOffset(Anchor a,
float o)
throws AGException
a, - the specified anchor.o, - the new offset for the specified anchor.
AGException, - if the anchor does not exist in the AG.
AGExceptionAnnotationIndex.changeOffsetMaps.
public java.lang.String createAnnotation(java.lang.String id,
Anchor anchor1,
Anchor anchor2,
java.lang.String annotationType)
throws AGException
id, - might be AGId or AnnotationId.anchor1, - the start anchor of this annotation.anchor2, - the end anchor of this annotation.annotationType, - the type of this annotation.
AGException - IF (the id given is invalid)public void addAnnotation(Annotation a)
a, - the annotation to be added.
public Annotation splitAnnotation(Annotation a1)
throws AGException
a1, - the annotation to be split.
AGException
public java.util.HashSet nSplitAnnotation(Annotation a,
int n)
throws AGException
annotationId, - the annotation to be split n times.n, - the number of times original annotation will be split.
AGExceptionsplitAnnotation
public void deleteAnnotation(Annotation a)
throws AGException
a, - the annotation to be deleted.
AGException - if the annotation does not exist in this AG.
public void setStartAnchor(Annotation annotation,
Anchor anchor)
throws AGException
annotation, - the annotation being assigned a new start anchor.anchor, - the new start anchor for the specified annotation.
AGException, - if the annotation or anchor does not exist in this AG.
AGException
public void setEndAnchor(Annotation annotation,
Anchor anchor)
throws AGException
annotation, - the annotation being assigned a new end anchor.anchor, - the new end anchor for the specified annotation.
AGException, - if the annotation or anchor does not exist in this AG.
AGException
public void setStartOffset(Annotation ann,
float offset)
throws AGException
ann, - the specified annotation.offset, - the new offset for the start anchor of ann.
AGException - if the annotation doesn't exist in the AG.
public void setEndOffset(Annotation ann,
float offset)
throws AGException
ann, - the specified annotation.offset, - the new offset for the end anchor of ann.
AGException - if the annotation doesn't exist in the AG.setAnchorOffset.public void printAnnotationSetInfo()
public void setFeature(java.lang.String id,
java.lang.String featureName,
java.lang.String featureValue)
throws AGException
id - could be AGId or AnnotationId.featureName, - the name of the feature.featureValue, - the value of the feature.
AGException - if the id does not refer to an object in this AG.
public boolean existsFeature(java.lang.String id,
java.lang.String featureName)
throws AGException
id, - could be AGId or AnnotationId.featureName, - the name of the feature.
AGException
public void deleteFeature(java.lang.String id,
java.lang.String featureName)
throws AGException
id - could be AGId or AnnotationId.featureName, - the name of the feature.
AGExceptionAnnotationIndex.deleteFeauture.
public java.lang.String getFeature(java.lang.String id,
java.lang.String featureName)
throws AGException
id - could be AGId or AnnotationId.
AGException - if either the id is invalid or the object
does not contain the feature.
public java.util.Set getFeatureNames(java.lang.String id)
throws AGException
id - could be AGId or AnnotationId.
AGException, - if the id does not refer to an object in this AG.
AGException
public void setFeatures(java.lang.String id,
java.lang.String features)
throws AGException
id, - either an annotationid or agid.features, - the features to be added.
AGException
public java.util.Set getFeatures(java.lang.String id)
throws AGException
id, - could be the id of an annotation or metadata.
AGException - if the id does not refer to an object in this AGSet.
public void unsetFeatures(java.lang.String id)
throws AGException
id - could be AGId or AnnotationId.
AGExceptionMetadata.unsetFeatures.,
Annotation.unsetFeatures.
public void setFeature(Annotation a,
java.lang.String featureName,
java.lang.String featureValue)
throws AGException
a, - the annotation being assigned a new feature.featureName, - the name of the new feature.featureValue, - the value of the new feature.
AGException - if the annotation does not exist in this AG.
public java.util.HashSet getAnchorSetByOffset(float offset,
float epsilon)
throws AGException
offset, - the center offset.epsilon, - the range.
AGException
public Anchor getAnchorById(java.lang.String id)
throws AGException
id, - the id of the anchor to be accessed.
AGException, - if no anchor exists in anchor set with the id.
AGException
public java.util.Set getAnchorSetNearestOffset(float offset)
throws AGException
offset, - the center offset.
AGException
public java.util.Set getAnnotationSeqByOffset(float begin,
float end)
begin, - the lower bound.end, - the upper bound.
public java.util.Vector storeSQLs(java.lang.String agSetId,
java.util.Set featureNames)
throws AGException
AGExceptionpublic java.lang.String toString()
toString in class java.util.AbstractCollectionpublic int compareTo(java.lang.Object that)
compareTo in interface java.lang.Comparable
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||