public static IConstraintGenerator NewConstraintGenerator( IGSettingsManager igSettings, MainDocumentPart mainPart, CommentManager cmtMgr, FigureCollection figures, bool includeSamples, IObjectRepository dataSource, List <TemplateConstraint> rootConstraints, List <TemplateConstraint> allConstraints, Template currentTemplate, List <Template> allTemplates, string constraintHeadingStyle, List <string> selectedCategories, HyperlinkTracker hyperlinkTracker) { IConstraintGenerator constraintGenerator = null; if (igSettings.GetBoolSetting(IGSettingsManager.SettingProperty.UseConsolidatedConstraintFormat)) { constraintGenerator = new ConsolidatedGeneration(); } else { constraintGenerator = new LegacyGeneration(); } constraintGenerator.IGSettings = igSettings; constraintGenerator.Figures = figures; constraintGenerator.IncludeSamples = includeSamples; constraintGenerator.DataSource = dataSource; constraintGenerator.RootConstraints = rootConstraints; constraintGenerator.AllConstraints = allConstraints; constraintGenerator.CurrentTemplate = currentTemplate; constraintGenerator.AllTemplates = allTemplates; constraintGenerator.ConstraintHeadingStyle = constraintHeadingStyle; constraintGenerator.CommentManager = cmtMgr; constraintGenerator.IncludeCategory = !string.IsNullOrEmpty(igSettings.GetSetting(IGSettingsManager.SettingProperty.Categories)); constraintGenerator.SelectedCategories = selectedCategories; constraintGenerator.HyperlinkTracker = hyperlinkTracker; constraintGenerator.MainPart = mainPart; constraintGenerator.DocumentBody = mainPart.Document.Body; return(constraintGenerator); }
public void BuildImplementationGuide(ExportSettings aModel, IIGTypePlugin igTypePlugin) { this.exportSettings = aModel; this.igTypePlugin = igTypePlugin; 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.hyperlinkTracker = new HyperlinkTracker(); this.tables = new TableCollection(this.document.MainDocumentPart.Document.Body, this.hyperlinkTracker); this.constraintTableGenerator = new TemplateConstraintTable(this._tdb, this.constraintReferences, this.igSettings, igTypePlugin, this.templates, this.tables, exportSettings.SelectedCategories, this.hyperlinkTracker); this.figures = new FigureCollection(this.document.MainDocumentPart.Document.Body); this.valueSetsExport = new ValueSetsExport( igTypePlugin, this.document.MainDocumentPart, this.hyperlinkTracker, this.tables, exportSettings.GenerateValueSetAppendix, exportSettings.DefaultValueSetMaxMembers, exportSettings.ValueSetMaxMembers); this.codeSystemTable = new CodeSystemTable(this._tdb, this.document.MainDocumentPart.Document.Body, this.templates, this.tables); this.AddTitlePage(); this.AddTableOfContents(); this.AddVolume1(false); this.AddTemplateTypeSections(); 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.templateRelationships, this.templates, this.tables, this.hyperlinkTracker); } } this.valueSetsExport.AddValueSetsAppendix(); this.codeSystemTable.AddCodeSystemAppendix(); this.AddRetiredTemplatesAppendix(); if (exportSettings.IncludeChangeList) { this.LoadChangesAppendix(); } this.AddVolume1(true); }