uima-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marshall Schor <...@schor.com>
Subject Is the generification supertype of AnnotationIndex.iterator() correct?
Date Fri, 07 Aug 2009 12:17:27 GMT
AnnotationIndex interface extends
  FSIndex<AnnotationFS> extends

Iterable interface defines one method,
  iterator<T> where T is AnnotationFS (in this case).

AnnotationIndexImpl implements AnnotationIndex.

Therefore, it has a method, iterator, whose return value is


The hierarchy of feature structure interfaces leading to AnnotationFS:

  FeatureStructure - most general
    AnnotationBaseFS - adds view/sofa info ref
      AnnotationFS - adds begin and end as "integer" valued slots

This design is intended to support other kinds of annotations with begin
and end defined as, for instance, "float" values.  One use case is
having a SOFA be an audio stream, and the begin/end representing time
oriented subparts of the stream.

These values could be indexed, etc., just like AnnotationFS instances
could, with an appropriate index (using float rather than int values).


The current choice in generification doesn't support this; a fix would
be to change AnnotationIndex generification from
 public interface AnnotationIndex extends FSIndex<AnnotationFS> to
 public interface AnnotationIndex extends FSIndex<AnnotationBaseFS>
Is this correct?


View raw message