Defined SCD services interface

This commit is contained in:
Andrei Bondarenko 2021-08-14 16:31:56 +02:00
parent 6723bd590b
commit 9b3a4c5a44
2 changed files with 69 additions and 0 deletions

21
bootstrap/primitive.py Normal file
View file

@ -0,0 +1,21 @@
from state.base import State, UUID
def bootstrap_type_type(model_root: UUID, state: State) -> UUID:
pass
def bootstrap_boolean_type(model_root: UUID, state: State) -> UUID:
pass
def bootstrap_integer_type(model_root: UUID, state: State) -> UUID:
pass
def bootstrap_float_type(model_root: UUID, state: State) -> UUID:
pass
def bootstrap_string_type(model_root: UUID, state: State) -> UUID:
pass

48
services/scd.py Normal file
View file

@ -0,0 +1,48 @@
from services.base import Service, UUID
from state.base import State
from typing import Any, List
class SCD(Service):
def __init__(self, model: UUID, state: State):
super().__init__(model)
self.state = state
def create_class(self, name: str, abstract: bool, min_c: int, max_c: int):
pass
def create_association(self, name: str, source: str, target: str, src_min_c: int, src_max_c: int, tgt_min_c: int, tgt_max_c: int):
pass
def create_global_constraint(self, name: str):
pass
def create_attribute(self, name: str):
pass
def create_attribute_link(self, source: str, target: str, name: str, optional: bool):
pass
def create_model_ref(self, name: str, model: UUID):
pass
def create_inheritance(self, child: str, parent: str):
pass
def add_constraint(self, element: str, code: str):
pass
def list_elements(self):
pass
def delete_element(self, name: str):
pass
def update_class(self, name: str, abstract: bool, min_c: int, max_c: int):
pass
def update_association(self, name: str, src_min_c: int, src_max_c: int, tgt_min_c: int, tgt_max_c: int):
pass
def update_attribute_link(self, name: str, attribute_name: str, optional: bool):
pass