Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
Commit 90c5a1fd authored by Harald Martini's avatar Harald Martini
Browse files

used new reports in XMLDeclarationReportFactory

parent 37466b7f
No related branches found
No related tags found
No related merge requests found
......@@ -9,6 +9,7 @@ using TUGraz.VectoCommon.Models;
using TUGraz.VectoCore.InputData.Reader.Impl;
using TUGraz.VectoCore.OutputData.XML.DeclarationReports.CustomerInformationFile.CustomerInformationFile_0_9;
using TUGraz.VectoCore.OutputData.XML.DeclarationReports.ManufacturerReport.ManufacturerReport_0_9.ManufacturerReportXMLTypeWriter;
using TUGraz.VectoCore.OutputData.XML.DeclarationReports.VehicleInformationFile.VehicleInformationFile_0_1;
namespace TUGraz.VectoCore.OutputData.XML
{
......@@ -16,14 +17,18 @@ namespace TUGraz.VectoCore.OutputData.XML
{
private readonly IManufacturerReportFactory _mrfFactory;
private readonly ICustomerInformationFileFactory _cifFactory;
private readonly IVIFReportFactory _vifFactory;
private readonly IVIFReportInterimFactory _vifInterimFactory;
#region Implementation of IXMLDeclarationReportFactory
public XMLDeclarationReportFactory(IManufacturerReportFactory mrfFactory, ICustomerInformationFileFactory cifFactory)
public XMLDeclarationReportFactory(IManufacturerReportFactory mrfFactory, ICustomerInformationFileFactory cifFactory, IVIFReportFactory vifFactory, IVIFReportInterimFactory vifInterimFactory)
{
_mrfFactory = mrfFactory;
_cifFactory = cifFactory;
_vifFactory = vifFactory;
_vifInterimFactory = vifInterimFactory;
}
public IDeclarationReport CreateReport(IInputDataProvider input, IOutputDataWriter outputWriter)
{
......@@ -64,14 +69,14 @@ namespace TUGraz.VectoCore.OutputData.XML
{
if (multistageVifInputData.VehicleInputData == null)
{
var reportCompleted = new XMLDeclarationReportCompletedVehicle(outputDataWriter)
var reportCompleted = new XMLDeclarationReportCompletedVehicle_09(outputDataWriter, _mrfFactory, _cifFactory, _vifFactory)
{
PrimaryVehicleReportInputData = multistageVifInputData.MultistageJobInputData.JobInputData.PrimaryVehicle,
};
return reportCompleted;
}
else {
var report = new XMLDeclarationReportMultistageBusVehicle(outputDataWriter);
var report = new XMLDeclarationReportInterimVehicle_09(outputDataWriter, _mrfFactory, _cifFactory, _vifFactory, _vifInterimFactory);
return report;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment