|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.poi.xwpf.converter.core.XWPFDocumentVisitor<T,O,E>
T - O - E - public abstract class XWPFDocumentVisitor<T,O extends Options,E extends IXWPFMasterPage>
Visitor to visit elements from entry word/document.xml, word/header*.xml, word/footer*.xml
| Field Summary | |
|---|---|
protected org.apache.poi.xwpf.usermodel.XWPFDocument |
document
|
protected O |
options
|
protected XWPFStylesDocument |
stylesDocument
|
protected static String |
WORD_MEDIA
|
| Constructor Summary | |
|---|---|
XWPFDocumentVisitor(org.apache.poi.xwpf.usermodel.XWPFDocument document,
O options)
|
|
| Method Summary | |
|---|---|
protected abstract void |
addNewLine(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTBr br,
T paragraphContainer)
|
protected XWPFStylesDocument |
createStylesDocument(org.apache.poi.xwpf.usermodel.XWPFDocument document)
|
protected abstract void |
endVisitDocument()
End of visit document. |
protected abstract void |
endVisitParagraph(org.apache.poi.xwpf.usermodel.XWPFParagraph paragraph,
T parentContainer,
T paragraphContainer)
|
protected abstract void |
endVisitTable(org.apache.poi.xwpf.usermodel.XWPFTable table,
T parentContainer,
T tableContainer)
|
protected abstract void |
endVisitTableCell(org.apache.poi.xwpf.usermodel.XWPFTableCell cell,
T tableContainer,
T tableCellContainer)
|
protected void |
endVisitTableRow(org.apache.poi.xwpf.usermodel.XWPFTableRow row,
T tableContainer,
boolean firstRow,
boolean lastRow,
boolean headerRow)
|
protected List<org.apache.poi.xwpf.usermodel.IBodyElement> |
getBodyElements(org.apache.poi.xwpf.usermodel.XWPFHeaderFooter part)
Returns the list of IBodyElement of the given header/footer. |
protected IImageExtractor |
getImageExtractor()
Returns the image extractor and null otherwise. |
MasterPageManager |
getMasterPageManager()
|
O |
getOptions()
|
org.apache.poi.xwpf.usermodel.XWPFPictureData |
getPictureData(org.openxmlformats.schemas.drawingml.x2006.picture.CTPicture picture)
Returns the picture data of the given picture. |
protected org.apache.poi.xwpf.usermodel.XWPFPictureData |
getPictureDataByID(String blipId)
Returns the picture data of the given image id. |
XWPFStylesDocument |
getStylesDocument()
|
protected org.apache.poi.xwpf.usermodel.XWPFAbstractNum |
getXWPFAbstractNum(org.apache.poi.xwpf.usermodel.XWPFNum num)
|
protected org.apache.poi.xwpf.usermodel.XWPFFooter |
getXWPFFooter(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTHdrFtrRef footerRef)
Returns the XWPFFooter of the given footer reference. |
protected org.apache.poi.xwpf.usermodel.XWPFHeader |
getXWPFHeader(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTHdrFtrRef headerRef)
Returns the XWPFHeader of the given header reference. |
protected org.apache.poi.xwpf.usermodel.XWPFNum |
getXWPFNum(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTNumPr numPr)
|
protected org.apache.poi.xwpf.usermodel.XWPFStyle |
getXWPFStyle(String styleID)
|
protected boolean |
isWordDocumentPartParsing()
Returns true if word/document.xml is parsing and false otherwise. |
protected abstract void |
pageBreak()
|
void |
start()
Main entry for visit XWPFDocument. |
protected abstract T |
startVisitDocument()
Start of visit document. |
protected abstract T |
startVisitParagraph(org.apache.poi.xwpf.usermodel.XWPFParagraph paragraph,
ListItemContext itemContext,
T parentContainer)
|
protected abstract T |
startVisitTable(org.apache.poi.xwpf.usermodel.XWPFTable table,
float[] colWidths,
T tableContainer)
|
protected abstract T |
startVisitTableCell(org.apache.poi.xwpf.usermodel.XWPFTableCell cell,
T tableContainer,
boolean firstRow,
boolean lastRow,
boolean firstCol,
boolean lastCol,
List<org.apache.poi.xwpf.usermodel.XWPFTableCell> vMergeCells)
|
protected void |
startVisitTableRow(org.apache.poi.xwpf.usermodel.XWPFTableRow row,
T tableContainer,
int rowIndex,
boolean headerRow)
|
protected void |
visitAnchor(org.openxmlformats.schemas.drawingml.x2006.wordprocessingDrawing.CTAnchor anchor,
T parentContainer)
|
protected void |
visitBodyElements(List<org.apache.poi.xwpf.usermodel.IBodyElement> bodyElements,
T container)
|
protected abstract void |
visitBookmark(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTBookmark bookmark,
org.apache.poi.xwpf.usermodel.XWPFParagraph paragraph,
T paragraphContainer)
|
protected void |
visitBR(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTBr br,
T paragraphContainer)
|
protected void |
visitCell(org.apache.poi.xwpf.usermodel.XWPFTableCell cell,
T tableContainer,
boolean firstRow,
boolean lastRow,
boolean firstCol,
boolean lastCol,
int rowIndex,
int cellIndex,
List<org.apache.poi.xwpf.usermodel.XWPFTableCell> vMergedCells)
|
protected void |
visitDrawing(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTDrawing drawing,
T parentContainer)
|
protected abstract void |
visitEmptyRun(T paragraphContainer)
|
protected abstract void |
visitFooter(org.apache.poi.xwpf.usermodel.XWPFFooter footer,
org.openxmlformats.schemas.wordprocessingml.x2006.main.CTHdrFtrRef footerRef,
org.openxmlformats.schemas.wordprocessingml.x2006.main.CTSectPr sectPr,
E masterPage)
|
void |
visitFooterRef(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTHdrFtrRef footerRef,
org.openxmlformats.schemas.wordprocessingml.x2006.main.CTSectPr sectPr,
E masterPage)
|
protected abstract void |
visitHeader(org.apache.poi.xwpf.usermodel.XWPFHeader header,
org.openxmlformats.schemas.wordprocessingml.x2006.main.CTHdrFtrRef headerRef,
org.openxmlformats.schemas.wordprocessingml.x2006.main.CTSectPr sectPr,
E masterPage)
|
void |
visitHeaderRef(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTHdrFtrRef headerRef,
org.openxmlformats.schemas.wordprocessingml.x2006.main.CTSectPr sectPr,
E masterPage)
|
protected void |
visitInline(org.openxmlformats.schemas.drawingml.x2006.wordprocessingDrawing.CTInline inline,
T parentContainer)
|
protected void |
visitParagraph(org.apache.poi.xwpf.usermodel.XWPFParagraph paragraph,
int index,
T container)
Visit the given paragraph. |
protected void |
visitParagraphBody(org.apache.poi.xwpf.usermodel.XWPFParagraph paragraph,
int index,
T paragraphContainer)
|
protected abstract void |
visitPicture(org.openxmlformats.schemas.drawingml.x2006.picture.CTPicture picture,
Float offsetX,
org.openxmlformats.schemas.drawingml.x2006.wordprocessingDrawing.STRelFromH.Enum relativeFromH,
Float offsetY,
org.openxmlformats.schemas.drawingml.x2006.wordprocessingDrawing.STRelFromV.Enum relativeFromV,
org.openxmlformats.schemas.drawingml.x2006.wordprocessingDrawing.STWrapText.Enum wrapText,
T parentContainer)
|
protected void |
visitRun(org.apache.poi.xwpf.usermodel.XWPFRun run,
boolean pageNumber,
String url,
T paragraphContainer)
|
protected abstract void |
visitTab(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTPTab o,
T paragraphContainer)
|
protected void |
visitTable(org.apache.poi.xwpf.usermodel.XWPFTable table,
int index,
T container)
|
protected void |
visitTableBody(org.apache.poi.xwpf.usermodel.XWPFTable table,
float[] colWidths,
T tableContainer)
|
protected void |
visitTableCellBody(org.apache.poi.xwpf.usermodel.XWPFTableCell cell,
List<org.apache.poi.xwpf.usermodel.XWPFTableCell> vMergeCells,
T tableCellContainer)
|
protected void |
visitTableRow(org.apache.poi.xwpf.usermodel.XWPFTableRow row,
float[] colWidths,
T tableContainer,
boolean firstRow,
boolean lastRowIfNoneVMerge,
int rowIndex,
int rowsSize)
|
protected abstract void |
visitTabs(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTabs tabs,
T paragraphContainer)
|
protected abstract void |
visitText(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTText ctText,
boolean pageNumber,
T paragraphContainer)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.apache.poi.xwpf.converter.core.IMasterPageHandler |
|---|
createMasterPage, setActiveMasterPage |
| Field Detail |
|---|
protected static final String WORD_MEDIA
protected final org.apache.poi.xwpf.usermodel.XWPFDocument document
protected final XWPFStylesDocument stylesDocument
protected final O extends Options options
| Constructor Detail |
|---|
public XWPFDocumentVisitor(org.apache.poi.xwpf.usermodel.XWPFDocument document,
O options)
throws Exception
Exception| Method Detail |
|---|
protected XWPFStylesDocument createStylesDocument(org.apache.poi.xwpf.usermodel.XWPFDocument document)
throws org.apache.xmlbeans.XmlException,
IOException
org.apache.xmlbeans.XmlException
IOExceptionpublic XWPFStylesDocument getStylesDocument()
getStylesDocument in interface IMasterPageHandler<E extends IXWPFMasterPage>public O getOptions()
public MasterPageManager getMasterPageManager()
public void start()
throws Exception
out -
Exception
protected abstract T startVisitDocument()
throws Exception
Exception
protected abstract void endVisitDocument()
throws Exception
Exception
protected void visitBodyElements(List<org.apache.poi.xwpf.usermodel.IBodyElement> bodyElements,
T container)
throws Exception
Exception
protected void visitParagraph(org.apache.poi.xwpf.usermodel.XWPFParagraph paragraph,
int index,
T container)
throws Exception
paragraph - index - container -
Exception
protected abstract T startVisitParagraph(org.apache.poi.xwpf.usermodel.XWPFParagraph paragraph,
ListItemContext itemContext,
T parentContainer)
throws Exception
Exception
protected abstract void endVisitParagraph(org.apache.poi.xwpf.usermodel.XWPFParagraph paragraph,
T parentContainer,
T paragraphContainer)
throws Exception
Exception
protected void visitParagraphBody(org.apache.poi.xwpf.usermodel.XWPFParagraph paragraph,
int index,
T paragraphContainer)
throws Exception
Exceptionprotected org.apache.poi.xwpf.usermodel.XWPFNum getXWPFNum(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTNumPr numPr)
protected org.apache.poi.xwpf.usermodel.XWPFAbstractNum getXWPFAbstractNum(org.apache.poi.xwpf.usermodel.XWPFNum num)
protected abstract void visitEmptyRun(T paragraphContainer)
throws Exception
Exception
protected void visitRun(org.apache.poi.xwpf.usermodel.XWPFRun run,
boolean pageNumber,
String url,
T paragraphContainer)
throws Exception
Exception
protected abstract void visitText(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTText ctText,
boolean pageNumber,
T paragraphContainer)
throws Exception
Exception
protected abstract void visitTab(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTPTab o,
T paragraphContainer)
throws Exception
Exception
protected abstract void visitTabs(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTabs tabs,
T paragraphContainer)
throws Exception
Exception
protected void visitBR(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTBr br,
T paragraphContainer)
throws Exception
Exception
protected abstract void visitBookmark(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTBookmark bookmark,
org.apache.poi.xwpf.usermodel.XWPFParagraph paragraph,
T paragraphContainer)
throws Exception
Exception
protected abstract void addNewLine(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTBr br,
T paragraphContainer)
throws Exception
Exception
protected abstract void pageBreak()
throws Exception
Exception
protected void visitTable(org.apache.poi.xwpf.usermodel.XWPFTable table,
int index,
T container)
throws Exception
Exception
protected void visitTableBody(org.apache.poi.xwpf.usermodel.XWPFTable table,
float[] colWidths,
T tableContainer)
throws Exception
Exception
protected abstract T startVisitTable(org.apache.poi.xwpf.usermodel.XWPFTable table,
float[] colWidths,
T tableContainer)
throws Exception
Exception
protected abstract void endVisitTable(org.apache.poi.xwpf.usermodel.XWPFTable table,
T parentContainer,
T tableContainer)
throws Exception
Exception
protected void visitTableRow(org.apache.poi.xwpf.usermodel.XWPFTableRow row,
float[] colWidths,
T tableContainer,
boolean firstRow,
boolean lastRowIfNoneVMerge,
int rowIndex,
int rowsSize)
throws Exception
Exception
protected void startVisitTableRow(org.apache.poi.xwpf.usermodel.XWPFTableRow row,
T tableContainer,
int rowIndex,
boolean headerRow)
throws Exception
Exception
protected void endVisitTableRow(org.apache.poi.xwpf.usermodel.XWPFTableRow row,
T tableContainer,
boolean firstRow,
boolean lastRow,
boolean headerRow)
throws Exception
Exception
protected void visitCell(org.apache.poi.xwpf.usermodel.XWPFTableCell cell,
T tableContainer,
boolean firstRow,
boolean lastRow,
boolean firstCol,
boolean lastCol,
int rowIndex,
int cellIndex,
List<org.apache.poi.xwpf.usermodel.XWPFTableCell> vMergedCells)
throws Exception
Exception
protected void visitTableCellBody(org.apache.poi.xwpf.usermodel.XWPFTableCell cell,
List<org.apache.poi.xwpf.usermodel.XWPFTableCell> vMergeCells,
T tableCellContainer)
throws Exception
Exception
protected abstract T startVisitTableCell(org.apache.poi.xwpf.usermodel.XWPFTableCell cell,
T tableContainer,
boolean firstRow,
boolean lastRow,
boolean firstCol,
boolean lastCol,
List<org.apache.poi.xwpf.usermodel.XWPFTableCell> vMergeCells)
throws Exception
Exception
protected abstract void endVisitTableCell(org.apache.poi.xwpf.usermodel.XWPFTableCell cell,
T tableContainer,
T tableCellContainer)
throws Exception
Exceptionprotected org.apache.poi.xwpf.usermodel.XWPFStyle getXWPFStyle(String styleID)
protected boolean isWordDocumentPartParsing()
public void visitHeaderRef(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTHdrFtrRef headerRef,
org.openxmlformats.schemas.wordprocessingml.x2006.main.CTSectPr sectPr,
E masterPage)
throws Exception
visitHeaderRef in interface IMasterPageHandler<E extends IXWPFMasterPage>Exception
protected abstract void visitHeader(org.apache.poi.xwpf.usermodel.XWPFHeader header,
org.openxmlformats.schemas.wordprocessingml.x2006.main.CTHdrFtrRef headerRef,
org.openxmlformats.schemas.wordprocessingml.x2006.main.CTSectPr sectPr,
E masterPage)
throws Exception
Exception
public void visitFooterRef(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTHdrFtrRef footerRef,
org.openxmlformats.schemas.wordprocessingml.x2006.main.CTSectPr sectPr,
E masterPage)
throws Exception
visitFooterRef in interface IMasterPageHandler<E extends IXWPFMasterPage>Exception
protected abstract void visitFooter(org.apache.poi.xwpf.usermodel.XWPFFooter footer,
org.openxmlformats.schemas.wordprocessingml.x2006.main.CTHdrFtrRef footerRef,
org.openxmlformats.schemas.wordprocessingml.x2006.main.CTSectPr sectPr,
E masterPage)
throws Exception
Exceptionprotected List<org.apache.poi.xwpf.usermodel.IBodyElement> getBodyElements(org.apache.poi.xwpf.usermodel.XWPFHeaderFooter part)
IBodyElement of the given header/footer. We do that because
XWPFHeaderFooter.getBodyElements() doesn't contains the //
part -
protected org.apache.poi.xwpf.usermodel.XWPFHeader getXWPFHeader(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTHdrFtrRef headerRef)
throws org.apache.xmlbeans.XmlException,
IOException
XWPFHeader of the given header reference.
headerref - the header reference.
org.apache.xmlbeans.XmlException
IOException
protected org.apache.poi.xwpf.usermodel.XWPFFooter getXWPFFooter(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTHdrFtrRef footerRef)
throws org.apache.xmlbeans.XmlException,
IOException
XWPFFooter of the given footer reference.
footerRef - the footer reference.
org.apache.xmlbeans.XmlException
IOException
protected void visitDrawing(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTDrawing drawing,
T parentContainer)
throws Exception
Exception
protected void visitAnchor(org.openxmlformats.schemas.drawingml.x2006.wordprocessingDrawing.CTAnchor anchor,
T parentContainer)
throws Exception
Exception
protected void visitInline(org.openxmlformats.schemas.drawingml.x2006.wordprocessingDrawing.CTInline inline,
T parentContainer)
throws Exception
Exceptionprotected org.apache.poi.xwpf.usermodel.XWPFPictureData getPictureDataByID(String blipId)
blipId -
protected IImageExtractor getImageExtractor()
public org.apache.poi.xwpf.usermodel.XWPFPictureData getPictureData(org.openxmlformats.schemas.drawingml.x2006.picture.CTPicture picture)
picture -
protected abstract void visitPicture(org.openxmlformats.schemas.drawingml.x2006.picture.CTPicture picture,
Float offsetX,
org.openxmlformats.schemas.drawingml.x2006.wordprocessingDrawing.STRelFromH.Enum relativeFromH,
Float offsetY,
org.openxmlformats.schemas.drawingml.x2006.wordprocessingDrawing.STRelFromV.Enum relativeFromV,
org.openxmlformats.schemas.drawingml.x2006.wordprocessingDrawing.STWrapText.Enum wrapText,
T parentContainer)
throws Exception
Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||