Interface AnnotationsI
- All Superinterfaces:
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 TypeMethodDescriptionvoidadd(Annotation _annotation) Adds the given annotation to the annotations data.voidclear()Removes all annotations.booleancontains(Annotation _annotation) Returnstrueif an annotation equal to the given annotation is present in the annotations data (seeAnnotation.equals(Object)for the definition of annotation equality).getAll()Returns all annotations.Returns all annotations with the given name, for all sentences.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.getNames()Returns the names of all annotations, for all sentences.getNames(int _iSentenceIndex) Returns the names of all annotations, in the specified sentence.voidremove(Annotation _annotation) Removes the annotation from the annotations data which is equal to the given annotation, if it's present.
-
Method Details
-
add
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 (seeAnnotation.equals(Object)for the definition of annotation equality).- Throws:
IllegalArgumentException- if the given argument value isnull
-
remove
Removes the annotation from the annotations data which is equal to the given annotation, if it's present. (seeAnnotation.equals(Object)for the definition of annotation equality).- Throws:
IllegalArgumentException- if the given argument value isnull
-
clear
void clear()Removes all annotations. -
contains
Returnstrueif an annotation equal to the given annotation is present in the annotations data (seeAnnotation.equals(Object)for the definition of annotation equality). -
getNames
Returns the names of all annotations, for all sentences. -
getNames
Returns the names of all annotations, in the specified sentence. -
getAll
Set<Annotation> getAll()Returns all annotations. -
getByName
Returns all annotations with the given name, for all sentences. -
getByName
Returns all annotations with the given name, in the specified sentence. -
getBySentenceIndex
Returns all annotations with the given sentences index. -
getByWordIndex
Returns all annotations containing the given word index, for all sentences. -
getByWordIndex
Returns all annotations containing the given word index, in the specified sentence. -
getByVariable
Returns all annotations with a variable of the given name, for all sentences. -
getByVariable
Returns all annotations with a variable of the given name, in the specified sentence.
-