示例#1
0
        /// <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);
        }
示例#2
0
        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);
        }
示例#3
0
 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;
 }
示例#4
0
 /// <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;
 }