AnnotationSet containingAnnotations = inputAS.get(containingAnnotationTypeName);
//Iterator<Annotation> it = inputAnnotations.iterator();
//String content = document.getContent().toString();
List<Annotation> containingList = new ArrayList<Annotation>(containingAnnotations);
Collections.sort(containingList,new OffsetComparator());
for(Annotation containing : containingList) {
// export the contained for the span covered by containing
exportContainedAnnotations(outStream,containing.getStartNode().getOffset(),
containing.getEndNode().getOffset(),inputAS);
}