}
Iterator<?> sentItr = jcas.getJFSIndexRepository().getAnnotationIndex(
Sentence.type).iterator();
while (sentItr.hasNext()) {
Sentence sentAnn = (Sentence) sentItr.next();
/**
* This is not to use the specified section.
* 2-23-2009
* The sentence adjuster has a separate means to check for skipped segments, so
* this needs to be tested here as well.
* 9-8-2011
*/
// ---
// if (sectionsToIgnore.contains(sentAnn.getSegmentId())) {
// // System.out.println("---"+sentAnn.getSegmentId()+"|"+sentAnn.getCoveredText());
// continue;
// }
Iterator<?> segItr = jcas.getJFSIndexRepository().getAnnotationIndex(Segment.type).iterator();
Boolean skip = false;
while (segItr.hasNext() && !skip) {
Segment segment = (Segment) segItr.next();
if (segment.getBegin() <= sentAnn.getBegin() && segment.getEnd() >= sentAnn.getEnd()
&& sectionsToIgnore.contains(segment.getId()))
skip = true;
}
// ---
if (!skip) {
ClassifiableEntry entry = new ClassifiableEntry();
entry.iv_recordID = recordID;
entry.iv_begin = sentAnn.getBegin();
entry.iv_end = sentAnn.getEnd();
entry.iv_text = sentAnn.getCoveredText();
entryList.add(entry);
}
}
// collect segment annotations