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.
-
Constructor Summary
ConstructorDescriptionParagraph
(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 aParagraph
record class. -
Method Summary
Modifier and TypeMethodDescriptionchildren()
Returns the value of thechildren
record component.int
Returns the value of theendPageNumber
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.int
level()
Returns the value of thelevel
record component.parent()
Returns the value of theparent
record component.int
position()
Returns the value of theposition
record component.int
Returns the value of thestartPageNumber
record component.title()
Returns the value of thetitle
record 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 aParagraph
record class.- Parameters:
parent
- the value for theparent
record componenttitle
- the value for thetitle
record componentlevel
- the value for thelevel
record componentstartPageNumber
- the value for thestartPageNumber
record componentendPageNumber
- the value for theendPageNumber
record componentposition
- the value for theposition
record componentchildren
- the value for thechildren
record component
-
-
Method Details
-
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. -
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. -
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 '=='. -
parent
Returns the value of theparent
record component.- Returns:
- the value of the
parent
record component
-
title
Returns the value of thetitle
record component.- Returns:
- the value of the
title
record component
-
level
public int level()Returns the value of thelevel
record component.- Returns:
- the value of the
level
record component
-
startPageNumber
public int startPageNumber()Returns the value of thestartPageNumber
record component.- Returns:
- the value of the
startPageNumber
record component
-
endPageNumber
public int endPageNumber()Returns the value of theendPageNumber
record component.- Returns:
- the value of the
endPageNumber
record component
-
position
public int position()Returns the value of theposition
record component.- Returns:
- the value of the
position
record component
-
children
Returns the value of thechildren
record component.- Returns:
- the value of the
children
record component
-