LOG.info("Server request completed. Writing to the index");
/*
* Add the results to the AnnotationIndex
*/
for (Resource resource : response.getResources()) {
JCasResource res = new JCasResource(aJCas);
res.setBegin(documentOffset + new Integer(resource.getOffset()));
res.setEnd(documentOffset + new Integer(resource.getOffset())
+ resource.getSurfaceForm().length());
res.setSimilarityScore(new Double(resource.getSimilarityScore()));
res.setTypes(resource.getTypes());
res.setSupport(new Integer(resource.getSupport()));
res.setURI(resource.getURI());
res.addToIndexes(aJCas);
}
documentOffset += request.length() + 1 ;
}