internal static UmlPackageSpec Convert(BieLibrarySpec bieLibrarySpec) { var umlPackageSpec = new UmlPackageSpec { Stereotype = "BIELibrary", Name = bieLibrarySpec.Name, TaggedValues = new[] { new UmlTaggedValueSpec("businessTerm", bieLibrarySpec.BusinessTerms), new UmlTaggedValueSpec("copyright", bieLibrarySpec.Copyrights), new UmlTaggedValueSpec("owner", bieLibrarySpec.Owners), new UmlTaggedValueSpec("reference", bieLibrarySpec.References), new UmlTaggedValueSpec("status", bieLibrarySpec.Status), new UmlTaggedValueSpec("uniqueIdentifier", bieLibrarySpec.UniqueIdentifier) { DefaultValue = GenerateUniqueIdentifierDefaultValue(bieLibrarySpec) }, new UmlTaggedValueSpec("versionIdentifier", bieLibrarySpec.VersionIdentifier), new UmlTaggedValueSpec("baseURN", bieLibrarySpec.BaseURN), new UmlTaggedValueSpec("namespacePrefix", bieLibrarySpec.NamespacePrefix), }, DiagramType = UmlDiagramType.Class, }; return(umlPackageSpec); }
public IBieLibrary UpdateBieLibrary(IBieLibrary bieLibrary, BieLibrarySpec specification) { throw new NotImplementedException(); }
public IBieLibrary CreateBieLibrary(BieLibrarySpec specification) { throw new NotImplementedException(); }
private static string GenerateUniqueIdentifierDefaultValue(BieLibrarySpec bieLibrarySpec) { return(Guid.NewGuid().ToString()); }
/// <summary> /// Updates a BIELibrary to match the given <paramref name="specification"/>. /// <param name="bieLibrary">A BIELibrary.</param> /// <param name="specification">A new specification for the given BIELibrary.</param> /// <returns>The updated BIELibrary. Depending on the implementation, this might be the same updated instance or a new instance!</returns> /// </summary> public IBieLibrary UpdateBieLibrary(IBieLibrary bieLibrary, BieLibrarySpec specification) { return(new UpccBieLibrary(UmlPackage.UpdatePackage(((UpccBieLibrary)bieLibrary).UmlPackage, BieLibrarySpecConverter.Convert(specification)))); }
/// <summary> /// Creates a BIELibrary based on the given <paramref name="specification"/>. /// <param name="specification">A specification for a BIELibrary.</param> /// <returns>The newly created BIELibrary.</returns> /// </summary> public IBieLibrary CreateBieLibrary(BieLibrarySpec specification) { return(new UpccBieLibrary(UmlPackage.CreatePackage(BieLibrarySpecConverter.Convert(specification)))); }