private EMOF.IProperty ConstructProperty(EnAr.Attribute attribute) { EMOF.IProperty property = new EMOF.Property() { Name = attribute.Name, Type = ConstructTypeOfTyped(attribute), Default = attribute.Default, IsComposite = TranslateContainment(attribute.Containment), IsDerived = attribute.IsDerived, Lower = TranslateLowerBound(attribute.LowerBound), Upper = TranslateUpperBound(attribute.UpperBound), IsOrdered = attribute.IsOrdered, IsReadOnly = attribute.IsConst, IsUnique = !attribute.AllowDuplicates, }; return(property); }
private EMOF.IProperty ConstructProperty(EMOF.IClass source, EMOF.IClass target, EnAr.ConnectorEnd sourceC, EnAr.ConnectorEnd targetC) { if (!string.IsNullOrWhiteSpace(targetC.Role)) { EMOF.IProperty property = new EMOF.Property() { Name = targetC.Role, Type = target, IsComposite = sourceC.Aggregation > 0, Class = source, IsDerived = targetC.Derived, IsUnique = !targetC.AllowDuplicates, Lower = TranslateMultiplicityLower(targetC.Cardinality), Upper = TranslateMultiplicityUpper(targetC.Cardinality), }; source.OwnedAttribute.Add(property); return(property); } return(null); }