GATE
Version 3.1-2270

gate
Interface AnnotationSet

All Superinterfaces:
Cloneable, Collection, Iterable, Serializable, Set, SimpleAnnotationSet
All Known Subinterfaces:
EventAwareAnnotationSet
All Known Implementing Classes:
AnnotationSetImpl, DatabaseAnnotationSetImpl

public interface AnnotationSet
extends SimpleAnnotationSet, Serializable

Annotation sets


Method Summary
 void add(Integer id, Long start, Long end, String type, FeatureMap features)
          Create and add an annotation with a pre-existing ID
 void addAnnotationSetListener(AnnotationSetListener l)
           
 void addGateListener(GateListener l)
           
 Node firstNode()
          Get the node with the smallest offset
 AnnotationSet get(Long offset)
          Select annotations by offset.
 AnnotationSet get(Long startOffset, Long endOffset)
          Select annotations by offset.
 AnnotationSet get(String type, FeatureMap constraints)
          Select annotations by type and features
 AnnotationSet get(String type, FeatureMap constraints, Long offset)
          Select annotations by type, features and offset
 AnnotationSet get(String type, Long startOffset, Long endOffset)
          Select annotations by offset and type.
 AnnotationSet get(String type, Set featureNames)
          Select annotations by type and feature names It returns all annotations of the given type that have the given set of features, regardless of their concrete values If the type == null, then select regardless of type
 AnnotationSet getContained(Long startOffset, Long endOffset)
          Select annotations by offset.
 Node lastNode()
          Get the node with the largest offset
 Node nextNode(Node node)
          Get the first node that is relevant for this annotation set and which has the offset larger than the one of the node provided.
 void removeAnnotationSetListener(AnnotationSetListener l)
           
 void removeGateListener(GateListener l)
           
 
Methods inherited from interface gate.SimpleAnnotationSet
add, add, add, get, get, get, get, getAllTypes, getDocument, getName, iterator, remove, size
 
Methods inherited from interface java.util.Set
addAll, clear, contains, containsAll, equals, hashCode, isEmpty, removeAll, retainAll, toArray, toArray
 

Method Detail

add

void add(Integer id,
         Long start,
         Long end,
         String type,
         FeatureMap features)
         throws InvalidOffsetException
Create and add an annotation with a pre-existing ID

Throws:
InvalidOffsetException

get

AnnotationSet get(String type,
                  FeatureMap constraints)
Select annotations by type and features


get

AnnotationSet get(String type,
                  Set featureNames)
Select annotations by type and feature names It returns all annotations of the given type that have the given set of features, regardless of their concrete values If the type == null, then select regardless of type


get

AnnotationSet get(String type,
                  FeatureMap constraints,
                  Long offset)
Select annotations by type, features and offset


get

AnnotationSet get(Long offset)
Select annotations by offset. This returns the set of annotations whose start node is the least such that it is greater than or equal to offset. If a positional index doesn't exist it is created.


get

AnnotationSet get(Long startOffset,
                  Long endOffset)
Select annotations by offset. This returns the set of annotations that overlap totaly or partially the interval defined by the two provided offsets


get

AnnotationSet get(String type,
                  Long startOffset,
                  Long endOffset)
Select annotations by offset and type. This returns the set of annotations that overlap totaly or partially the interval defined by the two provided offsets and are of the given type


getContained

AnnotationSet getContained(Long startOffset,
                           Long endOffset)
Select annotations by offset. This returns the set of annotations that are contained in the interval defined by the two provided offsets. The difference with get(startOffset, endOffset) is that the latter also provides annotations that have a span which covers completely and is bigger than the given one. Here we only get the annotations between the two offsets.


firstNode

Node firstNode()
Get the node with the smallest offset


lastNode

Node lastNode()
Get the node with the largest offset


nextNode

Node nextNode(Node node)
Get the first node that is relevant for this annotation set and which has the offset larger than the one of the node provided.


addAnnotationSetListener

void addAnnotationSetListener(AnnotationSetListener l)

removeAnnotationSetListener

void removeAnnotationSetListener(AnnotationSetListener l)

addGateListener

void addGateListener(GateListener l)

removeGateListener

void removeGateListener(GateListener l)

GATE
Version 3.1-2270