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

Richard Eckart de Castilho updated UIMA-5828:
---------------------------------------------
    Description: 
uimaFIT has a call which seems to be quite difficult to replicate using UIMAv3 
SelectFS:
{code:java}
    Annotation a = new Annotation(this.jCas, 0, 1);
    Annotation b = new Annotation(this.jCas, 2, 3);
    Annotation c = new Annotation(this.jCas, 4, 5);

    for (Annotation ann : Arrays.asList(a, b, c)) {
      ann.addToIndexes();
    }

    // uimaFIT: Arrays.asList(a, b), selectPreceding(this.jCas, 
Annotation.class, c, 2));
    // Produces the wrong order
    assertEquals(Arrays.asList(a, b), 
jCas.select(Annotation.*class*).preceding(c).limit(2).asList());
    // Produces: java.lang.IllegalArgumentException: Strict requires 
BoundsUse.coveredBy
    assertEquals(Arrays.asList(a, b), 
jCas.select(Annotation.class).at(c).shifted(-2).limit(2).asList());
{code}

  was:
uimaFIT has a call which seems to be quite difficult to replicate using UIMAv3 
SelectFS:

{code}

    Annotation a = *new* Annotation(*this*.jCas, 0, 1);

    Annotation b = *new* Annotation(*this*.jCas, 2, 3);

    Annotation c = *new* Annotation(*this*.jCas, 4, 5);

    *for* (Annotation ann : Arrays.asList(a, b, c)) {

      ann.addToIndexes();

    }

    // uimaFIT: Arrays.asList(a, b), selectPreceding(this.jCas, 
Annotation.class, c, 2));

    // Produces the wrong order

    assertEquals(Arrays.asList(a, b), 
jCas.select(Annotation.*class*).preceding(c).limit(2).asList());

    // Produces: java.lang.IllegalArgumentException: Strict requires 
BoundsUse.coveredBy

    assertEquals(Arrays.asList(a, b), 
jCas.select(Annotation.class).at(c).shifted(-2).limit(2).asList());

{code}


> Unable to fetch preceding annotations in order
> ----------------------------------------------
>
>                 Key: UIMA-5828
>                 URL: https://issues.apache.org/jira/browse/UIMA-5828
>             Project: UIMA
>          Issue Type: Bug
>          Components: UIMA
>    Affects Versions: 3.0.0SDK
>            Reporter: Richard Eckart de Castilho
>            Priority: Minor
>
> uimaFIT has a call which seems to be quite difficult to replicate using 
> UIMAv3 SelectFS:
> {code:java}
>     Annotation a = new Annotation(this.jCas, 0, 1);
>     Annotation b = new Annotation(this.jCas, 2, 3);
>     Annotation c = new Annotation(this.jCas, 4, 5);
>     for (Annotation ann : Arrays.asList(a, b, c)) {
>       ann.addToIndexes();
>     }
>     // uimaFIT: Arrays.asList(a, b), selectPreceding(this.jCas, 
> Annotation.class, c, 2));
>     // Produces the wrong order
>     assertEquals(Arrays.asList(a, b), 
> jCas.select(Annotation.*class*).preceding(c).limit(2).asList());
>     // Produces: java.lang.IllegalArgumentException: Strict requires 
> BoundsUse.coveredBy
>     assertEquals(Arrays.asList(a, b), 
> jCas.select(Annotation.class).at(c).shifted(-2).limit(2).asList());
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to