Beispiel #1
0
        internal string StringReport()
        {
            StringBuilder sb = new StringBuilder();

            sb.AppendFormat("Concept: {0} ref template: {1} root: {2} root applies: {3}\r\n", Name, TemplateUUID, ConceptRoot.uuid, ConceptRoot.applicableRootEntity);
            MvdConceptTemplate t = null;

            if (TopXmlDoc.ConceptTemplates.ContainsKey(TemplateUUID))
            {
                t = TopXmlDoc.ConceptTemplates[TemplateUUID];
            }

            if (TemplateRuleProperties.Count > 0)
            {
                sb.AppendFormat("Rules:\r\n", Name, TemplateUUID);
                foreach (var item in TemplateRuleProperties)
                {
                    sb.Append(item.StringReport());
                    foreach (var parname in item.ParValues())
                    {
                        sb.AppendFormat("\t\t{0} -> {1}\r\n", t.GetPropRuleQS(parname.Name), parname.Val);
                    }
                }
            }
            if (false)
            {
                if (t != null)
                {
                    sb.Append(t.StringReport());
                }
                sb.AppendLine("template missing");
            }
            return(sb.ToString());
        }
Beispiel #2
0
        internal bool LoadConceptTemplate(string Template)
        {
            if (ConceptTemplates.ContainsKey(Template))
            {
                return(true);
            }

            string strExpression = string.Format(
                "//mvd:ConceptTemplate[@uuid='{0}']",
                Template
                );

            bool ret      = false;
            var  NodeIter = GetElements(strExpression);

            while (NodeIter.MoveNext())
            {
                MvdConceptTemplate ct = new MvdConceptTemplate(this, NodeIter.Current);
                ConceptTemplates.Add(Template, ct);
                ret = true;
            }
            ;
            return(ret);
        }