gate.annotation
Class DatabaseAnnotationSetImpl
java.lang.Object
|
+--java.util.AbstractCollection
|
+--java.util.AbstractSet
|
+--gate.annotation.AnnotationSetImpl
|
+--gate.annotation.DatabaseAnnotationSetImpl
- All Implemented Interfaces:
- AnnotationSet, Cloneable, Collection, DatastoreListener, EventAwareAnnotationSet, EventListener, Serializable, Set
- public class DatabaseAnnotationSetImpl
- extends AnnotationSetImpl
- implements DatastoreListener, EventAwareAnnotationSet
- See Also:
- Serialized Form
Fields inherited from class gate.annotation.AnnotationSetImpl |
annotationSetListeners, annotsByEndNode, annotsById, annotsByStartNode, annotsByType, DEBUG, doc, gateListeners, name, nodesByOffset, serialVersionUID |
Methods inherited from class gate.annotation.AnnotationSetImpl |
add, add, add, add, addAnnotationSetListener, addGateListener, addToEndOffsetIndex, addToOffsetIndex, addToStartOffsetIndex, addToTypeIndex, clone, edit, equals, fireAnnotationAdded, fireAnnotationRemoved, fireGateEvent, firstNode, get, get, get, get, get, get, get, get, get, get, getAllTypes, getContained, getDocument, getName, hashCode, indexByEndOffset, indexByStartOffset, indexByType, iterator, lastNode, nextNode, remove, removeAnnotationSetListener, removeFromIdIndex, removeFromOffsetIndex, removeFromTypeIndex, removeGateListener, size |
Methods inherited from interface gate.AnnotationSet |
add, add, add, add, addAnnotationSetListener, addGateListener, firstNode, get, get, get, get, get, get, get, get, get, get, getAllTypes, getContained, getDocument, getName, iterator, lastNode, nextNode, remove, removeAnnotationSetListener, removeGateListener, size |
Methods inherited from interface java.util.Set |
addAll, clear, contains, containsAll, equals, hashCode, isEmpty, removeAll, retainAll, toArray, toArray |
eventHandler
protected DatabaseAnnotationSetImpl.EventsHandler eventHandler
- The listener for the events coming from the document (annotations and
annotation sets added or removed).
addedAnnotations
protected HashSet addedAnnotations
removedAnnotations
protected HashSet removedAnnotations
updatedAnnotations
protected HashSet updatedAnnotations
validating
private boolean validating
DatabaseAnnotationSetImpl
public DatabaseAnnotationSetImpl(Document doc)
- Construction from Document.
DatabaseAnnotationSetImpl
public DatabaseAnnotationSetImpl(Document doc,
String name)
- Construction from Document and name.
DatabaseAnnotationSetImpl
public DatabaseAnnotationSetImpl(Document doc,
Collection c)
- Construction from Document and name.
DatabaseAnnotationSetImpl
public DatabaseAnnotationSetImpl(Document doc,
String name,
Collection c)
- Construction from Document and name.
DatabaseAnnotationSetImpl
public DatabaseAnnotationSetImpl(Collection c)
throws ClassCastException
- Construction from Collection (which must be an AnnotationSet)
assertValid
public void assertValid()
toString
public String toString()
- Overrides:
toString
in class AbstractCollection
resourceAdopted
public void resourceAdopted(DatastoreEvent evt)
- Called by a datastore when a new resource has been adopted
- Specified by:
resourceAdopted
in interface DatastoreListener
resourceDeleted
public void resourceDeleted(DatastoreEvent evt)
- Called by a datastore when a resource has been deleted
- Specified by:
resourceDeleted
in interface DatastoreListener
resourceWritten
public void resourceWritten(DatastoreEvent evt)
- Called by a datastore when a resource has been wrote into the datastore
- Specified by:
resourceWritten
in interface DatastoreListener
clearChangeLists
private void clearChangeLists()
getAddedAnnotations
public Collection getAddedAnnotations()
- Specified by:
getAddedAnnotations
in interface EventAwareAnnotationSet
getChangedAnnotations
public Collection getChangedAnnotations()
- Specified by:
getChangedAnnotations
in interface EventAwareAnnotationSet
getRemovedAnnotations
public Collection getRemovedAnnotations()
- Specified by:
getRemovedAnnotations
in interface EventAwareAnnotationSet