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