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

            return(umlPackageSpec);
        }
Esempio n. 2
0
 private static string GenerateUniqueIdentifierDefaultValue(DocLibrarySpec docLibrarySpec)
 {
     return(Guid.NewGuid().ToString());
 }
Esempio n. 3
0
 public IDocLibrary UpdateDocLibrary(IDocLibrary docLibrary, DocLibrarySpec specification)
 {
     throw new NotImplementedException();
 }
Esempio n. 4
0
 public IDocLibrary CreateDocLibrary(DocLibrarySpec specification)
 {
     throw new NotImplementedException();
 }
 /// <summary>
 /// Updates a DOCLibrary to match the given <paramref name="specification"/>.
 /// <param name="docLibrary">A DOCLibrary.</param>
 /// <param name="specification">A new specification for the given DOCLibrary.</param>
 /// <returns>The updated DOCLibrary. Depending on the implementation, this might be the same updated instance or a new instance!</returns>
 /// </summary>
 public IDocLibrary UpdateDocLibrary(IDocLibrary docLibrary, DocLibrarySpec specification)
 {
     return(new UpccDocLibrary(UmlPackage.UpdatePackage(((UpccDocLibrary)docLibrary).UmlPackage, DocLibrarySpecConverter.Convert(specification))));
 }
 /// <summary>
 /// Creates a DOCLibrary based on the given <paramref name="specification"/>.
 /// <param name="specification">A specification for a DOCLibrary.</param>
 /// <returns>The newly created DOCLibrary.</returns>
 /// </summary>
 public IDocLibrary CreateDocLibrary(DocLibrarySpec specification)
 {
     return(new UpccDocLibrary(UmlPackage.CreatePackage(DocLibrarySpecConverter.Convert(specification))));
 }