Workitem wi = new Workitem(jcas);
wi.setInputspec(mWorkList.get(mCurrentIndex).filename);
wi.setOutputspec(mWorkList.get(mCurrentIndex).outname);
wi.setSendToLast(mSendToLast);
wi.setSendToAll(mSendToAll);
wi.addToIndexes();
logger.log(Level.INFO, "Sending "+wi.getInputspec());
mCurrentIndex++;
jcas.setDocumentText(wi.getInputspec());
} catch (CASException e) {
throw new CollectionException(e);