|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.util.Observable | +--anvil.annot.AnvilAnnotation
This class stores the annotation of one video file.
Field Summary | |
java.lang.String |
DEFAULT_NAME
|
static java.lang.String |
PRIMARY_TRACK
Full class name |
static java.lang.String |
RST_TRACK_NAME
Standard name of the rhetorical structure track. |
static java.lang.String |
SECONDARY_TRACK
Full class name |
static java.lang.String |
SINGLETON_TRACK
Full class name |
static java.lang.String |
SPAN_TRACK
Full class name |
static java.lang.String |
SPEECH_ANALYSIS_TRACK
Full class name |
static java.lang.String |
TRL_TRACK_NAME
Standard name of the transliteration track. |
static java.lang.String |
WAVEFORM_TRACK
Full class name |
java.lang.String |
XML_BREATH
|
java.lang.String |
XML_LONGBREATH
|
java.lang.String |
XML_LONGPAUSE
|
java.lang.String |
XML_PAUSE
|
Constructor Summary | |
AnvilAnnotation(AnnotationSpec s)
Constructor for annotation object. |
|
AnvilAnnotation(AnnotationSpec s,
AnnotationProperties props)
|
Method Summary | |
boolean |
addBookmark(Bookmark bm)
|
void |
addVideoPath(java.lang.String path)
|
void |
clearBookmarks()
Clears list of bookmarks. |
AnnotationContainer |
clearContainer(java.lang.String name)
Clears track of all elements. |
void |
clearIntensityData()
|
void |
clearPitchData()
|
void |
clearVideoPaths()
|
void |
createManual(java.io.File dir)
Creates HTML documentation in form of an annotation manual from the loaded specification. |
protected void |
finalize()
Called by garbage collector. |
Bookmark |
findBookmark(java.lang.String name)
|
java.lang.String[] |
findContainerNames()
Returns all container names in a String array. |
java.lang.String[] |
findNodeNames(java.lang.String classname)
Finds all annotation nodes (group or track) of the given class. |
java.util.List |
findNodes(java.lang.String classname)
Finds nodes by class name. |
java.util.List |
findNonPrimaryTracks()
|
java.lang.String[] |
findNonStaticTrackNames()
Returns names of all non static tracks in a String array. |
java.lang.String[] |
findTrackNames()
Returns all track names in a String array. |
java.lang.String[] |
findTrackNames(java.lang.String classname)
Finds all (non-static) tracks of the given class. |
java.util.List |
findTracks(java.lang.String classname)
Finds tracks by class name. |
AnnotationNode |
getAnnotationNode(java.lang.String name)
Returns annotation node with name if it exists, null
otherwise. |
java.util.List |
getBookmarks()
|
AnnotationContainer |
getContainer(java.lang.String name)
Returns container with name |
java.io.File |
getFullPath(java.lang.String file)
If given path is not absolute, returns absolute path by gluing the given path to the path of the annotation. |
GroupNode |
getGroup(java.lang.String name)
Returns group with name |
java.util.List |
getGroups()
Returns a list of all group nodes. |
java.io.File |
getIntensityFile()
|
java.lang.String |
getIntensityTrack()
|
javax.media.Time |
getMaxEndTime()
Computes maximum end time across all tracks. |
java.util.List |
getMissing()
Returns list of missing files (pitch or intensity) after loading. |
java.lang.String |
getName()
Returns file name (without full path) or DEFAULT_NAME if no path is specified yet. |
java.util.AbstractList |
getNodes()
Returns list of all annotation nodes. |
java.io.File |
getPath()
|
java.io.File |
getPitchFile()
Returns path where this annotation is saved or null if annotation has never been saved. |
java.lang.String |
getPitchTrack()
|
AnnotationProperties |
getProperties()
|
GroupNode |
getRoot()
Returns the group node that lies at the top of the track/group hierarchy. |
anvil.annot.meta.SessionData |
getSessionData()
Returns session meta-data. |
AnnotationSet |
getSet(java.lang.String name)
Returns set with name |
java.util.List |
getSets()
Returns a list of all annotation sets. |
AnnotationSpec |
getSpec()
Returns annotation specification object. |
Track |
getTrack(java.lang.String name)
Returns track with name |
java.util.List |
getTracks()
Returns a list of all (non-static) tracks. |
java.util.List |
getVideoPaths()
Returns a list of strings which are the video file names. |
boolean |
hasWaveform()
Returns whether the annotation contains a waveform. |
void |
importTextgridFile(java.io.File file,
java.lang.String trackname)
Reads short textgrid file (*.TextGrid) as produced by "Praat", expecting one interval tier called "words". |
boolean |
isModified()
Returns whether the annotation has been modified since the last save. |
AnnotationNode |
makeTrack(GroupNode parent,
ContainerSpec tspec)
Creates and adds track according to the given specification. |
void |
print()
Prints contents of all groups and tracks to standard output. |
boolean |
removeGroup(java.lang.String name)
Removes group and returns true if group was found at all. |
boolean |
removeGroupOrTrack(java.lang.String name)
Tries to remove track named name , then a
group. |
boolean |
removeTrack(java.lang.String name)
Removes track and returns true if removal was successful |
void |
setBookmarks(java.util.List bookmarks)
|
void |
setIntensityData(java.io.File file,
java.lang.String track)
|
void |
setMissing(java.util.List ls)
|
void |
setModified(boolean mod)
Sets the modified flag. |
void |
setPath(java.io.File file)
|
void |
setPitchData(java.io.File file,
java.lang.String track)
|
void |
setProperties(AnnotationProperties p)
|
void |
setSessionData(anvil.annot.meta.SessionData dat)
Sets session meta-data. |
boolean |
setTagPause(boolean val)
If this is set to true, anvil will insert pause markers into the "trl" track when writing an anvil file, according to the time interval between two elements (words). |
void |
setVideoPaths(java.util.List paths)
|
java.lang.String |
toString()
|
void |
trackChanged()
Called by track when elements have been added, deleted etc. |
int |
updateReciprocalLinks()
Steps through all elements with ReciprocalLink type attributes and checks if the linked up elements have a backpointer. |
void |
writeAnvilFile()
Writes annotation to current file path in Anvil's XML format. |
void |
writeAnvilFile(java.io.File file)
Writes annotation data to specified file. |
void |
writeTrackToTxtFile(Track track,
java.io.File file)
Writes contents of track to an ASCII file. |
Methods inherited from class java.util.Observable |
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface anvil.annot.Annotation |
addObserver |
Field Detail |
public static final java.lang.String TRL_TRACK_NAME
public static final java.lang.String RST_TRACK_NAME
public static final java.lang.String PRIMARY_TRACK
public static final java.lang.String SECONDARY_TRACK
public static final java.lang.String SINGLETON_TRACK
public static final java.lang.String SPAN_TRACK
public static final java.lang.String WAVEFORM_TRACK
public static final java.lang.String SPEECH_ANALYSIS_TRACK
public final java.lang.String XML_BREATH
public final java.lang.String XML_LONGBREATH
public final java.lang.String XML_PAUSE
public final java.lang.String XML_LONGPAUSE
public final java.lang.String DEFAULT_NAME
Constructor Detail |
public AnvilAnnotation(AnnotationSpec s) throws BuildAnnTreeException
s
- annotation specification objectpublic AnvilAnnotation(AnnotationSpec s, AnnotationProperties props) throws BuildAnnTreeException
Method Detail |
public java.io.File getPitchFile()
Annotation
getPitchFile
in interface Annotation
public java.lang.String getPitchTrack()
getPitchTrack
in interface Annotation
public void setPitchData(java.io.File file, java.lang.String track)
setPitchData
in interface Annotation
public void clearPitchData()
public java.io.File getIntensityFile()
public java.lang.String getIntensityTrack()
public void setIntensityData(java.io.File file, java.lang.String track)
public void clearIntensityData()
public anvil.annot.meta.SessionData getSessionData()
Annotation
getSessionData
in interface Annotation
protected void finalize()
finalize
in class java.lang.Object
public void setMissing(java.util.List ls)
public java.util.List getMissing()
public int updateReciprocalLinks()
public java.io.File getFullPath(java.lang.String file)
public boolean hasWaveform()
hasWaveform
in interface Annotation
public void addVideoPath(java.lang.String path)
public void clearVideoPaths()
public void setVideoPaths(java.util.List paths)
public java.util.List getVideoPaths()
public boolean isModified()
Annotation
isModified
in interface Annotation
public void setModified(boolean mod)
Annotation
setModified
in interface Annotation
public boolean addBookmark(Bookmark bm)
public void clearBookmarks()
public void setBookmarks(java.util.List bookmarks)
public java.util.List getBookmarks()
getBookmarks
in interface Annotation
public Bookmark findBookmark(java.lang.String name)
public java.lang.String getName()
public AnnotationProperties getProperties()
getProperties
in interface Annotation
public void setProperties(AnnotationProperties p)
setProperties
in interface Annotation
public AnnotationSpec getSpec()
Annotation
getSpec
in interface Annotation
public java.util.List getTracks()
getTracks
in interface Annotation
public java.util.List getSets()
public java.util.List getGroups()
getGroups
in interface Annotation
public java.util.AbstractList getNodes()
getNodes
in interface Annotation
public Track getTrack(java.lang.String name)
getTrack
in interface Annotation
public AnnotationContainer getContainer(java.lang.String name)
public AnnotationNode getAnnotationNode(java.lang.String name)
Annotation
name
if it exists, null
otherwise.
getAnnotationNode
in interface Annotation
name
- full path name of desired nodepublic GroupNode getGroup(java.lang.String name)
getGroup
in interface Annotation
public AnnotationSet getSet(java.lang.String name)
public GroupNode getRoot()
Annotation
getRoot
in interface Annotation
public java.io.File getPath()
getPath
in interface Annotation
public void setPath(java.io.File file)
public javax.media.Time getMaxEndTime()
public AnnotationContainer clearContainer(java.lang.String name)
public boolean removeGroupOrTrack(java.lang.String name)
name
, then a
group. Returns whether this was successful or not.
public boolean removeTrack(java.lang.String name)
public boolean removeGroup(java.lang.String name)
public java.util.List findTracks(java.lang.String classname)
classname
- class: PRIMARY_TRACK, SPAN_TRACK or SINGLETON_TRACK
public java.lang.String[] findTrackNames(java.lang.String classname)
classname
- use static Annotation variables PRIMARY_TRACK,
SPAN_TRACK, SINGLETON_TRACK, WAVEFORM_TRACK, PITCH_TRACK etc.
public java.util.List findNodes(java.lang.String classname)
classname
- class: PRIMARY_TRACK, SPAN_TRACK or SINGLETON_TRACK
public java.lang.String[] findNodeNames(java.lang.String classname)
classname
- use static Annotation variables PRIMARY_TRACK,
SPAN_TRACK, SINGLETON_TRACK, WAVEFORM_TRACK, PITCH_TRACK etc.
public java.lang.String[] findNonStaticTrackNames()
public java.lang.String[] findTrackNames()
public java.lang.String[] findContainerNames()
public void trackChanged()
public java.util.List findNonPrimaryTracks()
public AnnotationNode makeTrack(GroupNode parent, ContainerSpec tspec)
makeTrack
in interface Annotation
tspec
- track specification object
public boolean setTagPause(boolean val)
public void writeTrackToTxtFile(Track track, java.io.File file) throws java.lang.Exception
file
- File to write data on.
java.lang.Exception
public void createManual(java.io.File dir) throws java.io.IOException
dir
- directory where to write HTML files.
java.io.IOException
public void writeAnvilFile(java.io.File file) throws java.lang.Exception
java.lang.Exception
public void writeAnvilFile() throws AnnotationException, java.io.IOException
Annotation
modified
flag. The user has to see to that.
writeAnvilFile
in interface Annotation
AnnotationException
java.io.IOException
public void importTextgridFile(java.io.File file, java.lang.String trackname) throws java.lang.Exception
java.lang.Exception
public void print()
Annotation
print
in interface Annotation
public java.lang.String toString()
toString
in class java.lang.Object
public void setSessionData(anvil.annot.meta.SessionData dat)
Annotation
setSessionData
in interface Annotation
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |