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

Richard Eckart de Castilho commented on UIMA-5115:
--------------------------------------------------

It might be worth introducing pseudo-type-safe variations of these methods:

{code}
SelectFSs<T> type(Type uimaType);
SelectFSs<T> type(String fullyQualifiedTypeName);
SelectFSs<T> type(int jcasClass_dot_type);
{code}

These additional methods should allow the user to specify a built-in JCas type 
or CAS FS interface as boundary, e.g.

{code}
<NEW_TYPE> SelectFSs<NEW_TYPE> type(String fullyQualifiedTypeName, 
Class<NEW_TYPE> aBoundingType);
{code}

Usage example:

{code}
cas.select().type("my.Token", AnnotationFS.class);
{code}

Otherwise we'd probably be casting a lot from FeatureStructure to AnnotationFS.

> 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)

Reply via email to