Class TextualDocxPart

java.lang.Object
pro.verron.officestamper.core.TextualDocxPart
All Implemented Interfaces:
DocxPart

public final class TextualDocxPart extends Object implements DocxPart
Represents a textual part of a DOCX document, encapsulating the content and structure of the part while enabling various operations such as accessing paragraphs, runs, and related parts. This class functions as a concrete implementation of the DocxPart interface. It manages the association with the XML structure of a DOCX document.
  • Constructor Summary

    Constructors
    Constructor
    Description
    TextualDocxPart(org.docx4j.openpackaging.packages.WordprocessingMLPackage document)
    Constructs a TextualDocxPart using the provided document.
    TextualDocxPart(org.docx4j.openpackaging.packages.WordprocessingMLPackage document, org.docx4j.openpackaging.parts.Part part, org.docx4j.wml.ContentAccessor contentAccessor)
    Constructs a TextualDocxPart using the specified document, part, and contentAccessor.
  • Method Summary

    Modifier and Type
    Method
    Description
    Retrieves the list of content objects associated with this document part.
    org.docx4j.openpackaging.packages.WordprocessingMLPackage
    Returns the WordprocessingMLPackage instance representing the document associated with this part.
    org.docx4j.openpackaging.parts.Part
    Retrieves the part associated with this instance of the document part.

    Methods inherited from class Object

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

    • TextualDocxPart

      public TextualDocxPart(org.docx4j.openpackaging.packages.WordprocessingMLPackage document)
      Constructs a TextualDocxPart using the provided document. This constructor initializes the instance with the main document part and content accessor derived from the provided WordprocessingMLPackage.
      Parameters:
      document - the WordprocessingMLPackage representing the document to be processed.
    • TextualDocxPart

      public TextualDocxPart(org.docx4j.openpackaging.packages.WordprocessingMLPackage document, org.docx4j.openpackaging.parts.Part part, org.docx4j.wml.ContentAccessor contentAccessor)
      Constructs a TextualDocxPart using the specified document, part, and contentAccessor.
      Parameters:
      document - the WordprocessingMLPackage representing the document to be processed.
      part - the specific part of the document being processed.
      contentAccessor - the content accessor associated with the document part.
  • Method Details

    • part

      public org.docx4j.openpackaging.parts.Part part()
      Retrieves the part associated with this instance of the document part.
      Specified by:
      part in interface DocxPart
      Returns:
      the Part object representing the specific part associated with this instance.
    • content

      public List<Object> content()
      Retrieves the list of content objects associated with this document part.
      Specified by:
      content in interface DocxPart
      Returns:
      a list of objects representing the content of the document part.
    • document

      public org.docx4j.openpackaging.packages.WordprocessingMLPackage document()
      Returns the WordprocessingMLPackage instance representing the document associated with this part.
      Specified by:
      document in interface DocxPart
      Returns:
      the WordprocessingMLPackage instance representing the document.