Record Class ParagraphManager.Paragraph

java.lang.Object
java.lang.Record
org.springframework.ai.reader.pdf.config.ParagraphManager.Paragraph
Record Components:
parent - Parent paragraph that will contain a children paragraphs.
title - Paragraph title as it appears in the PDF document.
level - The TOC deepness level for this paragraph. The root is at level 0.
startPageNumber - The page number in the PDF where this paragraph begins.
endPageNumber - The page number in the PDF where this paragraph ends.
children - Sub-paragraphs for this paragraph.
Enclosing class:
ParagraphManager

public static record ParagraphManager.Paragraph(ParagraphManager.Paragraph parent, String title, int level, int startPageNumber, int endPageNumber, int position, List<ParagraphManager.Paragraph> children) extends Record
Represents a document paragraph metadata and hierarchy.
  • Constructor Details

    • Paragraph

      public Paragraph(ParagraphManager.Paragraph parent, String title, int level, int startPageNumber, int endPageNumber, int position)
    • Paragraph

      public Paragraph(ParagraphManager.Paragraph parent, String title, int level, int startPageNumber, int endPageNumber, int position, List<ParagraphManager.Paragraph> children)
      Creates an instance of a Paragraph record class.
      Parameters:
      parent - the value for the parent record component
      title - the value for the title record component
      level - the value for the level record component
      startPageNumber - the value for the startPageNumber record component
      endPageNumber - the value for the endPageNumber record component
      position - the value for the position record component
      children - the value for the children record component
  • Method Details

    • toString

      public String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • parent

      public ParagraphManager.Paragraph parent()
      Returns the value of the parent record component.
      Returns:
      the value of the parent record component
    • title

      public String title()
      Returns the value of the title record component.
      Returns:
      the value of the title record component
    • level

      public int level()
      Returns the value of the level record component.
      Returns:
      the value of the level record component
    • startPageNumber

      public int startPageNumber()
      Returns the value of the startPageNumber record component.
      Returns:
      the value of the startPageNumber record component
    • endPageNumber

      public int endPageNumber()
      Returns the value of the endPageNumber record component.
      Returns:
      the value of the endPageNumber record component
    • position

      public int position()
      Returns the value of the position record component.
      Returns:
      the value of the position record component
    • children

      public List<ParagraphManager.Paragraph> children()
      Returns the value of the children record component.
      Returns:
      the value of the children record component