java.lang.Objectcom.aspose.words.DocumentVisitor
public abstract class DocumentVisitor
With DocumentVisitor you can define and execute custom operations
that require enumeration over the document tree. For example, Aspose.Words uses DocumentVisitor internally for saving Document
in various formats and for other operations like finding fields or bookmarks over
a fragment of a document. To use DocumentVisitor: DocumentVisitor provides default implementations for all of the VisitXXX methods
to make it easier to create new document visitors as only the methods required for the particular
visitor need to be overridden. It is not necessary to override all of the visitor methods. For more information see the Visitor design pattern.
Method Summary | ||
---|---|---|
int | visitAbsolutePositionTab(AbsolutePositionTab tab) | |
Called when a |
||
int | visitBodyEnd(Body body) | |
Called when enumeration of the main text story in a section has ended. | ||
int | visitBodyStart(Body body) | |
Called when enumeration of the main text story in a section has started. | ||
int | visitBookmarkEnd(BookmarkEnd bookmarkEnd) | |
Called when an end of a bookmark is encountered in the document. | ||
int | visitBookmarkStart(BookmarkStart bookmarkStart) | |
Called when a start of a bookmark is encountered in the document. | ||
int | visitBuildingBlockEnd(BuildingBlock block) | |
Called when enumeration of a building block has ended. | ||
int | visitBuildingBlockStart(BuildingBlock block) | |
Called when enumeration of a building block has started. | ||
int | visitCommentEnd(Comment comment) | |
Called when enumeration of a comment text has ended. | ||
int | visitCommentRangeEnd(CommentRangeEnd commentRangeEnd) | |
Called when the end of a commented range of text is encountered. | ||
int | visitCommentRangeStart(CommentRangeStart commentRangeStart) | |
Called when the start of a commented range of text is encountered. | ||
int | visitCommentStart(Comment comment) | |
Called when enumeration of a comment text has started. | ||
int | visitDocumentEnd(Document doc) | |
Called when enumeration of the document has finished. | ||
int | visitDocumentStart(Document doc) | |
Called when enumeration of the document has started. | ||
int | visitEditableRangeEnd(EditableRangeEnd editableRangeEnd) | |
Called when an end of an editable range is encountered in the document. | ||
int | visitEditableRangeStart(EditableRangeStart editableRangeStart) | |
Called when a start of an editable range is encountered in the document. | ||
int | visitFootnoteEnd(Footnote footnote) | |
Called when enumeration of a footnote or endnote text has ended. | ||
int | visitFootnoteStart(Footnote footnote) | |
Called when enumeration of a footnote or endnote text has started. | ||
int | visitGlossaryDocumentEnd(GlossaryDocument glossary) | |
Called when enumeration of a glossary document has ended. | ||
int | visitGlossaryDocumentStart(GlossaryDocument glossary) | |
Called when enumeration of a glossary document has started. | ||
int | visitGroupShapeEnd(GroupShape groupShape) | |
Called when enumeration of a group shape has ended. | ||
int | visitGroupShapeStart(GroupShape groupShape) | |
Called when enumeration of a group shape has started. | ||
int | visitHeaderFooterEnd(HeaderFooter headerFooter) | |
Called when enumeration of a header or footer in a section has ended. | ||
int | visitHeaderFooterStart(HeaderFooter headerFooter) | |
Called when enumeration of a header or footer in a section has started. | ||
int | visitParagraphEnd(Paragraph paragraph) | |
Called when enumeration of a paragraph has ended. | ||
int | visitParagraphStart(Paragraph paragraph) | |
Called when enumeration of a paragraph has started. | ||
int | visitRun(Run run) | |
Called when a run of text in the is encountered. | ||
int | visitSectionEnd(Section section) | |
Called when enumeration of a section has ended. | ||
int | visitSectionStart(Section section) | |
Called when enumeration of a section has started. | ||
int | visitShapeEnd(Shape shape) | |
Called when enumeration of a shape has ended. | ||
int | visitShapeStart(Shape shape) | |
Called when enumeration of a shape has started. | ||
int | visitSpecialChar(SpecialChar specialChar) | |
Called when a |
||
int | visitSubDocument(SubDocument subDocument) | |
Called when a subDocument is encountered. |
Method Detail |
---|
visitAbsolutePositionTab | |
public int visitAbsolutePositionTab(AbsolutePositionTab tab) throws java.lang.Exception |
tab
- The object that is being visited.visitBodyEnd | |
public int visitBodyEnd(Body body) throws java.lang.Exception |
body
- The object that is being visited.visitBodyStart | |
public int visitBodyStart(Body body) throws java.lang.Exception |
body
- The object that is being visited.visitBookmarkEnd | |
public int visitBookmarkEnd(BookmarkEnd bookmarkEnd) throws java.lang.Exception |
bookmarkEnd
- The object that is being visited.visitBookmarkStart | |
public int visitBookmarkStart(BookmarkStart bookmarkStart) throws java.lang.Exception |
bookmarkStart
- The object that is being visited.visitBuildingBlockEnd | |
public int visitBuildingBlockEnd(BuildingBlock block) throws java.lang.Exception |
Note: A building block node and its children are not visited when you execute a
Visitor over a
block
- The object that is being visited.visitBuildingBlockStart | |
public int visitBuildingBlockStart(BuildingBlock block) throws java.lang.Exception |
Note: A building block node and its children are not visited when you execute a
Visitor over a
block
- The object that is being visited.visitCommentEnd | |
public int visitCommentEnd(Comment comment) throws java.lang.Exception |
comment
- The object that is being visited.visitCommentRangeEnd | |
public int visitCommentRangeEnd(CommentRangeEnd commentRangeEnd) throws java.lang.Exception |
commentRangeEnd
- The object that is being visited.visitCommentRangeStart | |
public int visitCommentRangeStart(CommentRangeStart commentRangeStart) throws java.lang.Exception |
commentRangeStart
- The object that is being visited.visitCommentStart | |
public int visitCommentStart(Comment comment) throws java.lang.Exception |
comment
- The object that is being visited.visitDocumentEnd | |
public int visitDocumentEnd(Document doc) throws java.lang.Exception |
doc
- The object that is being visited.visitDocumentStart | |
public int visitDocumentStart(Document doc) throws java.lang.Exception |
doc
- The object that is being visited.visitEditableRangeEnd | |
public int visitEditableRangeEnd(EditableRangeEnd editableRangeEnd) throws java.lang.Exception |
editableRangeEnd
- The object that is being visited.visitEditableRangeStart | |
public int visitEditableRangeStart(EditableRangeStart editableRangeStart) throws java.lang.Exception |
editableRangeStart
- The object that is being visited.visitFootnoteEnd | |
public int visitFootnoteEnd(Footnote footnote) throws java.lang.Exception |
footnote
- The object that is being visited.visitFootnoteStart | |
public int visitFootnoteStart(Footnote footnote) throws java.lang.Exception |
footnote
- The object that is being visited.visitGlossaryDocumentEnd | |
public int visitGlossaryDocumentEnd(GlossaryDocument glossary) throws java.lang.Exception |
Note: A glossary document node and its children are not visited when you execute a
Visitor over a
glossary
- The object that is being visited.visitGlossaryDocumentStart | |
public int visitGlossaryDocumentStart(GlossaryDocument glossary) throws java.lang.Exception |
Note: A glossary document node and its children are not visited when you execute a
Visitor over a
glossary
- The object that is being visited.visitGroupShapeEnd | |
public int visitGroupShapeEnd(GroupShape groupShape) throws java.lang.Exception |
groupShape
- The object that is being visited.visitGroupShapeStart | |
public int visitGroupShapeStart(GroupShape groupShape) throws java.lang.Exception |
groupShape
- The object that is being visited.visitHeaderFooterEnd | |
public int visitHeaderFooterEnd(HeaderFooter headerFooter) throws java.lang.Exception |
headerFooter
- The object that is being visited.visitHeaderFooterStart | |
public int visitHeaderFooterStart(HeaderFooter headerFooter) throws java.lang.Exception |
headerFooter
- The object that is being visited.visitParagraphEnd | |
public int visitParagraphEnd(Paragraph paragraph) throws java.lang.Exception |
paragraph
- The object that is being visited.visitParagraphStart | |
public int visitParagraphStart(Paragraph paragraph) throws java.lang.Exception |
paragraph
- The object that is being visited.visitRun | |
public int visitRun(Run run) throws java.lang.Exception |
run
- The object that is being visited.visitSectionEnd | |
public int visitSectionEnd(Section section) throws java.lang.Exception |
section
- The object that is being visited.visitSectionStart | |
public int visitSectionStart(Section section) throws java.lang.Exception |
section
- The object that is being visited.visitShapeEnd | |
public int visitShapeEnd(Shape shape) throws java.lang.Exception |
shape
- The object that is being visited.visitShapeStart | |
public int visitShapeStart(Shape shape) throws java.lang.Exception |
shape
- The object that is being visited.visitSpecialChar | |
public int visitSpecialChar(SpecialChar specialChar) throws java.lang.Exception |
specialChar
- The object that is being visited.visitSubDocument | |
public int visitSubDocument(SubDocument subDocument) throws java.lang.Exception |
subDocument
- The object that is being visited.