Package com.tnsai.tools.document.docling
Record Class DocumentResult
java.lang.Object
java.lang.Record
com.tnsai.tools.document.docling.DocumentResult
- Record Components:
markdown- document content exported as Markdowntables- lossless JSON table objects, or Markdown tables when the provider exposes only Markdownformulas- formula text discovered in the structured documentfigures- lossless JSON picture objects, or Markdown image targetsdoclingJson- lossless DoclingDocument JSON when the provider exposes it
public record DocumentResult(String markdown, List<String> tables, List<String> formulas, List<String> figures, String doclingJson)
extends Record
Immutable normalized output from a Docling conversion.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedoclingJsonrecord component.final booleanIndicates whether some other object is "equal to" this one.figures()Returns the value of thefiguresrecord component.formulas()Returns the value of theformulasrecord component.final inthashCode()Returns a hash code value for this object.booleanReturns whether Docling exposed any structured table, formula, or figure.markdown()Returns the value of themarkdownrecord component.tables()Returns the value of thetablesrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
DocumentResult
public DocumentResult(String markdown, List<String> tables, List<String> formulas, List<String> figures, String doclingJson) Creates an instance of aDocumentResultrecord class.- Parameters:
markdown- the value for themarkdownrecord componenttables- the value for thetablesrecord componentformulas- the value for theformulasrecord componentfigures- the value for thefiguresrecord componentdoclingJson- the value for thedoclingJsonrecord component
-
-
Method Details
-
hasStructuredContent
public boolean hasStructuredContent()Returns whether Docling exposed any structured table, formula, or figure. -
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. All components in this record class are compared withObjects::equals(Object,Object). -
markdown
Returns the value of themarkdownrecord component.- Returns:
- the value of the
markdownrecord component
-
tables
Returns the value of thetablesrecord component.- Returns:
- the value of the
tablesrecord component
-
formulas
Returns the value of theformulasrecord component.- Returns:
- the value of the
formulasrecord component
-
figures
Returns the value of thefiguresrecord component.- Returns:
- the value of the
figuresrecord component
-
doclingJson
Returns the value of thedoclingJsonrecord component.- Returns:
- the value of the
doclingJsonrecord component
-