Beispiel #1
0
        public static void AddTable(IObjectRepository tdb, WordprocessingDocument document, List <Template> allTemplates, TableCollection tables)
        {
            TemplateContainmentGenerator tcg = new TemplateContainmentGenerator(tdb, document, allTemplates, tables);

            tcg.GenerateTable();
        }
Beispiel #2
0
        public void BuildImplementationGuide(ExportSettings aModel)
        {
            this._exportSettings = aModel;

            this._docStream = new MemoryStream();
            this._document  = WordprocessingDocument.Create(this._docStream, WordprocessingDocumentType.Document);
            this._document.AddMainDocumentPart();

            this.SetupStyles();

            this._document.MainDocumentPart.Document =
                new Document(
                    new Body());

            this.tables = new TableCollection(this._document.MainDocumentPart.Document.Body);
            this.constraintTableGenerator = new TemplateConstraintTable(this._settings, this._templates, this.tables, _exportSettings.SelectedCategories);
            this.figures = new FigureCollection(this._document.MainDocumentPart.Document.Body);
            this.valueSetsExport
                = new ValueSetsExport(
                      this._document.MainDocumentPart,
                      this.tables,
                      _exportSettings.GenerateValueSetAppendix,
                      _exportSettings.DefaultValueSetMaxMembers,
                      _exportSettings.ValueSetMaxMembers);
            this.wikiParser      = new WIKIParser(this._tdb, this._document.MainDocumentPart);
            this.codeSystemTable = new CodeSystemTable(this._tdb, this._document.MainDocumentPart.Document.Body, this._templates, this.tables);

            this.AddTitlePage();

            this.AddTableOfContents();

            this.AddTemplates();

            if (_exportSettings.GenerateDocTemplateListTable || _exportSettings.GenerateDocContainmentTable)
            {
                Paragraph entryLevelHeading = new Paragraph(
                    new ParagraphProperties(
                        new ParagraphStyleId()
                {
                    Val = Properties.Settings.Default.TemplateTypeHeadingStyle
                }),
                    new Run(
                        new Text("Template Ids in This Guide")));
                this._document.MainDocumentPart.Document.Body.AppendChild(entryLevelHeading);

                if (_exportSettings.GenerateDocTemplateListTable)
                {
                    // Add used template table
                    this.AddDocumentTemplateListTable();
                }

                if (_exportSettings.GenerateDocContainmentTable)
                {
                    TemplateContainmentGenerator.AddTable(this._tdb, this._document, this._templates, this.tables);
                }
            }

            this.valueSetsExport.AddValueSetsAppendix();

            this.codeSystemTable.AddCodeSystemAppendix();

            this.AddRetiredTemplatesAppendix();

            if (_exportSettings.IncludeChangeList)
            {
                this.LoadChangesAppendix();
            }
        }