You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by sc...@apache.org on 2016/10/19 17:36:25 UTC
svn commit: r1765689 - in
/uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src:
main/java/org/apache/uima/cas/impl/SelectFSs_impl.java
test/java/org/apache/uima/cas/test/AnnotationIteratorTest.java
Author: schor
Date: Wed Oct 19 17:36:25 2016
New Revision: 1765689
URL: http://svn.apache.org/viewvc?rev=1765689&view=rev
Log:
[UIMA-5115] some more renames, and correcting some reversed (because the update changed the default) tests
Modified:
uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/impl/SelectFSs_impl.java
uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/test/java/org/apache/uima/cas/test/AnnotationIteratorTest.java
Modified: uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/impl/SelectFSs_impl.java
URL: http://svn.apache.org/viewvc/uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/impl/SelectFSs_impl.java?rev=1765689&r1=1765688&r2=1765689&view=diff
==============================================================================
--- uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/impl/SelectFSs_impl.java (original)
+++ uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/impl/SelectFSs_impl.java Wed Oct 19 17:36:25 2016
@@ -87,7 +87,7 @@ public class SelectFSs_impl <T extends F
private boolean isPositionUsesType = false;
private boolean isUseAnnotationEquals = false; // for boundsUse only
private boolean isNonOverlapping = false;
- private boolean isEndWithinBounds = false;
+ private boolean isIncludeAnnotBeyondBounds = false;
private boolean isAllViews = false;
private boolean isNullOK = false;
private boolean isUnordered = false;
@@ -246,13 +246,13 @@ public class SelectFSs_impl <T extends F
}
@Override
- public SelectFSs_impl<T> includeAnnotationsWithEndBeyondBounds() { // AI known as "strict"
- isEndWithinBounds = true;
+ public SelectFSs_impl<T> includeAnnotationsWithEndBeyondBounds() { // AI known as "not strict"
+ isIncludeAnnotBeyondBounds = true;
return this;
}
@Override
- public SelectFSs_impl<T> includeAnnotationsWithEndBeyondBounds(boolean bEndWithinBounds) { // AI
- isEndWithinBounds = bEndWithinBounds;
+ public SelectFSs_impl<T> includeAnnotationsWithEndBeyondBounds(boolean includeAnnotationsWithEndBeyondBounds) { // AI
+ isIncludeAnnotBeyondBounds = includeAnnotationsWithEndBeyondBounds;
return this;
}
@@ -367,7 +367,7 @@ public class SelectFSs_impl <T extends F
public SelectFSs_impl<T> coveredBy(AnnotationFS fs) { // AI
boundsUse = BoundsUse.coveredBy;
this.boundingFs = fs;
- this.isEndWithinBounds = true; //default
+// this.isIncludeAnnotWithEndBeyondBounds = false; //default
return this;
}
@@ -375,7 +375,7 @@ public class SelectFSs_impl <T extends F
public SelectFSs_impl<T> coveredBy(int begin, int end) { // AI
boundsUse = BoundsUse.coveredBy;
this.boundingFs = makePosAnnot(begin, end);
- this.isEndWithinBounds = true; //default
+// this.isIncludeAnnotWithEndBeyondBounds = true; //default
return this;
}
@@ -401,7 +401,7 @@ public class SelectFSs_impl <T extends F
(reverse ? fs1 : fs2).getBegin());
this.boundsUse = BoundsUse.coveredBy;
this.isBackwards = reverse;
- this.isEndWithinBounds = true; // default
+// this.isIncludeAnnotWithEndBeyondBounds = true; // default
return this;
}
@@ -462,7 +462,7 @@ public class SelectFSs_impl <T extends F
isNonOverlapping ||
isPositionUsesType ||
isTypePriority ||
- isEndWithinBounds ||
+ isIncludeAnnotBeyondBounds ||
boundsUse != BoundsUse.notBounded ||
isFollowing || isPreceding;
@@ -652,7 +652,7 @@ public class SelectFSs_impl <T extends F
(FSIterator<AnnotationFS>)idx.iterator(),
boundingFs,
!isNonOverlapping, // ambiguous
- isEndWithinBounds, // strict
+ !isIncludeAnnotBeyondBounds, // strict
boundsUse,
isTypePriority,
isPositionUsesType,
Modified: uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/test/java/org/apache/uima/cas/test/AnnotationIteratorTest.java
URL: http://svn.apache.org/viewvc/uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/test/java/org/apache/uima/cas/test/AnnotationIteratorTest.java?rev=1765689&r1=1765688&r2=1765689&view=diff
==============================================================================
--- uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/test/java/org/apache/uima/cas/test/AnnotationIteratorTest.java (original)
+++ uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/test/java/org/apache/uima/cas/test/AnnotationIteratorTest.java Wed Oct 19 17:36:25 2016
@@ -354,7 +354,7 @@ public class AnnotationIteratorTest exte
AnnotationFS bigBound = this.cas.createAnnotation(this.sentenceType, 10, 41);
it = annotIndex.subiterator(bigBound, true, true); // ambiguous, and strict
assertCount("Subiterator over annot with big bound, strict", 38, it);
- select_it = cas.<AnnotationFS>select().coveredBy((Annotation) bigBound).includeAnnotationsWithEndBeyondBounds().fsIterator();
+ select_it = cas.<AnnotationFS>select().coveredBy((Annotation) bigBound).includeAnnotationsWithEndBeyondBounds(false).fsIterator();
assertCount("Subiterator select over annot with big bound, strict", 38, select_it);
select_it = cas.<AnnotationFS>select().coveredBy(bigBound).limit(7).includeAnnotationsWithEndBeyondBounds().fsIterator();
@@ -383,9 +383,9 @@ public class AnnotationIteratorTest exte
it = annotIndex.subiterator(bigBound, false, true); // unambiguous, strict
assertCount("Subiterator over annot unambiguous strict", 3, it);
- select_it = cas.<AnnotationFS>select().coveredBy((Annotation) bigBound).includeAnnotationsWithEndBeyondBounds().nonOverlapping().fsIterator();
+ select_it = cas.<AnnotationFS>select().coveredBy((Annotation) bigBound).includeAnnotationsWithEndBeyondBounds(false).nonOverlapping().fsIterator();
assertCount("Subiterator select over annot unambiguous strict", 3, select_it);
- select_it = cas.<AnnotationFS>select().backwards().coveredBy((Annotation) bigBound).includeAnnotationsWithEndBeyondBounds().nonOverlapping().fsIterator();
+ select_it = cas.<AnnotationFS>select().backwards().coveredBy((Annotation) bigBound).includeAnnotationsWithEndBeyondBounds(false).nonOverlapping().fsIterator();
assertCount("Subiterator select over annot unambiguous strict", 3, select_it);
// it = annotIndex.subiterator(bigBound, true, false);
@@ -399,15 +399,15 @@ public class AnnotationIteratorTest exte
// covered by implies endWithinBounds
select_it = select(annotIndex).coveredBy(bigBound).fsIterator();
- assertCount("Subiterator select over annot ambiguous not-strict", 38, select_it);
- select_it = annotIndex.<AnnotationFS>select().coveredBy(bigBound).fsIterator();
- assertCount("Subiterator select over annot ambiguous not-strict", 38, select_it);
- select_it = select(annotIndex).coveredBy(bigBound).includeAnnotationsWithEndBeyondBounds(false).fsIterator();
+ assertCount("Subiterator select over annot ambiguous strict", 38, select_it);
+ select_it = annotIndex.<AnnotationFS>select().coveredBy(bigBound).includeAnnotationsWithEndBeyondBounds(false).fsIterator();
+ assertCount("Subiterator select over annot ambiguous strict", 38, select_it);
+ select_it = select(annotIndex).coveredBy(bigBound).includeAnnotationsWithEndBeyondBounds(true).fsIterator();
assertCount("Subiterator select over annot ambiguous not-strict", 46, select_it);
it = annotIndex.subiterator(bigBound, false, false); // unambiguous, not strict
assertCount("Subiterator over annot, unambiguous, not-strict", 4, it);
- select_it = select(annotIndex).nonOverlapping().coveredBy(bigBound).includeAnnotationsWithEndBeyondBounds(false).fsIterator();
+ select_it = select(annotIndex).nonOverlapping().coveredBy(bigBound).includeAnnotationsWithEndBeyondBounds(true).fsIterator();
assertCount("Subiterator select over annot unambiguous not-strict", 4, select_it);
AnnotationFS sent = this.cas.getAnnotationIndex(this.sentenceType).iterator().get();