Package com.tnsai.tools.document.docling
Interface DoclingProvider
public interface DoclingProvider
Adapter boundary for Docling execution.
Docling itself is deliberately not bundled. Consumers choose the official
Docling MCP server or a locally installed docling executable. The
factories return a null-object provider when no local runtime is available,
so callers never branch on null and receive a clear checked failure.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final recordOne rendered page image returned by a provider fallback. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns whether this provider can currently accept conversions.static DoclingProvidermcp(com.tnsai.mcp.client.McpClient client) Adapts an already connected and initialized TnsAI MCP client whose server shares access to the admitted source path.static DoclingProvidernoOp()Returns the fail-loud null object used when Docling is not configured.Converts one already-admitted local file.default List<DoclingProvider.RenderedPage> renderPages(Path source) Renders page images when the provider supports referenced page exports.static DoclingProvidersubprocess(String command) Creates a lazy local CLI provider.
-
Method Details
-
available
boolean available()Returns whether this provider can currently accept conversions. -
parse
Converts one already-admitted local file.- Throws:
IOException
-
renderPages
Renders page images when the provider supports referenced page exports. Providers without that capability return an empty immutable list.- Throws:
IOException
-
mcp
Adapts an already connected and initialized TnsAI MCP client whose server shares access to the admitted source path. -
subprocess
Creates a lazy local CLI provider. The command is never evaluated by a shell. -
noOp
Returns the fail-loud null object used when Docling is not configured.
-