Class PptxPart

java.lang.Object
pro.verron.officestamper.experimental.PptxPart
All Implemented Interfaces:
DocxDocument, DocxPart

public class PptxPart extends Object implements DocxPart
The PptxPart class represents a specific implementation of the DocxPart interface designed for handling parts within a PowerPoint document.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructs a new instance of the PptxPart class.
  • Method Summary

    Modifier and Type
    Method
    Description
    Retrieves the content of the WordprocessingML-based document as a list of objects.
    org.docx4j.openpackaging.packages.WordprocessingMLPackage
    Retrieves the WordprocessingMLPackage document associated with this instance.
    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.
    Streams the parts of the document that match the specified type.
    Stream<org.docx4j.wml.R>
    Streams all run elements contained within the WordprocessingML-based document part.

    Methods inherited from class Object

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

    • PptxPart

      public PptxPart()

      Constructs a new instance of the PptxPart class.

      This constructor initializes an instance of PptxPart, which represents a specific implementation of the DocxPart interface tailored for handling parts within a PowerPoint document. This class provides methods to interact with and manipulate the content and structure of parts in a PowerPoint file.

  • Method Details

    • part

      public org.docx4j.openpackaging.parts.Part part()
      Description copied from interface: DocxPart
      Retrieves the part of the WordprocessingML-based document.
      Specified by:
      part in interface DocxPart
      Returns:
      the part of the document
    • from

      public DocxPart from(org.docx4j.wml.ContentAccessor accessor)
      Description copied from interface: DocxPart
      Creates and returns a DocxPart instance from the provided ContentAccessor.
      Specified by:
      from in interface DocxPart
      Parameters:
      accessor - the ContentAccessor from which the DocxPart is created
      Returns:
      a DocxPart instance created from the given ContentAccessor
    • content

      public List<Object> content()
      Description copied from interface: DocxPart
      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.
      Specified by:
      content in interface DocxPart
      Returns:
      a list of objects representing the document's content
    • streamParagraphs

      public Stream<Paragraph> streamParagraphs()
      Description copied from interface: DocxPart
      Streams all paragraphs contained within the WordprocessingML-based document part.
      Specified by:
      streamParagraphs in interface DocxPart
      Returns:
      a stream of Paragraph objects representing the paragraphs in the document part
    • streamRun

      public Stream<org.docx4j.wml.R> streamRun()
      Description copied from interface: DocxPart
      Streams all run elements contained within the WordprocessingML-based document part.
      Specified by:
      streamRun in interface DocxPart
      Returns:
      a stream of R objects representing the run elements in the document part
    • document

      public org.docx4j.openpackaging.packages.WordprocessingMLPackage document()
      Description copied from interface: DocxDocument
      Retrieves the WordprocessingMLPackage document associated with this instance. The returned document provides access to its content and metadata.
      Specified by:
      document in interface DocxDocument
      Returns:
      the WordprocessingMLPackage document
    • streamParts

      public Stream<DocxPart> streamParts(String type)
      Description copied from interface: DocxDocument
      Streams the parts of the document that match the specified type.
      Specified by:
      streamParts in interface DocxDocument
      Parameters:
      type - the type of parts to stream, typically used to filter specific types of document parts
      Returns:
      a stream of DocxPart objects that match the specified type