diff --git a/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/DataProvider/XMLDeclarationVehicleDataProvider.cs b/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/DataProvider/XMLDeclarationVehicleDataProvider.cs index e687c5a5fb113a88505c5187217b041ca5f977a0..52b2fbc13653201d33654e8ef55f264038b0beef 100644 --- a/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/DataProvider/XMLDeclarationVehicleDataProvider.cs +++ b/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/DataProvider/XMLDeclarationVehicleDataProvider.cs @@ -237,7 +237,7 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider public virtual ConsumerTechnology? DoorDriveTechnology => ConsumerTechnology.Unknown; public virtual VehicleDeclarationType VehicleDeclarationType { get; } - public string VehicleTypeApprovalNumber => throw new NotImplementedException(); + public virtual string VehicleTypeApprovalNumber { get; } public virtual IVehicleComponentsDeclaration Components => _components ?? (_components = ComponentReader.ComponentInputData); @@ -700,7 +700,7 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider public virtual VehicleDeclarationType VehicleDeclarationType { get; } - public string VehicleTypeApprovalNumber => throw new NotImplementedException(); + public virtual string VehicleTypeApprovalNumber { get; } public virtual IVehicleComponentsDeclaration Components => _components ?? (_components = ComponentReader.ComponentInputData); @@ -942,6 +942,12 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider public override VehicleDeclarationType VehicleDeclarationType => VehicleDeclarationTypeHelper.Parse(GetString(XMLNames.Bus_VehicleDeclarationType)); + #region Overrides of XMLDeclarationVehicleDataProviderV10 + + public override string VehicleTypeApprovalNumber => ElementExists(XMLNames.VehicleTypeApprovalNumber) ? GetString(XMLNames.VehicleTypeApprovalNumber) : null; + + #endregion + public override XmlElement ADASNode => _adasNode ?? (_adasNode = GetNode(XMLNames.Vehicle_ADAS, required: false) as XmlElement); 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 c47307e324bc31748bc76e9b309d98be527500c9..cbb854afe98302f7dfade7a0a961008405ac6cc4 100644 --- a/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/Reader/Impl/XMLDeclarationMultistageInputReader.cs +++ b/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/Reader/Impl/XMLDeclarationMultistageInputReader.cs @@ -499,7 +499,7 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.Reader.Impl public VehicleDeclarationType VehicleDeclarationType => _manufacturingStages.First().Vehicle.VehicleDeclarationType; - public string VehicleTypeApprovalNumber => throw new NotImplementedException(); + #endregion @@ -530,6 +530,7 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.Reader.Impl public VehicleCode? VehicleCode => GetVehiclePropertyValue<VehicleCode?>(nameof(VehicleCode)); + public string VehicleTypeApprovalNumber => GetVehiclePropertyValue<string>(nameof(VehicleTypeApprovalNumber)); public bool? LowEntry => GetVehiclePropertyValue<bool?>(nameof(LowEntry)); public Meter Height => GetVehiclePropertyValue<Meter>(nameof(Height)); @@ -719,6 +720,7 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.Reader.Impl & InputComplete(Width, nameof(Width)) & InputComplete(EntranceHeight, nameof(EntranceHeight)) & InputComplete(DoorDriveTechnology, nameof(DoorDriveTechnology)) + & InputComplete(VehicleTypeApprovalNumber, nameof(VehicleTypeApprovalNumber)) & (InputComplete(_consolidatedADAS, nameof(_consolidatedADAS)) && _consolidatedADAS.IsInputDataCompleteFullCheck(jobType)) & (InputComplete(_consolidatedComponents, nameof(_consolidatedComponents)) && _consolidatedComponents.IsInputDataCompleteFullCheck(jobType)); } @@ -740,6 +742,7 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.Reader.Impl && InputComplete(Length, nameof(Length)) && InputComplete(Width, nameof(Width)) && InputComplete(EntranceHeight, nameof(EntranceHeight)) && InputComplete(DoorDriveTechnology, nameof(DoorDriveTechnology)) + && InputComplete(VehicleTypeApprovalNumber, nameof(VehicleTypeApprovalNumber)) && InputComplete(_consolidatedADAS, nameof(_consolidatedADAS)) && _consolidatedADAS.IsInputDataComplete(jobType) && InputComplete(_consolidatedComponents, nameof(_consolidatedComponents)) && _consolidatedComponents.IsInputDataComplete(jobType); } diff --git a/VectoCore/VectoCore/OutputData/XML/DeclarationReports/VehicleInformationFile/XMLMultistageBusReport.cs b/VectoCore/VectoCore/OutputData/XML/DeclarationReports/VehicleInformationFile/XMLMultistageBusReport.cs index 3d9c55c2a426dd2bddeabbe7395cc159df053b41..d22797a06140df9bbde9c18a7fc583a891cdf421 100644 --- a/VectoCore/VectoCore/OutputData/XML/DeclarationReports/VehicleInformationFile/XMLMultistageBusReport.cs +++ b/VectoCore/VectoCore/OutputData/XML/DeclarationReports/VehicleInformationFile/XMLMultistageBusReport.cs @@ -262,18 +262,24 @@ namespace TUGraz.VectoCore.OutputData.XML.DeclarationReports.VehicleInformationF : null, CompletedBusPassengerCountWriter_V2_10_2.GetGroupElements(_vehicleInputData, v210), _vehicleInputData.VehicleCode != null - ? new XElement(v210 + XMLNames.Vehicle_BodyworkCode, _vehicleInputData.VehicleCode.ToXMLFormat()) - : null, - _vehicleInputData.LowEntry != null - ? new XElement(v210 + XMLNames.Bus_LowEntry, _vehicleInputData.LowEntry) - : null, + ? new XElement(v210 + XMLNames.Vehicle_BodyworkCode, _vehicleInputData.VehicleCode.ToXMLFormat()) + : null, + _vehicleInputData.LowEntry != null + ? new XElement(v210 + XMLNames.Bus_LowEntry, _vehicleInputData.LowEntry) + : null, CompletedBusDimensionsWriter_V2_10_2.GetGroupElements(_vehicleInputData, v210), _vehicleInputData.DoorDriveTechnology != null - ? new XElement(v210 + XMLNames.BusAux_PneumaticSystem_DoorDriveTechnology, _vehicleInputData.DoorDriveTechnology.ToXMLFormat()) + ? new XElement(v210 + XMLNames.BusAux_PneumaticSystem_DoorDriveTechnology, + _vehicleInputData.DoorDriveTechnology.ToXMLFormat()) + : null, + + new XElement(v210 + XMLNames.Bus_VehicleDeclarationType, + _vehicleInputData.VehicleDeclarationType.GetLabel()), + _vehicleInputData.VehicleTypeApprovalNumber != null + ? new XElement(v210 + XMLNames.VehicleTypeApprovalNumber, + _vehicleInputData.VehicleTypeApprovalNumber) : null, - - new XElement(v210 + XMLNames.Bus_VehicleDeclarationType, _vehicleInputData.VehicleDeclarationType.GetLabel()), GetADAS(_vehicleInputData.ADAS), GetBusVehicleComponents(_vehicleInputData.Components) );