openspg/python/knext/chain/builder_chain.py

30 lines
658 B
Python
Raw Normal View History

2023-12-06 17:26:39 +08:00
from typing import Union
from knext.chain.base import Chain
from knext.component.base import RESTable
from knext.component.builder.extractor import SPGExtractor
from knext.component.builder.mapping import Mapping
from knext.component.builder.sink_writer import SinkWriter
from knext.component.builder.source_reader import SourceReader
class BuilderChain(RESTable, Chain):
source: SourceReader
2023-12-08 11:25:26 +08:00
process: Union[SPGExtractor, Mapping, ]
2023-12-06 17:26:39 +08:00
sink: SinkWriter
@property
def input_types(self):
return None
@property
def output_types(self):
return None
2023-12-08 11:25:26 +08:00
@classmethod
def from_config(cls):
return cls()