From 30031ea018a8ca88b797c37107ef49d866e8403a Mon Sep 17 00:00:00 2001 From: Markus Quaritsch <markus.quaritsch@tugraz.at> Date: Wed, 11 Aug 2021 16:41:40 +0200 Subject: [PATCH] renaming classes to match xml version namespace --- .../Vehicle/Components/AirDragViewModel.cs | 2 +- .../Implementation/CreateVifViewModel.cs | 2 +- .../InterimStageBusVehicleViewModel_v2_8.cs | 4 +- Vecto3GUI2020Test/Vecto3GUI2020Test.csproj | 20 +-- .../XMLDeclarationAirdragDataProvider.cs | 4 +- ...MLDeclarationBusAuxiliariesDataProvider.cs | 10 +- .../XMLDeclarationComponentsDataProvider.cs | 61 +-------- .../XMLDeclarationVehicleDataProvider.cs | 100 ++------------ ...XMLDeclarationInputDataV210InjectModule.cs | 70 ++++++++++ .../XMLDeclarationInputDataV26InjectModule.cs | 41 ++---- .../XMLDeclarationInputDataV28InjectModule.cs | 53 -------- .../XMLDeclarationReaderInjectModule.cs | 2 +- .../Reader/Impl/XMLComponentReader.cs | 128 ++++++------------ VectoCore/VectoCore/VectoCore.csproj | 2 +- 14 files changed, 162 insertions(+), 337 deletions(-) create mode 100644 VectoCore/VectoCore/InputData/FileIO/XML/Declaration/NinjectModules/XMLDeclarationInputDataV210InjectModule.cs delete mode 100644 VectoCore/VectoCore/InputData/FileIO/XML/Declaration/NinjectModules/XMLDeclarationInputDataV28InjectModule.cs diff --git a/VECTO3GUI2020/ViewModel/Implementation/JobEdit/Vehicle/Components/AirDragViewModel.cs b/VECTO3GUI2020/ViewModel/Implementation/JobEdit/Vehicle/Components/AirDragViewModel.cs index f4314ec98e..169d9af4d3 100644 --- a/VECTO3GUI2020/ViewModel/Implementation/JobEdit/Vehicle/Components/AirDragViewModel.cs +++ b/VECTO3GUI2020/ViewModel/Implementation/JobEdit/Vehicle/Components/AirDragViewModel.cs @@ -193,7 +193,7 @@ namespace VECTO3GUI2020.ViewModel.Implementation.JobEdit.Vehicle.Components public class AirDragViewModel_v2_8 : AirDragViewModel_v2_0 { - public new static readonly string VERSION = typeof(XMLDeclarationAirdragDataProviderV28).FullName; + public new static readonly string VERSION = typeof(XMLDeclarationAirdragDataProviderV210).FullName; public AirDragViewModel_v2_8(IXMLAirdragDeclarationInputData inputData, IComponentViewModelFactory vmFactory) : base(inputData, vmFactory) { diff --git a/VECTO3GUI2020/ViewModel/MultiStage/Implementation/CreateVifViewModel.cs b/VECTO3GUI2020/ViewModel/MultiStage/Implementation/CreateVifViewModel.cs index 35f6902108..13192660df 100644 --- a/VECTO3GUI2020/ViewModel/MultiStage/Implementation/CreateVifViewModel.cs +++ b/VECTO3GUI2020/ViewModel/MultiStage/Implementation/CreateVifViewModel.cs @@ -333,7 +333,7 @@ namespace VECTO3GUI2020.ViewModel.MultiStage.Implementation var inputData = _inputDataReader.Create(fileName) as IDeclarationInputDataProvider; vehicleInputData = inputData.JobInputData.Vehicle; var type = vehicleInputData.GetType(); - valid = (inputData != null) && (vehicleInputData is XMLDeclarationInterimStageBusDataProviderV28) || (vehicleInputData is XMLDeclarationExemptedInterimStageBusDataProviderV28); + valid = (inputData != null) && (vehicleInputData is XMLDeclarationCompletedBusDataProviderV210) || (vehicleInputData is XMLDeclarationExemptedCompletedBusDataProviderV210); } catch (Exception e) { diff --git a/VECTO3GUI2020/ViewModel/MultiStage/Implementation/InterimStageBusVehicleViewModel_v2_8.cs b/VECTO3GUI2020/ViewModel/MultiStage/Implementation/InterimStageBusVehicleViewModel_v2_8.cs index 6dab867e83..ffc6dc011d 100644 --- a/VECTO3GUI2020/ViewModel/MultiStage/Implementation/InterimStageBusVehicleViewModel_v2_8.cs +++ b/VECTO3GUI2020/ViewModel/MultiStage/Implementation/InterimStageBusVehicleViewModel_v2_8.cs @@ -84,8 +84,8 @@ namespace VECTO3GUI2020.ViewModel.MultiStage.Implementation public class InterimStageBusVehicleViewModel_v2_8 : ViewModelBase, IMultistageVehicleViewModel, IVehicleComponentsDeclaration, IAdvancedDriverAssistantSystemDeclarationInputData, IDataErrorInfo { - public static readonly Type INPUTPROVIDERTYPE = typeof(XMLDeclarationInterimStageBusDataProviderV28); - public static readonly Type INPUTPROVIDERTYPEEXEMPTED = typeof(XMLDeclarationExemptedInterimStageBusDataProviderV28); + public static readonly Type INPUTPROVIDERTYPE = typeof(XMLDeclarationCompletedBusDataProviderV210); + public static readonly Type INPUTPROVIDERTYPEEXEMPTED = typeof(XMLDeclarationExemptedCompletedBusDataProviderV210); public static string VERSION = INPUTPROVIDERTYPE.ToString(); public static string VERSION_EXEMPTED = INPUTPROVIDERTYPEEXEMPTED.ToString(); diff --git a/Vecto3GUI2020Test/Vecto3GUI2020Test.csproj b/Vecto3GUI2020Test/Vecto3GUI2020Test.csproj index f51a815c10..015c910809 100644 --- a/Vecto3GUI2020Test/Vecto3GUI2020Test.csproj +++ b/Vecto3GUI2020Test/Vecto3GUI2020Test.csproj @@ -7,34 +7,34 @@ </PropertyGroup> <ItemGroup> - <Content Include="..\VectoCore\VectoCoreTest\TestData\XML\XMLReaderDeclaration\SchemaVersion2.8\vecto_vehicle-exempted_input_full-sample.xml" Link="Testdata\vecto_vehicle-exempted_input_full-sample.xml"> + <Content Include="..\VectoCore\VectoCoreTest\TestData\XML\XMLReaderDeclaration\SchemaVersion2.10\vecto_vehicle-exempted_input_full-sample.xml" Link="Testdata\vecto_vehicle-exempted_input_full-sample.xml"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> - <Content Include="..\VectoCore\VectoCoreTest\TestData\XML\XMLReaderDeclaration\SchemaVersion2.8\vecto_vehicle-exempted_input_only_certain_entries01-sample.xml" Link="Testdata\vecto_vehicle-exempted_input_only_certain_entries01-sample.xml"> + <Content Include="..\VectoCore\VectoCoreTest\TestData\XML\XMLReaderDeclaration\SchemaVersion2.10\vecto_vehicle-exempted_input_only_certain_entries01-sample.xml" Link="Testdata\vecto_vehicle-exempted_input_only_certain_entries01-sample.xml"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> - <Content Include="..\VectoCore\VectoCoreTest\TestData\XML\XMLReaderDeclaration\SchemaVersion2.8\vecto_vehicle-exempted_input_only_certain_entries02-sample.xml" Link="Testdata\vecto_vehicle-exempted_input_only_certain_entries02-sample.xml"> + <Content Include="..\VectoCore\VectoCoreTest\TestData\XML\XMLReaderDeclaration\SchemaVersion2.10\vecto_vehicle-exempted_input_only_certain_entries02-sample.xml" Link="Testdata\vecto_vehicle-exempted_input_only_certain_entries02-sample.xml"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> - <Content Include="..\VectoCore\VectoCoreTest\TestData\XML\XMLReaderDeclaration\SchemaVersion2.8\vecto_vehicle-exempted_input_only_mandatory_entries.xml" Link="Testdata\vecto_vehicle-exempted_input_only_mandatory_entries.xml"> + <Content Include="..\VectoCore\VectoCoreTest\TestData\XML\XMLReaderDeclaration\SchemaVersion2.10\vecto_vehicle-exempted_input_only_mandatory_entries.xml" Link="Testdata\vecto_vehicle-exempted_input_only_mandatory_entries.xml"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> - <Content Include="..\VectoCore\VectoCoreTest\TestData\XML\XMLReaderDeclaration\SchemaVersion2.8\vecto_vehicle-stage_input_full-sample.xml" Link="Testdata\vecto_vehicle-stage_input_full-sample.xml"> + <Content Include="..\VectoCore\VectoCoreTest\TestData\XML\XMLReaderDeclaration\SchemaVersion2.10\vecto_vehicle-stage_input_full-sample.xml" Link="Testdata\vecto_vehicle-stage_input_full-sample.xml"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> - <Content Include="..\VectoCore\VectoCoreTest\TestData\XML\XMLReaderDeclaration\SchemaVersion2.8\vecto_vehicle-stage_input_only_certain_entries01-sample.xml" Link="Testdata\vecto_vehicle-stage_input_only_certain_entries01-sample.xml"> + <Content Include="..\VectoCore\VectoCoreTest\TestData\XML\XMLReaderDeclaration\SchemaVersion2.10\vecto_vehicle-stage_input_only_certain_entries01-sample.xml" Link="Testdata\vecto_vehicle-stage_input_only_certain_entries01-sample.xml"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> - <Content Include="..\VectoCore\VectoCoreTest\TestData\XML\XMLReaderDeclaration\SchemaVersion2.8\vecto_vehicle-stage_input_only_certain_entries02-sample.xml" Link="Testdata\vecto_vehicle-stage_input_only_certain_entries02-sample.xml"> + <Content Include="..\VectoCore\VectoCoreTest\TestData\XML\XMLReaderDeclaration\SchemaVersion2.10\vecto_vehicle-stage_input_only_certain_entries02-sample.xml" Link="Testdata\vecto_vehicle-stage_input_only_certain_entries02-sample.xml"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> - <Content Include="..\VectoCore\VectoCoreTest\TestData\XML\XMLReaderDeclaration\SchemaVersion2.8\vecto_vehicle-stage_input_only_component_nullable_entries.xml" Link="Testdata\vecto_vehicle-stage_input_only_component_nullable_entries.xml"> + <Content Include="..\VectoCore\VectoCoreTest\TestData\XML\XMLReaderDeclaration\SchemaVersion2.10\vecto_vehicle-stage_input_only_component_nullable_entries.xml" Link="Testdata\vecto_vehicle-stage_input_only_component_nullable_entries.xml"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> - <Content Include="..\VectoCore\VectoCoreTest\TestData\XML\XMLReaderDeclaration\SchemaVersion2.8\vecto_vehicle-stage_input_only_mandatory_entries.xml" Link="Testdata\vecto_vehicle-stage_input_only_mandatory_entries.xml"> + <Content Include="..\VectoCore\VectoCoreTest\TestData\XML\XMLReaderDeclaration\SchemaVersion2.10\vecto_vehicle-stage_input_only_mandatory_entries.xml" Link="Testdata\vecto_vehicle-stage_input_only_mandatory_entries.xml"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> - <Content Include="..\VectoCore\VectoCoreTest\TestData\XML\XMLReaderDeclaration\SchemaVersion2.8\vecto_vehicle-stage_input_only_mandatory_standard_value_airdrag.xml" Link="Testdata\vecto_vehicle-stage_input_only_mandatory_standard_value_airdrag.xml"> + <Content Include="..\VectoCore\VectoCoreTest\TestData\XML\XMLReaderDeclaration\SchemaVersion2.10\vecto_vehicle-stage_input_only_mandatory_standard_value_airdrag.xml" Link="Testdata\vecto_vehicle-stage_input_only_mandatory_standard_value_airdrag.xml"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\VectoCore\VectoCoreTest\TestData\XML\XMLReaderDeclaration\SchemaVersionMultistage.0.1\AidragComponent.xml" Link="Testdata\AidragComponent.xml"> diff --git a/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/DataProvider/XMLDeclarationAirdragDataProvider.cs b/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/DataProvider/XMLDeclarationAirdragDataProvider.cs index 5e6e761cc3..a9ace9b83d 100644 --- a/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/DataProvider/XMLDeclarationAirdragDataProvider.cs +++ b/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/DataProvider/XMLDeclarationAirdragDataProvider.cs @@ -106,7 +106,7 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider // --------------------------------------------------------------------------------------- - public class XMLDeclarationAirdragDataProviderV28 : XMLDeclarationAirdragDataProviderV10 + public class XMLDeclarationAirdragDataProviderV210 : XMLDeclarationAirdragDataProviderV10 { public new static readonly XNamespace NAMESPACE_URI = XMLDefinitions.DECLARATION_DEFINITIONS_NAMESPACE_URI_V210_JOBS; @@ -114,7 +114,7 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider public new static readonly string QUALIFIED_XSD_TYPE = XMLHelper.CombineNamespace(NAMESPACE_URI.NamespaceName, XSD_TYPE); - public XMLDeclarationAirdragDataProviderV28(IXMLDeclarationVehicleData vehicle, XmlNode componentNode, + public XMLDeclarationAirdragDataProviderV210(IXMLDeclarationVehicleData vehicle, XmlNode componentNode, string sourceFile) : base(vehicle, componentNode, sourceFile) { } protected override XNamespace SchemaNamespace => NAMESPACE_URI; diff --git a/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/DataProvider/XMLDeclarationBusAuxiliariesDataProvider.cs b/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/DataProvider/XMLDeclarationBusAuxiliariesDataProvider.cs index b722b79035..a2d1c3f627 100644 --- a/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/DataProvider/XMLDeclarationBusAuxiliariesDataProvider.cs +++ b/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/DataProvider/XMLDeclarationBusAuxiliariesDataProvider.cs @@ -15,7 +15,7 @@ using TUGraz.VectoCore.Utils; namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider { - public class XMLDeclarationPrimaryBusAuxiliariesDataProviderV26 : AbstractXMLType, IXMLBusAuxiliariesDeclarationData, + public class XMLDeclarationPrimaryBusAuxiliariesDataProviderV210 : AbstractXMLType, IXMLBusAuxiliariesDeclarationData, IElectricSupplyDeclarationData, IPneumaticConsumersDeclarationData, IPneumaticSupplyDeclarationData, IHVACBusAuxiliariesDeclarationData { @@ -26,7 +26,7 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider public static readonly string QUALIFIED_XSD_TYPE = XMLHelper.CombineNamespace(NAMESPACE_URI.NamespaceName, XSD_TYPE); - public XMLDeclarationPrimaryBusAuxiliariesDataProviderV26( + public XMLDeclarationPrimaryBusAuxiliariesDataProviderV210( IXMLDeclarationVehicleData vehicle, XmlNode componentNode, string sourceFile) : base(componentNode) { } #region Implementation of IBusAuxiliariesDeclarationData @@ -218,7 +218,7 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider #endregion } - public class XMLDeclarationPrimaryBusAuxiliariesDataProviderV01 : XMLDeclarationPrimaryBusAuxiliariesDataProviderV26 + public class XMLDeclarationPrimaryBusAuxiliariesDataProviderV01 : XMLDeclarationPrimaryBusAuxiliariesDataProviderV210 { public new static XNamespace NAMESPACE_URI = XMLDefinitions.DECLARATION_MULTISTAGE_BUS_VEHICLE_NAMESPACE_VO1; @@ -234,7 +234,7 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider } - public class XMLDeclarationCompleteBusAuxiliariesDataProviderV28 : XMLDeclarationPrimaryBusAuxiliariesDataProviderV26, IElectricConsumersDeclarationData + public class XMLDeclarationCompletedBusAuxiliariesDataProviderV210 : XMLDeclarationPrimaryBusAuxiliariesDataProviderV210, IElectricConsumersDeclarationData { public new static XNamespace NAMESPACE_URI = XMLDefinitions.DECLARATION_DEFINITIONS_NAMESPACE_URI_V210_JOBS; @@ -242,7 +242,7 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider public new static readonly string QUALIFIED_XSD_TYPE = XMLHelper.CombineNamespace(NAMESPACE_URI.NamespaceName, XSD_TYPE); - public XMLDeclarationCompleteBusAuxiliariesDataProviderV28(IXMLDeclarationVehicleData vehicle, + public XMLDeclarationCompletedBusAuxiliariesDataProviderV210(IXMLDeclarationVehicleData vehicle, XmlNode componentNode, string sourceFile) : base(vehicle, componentNode, sourceFile) {} diff --git a/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/DataProvider/XMLDeclarationComponentsDataProvider.cs b/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/DataProvider/XMLDeclarationComponentsDataProvider.cs index 552872645e..cc39642a2b 100644 --- a/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/DataProvider/XMLDeclarationComponentsDataProvider.cs +++ b/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/DataProvider/XMLDeclarationComponentsDataProvider.cs @@ -134,7 +134,7 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider // --------------------------------------------------------------------------------------- - public class XMLDeclarationPrimaryBusComponentsDataProviderV26 : XMLDeclarationComponentsDataProviderV10, IXMLVehicleComponentsDeclaration + public class XMLDeclarationPrimaryBusComponentsDataProviderV210 : XMLDeclarationComponentsDataProviderV10, IXMLVehicleComponentsDeclaration { public new static readonly XNamespace NAMESPACE_URI = XMLDefinitions.DECLARATION_DEFINITIONS_NAMESPACE_URI_V210_JOBS; @@ -144,7 +144,7 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider private IBusAuxiliariesDeclarationData _busAuxiliaries; - public XMLDeclarationPrimaryBusComponentsDataProviderV26( + public XMLDeclarationPrimaryBusComponentsDataProviderV210( IXMLDeclarationVehicleData vehicle, XmlNode componentNode, string sourceFile) : base( vehicle, componentNode, sourceFile) { } @@ -157,59 +157,6 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider protected override XNamespace SchemaNamespace => NAMESPACE_URI; } - // --------------------------------------------------------------------------------------- - - //public class XMLDeclarationComponentsDataProviderNoAxlegearV26 : XMLDeclarationComponentsDataProviderV10 - //{ - // public new static readonly XNamespace NAMESPACE_URI = XMLDefinitions.DECLARATION_DEFINITIONS_NAMESPACE_URI_V20; - - // public new const string XSD_TYPE = "VehicleComponentsNoAxlegearType"; - - // public new static readonly string QUALIFIED_XSD_TYPE = XMLHelper.CombineNamespace(NAMESPACE_URI.NamespaceName, XSD_TYPE); - - // public XMLDeclarationComponentsDataProviderNoAxlegearV26( - // IXMLDeclarationVehicleData vehicle, XmlNode componentNode, string sourceFile) : base( - // vehicle, componentNode, sourceFile) - // { } - - // #region Overrides of XMLDeclarationComponentsDataProviderV10 - - // public override IAxleGearInputData AxleGearInputData => null; - // //throw new NotSupportedException("No Axlegeardata available"); - - // #endregion - - // protected override XNamespace SchemaNamespace => NAMESPACE_URI; - //} - - // --------------------------------------------------------------------------------------- - - - //public class XMLDeclarationCompleteBusComponentsDataProviderV26 : XMLDeclarationComponentsDataProviderV10, IXMLVehicleComponentsDeclaration - //{ - // public new static readonly XNamespace NAMESPACE_URI = XMLDefinitions.DECLARATION_DEFINITIONS_NAMESPACE_URI_V210_JOBS; - - // public new const string XSD_TYPE = "Components_Conventional_CompletedBusType"; - - // public new static readonly string QUALIFIED_XSD_TYPE = XMLHelper.CombineNamespace(NAMESPACE_URI.NamespaceName, XSD_TYPE); - - // private IBusAuxiliariesDeclarationData _busAuxiliaries; - - // public XMLDeclarationCompleteBusComponentsDataProviderV26( - // IXMLDeclarationVehicleData vehicle, XmlNode componentNode, string sourceFile) : base( - // vehicle, componentNode, sourceFile) - // { } - - // IGearboxDeclarationInputData IVehicleComponentsDeclaration.GearboxInputData => null; - - // IAuxiliariesDeclarationInputData IVehicleComponentsDeclaration.AuxiliaryInputData => null; - - // public override IBusAuxiliariesDeclarationData BusAuxiliaries => _busAuxiliaries ?? (_busAuxiliaries = ComponentReader.BusAuxiliariesInputData); - - // protected override XNamespace SchemaNamespace => NAMESPACE_URI; - //} - - // --------------------------------------------------------------------------------------- @@ -250,7 +197,7 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider // --------------------------------------------------------------------------------------- - public class XMLDeclarationInterimStageBusComponentsDataProviderV28 : XMLDeclarationComponentsDataProviderV10, + public class XMLDeclarationCompletedBusComponentsDataProviderV210 : XMLDeclarationComponentsDataProviderV10, IXMLVehicleComponentsDeclaration { public new static readonly XNamespace NAMESPACE_URI = XMLDefinitions.DECLARATION_DEFINITIONS_NAMESPACE_URI_V210_JOBS; @@ -263,7 +210,7 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider private IBusAuxiliariesDeclarationData _busAuxiliaries; - public XMLDeclarationInterimStageBusComponentsDataProviderV28(IXMLDeclarationVehicleData vehicle, + public XMLDeclarationCompletedBusComponentsDataProviderV210(IXMLDeclarationVehicleData vehicle, XmlNode componentNode, string sourceFile) : base(vehicle, componentNode, sourceFile) { } diff --git a/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/DataProvider/XMLDeclarationVehicleDataProvider.cs b/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/DataProvider/XMLDeclarationVehicleDataProvider.cs index 2d4259c668..0e945ef85a 100644 --- a/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/DataProvider/XMLDeclarationVehicleDataProvider.cs +++ b/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/DataProvider/XMLDeclarationVehicleDataProvider.cs @@ -426,7 +426,7 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider // --------------------------------------------------------------------------------------- - public class XMLDeclarationPrimaryBusVehicleDataProviderV26 : XMLDeclarationVehicleDataProviderV20 + public class XMLDeclarationPrimaryBusVehicleDataProviderV210 : XMLDeclarationVehicleDataProviderV20 { public new static readonly XNamespace NAMESPACE_URI = XMLDefinitions.DECLARATION_DEFINITIONS_NAMESPACE_URI_V210_JOBS; @@ -435,7 +435,7 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider public new static readonly string QUALIFIED_XSD_TYPE = XMLHelper.CombineNamespace(NAMESPACE_URI.NamespaceName, XSD_TYPE); - public XMLDeclarationPrimaryBusVehicleDataProviderV26( + public XMLDeclarationPrimaryBusVehicleDataProviderV210( IXMLDeclarationJobInputData jobData, XmlNode xmlNode, string sourceFile) : base(jobData, xmlNode, sourceFile) { SourceType = DataSourceType.XMLEmbedded; @@ -480,7 +480,7 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider #endregion } - public class XMLDeclarationExemptedPrimaryBusDataProviderV26 : XMLDeclarationVehicleDataProviderV20 + public class XMLDeclarationExemptedPrimaryBusDataProviderV210 : XMLDeclarationVehicleDataProviderV20 { public new static readonly XNamespace NAMESPACE_URI = XMLDefinitions.DECLARATION_DEFINITIONS_NAMESPACE_URI_V210_JOBS; @@ -489,7 +489,7 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider public new static readonly string QUALIFIED_XSD_TYPE = XMLHelper.CombineNamespace(NAMESPACE_URI.NamespaceName, XSD_TYPE); - public XMLDeclarationExemptedPrimaryBusDataProviderV26( + public XMLDeclarationExemptedPrimaryBusDataProviderV210( IXMLDeclarationJobInputData jobData, XmlNode xmlNode, string sourceFile) : base(jobData, xmlNode, sourceFile) { SourceType = DataSourceType.XMLEmbedded; @@ -554,7 +554,7 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider public override IPTOTransmissionInputData PTOTransmissionInputData => null; } - public class XMLDeclarationMediumLorryVehicleDataProviderV26 : XMLDeclarationVehicleDataProviderV21 + public class XMLDeclarationMediumLorryVehicleDataProviderV210 : XMLDeclarationVehicleDataProviderV21 { public new static readonly XNamespace NAMESPACE_URI = XMLDefinitions.DECLARATION_DEFINITIONS_NAMESPACE_URI_V210_JOBS; @@ -563,7 +563,7 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider public new static readonly string QUALIFIED_XSD_TYPE = XMLHelper.CombineNamespace(NAMESPACE_URI.NamespaceName, XSD_TYPE); - public XMLDeclarationMediumLorryVehicleDataProviderV26( + public XMLDeclarationMediumLorryVehicleDataProviderV210( IXMLDeclarationJobInputData jobData, XmlNode xmlNode, string sourceFile) : base(jobData, xmlNode, sourceFile) { } #region Overrides of XMLDeclarationVehicleDataProviderV10 @@ -612,85 +612,7 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider public override double RetarderRatio => 0; } - //public class XMLDeclarationCompletedBusDataProviderV26 : XMLDeclarationVehicleDataProviderV20 - //{ - // public new static readonly XNamespace NAMESPACE_URI = XMLDefinitions.DECLARATION_DEFINITIONS_NAMESPACE_URI_V210_JOBS; - - // public new const string XSD_TYPE = "Vehicle_Conventional_CompletedBusDeclarationType"; - - // public new static readonly string QUALIFIED_XSD_TYPE = - // XMLHelper.CombineNamespace(NAMESPACE_URI.NamespaceName, XSD_TYPE); - - // public XMLDeclarationCompletedBusDataProviderV26( - // IXMLDeclarationJobInputData jobData, XmlNode xmlNode, string sourceFile) : base(jobData, xmlNode, sourceFile) - // { - // SourceType = DataSourceType.XMLEmbedded; - // } - - - // #region Overrides of XMLDeclarationVehicleDataProviderV10 - - // public override VehicleCategory VehicleCategory => VehicleCategory.HeavyBusCompletedVehicle; - - // public override RegistrationClass? RegisteredClass => RegistrationClassHelper.Parse(GetString(XMLNames.Vehicle_RegisteredClass)).First(); - - // public override VehicleCode? VehicleCode => GetString(XMLNames.Vehicle_VehicleCode).ParseEnum<VehicleCode>(); - - // //TechnicalPermissibleMaximumLadenMass - // public override Kilogram GrossVehicleMassRating => GetDouble(XMLNames.TPMLM).SI<Kilogram>(); - - // public override TankSystem? TankSystem => - // ElementExists(XMLNames.Vehicle_NgTankSystem) - // ? EnumHelper.ParseEnum<TankSystem>(GetString(XMLNames.Vehicle_NgTankSystem)) - // : (TankSystem?)null; - - // public override int? NumberPassengerSeatsLowerDeck - // { - // get { - // var node = GetNode(XMLNames.Bus_LowerDeck); - // return XmlConvert.ToInt32(node.InnerText); - // } - // } - - // public override int? NumberPassengerSeatsUpperDeck - // { - // get { - // var node = GetNode(XMLNames.Bus_UpperDeck); - // return XmlConvert.ToInt32(node.InnerText); - // } - // } - - // //HeightIntegratedBody - // public override Meter Height => GetDouble(XMLNames.Bus_HeighIntegratedBody).SI<Meter>(); - - // //VehicleLength - // public override Meter Length => GetDouble(XMLNames.Bus_VehicleLength).SI<Meter>(); - - // //VehicleWidth - // public override Meter Width => GetDouble(XMLNames.Bus_VehicleWidth).SI<Meter>(); - - // public override XmlElement PTONode => null; - - // #endregion - - - // public override bool? LowEntry => GetBool(XMLNames.Bus_LowEntry); - - // public override Meter EntranceHeight => GetDouble(XMLNames.Bus_EntranceHeight).SI<Meter>(); - - // public override ConsumerTechnology? DoorDriveTechnology => ConsumerTechnologyHelper.Parse(GetString(XMLNames.BusAux_PneumaticSystem_DoorDriveTechnology)); - - - // #region Overrides of AbstractXMLResource - - // protected override XNamespace SchemaNamespace => NAMESPACE_URI; - - // protected override DataSourceType SourceType { get; } - - // #endregion - //} - - + public class XMLDeclarationMultistagePrimaryVehicleBusDataProviderV01 : AbstractCommonComponentType, IXMLDeclarationVehicleData { @@ -882,7 +804,7 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider // --------------------------------------------------------------------------------------- - public class XMLDeclarationInterimStageBusDataProviderV28 : XMLDeclarationVehicleDataProviderV20 + public class XMLDeclarationCompletedBusDataProviderV210 : XMLDeclarationVehicleDataProviderV20 { public new static readonly XNamespace NAMESPACE_URI = XMLDefinitions.DECLARATION_DEFINITIONS_NAMESPACE_URI_V210_JOBS; public new const string XSD_TYPE = "Vehicle_Conventional_CompletedBusDeclarationType"; @@ -891,7 +813,7 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider private IAdvancedDriverAssistantSystemDeclarationInputData _adas; - public XMLDeclarationInterimStageBusDataProviderV28( + public XMLDeclarationCompletedBusDataProviderV210( IXMLDeclarationJobInputData jobData, XmlNode xmlNode, string sourceFile) : base(jobData, xmlNode, sourceFile) { } @@ -1081,14 +1003,14 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider // --------------------------------------------------------------------------------------- - public class XMLDeclarationExemptedInterimStageBusDataProviderV28 : XMLDeclarationVehicleDataProviderV20 + public class XMLDeclarationExemptedCompletedBusDataProviderV210 : XMLDeclarationVehicleDataProviderV20 { public new static readonly XNamespace NAMESPACE_URI = XMLDefinitions.DECLARATION_DEFINITIONS_NAMESPACE_URI_V210_JOBS; public new const string XSD_TYPE = "Vehicle_Exempted_CompletedBusType"; public new static readonly string QUALIFIED_XSD_TYPE = XMLHelper.CombineNamespace(NAMESPACE_URI.NamespaceName, XSD_TYPE); - public XMLDeclarationExemptedInterimStageBusDataProviderV28(IXMLDeclarationJobInputData jobData, + public XMLDeclarationExemptedCompletedBusDataProviderV210(IXMLDeclarationJobInputData jobData, XmlNode xmlNode, string sourceFile) : base(jobData, xmlNode, sourceFile) {} diff --git a/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/NinjectModules/XMLDeclarationInputDataV210InjectModule.cs b/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/NinjectModules/XMLDeclarationInputDataV210InjectModule.cs new file mode 100644 index 0000000000..da78646c74 --- /dev/null +++ b/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/NinjectModules/XMLDeclarationInputDataV210InjectModule.cs @@ -0,0 +1,70 @@ +using Ninject.Modules; +using TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider; +using TUGraz.VectoCore.InputData.FileIO.XML.Declaration.Interfaces; +using TUGraz.VectoCore.InputData.FileIO.XML.Declaration.Reader; +using TUGraz.VectoCore.InputData.FileIO.XML.Declaration.Reader.Impl; + +namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.NinjectModules +{ + public class XMLDeclarationInputDataV210InjectModule : NinjectModule + { + #region Overrides of NinjectModlue + + public override void Load() + { + Bind<IXMLDeclarationVehicleData>().To<XMLDeclarationCompletedBusDataProviderV210>() + .Named(XMLDeclarationCompletedBusDataProviderV210.QUALIFIED_XSD_TYPE); + + Bind<IXMLDeclarationVehicleData>().To<XMLDeclarationExemptedCompletedBusDataProviderV210>() + .Named(XMLDeclarationExemptedCompletedBusDataProviderV210.QUALIFIED_XSD_TYPE); + + Bind<IXMLVehicleComponentsDeclaration>().To<XMLDeclarationCompletedBusComponentsDataProviderV210>() + .Named(XMLDeclarationCompletedBusComponentsDataProviderV210.QUALIFIED_XSD_TYPE); + + Bind<IXMLComponentReader>().To<XMLComponentReaderV210_CompletedBus>().Named(XMLComponentReaderV210_CompletedBus.QUALIFIED_XSD_TYPE); + + Bind<IXMLBusAuxiliariesDeclarationData>().To<XMLDeclarationCompletedBusAuxiliariesDataProviderV210>() + .Named(XMLDeclarationCompletedBusAuxiliariesDataProviderV210.QUALIFIED_XSD_TYPE); + + Bind<IXMLAirdragDeclarationInputData>().To<XMLDeclarationAirdragDataProviderV210>().Named( + XMLDeclarationAirdragDataProviderV210.QUALIFIED_XSD_TYPE); + + + Bind<IXMLAdvancedDriverAssistantSystemDeclarationInputData>() + .To<XMLDeclarationADASDataProviderV210>().Named(XMLDeclarationADASDataProviderV210.QUALIFIED_XSD_TYPE); + + Bind<IXMLDeclarationVehicleData>().To<XMLDeclarationPrimaryBusVehicleDataProviderV210>() + .Named(XMLDeclarationPrimaryBusVehicleDataProviderV210.QUALIFIED_XSD_TYPE); + + Bind<IXMLDeclarationVehicleData>().To<XMLDeclarationExemptedPrimaryBusDataProviderV210>() + .Named(XMLDeclarationExemptedPrimaryBusDataProviderV210.QUALIFIED_XSD_TYPE); + + + Bind<IXMLVehicleComponentsDeclaration>().To<XMLDeclarationPrimaryBusComponentsDataProviderV210>() + .Named(XMLDeclarationPrimaryBusComponentsDataProviderV210.QUALIFIED_XSD_TYPE); + + Bind<IXMLBusAuxiliariesDeclarationData>().To<XMLDeclarationPrimaryBusAuxiliariesDataProviderV210>() + .Named(XMLDeclarationPrimaryBusAuxiliariesDataProviderV210.QUALIFIED_XSD_TYPE); + + Bind<IXMLDeclarationVehicleData>().To<XMLDeclarationMediumLorryVehicleDataProviderV210>() + .Named(XMLDeclarationMediumLorryVehicleDataProviderV210.QUALIFIED_XSD_TYPE); + + + Bind<IXMLComponentReader>().To<XMLComponentReaderV210_PrimaryBus>().Named(XMLComponentReaderV210_PrimaryBus.QUALIFIED_XSD_TYPE); + + Bind<IXMLADASReader>() + .To<XMLADASReaderV210>().Named(XMLADASReaderV210.QUALIFIED_XSD_TYPE_CONVENTIONAL); + Bind<IXMLADASReader>() + .To<XMLADASReaderV210>().Named(XMLADASReaderV210.QUALIFIED_XSD_TYPE_HEV); + Bind<IXMLADASReader>() + .To<XMLADASReaderV210>().Named(XMLADASReaderV210.QUALIFIED_XSD_TYPE_PEV); + Bind<IXMLADASReader>() + .To<XMLADASReaderV210>().Named(XMLADASReaderV210.QUALIFIED_XSD_TYPE_IEPC); + + } + + #endregion + + + } +} diff --git a/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/NinjectModules/XMLDeclarationInputDataV26InjectModule.cs b/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/NinjectModules/XMLDeclarationInputDataV26InjectModule.cs index 54b6949303..e86c8283e1 100644 --- a/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/NinjectModules/XMLDeclarationInputDataV26InjectModule.cs +++ b/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/NinjectModules/XMLDeclarationInputDataV26InjectModule.cs @@ -12,44 +12,25 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.NinjectModules { public override void Load() { - Bind<IXMLDeclarationVehicleData>().To<XMLDeclarationPrimaryBusVehicleDataProviderV26>() - .Named(XMLDeclarationPrimaryBusVehicleDataProviderV26.QUALIFIED_XSD_TYPE); + Bind<IXMLDeclarationVehicleData>().To<XMLDeclarationPrimaryBusVehicleDataProviderV210>() + .Named(XMLDeclarationPrimaryBusVehicleDataProviderV210.QUALIFIED_XSD_TYPE); - //Bind<IXMLDeclarationVehicleData>().To<XMLDeclarationCompletedBusDataProviderV26>() - // .Named(XMLDeclarationCompletedBusDataProviderV26.QUALIFIED_XSD_TYPE); + Bind<IXMLDeclarationVehicleData>().To<XMLDeclarationExemptedPrimaryBusDataProviderV210>() + .Named(XMLDeclarationExemptedPrimaryBusDataProviderV210.QUALIFIED_XSD_TYPE); - Bind<IXMLDeclarationVehicleData>().To<XMLDeclarationExemptedPrimaryBusDataProviderV26>() - .Named(XMLDeclarationExemptedPrimaryBusDataProviderV26.QUALIFIED_XSD_TYPE); + Bind<IXMLVehicleComponentsDeclaration>().To<XMLDeclarationPrimaryBusComponentsDataProviderV210>() + .Named(XMLDeclarationPrimaryBusComponentsDataProviderV210.QUALIFIED_XSD_TYPE); - Bind<IXMLVehicleComponentsDeclaration>().To<XMLDeclarationPrimaryBusComponentsDataProviderV26>() - .Named(XMLDeclarationPrimaryBusComponentsDataProviderV26.QUALIFIED_XSD_TYPE); + Bind<IXMLBusAuxiliariesDeclarationData>().To<XMLDeclarationPrimaryBusAuxiliariesDataProviderV210>() + .Named(XMLDeclarationPrimaryBusAuxiliariesDataProviderV210.QUALIFIED_XSD_TYPE); - Bind<IXMLBusAuxiliariesDeclarationData>().To<XMLDeclarationPrimaryBusAuxiliariesDataProviderV26>() - .Named(XMLDeclarationPrimaryBusAuxiliariesDataProviderV26.QUALIFIED_XSD_TYPE); - //Bind<IXMLVehicleComponentsDeclaration>().To<XMLDeclarationCompleteBusComponentsDataProviderV26>() - // .Named(XMLDeclarationCompleteBusComponentsDataProviderV26.QUALIFIED_XSD_TYPE); + Bind<IXMLDeclarationVehicleData>().To<XMLDeclarationMediumLorryVehicleDataProviderV210>() + .Named(XMLDeclarationMediumLorryVehicleDataProviderV210.QUALIFIED_XSD_TYPE); - Bind<IXMLDeclarationVehicleData>().To<XMLDeclarationMediumLorryVehicleDataProviderV26>() - .Named(XMLDeclarationMediumLorryVehicleDataProviderV26.QUALIFIED_XSD_TYPE); + Bind<IXMLComponentReader>().To<XMLComponentReaderV210_PrimaryBus>().Named(XMLComponentReaderV210_PrimaryBus.QUALIFIED_XSD_TYPE); - //Bind<IXMLVehicleComponentsDeclaration>().To<XMLDeclarationComponentsDataProviderNoAxlegearV26>() - // .Named(XMLComponentReaderNoAxlegearV26.QUALIFIED_XSD_TYPE); - - //Bind<IXMLGearboxDeclarationInputData>().To<XMLDeclarationGearboxDataProviderV26>() - // .Named(XMLDeclarationGearboxDataProviderV26.QUALIFIED_XSD_TYPE); - - //Bind<IXMLBusAuxiliariesDeclarationData>().To<XMLDeclarationCompleteBusAuxiliariesDataProviderV26>() - // .Named(XMLDeclarationCompleteBusAuxiliariesDataProviderV26.QUALIFIED_XSD_TYPE); - - Bind<IXMLComponentReader>().To<XMLComponentReaderV26>().Named(XMLComponentReaderV26.QUALIFIED_XSD_TYPE); - - Bind<IXMLComponentReader>().To<XMLComponentReaderV26>().Named(XMLComponentReaderV26.QUALIFIED_COMPLETE_XSD_TYPE); - - //Bind<IXMLComponentReader>().To<XMLComponentReaderNoAxlegearV26>().Named(XMLComponentReaderNoAxlegearV26.QUALIFIED_XSD_TYPE); - - //Bind<IXMLGearboxReader>().To<XMLGearboxReaderV26>().Named(XMLGearboxReaderV26.QUALIFIED_XSD_TYPE); } #endregion diff --git a/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/NinjectModules/XMLDeclarationInputDataV28InjectModule.cs b/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/NinjectModules/XMLDeclarationInputDataV28InjectModule.cs deleted file mode 100644 index 959b26f07a..0000000000 --- a/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/NinjectModules/XMLDeclarationInputDataV28InjectModule.cs +++ /dev/null @@ -1,53 +0,0 @@ -using Ninject.Modules; -using TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider; -using TUGraz.VectoCore.InputData.FileIO.XML.Declaration.Interfaces; -using TUGraz.VectoCore.InputData.FileIO.XML.Declaration.Reader; -using TUGraz.VectoCore.InputData.FileIO.XML.Declaration.Reader.Impl; - -namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.NinjectModules -{ - public class XMLDeclarationInputDataV28InjectModule : NinjectModule - { - #region Overrides of NinjectModlue - - public override void Load() - { - Bind<IXMLDeclarationVehicleData>().To<XMLDeclarationInterimStageBusDataProviderV28>() - .Named(XMLDeclarationInterimStageBusDataProviderV28.QUALIFIED_XSD_TYPE); - - Bind<IXMLDeclarationVehicleData>().To<XMLDeclarationExemptedInterimStageBusDataProviderV28>() - .Named(XMLDeclarationExemptedInterimStageBusDataProviderV28.QUALIFIED_XSD_TYPE); - - Bind<IXMLVehicleComponentsDeclaration>().To<XMLDeclarationInterimStageBusComponentsDataProviderV28>() - .Named(XMLDeclarationInterimStageBusComponentsDataProviderV28.QUALIFIED_XSD_TYPE); - - Bind<IXMLComponentReader>().To<XMLComponentReaderV28>().Named(XMLComponentReaderV28.QUALIFIED_XSD_TYPE); - - Bind<IXMLBusAuxiliariesDeclarationData>().To<XMLDeclarationCompleteBusAuxiliariesDataProviderV28>() - .Named(XMLDeclarationCompleteBusAuxiliariesDataProviderV28.QUALIFIED_XSD_TYPE); - - Bind<IXMLAirdragDeclarationInputData>().To<XMLDeclarationAirdragDataProviderV28>().Named( - XMLDeclarationAirdragDataProviderV28.QUALIFIED_XSD_TYPE); - - - Bind<IXMLAdvancedDriverAssistantSystemDeclarationInputData>() - .To<XMLDeclarationADASDataProviderV210>().Named(XMLDeclarationADASDataProviderV210.QUALIFIED_XSD_TYPE); - - - - Bind<IXMLADASReader>() - .To<XMLADASReaderV210>().Named(XMLADASReaderV210.QUALIFIED_XSD_TYPE_CONVENTIONAL); - Bind<IXMLADASReader>() - .To<XMLADASReaderV210>().Named(XMLADASReaderV210.QUALIFIED_XSD_TYPE_HEV); - Bind<IXMLADASReader>() - .To<XMLADASReaderV210>().Named(XMLADASReaderV210.QUALIFIED_XSD_TYPE_PEV); - Bind<IXMLADASReader>() - .To<XMLADASReaderV210>().Named(XMLADASReaderV210.QUALIFIED_XSD_TYPE_IEPC); - - } - - #endregion - - - } -} diff --git a/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/NinjectModules/XMLDeclarationReaderInjectModule.cs b/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/NinjectModules/XMLDeclarationReaderInjectModule.cs index 3d7f043aac..6c6efac427 100644 --- a/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/NinjectModules/XMLDeclarationReaderInjectModule.cs +++ b/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/NinjectModules/XMLDeclarationReaderInjectModule.cs @@ -52,7 +52,7 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration new XMLDeclarationInputDataV22InjectModule(), new XMLDeclarationInputDataV23InjectModule(), new XMLDeclarationInputDataV26InjectModule(), - new XMLDeclarationInputDataV28InjectModule(), + new XMLDeclarationInputDataV210InjectModule(), new XMLDeclarationInputDataMultistageV01InjectModule(), }); diff --git a/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/Reader/Impl/XMLComponentReader.cs b/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/Reader/Impl/XMLComponentReader.cs index 29bf01e6f4..1938c9dd58 100644 --- a/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/Reader/Impl/XMLComponentReader.cs +++ b/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/Reader/Impl/XMLComponentReader.cs @@ -327,21 +327,17 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.Reader.Impl // --------------------------------------------------------------------------------------- - public class XMLComponentReaderV26 : XMLComponentReaderV20 + public class XMLComponentReaderV210_PrimaryBus : XMLComponentReaderV20 { public new static readonly XNamespace NAMESPACE_URI = XMLDefinitions.DECLARATION_DEFINITIONS_NAMESPACE_URI_V210_JOBS; public new const string XSD_TYPE = "Components_Conventional_PrimaryBusType"; public new static readonly string QUALIFIED_XSD_TYPE = XMLHelper.CombineNamespace(NAMESPACE_URI.NamespaceName, XSD_TYPE); - public const string COMPLETE_XSD_TYPE = "Components_Conventional_CompletedBusType"; - public static readonly string QUALIFIED_COMPLETE_XSD_TYPE = XMLHelper.CombineNamespace(NAMESPACE_URI.NamespaceName, COMPLETE_XSD_TYPE); - - protected IBusAuxiliariesDeclarationData _busAuxInputData; - public XMLComponentReaderV26(IXMLDeclarationVehicleData vehicle, XmlNode componentsNode) : base( + public XMLComponentReaderV210_PrimaryBus(IXMLDeclarationVehicleData vehicle, XmlNode componentsNode) : base( vehicle, componentsNode) { } @@ -355,83 +351,7 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.Reader.Impl // --------------------------------------------------------------------------------------- - public class XMLMultistagePrimaryVehicleBusComponentReaderV01 : XMLComponentReaderV20 - { - public new static readonly XNamespace NAMESPACE_URI = XMLDefinitions.DECLARATION_MULTISTAGE_BUS_VEHICLE_NAMESPACE_VO1; - - public new const string XSD_TYPE = "VehicleComponentsPIFType"; - public new const string GEARBOX_READER_TYPE = "TransmissionDataPIFType"; - public new const string AXLES_READER_TYPE = "AxleWheelsDataPIFType"; - - public new static readonly string QUALIFIED_XSD_TYPE = XMLHelper.CombineNamespace(NAMESPACE_URI.NamespaceName, XSD_TYPE); - public new static readonly string GEARBOX_READER_QUALIFIED_XSD_TYPE = XMLHelper.CombineNamespace(NAMESPACE_URI, GEARBOX_READER_TYPE); - public new static readonly string AXLES_READER_QUALIFIED_XSD_TYPE = XMLHelper.CombineNamespace(NAMESPACE_URI, AXLES_READER_TYPE); - - protected IBusAuxiliariesDeclarationData _busAuxInputData; - - public XMLMultistagePrimaryVehicleBusComponentReaderV01(IXMLDeclarationVehicleData vehicle, XmlNode componentsNode) - : base(vehicle, componentsNode) { } - - public override IGearboxDeclarationInputData GearboxInputData => _gearboxInputData ?? (_gearboxInputData = CreateComponent(XMLNames.Component_Transmission, GearboxCreator)); - - public override IRetarderInputData RetarderInputData => null; - - public override IAirdragDeclarationInputData AirdragInputData => null; - - public override IAuxiliariesDeclarationInputData AuxiliaryData => null; - - public override IBusAuxiliariesDeclarationData BusAuxiliariesInputData => _busAuxInputData ?? (_busAuxInputData = CreateComponent(XMLNames.Component_Auxiliaries, BusAuxCreator)); - - protected virtual IBusAuxiliariesDeclarationData BusAuxCreator(string version, XmlNode componentNode, string sourceFile) - { - return Factory.CreateBusAuxiliaires(version, Vehicle, componentNode, sourceFile); - } - } - - - // --------------------------------------------------------------------------------------- - - //public class XMLComponentReaderNoAxlegearV26 : XMLComponentReaderV20 - //{ - // public new static readonly XNamespace NAMESPACE_URI = XMLDefinitions.DECLARATION_DEFINITIONS_NAMESPACE_URI_V26; - // public new const string XSD_TYPE = "VehicleComponentsNoAxlegearType"; - // public new static readonly string QUALIFIED_XSD_TYPE = XMLHelper.CombineNamespace(NAMESPACE_URI.NamespaceName, XSD_TYPE); - - // protected IBusAuxiliariesDeclarationData _busAuxInputData; - - - // public XMLComponentReaderNoAxlegearV26(IXMLDeclarationVehicleData vehicle, XmlNode componentsNode) : base( - // vehicle, componentsNode) - // { } - - // #region Overrides of XMLComponentReaderV10 - - // public override IAxleGearInputData AxleGearInputData => null; - - // #endregion - //} - - // --------------------------------------------------------------------------------------- - - //public class XMLGearboxReaderV26 : XMLComponentReaderV10 - //{ - // public new static readonly XNamespace NAMESPACE_URI = XMLDefinitions.DECLARATION_DEFINITIONS_NAMESPACE_URI_V26; - // public new const string XSD_TYPE = "GearboxDataDeclarationType"; - // public new static readonly string QUALIFIED_XSD_TYPE = XMLHelper.CombineNamespace(NAMESPACE_URI.NamespaceName, XSD_TYPE); - - // protected IBusAuxiliariesDeclarationData _busAuxInputData; - - - // public XMLGearboxReaderV26(IXMLDeclarationVehicleData vehicle, XmlNode componentsNode) : base( - // vehicle, componentsNode) - // { } - - - //} - - // --------------------------------------------------------------------------------------- - - public class XMLComponentReaderV28 : XMLComponentReaderV20 + public class XMLComponentReaderV210_CompletedBus : XMLComponentReaderV20 { public new static readonly XNamespace NAMESPACE_URI = XMLDefinitions.DECLARATION_DEFINITIONS_NAMESPACE_URI_V210_JOBS; @@ -443,10 +363,10 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.Reader.Impl protected IBusAuxiliariesDeclarationData _busAuxInputData; - public XMLComponentReaderV28(IXMLDeclarationVehicleData vehicle, XmlNode componentsNode) + public XMLComponentReaderV210_CompletedBus(IXMLDeclarationVehicleData vehicle, XmlNode componentsNode) : base(vehicle, componentsNode) { - + } public override IAngledriveInputData AngledriveInputData => null; @@ -479,4 +399,42 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.Reader.Impl } } + + // --------------------------------------------------------------------------------------- + + public class XMLMultistagePrimaryVehicleBusComponentReaderV01 : XMLComponentReaderV20 + { + public new static readonly XNamespace NAMESPACE_URI = XMLDefinitions.DECLARATION_MULTISTAGE_BUS_VEHICLE_NAMESPACE_VO1; + + public new const string XSD_TYPE = "VehicleComponentsPIFType"; + public new const string GEARBOX_READER_TYPE = "TransmissionDataPIFType"; + public new const string AXLES_READER_TYPE = "AxleWheelsDataPIFType"; + + public new static readonly string QUALIFIED_XSD_TYPE = XMLHelper.CombineNamespace(NAMESPACE_URI.NamespaceName, XSD_TYPE); + public new static readonly string GEARBOX_READER_QUALIFIED_XSD_TYPE = XMLHelper.CombineNamespace(NAMESPACE_URI, GEARBOX_READER_TYPE); + public new static readonly string AXLES_READER_QUALIFIED_XSD_TYPE = XMLHelper.CombineNamespace(NAMESPACE_URI, AXLES_READER_TYPE); + + protected IBusAuxiliariesDeclarationData _busAuxInputData; + + public XMLMultistagePrimaryVehicleBusComponentReaderV01(IXMLDeclarationVehicleData vehicle, XmlNode componentsNode) + : base(vehicle, componentsNode) { } + + public override IGearboxDeclarationInputData GearboxInputData => _gearboxInputData ?? (_gearboxInputData = CreateComponent(XMLNames.Component_Transmission, GearboxCreator)); + + public override IRetarderInputData RetarderInputData => null; + + public override IAirdragDeclarationInputData AirdragInputData => null; + + public override IAuxiliariesDeclarationInputData AuxiliaryData => null; + + public override IBusAuxiliariesDeclarationData BusAuxiliariesInputData => _busAuxInputData ?? (_busAuxInputData = CreateComponent(XMLNames.Component_Auxiliaries, BusAuxCreator)); + + protected virtual IBusAuxiliariesDeclarationData BusAuxCreator(string version, XmlNode componentNode, string sourceFile) + { + return Factory.CreateBusAuxiliaires(version, Vehicle, componentNode, sourceFile); + } + } + + + } diff --git a/VectoCore/VectoCore/VectoCore.csproj b/VectoCore/VectoCore/VectoCore.csproj index 5e4c9d359d..3040c6eb8b 100644 --- a/VectoCore/VectoCore/VectoCore.csproj +++ b/VectoCore/VectoCore/VectoCore.csproj @@ -195,7 +195,7 @@ <Compile Include="InputData\FileIO\XML\Declaration\NinjectModules\XMLDeclarationInputDataV22InjectModule.cs" /> <Compile Include="InputData\FileIO\XML\Declaration\NinjectModules\XMLDeclarationInputDataV23InjectModule.cs" /> <Compile Include="InputData\FileIO\XML\Declaration\NinjectModules\XMLDeclarationInputDataV26InjectModule.cs" /> - <Compile Include="InputData\FileIO\XML\Declaration\NinjectModules\XMLDeclarationInputDataV28InjectModule.cs" /> + <Compile Include="InputData\FileIO\XML\Declaration\NinjectModules\XMLDeclarationInputDataV210InjectModule.cs" /> <Compile Include="InputData\FileIO\XML\Declaration\Reader\Impl\AbstractComponentReader.cs" /> <Compile Include="InputData\FileIO\XML\Declaration\Reader\Impl\XMLADASReader.cs" /> <Compile Include="InputData\FileIO\XML\Declaration\Reader\Impl\XMLComponentReader.cs" /> -- GitLab