예제 #1
0
        public MVDNamedIdentifiedItem(MvdXMLDocument mvdXMLDocument, XPathNavigator xPathNavigator)
        {
            TopXmlDoc = mvdXMLDocument;
            Navigator = xPathNavigator;

            Name = xPathNavigator.GetAttribute("name", "");
            uuid = xPathNavigator.GetAttribute("uuid", "");
        }
예제 #2
0
 public MvdConceptERReference(MvdXMLDocument mvdXMLDocument, XPathNavigator childNav, string conceptUUID)
 {
     Concept             = conceptUUID;
     applicability       = childNav.GetAttribute("applicability", "");
     requirement         = childNav.GetAttribute("requirement", "");
     exchangeRequirement = childNav.GetAttribute("exchangeRequirement", "");
     mvdXMLDocument.Refs.Add(this);
 }
예제 #3
0
        public MvdExchangeRequirement(MvdXMLDocument mvdXMLDocument, XPathNavigator xPathNavigator)
            : base(mvdXMLDocument, xPathNavigator)
        {
            Applicability = xPathNavigator.GetAttribute("Applicability", "");

            XPathNavigator childNav = xPathNavigator.Clone();
            var            ret      = childNav.MoveToChild("Definitions", mvdXMLDocument.fileNameSpace);

            ret  = childNav.MoveToChild("Definition", mvdXMLDocument.fileNameSpace);
            ret  = childNav.MoveToChild("Body", mvdXMLDocument.fileNameSpace);
            Body = childNav.Value;
        }
예제 #4
0
        public MvdConceptRoot(MvdXMLDocument mvdXMLDocument, XPathNavigator xPathNavigator)
            : base(mvdXMLDocument, xPathNavigator)
        {
            applicableRootEntity = xPathNavigator.GetAttribute("applicableRootEntity", "");
            XPathNavigator childNav = xPathNavigator.Clone();

            childNav.MoveToChild("Concepts", mvdXMLDocument.fileNameSpace);
            var ret = childNav.MoveToChild("Concept", mvdXMLDocument.fileNameSpace);

            Concepts = new List <MvdConcept>();
            while (ret)
            {
                var c = new MvdConcept(mvdXMLDocument, childNav);
                c.ConceptRoot = this;
                Concepts.Add(c);
                ret = childNav.MoveToNext("Concept", mvdXMLDocument.fileNameSpace);
            }
        }
예제 #5
0
        public MvdConcept(MvdXMLDocument mvdXMLDocument, XPathNavigator xPathNavigator)
            : base(mvdXMLDocument, xPathNavigator)
        {
            Override = (xPathNavigator.GetAttribute("override", "") == "true") ? true : false;
            Author   = xPathNavigator.GetAttribute("author", "");
            if (Author != "")
            {
            }

            XPathNavigator childNav = xPathNavigator.Clone();

            childNav.MoveToChild("Template", mvdXMLDocument.fileNameSpace);
            TemplateUUID = childNav.GetAttribute("ref", "");
            // reqs
            childNav = xPathNavigator.Clone();
            childNav.MoveToChild("Requirements", mvdXMLDocument.fileNameSpace);
            var ret = childNav.MoveToChild("Requirement", mvdXMLDocument.fileNameSpace);

            while (ret)
            {
                MvdConceptERReference v = new MvdConceptERReference(mvdXMLDocument, childNav, uuid);
                ret = childNav.MoveToNext("Requirement", mvdXMLDocument.fileNameSpace);
            }

            // rules
            childNav = xPathNavigator.Clone();
            childNav.MoveToChild("Rules", mvdXMLDocument.fileNameSpace);
            ret = childNav.MoveToChild("TemplateRule", mvdXMLDocument.fileNameSpace);

            TemplateRuleProperties = new List <MvdRulePropertySet>();
            while (ret)
            {
                string             param = childNav.GetAttribute("Parameters", "");
                MvdRulePropertySet s     = new MvdRulePropertySet(param);
                TemplateRuleProperties.Add(s);
                ret = childNav.MoveToNext("TemplateRule", mvdXMLDocument.fileNameSpace);
            }
            mvdXMLDocument.AddConcept(this);
            mvdXMLDocument.LoadConceptTemplate(TemplateUUID);
        }
예제 #6
0
        public MvdConceptTemplate(MvdXMLDocument mvdXMLDocument, XPathNavigator xPathNavigator)
            : base(mvdXMLDocument, xPathNavigator)
        {
            status           = xPathNavigator.GetAttribute("status", "");
            applicableSchema = xPathNavigator.GetAttribute("applicableSchema", "");
            applicableEntity = xPathNavigator.GetAttribute("applicableEntity", "");


            XPathNavigator childNav = xPathNavigator.Clone();

            childNav.MoveToChild("Rules", mvdXMLDocument.fileNameSpace);

            Debug.Write("ConceptTemplate: " + uuid);

            var ret = childNav.MoveToFirstChild();

            Rules = new List <MvdRule>();
            while (ret)
            {
                Rules.Add(new MvdRule(childNav, null));
                ret = childNav.MoveToNext();
            }
            Debug.WriteLine("Done");
        }