(cls)
| 26 | |
| 27 | @classmethod |
| 28 | def init(cls) : |
| 29 | Node.all = {} |
| 30 | Node.keys = [] |
| 31 | |
| 32 | for node_type in [u'person', u'company'] : |
| 33 | for node_id in os.listdir(u'../data/' + node_type) : |
| 34 | yaml_file = u'../data/%s/%s/brief.yaml' % (node_type, node_id) |
| 35 | node = Node(_load_yaml(yaml_file), node_id, node_type) |
| 36 | if node_id in Node.all : |
| 37 | _raise_err(u'Node id conflict: "%s"!', node_id) |
| 38 | |
| 39 | Node.all[node_id] = node |
| 40 | Node.keys.append(node_id) |
| 41 | print(u'Node number: %d' % len(Node.all)) |
| 42 | |
| 43 | |
| 44 | def __init__(self, yaml, node_id, type) : |
no test coverage detected