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

Skip to content
Snippets Groups Projects
Commit 0be89142 authored by Franz KOBER josef's avatar Franz KOBER josef
Browse files

return null if component was not read

parent d772b583
No related branches found
No related tags found
No related merge requests found
Showing
with 25 additions and 2 deletions
......@@ -17,6 +17,10 @@ namespace TUGraz.VectoCore.OutputData.XML.DeclarationReports.VehicleInformationF
public XElement GetElement(IDeclarationInputDataProvider inputData)
{
var adas = inputData.JobInputData.Vehicle.ADAS;
if (adas == null)
return null;
return new XElement(_vif + XMLNames.Vehicle_ADAS,
new XElement(_vif + XMLNames.Vehicle_ADAS_EngineStopStart, adas.EngineStopStart),
new XElement(_vif + XMLNames.Vehicle_ADAS_EcoRollWithoutEngineStop, adas.EcoRoll == EcoRollType.WithoutEngineStop),
......
......@@ -17,6 +17,8 @@ namespace TUGraz.VectoCore.OutputData.XML.DeclarationReports.VehicleInformationF
public XElement GetElement(IDeclarationInputDataProvider inputData)
{
var angelDrive = inputData.JobInputData.Vehicle.Components.AngledriveInputData;
if (angelDrive == null)
return null;
return new XElement(_vif + XMLNames.Component_Angledrive,
new XElement(_vif + XMLNames.ComponentDataWrapper,
......
......@@ -21,6 +21,8 @@ namespace TUGraz.VectoCore.OutputData.XML.DeclarationReports.VehicleInformationF
public XElement GetElement(IDeclarationInputDataProvider inputData)
{
var aux = inputData.JobInputData.Vehicle.Components.BusAuxiliaries;
if (aux != null)
return null;
return new XElement(_vif + XMLNames.Component_Auxiliaries,
new XElement(_vif + XMLNames.ComponentDataWrapper,
......
......@@ -16,6 +16,9 @@ namespace TUGraz.VectoCore.OutputData.XML.DeclarationReports.VehicleInformationF
public XElement GetElement(IDeclarationInputDataProvider inputData)
{
var axleWheels = inputData.JobInputData.Vehicle.Components.AxleWheels;
if (axleWheels != null)
return null;
return new XElement(_vif + XMLNames.Component_AxleWheels,
new XElement(_vif + XMLNames.ComponentDataWrapper,
new XAttribute(_xsi + "type", "v2.0:AxleDataDeclarationType"),
......
......@@ -17,7 +17,9 @@ namespace TUGraz.VectoCore.OutputData.XML.DeclarationReports.VehicleInformationF
public XElement GetElement(IDeclarationInputDataProvider inputData)
{
var axleGear = inputData.JobInputData.Vehicle.Components.AxleGearInputData;
if (axleGear == null)
return null;
return new XElement(_vif + XMLNames.Component_Axlegear,
new XElement(_vif + XMLNames.ComponentDataWrapper,
new XAttribute(_xsi + "type", "vif:AxlegearDataVIFType"),
......
......@@ -19,7 +19,9 @@ namespace TUGraz.VectoCore.OutputData.XML.DeclarationReports.VehicleInformationF
public XElement GetElement(IDeclarationInputDataProvider inputData)
{
var electricStorages = inputData.JobInputData.Vehicle.Components.ElectricStorage.ElectricStorageElements;
if (electricStorages == null)
return null;
var result = new List<XElement>();
foreach (var entry in electricStorages) {
......
......@@ -21,6 +21,8 @@ namespace TUGraz.VectoCore.OutputData.XML.DeclarationReports.VehicleInformationF
public XElement GetElement(IDeclarationInputDataProvider inputData)
{
var engine = inputData.JobInputData.Vehicle.Components.EngineInputData;
if (engine == null)
return null;
return new XElement(_vif + XMLNames.Component_Engine,
new XElement(_vif + XMLNames.ComponentDataWrapper,
......
......@@ -19,6 +19,8 @@ namespace TUGraz.VectoCore.OutputData.XML.DeclarationReports.VehicleInformationF
public XElement GetElement(IDeclarationInputDataProvider inputData)
{
var iepc = inputData.JobInputData.Vehicle.Components.IEPC;
if (iepc == null)
return null;
return new XElement(_vif + XMLNames.Component_IEPC,
new XElement(_vif + XMLNames.ComponentDataWrapper,
......
......@@ -20,6 +20,8 @@ namespace TUGraz.VectoCore.OutputData.XML.DeclarationReports.VehicleInformationF
public XElement GetElement(IDeclarationInputDataProvider inputData)
{
var torque = inputData.JobInputData.Vehicle.Components.TorqueConverterInputData;
if (torque == null)
return null;
return new XElement(_vif + XMLNames.Component_TorqueConverter,
new XElement(_vif + XMLNames.ComponentDataWrapper,
......
......@@ -23,6 +23,8 @@ namespace TUGraz.VectoCore.OutputData.XML.DeclarationReports.VehicleInformationF
public XElement GetElement(IDeclarationInputDataProvider inputData)
{
var transmission = inputData.JobInputData.Vehicle.Components.GearboxInputData;
if (transmission == null)
return null;
return new XElement(_vif + XMLNames.Component_Transmission,
new XElement(_vif + XMLNames.ComponentDataWrapper,
......
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