Example usage for org.apache.poi.hwpf.extractor WordExtractor getCommentsText

List of usage examples for org.apache.poi.hwpf.extractor WordExtractor getCommentsText

Introduction

In this page you can find the example usage for org.apache.poi.hwpf.extractor WordExtractor getCommentsText.

Prototype

public String[] getCommentsText() 

Source Link

Usage

From source file:org.olat.search.service.document.file.WordDocument.java

License:Apache License

private void collectWordDocument(final POIFSFileSystem filesystem, final StringBuilder sb) throws IOException {
    final WordExtractor extractor = new WordExtractor(filesystem);
    addTextIfAny(sb, extractor.getHeaderText());
    for (final String paragraph : extractor.getParagraphText()) {
        sb.append(paragraph).append(' ');
    }/*www  . ja v a 2  s .com*/

    for (final String paragraph : extractor.getFootnoteText()) {
        sb.append(paragraph).append(' ');
    }

    for (final String paragraph : extractor.getCommentsText()) {
        sb.append(paragraph).append(' ');
    }

    for (final String paragraph : extractor.getEndnoteText()) {
        sb.append(paragraph).append(' ');
    }
    addTextIfAny(sb, extractor.getFooterText());
}