Class DocumentResponse.Builder
java.lang.Object
ai.docling.serve.api.convert.response.DocumentResponse.Builder
- Enclosing class:
- DocumentResponse
Builder for creating
DocumentResponse instances.
Generated by Lombok's @Builder annotation.
Builder methods:
doctagsContent(String)- Set the DocTags contentfilename(String)- Set the filenamehtmlContent(String)- Set the HTML contentjsonContent(DoclingDocument)- Set the JSON contentmarkdownContent(String)- Set the Markdown contenttextContent(String)- Set the text content
-
Method Summary
Modifier and TypeMethodDescription@NonNull DocumentResponsebuild()@NonNull DocumentResponse.BuilderdoctagsContent(@Nullable String doctagsContent) Document content in DocTags format (if requested).@NonNull DocumentResponse.BuilderFilename of the source document.@NonNull DocumentResponse.BuilderhtmlContent(@Nullable String htmlContent) Document content in HTML format (if requested).@NonNull DocumentResponse.BuilderjsonContent(@Nullable ai.docling.core.DoclingDocument jsonContent) Document content as DoclingDocument JSON (if requested).@NonNull DocumentResponse.BuildermarkdownContent(@Nullable String markdownContent) Document content in Markdown format (if requested).@NonNull DocumentResponse.BuildertextContent(@Nullable String textContent) Document content as plain text (if requested).@NonNull StringtoString()
-
Method Details
-
doctagsContent
Document content in DocTags format (if requested).- Parameters:
doctagsContent- the DocTags content, or null if not requested- Returns:
this.
-
filename
Filename of the source document.- Parameters:
filename- the filename- Returns:
this.
-
htmlContent
Document content in HTML format (if requested).- Parameters:
htmlContent- the HTML content, or null if not requested- Returns:
this.
-
jsonContent
public @NonNull DocumentResponse.Builder jsonContent(@Nullable ai.docling.core.DoclingDocument jsonContent) Document content as DoclingDocument JSON (if requested).- Parameters:
jsonContent- the JSON content, or null if not requested- Returns:
this.
-
markdownContent
Document content in Markdown format (if requested).- Parameters:
markdownContent- the Markdown content, or null if not requested- Returns:
this.
-
textContent
Document content as plain text (if requested).- Parameters:
textContent- the text content, or null if not requested- Returns:
this.
-
build
-
toString
-