internal static UmlPackageSpec Convert(BLibrarySpec bLibrarySpec)
        {
            var umlPackageSpec = new UmlPackageSpec
            {
                Stereotype   = "bLibrary",
                Name         = bLibrarySpec.Name,
                TaggedValues = new[]
                {
                    new UmlTaggedValueSpec("businessTerm", bLibrarySpec.BusinessTerms),
                    new UmlTaggedValueSpec("copyright", bLibrarySpec.Copyrights),
                    new UmlTaggedValueSpec("owner", bLibrarySpec.Owners),
                    new UmlTaggedValueSpec("reference", bLibrarySpec.References),
                    new UmlTaggedValueSpec("status", bLibrarySpec.Status),
                    new UmlTaggedValueSpec("uniqueIdentifier", bLibrarySpec.UniqueIdentifier)
                    {
                        DefaultValue = GenerateUniqueIdentifierDefaultValue(bLibrarySpec)
                    },
                    new UmlTaggedValueSpec("versionIdentifier", bLibrarySpec.VersionIdentifier),
                },
                DiagramType = UmlDiagramType.Package,
            };

            return(umlPackageSpec);
        }
Esempio n. 2
0
 public IBLibrary CreateRootBLibrary(Path rootLocation, BLibrarySpec spec)
 {
     throw new NotImplementedException();
 }
Esempio n. 3
0
 public IBLibrary UpdateBLibrary(IBLibrary bLibrary, BLibrarySpec specification)
 {
     throw new NotImplementedException();
 }
Esempio n. 4
0
 public IBLibrary CreateBLibrary(BLibrarySpec spec)
 {
     throw new NotImplementedException();
 }
Esempio n. 5
0
        /// <summary>
        /// Creates a bLibrary in the given <paramref name="rootLocation"/>.
        /// </summary>
        /// <param name="rootLocation">A root location (<see cref="GetRootLocations"/>).</param>
        /// <param name="specification">A specification for a bLibrary.</param>
        /// <returns>The newly created bLibrary.</returns>
        /// <returns></returns>
        public IBLibrary CreateRootBLibrary(Path rootLocation, BLibrarySpec specification)
        {
            var umlPackage = UmlRepository.CreateRootPackage(rootLocation, BLibrarySpecConverter.Convert(specification));

            return(umlPackage == null ? null : new UpccBLibrary(umlPackage));
        }
Esempio n. 6
0
 private static string GenerateUniqueIdentifierDefaultValue(BLibrarySpec bLibrarySpec)
 {
     return(Guid.NewGuid().ToString());
 }
 /// <summary>
 /// Updates a bLibrary to match the given <paramref name="specification"/>.
 /// <param name="bLibrary">A bLibrary.</param>
 /// <param name="specification">A new specification for the given bLibrary.</param>
 /// <returns>The updated bLibrary. Depending on the implementation, this might be the same updated instance or a new instance!</returns>
 /// </summary>
 public IBLibrary UpdateBLibrary(IBLibrary bLibrary, BLibrarySpec specification)
 {
     return(new UpccBLibrary(UmlPackage.UpdatePackage(((UpccBLibrary)bLibrary).UmlPackage, BLibrarySpecConverter.Convert(specification))));
 }
 /// <summary>
 /// Creates a bLibrary based on the given <paramref name="specification"/>.
 /// <param name="specification">A specification for a bLibrary.</param>
 /// <returns>The newly created bLibrary.</returns>
 /// </summary>
 public IBLibrary CreateBLibrary(BLibrarySpec specification)
 {
     return(new UpccBLibrary(UmlPackage.CreatePackage(BLibrarySpecConverter.Convert(specification))));
 }