// make the annotation
int start = offsetMap.getMapping(span.getStart());
int end = offsetMap.getMapping(span.getEnd());
Constructor annotationMaker = (Constructor) parseTagMap.get(tag);
if (annotationMaker != null) {
SyntaxAnnotation syntaxAnnot;
try {
syntaxAnnot = (SyntaxAnnotation) annotationMaker.newInstance(new Object[] { jCas });
} catch (Exception e) {
throw new AnalysisEngineProcessException(e);
}
syntaxAnnot.setBegin(start);
syntaxAnnot.setEnd(end);
syntaxAnnot.setComponentId(COMPONENT_NAME);
syntaxAnnot.addToIndexes();
}
Parse[] children = parse.getChildren();
for (int i = 0; i < children.length; i++) {
makeAnnotations(children[i], jCas);
}