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

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

added output types to xmlnames, implemented summary writing

parent 8b06f6aa
No related branches found
No related tags found
No related merge requests found
......@@ -24,6 +24,7 @@ namespace TUGraz.VectoCore.OutputData.XML.DeclarationReports.CustomerInformation
protected abstract string OutputDataType { get; }
private bool _ovc = false;
protected AbstractCustomerReport(ICustomerInformationFileFactory cifFactory)
{
_cifFactory = cifFactory;
......@@ -37,6 +38,7 @@ namespace TUGraz.VectoCore.OutputData.XML.DeclarationReports.CustomerInformation
public void Initialize(VectoRunData modelData, List<List<FuelData.Entry>> fuelModes)
{
InitializeVehicleData(modelData.InputData);
_ovc = modelData.VehicleData.Ocv;
Results = new XElement(Cif + "Results");
}
......@@ -66,7 +68,14 @@ namespace TUGraz.VectoCore.OutputData.XML.DeclarationReports.CustomerInformation
public void WriteMockupResult(XMLDeclarationReport.ResultEntry resultValue)
{
Results.Add(MockupResultReader.GetCIFMockupResult(OutputDataType, resultValue, Cif + "Result"));
Results.Add(MockupResultReader.GetCIFMockupResult(OutputDataType, resultValue, Cif + "Result", _ovc));
}
public void WriteMockupSummary(XMLDeclarationReport.ResultEntry resultValue)
{
Results.AddFirst(new XElement(Cif + "Status", "success"));
Results.AddFirst(new XComment("Always prints success at the moment"));
Results.Add(MockupResultReader.GetCIFMockupResult(OutputDataType, resultValue, Cif + "Summary", _ovc));
}
#endregion
......
......@@ -48,7 +48,7 @@ namespace TUGraz.VectoCore.OutputData.XML.DeclarationReports.CustomerInformation
public class HEV_PxLorry_CIF : CustomerInformationFile
{
protected override string OutputDataType => "HEV_Px_LorryOutputType";
protected override string OutputDataType => XMLNames.CIF_OutputDataType_HEV_Px_LorryOutputType;
public HEV_PxLorry_CIF(ICustomerInformationFileFactory cifFactory) : base(cifFactory) { }
#region Overrides of AbstractCustomerReport
......@@ -63,7 +63,7 @@ namespace TUGraz.VectoCore.OutputData.XML.DeclarationReports.CustomerInformation
public class HEV_S2_Lorry_CIF : CustomerInformationFile
{
protected override string OutputDataType => "HEV_S2_LorryOutputType";
protected override string OutputDataType => XMLNames.CIF_OutputDataType_HEV_S2_LorryOutputType;
public HEV_S2_Lorry_CIF(ICustomerInformationFileFactory cifFactory) : base(cifFactory) { }
#region Overrides of AbstractCustomerReport
......@@ -78,7 +78,7 @@ namespace TUGraz.VectoCore.OutputData.XML.DeclarationReports.CustomerInformation
public class HEV_S3_Lorry_CIF : CustomerInformationFile
{
protected override string OutputDataType => "HEV_S3_LorryOutputType";
protected override string OutputDataType => XMLNames.CIF_OutputDataType_HEV_S3_LorryOutputType;
public HEV_S3_Lorry_CIF(ICustomerInformationFileFactory cifFactory) : base(cifFactory) { }
#region Overrides of AbstractCustomerReport
......@@ -93,7 +93,7 @@ namespace TUGraz.VectoCore.OutputData.XML.DeclarationReports.CustomerInformation
public class HEV_S4_Lorry_CIF : CustomerInformationFile
{
protected override string OutputDataType => "HEV_S4_LorryOutputType";
protected override string OutputDataType => XMLNames.CIF_OutputDataType_HEV_S4_LorryOutputType;
public HEV_S4_Lorry_CIF(ICustomerInformationFileFactory cifFactory) : base(cifFactory) { }
#region Overrides of AbstractCustomerReport
......@@ -108,7 +108,7 @@ namespace TUGraz.VectoCore.OutputData.XML.DeclarationReports.CustomerInformation
public class HEV_IEPC_Lorry_CIF : CustomerInformationFile
{
protected override string OutputDataType => "HEV_IEPC_S_LorryOutputType";
protected override string OutputDataType => XMLNames.CIF_OutputDataType_HEV_IEPC_S_LorryOutputType;
public HEV_IEPC_Lorry_CIF(ICustomerInformationFileFactory cifFactory) : base(cifFactory) { }
#region Overrides of AbstractCustomerReport
......
......@@ -59,7 +59,7 @@ namespace TUGraz.VectoCore.OutputData.XML.DeclarationReports.ManufacturerReport.
#region Overrides of AbstractManufacturerReport
public override string OutputDataType => "HEV-Px_IHPCLorryManufacturerOutputDataType";
public override string OutputDataType => XMLNames.MRF_OutputDataType_HEV_Px_IHPCLorryManufacturerOutputDataType;
public override void InitializeVehicleData(IDeclarationInputDataProvider inputData)
{
......@@ -79,7 +79,7 @@ namespace TUGraz.VectoCore.OutputData.XML.DeclarationReports.ManufacturerReport.
#region Overrides of AbstractManufacturerReport
public override string OutputDataType => "HEV-S2_LorryManufacturerOutputDataType";
public override string OutputDataType => XMLNames.MRF_OutputDataType_HEV_S2_LorryManufacturerOutputDataType;
public override void InitializeVehicleData(IDeclarationInputDataProvider inputData)
{
......@@ -92,7 +92,7 @@ namespace TUGraz.VectoCore.OutputData.XML.DeclarationReports.ManufacturerReport.
internal class HEV_S3_LorryManufacturerReport : LorryManufacturerReportBase
{
public override string OutputDataType => "HEV-S3_LorryManufacturerOutputDataType";
public override string OutputDataType => XMLNames.MRF_OutputDataType_HEV_S3_LorryManufacturerOutputDataType;
public HEV_S3_LorryManufacturerReport(IManufacturerReportFactory MRFReportFactory) : base(MRFReportFactory)
{
......@@ -116,7 +116,7 @@ namespace TUGraz.VectoCore.OutputData.XML.DeclarationReports.ManufacturerReport.
#region Overrides of AbstractManufacturerReport
public override string OutputDataType => "HEV-S4_LorryManufacturerOutputDataType";
public override string OutputDataType => XMLNames.MRF_OutputDataType_HEV_S4_LorryManufacturerOutputDataType;
public override void InitializeVehicleData(IDeclarationInputDataProvider inputData)
{
......@@ -132,7 +132,7 @@ namespace TUGraz.VectoCore.OutputData.XML.DeclarationReports.ManufacturerReport.
#region Overrides of AbstractManufacturerReport
public override string OutputDataType => "HEV-IEPC-S_LorryManufacturerOutputDataType";
public override string OutputDataType => XMLNames.MRF_OutputDataType_HEV_IEPC_S_LorryManufacturerOutputDataType;
public override void InitializeVehicleData(IDeclarationInputDataProvider inputData)
{
......
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