|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.AbstractCollection<E>
java.util.AbstractSet<Annotation>
gate.annotation.AnnotationSetImpl
gate.annotation.ImmutableAnnotationSetImpl
public class ImmutableAnnotationSetImpl
| Field Summary |
|---|
| Fields inherited from class gate.annotation.AnnotationSetImpl |
|---|
annFactory, annotationSetListeners, annotsById, emptyAnnotationSet, longestAnnot |
| Constructor Summary | |
|---|---|
protected |
ImmutableAnnotationSetImpl(Document doc,
Collection<Annotation> annotations)
Constructs an ImmutableAnnotationSet. |
| Method Summary | |
|---|---|
boolean |
add(Annotation a)
Add an existing annotation. |
void |
add(Integer id,
Long start,
Long end,
String type,
FeatureMap features)
Create and add an annotation from database read data In this case the id is already known being previously fetched from the database |
Integer |
add(Long start,
Long end,
String type,
FeatureMap features)
Create and add an annotation and return its id |
Integer |
add(Node start,
Node end,
String type,
FeatureMap features)
The following methods throw an exception as they try to modify the state of the object |
boolean |
addAll(Collection<? extends Annotation> arg0)
Adds multiple annotations to this set in one go. |
void |
clear()
|
boolean |
remove(Object o)
Remove an element from this set. |
boolean |
removeAll(Collection<?> arg0)
|
boolean |
retainAll(Collection<?> arg0)
|
| Methods inherited from class gate.annotation.AnnotationSetImpl |
|---|
addAllKeepIDs, addAnnotationSetListener, addGateListener, clone, edit, fireAnnotationAdded, fireAnnotationRemoved, fireGateEvent, firstNode, get, get, get, get, get, get, get, get, get, get, getAllTypes, getContained, getCovering, getDocument, getName, getStrict, indexByStartOffset, indexByType, iterator, lastNode, nextNode, removeAnnotationSetListener, removeFromIdIndex, removeFromOffsetIndex, removeFromTypeIndex, removeGateListener, setAnnotationFactory, size |
| Methods inherited from class java.util.AbstractSet |
|---|
equals, hashCode |
| Methods inherited from class java.util.AbstractCollection |
|---|
contains, containsAll, isEmpty, toArray, toArray, toString |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.Set |
|---|
contains, containsAll, equals, hashCode, isEmpty, toArray, toArray |
| Constructor Detail |
|---|
protected ImmutableAnnotationSetImpl(Document doc,
Collection<Annotation> annotations)
throws ClassCastException
annotations -
ClassCastException| Method Detail |
|---|
public Integer add(Node start,
Node end,
String type,
FeatureMap features)
add in interface SimpleAnnotationSetadd in class AnnotationSetImplstart - the start node for the new annotationend - the end node for the new annotationtype - the annotation typefeatures - the features for the new annotation
public Integer add(Long start,
Long end,
String type,
FeatureMap features)
AnnotationSetImpl
add in interface SimpleAnnotationSetadd in class AnnotationSetImplstart - the start offset for the new annotationend - the end offset for the new annotationtype - the annotation typefeatures - the features for the new annotation
public boolean add(Annotation a)
AnnotationSetImpl
add in interface SimpleAnnotationSetadd in interface Collection<Annotation>add in interface Set<Annotation>add in class AnnotationSetImpla - the annotation to add
true if the set was modified by this
operation, false otherwise.
public void add(Integer id,
Long start,
Long end,
String type,
FeatureMap features)
throws InvalidOffsetException
AnnotationSetImpl
add in interface AnnotationSetadd in class AnnotationSetImplid - the ID for the new annotationstart - the start offset for the new annotationend - the end offset for the new annotationtype - the annotation typefeatures - the features for the new annotation
InvalidOffsetException - if the start or end offsets are
null, or if the start offset is less than
0 or the end offset is greater than the length of the
document.public boolean removeAll(Collection<?> arg0)
removeAll in interface Collection<Annotation>removeAll in interface Set<Annotation>removeAll in class AbstractSet<Annotation>public boolean addAll(Collection<? extends Annotation> arg0)
AnnotationSetImplAnnotation type, otherwise a
ClassCastException will be thrown. The provided annotations will be used to
create new annotations using the appropriate add() methods from this set.
The new annotations will have different IDs from the old ones (which is
required in order to preserve the uniqueness of IDs inside an annotation
set).
addAll in interface Collection<Annotation>addAll in interface Set<Annotation>addAll in class AnnotationSetImplarg0 - a collection of annotations
public boolean remove(Object o)
AnnotationSetImpl
remove in interface SimpleAnnotationSetremove in interface Collection<Annotation>remove in interface Set<Annotation>remove in class AnnotationSetImplo - the element to remove
true if the set was modified by this
operation, false otherwise.public boolean retainAll(Collection<?> arg0)
retainAll in interface Collection<Annotation>retainAll in interface Set<Annotation>retainAll in class AbstractCollection<Annotation>public void clear()
clear in interface Collection<Annotation>clear in interface Set<Annotation>clear in class AbstractCollection<Annotation>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||