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

Skip to content
Snippets Groups Projects
Commit f4cef17e authored by Harald MARTINI's avatar Harald MARTINI
Browse files

added AbstractCustomerReport and LorryCustomerInformationFile

parent ffbabb15
No related branches found
No related tags found
No related merge requests found
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Linq;
using TUGraz.VectoCommon.InputData;
using TUGraz.VectoCore.Models.Declaration;
using TUGraz.VectoCore.Models.Simulation.Data;
using TUGraz.VectoCore.Models.SimulationComponent;
namespace TUGraz.VectoCore.OutputData.XML.DeclarationReports.CustomerInformationFile.CustomerInformationFile_0_9
{
public abstract class AbstractCustomerReport : IXMLCustomerReport
{
private readonly ICustomerInformationFileFactory _cifFactory;
protected XElement Vehicle { get; private set; }
protected AbstractCustomerReport(ICustomerInformationFileFactory cifFactory)
{
_cifFactory = cifFactory;
}
public abstract void InitializeVehicleData(IVehicleDeclarationInputData inputData);
#region Implementation of IXMLCustomerReport
public void Initialize(VectoRunData modelData, List<List<FuelData.Entry>> fuelModes)
{
throw new NotImplementedException();
}
public XDocument Report { get; protected set; }
public void WriteResult(XMLDeclarationReport.ResultEntry resultValue)
{
throw new NotImplementedException();
}
public void GenerateReport(XElement resultSignature)
{
throw new NotImplementedException();
}
#endregion
}
}
......@@ -4,11 +4,14 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Linq;
using TUGraz.VectoCommon.InputData;
using TUGraz.VectoCore.Models.Declaration;
using TUGraz.VectoCore.Models.Simulation.Data;
using TUGraz.VectoCore.OutputData.XML.DeclarationReports.ManufacturerReport.ManufacturerReport_0_9.ManufacturerReportXMLTypeWriter;
namespace TUGraz.VectoCore.OutputData.XML.DeclarationReports.CustomerInformationFile.CustomerInformationFile_0_9.CustomerInformationFile
{
public abstract class LorryCustomerInformationFile
public abstract class LorryCustomerInformationFile : AbstractCustomerReport
{
//protected XNamespace _cif = XNamespace.Get("urn:tugraz:ivt:VectoAPI:DeclarationOutput:v0.9");
//public LorryManufacturerReportBase(IManufacturerReportFactory MRFReportFactory) : base(MRFReportFactory) { }
......@@ -23,7 +26,20 @@ namespace TUGraz.VectoCore.OutputData.XML.DeclarationReports.CustomerInformation
// new XElement(_mrf + "Results")));
//}
protected LorryCustomerInformationFile(ICustomerInformationFileFactory cifFactory) : base(cifFactory) { }
}
public class ConventionalLorry_CIF : LorryCustomerInformationFile
{
public ConventionalLorry_CIF(ICustomerInformationFileFactory cifFactory) : base(cifFactory) { }
#region Overrides of AbstractCustomerReport
public override void InitializeVehicleData(IVehicleDeclarationInputData inputData)
{
Vehicle = _cifFactory.GetConventionalLorryVehicleType(inputData);
}
#endregion
}
}
......@@ -3,8 +3,10 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Linq;
using TUGraz.VectoCommon.InputData;
using TUGraz.VectoCommon.Models;
using TUGraz.VectoCore.OutputData.XML.DeclarationReports.ManufacturerReport.ManufacturerReport_0_9.ManufacturerReportXMLTypeWriter;
namespace TUGraz.VectoCore.OutputData.XML.DeclarationReports.CustomerInformationFile.CustomerInformationFile_0_9
{
......@@ -12,5 +14,7 @@ namespace TUGraz.VectoCore.OutputData.XML.DeclarationReports.CustomerInformation
{
IXMLCustomerReport GetCustomerReport(VehicleCategory vehicleType, VectoSimulationJobType jobType,
ArchitectureID archId, bool exempted, bool iepc, bool ihpc);
}
IXmlTypeWriter GetConventionalLorryVehicleType(IVehicleDeclarationInputData inputData);
}
}
......@@ -10,9 +10,9 @@ using TUGraz.VectoCommon.Utils;
namespace TUGraz.VectoCore.OutputData.XML.DeclarationReports.ManufacturerReport.ManufacturerReport_0_9.ManufacturerReportXMLTypeWriter.Components
{
internal class MRFIEPCSpecificationsType : AbstractMrfXmlType, IMrfXmlType
internal class MrfiepcSpecificationsTypeWriter : AbstractMrfXmlType, IXmlTypeWriter
{
public MRFIEPCSpecificationsType(IManufacturerReportFactory mrfFactory) : base(mrfFactory) { }
public MrfiepcSpecificationsTypeWriter(IManufacturerReportFactory mrfFactory) : base(mrfFactory) { }
#region Overrides of AbstractMrfXmlType
......
......@@ -481,6 +481,7 @@
<Compile Include="OutputData\XML\ComponentWriter\Declaration\ADAS_Writer.cs" />
<Compile Include="OutputData\XML\ComponentWriter\Declaration\Components_Conventional.cs" />
<Compile Include="OutputData\XML\ComponentWriter\IComponentWriterFactory.cs" />
<Compile Include="OutputData\XML\DeclarationReports\CustomerInformationFile\CustomerInformationFile_0_9\AbstractCustomerReport.cs" />
<Compile Include="OutputData\XML\DeclarationReports\CustomerInformationFile\CustomerInformationFile_0_9\CIFNinjectModule.cs" />
<Compile Include="OutputData\XML\DeclarationReports\CustomerInformationFile\CustomerInformationFile_0_9\CustomerInformationFile\LorryCustomerInformationFile.cs" />
<Compile Include="OutputData\XML\DeclarationReports\CustomerInformationFile\CustomerInformationFile_0_9\ICustomerInformationFileFactory.cs" />
......@@ -1078,8 +1079,8 @@
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="Resources\XSD\VectoDeclarationDefinitions.2.3.xsd">
<SubType>Designer</SubType>
</EmbeddedResource>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="Resources\XSD\VectoDeclarationDefinitions.2.4.xsd">
<SubType>Designer</SubType>
</EmbeddedResource>
......
......@@ -36,10 +36,18 @@ namespace TUGraz.VectoCore.Tests.XML.Reports
return report;
}
}
[TestCase(ConventionalHeavyLorry)]
public void ConventionalLorryCIFTest(string fileName)
{
var report = GetCustomerReport(fileName, out var dataProvider) as
}
}
}
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