GATE
Version 3.1-2270

gate
Interface Annotation

All Superinterfaces:
Comparable, FeatureBearer, IdBearer, Serializable, SimpleAnnotation
All Known Implementing Classes:
AnnotationImpl

public interface Annotation
extends SimpleAnnotation, Serializable

An Annotation is an arc in an AnnotationSet. It is immutable, to avoid the situation where each annotation has to point to its parent graph in order to tell it to update its indices when it changes.

Changes from TIPSTER: no ID; single span only. It inherits from SimpleAnnotation in order to allow users to add events and more methods for comparing annotations The event code is needed so a persistent annotation set can listen to its annotations and update correctly the database


Method Summary
 void addAnnotationListener(AnnotationListener l)
          Adds an annotation listener
 boolean coextensive(Annotation anAnnot)
          Two Annotation are coestensive if their offsets are the same.
 boolean isCompatible(Annotation anAnnot)
          This verifies if this annotation is compatible with another one.
 boolean isCompatible(Annotation anAnnot, Set aFeatureNamesSet)
          This verifies if this annotation is compatible with another one, given a set with certain keys.
 boolean isPartiallyCompatible(Annotation anAnnot)
          This method verifies if two annotation and are partially compatible.
 boolean isPartiallyCompatible(Annotation anAnnot, Set aFeatureNamesSet)
          This method verifies if two annotation and are partially compatible, given a set with certain keys.
 boolean overlaps(Annotation aAnnot)
          This method tells if this overlaps aAnnot.
 void removeAnnotationListener(AnnotationListener l)
          Removes an annotation listener
 
Methods inherited from interface gate.SimpleAnnotation
compareTo, getEndNode, getStartNode, getType
 
Methods inherited from interface gate.util.FeatureBearer
getFeatures, setFeatures
 
Methods inherited from interface gate.util.IdBearer
getId
 

Method Detail

isCompatible

boolean isCompatible(Annotation anAnnot)
This verifies if this annotation is compatible with another one. Compatible means that they hit the same possition and the FeatureMap of this is incuded into aAnnot FeatureMap.

Parameters:
anAnnot - a gate Annotation.
Returns:
true if aAnnot is compatible with this and false otherwise.

isCompatible

boolean isCompatible(Annotation anAnnot,
                     Set aFeatureNamesSet)
This verifies if this annotation is compatible with another one, given a set with certain keys. In this case, compatible means that they hit the same possition and those keys from this's FeatureMap intersected with aFeatureNamesSet are incuded together with their values into the aAnnot's FeatureMap.

Parameters:
anAnnot - a gate Annotation.
aFeatureNamesSet - is a set containing certian key that will be intersected with this's FeatureMap's keys.
Returns:
true if aAnnot is compatible with this and false otherwise.

isPartiallyCompatible

boolean isPartiallyCompatible(Annotation anAnnot)
This method verifies if two annotation and are partially compatible. Partially compatible means that they overlap and the FeatureMap of this is incuded into FeatureMap of aAnnot.

Parameters:
anAnnot - a gate Annotation.
Returns:
true if this is partially compatible with aAnnot and false otherwise.

isPartiallyCompatible

boolean isPartiallyCompatible(Annotation anAnnot,
                              Set aFeatureNamesSet)
This method verifies if two annotation and are partially compatible, given a set with certain keys. In this case, partially compatible means that they overlap and those keys from this's FeatureMap intersected with aFeatureNamesSet are incuded together with their values into the aAnnot's FeatureMap.

Parameters:
anAnnot - a gate Annotation.
aFeatureNamesSet - is a set containing certian key that will be intersected with this's FeatureMap's keys.
Returns:
true if this is partially compatible with aAnnot and false otherwise.

coextensive

boolean coextensive(Annotation anAnnot)
Two Annotation are coestensive if their offsets are the same.

Parameters:
anAnnot - A Gate annotation.
Returns:
true if two annotation hit the same possition and false otherwise

overlaps

boolean overlaps(Annotation aAnnot)
This method tells if this overlaps aAnnot.

Parameters:
aAnnot - a gate Annotation.
Returns:
true if they overlap and false false if they don't.

removeAnnotationListener

void removeAnnotationListener(AnnotationListener l)
Removes an annotation listener


addAnnotationListener

void addAnnotationListener(AnnotationListener l)
Adds an annotation listener


GATE
Version 3.1-2270