de.dfki.lt.hog
Class AnnotationCollection

java.lang.Object
  extended by de.dfki.lt.hog.AnnotationCollection

public class AnnotationCollection
extends java.lang.Object

An AnnotationCollection comprises all Annotation objects created during a session.


Constructor Summary
AnnotationCollection(java.lang.String sessId)
          Creates a new AnnotationCollection.
AnnotationCollection(java.lang.String sessId, Annotation initialAnnotation)
          Creates a new AnnotationCollection with an initial Annotation object.
 
Method Summary
 java.lang.String createAnnotation(java.lang.String annString, java.lang.String annLanguage, java.lang.String anId)
          Creates an Annotation object for this AnnotationCollection.
 java.lang.String getAnnCollSessionId()
          Returns identification of the Session to which this AnnotationCollection belongs to.
 Annotation getAnnotation(java.lang.String annId)
          Returns an Annotation object specified by a given identification.
 java.lang.String getAnnotationCollectionId()
          Returns the identification for this AnnotationCollection.
 java.util.Hashtable getAnnotations()
          Returns all Annotation objects as a Hashtable.
 void removeAll()
          Removes all Annotation objects from the hashtable.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnnotationCollection

public AnnotationCollection(java.lang.String sessId)
Creates a new AnnotationCollection. It is initialized with an empty Hashtable of Annotation objects and an identification.


AnnotationCollection

public AnnotationCollection(java.lang.String sessId,
                            Annotation initialAnnotation)
Creates a new AnnotationCollection with an initial Annotation object. This is helpful when a new Annotation is added to session while no AnnotationCollection exists.

Parameters:
initialAnnotation - an initial Annotation object
Method Detail

getAnnotations

public java.util.Hashtable getAnnotations()
Returns all Annotation objects as a Hashtable.

Returns:
Annotation objects as Hashtable

getAnnCollSessionId

public java.lang.String getAnnCollSessionId()
Returns identification of the Session to which this AnnotationCollection belongs to.

Returns:
identification of Session

getAnnotationCollectionId

public java.lang.String getAnnotationCollectionId()
Returns the identification for this AnnotationCollection.

Returns:
identification

createAnnotation

public java.lang.String createAnnotation(java.lang.String annString,
                                         java.lang.String annLanguage,
                                         java.lang.String anId)
Creates an Annotation object for this AnnotationCollection.

Parameters:
annString - annotation string
annLanguage - language of given annotation
Returns:
identification

getAnnotation

public Annotation getAnnotation(java.lang.String annId)
Returns an Annotation object specified by a given identification.

Parameters:
annId - identification of Annotation to return
Returns:
corresponding Annotation

removeAll

public void removeAll()
Removes all Annotation objects from the hashtable.