MCPcopy Create free account
hub / github.com/GateNLP/gate-core / AnnotationImpl

Class AnnotationImpl

src/main/java/gate/annotation/AnnotationImpl.java:33–504  ·  view source on GitHub ↗

Provides an implementation for the interface gate.Annotation

Source from the content-addressed store, hash-verified

31 *
32 */
33public class AnnotationImpl extends AbstractFeatureBearer
34 implements Annotation {
35
36 /** Freeze the serialization UID. */
37 static final long serialVersionUID = -5658993256574857725L;
38
39 /** Constructor. Package access - annotations have to be constructed via
40 * AnnotationSets.
41 *
42 * @param id The id of the new annotation;
43 * @param start The node from where the annotation will depart;
44 * @param end The node where trhe annotation ends;
45 * @param type The type of the new annotation;
46 * @param features The features of the annotation.
47 */
48 protected AnnotationImpl(
49 Integer id, Node start, Node end, String type, FeatureMap features
50 ) {
51 this.id = id;
52 this.start = start;
53 this.end = end;
54 this.type = type;
55 this.features = features;
56
57 } // AnnotationImpl
58
59 /** The ID of the annotation.
60 */
61 @Override
62 public Integer getId() {
63 return id;
64 } // getId()
65
66 /** The type of the annotation (corresponds to TIPSTER "name").
67 */
68 @Override
69 public String getType() {
70 return type;
71 } // getType()
72
73 /** The start node.
74 */
75 @Override
76 public Node getStartNode() {
77 return start;
78 } // getStartNode()
79
80 /** The end node.
81 */
82 @Override
83 public Node getEndNode() {
84 return end;
85 } // getEndNode()
86
87 /** String representation of hte annotation
88 */
89 @Override
90 public String toString() {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected