/// <summary> Builds a complete Graph by traversing root /// </summary> /// <param name="">root /// /// </param> public static ViewGraphNode buildFromRete(RootNode root) { Collection firstLevel = root.ObjectTypeNodes.values(); ViewGraphNode res = new ViewGraphNode(); System.Collections.Hashtable ht = new System.Collections.Hashtable(); for (Iterator iter = firstLevel.iterator(); iter.hasNext();) { BaseNode b = (BaseNode)iter.next(); res.addToChilds(buildFromRete(b, ht)); } return(res); }
protected internal static ViewGraphNode buildFromRete(BaseNode root, System.Collections.Hashtable ht) { System.Object[] succ = root.SuccessorNodes; ViewGraphNode foo = (ViewGraphNode)ht[root]; ViewGraphNode res = null; if (foo == null) { res = new ViewGraphNode(root); for (int i = 0; i < succ.Length; i++) { res.addToChilds(buildFromRete((BaseNode)succ[i], ht)); } SupportClass.PutElement(ht, root, res); } else { res = foo; } return(res); }
protected internal static ViewGraphNode buildFromRete(BaseNode root, System.Collections.Hashtable ht) { System.Object[] succ = root.SuccessorNodes; ViewGraphNode foo = (ViewGraphNode) ht[root]; ViewGraphNode res = null; if (foo == null) { res = new ViewGraphNode(root); for (int i = 0; i < succ.Length; i++) { res.addToChilds(buildFromRete((BaseNode) succ[i], ht)); } SupportClass.PutElement(ht, root, res); } else { res = foo; } return res; }
/// <summary> Builds a complete Graph by traversing root /// </summary> /// <param name="">root /// /// </param> public static ViewGraphNode buildFromRete(RootNode root) { Collection firstLevel = root.ObjectTypeNodes.values(); ViewGraphNode res = new ViewGraphNode(); System.Collections.Hashtable ht = new System.Collections.Hashtable(); for (Iterator iter = firstLevel.iterator(); iter.hasNext(); ) { BaseNode b = (BaseNode) iter.next(); res.addToChilds(buildFromRete(b, ht)); } return res; }