snapshot current state before gitea sync
This commit is contained in:
22
DataVaultGenerator/Entities/Sourcesystem.py
Normal file
22
DataVaultGenerator/Entities/Sourcesystem.py
Normal file
@@ -0,0 +1,22 @@
|
||||
from DataVaultGenerator.Components import GeneratorEntity
|
||||
|
||||
|
||||
class SourceSystem(GeneratorEntity):
|
||||
def __init__(self, model, filename, definition: dict = None):
|
||||
GeneratorEntity.__init__(self, model, filename, definition)
|
||||
self.shortname = self._definition.get('shortname', self.name)
|
||||
self.sys_specification = self._definition.get('sys_specification', '')
|
||||
|
||||
def get_interfaces(self):
|
||||
return [i for i in self.model.interfaces.values() if i.source_system == self]
|
||||
|
||||
def get_interface_count(self):
|
||||
return sum(1 for i in self.model.interfaces.values() if i.source_system == self)
|
||||
|
||||
@property
|
||||
def connection_name(self):
|
||||
return self._definition.get('connectionname', '')
|
||||
|
||||
@property
|
||||
def sourcesystem_type(self):
|
||||
return self._definition.get('sourcesystemtype', '')
|
||||
Reference in New Issue
Block a user