internal static UmlEnumerationLiteralSpec Convert(CodelistEntrySpec codelistEntrySpec) { var umlEnumerationLiteralSpec = new UmlEnumerationLiteralSpec { Stereotype = "CodelistEntry", Name = codelistEntrySpec.Name, TaggedValues = new[] { new UmlTaggedValueSpec("codeName", codelistEntrySpec.CodeName), new UmlTaggedValueSpec("status", codelistEntrySpec.Status), }, }; return(umlEnumerationLiteralSpec); }
/// <summary> /// Updates a(n) CodelistEntry to match the given <paramref name="specification"/>. /// <param name="codelistEntry">A(n) CodelistEntry.</param> /// <param name="specification">A new specification for the given CodelistEntry.</param> /// <returns>The updated CodelistEntry. Depending on the implementation, this might be the same updated instance or a new instance!</returns> /// </summary> public ICodelistEntry UpdateCodelistEntry(ICodelistEntry codelistEntry, CodelistEntrySpec specification) { return(new UpccCodelistEntry(UmlEnumeration.UpdateEnumerationLiteral(((UpccCodelistEntry)codelistEntry).UmlEnumerationLiteral, CodelistEntrySpecConverter.Convert(specification)), this)); }
/// <summary> /// Creates a(n) CodelistEntry based on the given <paramref name="specification"/>. /// <param name="specification">A specification for a(n) CodelistEntry.</param> /// <returns>The newly created CodelistEntry.</returns> /// </summary> public ICodelistEntry CreateCodelistEntry(CodelistEntrySpec specification) { return(new UpccCodelistEntry(UmlEnumeration.CreateEnumerationLiteral(CodelistEntrySpecConverter.Convert(specification)), this)); }