def bulidGraph(self, grahData): for data in grahData: if data.strip() == "": continue if(data[0] == '1'): attributes = code_parser.parseAttributes(data, 6) self.graph.addNode(attributes[1], attributes[2], attributes[ 3], attributes[4], attributes[5], attributes[6]) else: attributes = code_parser.parseAttributes(data, 5) self.graph.addChildren(attributes[1], attributes[2], attributes[ 3], attributes[4], attributes[5]) return self.graph
def bulidGraph(self, grahData): for data in grahData: if data.strip() == "": continue if (data[0] == '1'): attributes = code_parser.parseAttributes(data, 6) self.graph.addNode(attributes[1], attributes[2], attributes[3], attributes[4], attributes[5], attributes[6]) else: attributes = code_parser.parseAttributes(data, 5) self.graph.addChildren(attributes[1], attributes[2], attributes[3], attributes[4], attributes[5]) return self.graph
def removeGraphEdges(self, edges): for edge in edges: if edge.strip() == "": continue if(edge[0] == '2'): attributes = code_parser.parseAttributes(edge, 5) self.graph.removeChildren(attributes[1], attributes[2], attributes[ 3], attributes[4], attributes[5]) return self.graph
def removeGraphEdges(self, edges): for edge in edges: if edge.strip() == "": continue if (edge[0] == '2'): attributes = code_parser.parseAttributes(edge, 5) self.graph.removeChildren(attributes[1], attributes[2], attributes[3], attributes[4], attributes[5]) return self.graph