gate
Interface Annotation

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

public interface Annotation
extends FeatureBearer, IdBearer, Comparable, Serializable

An Annotation is an arc in an AnnotationGraph. 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.


Method Summary
 boolean coextensive(Annotation anAnnot)
          Two Annotation are coestensive if their offsets are the same.
 int compareTo(Object o)
          Ordering
 Node getEndNode()
          The end node.
 Node getStartNode()
          The start node.
 String getType()
          The type of the annotation (corresponds to TIPSTER "name").
 boolean isCompatible(Annotation aAnnot)
          This verifies if this annotation is compatible with another one.
 boolean isPartiallyCompatible(Annotation aAnnot)
          This method verifies if two annotation and are partially compatible.
 boolean overlaps(Annotation aAnnot)
          This method tells if this overlaps aAnnot.
 
Methods inherited from interface gate.util.FeatureBearer
getFeatures, getName, setFeatures, setName
 
Methods inherited from interface gate.util.IdBearer
getId
 

Method Detail

getType

public String getType()
The type of the annotation (corresponds to TIPSTER "name").

getStartNode

public Node getStartNode()
The start node.

getEndNode

public Node getEndNode()
The end node.

compareTo

public int compareTo(Object o)
              throws ClassCastException
Ordering
Specified by:
compareTo in interface Comparable

isCompatible

public boolean isCompatible(Annotation aAnnot)
This verifies if this annotation is compatible with another one. Compatible means that they hit the same enity and the FeatureMap of this is incuded into aAnnot FeatureMap.
Parameters:
aAnnot - a gate Annotation.
Returns:
true if aAnnot is compatible with this and false otherwise.

isPartiallyCompatible

public boolean isPartiallyCompatible(Annotation aAnnot)
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:
aAnnot - a gate Annotation.
Returns:
true if this is partially compatible with aAnnot and false otherwise.

coextensive

public 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

public 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.