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.position- The vertical position of the paragraph on the page.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.
- Author:
- Christian Tzolov
-
Constructor Summary
ConstructorsConstructorDescriptionParagraph(ParagraphManager.Paragraph parent, String title, int level, int startPageNumber, int endPageNumber, int position) Paragraph(ParagraphManager.Paragraph parent, String title, int level, int startPageNumber, int endPageNumber, int position, List<ParagraphManager.Paragraph> children) Creates an instance of aParagraphrecord class. -
Method Summary
Modifier and TypeMethodDescriptionchildren()Returns the value of thechildrenrecord component.intReturns the value of theendPageNumberrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intlevel()Returns the value of thelevelrecord component.parent()Returns the value of theparentrecord component.intposition()Returns the value of thepositionrecord component.intReturns the value of thestartPageNumberrecord component.title()Returns the value of thetitlerecord component.toString()Returns a string representation of this record class.
-
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 aParagraphrecord class.- Parameters:
parent- the value for theparentrecord componenttitle- the value for thetitlerecord componentlevel- the value for thelevelrecord componentstartPageNumber- the value for thestartPageNumberrecord componentendPageNumber- the value for theendPageNumberrecord componentposition- the value for thepositionrecord componentchildren- the value for thechildrenrecord component
-
-
Method Details
-
toString
-
hashCode
-
equals
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 withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
parent
-
title
-
level
-
startPageNumber
public int startPageNumber()Returns the value of thestartPageNumberrecord component.- Returns:
- the value of the
startPageNumberrecord component
-
endPageNumber
public int endPageNumber()Returns the value of theendPageNumberrecord component.- Returns:
- the value of the
endPageNumberrecord component
-
position
-
children
-