def execute_multi_model_join(join_parameters): database = multicategory.get_selected_multi_model_database() domain = database.get_objects()[join_parameters["domain"]] target = database.get_objects()[join_parameters["target"]] morphism = database.get_morphisms()[join_parameters["morphism"]] left = join_parameters["left"] right = join_parameters["right"] second_description = join_parameters["second_description"] tree_attributes = join_parameters["tree_attributes"] join_result = MultiModelJoin(domain, morphism, target, left=left, right=right, second_description=second_description, tree_attributes=tree_attributes) result = join_result.get_result() database.add_object(result) database.add_morphism(join_result.get_left_leg()) database.add_morphism(join_result.get_right_leg()) return html.Div(children=[ visualize(result), html.Br(), model_category_nx_grah_to_cytoscape(join_result) ])
def test_site_join_location(self): site = self.db.get_objects()["site"] location = self.db.get_objects()["location"] site_to_location_morphism = self.db.get_morphisms( )["site_to_location_morphism"] join1 = MultiModelJoin(site, site_to_location_morphism, location)
def test_customer_join_interest(self): customer_graph = self.db.get_objects()["customer"] interest_graph = self.db.get_objects()["interest"] customer_interest_morphism = self.db.get_morphisms( )["customer_interest_morphism"] join3 = MultiModelJoin(customer_graph, customer_interest_morphism, interest_graph, True, True)
def test_customer_join_location(self): customer_graph = self.db.get_objects()["customer"] location = self.db.get_objects()["location"] customer_to_location_morphism = self.db.get_morphisms( )["customer_to_location_morphism"] join2 = MultiModelJoin(customer_graph, customer_to_location_morphism, location, True)
def test_join_over_composition(self): orders = self.db.get_objects()["orders"] customer_graph = self.db.get_objects()["customer"] composition_order_to_customer = self.db.get_morphisms( )["composition_order_to_customer"] join5 = MultiModelJoin(orders, composition_order_to_customer, customer_graph, tree_attributes=["Orders"])
def test_location_join_customer(self): location = self.db.get_objects()["location"] customer_graph = self.db.get_objects()["customer"] location_to_customer_morphism = self.db.get_morphisms( )["location_to_customer_morphism"] description = dict() description["customer_id"] = StringCol(64, dflt='NULL') description["name"] = StringCol(64, dflt='NULL') description["creditLimit"] = StringCol(64, dflt='NULL') description["customer_locationId"] = StringCol(64, dflt='NULL') join4 = MultiModelJoin(location, location_to_customer_morphism, customer_graph, second_description=description)
def test_customer_join_location(self): citation_graph = self.db.get_objects()["citation"] patent = self.db.get_objects()["patent"] morphism = self.db.get_morphisms()["citation_to_patent_morphism"] join2 = MultiModelJoin(citation_graph, morphism, patent, True)
def test_site_join_location(self): patent = self.db.get_objects()["patent"] category = self.db.get_objects()["category"] morphism = self.db.get_morphisms()["patent_to_category_morphism"] join1 = MultiModelJoin(patent, morphism, category)