Interface XWPFBodyContentsHandler
- All Known Implementing Classes:
OOXMLTikaBodyPartHandler
public interface XWPFBodyContentsHandler
Callback interface for receiving structured document events from the
OOXML SAX dispatcher. Implementations convert these events into output
formats (e.g., XHTML, Markdown, plain text).
-
Method Summary
Modifier and TypeMethodDescriptionvoidCalled when a comment reference is encountered in the document body.voidembeddedOLERef(String refId, String progId, String emfImageRId) voidembeddedPicRef(String picFileName, String picDescription) voidendBookmark(String id) voidvoidvoidvoidendSDT()voidendTable()voidvoiddefault voidexternalRef(String fieldType, String url) Called when an external reference URL is found in a field code.default voidCalled when a hyperlink is found via a field code (instrText HYPERLINK).voidvoidvoidhyperlinkStart(String link) booleanbooleanvoidlinkedOLERef(String refId) Called when a linked (vs embedded) OLE object is found.voidrun(RunProperties runProperties, String contents) voidstartBookmark(String id, String name) voidstartEditedSection(String editor, Date date, EditType editType) voidstartParagraph(ParagraphProperties paragraphProperties) voidstartSDT()voidvoidvoid
-
Method Details
-
run
- Throws:
SAXException
-
hyperlinkStart
- Parameters:
link- the link; can be null- Throws:
SAXException
-
fieldCodeHyperlinkStart
Called when a hyperlink is found via a field code (instrText HYPERLINK). Distinct from relationship-based hyperlinks for security tracking purposes.- Parameters:
link- the link URL- Throws:
SAXException
-
hyperlinkEnd
- Throws:
SAXException
-
startParagraph
- Throws:
SAXException
-
endParagraph
- Throws:
SAXException
-
startTable
- Throws:
SAXException
-
endTable
- Throws:
SAXException
-
startTableRow
- Throws:
SAXException
-
endTableRow
- Throws:
SAXException
-
startTableCell
- Throws:
SAXException
-
endTableCell
- Throws:
SAXException
-
startSDT
- Throws:
SAXException
-
endSDT
- Throws:
SAXException
-
startEditedSection
- Throws:
SAXException
-
endEditedSection
- Throws:
SAXException
-
isIncludeDeletedText
- Throws:
SAXException
-
footnoteReference
- Throws:
SAXException
-
endnoteReference
- Throws:
SAXException
-
commentReference
Called when a comment reference is encountered in the document body.- Parameters:
id- the comment ID- Throws:
SAXException
-
isIncludeMoveFromText
- Throws:
SAXException
-
embeddedOLERef
- Throws:
SAXException
-
linkedOLERef
Called when a linked (vs embedded) OLE object is found. These reference external files and are a security concern.- Throws:
SAXException
-
embeddedPicRef
- Throws:
SAXException
-
startBookmark
- Throws:
SAXException
-
endBookmark
- Throws:
SAXException
-
externalRef
Called when an external reference URL is found in a field code. This includes INCLUDEPICTURE, INCLUDETEXT, IMPORT, LINK fields, and DrawingML/VML hyperlinks on shapes.- Parameters:
fieldType- the type of field (e.g., "INCLUDEPICTURE", "hlinkHover", "vml-href")url- the external URL- Throws:
SAXException
-