Interface AnnotationsI

All Superinterfaces:
Serializable

public interface AnnotationsI extends Serializable
A collection that contains Annotation objects, with no duplicates. null elements are not permitted. See Annotation.equals(Object) for the definition of Annotation equality.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    add(Annotation _annotation)
    Adds the given annotation to the annotations data.
    void
    Removes all annotations.
    boolean
    contains(Annotation _annotation)
    Returns true if an annotation equal to the given annotation is present in the annotations data (see Annotation.equals(Object) for the definition of annotation equality).
    Returns all annotations.
    getByName(String _sName)
    Returns all annotations with the given name, for all sentences.
    getByName(String _sName, int _iSentenceIndex)
    Returns all annotations with the given name, in the specified sentence.
    getBySentenceIndex(int _iSentenceIndex)
    Returns all annotations with the given sentences index.
    getByVariable(String _sVariableName)
    Returns all annotations with a variable of the given name, for all sentences.
    getByVariable(String _sVariableName, int _iSentenceIndex)
    Returns all annotations with a variable of the given name, in the specified sentence.
    getByWordIndex(int _iWordIndex)
    Returns all annotations containing the given word index, for all sentences.
    getByWordIndex(int _iWordIndex, int _iSentenceIndex)
    Returns all annotations containing the given word index, in the specified sentence.
    Returns the names of all annotations, for all sentences.
    getNames(int _iSentenceIndex)
    Returns the names of all annotations, in the specified sentence.
    void
    remove(Annotation _annotation)
    Removes the annotation from the annotations data which is equal to the given annotation, if it's present.
  • Method Details

    • add

      void add(Annotation _annotation)
      Adds the given annotation to the annotations data. If an annotation equal to the given annotation already exists it'll be replaced with the given annotation (see Annotation.equals(Object) for the definition of annotation equality).
      Throws:
      IllegalArgumentException - if the given argument value is null
    • remove

      void remove(Annotation _annotation)
      Removes the annotation from the annotations data which is equal to the given annotation, if it's present. (see Annotation.equals(Object) for the definition of annotation equality).
      Throws:
      IllegalArgumentException - if the given argument value is null
    • clear

      void clear()
      Removes all annotations.
    • contains

      boolean contains(Annotation _annotation)
      Returns true if an annotation equal to the given annotation is present in the annotations data (see Annotation.equals(Object) for the definition of annotation equality).
    • getNames

      Set<String> getNames()
      Returns the names of all annotations, for all sentences.
    • getNames

      Set<String> getNames(int _iSentenceIndex)
      Returns the names of all annotations, in the specified sentence.
    • getAll

      Set<Annotation> getAll()
      Returns all annotations.
    • getByName

      Set<Annotation> getByName(String _sName)
      Returns all annotations with the given name, for all sentences.
    • getByName

      Set<Annotation> getByName(String _sName, int _iSentenceIndex)
      Returns all annotations with the given name, in the specified sentence.
    • getBySentenceIndex

      Set<Annotation> getBySentenceIndex(int _iSentenceIndex)
      Returns all annotations with the given sentences index.
    • getByWordIndex

      Set<Annotation> getByWordIndex(int _iWordIndex)
      Returns all annotations containing the given word index, for all sentences.
    • getByWordIndex

      Set<Annotation> getByWordIndex(int _iWordIndex, int _iSentenceIndex)
      Returns all annotations containing the given word index, in the specified sentence.
    • getByVariable

      Set<Annotation> getByVariable(String _sVariableName)
      Returns all annotations with a variable of the given name, for all sentences.
    • getByVariable

      Set<Annotation> getByVariable(String _sVariableName, int _iSentenceIndex)
      Returns all annotations with a variable of the given name, in the specified sentence.