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
ConstructorsConstructorDescriptionConvertOperations(HttpOperations httpOperations, ai.docling.serve.api.DoclingServeTaskApi taskApi, Duration asyncPollInterval, Duration asyncTimeout) Creates a new ConvertOperations instance. -
Method Summary
Modifier and TypeMethodDescriptionai.docling.serve.api.convert.response.ConvertDocumentResponseconvertSource(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.TaskStatusPollResponseconvertSourceBatch(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.ConvertDocumentResponsegetTaskResult(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
executeAsyncMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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 requeststaskApi- the task operations handler for polling and retrieving resultsasyncPollInterval- the interval between status polls for async operationsasyncTimeout- 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:AsyncOperationsRetrieves 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 theTaskResultRequestto obtain the result of the task execution.- Specified by:
getTaskResultin classAsyncOperations- 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:
convertSourcein interfaceai.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:
convertSourceAsyncin interfaceai.docling.serve.api.DoclingServeConvertApi
-
convertSourceBatch
public ai.docling.serve.api.task.response.TaskStatusPollResponse convertSourceBatch(ai.docling.serve.api.convert.request.BatchConvertDocumentRequest request) - Specified by:
convertSourceBatchin interfaceai.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:
convertSourceBatchAsyncin interfaceai.docling.serve.api.DoclingServeConvertApi
-