Exemplo n.º 1
0
        internal MatchDomainFmStructure EnforceFmStructure(string id, LL.MDE.DataModels.XML.Tag fmStructure)
        {
            MatchDomainFmStructure match = new MatchDomainFmStructure();

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

            // Contructing fmStructureRoot
            editor.AddOrSetInField(fmStructureRoot, "tagname", "FM-STRUCTURE-ROOT");
            LL.MDE.DataModels.XML.Tag fmStructureElementRef = null;
            fmStructureElementRef = (LL.MDE.DataModels.XML.Tag)editor.CreateNewObjectInField(fmStructureRoot, "childTags");

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

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

            // Return newly binded variables
            match.fmStructure           = fmStructure;
            match.fmStructureRoot       = fmStructureRoot;
            match.fmStructureElementRef = fmStructureElementRef;
            match.idRef = idRef;
            return(match);
        }
        internal void Enforce(ISet <CheckResultProduct2Structure> result, LL.MDE.DataModels.XML.Tag fmStructures)
        {
            foreach (CheckResultProduct2Structure match in result)
            {
                // Extracting variables binded in source domains
                LL.MDE.DataModels.EnAr.Package productP = match.matchDomainProductP.productP;
                string productName = match.matchDomainProductP.productName;
                LL.MDE.DataModels.EnAr.Element productPE = match.matchDomainProductP.productPE;
                string productID = match.matchDomainProductP.productID;
                LL.MDE.DataModels.XML.Tag fmStructureRefs     = match.matchDomainFmStructureRefs.fmStructureRefs;
                LL.MDE.DataModels.XML.Tag fmStructureElements = match.matchDomainFmStructureElements.fmStructureElements;

                // Assigning variables binded in the where clause

                // Enforcing each enforced domain
                MatchDomainFmStructures targetMatchDomainFmStructures = EnforceFmStructures(productID, productName, fmStructures);

                // Retrieving variables binded in the enforced domains
                LL.MDE.DataModels.XML.Tag       fmStructure = targetMatchDomainFmStructures.fmStructure;
                LL.MDE.DataModels.XML.Attribute structureId = targetMatchDomainFmStructures.structureId;
                LL.MDE.DataModels.XML.Tag       longName1   = targetMatchDomainFmStructures.longName1;
                LL.MDE.DataModels.XML.Tag       l41         = targetMatchDomainFmStructures.l41;
                LL.MDE.DataModels.XML.Attribute lAttr1      = targetMatchDomainFmStructures.lAttr1;

                // Calling other relations as defined in the where clause
                new RelationCreateProjectStructureLink(editor, transformation).CheckAndEnforce(structureId, fmStructureRefs); new RelationAddStructureRoot(editor, transformation).CheckAndEnforce(productP, fmStructure, fmStructureElements);
            }
        }
Exemplo n.º 3
0
        internal void Enforce(ISet <CheckResultEA2FMEA_Start> result, LL.MDE.DataModels.XML.XMLFile fmeaFile)
        {
            foreach (CheckResultEA2FMEA_Start match in result)
            {
                // Extracting variables binded in source domains
                LL.MDE.DataModels.EnAr.Package alP      = match.matchDomainAlP.alP;
                LL.MDE.DataModels.EnAr.Element alPE     = match.matchDomainAlP.alPE;
                LL.MDE.DataModels.EnAr.Package projectP = match.matchDomainAlP.projectP;
                string projectName = match.matchDomainAlP.projectName;
                LL.MDE.DataModels.EnAr.Element projectPE = match.matchDomainAlP.projectPE;

                // Assigning variables binded in the where clause

                // Enforcing each enforced domain
                MatchDomainFmeaFile targetMatchDomainFmeaFile = EnforceFmeaFile(projectName, fmeaFile);

                // Retrieving variables binded in the enforced domains
                LL.MDE.DataModels.XML.Tag       msrfmea                = targetMatchDomainFmeaFile.msrfmea;
                LL.MDE.DataModels.XML.Tag       fmProjectsTag          = targetMatchDomainFmeaFile.fmProjectsTag;
                LL.MDE.DataModels.XML.Tag       fmProjectTag           = targetMatchDomainFmeaFile.fmProjectTag;
                LL.MDE.DataModels.XML.Tag       fmStructureRefs        = targetMatchDomainFmeaFile.fmStructureRefs;
                LL.MDE.DataModels.XML.Tag       longName1              = targetMatchDomainFmeaFile.longName1;
                LL.MDE.DataModels.XML.Tag       l41                    = targetMatchDomainFmeaFile.l41;
                LL.MDE.DataModels.XML.Attribute lAttr1                 = targetMatchDomainFmeaFile.lAttr1;
                LL.MDE.DataModels.XML.Tag       fmStructureElementsTag = targetMatchDomainFmeaFile.fmStructureElementsTag;
                LL.MDE.DataModels.XML.Tag       fmStructures           = targetMatchDomainFmeaFile.fmStructures;

                // Calling other relations as defined in the where clause
                new RelationProduct2Structure(editor, transformation).CheckAndEnforce(alP, fmStructureRefs, fmStructureElementsTag, fmStructures);
            }
        }
Exemplo n.º 4
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);
        }
        internal void Enforce(ISet <CheckResultAddStructureRoot> result, LL.MDE.DataModels.XML.Tag structureElements)
        {
            foreach (CheckResultAddStructureRoot match in result)
            {
                // Extracting variables binded in source domains
                LL.MDE.DataModels.EnAr.Package abstractionLevelP = match.matchDomainAbstractionLevelP.abstractionLevelP;
                string alpName = match.matchDomainAbstractionLevelP.alpName;
                LL.MDE.DataModels.EnAr.Package fctsysP = match.matchDomainAbstractionLevelP.fctsysP;
                string fctsysName = match.matchDomainAbstractionLevelP.fctsysName;
                LL.MDE.DataModels.XML.Tag structure = match.matchDomainStructure.structure;

                // Assigning variables binded in the where clause
                string elementName = fctsysName + ' ' + alpName;

                // Enforcing each enforced domain
                MatchDomainStructureElements targetMatchDomainStructureElements = EnforceStructureElements(elementName, structureElements);

                // Retrieving variables binded in the enforced domains
                LL.MDE.DataModels.XML.Tag       fmStructureelement = targetMatchDomainStructureElements.fmStructureelement;
                LL.MDE.DataModels.XML.Tag       longName1          = targetMatchDomainStructureElements.longName1;
                LL.MDE.DataModels.XML.Tag       l41               = targetMatchDomainStructureElements.l41;
                LL.MDE.DataModels.XML.Attribute lAttr1            = targetMatchDomainStructureElements.lAttr1;
                LL.MDE.DataModels.XML.Tag       fmSeDecomposition = targetMatchDomainStructureElements.fmSeDecomposition;
                LL.MDE.DataModels.XML.Attribute structureId       = targetMatchDomainStructureElements.structureId;

                // Calling other relations as defined in the where clause
                new RelationCreateStructureRootLink(editor, transformation).CheckAndEnforce(structureId, structure); new RelationRootProperty2StructureElement(editor, transformation).CheckAndEnforce(abstractionLevelP, fmSeDecomposition, structure, structureElements);
            }
        }
Exemplo n.º 6
0
        internal void Enforce(ISet <CheckResultBlockProperty2StructureElement> result, LL.MDE.DataModels.XML.Tag structureElements)
        {
            foreach (CheckResultBlockProperty2StructureElement match in result)
            {
                // Extracting variables binded in source domains
                LL.MDE.DataModels.EnAr.Element parentEl = match.matchDomainParentEl.parentEl;
                long sid = match.matchDomainParentEl.sid;
                LL.MDE.DataModels.EnAr.Connector aggregation = match.matchDomainParentEl.aggregation;
                int cid = match.matchDomainParentEl.cid;
                LL.MDE.DataModels.EnAr.Element childEl = match.matchDomainParentEl.childEl;
                string id     = match.matchDomainParentEl.id;
                string elName = match.matchDomainParentEl.elName;
                LL.MDE.DataModels.EnAr.Element classifierEl = match.matchDomainParentEl.classifierEl;
                string classifierName = match.matchDomainParentEl.classifierName;
                LL.MDE.DataModels.XML.Tag parentSeDecomposition = match.matchDomainParentSeDecomposition.parentSeDecomposition;

                // Assigning variables binded in the where clause
                string name = elName + ':' + classifierName;

                // Enforcing each enforced domain
                MatchDomainStructureElements targetMatchDomainStructureElements = EnforceStructureElements(name, id, structureElements);

                // Retrieving variables binded in the enforced domains
                LL.MDE.DataModels.XML.Tag       fmStructureelement = targetMatchDomainStructureElements.fmStructureelement;
                LL.MDE.DataModels.XML.Tag       fmSeDecomposition  = targetMatchDomainStructureElements.fmSeDecomposition;
                LL.MDE.DataModels.XML.Tag       longName1          = targetMatchDomainStructureElements.longName1;
                LL.MDE.DataModels.XML.Tag       l41         = targetMatchDomainStructureElements.l41;
                LL.MDE.DataModels.XML.Attribute lAttr1      = targetMatchDomainStructureElements.lAttr1;
                LL.MDE.DataModels.XML.Attribute structureId = targetMatchDomainStructureElements.structureId;

                // Calling other relations as defined in the where clause
                new RelationCreateDecompositionLink(editor, transformation).CheckAndEnforce(structureId, parentSeDecomposition); new RelationBlockProperty2StructureElement(editor, transformation).CheckAndEnforce(childEl, fmSeDecomposition, structureElements);
            }
        }
        internal static ISet <MatchDomainStructure> CheckDomainStructure(LL.MDE.DataModels.XML.Tag structure)
        {
            ISet <MatchDomainStructure> result = new HashSet <MatchDomainStructure>();
            MatchDomainStructure        match  = new MatchDomainStructure()
            {
                structure = structure,
            };

            result.Add(match);

            return(result);
        }
        internal static ISet <MatchDomainFmStructureRefs> CheckDomainFmStructureRefs(LL.MDE.DataModels.XML.Tag fmStructureRefs)
        {
            ISet <MatchDomainFmStructureRefs> result = new HashSet <MatchDomainFmStructureRefs>();
            MatchDomainFmStructureRefs        match  = new MatchDomainFmStructureRefs()
            {
                fmStructureRefs = fmStructureRefs,
            };

            result.Add(match);

            return(result);
        }
Exemplo n.º 9
0
        internal MatchDomainStructureElements EnforceStructureElements(string name, string id, LL.MDE.DataModels.XML.Tag structureElements)
        {
            MatchDomainStructureElements match = new MatchDomainStructureElements();

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

            // Contructing fmStructureelement
            editor.AddOrSetInField(fmStructureelement, "tagname", "FM-STRUCTURE-ELEMENT");
            LL.MDE.DataModels.XML.Tag fmSeDecomposition = null;
            fmSeDecomposition = (LL.MDE.DataModels.XML.Tag)editor.CreateNewObjectInField(fmStructureelement, "childTags");

            LL.MDE.DataModels.XML.Tag longName1 = null;
            longName1 = (LL.MDE.DataModels.XML.Tag)editor.CreateNewObjectInField(fmStructureelement, "childTags");

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

            // Contructing fmSeDecomposition
            editor.AddOrSetInField(fmSeDecomposition, "tagname", "FM-SE-DECOMPOSITION");

            // Contructing longName1
            editor.AddOrSetInField(longName1, "tagname", "LONG-NAME");
            LL.MDE.DataModels.XML.Tag l41 = null;
            l41 = (LL.MDE.DataModels.XML.Tag)editor.CreateNewObjectInField(longName1, "childTags");

            // Contructing l41
            editor.AddOrSetInField(l41, "tagname", "L-4");
            editor.AddOrSetInField(l41, "value", name);
            LL.MDE.DataModels.XML.Attribute lAttr1 = null;
            lAttr1 = (LL.MDE.DataModels.XML.Attribute)editor.CreateNewObjectInField(l41, "attributes");

            // Contructing lAttr1
            editor.AddOrSetInField(lAttr1, "name", "L");
            editor.AddOrSetInField(lAttr1, "value", "bp2se");

            // Contructing structureId
            editor.AddOrSetInField(structureId, "name", "ID");
            editor.AddOrSetInField(structureId, "value", id);

            // Return newly binded variables
            match.structureElements  = structureElements;
            match.fmStructureelement = fmStructureelement;
            match.fmSeDecomposition  = fmSeDecomposition;
            match.longName1          = longName1;
            match.l41         = l41;
            match.lAttr1      = lAttr1;
            match.structureId = structureId;
            return(match);
        }
Exemplo n.º 10
0
        internal void CheckAndEnforce(LL.MDE.DataModels.XML.Attribute tagId, LL.MDE.DataModels.XML.Tag decompositions)
        {
            CheckOnlyDomains input  = new CheckOnlyDomains(tagId);
            EnforceDomains   output = new EnforceDomains(decompositions);

            if (traceabilityMap.ContainsKey(input) && !traceabilityMap[input].Equals(output))
            {
                throw new Exception("This relation has already been used with different enforced parameters!");
            }
            if (!traceabilityMap.ContainsKey(input))
            {
                ISet <CheckResultCreateDecompositionLink> result = Check(tagId);
                Enforce(result, decompositions);
                traceabilityMap[input] = output;
            }
        }
        internal void Enforce(ISet <CheckResultCreateProjectStructureLink> result, LL.MDE.DataModels.XML.Tag fmStructureRefs)
        {
            foreach (CheckResultCreateProjectStructureLink match in result)
            {
                // Extracting variables binded in source domains
                LL.MDE.DataModels.XML.Attribute structureIdRef = match.matchDomainStructureIdRef.structureIdRef;
                string id = match.matchDomainStructureIdRef.id;

                // Enforcing each enforced domain
                MatchDomainFmStructureRefs targetMatchDomainFmStructureRefs = EnforceFmStructureRefs(id, fmStructureRefs);

                // Retrieving variables binded in the enforced domains
                LL.MDE.DataModels.XML.Tag       fmStructureRef = targetMatchDomainFmStructureRefs.fmStructureRef;
                LL.MDE.DataModels.XML.Attribute idRef          = targetMatchDomainFmStructureRefs.idRef;
            }
        }
Exemplo n.º 12
0
        internal void CheckAndEnforce(LL.MDE.DataModels.EnAr.Element parentEl, LL.MDE.DataModels.XML.Tag parentSeDecomposition, LL.MDE.DataModels.XML.Tag structureElements)
        {
            CheckOnlyDomains input  = new CheckOnlyDomains(parentEl, parentSeDecomposition);
            EnforceDomains   output = new EnforceDomains(structureElements);

            if (traceabilityMap.ContainsKey(input) && !traceabilityMap[input].Equals(output))
            {
                throw new Exception("This relation has already been used with different enforced parameters!");
            }
            if (!traceabilityMap.ContainsKey(input))
            {
                ISet <CheckResultBlockProperty2StructureElement> result = Check(parentEl, parentSeDecomposition);
                Enforce(result, structureElements);
                traceabilityMap[input] = output;
            }
        }
        internal void CheckAndEnforce(LL.MDE.DataModels.EnAr.Package productP, LL.MDE.DataModels.XML.Tag fmStructureRefs, LL.MDE.DataModels.XML.Tag fmStructureElements, LL.MDE.DataModels.XML.Tag fmStructures)
        {
            CheckOnlyDomains input  = new CheckOnlyDomains(productP, fmStructureRefs, fmStructureElements);
            EnforceDomains   output = new EnforceDomains(fmStructures);

            if (traceabilityMap.ContainsKey(input) && !traceabilityMap[input].Equals(output))
            {
                throw new Exception("This relation has already been used with different enforced parameters!");
            }
            if (!traceabilityMap.ContainsKey(input))
            {
                ISet <CheckResultProduct2Structure> result = Check(productP, fmStructureRefs, fmStructureElements);
                Enforce(result, fmStructures);
                traceabilityMap[input] = output;
            }
        }
Exemplo n.º 14
0
        internal void Enforce(ISet <CheckResultCreateStructureRootLink> result, LL.MDE.DataModels.XML.Tag fmStructure)
        {
            foreach (CheckResultCreateStructureRootLink match in result)
            {
                // Extracting variables binded in source domains
                LL.MDE.DataModels.XML.Attribute structureElementRef = match.matchDomainStructureElementRef.structureElementRef;
                string id = match.matchDomainStructureElementRef.id;

                // Enforcing each enforced domain
                MatchDomainFmStructure targetMatchDomainFmStructure = EnforceFmStructure(id, fmStructure);

                // Retrieving variables binded in the enforced domains
                LL.MDE.DataModels.XML.Tag       fmStructureRoot       = targetMatchDomainFmStructure.fmStructureRoot;
                LL.MDE.DataModels.XML.Tag       fmStructureElementRef = targetMatchDomainFmStructure.fmStructureElementRef;
                LL.MDE.DataModels.XML.Attribute idRef = targetMatchDomainFmStructure.idRef;
            }
        }
Exemplo n.º 15
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;
            }
        }
        internal MatchDomainFmStructures EnforceFmStructures(string productID, string productName, LL.MDE.DataModels.XML.Tag fmStructures)
        {
            MatchDomainFmStructures match = new MatchDomainFmStructures();

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

            // Contructing fmStructure
            editor.AddOrSetInField(fmStructure, "tagname", "FM-STRUCTURE");
            LL.MDE.DataModels.XML.Attribute structureId = null;
            structureId = (LL.MDE.DataModels.XML.Attribute)editor.CreateNewObjectInField(fmStructure, "attributes");

            LL.MDE.DataModels.XML.Tag longName1 = null;
            longName1 = (LL.MDE.DataModels.XML.Tag)editor.CreateNewObjectInField(fmStructure, "childTags");

            // Contructing structureId
            editor.AddOrSetInField(structureId, "name", "ID");
            editor.AddOrSetInField(structureId, "value", productID);

            // Contructing longName1
            editor.AddOrSetInField(longName1, "tagname", "LONG-NAME");
            LL.MDE.DataModels.XML.Tag l41 = null;
            l41 = (LL.MDE.DataModels.XML.Tag)editor.CreateNewObjectInField(longName1, "childTags");

            // Contructing l41
            editor.AddOrSetInField(l41, "tagname", "L-4");
            editor.AddOrSetInField(l41, "value", productName);
            LL.MDE.DataModels.XML.Attribute lAttr1 = null;
            lAttr1 = (LL.MDE.DataModels.XML.Attribute)editor.CreateNewObjectInField(l41, "attributes");

            // Contructing lAttr1
            editor.AddOrSetInField(lAttr1, "name", "L");
            editor.AddOrSetInField(lAttr1, "value", "Product2Structure");

            // Return newly binded variables
            match.fmStructures = fmStructures;
            match.fmStructure  = fmStructure;
            match.structureId  = structureId;
            match.longName1    = longName1;
            match.l41          = l41;
            match.lAttr1       = lAttr1;
            return(match);
        }
        internal MatchDomainFmStructureRefs EnforceFmStructureRefs(string id, LL.MDE.DataModels.XML.Tag fmStructureRefs)
        {
            MatchDomainFmStructureRefs match = new MatchDomainFmStructureRefs();

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

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

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

            // Return newly binded variables
            match.fmStructureRefs = fmStructureRefs;
            match.fmStructureRef  = fmStructureRef;
            match.idRef           = idRef;
            return(match);
        }
        internal static ISet <CheckResultProduct2Structure> Check(LL.MDE.DataModels.EnAr.Package productP, LL.MDE.DataModels.XML.Tag fmStructureRefs, LL.MDE.DataModels.XML.Tag fmStructureElements)
        {
            ISet <CheckResultProduct2Structure> result = new HashSet <CheckResultProduct2Structure>(); ISet <MatchDomainProductP> matchDomainProductPs = CheckDomainProductP(productP); ISet <MatchDomainFmStructureRefs> matchDomainFmStructureRefss = CheckDomainFmStructureRefs(fmStructureRefs); ISet <MatchDomainFmStructureElements> matchDomainFmStructureElementss = CheckDomainFmStructureElements(fmStructureElements); foreach (MatchDomainProductP matchDomainProductP in matchDomainProductPs)

            {
                foreach (MatchDomainFmStructureRefs matchDomainFmStructureRefs in matchDomainFmStructureRefss)
                {
                    foreach (MatchDomainFmStructureElements matchDomainFmStructureElements in matchDomainFmStructureElementss)
                    {
                        string productName = matchDomainProductP.productName;

                        LL.MDE.DataModels.EnAr.Element productPE = matchDomainProductP.productPE;
                        string productID = matchDomainProductP.productID;
                        CheckResultProduct2Structure checkonlysMatch = new CheckResultProduct2Structure()
                        {
                            matchDomainProductP = matchDomainProductP, matchDomainFmStructureRefs = matchDomainFmStructureRefs, matchDomainFmStructureElements = matchDomainFmStructureElements,
                        };
                        result.Add(checkonlysMatch);
                    }                             // End foreach
                }                                 // End foreach
            }                                     // End foreach
            return(result);
        }
        public EnforceDomains FindPreviousResult(LL.MDE.DataModels.EnAr.Package productP, LL.MDE.DataModels.XML.Tag fmStructureRefs, LL.MDE.DataModels.XML.Tag fmStructureElements)
        {
            CheckOnlyDomains input = new CheckOnlyDomains(productP, fmStructureRefs, fmStructureElements);

            return(traceabilityMap.ContainsKey(input) ? traceabilityMap[input] : null);
        }
        public EnforceDomains FindPreviousResult(LL.MDE.DataModels.EnAr.Package abstractionLevelP, LL.MDE.DataModels.XML.Tag structure)
        {
            CheckOnlyDomains input = new CheckOnlyDomains(abstractionLevelP, structure);

            return(traceabilityMap.ContainsKey(input) ? traceabilityMap[input] : null);
        }
        internal void CheckAndEnforce(LL.MDE.DataModels.XML.Attribute structureIdRef, LL.MDE.DataModels.XML.Tag fmStructureRefs)
        {
            CheckOnlyDomains input  = new CheckOnlyDomains(structureIdRef);
            EnforceDomains   output = new EnforceDomains(fmStructureRefs);

            if (traceabilityMap.ContainsKey(input) && !traceabilityMap[input].Equals(output))
            {
                throw new Exception("This relation has already been used with different enforced parameters!");
            }
            if (!traceabilityMap.ContainsKey(input))
            {
                ISet <CheckResultCreateProjectStructureLink> result = Check(structureIdRef);
                Enforce(result, fmStructureRefs);
                traceabilityMap[input] = output;
            }
        }
        internal static ISet <CheckResultRootProperty2StructureElement> Check(LL.MDE.DataModels.EnAr.Package abstractionLevelP, LL.MDE.DataModels.XML.Tag parentSeDecomposition, LL.MDE.DataModels.XML.Tag stucture)
        {
            ISet <CheckResultRootProperty2StructureElement> result = new HashSet <CheckResultRootProperty2StructureElement>(); ISet <MatchDomainAbstractionLevelP> matchDomainAbstractionLevelPs = CheckDomainAbstractionLevelP(abstractionLevelP); ISet <MatchDomainParentSeDecomposition> matchDomainParentSeDecompositions = CheckDomainParentSeDecomposition(parentSeDecomposition); ISet <MatchDomainStucture> matchDomainStuctures = CheckDomainStucture(stucture); foreach (MatchDomainAbstractionLevelP matchDomainAbstractionLevelP in matchDomainAbstractionLevelPs)

            {
                foreach (MatchDomainParentSeDecomposition matchDomainParentSeDecomposition in matchDomainParentSeDecompositions)
                {
                    foreach (MatchDomainStucture matchDomainStucture in matchDomainStuctures)
                    {
                        LL.MDE.DataModels.EnAr.Package bpP = matchDomainAbstractionLevelP.bpP;

                        LL.MDE.DataModels.EnAr.Element bpPE    = matchDomainAbstractionLevelP.bpPE;
                        LL.MDE.DataModels.EnAr.Element childEl = matchDomainAbstractionLevelP.childEl;
                        string id     = matchDomainAbstractionLevelP.id;
                        string elName = matchDomainAbstractionLevelP.elName;
                        long   reid   = matchDomainAbstractionLevelP.reid;
                        LL.MDE.DataModels.EnAr.Element classifierEl = matchDomainAbstractionLevelP.classifierEl;
                        string classifierName = matchDomainAbstractionLevelP.classifierName;
                        CheckResultRootProperty2StructureElement checkonlysMatch = new CheckResultRootProperty2StructureElement()
                        {
                            matchDomainAbstractionLevelP = matchDomainAbstractionLevelP, matchDomainParentSeDecomposition = matchDomainParentSeDecomposition, matchDomainStucture = matchDomainStucture,
                        };
                        result.Add(checkonlysMatch);
                    }                             // End foreach
                }                                 // End foreach
            }                                     // End foreach
            return(result);
        }
        internal static ISet <CheckResultAddStructureRoot> Check(LL.MDE.DataModels.EnAr.Package abstractionLevelP, LL.MDE.DataModels.XML.Tag structure)
        {
            ISet <CheckResultAddStructureRoot> result = new HashSet <CheckResultAddStructureRoot>(); ISet <MatchDomainAbstractionLevelP> matchDomainAbstractionLevelPs = CheckDomainAbstractionLevelP(abstractionLevelP); ISet <MatchDomainStructure> matchDomainStructures = CheckDomainStructure(structure); foreach (MatchDomainAbstractionLevelP matchDomainAbstractionLevelP in matchDomainAbstractionLevelPs)

            {
                foreach (MatchDomainStructure matchDomainStructure in matchDomainStructures)
                {
                    string alpName = matchDomainAbstractionLevelP.alpName;

                    LL.MDE.DataModels.EnAr.Package fctsysP = matchDomainAbstractionLevelP.fctsysP;
                    string fctsysName = matchDomainAbstractionLevelP.fctsysName;
                    CheckResultAddStructureRoot checkonlysMatch = new CheckResultAddStructureRoot()
                    {
                        matchDomainAbstractionLevelP = matchDomainAbstractionLevelP, matchDomainStructure = matchDomainStructure,
                    };
                    result.Add(checkonlysMatch);
                }                                 // End foreach
            }                                     // End foreach
            return(result);
        }
Exemplo n.º 24
0
        internal static ISet <CheckResultBlockProperty2StructureElement> Check(LL.MDE.DataModels.EnAr.Element parentEl, LL.MDE.DataModels.XML.Tag parentSeDecomposition)
        {
            ISet <CheckResultBlockProperty2StructureElement> result = new HashSet <CheckResultBlockProperty2StructureElement>(); ISet <MatchDomainParentEl> matchDomainParentEls = CheckDomainParentEl(parentEl); ISet <MatchDomainParentSeDecomposition> matchDomainParentSeDecompositions = CheckDomainParentSeDecomposition(parentSeDecomposition); foreach (MatchDomainParentEl matchDomainParentEl in matchDomainParentEls)

            {
                foreach (MatchDomainParentSeDecomposition matchDomainParentSeDecomposition in matchDomainParentSeDecompositions)
                {
                    long sid = matchDomainParentEl.sid;

                    LL.MDE.DataModels.EnAr.Connector aggregation = matchDomainParentEl.aggregation;
                    int cid = matchDomainParentEl.cid;
                    LL.MDE.DataModels.EnAr.Element childEl = matchDomainParentEl.childEl;
                    string id     = matchDomainParentEl.id;
                    string elName = matchDomainParentEl.elName;
                    LL.MDE.DataModels.EnAr.Element classifierEl = matchDomainParentEl.classifierEl;
                    string classifierName = matchDomainParentEl.classifierName;
                    CheckResultBlockProperty2StructureElement checkonlysMatch = new CheckResultBlockProperty2StructureElement()
                    {
                        matchDomainParentEl = matchDomainParentEl, matchDomainParentSeDecomposition = matchDomainParentSeDecomposition,
                    };
                    result.Add(checkonlysMatch);
                }                                 // End foreach
            }                                     // End foreach
            return(result);
        }
Exemplo n.º 25
0
        public EnforceDomains FindPreviousResult(LL.MDE.DataModels.EnAr.Element parentEl, LL.MDE.DataModels.XML.Tag parentSeDecomposition)
        {
            CheckOnlyDomains input = new CheckOnlyDomains(parentEl, parentSeDecomposition);

            return(traceabilityMap.ContainsKey(input) ? traceabilityMap[input] : null);
        }
        internal void CheckAndEnforce(LL.MDE.DataModels.EnAr.Package abstractionLevelP, LL.MDE.DataModels.XML.Tag structure, LL.MDE.DataModels.XML.Tag structureElements)
        {
            CheckOnlyDomains input  = new CheckOnlyDomains(abstractionLevelP, structure);
            EnforceDomains   output = new EnforceDomains(structureElements);

            if (traceabilityMap.ContainsKey(input) && !traceabilityMap[input].Equals(output))
            {
                throw new Exception("This relation has already been used with different enforced parameters!");
            }
            if (!traceabilityMap.ContainsKey(input))
            {
                ISet <CheckResultAddStructureRoot> result = Check(abstractionLevelP, structure);
                Enforce(result, structureElements);
                traceabilityMap[input] = output;
            }
        }
Exemplo n.º 27
0
        internal static ISet <MatchDomainParentSeDecomposition> CheckDomainParentSeDecomposition(LL.MDE.DataModels.XML.Tag parentSeDecomposition)
        {
            ISet <MatchDomainParentSeDecomposition> result = new HashSet <MatchDomainParentSeDecomposition>();
            MatchDomainParentSeDecomposition        match  = new MatchDomainParentSeDecomposition()
            {
                parentSeDecomposition = parentSeDecomposition,
            };

            result.Add(match);

            return(result);
        }
Exemplo n.º 28
0
        internal MatchDomainFmeaFile EnforceFmeaFile(string projectName, LL.MDE.DataModels.XML.XMLFile fmeaFile)
        {
            MatchDomainFmeaFile match = new MatchDomainFmeaFile();

            // Contructing fmeaFile
            editor.AddOrSetInField(fmeaFile, "encoding", "ISO-8859-1");
            editor.AddOrSetInField(fmeaFile, "filename", "C:\vectortest\fmeatest3.xml");
            LL.MDE.DataModels.XML.Tag msrfmea = null;
            msrfmea = (LL.MDE.DataModels.XML.Tag)editor.CreateNewObjectInField(fmeaFile, "content");

            // Contructing msrfmea
            editor.AddOrSetInField(msrfmea, "tagname", "MSRFMEA");
            LL.MDE.DataModels.XML.Tag fmProjectsTag = null;
            fmProjectsTag = (LL.MDE.DataModels.XML.Tag)editor.CreateNewObjectInField(msrfmea, "childTags");

            LL.MDE.DataModels.XML.Tag fmStructureElementsTag = null;
            fmStructureElementsTag = (LL.MDE.DataModels.XML.Tag)editor.CreateNewObjectInField(msrfmea, "childTags");

            LL.MDE.DataModels.XML.Tag fmStructures = null;
            fmStructures = (LL.MDE.DataModels.XML.Tag)editor.CreateNewObjectInField(msrfmea, "childTags");

            // Contructing fmProjectsTag
            editor.AddOrSetInField(fmProjectsTag, "tagname", "FM-PROJECTS");
            LL.MDE.DataModels.XML.Tag fmProjectTag = null;
            fmProjectTag = (LL.MDE.DataModels.XML.Tag)editor.CreateNewObjectInField(fmProjectsTag, "childTags");

            // Contructing fmProjectTag
            editor.AddOrSetInField(fmProjectTag, "tagname", "FM-PROJECT");
            LL.MDE.DataModels.XML.Tag fmStructureRefs = null;
            fmStructureRefs = (LL.MDE.DataModels.XML.Tag)editor.CreateNewObjectInField(fmProjectTag, "childTags");

            LL.MDE.DataModels.XML.Tag longName1 = null;
            longName1 = (LL.MDE.DataModels.XML.Tag)editor.CreateNewObjectInField(fmProjectTag, "childTags");

            // Contructing fmStructureRefs
            editor.AddOrSetInField(fmStructureRefs, "tagname", "FM-STRUCTURE-REFS");

            // Contructing longName1
            editor.AddOrSetInField(longName1, "tagname", "LONG-NAME");
            LL.MDE.DataModels.XML.Tag l41 = null;
            l41 = (LL.MDE.DataModels.XML.Tag)editor.CreateNewObjectInField(longName1, "childTags");

            // Contructing l41
            editor.AddOrSetInField(l41, "tagname", "L-4");
            editor.AddOrSetInField(l41, "value", projectName);
            LL.MDE.DataModels.XML.Attribute lAttr1 = null;
            lAttr1 = (LL.MDE.DataModels.XML.Attribute)editor.CreateNewObjectInField(l41, "attributes");

            // Contructing lAttr1
            editor.AddOrSetInField(lAttr1, "name", "L");

            // Contructing fmStructureElementsTag
            editor.AddOrSetInField(fmStructureElementsTag, "tagname", "FM-STRUCTURE-ELEMENTS");

            // Contructing fmStructures
            editor.AddOrSetInField(fmStructures, "tagname", "FM-STRUCTURES");

            // Return newly binded variables
            match.fmeaFile               = fmeaFile;
            match.msrfmea                = msrfmea;
            match.fmProjectsTag          = fmProjectsTag;
            match.fmProjectTag           = fmProjectTag;
            match.fmStructureRefs        = fmStructureRefs;
            match.longName1              = longName1;
            match.l41                    = l41;
            match.lAttr1                 = lAttr1;
            match.fmStructureElementsTag = fmStructureElementsTag;
            match.fmStructures           = fmStructures;
            return(match);
        }