gate.event
Class AnnotationSetEvent
java.lang.Object
java.util.EventObject
gate.event.GateEvent
gate.event.AnnotationSetEvent
- All Implemented Interfaces:
- Serializable
public class AnnotationSetEvent
- extends GateEvent
This class models events fired by an AnnotationSet
.
- See Also:
- Serialized Form
Field Summary |
static int |
ANNOTATION_ADDED
Event type used for situations when a new annotation has been added |
static int |
ANNOTATION_REMOVED
Event type used for situations when an annotation has been removed |
ANNOTATION_ADDED
public static final int ANNOTATION_ADDED
- Event type used for situations when a new annotation has been added
- See Also:
- Constant Field Values
ANNOTATION_REMOVED
public static final int ANNOTATION_REMOVED
- Event type used for situations when an annotation has been removed
- See Also:
- Constant Field Values
AnnotationSetEvent
public AnnotationSetEvent(AnnotationSet source,
int type,
Document sourceDocument,
Annotation annotation)
- Constructor.
- Parameters:
source
- the AnnotationSet
that fired the eventtype
- the type of the eventsourceDocument
- the Document
for wich the annotation
was added or removed.annotation
- the annotation added or removed.
getSourceDocument
public Document getSourceDocument()
- Gets the document that has had an annotation added or removed.
- Returns:
- a
Document
getAnnotation
public Annotation getAnnotation()
- Gets the annotation that has been added or removed
- Returns:
- a
Annotation