Class ExportDocumentResponse.Builder

java.lang.Object
ai.docling.serve.api.chunk.response.ExportDocumentResponse.Builder
Enclosing class:
ExportDocumentResponse

public static class ExportDocumentResponse.Builder extends Object
Builder for creating ExportDocumentResponse instances. Generated by Lombok's @Builder annotation.

Builder methods:

  • filename(String) - Set the filename
  • markdownContent(String) - Set the Markdown content
  • jsonContent(DoclingDocument) - Set the JSON content
  • htmlContent(String) - Set the HTML content
  • textContent(String) - Set the text content
  • doctagsContent(String) - Set the DocTags content
  • Method Details

    • filename

      public @NonNull ExportDocumentResponse.Builder filename(String filename)
      The name of the original document file.
      Parameters:
      filename - the filename
      Returns:
      this.
    • markdownContent

      public @NonNull ExportDocumentResponse.Builder markdownContent(@Nullable String 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

      public @NonNull ExportDocumentResponse.Builder htmlContent(@Nullable String 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

      public @NonNull ExportDocumentResponse.Builder textContent(@Nullable String 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

      public @NonNull ExportDocumentResponse.Builder doctagsContent(@Nullable String 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

      public @NonNull ExportDocumentResponse build()
    • toString

      public @NonNull String toString()
      Overrides:
      toString in class Object