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

Skip to content
Snippets Groups Projects
Commit b1de0187 authored by Raphael Kalchgruber's avatar Raphael Kalchgruber
Browse files

rename of classes,

removal of 09
parent 6415f55b
No related branches found
No related tags found
No related merge requests found
Showing
with 49 additions and 25 deletions
......@@ -8,6 +8,9 @@ using TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider;
using TUGraz.VectoCore.OutputData;
using TUGraz.VectoCore.OutputData.FileIO;
using TUGraz.VectoCore.OutputData.XML;
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.Models.Simulation.Impl.SimulatorFactory
{
......@@ -54,22 +57,31 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl.SimulatorFactory
private readonly IDeclarationReport _originalDeclarationReport;
private readonly IDeclarationInputDataProvider _currentStageInputData;
private readonly IManufacturerReportFactory _mrfFactory;
private readonly IVIFReportFactory _vifFactory;
public InterimAfterPrimaryFactoryCreator(IMultistagePrimaryAndStageInputDataProvider originalStageInputData,
IOutputDataWriter originalReportWriter,
IDeclarationReport originalDeclarationReport,
ISimulatorFactoryFactory simFactoryFactory,
IXMLInputDataReader inputDataReader, bool validate) : base(simFactoryFactory, validate)
IXMLInputDataReader inputDataReader,
IManufacturerReportFactory mrfFactory,
IVIFReportFactory vifFactory,
bool validate) : base(simFactoryFactory, validate)
{
_originalStageInputData = originalStageInputData;
_inputDataReader = inputDataReader;
_originalReportWriter = originalReportWriter;
_originalDeclarationReport = originalDeclarationReport;
_mrfFactory = mrfFactory;
_vifFactory = vifFactory;
_currentStageOutputDataWriter =
new TempFileOutputWriter(originalReportWriter, ReportType.DeclarationReportManufacturerXML)
;
_currentStageDeclarationReport =
new XMLDeclarationReportPrimaryVehicle_09(_currentStageOutputDataWriter);
new XMLDeclarationReportPrimaryVehicle(_currentStageOutputDataWriter,_mrfFactory, _vifFactory);
_currentStageInputData = originalStageInputData.PrimaryVehicle;
}
......
......@@ -10,6 +10,8 @@ using TUGraz.VectoCore.InputData.Reader.Impl;
using TUGraz.VectoCore.OutputData;
using TUGraz.VectoCore.OutputData.FileIO;
using TUGraz.VectoCore.OutputData.XML;
using TUGraz.VectoCore.OutputData.XML.DeclarationReports.ManufacturerReport.ManufacturerReport_0_9.ManufacturerReportXMLTypeWriter;
using TUGraz.VectoCore.OutputData.XML.DeclarationReports.VehicleInformationFile.VehicleInformationFile_0_1;
namespace TUGraz.VectoCore.Models.Simulation.Impl.SimulatorFactory
{
......@@ -21,6 +23,8 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl.SimulatorFactory
private IDeclarationReport _currentStageDeclarationReport;
private IVTPReport _currentStageVTPReport;
protected readonly IXMLDeclarationReportFactory _xmlDeclarationReportFactory;
private IVIFReportFactory _vifFactory;
private IManufacturerReportFactory _mrfFactory;
public SimulatorFactoryDeclaration(IInputDataProvider dataProvider,
......@@ -31,13 +35,14 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl.SimulatorFactory
IXMLInputDataReader xmlInputDataReader,
ISimulatorFactoryFactory simulatorFactoryFactory,
IXMLDeclarationReportFactory xmlDeclarationReportFactory,
IVectoRunDataFactoryFactory runDataFactoryFactory
) : base(ExecutionMode.Declaration, writer, validate)
IVectoRunDataFactoryFactory runDataFactoryFactory, IVIFReportFactory vifFactory, IManufacturerReportFactory mrfFactory) : base(ExecutionMode.Declaration, writer, validate)
{
_xmlInputDataReader = xmlInputDataReader;
_simFactoryFactory = simulatorFactoryFactory;
_currentStageInputData = dataProvider;
_xmlDeclarationReportFactory = xmlDeclarationReportFactory;
_vifFactory = vifFactory;
_mrfFactory = mrfFactory;
_currentStageDeclarationReport = declarationReport ?? xmlDeclarationReportFactory.CreateReport(dataProvider, writer);
......@@ -84,7 +89,7 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl.SimulatorFactory
IXMLInputDataReader xmlInputDataReader,
ISimulatorFactoryFactory simulatorFactoryFactory,
IXMLDeclarationReportFactory xmlDeclarationReportFactory,
IVectoRunDataFactoryFactory runDataFactoryFactory) : this(
IVectoRunDataFactoryFactory runDataFactoryFactory, IVIFReportFactory vifFactory, IManufacturerReportFactory mrfFactory) : this(
dataProvider: dataProvider,
declarationReport: null,
writer: writer,
......@@ -93,7 +98,7 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl.SimulatorFactory
xmlInputDataReader: xmlInputDataReader,
simulatorFactoryFactory: simulatorFactoryFactory,
xmlDeclarationReportFactory: xmlDeclarationReportFactory,
runDataFactoryFactory: runDataFactoryFactory)
runDataFactoryFactory: runDataFactoryFactory, vifFactory: vifFactory, mrfFactory: mrfFactory)
{
}
......@@ -125,7 +130,7 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl.SimulatorFactory
multistagePrimaryAndStageInputDataProvider,
ReportWriter,
currentStageDeclarationReport,
_simFactoryFactory, _xmlInputDataReader, Validate);
_simFactoryFactory, _xmlInputDataReader, _mrfFactory, _vifFactory, Validate);
case IMultistageVIFInputData multistageVifInputData:
if (multistageVifInputData.VehicleInputData != null) {
return new CompletedAfterInterimPrimaryFactoryCreator(
......
......@@ -32,6 +32,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Xml;
using System.Xml.Linq;
using NLog.Config;
......@@ -56,6 +57,8 @@ using TUGraz.VectoCommon.Exceptions;
using TUGraz.VectoCore.Models.SimulationComponent.Impl;
using LogManager = NLog.LogManager;
[assembly: InternalsVisibleTo("VectoCoreTest")]
namespace TUGraz.VectoCore.OutputData.XML
{
internal class XMLVTPReport : DeclarationReport<XMLVTPReport.ResultEntry>, IVTPReport
......
......@@ -19,11 +19,11 @@ namespace TUGraz.VectoCore.OutputData.XML
/// <summary>
/// Create MRF and CIF of the complete(d) step
/// </summary>
public class XMLDeclarationReportCompletedVehicle_09 : XMLDeclarationReport
public class XMLDeclarationReportCompletedVehicle : XMLDeclarationReport
{
#region Constructors
//public XMLDeclarationReportCompletedVehicle_09(IReportWriter writer) : base(writer) { }
public XMLDeclarationReportCompletedVehicle_09(IReportWriter writer, IManufacturerReportFactory mrfFactory,
//public XMLDeclarationReportCompletedVehicle(IReportWriter writer) : base(writer) { }
public XMLDeclarationReportCompletedVehicle(IReportWriter writer, IManufacturerReportFactory mrfFactory,
ICustomerInformationFileFactory cifFactory,
IVIFReportFactory vifFactory) : base(writer, mrfFactory, cifFactory)
{
......
......@@ -69,14 +69,14 @@ namespace TUGraz.VectoCore.OutputData.XML
{
if (multistageVifInputData.VehicleInputData == null)
{
var reportCompleted = new XMLDeclarationReportCompletedVehicle_09(outputDataWriter, _mrfFactory, _cifFactory, _vifFactory)
var reportCompleted = new XMLDeclarationReportCompletedVehicle(outputDataWriter, _mrfFactory, _cifFactory, _vifFactory)
{
PrimaryVehicleReportInputData = multistageVifInputData.MultistageJobInputData.JobInputData.PrimaryVehicle,
};
return reportCompleted;
}
else {
var report = new XMLDeclarationReportInterimVehicle_09(outputDataWriter, _mrfFactory, _cifFactory, _vifFactory, _vifInterimFactory);
var report = new XMLDeclarationReportInterimVehicle(outputDataWriter, _mrfFactory, _cifFactory, _vifFactory, _vifInterimFactory);
return report;
}
}
......@@ -94,12 +94,12 @@ namespace TUGraz.VectoCore.OutputData.XML
switch (declarationInputDataProvider.JobInputData.Vehicle.VehicleCategory)
{
case VehicleCategory.HeavyBusCompletedVehicle:
return new XMLDeclarationReportCompletedVehicle_09(outputDataWriter)
return new XMLDeclarationReportCompletedVehicle(outputDataWriter,_mrfFactory,_cifFactory,_vifFactory)
{
PrimaryVehicleReportInputData = declarationInputDataProvider.PrimaryVehicleData,
};
case VehicleCategory.HeavyBusPrimaryVehicle:
return new XMLDeclarationReportPrimaryVehicle_09(outputDataWriter);
return new XMLDeclarationReportPrimaryVehicle(outputDataWriter, _mrfFactory, _vifFactory);
default:
break;
......
......@@ -13,14 +13,14 @@ namespace TUGraz.VectoCore.OutputData.XML
/// <summary>
/// Create VIF of an interim (or the complete(d) step
/// </summary>
public class XMLDeclarationReportInterimVehicle_09 : XMLDeclarationReport
public class XMLDeclarationReportInterimVehicle : XMLDeclarationReport
{
protected readonly IVIFReportFactory _vifFactory;
protected IXMLMultistepIntermediateReport MultistepIntermediateBusReport;
protected readonly IVIFReportInterimFactory _interimFactory;
public XMLDeclarationReportInterimVehicle_09(IReportWriter writer,
public XMLDeclarationReportInterimVehicle(IReportWriter writer,
IManufacturerReportFactory mrfFactory,
ICustomerInformationFileFactory cifFactory,
IVIFReportFactory vifFactory, IVIFReportInterimFactory interimFactory) : base(writer, mrfFactory, cifFactory)
......
......@@ -12,7 +12,7 @@ namespace TUGraz.VectoCore.OutputData.XML
/// <summary>
/// Create MRF and VIF for primary bus
/// </summary>
public class XMLDeclarationReportPrimaryVehicle_09 : XMLDeclarationReport
public class XMLDeclarationReportPrimaryVehicle : XMLDeclarationReport
{
private readonly IVIFReportFactory _vifFactory;
......@@ -24,7 +24,7 @@ namespace TUGraz.VectoCore.OutputData.XML
public override XDocument PrimaryVehicleReport => VehicleInformationFile?.Report;
public XMLDeclarationReportPrimaryVehicle_09(IReportWriter writer,
public XMLDeclarationReportPrimaryVehicle(IReportWriter writer,
IManufacturerReportFactory mrfFactory,
IVIFReportFactory vifFactory) : base(writer, mrfFactory, null)
{
......
......@@ -22,6 +22,8 @@ using TUGraz.VectoCore.Models.Simulation.Impl.SimulatorFactory;
using TUGraz.VectoCore.OutputData;
using TUGraz.VectoCore.OutputData.FileIO;
using TUGraz.VectoCore.OutputData.XML;
using TUGraz.VectoCore.OutputData.XML.DeclarationReports.ManufacturerReport.ManufacturerReport_0_9.ManufacturerReportXMLTypeWriter;
using TUGraz.VectoCore.OutputData.XML.DeclarationReports.VehicleInformationFile.VehicleInformationFile_0_1;
using TUGraz.VectoCore.Tests.Integration.Declaration;
using TUGraz.VectoCore.Tests.Models.Simulation;
using TUGraz.VectoCore.Utils;
......@@ -427,7 +429,9 @@ namespace TUGraz.VectoCore.Tests.Integration.Multistage
var writer = new FileOutputWriter(outputFile);
var xmlreport = new XMLDeclarationReportPrimaryVehicle_09(writer);
var mrfFactory = _kernel.Get<IManufacturerReportFactory>();
var vifFactory = _kernel.Get<IVIFReportFactory>();
var xmlreport = new XMLDeclarationReportPrimaryVehicle(writer, mrfFactory, vifFactory);
var factory = SimulatorFactory.CreateSimulatorFactory(ExecutionMode.Declaration, inputData, writer, xmlreport);
factory.WriteModalResults = true;
factory.Validate = false;
......
......@@ -106,7 +106,8 @@ namespace TUGraz.VectoMockup.Reports
{
case VehicleCategory.HeavyBusCompletedVehicle:
throw new NotImplementedException();
return new XMLDeclarationReportCompletedVehicle_09(outputDataWriter)
return new XMLDeclarationReportCompletedVehicle(outputDataWriter, _mrfFactory, _cifFactory,
_vifFactory)
{
PrimaryVehicleReportInputData = declarationInputDataProvider.PrimaryVehicleData,
};
......
......@@ -15,7 +15,7 @@ namespace TUGraz.VectoMockup.Reports
/// <summary>
/// Create MRF and VIF for primary bus
/// </summary>
public class XMLDeclarationMockupPrimaryReport : XMLDeclarationReportPrimaryVehicle_09
public class XMLDeclarationMockupPrimaryReport : XMLDeclarationReportPrimaryVehicle
{
private readonly bool _exempted;
......@@ -25,13 +25,12 @@ namespace TUGraz.VectoMockup.Reports
IVIFReportFactory vifFactory,
bool exempted) : base(writer,
mrfFactory,
cifFactory,
vifFactory)
{
_exempted = exempted;
}
#region Overrides of XMLDeclarationReportPrimaryVehicle_09
#region Overrides of XMLDeclarationReportPrimaryVehicle
protected override void DoStoreResult(ResultEntry entry, VectoRunData runData, IModalDataContainer modData)
{
......
......@@ -21,7 +21,7 @@ namespace TUGraz.VectoMockup.Reports
/// <summary>
/// Create VIF of an interim (or the complete(d) step
/// </summary>
public class XMLDeclarationMockupReportInterimVehicle : XMLDeclarationReportInterimVehicle_09
public class XMLDeclarationMockupReportInterimVehicle : XMLDeclarationReportInterimVehicle
{
private readonly bool _exempted;
......@@ -38,7 +38,7 @@ namespace TUGraz.VectoMockup.Reports
/// <summary>
/// Create MRF and CIF of the complete(d) step
/// </summary>
public class XMLDeclarationMockupReportCompletedVehicle : XMLDeclarationReportCompletedVehicle_09
public class XMLDeclarationMockupReportCompletedVehicle : XMLDeclarationReportCompletedVehicle
{
//private readonly IManufacturerReportFactory _mrfFactory;
//private readonly ICustomerInformationFileFactory _cifFactory;
......
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