internal static UmlPackageSpec Convert(BdtLibrarySpec bdtLibrarySpec)
        {
            var umlPackageSpec = new UmlPackageSpec
            {
                Stereotype   = "BDTLibrary",
                Name         = bdtLibrarySpec.Name,
                TaggedValues = new[]
                {
                    new UmlTaggedValueSpec("businessTerm", bdtLibrarySpec.BusinessTerms),
                    new UmlTaggedValueSpec("copyright", bdtLibrarySpec.Copyrights),
                    new UmlTaggedValueSpec("owner", bdtLibrarySpec.Owners),
                    new UmlTaggedValueSpec("reference", bdtLibrarySpec.References),
                    new UmlTaggedValueSpec("status", bdtLibrarySpec.Status),
                    new UmlTaggedValueSpec("uniqueIdentifier", bdtLibrarySpec.UniqueIdentifier)
                    {
                        DefaultValue = GenerateUniqueIdentifierDefaultValue(bdtLibrarySpec)
                    },
                    new UmlTaggedValueSpec("versionIdentifier", bdtLibrarySpec.VersionIdentifier),
                    new UmlTaggedValueSpec("baseURN", bdtLibrarySpec.BaseURN),
                    new UmlTaggedValueSpec("namespacePrefix", bdtLibrarySpec.NamespacePrefix),
                },
                DiagramType = UmlDiagramType.Class,
            };

            return(umlPackageSpec);
        }
Ejemplo n.º 2
0
 public IBdtLibrary UpdateBdtLibrary(IBdtLibrary bdtLibrary, BdtLibrarySpec specification)
 {
     throw new NotImplementedException();
 }
Ejemplo n.º 3
0
 public IBdtLibrary CreateBdtLibrary(BdtLibrarySpec specification)
 {
     throw new NotImplementedException();
 }
 private static string GenerateUniqueIdentifierDefaultValue(BdtLibrarySpec bdtLibrarySpec)
 {
     return(Guid.NewGuid().ToString());
 }
 /// <summary>
 /// Updates a BDTLibrary to match the given <paramref name="specification"/>.
 /// <param name="bdtLibrary">A BDTLibrary.</param>
 /// <param name="specification">A new specification for the given BDTLibrary.</param>
 /// <returns>The updated BDTLibrary. Depending on the implementation, this might be the same updated instance or a new instance!</returns>
 /// </summary>
 public IBdtLibrary UpdateBdtLibrary(IBdtLibrary bdtLibrary, BdtLibrarySpec specification)
 {
     return(new UpccBdtLibrary(UmlPackage.UpdatePackage(((UpccBdtLibrary)bdtLibrary).UmlPackage, BdtLibrarySpecConverter.Convert(specification))));
 }
 /// <summary>
 /// Creates a BDTLibrary based on the given <paramref name="specification"/>.
 /// <param name="specification">A specification for a BDTLibrary.</param>
 /// <returns>The newly created BDTLibrary.</returns>
 /// </summary>
 public IBdtLibrary CreateBdtLibrary(BdtLibrarySpec specification)
 {
     return(new UpccBdtLibrary(UmlPackage.CreatePackage(BdtLibrarySpecConverter.Convert(specification))));
 }