Interface DocxPart

All Superinterfaces:
DocxDocument
All Known Implementing Classes:
PptxPart

public interface DocxPart extends DocxDocument
Represents a part of a WordprocessingML-based document. This interface extends the DocxDocument interface and provides additional methods to retrieve specific parts, manipulate document content, and stream elements such as paragraphs and runs.
  • Method Summary

    Modifier and Type
    Method
    Description
    Retrieves the content of the WordprocessingML-based document as a list of objects.
    from(org.docx4j.wml.ContentAccessor accessor)
    Creates and returns a DocxPart instance from the provided ContentAccessor.
    org.docx4j.openpackaging.parts.Part
    Retrieves the part of the WordprocessingML-based document.
    Streams all paragraphs contained within the WordprocessingML-based document part.
    Stream<org.docx4j.wml.R>
    Streams all run elements contained within the WordprocessingML-based document part.

    Methods inherited from interface DocxDocument

    document, streamParts
  • Method Details

    • part

      org.docx4j.openpackaging.parts.Part part()
      Retrieves the part of the WordprocessingML-based document.
      Returns:
      the part of the document
    • from

      DocxPart from(org.docx4j.wml.ContentAccessor accessor)
      Creates and returns a DocxPart instance from the provided ContentAccessor.
      Parameters:
      accessor - the ContentAccessor from which the DocxPart is created
      Returns:
      a DocxPart instance created from the given ContentAccessor
    • content

      List<Object> content()
      Retrieves the content of the WordprocessingML-based document as a list of objects. The content may include various document elements such as paragraphs, tables, runs, etc.
      Returns:
      a list of objects representing the document's content
    • streamParagraphs

      Stream<Paragraph> streamParagraphs()
      Streams all paragraphs contained within the WordprocessingML-based document part.
      Returns:
      a stream of Paragraph objects representing the paragraphs in the document part
    • streamRun

      Stream<org.docx4j.wml.R> streamRun()
      Streams all run elements contained within the WordprocessingML-based document part.
      Returns:
      a stream of R objects representing the run elements in the document part