22 lines
768 B
Python
22 lines
768 B
Python
from DataVaultGenerator.Components import DataVaultEntity, ErrorCollection
|
|
|
|
|
|
class GenericTable(DataVaultEntity):
|
|
def __init__(self, model, filename, definition: dict = None):
|
|
DataVaultEntity.__init__(self, model, filename, definition)
|
|
|
|
def get_component_entities(self):
|
|
c = [{'entity': self, 'component': c, 'type': c.type}
|
|
for c in self.model.get_entities_by_type('generictransformation') if self in c.get_target_entities()
|
|
]
|
|
#FIXME: Um GenericTask erweitern
|
|
return c
|
|
|
|
def validate(self):
|
|
|
|
errors = ErrorCollection()
|
|
for attr in self.attributes.values():
|
|
spec = self.layer.sys_specification
|
|
errors.append(attr.validate(spec))
|
|
|
|
return errors |