PropositionPipelineController

class PropositionPipelineController(propositionPipeline: PropositionPipeline, propositionRepository: PropositionRepository, entityResolver: EntityResolver, schemaRegistry: SchemaRegistry, contentReader: <Error class: unknown class> = TikaHierarchicalContentReader(), contentChunker: <Error class: unknown class> = InMemoryContentChunker( config = ContentChunker.Config(), chunkTransformer = ChunkTransformer.NO_OP, ), objectMapper: <Error class: unknown class> = jacksonObjectMapper())

REST controller that runs the proposition extraction pipeline over text or uploaded files.

Exposes two endpoints under /api/v1/contexts/{contextId}:

  • POST /extract — send raw text, get back propositions and entity resolutions

  • POST /extract/file — upload a document (PDF, Word, Markdown, HTML, etc.) and get back per-chunk results aggregated into a single summary

Not component-scanned: activate via DiceRestConfiguration. Requires a PropositionPipeline bean to be present. The context id comes exclusively from the path variable; it is never read from the request body.

Constructors

Link copied to clipboard
constructor(propositionPipeline: PropositionPipeline, propositionRepository: PropositionRepository, entityResolver: EntityResolver, schemaRegistry: SchemaRegistry, contentReader: <Error class: unknown class> = TikaHierarchicalContentReader(), contentChunker: <Error class: unknown class> = InMemoryContentChunker( config = ContentChunker.Config(), chunkTransformer = ChunkTransformer.NO_OP, ), objectMapper: <Error class: unknown class> = jacksonObjectMapper())

Functions

Link copied to clipboard
fun extract(contextId: String, request: ExtractRequest): <Error class: unknown class><ExtractResponse>

Extract propositions from a single text chunk.

Link copied to clipboard
fun extractFromFile(contextId: String, file: <Error class: unknown class>, sourceId: String?, knownEntitiesJson: String?, schemaName: String?, sourceLocatorJson: String?, sourceRevision: String?): <Error class: unknown class><FileExtractResponse>

Extract propositions from an uploaded document.

Link copied to clipboard

Answers 400 with the reason a request was refused, so a caller can read which check it broke — a length ceiling names its limit. Declared on this controller alone, so nothing else in a host application changes shape.