net.sourceforge.nite.gui.transcriptionviewer
Class DefaultTransToAnnoMap

java.lang.Object
  extended by net.sourceforge.nite.gui.transcriptionviewer.DefaultTransToAnnoMap
All Implemented Interfaces:
TransToAnnoMap

public class DefaultTransToAnnoMap
extends java.lang.Object
implements TransToAnnoMap

The default implementation of TransToAnnoMap depends on a straightforward parent-child relation between annotation elements and transcription text. For most applications this is sufficient.

A DefaultTransAnnoMap must be initialized with a NTranscriptionView. The selectableAnnotationTypes of that NTranscriptionView determines which parents of a transcription element are actually returned by a call to getAnnotationElementsForTransElement.

Author:
Dennis Reidsma See also @link TransToAnnoMap

Constructor Summary
DefaultTransToAnnoMap(NTranscriptionView ntv)
           
 
Method Summary
 java.util.Set getAnnotationElementsForTransElement(NOMElement nme)
          Returns all annotation elements that are a ancestor of the given transcription NOMElement.
 java.util.Set getTransElementsForAnnotationElement(NOMElement nme)
          Returns all transcription elements that are a descendant of the given NOMElement.
 void init(NTranscriptionView ntv)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultTransToAnnoMap

public DefaultTransToAnnoMap(NTranscriptionView ntv)
Method Detail

getTransElementsForAnnotationElement

public java.util.Set getTransElementsForAnnotationElement(NOMElement nme)
Returns all transcription elements that are a descendant of the given NOMElement.

NB: Only those elements are returned that are actually displayed in the NTranscriptionView (useful e.g. if you display only speech for one participant...)

Specified by:
getTransElementsForAnnotationElement in interface TransToAnnoMap

getAnnotationElementsForTransElement

public java.util.Set getAnnotationElementsForTransElement(NOMElement nme)
Returns all annotation elements that are a ancestor of the given transcription NOMElement.

Specified by:
getAnnotationElementsForTransElement in interface TransToAnnoMap

init

public void init(NTranscriptionView ntv)