diff --git a/VECTO/Input Files/Engine.vb b/VECTO/Input Files/Engine.vb index 9bc9ac04993380fb8b7e39ac968c2afc792d6e1d..6e168b0210ca3c2a039590aa76ab39193e94e9b6 100644 --- a/VECTO/Input Files/Engine.vb +++ b/VECTO/Input Files/Engine.vb @@ -619,6 +619,7 @@ Public Class DummyVehicle Public Property Identifier As String Implements IVehicleDeclarationInputData.Identifier Public Property ExemptedVehicle As Boolean Implements IVehicleDeclarationInputData.ExemptedVehicle Public Property VIN As String Implements IVehicleDeclarationInputData.VIN + Public ReadOnly Property LegislativeCategory As String Implements IVehicleDeclarationInputData.LegislativeCategory Public Property LegislativeClass As LegislativeClass? Implements IVehicleDeclarationInputData.LegislativeClass Public Property VehicleCategory As VehicleCategory Implements IVehicleDeclarationInputData.VehicleCategory Public Property AxleConfiguration As AxleConfiguration Implements IVehicleDeclarationInputData.AxleConfiguration diff --git a/VECTO/Input Files/Gearbox.vb b/VECTO/Input Files/Gearbox.vb index 70a4c0d266761e0eb7387b828cdc2c41324e72d5..b934593d01fd1230c40c4500098900893a4b2161 100644 --- a/VECTO/Input Files/Gearbox.vb +++ b/VECTO/Input Files/Gearbox.vb @@ -801,6 +801,7 @@ Public Class MockEngineeringVehicle Public Property Identifier As String Implements IVehicleDeclarationInputData.Identifier Public Property ExemptedVehicle As Boolean Implements IVehicleDeclarationInputData.ExemptedVehicle Public Property VIN As String Implements IVehicleDeclarationInputData.VIN + Public ReadOnly Property LegislativeCategory As String Implements IVehicleDeclarationInputData.LegislativeCategory Public Property LegislativeClass As LegislativeClass? Implements IVehicleDeclarationInputData.LegislativeClass Public Property VehicleCategory As VehicleCategory Implements IVehicleDeclarationInputData.VehicleCategory Public Property AxleConfiguration As AxleConfiguration Implements IVehicleDeclarationInputData.AxleConfiguration diff --git a/VECTO/Input Files/MockVehicleInputData.vb b/VECTO/Input Files/MockVehicleInputData.vb index ecc845ec7e8570eed5e94907110905f4fc1ab560..1f7a3f1295683574ba845fb9d97eb31516f93980 100644 --- a/VECTO/Input Files/MockVehicleInputData.vb +++ b/VECTO/Input Files/MockVehicleInputData.vb @@ -19,6 +19,7 @@ Public Class MockVehicleInputData Public Property Identifier As String Implements IVehicleDeclarationInputData.Identifier Public Property ExemptedVehicle As Boolean Implements IVehicleDeclarationInputData.ExemptedVehicle Public Property VIN As String Implements IVehicleDeclarationInputData.VIN + Public ReadOnly Property LegislativeCategory As String Implements IVehicleDeclarationInputData.LegislativeCategory Public Property LegislativeClass As LegislativeClass? Implements IVehicleDeclarationInputData.LegislativeClass Public Property VehicleCategory As VehicleCategory Implements IVehicleDeclarationInputData.VehicleCategory Public Property AxleConfiguration As AxleConfiguration Implements IVehicleDeclarationInputData.AxleConfiguration diff --git a/VECTO/Input Files/Vehicle.vb b/VECTO/Input Files/Vehicle.vb index bd5eeabb6cb5a3b0aa879a02e788ffbd684e7669..f50cc3639de2cb1631f90f69fd2faee5ec9b806f 100644 --- a/VECTO/Input Files/Vehicle.vb +++ b/VECTO/Input Files/Vehicle.vb @@ -362,6 +362,8 @@ Public Class Vehicle End Get End Property + Public ReadOnly Property LegislativeCategory As String Implements IVehicleDeclarationInputData.LegislativeCategory + Public ReadOnly Property LegislativeClass As LegislativeClass? Implements IVehicleEngineeringInputData.LegislativeClass Get Return legClass diff --git a/VectoCommon/VectoCommon/InputData/DeclarationInputData.cs b/VectoCommon/VectoCommon/InputData/DeclarationInputData.cs index 292639d551dda097addf4bc13b5868caa58f40ca..f62b7a4410011ea623d59d5ce9c57872b0c89e7a 100644 --- a/VectoCommon/VectoCommon/InputData/DeclarationInputData.cs +++ b/VectoCommon/VectoCommon/InputData/DeclarationInputData.cs @@ -99,6 +99,8 @@ namespace TUGraz.VectoCommon.InputData string VIN { get; } + string LegislativeCategory { get; } + LegislativeClass? LegislativeClass { get; } /// <summary> diff --git a/VectoCore/VectoCore/InputData/FileIO/JSON/JSONComponentInputData.cs b/VectoCore/VectoCore/InputData/FileIO/JSON/JSONComponentInputData.cs index 28afea7f4637c5cd670ccf623da9e067ba63ee27..67281ae54e352b798ed6fe36c023f2425eced4d0 100644 --- a/VectoCore/VectoCore/InputData/FileIO/JSON/JSONComponentInputData.cs +++ b/VectoCore/VectoCore/InputData/FileIO/JSON/JSONComponentInputData.cs @@ -223,6 +223,11 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON get { return VehicleData.VIN; } } + public string LegislativeCategory + { + get { return null; } + } + public LegislativeClass? LegislativeClass { get { return VehicleData.LegislativeClass; } diff --git a/VectoCore/VectoCore/InputData/FileIO/JSON/JSONVehicleData.cs b/VectoCore/VectoCore/InputData/FileIO/JSON/JSONVehicleData.cs index efe1a7b47f8f7e9a5676cf294620fa4d65bf3083..c7355a1d53373c4cb98bc6e74327beec5bf7f0f5 100644 --- a/VectoCore/VectoCore/InputData/FileIO/JSON/JSONVehicleData.cs +++ b/VectoCore/VectoCore/InputData/FileIO/JSON/JSONVehicleData.cs @@ -238,6 +238,11 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON get { return Constants.NOT_AVailABLE; } } + public string LegislativeCategory + { + get { return null; } + } + public virtual LegislativeClass? LegislativeClass { get { diff --git a/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/DataProvider/XMLDeclarationVehicleDataProvider.cs b/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/DataProvider/XMLDeclarationVehicleDataProvider.cs index c71f4ab540da3738e563c6ff5aa4c0896f54d394..4df6b512fe71799139b40236f426da938b975c85 100644 --- a/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/DataProvider/XMLDeclarationVehicleDataProvider.cs +++ b/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/DataProvider/XMLDeclarationVehicleDataProvider.cs @@ -120,6 +120,11 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider get { return GetString(XMLNames.Vehicle_VIN); } } + public virtual string LegislativeCategory + { + get { return null; } + } + public virtual LegislativeClass? LegislativeClass { get { return GetString(XMLNames.Vehicle_LegislativeClass).ParseEnum<LegislativeClass>(); } @@ -956,6 +961,11 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider get { return GetString(XMLNames.Vehicle_VIN); } } + public string LegislativeCategory + { + get { return GetString(XMLNames.Bus_LegislativeCategory); } + } + public VehicleCategory VehicleCategory { get { return VehicleCategoryHelper.Parse(GetString(XMLNames.Vehicle_VehicleCategory)); } diff --git a/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/Reader/Impl/XMLDeclarationMultistageInputReader.cs b/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/Reader/Impl/XMLDeclarationMultistageInputReader.cs index 097c8f28bc4426eba9610c0da90862e85a78a40c..c979d66bbd23cd2844f6217d979e83170e43f3c5 100644 --- a/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/Reader/Impl/XMLDeclarationMultistageInputReader.cs +++ b/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/Reader/Impl/XMLDeclarationMultistageInputReader.cs @@ -444,6 +444,11 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.Reader.Impl get { return _manufacturingStages.First().Vehicle.VIN; } } + public string LegislativeCategory + { + get { return null; } + } + public VehicleDeclarationType VehicleDeclarationType { get { return _manufacturingStages.First().Vehicle.VehicleDeclarationType; } diff --git a/VectoCore/VectoCore/InputData/FileIO/XML/Engineering/DataProvider/XMLEngineeringVehicleDataProvider.cs b/VectoCore/VectoCore/InputData/FileIO/XML/Engineering/DataProvider/XMLEngineeringVehicleDataProvider.cs index 76017cff2db4dc91fb6f90148caee516789fd7ff..fa6b7d5740c12641a9b127383764e429a3242932 100644 --- a/VectoCore/VectoCore/InputData/FileIO/XML/Engineering/DataProvider/XMLEngineeringVehicleDataProvider.cs +++ b/VectoCore/VectoCore/InputData/FileIO/XML/Engineering/DataProvider/XMLEngineeringVehicleDataProvider.cs @@ -76,6 +76,11 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Engineering.DataProvider get { return GetString(XMLNames.Vehicle_VIN); } } + public string LegislativeCategory + { + get { return null; } + } + public virtual LegislativeClass? LegislativeClass { get { return GetString(XMLNames.Vehicle_LegislativeClass).ParseEnum<LegislativeClass>(); } diff --git a/VectoCore/VectoCoreTest/Utils/MockDeclarationVehicleInputData.cs b/VectoCore/VectoCoreTest/Utils/MockDeclarationVehicleInputData.cs index 5ffc35e5e15c241c7227ebf0a55c72eb855f995c..5d9655268bed2d3670da72b2b4e60757abf86d07 100644 --- a/VectoCore/VectoCoreTest/Utils/MockDeclarationVehicleInputData.cs +++ b/VectoCore/VectoCoreTest/Utils/MockDeclarationVehicleInputData.cs @@ -28,6 +28,7 @@ namespace TUGraz.VectoCore.Tests.Utils { public string Identifier { get; } public bool ExemptedVehicle { get; } public string VIN { get; } + public string LegislativeCategory { get; } public LegislativeClass? LegislativeClass { get; } public VehicleCategory VehicleCategory { get; } public AxleConfiguration AxleConfiguration { get; } @@ -133,6 +134,7 @@ namespace TUGraz.VectoCore.Tests.Utils { public string Identifier { get; } public bool ExemptedVehicle { get; } public string VIN { get; } + public string LegislativeCategory { get; } public LegislativeClass? LegislativeClass { get; } public VehicleCategory VehicleCategory { get; } public AxleConfiguration AxleConfiguration { get; } diff --git a/VectoCore/VectoCoreTest/XML/XMLMultistageBusDataTest.cs b/VectoCore/VectoCoreTest/XML/XMLMultistageBusDataTest.cs index 195d6e7683ac2449fe3b4c72abe98664190cc469..563e08117233750b2ffab266e83e4edfe29f00a2 100644 --- a/VectoCore/VectoCoreTest/XML/XMLMultistageBusDataTest.cs +++ b/VectoCore/VectoCoreTest/XML/XMLMultistageBusDataTest.cs @@ -71,6 +71,7 @@ namespace TUGraz.VectoCore.Tests.XML Assert.AreEqual("Generic Model", vehicleData.Model); Assert.AreEqual("VEH-1234567890_nonSmart-ESS", vehicleData.VIN); Assert.AreEqual(DateTime.Parse("2017-02-15T11:00:00Z").ToUniversalTime(), vehicleData.Date); + Assert.AreEqual("M3", vehicleData.LegislativeCategory); Assert.AreEqual("Bus", vehicleData.VehicleCategory.ToXMLFormat()); Assert.AreEqual(AxleConfiguration.AxleConfig_8x2, vehicleData.AxleConfiguration); Assert.AreEqual(true, vehicleData.Articulated);