public override void deserializeFromMocaTree(Serialization.MocaTree.MocaNode actNode) { MocaNode operationsNode = actNode.getChildNodeWithName(EClass.OperationsChildNodeName); MocaNode attributesNode = actNode.getChildNodeWithName(EClass.AttributesChildNodeName); MocaAttribute guidAttr = actNode.getAttributeOrCreate(Main.GuidStringName); MocaAttribute nameAttr = actNode.getAttributeOrCreate("name"); MocaAttribute aliasAttr = actNode.getAttributeOrCreate("alias"); MocaAttribute isAbstractAttr = actNode.getAttributeOrCreate("isAbstract"); MocaAttribute isInterfaceAttr = actNode.getAttributeOrCreate("isInterface"); if (nameAttr != null) { this.Name = nameAttr.Value; } if (guidAttr != null) { this.Guid = guidAttr.Value; } if (aliasAttr != null) { this.Alias = aliasAttr.Value; } if (isAbstractAttr.Value != "") { if (bool.TryParse(isAbstractAttr.Value, out this.isAbstract)) { } else { int value = 0; if (int.TryParse(isAbstractAttr.Value, out value)) { this.isAbstract = value == 1; } } } if (isInterfaceAttr.Value != "") { this.isInterface = Boolean.Parse(isInterfaceAttr.Value); } foreach (MocaNode eOpNode in operationsNode.Children) { SQLMethod method = findMethodFromMocaNode(this.EaElement, eOpNode); if (method != null) { EOperation actEOperation = new EOperation(method, Repository); actEOperation.deserializeFromMocaTree(eOpNode); this.EOperations.Add(actEOperation); } } foreach (MocaNode eAttrNode in attributesNode.Children) { foreach (SQLAttribute attr in this.EaElement.Attributes) { if (attr.Name == eAttrNode.getAttributeOrCreate("name").Value) { EAttribute eAttr = new EAttribute(attr, Repository); eAttr.deserializeFromMocaTree(eAttrNode); this.EAttributes.Add(eAttr); } } } isInitialized = true; }