// Add section (segment) annotations
Iterator<String> segmentItr = (Iterator<String>)dmd.getSegmentIdentifiers().iterator();
while (segmentItr.hasNext())
{
String segmentID = (String) segmentItr.next();
SegmentMetaData smd = dmd.getSegment(segmentID);
Segment sa = new Segment(plaintextView);
sa.setBegin(smd.span.start);
sa.setEnd(smd.span.end);
sa.setId(smd.id);