|
ASPOSE home |
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 | 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 | visitCellEnd(Cell cell) | |
Called when enumeration of a table cell has ended. | ||
int | visitCellStart(Cell cell) | |
Called when enumeration of a table cell has started. | ||
int | visitCommentEnd(Comment comment) | |
Called when enumeration of a comment text has ended. | ||
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 | visitFieldEnd(FieldEnd fieldEnd) | |
Called when a field ends in the document. | ||
int | visitFieldSeparator(FieldSeparator fieldSeparator) | |
Called when a field separator is encountered in the document. | ||
int | visitFieldStart(FieldStart fieldStart) | |
Called when a field starts 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 | visitFormField(FormField formField) | |
Called when a form field is encountered in the document. | ||
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 | visitRowEnd(Row row) | |
Called when enumeration of a table row has ended. | ||
int | visitRowStart(Row row) | |
Called when enumeration of a table row 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 SpecialChar node is encountered in the document. | ||
int | visitTableEnd(Table table) | |
Called when enumeration of a table has ended. | ||
int | visitTableStart(Table table) | |
Called when enumeration of a table has started. |
Method Detail |
---|
visitSpecialChar | |
public int visitSpecialChar(SpecialChar specialChar) throws java.lang.Exception |
specialChar
- The SpecialChar node that is being visited.visitGroupShapeEnd | |
public int visitGroupShapeEnd(GroupShape groupShape) throws java.lang.Exception |
groupShape
- The GroupShape node that is being visited.visitGroupShapeStart | |
public int visitGroupShapeStart(GroupShape groupShape) throws java.lang.Exception |
groupShape
- The GroupShape node that is being visited.visitShapeEnd | |
public int visitShapeEnd(Shape shape) throws java.lang.Exception |
shape
- The Shape node that is being visited.visitShapeStart | |
public int visitShapeStart(Shape shape) throws java.lang.Exception |
shape
- The Shape node that is being visited.visitCommentEnd | |
public int visitCommentEnd(Comment comment) throws java.lang.Exception |
comment
- The Comment node that is being visited.visitCommentStart | |
public int visitCommentStart(Comment comment) throws java.lang.Exception |
comment
- The Comment node that is being visited.visitFootnoteEnd | |
public int visitFootnoteEnd(Footnote footnote) throws java.lang.Exception |
footnote
- The Footnote node that is being visited.visitFootnoteStart | |
public int visitFootnoteStart(Footnote footnote) throws java.lang.Exception |
footnote
- The Footnote node that is being visited.visitBookmarkEnd | |
public int visitBookmarkEnd(BookmarkEnd bookmarkEnd) throws java.lang.Exception |
bookmarkEnd
- The BookmarkEnd node that is being visited.visitBookmarkStart | |
public int visitBookmarkStart(BookmarkStart bookmarkStart) throws java.lang.Exception |
bookmarkStart
- The BookmarkStart node that is being visited.visitFormField | |
public int visitFormField(FormField formField) throws java.lang.Exception |
formField
- The FormField node that is being visited.visitFieldEnd | |
public int visitFieldEnd(FieldEnd fieldEnd) throws java.lang.Exception |
For more info see
fieldEnd
- The FieldEnd node that is being visited.visitFieldSeparator | |
public int visitFieldSeparator(FieldSeparator fieldSeparator) throws java.lang.Exception |
The field separator separates field code from field value in the document. Note that some fields have only field code and do not have field separator and field value.
For more info see
fieldSeparator
- The FieldSeparator node that is being visited.visitFieldStart | |
public int visitFieldStart(FieldStart fieldStart) throws java.lang.Exception |
A field in a Word Word document consists of a field code and field value.
For example, a field that displays a page number can be represented as follows:
[FieldStart]PAGE[FieldSeparator]98[FieldEnd]
The field separator separates field code from field value in the document. Note that some fields have only field code and do not have field separator and field value.
Fields can be nested.
fieldStart
- The FieldStart node that is being visited.visitRun | |
public int visitRun(Run run) throws java.lang.Exception |
run
- The Run node that is being visited.visitCellEnd | |
public int visitCellEnd(Cell cell) throws java.lang.Exception |
cell
- The Cell node that is being visited.visitCellStart | |
public int visitCellStart(Cell cell) throws java.lang.Exception |
cell
- The Cell node that is being visited.visitRowEnd | |
public int visitRowEnd(Row row) throws java.lang.Exception |
row
- The Row node that is being visited.visitRowStart | |
public int visitRowStart(Row row) throws java.lang.Exception |
row
- The Row node that is being visited.visitTableEnd | |
public int visitTableEnd(Table table) throws java.lang.Exception |
table
- The Table node that is being visited.visitTableStart | |
public int visitTableStart(Table table) throws java.lang.Exception |
table
- The Table node that is being visited.visitParagraphEnd | |
public int visitParagraphEnd(Paragraph paragraph) throws java.lang.Exception |
paragraph
- The Paragraph node that is being visited.visitParagraphStart | |
public int visitParagraphStart(Paragraph paragraph) throws java.lang.Exception |
paragraph
- The Paragraph node that is being visited.visitHeaderFooterEnd | |
public int visitHeaderFooterEnd(HeaderFooter headerFooter) throws java.lang.Exception |
headerFooter
- The HeaderFooter node that is being visited.visitHeaderFooterStart | |
public int visitHeaderFooterStart(HeaderFooter headerFooter) throws java.lang.Exception |
headerFooter
- The HeaderFooter node that is being visited.visitBodyEnd | |
public int visitBodyEnd(Body body) throws java.lang.Exception |
body
- The Body node that is being visited.visitBodyStart | |
public int visitBodyStart(Body body) throws java.lang.Exception |
body
- The Body node that is being visited.visitSectionEnd | |
public int visitSectionEnd(Section section) throws java.lang.Exception |
section
- The Section that is being visited.visitSectionStart | |
public int visitSectionStart(Section section) throws java.lang.Exception |
section
- The Section that is being visited.visitDocumentEnd | |
public int visitDocumentEnd(Document doc) throws java.lang.Exception |
doc
- The Document that is being visited.visitDocumentStart | |
public int visitDocumentStart(Document doc) throws java.lang.Exception |
doc
- The Document that is being visited.
|
ASPOSE home |