// ------------------------ serialize attributes private void SerializeAttributesIn_Uml2SemanticModelBridge(Uml2Bridge.Uml2SemanticModelBridge current) { base.WritePropertyValue(_diagram, base.GetIdAndEnqueue(current.Diagram)); base.WritePropertyValue(_element, base.GetIdAndEnqueue(current.Element)); base.WritePropertyValue(_graphElement, base.GetIdAndEnqueue(current.GraphElement)); base.WritePropertyValue(_presentation, current.Presentation); }
// SetNNN_CCCAttribute methods are for simple attributes and references // (NNN = Namespace, CCC = Diagram) private bool Set_Uml2SemanticModelBridgeAttribute(Uml2Bridge.Uml2SemanticModelBridge current, string prop) { if(object.ReferenceEquals(prop, _diagram)) { current.Diagram = (DI.Diagram)base.IdMapper.GetObject(base.StringValue);; return true; } else if(object.ReferenceEquals(prop, _element)) { current.Element = (Uml2.Element)base.IdMapper.GetObject(base.StringValue);; return true; } else if(object.ReferenceEquals(prop, _graphElement)) { current.GraphElement = (DI.GraphElement)base.IdMapper.GetObject(base.StringValue);; return true; } else if(object.ReferenceEquals(prop, _presentation)) { current.Presentation = base.StringValue; return true; } return false; }
private void Complete_Uml2SemanticModelBridge(Uml2Bridge.Uml2SemanticModelBridge current) { string attrNs; string prop; // attributes while(base.XmlReader.MoveToNextAttribute()) { attrNs = base.XmlReader.NamespaceURI; prop = base.XmlReader.LocalName; if(object.ReferenceEquals(attrNs, String.Empty) || object.ReferenceEquals(attrNs, _uml2bridgeNs)) { Set_Uml2SemanticModelBridgeAttribute(current, prop); } } // properties as elements and composite elements if(base.MoveToFirstChild()) { do { attrNs = base.XmlReader.NamespaceURI; prop = base.XmlReader.NameTable.Get(base.XmlReader.LocalName); if(object.ReferenceEquals(attrNs, String.Empty) || object.ReferenceEquals(attrNs, _uml2bridgeNs)) { Set_Uml2SemanticModelBridgeAttribute(current, prop); } } while(base.MoveToNextSibling()); } }