예제 #1
0
        private static XmlSchemaAnnotation GetAttributeAnnotation(IBdtSup sup)
        {
            var xml = new XmlDocument();
            // Deviation from rule [R 9C95]: Generating only a subset of the defined annotations and added some additional annotations.
            var annNodes = new List <XmlNode>();

            SchemaGeneratorUtils.AddAnnotation(xml, annNodes, "PropertyTermName", sup.Name);
            SchemaGeneratorUtils.AddAnnotation(xml, annNodes, "RepresentationTermName", sup.BasicType.Name);
            SchemaGeneratorUtils.AddAnnotation(xml, annNodes, "PrimitiveTypeName", sup.BasicType.Name);
            SchemaGeneratorUtils.AddAnnotation(xml, annNodes, "DataTypeName", sup.Bdt.Name);
            SchemaGeneratorUtils.AddAnnotation(xml, annNodes, "UniqueID", sup.UniqueIdentifier);
            SchemaGeneratorUtils.AddAnnotation(xml, annNodes, "VersionID", sup.VersionIdentifier);
            SchemaGeneratorUtils.AddAnnotation(xml, annNodes, "DictionaryEntryName", sup.DictionaryEntryName);
            SchemaGeneratorUtils.AddAnnotation(xml, annNodes, "Definition", sup.Definition);
            SchemaGeneratorUtils.AddAnnotations(xml, annNodes, "BusinessTermName", sup.BusinessTerms);
            SchemaGeneratorUtils.AddAnnotation(xml, annNodes, "ModificationAllowedIndicator",
                                               sup.ModificationAllowedIndicator.ToString().ToLower());
            SchemaGeneratorUtils.AddAnnotation(xml, annNodes, "LanguageCode", sup.LanguageCode);
            SchemaGeneratorUtils.AddAnnotation(xml, annNodes, "AcronymCode", "SUP");
            var ann = new XmlSchemaAnnotation();

            ann.Items.Add(new XmlSchemaDocumentation {
                Language = "en", Markup = annNodes.ToArray()
            });
            return(ann);
        }
예제 #2
0
        private static XmlSchemaAnnotation GetTypeAnnotation(IBdt bdt)
        {
            var xml = new XmlDocument();
            // Deviation from rule [R BFE5]: Generating only a subset of the defined annotations and added some additional annotations.
            var annNodes = new List <XmlNode>();

            SchemaGeneratorUtils.AddAnnotation(xml, annNodes, "UniqueID", bdt.UniqueIdentifier);
            SchemaGeneratorUtils.AddAnnotation(xml, annNodes, "VersionID", bdt.VersionIdentifier);
            SchemaGeneratorUtils.AddAnnotation(xml, annNodes, "DictionaryEntryName", bdt.DictionaryEntryName);
            SchemaGeneratorUtils.AddAnnotation(xml, annNodes, "Definition", bdt.Definition);
            SchemaGeneratorUtils.AddAnnotations(xml, annNodes, "BusinessTermName", bdt.BusinessTerms);
            SchemaGeneratorUtils.AddAnnotation(xml, annNodes, "PropertyTermName", bdt.Name);
            SchemaGeneratorUtils.AddAnnotation(xml, annNodes, "LanguageCode", bdt.LanguageCode);
            SchemaGeneratorUtils.AddAnnotation(xml, annNodes, "AcronymCode", "BDT");
            var ann = new XmlSchemaAnnotation();

            ann.Items.Add(new XmlSchemaDocumentation {
                Language = "en", Markup = annNodes.ToArray()
            });
            return(ann);
        }