public static AsmaSpec CloneAsma(IAsma asma) { return(new AsmaSpec { Name = asma.Name, UpperBound = asma.UpperBound, LowerBound = asma.LowerBound, AssociatedBieAggregator = asma.AssociatedBieAggregator, }); }
private void Compile(IDocLibrary docLibrary) { IMa documentRoot = docLibrary.DocumentRoot; IAsma asma = documentRoot.Asmas.FirstOrDefault(); BieAggregator bieAggregator = asma.AssociatedBieAggregator; if (bieAggregator.IsMa) { CompileXsdTypesFromMa(bieAggregator.Ma); } else if (bieAggregator.IsAbie) { CompileXsdTypesFromAbie(bieAggregator.Abie); } else { throw new Exception("The ASMA " + asma.Name + " of the Document Root Element " + documentRoot.Name + " neither aggregates a MA nor an ABIE."); } }
public static string GetXsdElementNameFromAsma(IAsma asma) { return(asma.Name + TrimElementName(asma.AssociatedBieAggregator.Name)); }
/// <summary> /// Removes a(n) ASMA from this MA. /// <param name="asma">A(n) ASMA.</param> /// </summary> public void RemoveAsma(IAsma asma) { UmlClass.RemoveAssociation(((UpccAsma)asma).UmlAssociation); }
/// <summary> /// Updates a(n) ASMA to match the given <paramref name="specification"/>. /// <param name="asma">A(n) ASMA.</param> /// <param name="specification">A new specification for the given ASMA.</param> /// <returns>The updated ASMA. Depending on the implementation, this might be the same updated instance or a new instance!</returns> /// </summary> public IAsma UpdateAsma(IAsma asma, AsmaSpec specification) { return(new UpccAsma(UmlClass.UpdateAssociation(((UpccAsma)asma).UmlAssociation, AsmaSpecConverter.Convert(specification, Name)), this)); }