## 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

Fields inherited from class gate.event.GateEvent
`FEATURES_UPDATED`

Constructor Summary
`AnnotationSetEvent(AnnotationSet source, int type, Document sourceDocument, Annotation annotation)` Constructor.

Method Summary
`Annotation` `getAnnotation()` Gets the annotation that has been added or removed
`Document` `getSourceDocument()` Gets the document that has had an annotation added or removed.

Methods inherited from class gate.event.GateEvent
`getType`

Methods inherited from class java.util.EventObject
`getSource, toString`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### ANNOTATION_ADDED

    public static final int ANNOTATION_ADDED

  Event type used for situations when a new annotation has been added

### ANNOTATION_REMOVED

    public static final int ANNOTATION_REMOVED

  Event type used for situations when an annotation has been removed

Constructor Detail

### AnnotationSetEvent

    public AnnotationSetEvent(AnnotationSet source,
                              int type,
                              Document sourceDocument,
                              Annotation annotation)

  Constructor.
  Parameters:
    `source` - the `AnnotationSet` that fired the event
    `type` - the type of the event
    `sourceDocument` - the `Document` for wich the annotation was added or removed.
    `annotation` - the annotation added or removed.

Method Detail

### 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`