diff --git a/VectoCore/VectoCore/OutputData/XML/DeclarationReports/CustomerInformationFile/CustomerInformationFile_0_9/AbstractCustomerReport.cs b/VectoCore/VectoCore/OutputData/XML/DeclarationReports/CustomerInformationFile/CustomerInformationFile_0_9/AbstractCustomerReport.cs new file mode 100644 index 0000000000000000000000000000000000000000..1203dcf03305e502d0aee57068d1963a4eb3ed2b --- /dev/null +++ b/VectoCore/VectoCore/OutputData/XML/DeclarationReports/CustomerInformationFile/CustomerInformationFile_0_9/AbstractCustomerReport.cs @@ -0,0 +1,48 @@ +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 + } +} diff --git a/VectoCore/VectoCore/OutputData/XML/DeclarationReports/CustomerInformationFile/CustomerInformationFile_0_9/CustomerInformationFile/LorryCustomerInformationFile.cs b/VectoCore/VectoCore/OutputData/XML/DeclarationReports/CustomerInformationFile/CustomerInformationFile_0_9/CustomerInformationFile/LorryCustomerInformationFile.cs index f8c39d7f2e3780f675c6e37e17597d8e59fb8cc1..c7c1dd23fbcfac73c993fbf1f4ff0d2d7b9ac5fa 100644 --- a/VectoCore/VectoCore/OutputData/XML/DeclarationReports/CustomerInformationFile/CustomerInformationFile_0_9/CustomerInformationFile/LorryCustomerInformationFile.cs +++ b/VectoCore/VectoCore/OutputData/XML/DeclarationReports/CustomerInformationFile/CustomerInformationFile_0_9/CustomerInformationFile/LorryCustomerInformationFile.cs @@ -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 } } diff --git a/VectoCore/VectoCore/OutputData/XML/DeclarationReports/CustomerInformationFile/CustomerInformationFile_0_9/ICustomerInformationFileFactory.cs b/VectoCore/VectoCore/OutputData/XML/DeclarationReports/CustomerInformationFile/CustomerInformationFile_0_9/ICustomerInformationFileFactory.cs index 499a33739927651f0b5554e6f0ac607c8e275054..69cf8f8d9873bfcbc80faa16b7e0233d2b1dec1d 100644 --- a/VectoCore/VectoCore/OutputData/XML/DeclarationReports/CustomerInformationFile/CustomerInformationFile_0_9/ICustomerInformationFileFactory.cs +++ b/VectoCore/VectoCore/OutputData/XML/DeclarationReports/CustomerInformationFile/CustomerInformationFile_0_9/ICustomerInformationFileFactory.cs @@ -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); + } } diff --git a/VectoCore/VectoCore/OutputData/XML/DeclarationReports/ManufacturerReport/ManufacturerReport_0_9/ManufacturerReportXMLTypeWriter/Components/MRFIepcSpecificationsType.cs b/VectoCore/VectoCore/OutputData/XML/DeclarationReports/ManufacturerReport/ManufacturerReport_0_9/ManufacturerReportXMLTypeWriter/Components/MRFIepcSpecificationsType.cs index 9e226bd19ffbc101ca3e2e561c4e371c5b447596..0613298c4689345dabad9b81049ba3d056ac6cc4 100644 --- a/VectoCore/VectoCore/OutputData/XML/DeclarationReports/ManufacturerReport/ManufacturerReport_0_9/ManufacturerReportXMLTypeWriter/Components/MRFIepcSpecificationsType.cs +++ b/VectoCore/VectoCore/OutputData/XML/DeclarationReports/ManufacturerReport/ManufacturerReport_0_9/ManufacturerReportXMLTypeWriter/Components/MRFIepcSpecificationsType.cs @@ -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 diff --git a/VectoCore/VectoCore/VectoCore.csproj b/VectoCore/VectoCore/VectoCore.csproj index d8c917d9b239b09f48771937cfff6440b8dcf849..79bce16ff9796b82f5386b87fc51610425e6b9df 100644 --- a/VectoCore/VectoCore/VectoCore.csproj +++ b/VectoCore/VectoCore/VectoCore.csproj @@ -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> diff --git a/VectoCore/VectoCoreTest/XML/Reports/CustomerInformationFileWriterTest.cs b/VectoCore/VectoCoreTest/XML/Reports/CustomerInformationFileWriterTest.cs index bbda24535f4300a6664f99bd0977723bcbda59d9..88d111176d54ff189b918a1a167a094e5962542d 100644 --- a/VectoCore/VectoCoreTest/XML/Reports/CustomerInformationFileWriterTest.cs +++ b/VectoCore/VectoCoreTest/XML/Reports/CustomerInformationFileWriterTest.cs @@ -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 + + } + + + } }