Class BaseDocumentWalker

java.lang.Object
org.wickedsource.docxstamper.util.walk.DocumentWalker
org.wickedsource.docxstamper.util.walk.BaseDocumentWalker
Direct Known Subclasses:
ParagraphResolverDocumentWalker

public abstract class BaseDocumentWalker extends DocumentWalker
This class is an abstract implementation of the DocumentWalker interface. It implements all methods of the interface and does nothing in the individual methods. This makes it easier to implement a custom DocumentWalker because the implementor only has to implement the methods that are of interest.
Version:
${version}
Author:
Joseph Verron
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    BaseDocumentWalker(org.docx4j.wml.ContentAccessor contentAccessor)
    Creates a new document walker that walks through the given document.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    onCommentRangeEnd(org.docx4j.wml.CommentRangeEnd commentRangeEnd)
    This method is called for every CommentRangeEnd element in the document.
    protected void
    onCommentRangeStart(org.docx4j.wml.CommentRangeStart commentRangeStart)
    This method is called for every CommentRangeStart element in the document.
    protected void
    onCommentReference(org.docx4j.wml.R.CommentReference commentReference)
    This method is called for every R.CommentReference element in the document.
    protected void
    onParagraph(org.docx4j.wml.P paragraph)
    This method is called for every P element in the document.
    protected void
    onRun(org.docx4j.wml.R run)
    This method is called for every R element in the document.
    protected void
    onTable(org.docx4j.wml.Tbl table)
    This method is called for every Tbl element in the document.
    protected void
    onTableCell(org.docx4j.wml.Tc tableCell)
    This method is called for every Tc element in the document.
    protected void
    onTableRow(org.docx4j.wml.Tr tableRow)
    This method is called for every Tr element in the document.

    Methods inherited from class org.wickedsource.docxstamper.util.walk.DocumentWalker

    walk

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • BaseDocumentWalker

      protected BaseDocumentWalker(org.docx4j.wml.ContentAccessor contentAccessor)
      Creates a new document walker that walks through the given document.
      Parameters:
      contentAccessor - the document to walk through.
  • Method Details

    • onParagraph

      protected void onParagraph(org.docx4j.wml.P paragraph)
      This method is called for every P element in the document.
      Specified by:
      onParagraph in class DocumentWalker
      Parameters:
      paragraph - the P element to process.
    • onRun

      protected void onRun(org.docx4j.wml.R run)
      This method is called for every R element in the document.
      Specified by:
      onRun in class DocumentWalker
      Parameters:
      run - the R element to process.
    • onTable

      protected void onTable(org.docx4j.wml.Tbl table)
      This method is called for every Tbl element in the document.
      Specified by:
      onTable in class DocumentWalker
      Parameters:
      table - the Tbl element to process.
    • onTableCell

      protected void onTableCell(org.docx4j.wml.Tc tableCell)
      This method is called for every Tc element in the document.
      Specified by:
      onTableCell in class DocumentWalker
      Parameters:
      tableCell - the Tc element to process.
    • onTableRow

      protected void onTableRow(org.docx4j.wml.Tr tableRow)
      This method is called for every Tr element in the document.
      Specified by:
      onTableRow in class DocumentWalker
      Parameters:
      tableRow - the Tr element to process.
    • onCommentRangeStart

      protected void onCommentRangeStart(org.docx4j.wml.CommentRangeStart commentRangeStart)
      This method is called for every CommentRangeStart element in the document.
      Specified by:
      onCommentRangeStart in class DocumentWalker
      Parameters:
      commentRangeStart - the CommentRangeStart element to process.
    • onCommentRangeEnd

      protected void onCommentRangeEnd(org.docx4j.wml.CommentRangeEnd commentRangeEnd)
      This method is called for every CommentRangeEnd element in the document.
      Specified by:
      onCommentRangeEnd in class DocumentWalker
      Parameters:
      commentRangeEnd - the CommentRangeEnd element to process.
    • onCommentReference

      protected void onCommentReference(org.docx4j.wml.R.CommentReference commentReference)
      This method is called for every R.CommentReference element in the document.
      Specified by:
      onCommentReference in class DocumentWalker
      Parameters:
      commentReference - the R.CommentReference element to process.