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 2019/03/29 17:42:49 UTC
svn commit: r1856562 -
/uima/uv3/uimaj-v3/trunk/uimaj-core/src/main/java/org/apache/uima/cas/impl/Subiterator.java
Author: schor
Date: Fri Mar 29 17:42:49 2019
New Revision: 1856562
URL: http://svn.apache.org/viewvc?rev=1856562&view=rev
Log: (empty)
Modified:
uima/uv3/uimaj-v3/trunk/uimaj-core/src/main/java/org/apache/uima/cas/impl/Subiterator.java
Modified: uima/uv3/uimaj-v3/trunk/uimaj-core/src/main/java/org/apache/uima/cas/impl/Subiterator.java
URL: http://svn.apache.org/viewvc/uima/uv3/uimaj-v3/trunk/uimaj-core/src/main/java/org/apache/uima/cas/impl/Subiterator.java?rev=1856562&r1=1856561&r2=1856562&view=diff
==============================================================================
--- uima/uv3/uimaj-v3/trunk/uimaj-core/src/main/java/org/apache/uima/cas/impl/Subiterator.java (original)
+++ uima/uv3/uimaj-v3/trunk/uimaj-core/src/main/java/org/apache/uima/cas/impl/Subiterator.java Fri Mar 29 17:42:49 2019
@@ -1233,131 +1233,4 @@ public class Subiterator<T extends Annot
return comparatorMaybeNoTypeWithoutId;
}
-// /**
-// * Simple implementation:
-// * move to leftmost, then
-// * advance until == or invalid
-// */
-// @Override
-// public void moveToExactNoReinit(FeatureStructure fs) {
-// moveToNoReinit(fs);
-// while (isValid()) {
-// T f = getNvc();
-// if (f == fs) {
-// return;
-// }
-// if (comparatorMaybeNoTypeWithoutId.compare((TOP)f, (TOP)fs) != 0) {
-// makeInvalid();
-// return;
-// }
-// moveToNextNvc();
-// }
-// }
-
-// // makes an extra copy of the items
-// private void initAmbiguousSubiterator(AnnotationFS annot, final boolean strict) {
-// final int start = (annot == null) ? 0 : annot.getBegin();
-// final int boundingEnd = (annot == null) ? Integer.MAX_VALUE : annot.getEnd();
-// if (annot == null) {
-// it.moveToFirst();
-// } else {
-// it.moveToNoReinit(annot); // to "earliest" equal, or if none are equal, to the one just later than annot
-// }
-//
-// // This is a little silly, it skips 1 of possibly many indexed annotations if the earliest one is "equal"
-// // (just means matching the keys) to the control annot 4/2015
-// if (it.isValid() && it.get().equals(annot)) {
-// it.moveToNext();
-// }
-// // Skip annotations whose start is before the start parameter.
-// // should never have any???
-// while (it.isValid() && it.get().getBegin() < start) {
-// it.moveToNext();
-// }
-// T current;
-// while (it.isValid()) {
-// current = it.get();
-// // If the start of the current annotation is past the boundingEnd parameter,
-// // we're done.
-// if (current.getBegin() > boundingEnd) {
-// break;
-// }
-// it.moveToNext();
-// if (strict && current.getEnd() > boundingEnd) {
-// continue;
-// }
-// this.list.add(current);
-// }
-// }
-//
-// private void initUnambiguousSubiterator(AnnotationFS annot, final boolean strict) {
-// final int start = annot.getBegin();
-// final int boundingEnd = annot.getEnd();
-// it.moveToNoReinit(annot);
-//
-// if (it.isValid() && it.get().equals(annot)) {
-// it.moveToNext();
-// }
-// if (!it.isValid()) {
-// return;
-// }
-// annot = it.get();
-// // Skip annotations with begin positions before the given start
-// // position.
-// while (it.isValid() && ((start > annot.getBegin()) || (strict && annot.getEnd() > boundingEnd))) {
-// it.moveToNext();
-// }
-// // Add annotations.
-// if (!it.isValid()) {
-// return;
-// }
-// T current = null;
-// while (it.isValid()) {
-// final T next = it.get();
-// // If the next annotation overlaps, skip it. Don't check while there is no "current" yet.
-// if ((current != null) && (next.getBegin() < current.getEnd())) {
-// it.moveToNext();
-// continue;
-// }
-// // If we're past the boundingEnd, stop.
-// if (next.getBegin() > boundingEnd) {
-// break;
-// }
-// // We have an annotation that's within the boundaries and doesn't
-// // overlap
-// // with the previous annotation. We add this annotation if we're not
-// // strict, or the end position is within the limits.
-// if (!strict || next.getEnd() <= boundingEnd) {
-// current = next;
-// this.list.add(current);
-// }
-// it.moveToNext();
-// }
-///**
-//* Called for begin/end compare, after moveTo(fs)
-//* to eliminate the effect of the type order comparison before any adjustment for strict.
-//* Move backwards while equal with begin/end iterator.
-//*/
-//private void adjustAfterMoveToForBeginEndComparator(FeatureStructure aFs) {
-// final Annotation fs = (Annotation) aFs;
-// final int begin = fs.getBegin();
-// final int end = fs.getEnd();
-//
-// while (it.isValid()) {
-// Annotation item = it.getNvc();
-// if (item.getBegin() != begin || item.getEnd() != end) {
-// break;
-// }
-// it.moveToPrevious();
-// }
-// // are one position too far, move back one
-// if (it.isValid()) {
-// it.moveToNext();
-// } else {
-// moveToStart();
-// }
-//}
-
-// }
-
}