/// <summary>
        /// Finalizes the validation, clears task score data
        /// </summary>
        public void FinalizeValidation()
        {
            TableExtractionTaskReporting reporting = new TableExtractionTaskReporting();

            foreach (var pair in Results)
            {
                if (pair.Value.Outcome == ValidationOutcome.undefined)
                {
                    ValidationOutcome result = pair.Value.Compute();
                    pair.Value.ReportTable_Training = reporting.GetTaskExecutionScoreReport(pair.Key);
                }

                //pair.Key.PropertyDictionary.CollectProperties(pair.Value.PropertyValidation.GetResults()[ValidationOutcome.Validated]);
                // pair.Key.score = new TableExtractionTaskScore();
            }


            ResultsByOutcome = new aceEnumListSet <ValidationOutcome, TaskValidationResult>();
            foreach (var pair in Results)
            {
                ResultsByOutcome[pair.Value.Outcome].Add(pair.Value);


                //pair.Key.PropertyDictionary.CollectProperties(pair.Value.PropertyValidation.GetResults()[ValidationOutcome.Validated]);
                // pair.Key.score = new TableExtractionTaskScore();
            }
        }
        public void Publish(folderNode folder, TableExtractionTaskReporting TaskReporting, aceAuthorNotation notation)
        {
            if (TaskReporting == null)
            {
                TaskReporting = new TableExtractionTaskReporting()
                {
                    baseOutputFolder    = folder,
                    currentOutputFolder = folder,
                };
            }

            List <DataTable> allReportTables      = new List <DataTable>();
            List <DataTable> trainingReportTables = new List <DataTable>();

            List <DataTable> validationReportTables = new List <DataTable>();

            //List<DataTable> trainingReportTables = new List<DataTable>();

            // DataSet complete_report = new DataSet();


            TaskValidationResult firstResult = null;

            foreach (KeyValuePair <TableExtractionTask, TaskValidationResult> pair in Results)
            {
                if (firstResult == null)
                {
                    firstResult = pair.Value;
                }
                pair.Value.Publish(folder, notation);

                propertyReport_invalid = pair.Value.PropertyValidation.GetReportTable(pair.Value, propertyReport_invalid, new List <ValidationOutcome>()
                {
                    ValidationOutcome.Invalid
                });
                propertyReport_valid = pair.Value.PropertyValidation.GetReportTable(pair.Value, propertyReport_valid, new List <ValidationOutcome>()
                {
                    ValidationOutcome.Validated
                });
                propertyReport_other = pair.Value.PropertyValidation.GetReportTable(pair.Value, propertyReport_other, new List <ValidationOutcome>()
                {
                    ValidationOutcome.Modified, ValidationOutcome.undefined
                });



                trainingReportTables.Add(pair.Value.ReportTable_Training);
                validationReportTables.Add(pair.Value.ReportTable_PropertyValudation);
                //  allReportTables.AddRange(pair.Value.ReportTables);
            }

            allReportTables.Add(propertyReport_invalid);
            allReportTables.Add(propertyReport_valid);
            allReportTables.Add(propertyReport_other);

            DataTable training_report = TaskReporting.GetTaskScore(Results.Keys).GetReportAndSave(TaskReporting.currentOutputFolder, notation);

            training_report.SetTitle("Training run results");
            training_report.GetReportAndSave(folder, notation);
            //allReportTables.Add(training_report);

            var overview_table = GetReportDataTable();

            //allReportTables.Add(overview_table);

            propertyReport_invalid.SetTitle("Invalid");
            propertyReport_valid.SetTitle("Valid");
            propertyReport_other.SetTitle("Other");

            allReportTables.GetReportAndSave(folder, notation, "property_reports");
            trainingReportTables.GetReportAndSave(folder, notation, "training_reports");
            validationReportTables.GetReportAndSave(folder, notation, "validation_reports");
            overview_table.GetReportAndSave(folder, notation);

            //complete_report.GetReportAndSave(folder, notation, "complete_evaluation");
        }