コード例 #1
0
        internal MatchDomainDecompositions EnforceDecompositions(string id, LL.MDE.DataModels.XML.Tag decompositions)
        {
            MatchDomainDecompositions match = new MatchDomainDecompositions();

            // Contructing decompositions
            LL.MDE.DataModels.XML.Tag decomposition = null;
            decomposition = (LL.MDE.DataModels.XML.Tag)editor.CreateNewObjectInField(decompositions, "childTags");

            // Contructing decomposition
            editor.AddOrSetInField(decomposition, "tagname", "FM-STRUCTURE-ELEMENT-REF");
            LL.MDE.DataModels.XML.Attribute idRef = null;
            idRef = (LL.MDE.DataModels.XML.Attribute)editor.CreateNewObjectInField(decomposition, "attributes");

            LL.MDE.DataModels.XML.Attribute fidClassAttr = null;
            fidClassAttr = (LL.MDE.DataModels.XML.Attribute)editor.CreateNewObjectInField(decomposition, "attributes");

            // Contructing idRef
            editor.AddOrSetInField(idRef, "name", "ID-REF");
            editor.AddOrSetInField(idRef, "value", id);

            // Contructing fidClassAttr
            editor.AddOrSetInField(fidClassAttr, "name", "F-ID-CLASS");
            editor.AddOrSetInField(fidClassAttr, "value", "FM-STRUCTURE-ELEMENT");

            // Return newly binded variables
            match.decompositions = decompositions;
            match.decomposition  = decomposition;
            match.idRef          = idRef;
            match.fidClassAttr   = fidClassAttr;
            return(match);
        }
コード例 #2
0
        internal void Enforce(ISet <CheckResultCreateDecompositionLink> result, LL.MDE.DataModels.XML.Tag decompositions)
        {
            foreach (CheckResultCreateDecompositionLink match in result)
            {
                // Extracting variables binded in source domains
                LL.MDE.DataModels.XML.Attribute tagId = match.matchDomainTagId.tagId;
                string id = match.matchDomainTagId.id;

                // Enforcing each enforced domain
                MatchDomainDecompositions targetMatchDomainDecompositions = EnforceDecompositions(id, decompositions);

                // Retrieving variables binded in the enforced domains
                LL.MDE.DataModels.XML.Tag       decomposition = targetMatchDomainDecompositions.decomposition;
                LL.MDE.DataModels.XML.Attribute idRef         = targetMatchDomainDecompositions.idRef;
                LL.MDE.DataModels.XML.Attribute fidClassAttr  = targetMatchDomainDecompositions.fidClassAttr;
            }
        }