private void CreateSpecificationPackages(Package rootPackage)
        {
            EnterpriseArchitectModelElementFactory factory = new EnterpriseArchitectModelElementFactory();

            foreach (DictionaryEntry specificationEntry in specifications)
            {
                Specification specification        = (Specification)specificationEntry.Value;
                Package       specificationPackage = CreateSpecificationPackage(specification, rootPackage, factory);
                CreateRequirements(specificationPackage, specification.SpecHierarchies, factory);
                AddTaggedValuesToSpecificationPackage(specification, specificationPackage);
            }
        }
        private void createPackage(Package rootPackage)
        {
            EnterpriseArchitectModelElementFactory factory =
                new EnterpriseArchitectModelElementFactory();

            requirementsPackage = factory.createPackage(rootPackage, "Requirements");
            requirementsPackage.Element.Author = "<imported>";
            requirementsPackage.StereotypeEx   = "ExchangeDocument";
            if (!requirementsPackage.Update())
            {
                throw new ParserFailureException(requirementsPackage.GetLastError());
            }
        }
 private void CreateRequirements(Package specificationPackage,
                                 SortedList specHierarchies,
                                 EnterpriseArchitectModelElementFactory factory)
 {
     if (specHierarchies.Count > 0)
     {
         foreach (DictionaryEntry specHierarchyEntry in specHierarchies)
         {
             SpecHierarchy specHierarchy = (SpecHierarchy)specHierarchyEntry.Value;
             SpecObject    specObject    = (SpecObject)specificationObjects[specHierarchy.SpecObjectReference];
             if ((object)specObject != null)
             {
                 Element requirement = factory.CreateRequirement(specificationPackage, specObject.LongName);
                 AddTaggedValuesToRequirement(specObject, requirement);
             }
             else
             {
                 throw new ParserFailureException();
             }
         }
     }
 }
        private Package CreateSpecificationPackage(Specification specification,
                                                   Package rootPackage,
                                                   EnterpriseArchitectModelElementFactory factory)
        {
            if ((object)specification == null)
            {
                throw new ArgumentNullException("specification");
            }

            Package specificationPackage = factory.createPackage(rootPackage, specification.LongName);

            specificationPackage.Notes          = specification.Description;
            specificationPackage.Element.Author = "<imported>";
            specificationPackage.StereotypeEx   = "Specification";

            if (!specificationPackage.Update())
            {
                throw new ParserFailureException(specificationPackage.GetLastError());
            }

            return(specificationPackage);
        }
 private void createPackage(Package rootPackage)
 {
     EnterpriseArchitectModelElementFactory factory =
         new EnterpriseArchitectModelElementFactory();
     requirementsPackage = factory.createPackage(rootPackage, "Requirements");
     requirementsPackage.Element.Author = "<imported>";
     requirementsPackage.StereotypeEx = "ExchangeDocument";
     if (! requirementsPackage.Update())
     {
         throw new ParserFailureException(requirementsPackage.GetLastError());
     }
 }
        private void CreateRequirements(Package specificationPackage,
		                                SortedList specHierarchies,
		                                EnterpriseArchitectModelElementFactory factory)
        {
            if (specHierarchies.Count > 0)
            {
                foreach(DictionaryEntry specHierarchyEntry in specHierarchies)
                {
                    SpecHierarchy specHierarchy = (SpecHierarchy)specHierarchyEntry.Value;
                    SpecObject specObject = (SpecObject)specificationObjects[specHierarchy.SpecObjectReference];
                    if ((object)specObject != null)
                    {
                        Element requirement = factory.CreateRequirement(specificationPackage, specObject.LongName);
                        AddTaggedValuesToRequirement(specObject, requirement);
                    } else {
                        throw new ParserFailureException();
                    }
                }
            }
        }
        private void CreateSpecificationPackages(Package rootPackage)
        {
            EnterpriseArchitectModelElementFactory factory = new EnterpriseArchitectModelElementFactory();

            foreach (DictionaryEntry specificationEntry in specifications)
            {
                Specification specification = (Specification)specificationEntry.Value;
                Package specificationPackage = CreateSpecificationPackage(specification, rootPackage, factory);
                CreateRequirements(specificationPackage, specification.SpecHierarchies, factory);
                AddTaggedValuesToSpecificationPackage(specification, specificationPackage);
            }
        }
        private Package CreateSpecificationPackage(Specification specification,
		                                           Package rootPackage,
		                                           EnterpriseArchitectModelElementFactory factory)
        {
            if ((object)specification == null)
                throw new ArgumentNullException("specification");

            Package specificationPackage = factory.createPackage(rootPackage, specification.LongName);
            specificationPackage.Notes = specification.Description;
            specificationPackage.Element.Author = "<imported>";
            specificationPackage.StereotypeEx = "Specification";

            if (! specificationPackage.Update())
                throw new ParserFailureException(specificationPackage.GetLastError());

            return specificationPackage;
        }