public synchronized void processCas(CAS aCAS) throws ResourceProcessException {
try {
// iterate and print annotations
FSIterator typeIterator = aCAS.getCurrentView().getAnnotationIndex().iterator();
for (typeIterator.moveToFirst(); typeIterator.isValid(); typeIterator.moveToNext()) {
AnnotationFS annot = (AnnotationFS) typeIterator.get();
this.fileWriter.write(annot.getCoveredText());
this.fileWriter.write(System.getProperty("line.separator"));
this.fileWriter.write(annot.toString());