You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@uima.apache.org by "Thilo Goetz (JIRA)" <de...@uima.apache.org> on 2011/08/19 18:50:27 UTC

[jira] [Work started] (UIMA-1601) moveTo() and iterator(fs) do not point to "leftmost" FS

     [ https://issues.apache.org/jira/browse/UIMA-1601?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Work on UIMA-1601 started by Thilo Goetz.

> 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
>
> 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.
For more information on JIRA, see: http://www.atlassian.com/software/jira