Package ai.docling.serve.api.response
Class ProcessedDocumentResponse
java.lang.Object
ai.docling.serve.api.response.ProcessedDocumentResponse
- Direct Known Subclasses:
ChunkDocumentResponse,ConvertDocumentResponse
public abstract sealed class ProcessedDocumentResponse
extends Object
permits ConvertDocumentResponse, ChunkDocumentResponse
Abstract base class for all document processing responses. Provides a common type for
conversion and chunking responses, enabling polymorphism when working with different
response types.
This is a sealed class — the only permitted subtypes are
ConvertDocumentResponse (which is itself sealed with four further subtypes)
and ChunkDocumentResponse — enabling exhaustive pattern matching:
switch (response) {
case InBodyConvertDocumentResponse r -> handleInBody(r);
case PreSignedUrlConvertDocumentResponse r -> handlePreSignedUrl(r);
case PreSignedUrlConvertResponse r -> handlePreSignedUrlResponse(r);
case ZipArchiveConvertDocumentResponse r -> handleZipArchive(r);
case ChunkDocumentResponse r -> handleChunk(r);
}
- See Also:
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
ProcessedDocumentResponse
public ProcessedDocumentResponse()
-