1   /*
2    *  SimpleAnnotation.java
3    *
4    *  Copyright (c) 1998-2005, The University of Sheffield.
5    *
6    *  This file is part of GATE (see http://gate.ac.uk/), and is free
7    *  software, licenced under the GNU Library General Public License,
8    *  Version 2, June 1991 (in the distribution as file licence.html,
9    *  and also available at http://gate.ac.uk/gate/licence.html).
10   *
11   *  Hamish Cunningham, 19/Jan/00
12   *
13   *  $Id: SimpleAnnotation.java,v 1.2 2005/01/11 13:51:30 ian Exp $
14   */
15  
16  package gate;
17  
18  import java.io.Serializable;
19  import java.util.Set;
20  
21  import gate.util.FeatureBearer;
22  import gate.util.IdBearer;
23  
24  /** An Annotation is an arc in an AnnotationSet. It is immutable, to avoid
25    * the situation where each annotation has to point to its parent graph in
26    * order to tell it to update its indices when it changes.
27    * <P> Changes from TIPSTER: no ID; single span only.
28    *
29    * SimpleAnnotation was introduced to simplify the API of annotations
30    */
31  public interface SimpleAnnotation
32  extends FeatureBearer, IdBearer, Comparable, Serializable {
33  
34    /** The type of the annotation (corresponds to TIPSTER "name"). */
35    public String getType();
36  
37    /** The start node. */
38    public Node getStartNode();
39  
40    /** The end node. */
41    public Node getEndNode();
42  
43    /** Ordering */
44    public int compareTo(Object o) throws ClassCastException;
45  
46  } // interface SimpleAnnotation,
47