Class ExportDocumentResponse.Builder
java.lang.Object
ai.docling.serve.api.chunk.response.ExportDocumentResponse.Builder
- Enclosing class:
- ExportDocumentResponse
Builder for creating
ExportDocumentResponse instances.
Generated by Lombok's @Builder annotation.
Builder methods:
filename(String)- Set the filenamemarkdownContent(String)- Set the Markdown contentjsonContent(DoclingDocument)- Set the JSON contenthtmlContent(String)- Set the HTML contenttextContent(String)- Set the text contentdoctagsContent(String)- Set the DocTags content
-
Method Summary
Modifier and TypeMethodDescription@NonNull ExportDocumentResponsebuild()@NonNull ExportDocumentResponse.BuilderdoctagsContent(@Nullable String doctagsContent) The document content in DocTags format.@NonNull ExportDocumentResponse.BuilderThe name of the original document file.@NonNull ExportDocumentResponse.BuilderhtmlContent(@Nullable String htmlContent) The document content exported in HTML format.@NonNull ExportDocumentResponse.BuilderjsonContent(@Nullable ai.docling.core.DoclingDocument jsonContent) The document content as a structured DoclingDocument JSON object.@NonNull ExportDocumentResponse.BuildermarkdownContent(@Nullable String markdownContent) The document content exported in Markdown format.@NonNull ExportDocumentResponse.BuildertextContent(@Nullable String textContent) The document content as plain text.@NonNull StringtoString()
-
Method Details
-
filename
The name of the original document file.- Parameters:
filename- the filename- Returns:
this.
-
markdownContent
The document content exported in Markdown format. Present if Markdown output was requested in the conversion options.- Parameters:
markdownContent- the Markdown content, or null if not requested- Returns:
this.
-
jsonContent
public @NonNull ExportDocumentResponse.Builder jsonContent(@Nullable ai.docling.core.DoclingDocument jsonContent) The document content as a structured DoclingDocument JSON object. Present if JSON output was requested in the conversion options.- Parameters:
jsonContent- the JSON content, or null if not requested- Returns:
this.
-
htmlContent
The document content exported in HTML format. Present if HTML output was requested in the conversion options.- Parameters:
htmlContent- the HTML content, or null if not requested- Returns:
this.
-
textContent
The document content as plain text. Present if text output was requested in the conversion options.- Parameters:
textContent- the text content, or null if not requested- Returns:
this.
-
doctagsContent
The document content in DocTags format. Present if DocTags output was requested in the conversion options.- Parameters:
doctagsContent- the DocTags content, or null if not requested- Returns:
this.
-
build
-
toString
-