|
|||||||||
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<gate.Annotation>
gate.annotation.AnnotationSetImpl
at.ofai.gate.annotation.NoDupAnnotationSetImpl
public class NoDupAnnotationSetImpl
A special kind of AnnotationSet that checks whether an identical annotation (same type, features, start offset and end offset) already exists before adding an annotation to the set, so that no duplicate annotation is created. This behaviour can be disabled by setting authoriseDuplicates to false. When constructing a new object from another AnnotationSet object, duplicates are copied as is. Only additions made afterwards are subject to duplicate control.
Field Summary |
---|
Fields inherited from class gate.annotation.AnnotationSetImpl |
---|
annFactory, annotationSetListeners, annotsById, emptyAnnotationSet, longestAnnot |
Constructor Summary | |
---|---|
NoDupAnnotationSetImpl(gate.AnnotationSet c)
Construction from Collection (whose items must be Annotation). |
|
NoDupAnnotationSetImpl(gate.Document doc)
Construction from Document. |
|
NoDupAnnotationSetImpl(gate.Document doc,
java.lang.String name)
Construction from Document and name. |
Method Summary | |
---|---|
boolean |
add(java.lang.Object o)
Add an existing annotation. |
java.lang.Boolean |
getAuthoriseDuplicates()
Get the value of authoriseDuplicates. |
void |
setAuthoriseDuplicates(java.lang.Boolean authorization)
Set the value of authoriseDuplicates. |
Methods inherited from class gate.annotation.AnnotationSetImpl |
---|
add, add, add, add, addAll, 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, remove, removeAnnotationSetListener, removeFromIdIndex, removeFromOffsetIndex, removeFromTypeIndex, removeGateListener, setAnnotationFactory, size |
Methods inherited from class java.util.AbstractSet |
---|
equals, hashCode, removeAll |
Methods inherited from class java.util.AbstractCollection |
---|
clear, contains, containsAll, isEmpty, retainAll, toArray, toArray, toString |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.Set |
---|
clear, contains, containsAll, equals, hashCode, isEmpty, removeAll, retainAll, toArray, toArray |
Constructor Detail |
---|
public NoDupAnnotationSetImpl(gate.Document doc)
public NoDupAnnotationSetImpl(gate.Document doc, java.lang.String name)
public NoDupAnnotationSetImpl(gate.AnnotationSet c) throws java.lang.ClassCastException
java.lang.ClassCastException
Method Detail |
---|
public boolean add(java.lang.Object o) throws java.lang.ClassCastException
add
in class gate.annotation.AnnotationSetImpl
java.lang.ClassCastException
public java.lang.Boolean getAuthoriseDuplicates()
public void setAuthoriseDuplicates(java.lang.Boolean authorization)
authoriseDuplicates
- value of authoriseDuplicates.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |