Beispiel #1
0
        public void buildTree(opis b)
        {
            opis term = context.Find(b.PartitionName);

            if (term.isDuplicated_)
            {
                b.PartitionKind = "circular";
                return;
            }

            if (string.IsNullOrEmpty(term.PartitionName) || !term.isInitlze)
            {
                return;
            }

            opis intellection = context.Find(term[ModelNotion.intellection].body.Trim());

            if (!intellection.isInitlze)
            {
                return;
            }

            term.lockThisForDuplication();

            b.PartitionKind = intellection.PartitionName;

            string ontology = term.V(ModelNotion.ontology) + " "
                              + intellection.V(ModelNotion.ontology);

            if (!string.IsNullOrWhiteSpace(ontology))
            {
                string[] ttt = ontology.Split();

                foreach (string n in ttt)
                {
                    if (!string.IsNullOrWhiteSpace(n))
                    {
                        opis tmp = new opis();
                        tmp.PartitionName = context.Find(n).PartitionName;
                        if (string.IsNullOrEmpty(tmp.PartitionName))
                        {
                            tmp.PartitionName = n;
                        }

                        b.AddArr(tmp);

                        buildTree(tmp);
                    }
                }
            }

            term.UnlockThisForDuplication();
        }