String annoClass = anno.getClass().getName();
if (!setTypesToIgnore.contains(annoClass)
&& this.uimaTypeMap.containsKey(annoClass)) {
// should not ignore, and we know how to map this annotation
listAnno.add(anno);
DocumentAnnotation hibAnno = new DocumentAnnotation();
hibAnno.setDocument(doc);
hibAnno.setBegin(anno.getBegin());
hibAnno.setEnd(anno.getEnd());
hibAnno.setUimaType(uimaTypeMap.get(annoClass));
sessionFactory.getCurrentSession().save(hibAnno);
if (++count % batchSize == 0)
sessionFactory.getCurrentSession().flush();
doc.getDocumentAnnotations().add(hibAnno);
mapAnnoToHib.put(anno, hibAnno);