[
https://issues.apache.org/jira/browse/UIMA-5115?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15507519#comment-15507519
]
Richard Eckart de Castilho commented on UIMA-5115:
--------------------------------------------------
I think `at(location).single()` is quite a different thing. at (between,
covered by, etc.) is IMHO all referring to a "location constraint" whereas
single is a cardinality constraint. The following variations should all IMHO be
possible:
{code}
jcas.select(Token.class).coveredBy(sentence).single()
jcas.select(Token.class).coveredBy(10, 20).singleOrNull()
jcas.select(Token.class).at(10,20).get()
jcas.select(Token.class).between(firstName, lastName).get()
{code}
or abstractly
{noformat}
CONTAINER.select(TYPE-CONSTRAINT).LOCATION-CONSTRAINT(args)[.CARDINALITY-CONSTRAINT()]
{noformat}
> 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)