|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Tracks contain track elements, the basic units of annotation. Tracks cannot contain other tracks (use group nodes for that).
Method Summary | |
boolean |
addElement(anvil.annot.AnnotationElement el)
Adds element to track. |
void |
addObserver(java.util.Observer obs)
Observer is notified of each track change. |
void |
elementChanged()
Called by track elements when they change. |
java.util.List |
findContainedElements(javax.media.Time start,
javax.media.Time end)
Finds all elements contained in the given time span. |
anvil.annot.TrackElement |
findElement(javax.media.Time time)
Finds element that contains the given time point. |
anvil.annot.TrackElement |
findElement(anvil.annot.TimeInterval itv)
Finds element that contains the given time interval. |
anvil.annot.TrackElement |
findNextAfter(javax.media.Time time)
Finds element that either contains the given time or is the next after it. |
anvil.annot.TrackElement |
findNextBefore(javax.media.Time time)
Finds element that either contains the given time or is the next after it. |
java.util.List |
findTrackAncestry()
Returns list of tracks that this track depends on. |
anvil.annot.TrackElement |
firstElement()
Returns first element or null. |
anvil.annot.Annotation |
getAnnotation()
Returns annotation object that contains this track. |
java.util.List |
getAttributeNames()
Returns ordered list of all attribute names. |
anvil.annot.valuetype.ValueType |
getAttributeType(java.lang.String attrName)
Returns the value type of an attribute or null. |
java.util.SortedSet |
getElements()
Returns all elements in temporal order. |
javax.media.Time |
getMaxEndTime()
Returns end time of the last element in the track. |
int |
getNumOfElements()
Returns total number of elements. |
anvil.annot.ContainerSpec |
getSpec()
Returns specification object for this track. |
java.lang.String |
getTypeName()
Returns type of track as a lower-case String (primary, singleton, span). |
boolean |
isEmpty()
Returns whether track is empty, i.e. contains no elements. |
anvil.annot.TrackElement |
lastElement()
Returns last element or null. |
anvil.annot.TrackElement |
nextElement(anvil.annot.TrackElement el)
Returns next element after el in this track or null. |
anvil.annot.TrackElement |
previousElement(anvil.annot.TrackElement el)
Returns previous element before el in this track or null. |
void |
print()
Prints contents of the track to standard output. |
boolean |
removeElement(anvil.annot.AnnotationElement el)
Removes track element plus every element that directly or indirectly points to it (dependent elements), also taking care of pointers in attributes (inlinks and outlinks). |
int |
replaceAttributeValue(java.lang.String attr,
java.lang.String oldValue,
java.lang.String newValue)
In all elements of this track, replaces values of attribute attr that match oldValue with
newValue . |
Methods inherited from interface anvil.annot.AnnotationNode |
getFirstHidden, getName, getParent, getShortName, isOpen, isVisible, setOpen, setVisible |
Method Detail |
public void addObserver(java.util.Observer obs)
public boolean addElement(anvil.annot.AnnotationElement el)
public anvil.annot.TrackElement findNextAfter(javax.media.Time time)
public anvil.annot.TrackElement findNextBefore(javax.media.Time time)
public java.util.List findTrackAncestry()
public anvil.annot.TrackElement firstElement()
public anvil.annot.Annotation getAnnotation()
public java.util.List getAttributeNames()
public anvil.annot.valuetype.ValueType getAttributeType(java.lang.String attrName) throws anvil.annot.NoSuchAttributeException
attrName
- name of the attribute
anvil.annot.NoSuchAttributeException
- thrown when no
such attribute existspublic java.util.SortedSet getElements()
public int getNumOfElements()
public java.util.List findContainedElements(javax.media.Time start, javax.media.Time end)
public anvil.annot.TrackElement findElement(javax.media.Time time)
public anvil.annot.TrackElement findElement(anvil.annot.TimeInterval itv)
public javax.media.Time getMaxEndTime()
public anvil.annot.ContainerSpec getSpec()
public java.lang.String getTypeName()
public boolean isEmpty()
public anvil.annot.TrackElement lastElement()
public anvil.annot.TrackElement nextElement(anvil.annot.TrackElement el)
el
in this track or null.
public anvil.annot.TrackElement previousElement(anvil.annot.TrackElement el)
el
in this track or null.
public void print()
public boolean removeElement(anvil.annot.AnnotationElement el)
el
- element to be removed
public int replaceAttributeValue(java.lang.String attr, java.lang.String oldValue, java.lang.String newValue) throws anvil.annot.NoSuchAttributeException, anvil.annot.WrongValueTypeException
attr
that match oldValue
with
newValue
.
anvil.annot.NoSuchAttributeException
anvil.annot.WrongValueTypeException
public void elementChanged()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |