public override void ProcessElementStartNode(string name) { switch (name) { case specObjectNodeName: processingElement = ProcessingElement.SpecObject; identifiableElementUnderConstruction = new SpecObject(); break; case alternativeIdNodeName: if (processingElement == ProcessingElement.SpecObject) { processingElement = ProcessingElement.AlternativeId; } break; case valuesNodeName: if (processingElement == ProcessingElement.SpecObject) { processingElement = ProcessingElement.Values; } break; case typeNodeName: if (processingElement == ProcessingElement.SpecObject) { processingElement = ProcessingElement.Type; } break; case specObjectTypeRefNodeName: if (processingElement == ProcessingElement.Type) { processingElement = ProcessingElement.SpecObjectTypeRef; } break; default: throw new ParserFailureException(unexpectedElementNodeErrorText + name + "'."); } }
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(); } } } }
void AddTaggedValuesToRequirement(SpecObject specObject, Element requirement) { AddTaggedValueToElement(requirement, "identifier", "String", specObject.Identifier); }
public override void ProcessElementStartNode(string name) { switch (name) { case specObjectNodeName: processingElement = ProcessingElement.SpecObject; identifiableElementUnderConstruction = new SpecObject(); break; case alternativeIdNodeName: if (processingElement == ProcessingElement.SpecObject) processingElement = ProcessingElement.AlternativeId; break; case valuesNodeName: if (processingElement == ProcessingElement.SpecObject) processingElement = ProcessingElement.Values; break; case typeNodeName: if (processingElement == ProcessingElement.SpecObject) processingElement = ProcessingElement.Type; break; case specObjectTypeRefNodeName: if (processingElement == ProcessingElement.Type) processingElement = ProcessingElement.SpecObjectTypeRef; break; default: throw new ParserFailureException(unexpectedElementNodeErrorText + name + "'."); } }