[
https://issues.apache.org/jira/browse/UIMA-1601?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Marshall Schor closed UIMA-1601.
--------------------------------
> moveTo() and iterator(fs) do not point to "leftmost" FS
> -------------------------------------------------------
>
> Key: UIMA-1601
> URL: https://issues.apache.org/jira/browse/UIMA-1601
> Project: UIMA
> Issue Type: Bug
> Components: Core Java Framework
> Affects Versions: 2.3
> Reporter: Timo Boehme
> Assignee: Thilo Goetz
> Fix For: 2.4.0SDK
>
>
> According to the API docs FSIterator.moveTo(FeatureStructure fs) should move
> the iterator to "the first features structure that is equal to fs". In case
> we have multiple annotations of same type and same region (same start/end) as
> fs moveTo() will point to one of them but not necessarily to the first
> (leftmost) one (in iterator order).
> The inconsistency to the API doc is even more clear with
> FSIndex.iterator(FeatureStructure fs). The API doc states: "The position of
> the iterator will be set such that the feature structure returned by a call
> to the iterator's get() method is greater than or equal to fs, and any
> previous FS is less than FS." Thus if we have multiple annotations of same
> type as fs and same region one would expect the iterator to start with the
> left most one and return all of these annotations using next(). However as
> with moveTo() this is not the case. E.g. after iterator creation calling
> moveToPrevious() followed by get() returns sometimes one of the annotations
> with same region as fs (and same type).
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira