Databases-and-Informationsystems / api

Nlp Project Backend
1 stars 0 forks source link

A002: Interface to run Pipeline on uploaded document #9

Open L-Moritz opened 1 week ago

L-Moritz commented 1 week ago

Description

Pre-Condition:

Desired process

sequenceDiagram
    participant Frontend
    participant Controller
    participant Service
    participant PipelineFactory
    participant Repository
    box concrete example for Tokenizer 
        participant PipelineStepTokenizer
    end
    box Grey for all PipelineSteps
        participant PipelineStepX
    end
    Frontend ->>+ Controller: /uploadDocument
    Controller ->>+ Service: saveDocument()
    Service ->>+ Repository: saveDocument()
    Repository ->>+ Service: 
    activate Service
    Service ->>+ PipelineFactory: getPipeline()
    PipelineFactory ->>+ Service: Pipeline
    Service ->>+ PipelineStepTokenizer: run(Document)
    PipelineStepTokenizer ->>+ Service: Result
    Service ->>+ Repository: saveTokens()
    Repository --> Service: 
    loop every other pipeline steps x
        Service ->>+ PipelineStepX: run(Document)
        PipelineStepX ->>+ Service: Result 
        Service ->>+ Repository: save()
        Repository --> Service: 
    end
    deactivate Service
    Service ->>+ Controller: 
    Controller ->>+ Frontend: 

Related Issues