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

Skip to content
Snippets Groups Projects
Commit 217c43ba authored by Markus Quaritsch's avatar Markus Quaritsch
Browse files

Merge pull request #415 in VECTO/vecto-sim from...

Merge pull request #415 in VECTO/vecto-sim from ~EMQUARIMA/vecto-sim:feature/VECTO-500-implement-xml-output to develop

* commit '7eea88d0':
  adapt formatting of FC output in xml reports
  implement customer report, generate report only once
  cleanup coc xsd
  update COC XSD
  make testcases work
  implementing XML Report generation. fetching all required input data, make airdragdata a separate component
  removing PDF report
  adding schema proposal for xml output
parents aa9ad7ed 7eea88d0
No related branches found
No related tags found
No related merge requests found
Showing
with 1062 additions and 51 deletions
......@@ -46,12 +46,12 @@ Imports TUGraz.VectoCommon.Exceptions
Imports TUGraz.VectoCommon.InputData
Imports TUGraz.VectoCommon.Models
Imports TUGraz.VectoCommon.OutputData
Imports TUGraz.VectoCommon.Resources
Imports TUGraz.VectoCommon.Utils
Imports TUGraz.VectoCore.InputData.FileIO.XML.Declaration
Imports TUGraz.VectoCore.InputData.FileIO.XML.Engineering
Imports TUGraz.VectoCore.OutputData
Imports TUGraz.VectoCore.OutputData.FileIO
Imports TUGraz.VectoCore.Resources
Imports TUGraz.VectoCore.Utils
Imports VectoAuxiliaries
......@@ -1101,10 +1101,10 @@ lbFound:
Next
For Each job As String In JobFileList
Dim report As String = New FileOutputWriter(job).PDFReportName
Dim report As String = New FileOutputWriter(job).XMLFullReportName
If File.Exists(report) Then
sender.ReportProgress(100, New VectoProgress With {.Target = "ListBox",
.Message = String.Format("PDF-Report for '{0}' written to {1}", Path.GetFileName(job), report),
.Message = String.Format("XML-Report for '{0}' written to {1}", Path.GetFileName(job), report),
.Link = "<RUN>" + report})
End If
Next
......
......@@ -308,21 +308,21 @@ Public Class Engine
End Get
End Property
Public ReadOnly Property CertificationNumber As String Implements IComponentInputData.CertificationNumber
Public ReadOnly Property CertificationMethod As CertificationMethod Implements IComponentInputData.CertificationMethod
Get
Return "N.A."
Return CertificationMethod.NotCertified
End Get
End Property
Public ReadOnly Property DigestValue As String Implements IComponentInputData.DigestValue
Public ReadOnly Property CertificationNumber As String Implements IComponentInputData.CertificationNumber
Get
Return ""
Return "N.A."
End Get
End Property
Public ReadOnly Property IntegrityStatus As IntegrityStatus Implements IComponentInputData.IntegrityStatus
Public ReadOnly Property DigestValue As String Implements IComponentInputData.DigestValue
Get
Return IntegrityStatus.NotChecked
Return ""
End Get
End Property
......
......@@ -314,21 +314,21 @@ Public Class Gearbox
End Get
End Property
Public ReadOnly Property CertificationNumber As String Implements IComponentInputData.CertificationNumber
Public ReadOnly Property CertificationMethod As CertificationMethod Implements IComponentInputData.CertificationMethod
Get
Return "N.A."
Return CertificationMethod.NotCertified
End Get
End Property
Public ReadOnly Property DigestValue As String Implements IComponentInputData.DigestValue
Public ReadOnly Property CertificationNumber As String Implements IComponentInputData.CertificationNumber
Get
Return ""
Return "N.A."
End Get
End Property
Public ReadOnly Property IntegrityStatus As IntegrityStatus Implements IComponentInputData.IntegrityStatus
Public ReadOnly Property DigestValue As String Implements IComponentInputData.DigestValue
Get
Return IntegrityStatus.NotChecked
Return ""
End Get
End Property
......@@ -523,5 +523,11 @@ Public Class Gearbox
Return GearLossMap(0, True).ToDouble(0)
End Get
End Property
Public ReadOnly Property LineType As AxleLineType Implements IAxleGearInputData.LineType
Get
Return AxleLineType.SinglePortalAxle
End Get
End Property
End Class
......@@ -17,6 +17,7 @@ Imports System.IO
Imports System.Linq
Imports System.Runtime.Remoting.Messaging
Imports System.Text
Imports System.Xml.Linq
Imports Newtonsoft.Json.Linq
Imports TUGraz.VECTO.Input_Files
Imports TUGraz.VectoCommon.Exceptions
......@@ -593,6 +594,12 @@ Public Class VectoJob
End Get
End Property
Public ReadOnly Property XMLHash As XElement Implements IDeclarationInputDataProvider.XMLHash
Get
Return Nothing
End Get
End Property
Public ReadOnly Property SavedInDeclarationMode As Boolean Implements IDeclarationJobInputData.SavedInDeclarationMode
Get
......
......@@ -93,6 +93,7 @@ Public Class Vehicle
Public Shared Function ValidateVehicle(vehicle As Vehicle, validationContext As ValidationContext) As ValidationResult
Dim vehicleData As VehicleData
Dim airdragData As AirdragData
Dim retarderData As RetarderData
Dim ptoData As PTOData = Nothing
Dim angledriveData As AngledriveData
......@@ -109,14 +110,16 @@ Public Class Vehicle
Dim doa As DeclarationDataAdapter = New DeclarationDataAdapter()
Dim segment As Segment = DeclarationData.Segments.Lookup(vehicle.VehicleCategory, vehicle.AxleConfiguration,
vehicle.GrossVehicleMassRating, vehicle.CurbMassChassis)
vehicleData = doa.CreateVehicleData(vehicle, vehicle, segment.Missions.First(),
segment.Missions.First().Loadings.First().Value, segment.VehicleHeight, segment.MunicipalBodyWeight)
vehicleData = doa.CreateVehicleData(vehicle, segment.Missions.First(),
segment.Missions.First().Loadings.First().Value, segment.MunicipalBodyWeight)
airdragData = doa.CreateAirdragData(vehicle, segment.Missions.First(), segment)
retarderData = doa.CreateRetarderData(vehicle)
angledriveData = doa.CreateAngledriveData(vehicle, False)
ptoData = doa.CreatePTOTransmissionData(vehicle)
Else
Dim doa As EngineeringDataAdapter = New EngineeringDataAdapter()
vehicleData = doa.CreateVehicleData(vehicle, vehicle)
vehicleData = doa.CreateVehicleData(vehicle)
airdragData = doa.CreateAirdragData(vehicle, vehicle)
retarderData = doa.CreateRetarderData(vehicle)
angledriveData = doa.CreateAngledriveData(vehicle, True)
ptoData = doa.CreatePTOTransmissionData(vehicle)
......@@ -130,6 +133,14 @@ Public Class Vehicle
result.Select(Function(r) r.ErrorMessage + String.Join(Environment.NewLine, r.MemberNames)).ToList())
End If
result = airdragData.Validate(If(Cfg.DeclMode, ExecutionMode.Declaration, ExecutionMode.Engineering), gbxType,
emsCycle)
If result.Any() Then
Return _
New ValidationResult("Airdrag Configuration is invalid. ",
result.Select(Function(r) r.ErrorMessage + String.Join(Environment.NewLine, r.MemberNames)).ToList())
End If
result = retarderData.Validate(If(Cfg.DeclMode, ExecutionMode.Declaration, ExecutionMode.Engineering), gbxType,
emsCycle)
If result.Any() Then
......@@ -285,21 +296,21 @@ Public Class Vehicle
End Get
End Property
Public ReadOnly Property CertificationNumber As String Implements IComponentInputData.CertificationNumber
Public ReadOnly Property CertificationMethod As CertificationMethod Implements IComponentInputData.CertificationMethod
Get
Return "N.A." 'ToDo
Return CertificationMethod.NotCertified
End Get
End Property
Public ReadOnly Property DigestValue As String Implements IComponentInputData.DigestValue
Public ReadOnly Property CertificationNumber As String Implements IComponentInputData.CertificationNumber
Get
Return ""
Return "N.A." 'ToDo
End Get
End Property
Public ReadOnly Property IntegrityStatus As IntegrityStatus Implements IComponentInputData.IntegrityStatus
Public ReadOnly Property DigestValue As String Implements IComponentInputData.DigestValue
Get
Return IntegrityStatus.NotChecked
Return ""
End Get
End Property
......@@ -317,6 +328,18 @@ Public Class Vehicle
End Get
End Property
Public ReadOnly Property VIN As String Implements IVehicleDeclarationInputData.VIN
Get
Return "N.A."
End Get
End Property
Public ReadOnly Property LegislativeClass As String Implements IVehicleDeclarationInputData.LegislativeClass
Get
Return "N3"
End Get
End Property
Public ReadOnly Property CurbMassChassis As Kilogram Implements IVehicleDeclarationInputData.CurbMassChassis
Get
Return Mass.SI(Of Kilogram)()
......@@ -337,6 +360,12 @@ Public Class Vehicle
End Get
End Property
Public ReadOnly Property ManufacturerAddress As String Implements IVehicleDeclarationInputData.ManufacturerAddress
Get
Return "N.A."
End Get
End Property
Public ReadOnly Property AirDragArea As SquareMeter Implements IAirdragEngineeringInputData.AirDragArea
Get
Return CdA0.SI(Of SquareMeter)()
......
......@@ -131,10 +131,6 @@
<OptionStrict>On</OptionStrict>
</PropertyGroup>
<ItemGroup>
<Reference Include="itextsharp, Version=5.5.9.0, Culture=neutral, PublicKeyToken=8354ae6d2174ddca, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\iTextSharp.5.5.9\lib\itextsharp.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Build.Framework" />
<Reference Include="Microsoft.WindowsAPICodePack, Version=1.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
......
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="iTextSharp" version="5.5.9" targetFramework="net45" />
<package id="Microsoft.WindowsAPICodePack.Core" version="1.1.0" targetFramework="net45" />
<package id="Microsoft.WindowsAPICodePack.Shell" version="1.1.0" targetFramework="net45" />
<package id="Newtonsoft.Json" version="8.0.3" targetFramework="net45" />
......
......@@ -60,15 +60,19 @@ namespace TUGraz.VectoCommon.InputData
string TechnicalReportId { get; }
CertificationMethod CertificationMethod { get; }
string CertificationNumber { get; }
string DigestValue { get; }
IntegrityStatus IntegrityStatus { get; }
}
public interface IVehicleDeclarationInputData : IComponentInputData
{
string VIN { get; }
string LegislativeClass { get; }
/// <summary>
/// P036
/// cf. VECTO Input Parameters.xlsx
......@@ -107,6 +111,8 @@ namespace TUGraz.VectoCommon.InputData
/// cf. VECTO Input Parameters.xlsx
/// </summary>
IList<IAxleDeclarationInputData> Axles { get; }
string ManufacturerAddress { get; }
}
public interface IAirdragDeclarationInputData : IComponentInputData
......@@ -278,6 +284,8 @@ namespace TUGraz.VectoCommon.InputData
/// cf. VECTO Input Parameters.xlsx
/// </summary>
double Efficiency { get; }
AxleLineType LineType { get; }
}
public interface ITorqueConverterDeclarationInputData : IComponentInputData
......
......@@ -29,6 +29,8 @@
* Martin Rexeis, rexeis@ivt.tugraz.at, IVT, Graz University of Technology
*/
using System.Xml.Linq;
namespace TUGraz.VectoCommon.InputData
{
public interface IInputDataProvider {}
......@@ -58,6 +60,8 @@ namespace TUGraz.VectoCommon.InputData
IDriverDeclarationInputData DriverInputData { get; }
IPTOTransmissionInputData PTOTransmissionInputData { get; }
XElement XMLHash { get; }
}
public interface IEngineeringInputDataProvider : IInputDataProvider
......
using System;
namespace TUGraz.VectoCommon.Models
{
public enum AxleLineType
{
SingleReductionAxle,
SinglePortalAxle,
HubReductionAxle,
SingleReductionTandemAxle,
HubReductionTandemAxle
}
public static class AxleLineTypeHelper
{
public static string ToXMLFormat(this AxleLineType type)
{
switch (type) {
case AxleLineType.SingleReductionAxle:
return "Single reduction axle";
case AxleLineType.SinglePortalAxle:
return "Single portal axle";
case AxleLineType.HubReductionAxle:
return "Hub reduction axle";
case AxleLineType.SingleReductionTandemAxle:
return "Single reduction tandem axle";
case AxleLineType.HubReductionTandemAxle:
return "Hub reduction tandem axle";
default:
throw new ArgumentOutOfRangeException("AxleLineType", type, null);
}
}
}
}
\ No newline at end of file
using System;
namespace TUGraz.VectoCommon.Models
{
public enum CertificationMethod
{
StandardValues,
Measured,
NotCertified
}
public static class CertificationMethodHelper
{
public static string ToXMLFormat(this CertificationMethod method)
{
switch (method) {
case CertificationMethod.StandardValues:
return "Standard values";
case CertificationMethod.Measured:
return "Measured";
case CertificationMethod.NotCertified:
return "NOT CERTIFIED";
default:
throw new ArgumentOutOfRangeException("CertificationMethod", method, null);
}
}
}
}
\ No newline at end of file
......@@ -98,5 +98,21 @@ namespace TUGraz.VectoCommon.Models
throw new ArgumentOutOfRangeException("CrosswindCorrectionMode", mode, null);
}
}
public static string ToXMLFormat(this CrossWindCorrectionMode mode)
{
switch (mode) {
case CrossWindCorrectionMode.NoCorrection:
return "No Correction";
case CrossWindCorrectionMode.SpeedDependentCorrectionFactor:
return "Speed Dependent Correction Factor";
case CrossWindCorrectionMode.VAirBetaLookupTable:
return "VAir Beta Lookup Table";
case CrossWindCorrectionMode.DeclarationModeCorrection:
return "Declaration Mode Correction";
default:
throw new ArgumentOutOfRangeException("CrosswindCorrection", mode, null);
}
}
}
}
\ No newline at end of file
......@@ -87,6 +87,24 @@ namespace TUGraz.VectoCommon.Models
}
}
public static string ToXMLFormat(this RetarderType type)
{
switch (type) {
case RetarderType.None:
return "None";
case RetarderType.TransmissionInputRetarder:
return "Transmission Input Retarder";
case RetarderType.TransmissionOutputRetarder:
return "Transmission Output Retarder";
case RetarderType.EngineRetarder:
return "Engine Retarder";
case RetarderType.LossesIncludedInTransmission:
return "Losses included in Gearbox";
default:
throw new ArgumentOutOfRangeException("RetarderType", type, null);
}
}
public static bool IsDedicatedComponent(this RetarderType retarder)
{
return retarder == RetarderType.TransmissionInputRetarder || retarder == RetarderType.TransmissionOutputRetarder;
......
......@@ -29,6 +29,8 @@
* Martin Rexeis, rexeis@ivt.tugraz.at, IVT, Graz University of Technology
*/
using System;
namespace TUGraz.VectoCommon.Models
{
public enum VehicleCategory
......@@ -77,5 +79,22 @@ namespace TUGraz.VectoCommon.Models
return category.ToString();
}
}
public static string ToXMLFormat(this VehicleCategory vehicleCategory)
{
switch (vehicleCategory) {
case VehicleCategory.Coach:
case VehicleCategory.Tractor:
return vehicleCategory.ToString();
case VehicleCategory.CityBus:
return "City Bus";
case VehicleCategory.InterurbanBus:
return "Interurban Bus";
case VehicleCategory.RigidTruck:
return "Rigid Truck";
default:
throw new ArgumentOutOfRangeException("vehicleCategory", vehicleCategory, null);
}
}
}
}
\ No newline at end of file
......@@ -8,7 +8,7 @@
// </auto-generated>
//------------------------------------------------------------------------------
namespace TUGraz.VectoCore.Resources {
namespace TUGraz.VectoCommon.Resources {
using System;
......@@ -39,7 +39,7 @@ namespace TUGraz.VectoCore.Resources {
public static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("TUGraz.VectoCore.Resources.XMLNames", typeof(XMLNames).Assembly);
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("TUGraz.VectoCommon.Resources.XMLNames", typeof(XMLNames).Assembly);
resourceMan = temp;
}
return resourceMan;
......@@ -222,6 +222,15 @@ namespace TUGraz.VectoCore.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to LineType.
/// </summary>
public static string Axlegear_LineType {
get {
return ResourceManager.GetString("Axlegear_LineType", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Ratio.
/// </summary>
......
This diff is collapsed.
......@@ -268,6 +268,20 @@ namespace TUGraz.VectoCommon.Utils
decimals = decimals ?? 2;
return self.ToString("F" + decimals.Value);
}
//[DebuggerStepThrough]
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static string ToMinSignificantDigits(this double self, uint? significant = null, uint? decimals = null)
{
significant = significant ?? 3;
decimals = decimals ?? 1;
var scale = Math.Ceiling(Math.Log10(Math.Abs(self)));
if (double.IsInfinity(scale) || double.IsNaN(scale))
return self.ToString("F" + decimals.Value);
return self.ToString("F" + Math.Max(significant.Value - scale, decimals.Value));
}
}
public static class FloatExtensionMethods
......
......@@ -59,6 +59,8 @@
<Compile Include="Models\AngledriveType.cs" />
<Compile Include="Models\AuxiliaryModel.cs" />
<Compile Include="Models\AxleConfiguration.cs" />
<Compile Include="Models\AxleLineType.cs" />
<Compile Include="Models\CertificationMethod.cs" />
<Compile Include="Models\CrossWindCorrectionMode.cs" />
<Compile Include="Models\DriverMode.cs" />
<Compile Include="Models\ExecutionMode.cs" />
......@@ -72,6 +74,11 @@
<Compile Include="OutputData\IOutputFileWriter.cs" />
<Compile Include="OutputData\IOutputPlugin.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Resources\XMLNames.Designer.cs">
<DependentUpon>XMLNames.resx</DependentUpon>
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
</Compile>
<Compile Include="Utils\DoubleExtensionMethods.cs" />
<Compile Include="Utils\EnumerableExtensionMethods.cs" />
<Compile Include="Utils\EnumHelper.cs" />
......@@ -84,6 +91,13 @@
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Resources\XMLNames.resx">
<Generator>PublicResXFileCodeGenerator</Generator>
<LastGenOutput>XMLNames.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
......
using System;
using TUGraz.VectoCore.Resources;
using TUGraz.VectoCommon.Resources;
namespace TUGraz.VectoHashing
{
......@@ -14,6 +14,8 @@ namespace TUGraz.VectoHashing
Airdrag,
Tyre,
Vehicle,
VectoOutput,
VectoCustomerInformation
}
public static class VectoComponentsExtensionMethods
......@@ -39,6 +41,10 @@ namespace TUGraz.VectoHashing
return XMLNames.AxleWheels_Axles_Axle_Tyre;
case VectoComponents.Vehicle:
return XMLNames.Component_Vehicle;
case VectoComponents.VectoOutput:
return "VectoOutput";
case VectoComponents.VectoCustomerInformation:
return "VectoCustomerInformation";
default:
throw new ArgumentOutOfRangeException("VectoComponents", component, null);
}
......@@ -63,6 +69,10 @@ namespace TUGraz.VectoHashing
return "AD-";
case VectoComponents.Tyre:
return "TYRE-";
case VectoComponents.VectoOutput:
return "RESULT-";
case VectoComponents.VectoCustomerInformation:
return "COC-";
default:
throw new ArgumentOutOfRangeException("VectoComponents", component, null);
}
......
......@@ -5,8 +5,8 @@ using System.IO;
using System.Linq;
using System.Xml;
using System.Xml.Linq;
using TUGraz.VectoCommon.Resources;
using TUGraz.VectoCommon.Utils;
using TUGraz.VectoCore.Resources;
using TUGraz.VectoHashing.Impl;
using TUGraz.VectoHashing.Util;
......@@ -59,7 +59,8 @@ namespace TUGraz.VectoHashing
var retVal = new List<VectoComponents>();
foreach (var component in EnumHelper.GetValues<VectoComponents>()) {
var count =
Document.SelectNodes(string.Format("//*[local-name()='{0}']", component.XMLElementName())).Count;
Document.SelectNodes(string.Format("//*[local-name()='{0}']//*[local-name()='{1}']",
XMLNames.VectoInputDeclaration,component.XMLElementName())).Count;
for (var i = 0; i < count; i++) {
retVal.Add(component);
}
......@@ -67,20 +68,32 @@ namespace TUGraz.VectoHashing
return retVal;
}
public XElement ComputeXmlHash()
{
var nodes = Document.SelectNodes(GetComponentQueryString());
if (nodes == null || nodes.Count == 0) {
throw new Exception("No component found");
}
var componentId = nodes[0].Attributes[XMLNames.Component_ID_Attr].Value;
var hash = DoComputeHash(nodes[0]);
return hash.ToXDocument().Root;
}
public string ComputeHash()
{
var nodes = Document.SelectNodes(GetComponentQueryString());
if (nodes == null || nodes.Count == 0) {
throw new Exception("No component found");
}
return DoComputeHash(nodes[0]);
var componentId = nodes[0].Attributes[XMLNames.Component_ID_Attr].Value;
return GetHashValueFromSig(DoComputeHash(nodes[0]), componentId);
}
public string ComputeHash(VectoComponents component, int index = 0)
{
var nodes = Document.SelectNodes(GetComponentQueryString(component));
if (nodes == null || nodes.Count == 0) {
throw new Exception(string.Format("Component {0} not found", component.XMLElementName()));
}
......@@ -88,13 +101,14 @@ namespace TUGraz.VectoHashing
throw new Exception(string.Format("index exceeds number of components found! index: {0}, #components: {1}", index,
nodes.Count));
}
return DoComputeHash(nodes[index]);
var componentId = nodes[index].Attributes[XMLNames.Component_ID_Attr].Value;
return GetHashValueFromSig(DoComputeHash(nodes[index]), componentId);
}
private static string DoComputeHash(XmlNode dataNode)
private static XmlDocument DoComputeHash(XmlNode dataNode)
{
var parent = dataNode.ParentNode;
var componentId = dataNode.Attributes[XMLNames.Component_ID_Attr].Value;
if (parent == null) {
throw new Exception("Invalid structure of input XML!");
}
......@@ -104,21 +118,33 @@ namespace TUGraz.VectoHashing
var newNode = newDoc.ImportNode(parent, true);
node.AppendChild(newNode);
var hash = XMLHashProvider.ComputeHash(newDoc, componentId);
return GetHashValueFromSig(hash, componentId);
var componentId = dataNode.Attributes[XMLNames.Component_ID_Attr].Value;
return XMLHashProvider.ComputeHash(newDoc, componentId);
}
public XDocument AddHash()
{
var components = GetContainigComponents();
if (components.Contains(VectoComponents.Vehicle)) {
throw new Exception("adding hash for Vehicle is not supported");
if (Document.DocumentElement == null) {
throw new Exception("invalid input document");
}
if (components.Count > 1) {
throw new Exception("input must not contain multiple components!");
}
if (components.Count == 0) {
throw new Exception("input does not contain a known component!");
IList<VectoComponents> components;
if (Document.DocumentElement.LocalName.Equals(XMLNames.VectoInputDeclaration)) {
components = GetContainigComponents();
if (components.Contains(VectoComponents.Vehicle)) {
throw new Exception("adding hash for Vehicle is not supported");
}
if (components.Count > 1) {
throw new Exception("input must not contain multiple components!");
}
if (components.Count == 0) {
throw new Exception("input does not contain a known component!");
}
} else if (Document.DocumentElement.LocalName.Equals("VectoOutput")) {
components = new List<VectoComponents>() { VectoComponents.VectoOutput };
} else if (Document.DocumentElement.LocalName.Equals("VectoCustomerInformation")) {
components = new List<VectoComponents>() { VectoComponents.VectoCustomerInformation };
}else {
throw new Exception("unknown document structure! neither input data nor output data format");
}
var query = string.Format("//*[local-name()='{0}']/*[local-name()='Data']", components[0].XMLElementName());
var node = Document.SelectSingleNode(query);
......
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