|
||||||||||
| 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.DatabaseAnnotationSetImpl
public class DatabaseAnnotationSetImpl
| Nested Class Summary | |
|---|---|
(package private) class |
DatabaseAnnotationSetImpl.DatabaseAnnotationSetIterator
|
| Nested classes/interfaces inherited from class gate.annotation.AnnotationSetImpl |
|---|
AnnotationSetImpl.AnnotationSetIterator |
| Field Summary | |
|---|---|
protected HashSet<Annotation> |
addedAnnotations
The listener for the events coming from the document (annotations and annotation sets added or removed). |
protected HashSet<Annotation> |
removedAnnotations
|
protected HashSet<Annotation> |
updatedAnnotations
|
private boolean |
validating
|
| Fields inherited from class gate.annotation.AnnotationSetImpl |
|---|
annFactory, annotationSetListeners, annotsById, annotsByStartNode, annotsByType, doc, emptyAnnotationSet, longestAnnot, name, nodesByOffset, serialVersionUID |
| Constructor Summary | |
|---|---|
DatabaseAnnotationSetImpl(AnnotationSet c)
Construction from Collection (which must be an AnnotationSet) |
|
DatabaseAnnotationSetImpl(Document doc)
Construction from Document. |
|
DatabaseAnnotationSetImpl(Document doc,
AnnotationSet c)
Construction from Document and name. |
|
DatabaseAnnotationSetImpl(Document doc,
String name)
Construction from Document and name. |
|
DatabaseAnnotationSetImpl(Document doc,
String name,
AnnotationSet c)
Construction from Document and name. |
|
| Method Summary | |
|---|---|
boolean |
add(Annotation o)
Add an existing annotation. |
void |
annotationUpdated(AnnotationEvent e)
Called when an Annotation has been updated |
void |
assertValid()
|
private void |
clearChangeLists()
|
protected void |
fireAnnotationRemoved(AnnotationSetEvent e)
|
Collection<Annotation> |
getAddedAnnotations()
|
Collection<Annotation> |
getChangedAnnotations()
|
Collection<Annotation> |
getRemovedAnnotations()
|
Iterator<Annotation> |
iterator()
Get an iterator for this set |
boolean |
remove(Object o)
Remove an element from this set. |
void |
resourceAdopted(DatastoreEvent evt)
Called by a datastore when a new resource has been adopted |
void |
resourceDeleted(DatastoreEvent evt)
Called by a datastore when a resource has been deleted |
void |
resourceWritten(DatastoreEvent evt)
Called by a datastore when a resource has been wrote into the datastore |
String |
toString()
|
| Methods inherited from class gate.annotation.AnnotationSetImpl |
|---|
add, add, add, addAll, addAllKeepIDs, addAnnotationSetListener, addGateListener, addToStartOffsetIndex, addToTypeIndex, clone, edit, fireAnnotationAdded, fireGateEvent, firstNode, get, get, get, get, get, get, get, get, get, get, getAllTypes, getContained, getCovering, getDocument, getName, getStrict, indexByStartOffset, indexByType, lastNode, nextNode, 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 |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface gate.AnnotationSet |
|---|
add, addAnnotationSetListener, addGateListener, firstNode, get, get, get, get, get, get, getContained, getCovering, lastNode, nextNode, removeAnnotationSetListener, removeGateListener |
| Methods inherited from interface gate.SimpleAnnotationSet |
|---|
add, add, get, get, get, get, getAllTypes, getDocument, getName, size |
| Methods inherited from interface java.util.Set |
|---|
addAll, clear, contains, containsAll, equals, hashCode, isEmpty, removeAll, retainAll, toArray, toArray |
| Field Detail |
|---|
protected HashSet<Annotation> addedAnnotations
protected HashSet<Annotation> removedAnnotations
protected HashSet<Annotation> updatedAnnotations
private boolean validating
| Constructor Detail |
|---|
public DatabaseAnnotationSetImpl(Document doc)
public DatabaseAnnotationSetImpl(Document doc,
String name)
public DatabaseAnnotationSetImpl(Document doc,
AnnotationSet c)
public DatabaseAnnotationSetImpl(Document doc,
String name,
AnnotationSet c)
public DatabaseAnnotationSetImpl(AnnotationSet c)
throws ClassCastException
ClassCastException| Method Detail |
|---|
public void assertValid()
public String toString()
toString in class AbstractCollection<Annotation>public void resourceAdopted(DatastoreEvent evt)
resourceAdopted in interface DatastoreListenerpublic void resourceDeleted(DatastoreEvent evt)
resourceDeleted in interface DatastoreListenerpublic void resourceWritten(DatastoreEvent evt)
resourceWritten in interface DatastoreListenerprivate void clearChangeLists()
public Collection<Annotation> getAddedAnnotations()
getAddedAnnotations in interface EventAwareAnnotationSetpublic Collection<Annotation> getChangedAnnotations()
getChangedAnnotations in interface EventAwareAnnotationSetpublic Collection<Annotation> getRemovedAnnotations()
getRemovedAnnotations in interface EventAwareAnnotationSetpublic void annotationUpdated(AnnotationEvent e)
AnnotationListenerAnnotation has been updated
annotationUpdated in interface AnnotationListener
public boolean add(Annotation o)
throws ClassCastException
add in interface SimpleAnnotationSetadd in interface Collection<Annotation>add in interface Set<Annotation>add in class AnnotationSetImplo - the annotation to add
true if the set was modified by this
operation, false otherwise.
ClassCastExceptionprotected void fireAnnotationRemoved(AnnotationSetEvent e)
fireAnnotationRemoved in class AnnotationSetImple -
public boolean remove(Object o)
throws ClassCastException
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.
ClassCastExceptionpublic Iterator<Annotation> iterator()
AnnotationSetImpl
iterator in interface SimpleAnnotationSetiterator in interface Iterable<Annotation>iterator in interface Collection<Annotation>iterator in interface Set<Annotation>iterator in class AnnotationSetImpl
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||