internal Enumerations(TaggedValues taggedValues) { Enum = new MetaEnumeration { Name = "Enum", Stereotype = MetaStereotype.ENUM, TaggedValues = new[] { taggedValues.BusinessTerm, taggedValues.CodeListAgencyIdentifier, taggedValues.CodeListAgencyName, taggedValues.CodeListIdentifier, taggedValues.CodeListName, taggedValues.DictionaryEntryName, taggedValues.Definition, taggedValues.EnumerationUri, taggedValues.LanguageCode, taggedValues.ModificationAllowedIndicator, taggedValues.RestrictedPrimitive, taggedValues.Status, taggedValues.UniqueIdentifier, taggedValues.VersionIdentifier, } }; }
internal Associations(TaggedValues taggedValues, Classes classes, MultiTypes multiTypes) { Ascc = new MetaAssociation { Stereotype = MetaStereotype.ASCC, ClassName = "Ascc", Name = "Asccs", Cardinality = MetaCardinality.Many, AggregationKind = MetaAggregationKind.Shared, AssociatingClassifierType = classes.Acc, AssociatedClassifierType = classes.Acc, TaggedValues = new[] { taggedValues.BusinessTerm, taggedValues.Definition, taggedValues.DictionaryEntryName, taggedValues.LanguageCode, taggedValues.SequencingKey, taggedValues.UniqueIdentifier, taggedValues.VersionIdentifier, taggedValues.UsageRule, }, }; Asbie = new MetaAssociation { Stereotype = MetaStereotype.ASBIE, ClassName = "Asbie", Name = "Asbies", Cardinality = MetaCardinality.Many, AggregationKind = MetaAggregationKind.SharedOrComposite, AssociatingClassifierType = classes.Abie, AssociatedClassifierType = classes.Abie, TaggedValues = new[] { taggedValues.BusinessTerm, taggedValues.Definition, taggedValues.DictionaryEntryName, taggedValues.LanguageCode, taggedValues.SequencingKey, taggedValues.UniqueIdentifier, taggedValues.VersionIdentifier, taggedValues.UsageRule, }, }; Asma = new MetaAssociation { Stereotype = MetaStereotype.ASMA, ClassName = "Asma", Name = "Asmas", Cardinality = MetaCardinality.Many, AggregationKind = MetaAggregationKind.Shared, AssociatingClassifierType = classes.Ma, AssociatedClassifierType = multiTypes.BieAggregator, TaggedValues = new MetaTaggedValue[0], }; }
internal EnumerationLiterals(TaggedValues taggedValues, Enumerations enumerations) { CodelistEntry = new MetaEnumerationLiteral { Stereotype = MetaStereotype.CodelistEntry, ClassName = "CodelistEntry", Name = "CodelistEntries", Cardinality = MetaCardinality.Many, ContainingEnumerationType = enumerations.Enum, TaggedValues = new[] { taggedValues.CodeName, taggedValues.Status, } }; }
internal DataTypes(TaggedValues taggedValues) { Prim = new MetaDataType { Name = "Prim", Stereotype = MetaStereotype.PRIM, TaggedValues = new[] { taggedValues.BusinessTerm, taggedValues.Definition, taggedValues.DictionaryEntryName.WithDefaultValue("Name"), taggedValues.FractionDigits, taggedValues.LanguageCode, taggedValues.Length, taggedValues.MaximumExclusive, taggedValues.MaximumInclusive, taggedValues.MaximumLength, taggedValues.MinimumExclusive, taggedValues.MinimumInclusive, taggedValues.MinimumLength, taggedValues.Pattern, taggedValues.TotalDigits, taggedValues.UniqueIdentifier, taggedValues.VersionIdentifier, taggedValues.WhiteSpace, }, }; IdScheme = new MetaDataType { Name = "IdScheme", Stereotype = MetaStereotype.IDSCHEME, TaggedValues = new[] { taggedValues.BusinessTerm, taggedValues.Definition, taggedValues.DictionaryEntryName.WithDefaultValue("Name"), taggedValues.IdentifierSchemeAgencyIdentifier, taggedValues.IdentifierSchemeAgencyName, taggedValues.ModificationAllowedIndicator, taggedValues.Pattern, taggedValues.RestrictedPrimitive, taggedValues.UniqueIdentifier, taggedValues.VersionIdentifier, }, }; }
private MetaModel() { taggedValues = new TaggedValues(); packages = new Packages(taggedValues); enumerations = new Enumerations(taggedValues); dataTypes = new DataTypes(taggedValues); classes = new Classes(taggedValues); multiTypes = new MultiTypes(classes, dataTypes, enumerations); attributes = new Attributes(taggedValues, classes, multiTypes); enumerationLiterals = new EnumerationLiterals(taggedValues, enumerations); associations = new Associations(taggedValues, classes, multiTypes); dependencies = new Dependencies(classes, dataTypes, enumerations); attributeDependencies = new AttributeDependencies(attributes); associationDependencies = new AssociationDependencies(associations); packageSubPackageRelations = new PackageSubPackageRelations(packages); packageClassifierRelations = new PackageClassifierRelations(packages, dataTypes, classes, enumerations); }
internal Attributes(TaggedValues taggedValues, Classes classes, MultiTypes multiTypes) { CdtCon = new MetaAttribute { Stereotype = MetaStereotype.CON, ContainingClassifierType = classes.Cdt, ClassName = "CdtCon", AttributeName = "Con", Type = multiTypes.BasicType, Cardinality = MetaCardinality.One, TaggedValues = new[] { taggedValues.BusinessTerm, taggedValues.Definition, taggedValues.DictionaryEntryName.WithDefaultValue("Cdt.Name + \". Content\""), taggedValues.LanguageCode, taggedValues.ModificationAllowedIndicator, taggedValues.UniqueIdentifier, taggedValues.VersionIdentifier, taggedValues.UsageRule, }, }; CdtSup = new MetaAttribute { Stereotype = MetaStereotype.SUP, ContainingClassifierType = classes.Cdt, ClassName = "CdtSup", AttributeName = "Sups", Type = multiTypes.BasicType, Cardinality = MetaCardinality.Many, TaggedValues = new[] { taggedValues.BusinessTerm, taggedValues.Definition, taggedValues.DictionaryEntryName.WithDefaultValue("Cdt.Name + \". \" + Name + \". \" + Type.Name"), taggedValues.LanguageCode, taggedValues.ModificationAllowedIndicator, taggedValues.UniqueIdentifier, taggedValues.VersionIdentifier, taggedValues.UsageRule, }, }; Bcc = new MetaAttribute { Stereotype = MetaStereotype.BCC, ContainingClassifierType = classes.Acc, ClassName = "Bcc", AttributeName = "Bccs", Type = classes.Cdt, Cardinality = MetaCardinality.Many, TaggedValues = new[] { taggedValues.BusinessTerm, taggedValues.Definition, taggedValues.DictionaryEntryName.WithDefaultValue("Acc.Name + \". \" + Name + \". \" + Type.Name"), taggedValues.LanguageCode, taggedValues.SequencingKey, taggedValues.UniqueIdentifier, taggedValues.VersionIdentifier, taggedValues.UsageRule, }, }; BdtCon = new MetaAttribute { Stereotype = MetaStereotype.CON, ContainingClassifierType = classes.Bdt, ClassName = "BdtCon", AttributeName = "Con", Type = multiTypes.BasicType, Cardinality = MetaCardinality.One, TaggedValues = new[] { taggedValues.BusinessTerm, taggedValues.Definition, taggedValues.DictionaryEntryName.WithDefaultValue("Bdt.Name + \". Content\""), taggedValues.Enumeration, taggedValues.FractionDigits, taggedValues.LanguageCode, taggedValues.MaximumExclusive, taggedValues.MaximumInclusive, taggedValues.MaximumLength, taggedValues.MinimumExclusive, taggedValues.MinimumInclusive, taggedValues.MinimumLength, taggedValues.ModificationAllowedIndicator, taggedValues.Pattern, taggedValues.TotalDigits, taggedValues.UniqueIdentifier, taggedValues.UsageRule, taggedValues.VersionIdentifier, }, }; BdtSup = new MetaAttribute { Stereotype = MetaStereotype.SUP, ContainingClassifierType = classes.Bdt, ClassName = "BdtSup", AttributeName = "Sups", Type = multiTypes.BasicType, Cardinality = MetaCardinality.Many, TaggedValues = new[] { taggedValues.BusinessTerm, taggedValues.Definition, taggedValues.DictionaryEntryName.WithDefaultValue("Bdt.Name + \". \" + Name + \". \" + Type.Name"), taggedValues.Enumeration, taggedValues.FractionDigits, taggedValues.LanguageCode, taggedValues.MaximumExclusive, taggedValues.MaximumInclusive, taggedValues.MaximumLength, taggedValues.MinimumExclusive, taggedValues.MinimumInclusive, taggedValues.MinimumLength, taggedValues.ModificationAllowedIndicator, taggedValues.Pattern, taggedValues.TotalDigits, taggedValues.UniqueIdentifier, taggedValues.UsageRule, taggedValues.VersionIdentifier, }, }; Bbie = new MetaAttribute { Stereotype = MetaStereotype.BBIE, ContainingClassifierType = classes.Abie, ClassName = "Bbie", AttributeName = "Bbies", Type = classes.Bdt, Cardinality = MetaCardinality.Many, TaggedValues = new[] { taggedValues.BusinessTerm, taggedValues.Definition, taggedValues.DictionaryEntryName.WithDefaultValue("Abie.Name + \". \" + Name + \". \" + Type.Name"), taggedValues.LanguageCode, taggedValues.SequencingKey, taggedValues.UniqueIdentifier, taggedValues.VersionIdentifier, taggedValues.UsageRule, }, }; }
internal Classes(TaggedValues taggedValues) { Cdt = new MetaClass { Name = "Cdt", Stereotype = MetaStereotype.CDT, TaggedValues = new[] { taggedValues.BusinessTerm, taggedValues.Definition, taggedValues.DictionaryEntryName.WithDefaultValue("Name + \". Type\""), taggedValues.LanguageCode, taggedValues.UniqueIdentifier, taggedValues.VersionIdentifier, taggedValues.UsageRule, }, }; Acc = new MetaClass { Name = "Acc", Stereotype = MetaStereotype.ACC, TaggedValues = new[] { taggedValues.BusinessTerm, taggedValues.Definition, taggedValues.DictionaryEntryName.WithDefaultValue("Name + \". Details\""), taggedValues.LanguageCode, taggedValues.UniqueIdentifier, taggedValues.VersionIdentifier, taggedValues.UsageRule, }, }; Bdt = new MetaClass { Name = "Bdt", Stereotype = MetaStereotype.BDT, TaggedValues = new[] { taggedValues.BusinessTerm, taggedValues.Definition, taggedValues.DictionaryEntryName.WithDefaultValue("Name + \". Type\""), taggedValues.LanguageCode, taggedValues.UniqueIdentifier, taggedValues.VersionIdentifier, taggedValues.UsageRule, }, }; Abie = new MetaClass { Name = "Abie", Stereotype = MetaStereotype.ABIE, TaggedValues = new[] { taggedValues.BusinessTerm, taggedValues.Definition, taggedValues.DictionaryEntryName.WithDefaultValue("Name + \". Details\""), taggedValues.LanguageCode, taggedValues.UniqueIdentifier, taggedValues.VersionIdentifier, taggedValues.UsageRule, }, }; Ma = new MetaClass { Name = "Ma", Stereotype = MetaStereotype.MA, TaggedValues = new MetaTaggedValue[0], }; }
internal Packages(TaggedValues taggedValues) { var bLibraryTaggedValues = new[] { taggedValues.BusinessTerm, taggedValues.Copyright, taggedValues.Owner, taggedValues.Reference, taggedValues.Status, taggedValues.UniqueIdentifier, taggedValues.VersionIdentifier, }; MetaTaggedValue[] elementLibraryTaggedValues = new List <MetaTaggedValue>(bLibraryTaggedValues) { taggedValues.BaseUrn, taggedValues.NamespacePrefix, }.ToArray(); PrimLibrary = new MetaPackage { Name = "PrimLibrary", Stereotype = MetaStereotype.PRIMLibrary, TaggedValues = elementLibraryTaggedValues, }; EnumLibrary = new MetaPackage { Name = "EnumLibrary", Stereotype = MetaStereotype.ENUMLibrary, TaggedValues = elementLibraryTaggedValues, }; CdtLibrary = new MetaPackage { Name = "CdtLibrary", Stereotype = MetaStereotype.CDTLibrary, TaggedValues = elementLibraryTaggedValues, }; CcLibrary = new MetaPackage { Name = "CcLibrary", Stereotype = MetaStereotype.CCLibrary, TaggedValues = elementLibraryTaggedValues, }; BdtLibrary = new MetaPackage { Name = "BdtLibrary", Stereotype = MetaStereotype.BDTLibrary, TaggedValues = elementLibraryTaggedValues, }; BieLibrary = new MetaPackage { Name = "BieLibrary", Stereotype = MetaStereotype.BIELibrary, TaggedValues = elementLibraryTaggedValues, }; DocLibrary = new MetaPackage { Name = "DocLibrary", Stereotype = MetaStereotype.DOCLibrary, TaggedValues = elementLibraryTaggedValues, }; BLibrary = new MetaPackage { Name = "BLibrary", Stereotype = MetaStereotype.bLibrary, TaggedValues = bLibraryTaggedValues, }; }