REfctored name

This commit is contained in:
Andrei Bondarenko 2021-08-16 09:53:45 +02:00
parent 3e2d0fb96a
commit 938752ffe4
7 changed files with 24 additions and 24 deletions

View file

@ -7,13 +7,13 @@ class Boolean:
def __init__(self, model: UUID, state: State):
self.model = model
self.bottom = Bottom(state)
type_model_id_node, = self.bottom.read_outgoing_nodes(state.read_root(), "Boolean")
type_model_id_node, = self.bottom.read_outgoing_elements(state.read_root(), "Boolean")
self.type_model = UUID(self.bottom.read_value(type_model_id_node))
def create(self, value: bool):
if "boolean" in self.bottom.read_keys(self.model):
instance, = self.bottom.read_outgoing_nodes(self.model, "boolean")
instance, = self.bottom.read_outgoing_elements(self.model, "boolean")
self.bottom.delete_element(instance)
_instance = self.bottom.create_edge(self.model, self.bottom.create_node(value), "boolean")
_type, = self.bottom.read_outgoing_nodes(self.type_model, "Boolean")
_type, = self.bottom.read_outgoing_elements(self.type_model, "Boolean")
self.bottom.create_edge(_instance, _type, "Morphism")

View file

@ -7,13 +7,13 @@ class Float:
def __init__(self, model: UUID, state: State):
self.model = model
self.bottom = Bottom(state)
type_model_id_node, = self.bottom.read_outgoing_nodes(state.read_root(), "Float")
type_model_id_node, = self.bottom.read_outgoing_elements(state.read_root(), "Float")
self.type_model = UUID(self.bottom.read_value(type_model_id_node))
def create(self, value: float):
if "float" in self.bottom.read_keys(self.model):
instance, = self.bottom.read_outgoing_nodes(self.model, "float")
instance, = self.bottom.read_outgoing_elements(self.model, "float")
self.bottom.delete_element(instance)
_instance = self.bottom.create_edge(self.model, self.bottom.create_node(value), "float")
_type, = self.bottom.read_outgoing_nodes(self.type_model, "Float")
_type, = self.bottom.read_outgoing_elements(self.type_model, "Float")
self.bottom.create_edge(_instance, _type, "Morphism")

View file

@ -7,13 +7,13 @@ class Integer:
def __init__(self, model: UUID, state: State):
self.model = model
self.bottom = Bottom(state)
type_model_id_node, = self.bottom.read_outgoing_nodes(state.read_root(), "Integer")
type_model_id_node, = self.bottom.read_outgoing_elements(state.read_root(), "Integer")
self.type_model = UUID(self.bottom.read_value(type_model_id_node))
def create(self, value: int):
if "string" in self.bottom.read_keys(self.model):
instance, = self.bottom.read_outgoing_nodes(self.model, "integer")
instance, = self.bottom.read_outgoing_elements(self.model, "integer")
self.bottom.delete_element(instance)
_instance = self.bottom.create_edge(self.model, self.bottom.create_node(value), "integer")
_type, = self.bottom.read_outgoing_nodes(self.type_model, "Integer")
_type, = self.bottom.read_outgoing_elements(self.type_model, "Integer")
self.bottom.create_edge(_instance, _type, "Morphism")

View file

@ -7,13 +7,13 @@ class String:
def __init__(self, model: UUID, state: State):
self.model = model
self.bottom = Bottom(state)
type_model_id_node, = self.bottom.read_outgoing_nodes(state.read_root(), "String")
type_model_id_node, = self.bottom.read_outgoing_elements(state.read_root(), "String")
self.type_model = UUID(self.bottom.read_value(type_model_id_node))
def create(self, value: str):
if "string" in self.bottom.read_keys(self.model):
instance, = self.bottom.read_outgoing_nodes(self.model, "string")
instance, = self.bottom.read_outgoing_elements(self.model, "string")
self.bottom.delete_element(instance)
_instance = self.bottom.create_edge(self.model, self.bottom.create_node(value), "string")
_type, = self.bottom.read_outgoing_nodes(self.type_model, "String")
_type, = self.bottom.read_outgoing_elements(self.type_model, "String")
self.bottom.create_edge(_instance, _type, "Morphism")

View file

@ -7,13 +7,13 @@ class Integer:
def __init__(self, model: UUID, state: State):
self.model = model
self.bottom = Bottom(state)
type_model_id_node, = self.bottom.read_outgoing_nodes(state.read_root(), "Type")
type_model_id_node, = self.bottom.read_outgoing_elements(state.read_root(), "Type")
self.type_model = UUID(self.bottom.read_value(type_model_id_node))
def create(self, value: tuple):
if "string" in self.bottom.read_keys(self.model):
instance, = self.bottom.read_outgoing_nodes(self.model, "type")
instance, = self.bottom.read_outgoing_elements(self.model, "type")
self.bottom.delete_element(instance)
_instance = self.bottom.create_edge(self.model, self.bottom.create_node(value), "type")
_type, = self.bottom.read_outgoing_nodes(self.type_model, "Type")
_type, = self.bottom.read_outgoing_elements(self.type_model, "Type")
self.bottom.create_edge(_instance, _type, "Morphism")