Example #1
0
        internal static ISet <MatchDomainAlP> CheckDomainAlP(LL.MDE.DataModels.EnAr.Package alP)
        {
            ISet <MatchDomainAlP> result = new HashSet <MatchDomainAlP>();

            LL.MDE.DataModels.EnAr.Element alPE     = alP.Element;
            LL.MDE.DataModels.EnAr.Package projectP = alP.ParentPackage();
            if (alPE.Stereotype == "abstraction level" && alPE.ElementPackage() == alP)
            {
                string projectName = projectP.Name;
                LL.MDE.DataModels.EnAr.Element projectPE = projectP.Element;
                if (projectPE.Stereotype == "fctsys" && projectPE.ElementPackage() == projectP)
                {
                    MatchDomainAlP match = new MatchDomainAlP()
                    {
                        alP         = alP,
                        alPE        = alPE,
                        projectP    = projectP,
                        projectName = projectName,
                        projectPE   = projectPE,
                    };
                    result.Add(match);
                }
            }
            return(result);
        }
        internal static ISet <MatchDomainAbstractionLevelP> CheckDomainAbstractionLevelP(LL.MDE.DataModels.EnAr.Package abstractionLevelP)
        {
            ISet <MatchDomainAbstractionLevelP> result = new HashSet <MatchDomainAbstractionLevelP>();

            foreach (LL.MDE.DataModels.EnAr.Package bpP  in abstractionLevelP.Packages.OfType <LL.MDE.DataModels.EnAr.Package>())
            {
                LL.MDE.DataModels.EnAr.Element bpPE = bpP.Element;
                if (bpP.ParentPackage() == abstractionLevelP)
                {
                    foreach (LL.MDE.DataModels.EnAr.Element childEl  in bpP.Elements.OfType <LL.MDE.DataModels.EnAr.Element>())
                    {
                        if (bpPE.Stereotype == "block properties" && bpPE.ElementPackage() == bpP)
                        {
                            string id     = childEl.ElementGUID;
                            string elName = childEl.Name;
                            long   reid   = childEl.ElementID;
                            LL.MDE.DataModels.EnAr.Element classifierEl = childEl.Classifier();
                            if (childEl.Type == "Object" && childEl.ElementPackage() == bpP)
                            {
                                string classifierName = classifierEl.Name;
                                MatchDomainAbstractionLevelP match = new MatchDomainAbstractionLevelP()
                                {
                                    abstractionLevelP = abstractionLevelP,
                                    bpP            = bpP,
                                    bpPE           = bpPE,
                                    childEl        = childEl,
                                    id             = id,
                                    elName         = elName,
                                    reid           = reid,
                                    classifierEl   = classifierEl,
                                    classifierName = classifierName,
                                };
                                result.Add(match);
                            }
                        }
                    }
                }
            }

            return(result);
        }
        internal static ISet <MatchDomainProductP> CheckDomainProductP(LL.MDE.DataModels.EnAr.Package productP)
        {
            ISet <MatchDomainProductP> result = new HashSet <MatchDomainProductP>();
            string productName = productP.Name;

            LL.MDE.DataModels.EnAr.Element productPE = productP.Element;
            string productID = productPE.ElementGUID;

            if (productPE.ElementPackage() == productP)
            {
                MatchDomainProductP match = new MatchDomainProductP()
                {
                    productP    = productP,
                    productName = productName,
                    productPE   = productPE,
                    productID   = productID,
                };
                result.Add(match);
            }
            return(result);
        }