@Test public void testSelectBetweenInclusion() { Token t1 = new Token(jCas, 45, 57); t1.addToIndexes(); Token t2 = new Token(jCas, 52, 52); t2.addToIndexes(); new Sentence(jCas, 52, 52).addToIndexes(); List<Sentence> stem1 = selectBetween(jCas, Sentence.class, t1, t2); assertTrue(stem1.isEmpty()); }
public static <T extends Annotation> List<T> selectBetween(final Class<T> type, AnnotationFS ann1, AnnotationFS ann2) { return cast(CasUtil.selectBetween(CasUtil.getType(ann1.getCAS(), type), ann1, ann2)); }
JCasUtil { public static <T extends Annotation> List<T> selectBetween(final Class<T> type, AnnotationFS ann1, AnnotationFS ann2) { return cast(CasUtil.selectBetween(CasUtil.getType(ann1.getCAS(), type), ann1, ann2)); } }
JCasUtil { public static <T extends Annotation> List<T> selectBetween(final Class<T> type, AnnotationFS ann1, AnnotationFS ann2) { return cast(CasUtil.selectBetween(CasUtil.getType(ann1.getCAS(), type), ann1, ann2)); } private  JCasUtil(); }
JCasUtil { public static <T extends Annotation> List<T> selectBetween(final Class<T> type, AnnotationFS ann1, AnnotationFS ann2) { return cast(CasUtil.selectBetween(CasUtil.getType(ann1.getCAS(), type), ann1, ann2)); } private  JCasUtil(); static Iterable<T> subiterate(final JCas jCas, final Class<T> type,
          final AnnotationFS container, final boolean ambiguous, final boolean strict); @Deprecated static Iterator<T> iterator(JCas jCas, Class<T> type); @SuppressWarnings("unchecked") static Iterator<T> iterator(AnnotationFS container,
          Class<T> type, boolean ambiguous, boolean strict); static Type getType(JCas jCas, Class<?> type); static Type getAnnotationType(JCas jCas, Class<?> type); static List<T> select(final FSArray array, final Class<T> type); static List<T> select(final FSList list, final Class<T> type); static Collection<T> select(final JCas jCas, final Class<T> type); static List<T> selectAt(final JCas jCas, final Class<T> type,
          int aBegin, int aEnd); @SuppressWarnings("unchecked") static T selectSingleAt(final JCas jCas, final Class<T> type,
          int aBegin, int aEnd); static Collection<TOP> selectAll(final JCas jCas); static List<T> selectBetween(final Class<T> type,
          AnnotationFS ann1, AnnotationFS ann2); static List<T> selectBetween(JCas jCas, final Class<T> type,
          AnnotationFS ann1, AnnotationFS ann2); static List<T> selectCovered(Class<T> type,
          AnnotationFS coveringAnnotation); static List<T> selectCovered(JCas jCas, final Class<T> type,
          AnnotationFS coveringAnnotation); static List<T> selectCovered(JCas jCas, final Class<T> type,
          int begin, int end); static List<T> selectCovering(Class<T> type,
          AnnotationFS coveredAnnotation); static List<T> selectCovering(JCas jCas, Class<T> type,
          AnnotationFS coveredAnnotation); static List<T> selectCovering(JCas jCas, Class<T> type, int begin,
          int end); static Map<T, List<S>> indexCovering(
          JCas jCas, Class<? extends T> type, Class<? extends S> coveringType); static Map<T, List<S>> indexCovered(
          JCas jCas, Class<? extends T> type, Class<? extends S> coveredType); static boolean contains(JCas jCas, AnnotationFS coveringAnnotation,
          Class<? extends Annotation> type); @SuppressWarnings("unchecked") static T selectByIndex(JCas jCas, Class<T> cls, int index); @SuppressWarnings("unchecked") static T selectSingle(JCas jCas, Class<T> type); @SuppressWarnings("unchecked") static T selectSingleRelative(Class<T> aType,
          AnnotationFS annotation, int index); @SuppressWarnings("unchecked") static T selectSingleRelative(JCas aJCas, Class<T> aType,
          AnnotationFS aAnchor, int aPosition); static List<T> selectPreceding(Class<T> aType,
          AnnotationFS annotation, int count); static List<T> selectPreceding(JCas aJCas, Class<T> aType,
          AnnotationFS annotation, int count); static List<T> selectFollowing(Class<T> aType,
          AnnotationFS annotation, int count); static List<T> selectFollowing(JCas aJCas, Class<T> aType,
          AnnotationFS annotation, int count); static boolean exists(JCas aJCas, Class<T> aType); static JCas getView(JCas jcas, String viewName, JCas fallback); static JCas getView(JCas jcas, String viewName, boolean create); static List<String> toText(Iterable<T> iterable); }
JCasUtil { public static <T extends Annotation> List<T> selectBetween(final Class<T> type, AnnotationFS ann1, AnnotationFS ann2) { return cast(CasUtil.selectBetween(CasUtil.getType(ann1.getCAS(), type), ann1, ann2)); } private  JCasUtil(); static Iterable<T> subiterate(final JCas jCas, final Class<T> type,
          final AnnotationFS container, final boolean ambiguous, final boolean strict); @Deprecated static Iterator<T> iterator(JCas jCas, Class<T> type); @SuppressWarnings("unchecked") static Iterator<T> iterator(AnnotationFS container,
          Class<T> type, boolean ambiguous, boolean strict); static Type getType(JCas jCas, Class<?> type); static Type getAnnotationType(JCas jCas, Class<?> type); static List<T> select(final FSArray array, final Class<T> type); static List<T> select(final FSList list, final Class<T> type); static Collection<T> select(final JCas jCas, final Class<T> type); static List<T> selectAt(final JCas jCas, final Class<T> type,
          int aBegin, int aEnd); @SuppressWarnings("unchecked") static T selectSingleAt(final JCas jCas, final Class<T> type,
          int aBegin, int aEnd); static Collection<TOP> selectAll(final JCas jCas); static List<T> selectBetween(final Class<T> type,
          AnnotationFS ann1, AnnotationFS ann2); static List<T> selectBetween(JCas jCas, final Class<T> type,
          AnnotationFS ann1, AnnotationFS ann2); static List<T> selectCovered(Class<T> type,
          AnnotationFS coveringAnnotation); static List<T> selectCovered(JCas jCas, final Class<T> type,
          AnnotationFS coveringAnnotation); static List<T> selectCovered(JCas jCas, final Class<T> type,
          int begin, int end); static List<T> selectCovering(Class<T> type,
          AnnotationFS coveredAnnotation); static List<T> selectCovering(JCas jCas, Class<T> type,
          AnnotationFS coveredAnnotation); static List<T> selectCovering(JCas jCas, Class<T> type, int begin,
          int end); static Map<T, List<S>> indexCovering(
          JCas jCas, Class<? extends T> type, Class<? extends S> coveringType); static Map<T, List<S>> indexCovered(
          JCas jCas, Class<? extends T> type, Class<? extends S> coveredType); static boolean contains(JCas jCas, AnnotationFS coveringAnnotation,
          Class<? extends Annotation> type); @SuppressWarnings("unchecked") static T selectByIndex(JCas jCas, Class<T> cls, int index); @SuppressWarnings("unchecked") static T selectSingle(JCas jCas, Class<T> type); @SuppressWarnings("unchecked") static T selectSingleRelative(Class<T> aType,
          AnnotationFS annotation, int index); @SuppressWarnings("unchecked") static T selectSingleRelative(JCas aJCas, Class<T> aType,
          AnnotationFS aAnchor, int aPosition); static List<T> selectPreceding(Class<T> aType,
          AnnotationFS annotation, int count); static List<T> selectPreceding(JCas aJCas, Class<T> aType,
          AnnotationFS annotation, int count); static List<T> selectFollowing(Class<T> aType,
          AnnotationFS annotation, int count); static List<T> selectFollowing(JCas aJCas, Class<T> aType,
          AnnotationFS annotation, int count); static boolean exists(JCas aJCas, Class<T> aType); static JCas getView(JCas jcas, String viewName, JCas fallback); static JCas getView(JCas jcas, String viewName, boolean create); static List<String> toText(Iterable<T> iterable);  }