[ 
https://issues.apache.org/jira/browse/UIMA-1524?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15493511#comment-15493511
 ] 

Marshall Schor commented on UIMA-1524:
--------------------------------------

You are correct - these are not solely stream operations.  THe object produced 
by the select() call would not be a stream object, but a special object that 
would implement the additional methods described in the wiki link above.  At 
the first "stream" operation, it would make a suitable stream, based on all the 
information collected from the builders up to that point, and from then on, it 
would be a stream.

I would add the "select(...) method to the cas/jcas, the FSArray and FSList 
objects. So these should work across all of them.

Example of use: selectFollowing(type, fs, n) 
{code}
cas.select(type).startAt(fs).limit(n)  ... 
// the limit(n) is a stream call, and would convert the select-produced object 
to a stream at that point.
{code}

> JFSIndexRepository should be enhanced with new generic methods
> --------------------------------------------------------------
>
>                 Key: UIMA-1524
>                 URL: https://issues.apache.org/jira/browse/UIMA-1524
>             Project: UIMA
>          Issue Type: Improvement
>          Components: Core Java Framework
>    Affects Versions: 2.3
>            Reporter: Joern Kottmann
>
> Existing methods should be overloaded with an additional Class argument to 
> specify the exact return type. This changes make down casting of returned 
> objects unnecessary. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to