예제 #1
0
 def get_save_data(self):
     save_data = {
         'version': GRAPH_VERSION.VERSION_STR,
         'nodes': {}
     }
     for path, node in self.nodes.items():
         save_data['nodes'][path] = nxt_node.get_node_as_dict(node)
     return save_data
예제 #2
0
 def get_nodes_save_data(self):
     """Gets an ordered dict of all of the spec nodes
     :return: OrderedDict
     """
     nodes_dict = OrderedDict()
     for spec_node in self.spec_list:
         node_data = nxt_node.get_node_as_dict(spec_node)
         node_path = self.get_node_path(spec_node)
         nodes_dict[node_path] = node_data
     return order_nodes_dict(nodes_dict)