def dag_node(self, key, term): dn = DagNode() dn._node_key = key dn._object_key = key vt = VocTerm() vt.term = term dn.vocterm = vt return dn
def tree_node(self, key, term): dn = DagNode() dn._object_key = key vt = VocTerm() vt.term = term dn.vocterm = vt tn = TreeNode(dn) return tn