Class ConvertOperations

java.lang.Object
ai.docling.serve.client.operations.AsyncOperations
ai.docling.serve.client.operations.ConvertOperations
All Implemented Interfaces:
ai.docling.serve.api.DoclingServeConvertApi

public final class ConvertOperations extends AsyncOperations implements ai.docling.serve.api.DoclingServeConvertApi
Base class for document conversion API operations. Provides access to document conversion functionality including both synchronous and asynchronous operations.
  • Constructor Summary

    Constructors
    Constructor
    Description
    ConvertOperations(HttpOperations httpOperations, ai.docling.serve.api.DoclingServeTaskApi taskApi, Duration asyncPollInterval, Duration asyncTimeout)
    Creates a new ConvertOperations instance.
  • Method Summary

    Modifier and Type
    Method
    Description
    ai.docling.serve.api.convert.response.ConvertDocumentResponse
    convertSource(ai.docling.serve.api.convert.request.ConvertDocumentRequest request)
     
    CompletionStage<ai.docling.serve.api.convert.response.ConvertDocumentResponse>
    convertSourceAsync(ai.docling.serve.api.convert.request.ConvertDocumentRequest request)
     
    ai.docling.serve.api.task.response.TaskStatusPollResponse
    convertSourceBatch(ai.docling.serve.api.convert.request.BatchConvertDocumentRequest request)
     
    CompletionStage<ai.docling.serve.api.convert.response.ConvertDocumentResponse>
    convertSourceBatchAsync(ai.docling.serve.api.convert.request.BatchConvertDocumentRequest request)
     
    protected ai.docling.serve.api.convert.response.ConvertDocumentResponse
    getTaskResult(ai.docling.serve.api.task.request.TaskResultRequest taskResultRequest)
    Retrieves the result of a task based on the provided task result request.

    Methods inherited from class ai.docling.serve.client.operations.AsyncOperations

    executeAsync

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface ai.docling.serve.api.DoclingServeConvertApi

    convertFiles, convertFiles, convertFilesAsync, convertFilesAsync
  • Constructor Details

    • ConvertOperations

      public ConvertOperations(HttpOperations httpOperations, ai.docling.serve.api.DoclingServeTaskApi taskApi, Duration asyncPollInterval, Duration asyncTimeout)
      Creates a new ConvertOperations instance.
      Parameters:
      httpOperations - the HTTP operations handler for executing requests
      taskApi - the task operations handler for polling and retrieving results
      asyncPollInterval - the interval between status polls for async operations
      asyncTimeout - the maximum time to wait for async operations to complete
  • Method Details

    • getTaskResult

      protected ai.docling.serve.api.convert.response.ConvertDocumentResponse getTaskResult(ai.docling.serve.api.task.request.TaskResultRequest taskResultRequest)
      Description copied from class: AsyncOperations
      Retrieves the result of a task based on the provided task result request. This method is abstract and meant to be implemented by subclasses. It uses the information provided in the TaskResultRequest to obtain the result of the task execution.
      Specified by:
      getTaskResult in class AsyncOperations
      Parameters:
      taskResultRequest - the request containing the details, including the task ID, required to retrieve the task result
      Returns:
      the result of the task execution, of the type O
    • convertSource

      public ai.docling.serve.api.convert.response.ConvertDocumentResponse convertSource(ai.docling.serve.api.convert.request.ConvertDocumentRequest request)
      Specified by:
      convertSource in interface ai.docling.serve.api.DoclingServeConvertApi
    • convertSourceAsync

      public CompletionStage<ai.docling.serve.api.convert.response.ConvertDocumentResponse> convertSourceAsync(ai.docling.serve.api.convert.request.ConvertDocumentRequest request)
      Specified by:
      convertSourceAsync in interface ai.docling.serve.api.DoclingServeConvertApi
    • convertSourceBatch

      public ai.docling.serve.api.task.response.TaskStatusPollResponse convertSourceBatch(ai.docling.serve.api.convert.request.BatchConvertDocumentRequest request)
      Specified by:
      convertSourceBatch in interface ai.docling.serve.api.DoclingServeConvertApi
    • convertSourceBatchAsync

      public CompletionStage<ai.docling.serve.api.convert.response.ConvertDocumentResponse> convertSourceBatchAsync(ai.docling.serve.api.convert.request.BatchConvertDocumentRequest request)
      Specified by:
      convertSourceBatchAsync in interface ai.docling.serve.api.DoclingServeConvertApi