textTableOfContentEntryTemplate
.newTextIndexEntryLinkEndElement();
}
TextIndexBodyElement textIndexBody = textTableOfContent
.newTextIndexBodyElement();
TextIndexTitleElement TextIndexTitle = textIndexBody
.newTextIndexTitleElement("Table of Contents_Head");
TextPElement texp = TextIndexTitle.newTextPElement();
texp.setTextStyleNameAttribute("Contents_20_Heading");
texp.setTextContent("Table of Contents");
Iterator<Paragraph> paragraphIterator = getParagraphIterator();
while (paragraphIterator.hasNext()) {
Paragraph paragraph = paragraphIterator.next();