generics: JFSIndexRepository
public interface JFSIndexRepository { FSIndexTOP getIndex(String label); FSIndexTOP getIndex(String label, int type); AnnotationIndexAnnotation getAnnotationIndex(); AnnotationIndexAnnotation getAnnotationIndex(int type); IteratorFSIndexTop getIndexes(); FSIteratorTOP getAllIndexedFS(Type aType); FSIteratorTOP getAllIndexedFS(int aType); } Is the above generification correct ? We could use FeatureStructure instead of TOP, I am not sure whats better. Jörn
Re: generics: JFSIndexRepository
On Mon, Aug 24, 2009 at 6:55 AM, Jörn Kottmannkottm...@gmail.com wrote: public interface JFSIndexRepository { FSIndexTOP getIndex(String label); FSIndexTOP getIndex(String label, int type); AnnotationIndexAnnotation getAnnotationIndex(); AnnotationIndexAnnotation getAnnotationIndex(int type); IteratorFSIndexTop getIndexes(); FSIteratorTOP getAllIndexedFS(Type aType); FSIteratorTOP getAllIndexedFS(int aType); } Is the above generification correct ? We could use FeatureStructure instead of TOP, I am not sure whats better. Seems to me that TOP is better for JCAS, just like Annotation is better than AnnotationFS. -Adam
Re: generics: JFSIndexRepository
Jörn Kottmann wrote: public interface JFSIndexRepository { FSIndexTOP getIndex(String label); FSIndexTOP getIndex(String label, int type); AnnotationIndexAnnotation getAnnotationIndex(); AnnotationIndexAnnotation getAnnotationIndex(int type); IteratorFSIndexTop getIndexes(); FSIteratorTOP getAllIndexedFS(Type aType); FSIteratorTOP getAllIndexedFS(int aType); } Is the above generification correct ? We could use FeatureStructure instead of TOP, I am not sure whats better. I think the generification is correct, because TOP is the JCas version of the FeatureStructure interface. Another note (http://markmail.org/thread/pafkl3luotd3wkfr - toward the bottom of the thread) suggests additional methods that pass in a class instance, and then use that to specify the returned type. -Marshall Jörn