[ https://issues.apache.org/jira/browse/UIMA-5115?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15507550#comment-15507550 ]
Marshall Schor commented on UIMA-5115: -------------------------------------- I agree that it's a bad design if there's lots of casting from FeatureStructure to Annotation (see other comment about AnnotationFS going away in favor of just plain Annotation). I'm hoping this can all be done automatically, without any extra methods. My thought is that the creator of SelectFSs_impl, e.g. cas.select(some-type-spec), would create a "typed" instance of this where the type would fit the type spec. e.g. SelectFS<MyAnnot> s = cas.select(MyAnnot.type); would create an instance of SelectFS that was typed to be "MyAnnot". Subsequent operations, e.g. s.fsIterator() would return FsIterator<MyAnnot>. If someone were to create a "typeless" SelectFSs_impl, e.g., cas.select(), and then later specify a type e.g. " ... .type("my.FooType") " I'm hoping we could return an instance of SelectFSs_impl that was "typed" to FooType. Also, if they never specified a type, but implied Annotation (becuase they used a bounding FS, for example), I'd want the resulting SelectFSs_impl to be typed to Annotation. Not sure if this is do-able, but want to try to get a close as is reasonable to this :-) > uv3 select() api for iterators and streams over CAS contents > ------------------------------------------------------------ > > Key: UIMA-5115 > URL: https://issues.apache.org/jira/browse/UIMA-5115 > Project: UIMA > Issue Type: New Feature > Components: Core Java Framework > Reporter: Marshall Schor > Priority: Minor > Fix For: 3.0.0SDKexp > > > Design and implement a select() API based on uimaFIT's select, integrated > well with Java 8 concepts. Initial discussions in UIMA-1524. Wiki with > diagram: https://cwiki.apache.org/confluence/display/UIMA/UV3+Iterator+support -- This message was sent by Atlassian JIRA (v6.3.4#6332)