void AddTaggedValuesToSpecificationPackage(Specification specification, Package specificationPackage)
 {
     AddTaggedValueToElement(specificationPackage.Element, "identifier", "String", specification.Identifier);
 }
        public override void ProcessElementStartNode(string name)
        {
            switch (name)
            {
                case specificationNodeName:
                    processingElement = ProcessingElement.Specification;
                    identifiableElementUnderConstruction = new Specification();
                    break;

                case alternativeIdNodeName:
                    if (processingElement == ProcessingElement.Specification)
                        processingElement = ProcessingElement.AlternativeId;
                    break;

                case valuesNodeName:
                    if (processingElement == ProcessingElement.Specification)
                        processingElement = ProcessingElement.Values;
                    break;

                case typeNodeName:
                    if (processingElement == ProcessingElement.Specification)
                        processingElement = ProcessingElement.Type;
                    break;

                case specificationTypeRefNodeName:
                    if (processingElement == ProcessingElement.Type)
                        processingElement = ProcessingElement.SpecificationTypeRef;
                    break;

                case childrenNodeName:
                    {
                        if (HasSubImporter())
                        {
                            SpecHierarchyImporter specHierarchySubImporter = (SpecHierarchyImporter)subImporter;
                            if (! specHierarchySubImporter.IsImportCompleted())
                                PassElementStartNodeToSubImporter(name);
                        } else {
                            if (processingElement == ProcessingElement.Specification)
                            {
                                processingElement = ProcessingElement.Children;
                                CreateSubImporterForChildElements();
                            }
                        }
                    }
                    break;

                default:
                    if (HasSubImporter())
                    {
                        PassElementStartNodeToSubImporter(name);
                        break;
                    } else {
                        throw new ParserFailureException(unexpectedElementNodeErrorText + name + "'.");
                    }
            }
        }
        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;
        }
 void AddTaggedValuesToSpecificationPackage(Specification specification, Package specificationPackage)
 {
     AddTaggedValueToElement(specificationPackage.Element, "identifier", "String", specification.Identifier);
 }