public override void Build(IParameter parameter, OSPSuiteTracker buildTracker)
        {
            var parameterDisplay = PKSimConstants.UI.ReportIs(_representationInfoRepository.DisplayNameFor(parameter), ParameterMessages.DisplayValueFor(parameter));

            _texBuilderRepository.Report(parameterDisplay, buildTracker);
            _texBuilderRepository.Report(new LineBreak(), buildTracker);
        }
        public override void Build(T process, OSPSuiteTracker buildTracker)
        {
            string processDisplay = _representationInfoRepository.DisplayNameFor(RepresentationObjectType.PROCESS, process.InternalName);

            _builderRepository.Report(process.Name.AsFullLine(), buildTracker);
            _builderRepository.Report(this.ReportValue(PKSimConstants.UI.ProcessType, processDisplay), buildTracker);
            _builderRepository.Report(this.ReportDescription(process, buildTracker), buildTracker);
            _builderRepository.Report(tableParameterFor(process), buildTracker);
        }
        public override void Build(TBuildingBlock buildingBlock, OSPSuiteTracker tracker)
        {
            _lazyLoadTask.Load(buildingBlock);
            var section = new Section(buildingBlock.Name);

            tracker.AddReference(buildingBlock, section);

            _builderRepository.Report(section, tracker);
            _builderRepository.Report(this.ReportDescription(buildingBlock, tracker), tracker);
            _builderRepository.Report(BuildingBlockReport(buildingBlock, tracker), tracker);
        }
Beispiel #4
0
        public override void Build(IReadOnlyList <ISimulationAnalysis> analyses, OSPSuiteTracker buildTracker)
        {
            var report = new List <object>();

            // add population result charts
            var charts = analyses.OfType <SimulationTimeProfileChart>().ToArray();

            if (charts.Any())
            {
                report.Add(new Section(PKSimConstants.UI.Charts));
                foreach (var chart in charts)
                {
                    if (!chart.Curves.Any())
                    {
                        continue;
                    }

                    report.Add(new SubSection(chart.Name));
                    report.Add(chart);
                    report.Add(new IndividualPKAnalyses(chart.Analysable.DowncastTo <Simulation>(), chart));
                }
            }

            addAnalysesReports <TimeProfileAnalysisChart>(analyses, PKSimConstants.UI.TimeProfileAnalysis, report);
            addAnalysesReports <BoxWhiskerAnalysisChart>(analyses, PKSimConstants.UI.BoxWhiskerAnalysis, report);
            addAnalysesReports <ScatterAnalysisChart>(analyses, PKSimConstants.UI.ScatterAnalysis, report);
            addAnalysesReports <RangeAnalysisChart>(analyses, PKSimConstants.UI.RangeAnalysis, report);

            _builderRepository.Report(report, buildTracker);
        }
        public override void Build(BlackBoxFormula blackBoxFormula, OSPSuiteTracker tracker)
        {
            if (String.IsNullOrEmpty(blackBoxFormula.Name))
            {
                return;
            }

            var listToReport = new List <object>();

            listToReport.AddRange(this.ReportDescription(blackBoxFormula, tracker));


            var formula = new Text(blackBoxFormula.ToString())
            {
                Converter = FormulaConverter.Instance
            };

            formula = new Text("{0} = {1}", blackBoxFormula.Name, formula)
            {
                Alignment = Text.Alignments.flushleft
            };
            var content = new Text("{0}{1}", formula, blackBoxFormula.ObjectPaths);

            listToReport.Add(new TextBox(Constants.BLACK_BOX_FORMULA, content));

            _builderRepository.Report(listToReport, tracker);
        }
        public override void Build(DataRepository dataRepository, OSPSuiteTracker tracker)
        {
            _builderRepository.Report(new Section(dataRepository.Name), tracker);

            foreach (var prop in dataRepository.ExtendedProperties)
            {
                _builderRepository.Report(string.Format(Constants.PROPERTY_PROMPT_FORMAT, prop.Name, prop.ValueAsObject),
                                          tracker);
            }

            foreach (var table in tablesFor(dataRepository))
            {
                _builderRepository.Report(new SubSection(table.TableName), tracker);
                _builderRepository.Report(table, tracker);
            }
        }
        public override void Build(IReactionBuilder reactionBuilder, OSPSuiteTracker buildTracker)
        {
            var listToReport = new List <object>();

            listToReport.AddRange(this.ReportDescription(reactionBuilder, buildTracker));

            listToReport.Add(String.Format(Constants.PROPERTY_PROMPT_FORMAT, Constants.MODE, reactionBuilder.Mode));

            listToReport.Add(new Paragraph(Constants.STOICHIOMETRY));
            listToReport.Add(_stoichiometricStringCreator.CreateFrom(reactionBuilder.Educts,
                                                                     reactionBuilder.Products));
            if (reactionBuilder.ModifierNames.Any())
            {
                listToReport.Add(new Paragraph(Constants.MODIFIERS));
                foreach (var modifier in reactionBuilder.ModifierNames)
                {
                    listToReport.Add(modifier);
                }
            }

            listToReport.Add(new Paragraph(Constants.KINETIC));
            listToReport.Add(reactionBuilder.Formula);

            if (reactionBuilder.Parameters.Any())
            {
                listToReport.Add(new Paragraph(Constants.PARAMETERS));
                listToReport.Add(reactionBuilder.Parameters.OrderBy(x => x.Name));
            }

            _builderRepository.Report(listToReport, buildTracker);
        }
Beispiel #8
0
        public override void Build(FormulaTextBox formulaTextBox, OSPSuiteTracker buildTracker)
        {
            var formula = formulaTextBox.Formula;

            if (string.IsNullOrEmpty(formula.Name))
            {
                return;
            }

            var listToReport = new List <object>();

            listToReport.AddRange(this.ReportDescription(formula, buildTracker));

            var formulaText = new Text(formula.ToString())
            {
                Converter = FormulaConverter.Instance
            };

            formulaText = new Text("{0} = {1}", formula.Name, formulaText)
            {
                Alignment = Text.Alignments.flushleft
            };
            var content = new Text("{0}{1}", formulaText, formula.ObjectPaths);

            listToReport.Add(new TextBox(formulaTextBox.Caption, content));

            _builderRepository.Report(listToReport, buildTracker);
        }
        public override void Build(SimulationProperties simulationProperties, OSPSuiteTracker buildTracker)
        {
            var objectsToReport = new List <object>();

            objectsToReport.Add(new SubSection(PKSimConstants.UI.ModelStructure));

            var part = new ReportPart {
                Title = PKSimConstants.UI.AllowAging
            };

            part.AddToContent(simulationProperties.AllowAging ? PKSimConstants.UI.Yes : PKSimConstants.UI.No);
            objectsToReport.Add(part);
            objectsToReport.Add(_reportGenerator.ReportFor(simulationProperties.ModelProperties));

            objectsToReport.Add(new SubSection(PKSimConstants.UI.SimulationCompoundsConfiguration));
            objectsToReport.AddRange(getObjectsToReport(simulationProperties, buildTracker, cp => cp));

            if (anyProcessesDefined(simulationProperties))
            {
                objectsToReport.Add(new SubSection(PKSimConstants.UI.Processes));
                objectsToReport.AddRange(getObjectsToReport(simulationProperties, buildTracker, cp => cp.Processes.Any() ? cp.Processes : null));
            }

            objectsToReport.Add(new SubSection(PKSimConstants.UI.Administration));
            objectsToReport.AddRange(getObjectsToReport(simulationProperties, buildTracker, cp => cp.ProtocolProperties.Protocol == null ? null : cp.ProtocolProperties));

            if (anyEventsDefined(simulationProperties))
            {
                objectsToReport.Add(new SubSection(PKSimConstants.UI.SimulationEventsConfiguration));
                objectsToReport.Add(simulationProperties.EventProperties);
            }

            _texBuilderRepository.Report(objectsToReport, buildTracker);
        }
Beispiel #10
0
        public override void Build(CompoundProperties compoundProperties, OSPSuiteTracker buildTracker)
        {
            var objectsToReport = new List <object>();
            var compoundConfig  = new TablePart(PKSimConstants.UI.Parameter, PKSimConstants.UI.AlternativeInCompound, PKSimConstants.UI.Value, PKSimConstants.UI.Unit)
            {
                Caption = PKSimConstants.UI.CompoundConfiguration
            };

            compoundConfig.Types[PKSimConstants.UI.Value] = typeof(double);

            var compound = compoundProperties.Compound;

            foreach (var alternativeSelection in compoundProperties.CompoundGroupSelections)
            {
                var parameterName = _representationInfoRepository.DisplayNameFor(RepresentationObjectType.GROUP, alternativeSelection.GroupName);
                var parameter     = getParameterForAlternative(compound, compoundProperties, alternativeSelection);
                compoundConfig.AddIs(parameterName, alternativeSelection.AlternativeName, ParameterMessages.DisplayValueFor(parameter, numericalDisplayOnly: true), ParameterMessages.DisplayUnitFor(parameter));
            }

            objectsToReport.Add(buildTracker.CreateRelativeStructureElement(PKSimConstants.UI.CompoundConfiguration, 2));
            objectsToReport.Add(compoundConfig);

            objectsToReport.Add(compoundProperties.AllCalculationMethods().Where(cm => cm.Category.IsOneOf(CoreConstants.Category.DistributionCellular, CoreConstants.Category.DistributionInterstitial, CoreConstants.Category.DiffusionIntCell)));

            _builderRepository.Report(objectsToReport, buildTracker);
        }
Beispiel #11
0
        public override void Build(IEventBuilder eventBuilder, OSPSuiteTracker buildTracker)
        {
            var listToReport = new List <object>();

            listToReport.Add(new Paragraph(eventBuilder.Name));
            listToReport.AddRange(this.ReportDescription(eventBuilder, buildTracker));

            listToReport.Add(String.Format(Constants.PROPERTY_PROMPT_FORMAT, Constants.TYPE, eventBuilder.ContainerType));
            listToReport.Add(String.Format(Constants.PROPERTY_PROMPT_FORMAT, Constants.MODE, eventBuilder.Mode));
            listToReport.Add(String.Format(Constants.PROPERTY_PROMPT_FORMAT, Constants.ONE_TIME, eventBuilder.OneTime));

            listToReport.Add(new SubParagraph(Constants.CONDITION));
            listToReport.Add(eventBuilder.Formula);

            if (eventBuilder.Assignments.Any())
            {
                listToReport.Add(new SubParagraph(Constants.EVENT_ASSIGNMENTS));
                listToReport.AddRange(eventBuilder.Assignments.OrderBy(o => o.Name));
            }
            if (eventBuilder.Parameters.Any())
            {
                listToReport.Add(new SubParagraph(Constants.PARAMETERS));
                listToReport.Add(eventBuilder.Parameters.OrderBy(o => o.Name));
            }

            _builderRepository.Report(listToReport, buildTracker);
        }
Beispiel #12
0
        public override void Build(SumFormula sumFormula, OSPSuiteTracker buildTracker)
        {
            if (String.IsNullOrEmpty(sumFormula.Name))
            {
                return;
            }

            var listToReport = new List <object>();

            listToReport.AddRange(this.ReportDescription(sumFormula, buildTracker));

            var formula = new Text("${0}$",
                                   new Text(OSPSuite.TeXReporting.TeX.EquationWriter.Sum(String.Empty, String.Empty,
                                                                                         DefaultConverter.Instance.StringToTeX(sumFormula.Variable)))
            {
                Converter = NoConverter.Instance
            })
            {
                Converter = NoConverter.Instance
            };
            var content = new Text("{0} = {1}{2}{3}{4}",
                                   sumFormula.Name, formula, new LineBreak(), Constants.OVER_ALL_PARAMETERS_WITH, sumFormula.Criteria);

            listToReport.Add(new TextBox(Constants.SUM_FORMULA, content));

            _builderRepository.Report(listToReport, buildTracker);
        }
Beispiel #13
0
        public async Task ReportToPDF <T>(T tracker, ReportSettings settings, IReadOnlyCollection <object> objectsToReport) where T : BuildTracker
        {
            settings.Validate();

            try
            {
                _eventPublisher.PublishEvent(new ReportCreationStartedEvent(tracker.ReportFullPath));

                objectsToReport.Each(item => _builderRepository.Report(item, tracker));

                var allAttachements = tracker.TrackedObjects.OfType <Attachement>();

                await _reportCompiler.CompileReport(tracker.TeX, allAttachements, settings, tracker);

                if (settings.SaveArtifacts)
                {
                    await _artifactsManager.SaveArtifacts(tracker);
                }

                //delete the temporary working directory
                if (settings.DeleteWorkingDir)
                {
                    tracker.DeleteWorkingDirectory();
                }
            }
            finally
            {
                _eventPublisher.PublishEvent(new ReportCreationFinishedEvent(tracker.ReportFullPath));
            }
        }
        public override void Build(Tags tags, OSPSuiteTracker tracker)
        {
            var listToReport = new List <object>();

            listToReport.Add(new SubParagraph(Constants.TAGS));
            listToReport.Add(listFor(tags));

            _builderRepository.Report(listToReport, tracker);
        }
Beispiel #15
0
        public override void Build(IEnumerable <IParameter> parameters, OSPSuiteTracker buildTracker)
        {
            var listToReport            = new List <object>();
            var sortedParameters        = parameters.OrderBy(x => x.Name).ToList();
            var parameterConstantsTable = tableForConstants(sortedParameters, buildTracker.Settings.Verbose);

            if (parameterConstantsTable.Rows.Count > 0)
            {
                listToReport.Add(new SubParagraph(Constants.CONSTANTS));
                listToReport.Add(parameterConstantsTable);
            }

            if (sortedParameters.Count > parameterConstantsTable.Rows.Count)
            {
                listToReport.Add(new SubParagraph(Constants.PARAMETERS));
                foreach (var parameter in sortedParameters)
                {
                    var constant = parameter.Formula as ConstantFormula;
                    if (constant != null)
                    {
                        continue;
                    }

                    listToReport.Add(new SubParagraph(parameter.Name));

                    var distributedParameter = parameter as DistributedParameter;
                    if (distributedParameter != null)
                    {
                        listToReport.Add(new Par());
                        listToReport.Add(String.Format(Constants.PROPERTY_PROMPT_FORMAT, Constants.BUILD_MODE, distributedParameter.BuildMode));
                        listToReport.Add(String.Format(Constants.PROPERTY_PROMPT_FORMAT, Constants.PERCENTILE, distributedParameter.Percentile));
                        listToReport.Add(String.Format(Constants.PROPERTY_PROMPT_FORMAT, Constants.CAN_BE_VARIED, distributedParameter.CanBeVaried));
                        listToReport.Add(String.Format(Constants.PROPERTY_PROMPT_FORMAT, Constants.VISIBLE, distributedParameter.Visible));
                        listToReport.Add(String.Format(Constants.PROPERTY_PROMPT_FORMAT, Constants.VALUE,
                                                       String.Format("{0} {1}",
                                                                     _reportingHelper.ConvertToDisplayUnit(
                                                                         distributedParameter.DisplayUnit,
                                                                         distributedParameter.Dimension,
                                                                         (float)distributedParameter.Value),
                                                                     _reportingHelper.GetDisplayUnitFor(distributedParameter).Name)));
                    }

                    listToReport.Add(parameter.Formula);

                    listToReport.Add(new Par());
                    listToReport.Add(parameter.RHSFormula);

                    if (parameter.Tags.Any())
                    {
                        listToReport.Add(new Par());
                        listToReport.Add(parameter.Tags);
                    }
                }
            }

            _builderRepository.Report(listToReport, buildTracker);
        }
Beispiel #16
0
        public override void Build(TMolecule molecule, OSPSuiteTracker buildTracker)
        {
            var sb = new StringBuilder();

            sb.AppendLine(molecule.Name);
            sb.AddIs(_representationInfoRepository.DisplayNameFor(molecule.ReferenceConcentration), ParameterMessages.DisplayValueFor(molecule.ReferenceConcentration));
            sb.AddIs(_representationInfoRepository.DisplayNameFor(molecule.HalfLifeLiver), ParameterMessages.DisplayValueFor(molecule.HalfLifeLiver));
            sb.AddIs(_representationInfoRepository.DisplayNameFor(molecule.HalfLifeIntestine), ParameterMessages.DisplayValueFor(molecule.HalfLifeIntestine));
            sb.AddIs(PKSimConstants.UI.OntogenyVariabilityLike, molecule.Ontogeny.Name);

            _builderRepository.Report(sb, buildTracker);

            //specific part
            AddMoleculeSpecificReportPart(molecule, buildTracker);

            _builderRepository.Report(PKSimConstants.UI.NormalizedExpressionLevels, buildTracker);
            _builderRepository.Report(ExpressionLevelParameters(molecule), buildTracker);
        }
Beispiel #17
0
        public override void Build(CompoundProcessesSelection processes, OSPSuiteTracker buildTracker)
        {
            var thisSection = new List <object>();

            thisSection.AddRange(processSelection(processes.MetabolizationSelection, buildTracker.GetStructureElementRelativeToLast(PKSimConstants.UI.SimulationMetabolism, 2)));
            thisSection.AddRange(processSelection(processes.TransportAndExcretionSelection, buildTracker.GetStructureElementRelativeToLast(PKSimConstants.UI.SimulationTransportAndExcretion, 2)));
            thisSection.AddRange(processSelection(processes.SpecificBindingSelection, buildTracker.GetStructureElementRelativeToLast(PKSimConstants.UI.SimulationSpecificBinding, 2)));

            _builderRepository.Report(thisSection, buildTracker);
        }
        public override void Build(IEnumerable <ITransportBuilder> transportBuilders, OSPSuiteTracker buildTracker)
        {
            var listToReport = new List <object>();

            foreach (var transport in transportBuilders)
            {
                listToReport.Add(transport);
            }

            _builderRepository.Report(listToReport, buildTracker);
        }
      public override void Build(NormalDistributionFormula normalDistributionFormula, OSPSuiteTracker tracker)
      {
         if (!normalDistributionFormula.ObjectPaths.Any()) return;

         var listToReport = new List<object>
                               {
                                  new DistributionFormulaTextBox(Constants.NORMAL_DISTRIBUTION_FORMULA, normalDistributionFormula)
                               };

         _builderRepository.Report(listToReport, tracker);
      }
Beispiel #20
0
        public override void Build(IEventAssignmentBuilder eventAssignmentBuilder, OSPSuiteTracker tracker)
        {
            var listToReport = new List <object>();

            listToReport.Add(new SubParagraph(eventAssignmentBuilder.Name));
            listToReport.AddRange(this.ReportDescription(eventAssignmentBuilder, tracker));
            listToReport.Add(String.Format(Constants.PROPERTY_PROMPT_FORMAT, Constants.DIMENSION, eventAssignmentBuilder.Dimension));
            listToReport.Add(String.Format(Constants.PROPERTY_PROMPT_FORMAT, Constants.ASSIGNMENT, eventAssignmentBuilder.ObjectPath.PathAsString));
            listToReport.Add(String.Format(Constants.PROPERTY_PROMPT_FORMAT, Constants.USE_AS_VALUE, eventAssignmentBuilder.UseAsValue));
            listToReport.Add(eventAssignmentBuilder.Formula);

            _builderRepository.Report(listToReport, tracker);
        }
        public override void Build(Formula formula, OSPSuiteTracker buildTracker)
        {
            if (string.IsNullOrEmpty(formula.Name))
            {
                return;
            }

            var listToReport = new List <object>
            {
                new FormulaTextBox(FORMULA, formula)
            };

            _builderRepository.Report(listToReport, buildTracker);
        }
Beispiel #22
0
        public override void Build(RandomPopulationSettings populationSettings, OSPSuiteTracker tracker)
        {
            var objectToReports = new List <object>
            {
                new SubSection(PKSimConstants.UI.PopulationProperties),
                this.ReportValue(PKSimConstants.UI.NumberOfIndividuals, populationSettings.NumberOfIndividuals)
            };

            objectToReports.AddRange(populationSettings.GenderRatios.SelectMany(reportFor));

            objectToReports.Add(new SubSection(PKSimConstants.UI.PopulationParameterRanges));
            objectToReports.Add(parameterRangeTable(populationSettings.ParameterRanges));
            _builderRepository.Report(objectToReports, tracker);
        }
Beispiel #23
0
        public override void Build(ExplicitFormula explicitFormula, OSPSuiteTracker buildTracker)
        {
            if (String.IsNullOrEmpty(explicitFormula.Name))
            {
                return;
            }

            var listToReport = new List <object>
            {
                new FormulaTextBox(Constants.EXPLICIT_FORMULA, explicitFormula)
            };

            _builderRepository.Report(listToReport, buildTracker);
        }
Beispiel #24
0
        public override void Build(DiscreteDistributionFormula discreteDistributionFormula, OSPSuiteTracker tracker)
        {
            if (!discreteDistributionFormula.ObjectPaths.Any())
            {
                return;
            }

            var listToReport = new List <object>
            {
                new DistributionFormulaTextBox(Constants.DISCRETE_DISTRIBUTION_FORMULA, discreteDistributionFormula)
            };

            _builderRepository.Report(listToReport, tracker);
        }
        public override void Build(IObserverBuilder observerBuilder, OSPSuiteTracker buildTracker)
        {
            var listToReport = new List <object>();

            listToReport.AddRange(this.ReportDescription(observerBuilder, buildTracker));

            var amountObserver    = observerBuilder as AmountObserverBuilder;
            var containerObserver = observerBuilder as ContainerObserverBuilder;

            if (amountObserver != null)
            {
                listToReport.Add(string.Format(PROPERTY_PROMPT_FORMAT, TYPE, Captions.MoleculeObserver));
            }

            if (containerObserver != null)
            {
                listToReport.Add(string.Format(PROPERTY_PROMPT_FORMAT, TYPE, Captions.ContainerObserver));
            }

            listToReport.Add(string.Format(PROPERTY_PROMPT_FORMAT, DIMENSION, observerBuilder.Dimension));

            var hasExcludedMolecules = observerBuilder.MoleculeNamesToExclude().Any();

            if (observerBuilder.ForAll)
            {
                if (hasExcludedMolecules)
                {
                    listToReport.Add(new Paragraph(CALCULATED_FOR_ALL_MOLECULES_EXCEPT));
                    listToReport.Add(observerBuilder.MoleculeNamesToExclude().ToArray());
                }
                else
                {
                    listToReport.Add(string.Format(PROPERTY_PROMPT_FORMAT, CALCULATED_FOR_ALL_MOLECULES, observerBuilder.ForAll));
                }
            }
            else
            {
                listToReport.Add(new Paragraph(CALCULATED_FOR_FOLLOWING_MOLECULES));
                listToReport.Add(observerBuilder.MoleculeNames().ToArray());
            }

            listToReport.Add(new Paragraph(IN_CONTAINERS_WITH));
            listToReport.Add(observerBuilder.ContainerCriteria);

            listToReport.Add(new Paragraph(MONITOR));
            listToReport.Add(observerBuilder.Formula);

            _builderRepository.Report(listToReport, buildTracker);
        }
Beispiel #26
0
        public override void Build(ReportPart reportPart, OSPSuiteTracker buildTracker)
        {
            if (reportPart == null)
            {
                return;
            }

            var content = reportPart.Content;

            if (!string.IsNullOrEmpty(content))
            {
                if (!string.IsNullOrEmpty(reportPart.Title))
                {
                    _builderRepository.Report(new Paragraph(reportPart.Title), buildTracker);
                }

                _builderRepository.Report(contentFrom(reportPart), buildTracker);
            }

            foreach (var subPart in reportPart.SubParts)
            {
                Build(subPart, buildTracker);
            }
        }
Beispiel #27
0
        public override void Build(IApplicationMoleculeBuilder applicationMoleculeBuilder, OSPSuiteTracker tracker)
        {
            var listToReport = new List <object>();

            listToReport.Add(new Paragraph(applicationMoleculeBuilder.Name));
            listToReport.AddRange(this.ReportDescription(applicationMoleculeBuilder, tracker));

            listToReport.Add(String.Format(Constants.PROPERTY_PROMPT_FORMAT, Constants.DIMENSION, applicationMoleculeBuilder.Dimension));

            listToReport.Add(new SubParagraph(Constants.START_FORMULA));
            listToReport.Add(applicationMoleculeBuilder.Formula);


            _builderRepository.Report(listToReport, tracker);
        }
        public override void Build(IEntity entity, OSPSuiteTracker tracker)
        {
            var listToReport = new List <object>();

            listToReport.Add(String.Format(Constants.PROPERTY_PROMPT_FORMAT, Constants.NAME, entity.Name));

            listToReport.AddRange(this.ReportDescription(entity, tracker));

            if (entity.Tags.Any())
            {
                listToReport.Add(entity.Tags);
            }

            _builderRepository.Report(listToReport, tracker);
        }
        public override void Build(ImportPopulationSettings importSettings, OSPSuiteTracker tracker)
        {
            var objectToReports = new List <object>();

            objectToReports.Add(new SubSection(PKSimConstants.UI.PopulationProperties));

            objectToReports.Add(new Text("{0}: {1}",
                                         PKSimConstants.UI.BasedOnIndividual,
                                         importSettings.BaseIndividual.Name));

            objectToReports.Add(new SubSection("List of Imported Files"));
            objectToReports.Add(getTableFor(importSettings.AllFiles));

            _builderRepository.Report(objectToReports, tracker);
        }
        public override void Build(IEnumerable <UsedBuildingBlock> usedBuildingBlocks, OSPSuiteTracker buildTracker)
        {
            var table = new DataTable();

            table.AddColumn(PKSimConstants.UI.BuildingBlock);
            table.AddColumn <Text>(PKSimConstants.UI.Name);

            foreach (var usedBuildingBlock in usedBuildingBlocks)
            {
                var row         = table.NewRow();
                var defaultText = new Text(usedBuildingBlock.Name);
                row[PKSimConstants.UI.BuildingBlock] = usedBuildingBlock.BuildingBlockType.ToString();

                var templateBuildingBlock = _buildingBlockRepository.ById(usedBuildingBlock.TemplateId);
                //should never happen
                if (templateBuildingBlock == null)
                {
                    row[PKSimConstants.UI.Name] = defaultText;
                }

                else if (templateBuildingBlock.Version == usedBuildingBlock.Version)
                {
                    var reference = buildTracker.ReferenceFor(templateBuildingBlock);
                    if (reference == null)
                    {
                        row[PKSimConstants.UI.Name] = defaultText;
                    }
                    else
                    {
                        var partBuildingBlocks = getReferenceForPartBuildingBlocks(buildTracker);
                        row[PKSimConstants.UI.Name] = new Text("{0} (see {1} in {2})", defaultText,
                                                               reference, partBuildingBlocks)
                        {
                            Converter = NoConverter.Instance
                        };
                    }
                }

                else
                {
                    row[PKSimConstants.UI.Name] = defaultText;
                }

                table.Rows.Add(row);
            }

            _builderRepository.Report(new Table(table.DefaultView, PKSimConstants.UI.BuildingBlock), buildTracker);
        }