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?
The reason I choose AnnotationFS was that the javadoc says:

"An annotation index provides additional iterator functionality that applies only to instances of
uima.tcas.Annotation."

The type uima.tcas.Annotation has int begin and end features, which is represented
as AnnotationFS.

Wouldn't it be a violation to the API if it can also contain non uima.tcas.Annotation FSes ?

But maybe we should also consider changing the interface to something like this: public interface AnnotationIndex<T extends Annotation(Base)FS> extends FSIndex<T>

Jörn

Reply via email to