Example usage for org.apache.poi.xwpf.usermodel XWPFHeaderFooter getBodyElements

List of usage examples for org.apache.poi.xwpf.usermodel XWPFHeaderFooter getBodyElements

Introduction

In this page you can find the example usage for org.apache.poi.xwpf.usermodel XWPFHeaderFooter getBodyElements.

Prototype

public List<IBodyElement> getBodyElements() 

Source Link

Usage

From source file:mj.ocraptor.extraction.tika.parser.microsoft.ooxml.XWPFWordExtractorDecorator.java

License:Apache License

private void extractHeaderText(XHTMLContentHandler xhtml, XWPFHeaderFooter header)
        throws SAXException, XmlException, IOException {

    for (IBodyElement e : header.getBodyElements()) {
        if (e instanceof XWPFParagraph) {
            extractParagraph((XWPFParagraph) e, xhtml);
        } else if (e instanceof XWPFTable) {
            extractTable((XWPFTable) e, xhtml);
        } else if (e instanceof XWPFSDT) {
            extractSDT((XWPFSDT) e, xhtml);
        }/*  w  w w .  jav  a  2  s  .c o m*/
    }
}

From source file:org.apache.tika.parser.microsoft.ooxml.XWPFWordExtractorDecorator.java

License:Apache License

private void extractHeaderText(XHTMLContentHandler xhtml, XWPFHeaderFooter header, XWPFListManager listManager)
        throws SAXException, XmlException, IOException {

    for (IBodyElement e : header.getBodyElements()) {
        if (e instanceof XWPFParagraph) {
            extractParagraph((XWPFParagraph) e, listManager, xhtml);
        } else if (e instanceof XWPFTable) {
            extractTable((XWPFTable) e, listManager, xhtml);
        } else if (e instanceof XWPFSDT) {
            extractSDT((XWPFSDT) e, xhtml);
        }//from w w  w.  jav  a 2 s. c  o  m
    }
}