From 66880ef1ad304bc8ea4861a62efb278ea4256b7c Mon Sep 17 00:00:00 2001
From: Markus Quaritsch <markus.quaritsch@tugraz.at>
Date: Wed, 3 May 2017 14:03:18 +0200
Subject: [PATCH] fix last bugs

---
 .../OutputData/XML/XMLDeclarationWriter.cs       | 16 ++++++++--------
 .../VectoCore/Resources/XMLNames.Designer.cs     |  6 +++---
 VectoCore/VectoCore/Resources/XMLNames.resx      |  4 ++--
 .../engineering_gearbox-sample_ref.xml           |  4 ++++
 .../engineering_job-sample_FULL.xml              |  4 ++++
 5 files changed, 21 insertions(+), 13 deletions(-)

diff --git a/VectoCore/VectoCore/OutputData/XML/XMLDeclarationWriter.cs b/VectoCore/VectoCore/OutputData/XML/XMLDeclarationWriter.cs
index 725b98ead0..109d410a5a 100644
--- a/VectoCore/VectoCore/OutputData/XML/XMLDeclarationWriter.cs
+++ b/VectoCore/VectoCore/OutputData/XML/XMLDeclarationWriter.cs
@@ -132,7 +132,7 @@ namespace TUGraz.VectoCore.OutputData.XML
 			var id = string.Format("ENG-{0}", data.Model.RemoveWhitespace());
 			var fld = EngineFullLoadCurve.Create(data.FullLoadCurve, true);
 			return new XElement(tns + XMLNames.Component_Engine,
-				new XAttribute(XMLNames.Component_CertificationNumber, string.Format("ENG-{0}", data.Model)),
+				new XAttribute(XMLNames.Component_CertificationNumber_Attr, string.Format("ENG-{0}", data.Model)),
 				new XElement(tns + XMLNames.ComponentDataWrapper,
 					new XAttribute(XMLNames.Component_ID_Attr, id),
 					GetDefaultComponentElements(string.Format("ENG-{0}", data.Model), data.Model),
@@ -178,7 +178,7 @@ namespace TUGraz.VectoCore.OutputData.XML
 			}
 			var id = string.Format("GBX-{0}", gbxData.Model.RemoveWhitespace());
 			return new XElement(tns + XMLNames.Component_Gearbox,
-				new XAttribute(XMLNames.Component_CertificationNumber, string.Format("GBX-{0}", gbxData.Model)),
+				new XAttribute(XMLNames.Component_CertificationNumber_Attr, string.Format("GBX-{0}", gbxData.Model)),
 				new XElement(tns + XMLNames.ComponentDataWrapper,
 					new XAttribute(XMLNames.Component_ID_Attr, id),
 					GetDefaultComponentElements(string.Format("GBX-{0}", gbxData.Model), gbxData.Model),
@@ -199,7 +199,7 @@ namespace TUGraz.VectoCore.OutputData.XML
 			}
 			var id = string.Format("TC-{0}", data.Model.RemoveWhitespace());
 			return new XElement(tns + XMLNames.Component_TorqueConverter,
-				new XAttribute(XMLNames.Component_CertificationNumber, id),
+				new XAttribute(XMLNames.Component_CertificationNumber_Attr, id),
 				new XElement(tns + XMLNames.ComponentDataWrapper,
 					new XAttribute(XMLNames.Component_ID_Attr, id),
 					GetDefaultComponentElements(data.TechnicalReportId, data.Model),
@@ -218,7 +218,7 @@ namespace TUGraz.VectoCore.OutputData.XML
 		{
 			var id = string.Format("ANGL-{0}", data.Model.RemoveWhitespace());
 			return new XElement(tns + XMLNames.Component_Angledrive,
-				new XAttribute(XMLNames.Component_CertificationNumber, "ANGL-" + data.Model),
+				new XAttribute(XMLNames.Component_CertificationNumber_Attr, "ANGL-" + data.Model),
 				new XElement(tns + XMLNames.ComponentDataWrapper,
 					new XAttribute(XMLNames.Component_ID_Attr, id),
 					GetDefaultComponentElements(data.TechnicalReportId, data.Model),
@@ -233,7 +233,7 @@ namespace TUGraz.VectoCore.OutputData.XML
 		{
 			var id = string.Format("RET-{0}", data.Model.RemoveWhitespace());
 			return new XElement(tns + XMLNames.Component_Retarder,
-				new XAttribute(XMLNames.Component_CertificationNumber, "RET-none"),
+				new XAttribute(XMLNames.Component_CertificationNumber_Attr, "RET-none"),
 				new XElement(tns + XMLNames.ComponentDataWrapper,
 					new XAttribute(XMLNames.Component_ID_Attr, id),
 					GetDefaultComponentElements(data.TechnicalReportId, data.Model),
@@ -250,7 +250,7 @@ namespace TUGraz.VectoCore.OutputData.XML
 		{
 			var typeId = string.Format("AXLGEAR-{0:0.000}", data.Ratio);
 			return new XElement(tns + XMLNames.Component_Axlegear,
-				new XAttribute(XMLNames.Component_CertificationNumber, string.Format("AXL-{0}", data.Model)),
+				new XAttribute(XMLNames.Component_CertificationNumber_Attr, string.Format("AXL-{0}", data.Model)),
 				new XElement(tns + XMLNames.ComponentDataWrapper,
 					new XAttribute(XMLNames.Component_ID_Attr, typeId),
 					GetDefaultComponentElements(typeId, "N.A."),
@@ -292,7 +292,7 @@ namespace TUGraz.VectoCore.OutputData.XML
 		{
 			var id = string.Format("TYRE-{0}", axle.Wheels).RemoveWhitespace().Replace("/", "_");
 			return new XElement(tns + "Tyre",
-				new XAttribute(XMLNames.Component_CertificationNumber, id),
+				new XAttribute(XMLNames.Component_CertificationNumber_Attr, id),
 				new XElement(tns + XMLNames.ComponentDataWrapper,
 					new XAttribute(XMLNames.Component_ID_Attr, id),
 					GetDefaultComponentElements(string.Format("TYRE-{0}", axle.Wheels), axle.Wheels),
@@ -327,7 +327,7 @@ namespace TUGraz.VectoCore.OutputData.XML
 		{
 			var id = string.Format("Airdrag-{0}", data.Model);
 			return new XElement(tns + XMLNames.Component_AirDrag,
-				new XAttribute(XMLNames.Component_CertificationNumber, string.Format("AD-{0}", data.Model)),
+				new XAttribute(XMLNames.Component_CertificationNumber_Attr, string.Format("AD-{0}", data.Model)),
 				new XElement(tns + XMLNames.ComponentDataWrapper,
 					new XAttribute(XMLNames.Component_ID_Attr, id),
 					GetDefaultComponentElements(data.Model, "N.A."),
diff --git a/VectoCore/VectoCore/Resources/XMLNames.Designer.cs b/VectoCore/VectoCore/Resources/XMLNames.Designer.cs
index 2f11622492..04faa1a128 100644
--- a/VectoCore/VectoCore/Resources/XMLNames.Designer.cs
+++ b/VectoCore/VectoCore/Resources/XMLNames.Designer.cs
@@ -457,11 +457,11 @@ namespace TUGraz.VectoCore.Resources {
         }
         
         /// <summary>
-        ///   Looks up a localized string similar to CertificationNumber.
+        ///   Looks up a localized string similar to certificationNumber.
         /// </summary>
-        public static string Component_CertificationNumber {
+        public static string Component_CertificationNumber_Attr {
             get {
-                return ResourceManager.GetString("Component_CertificationNumber", resourceCulture);
+                return ResourceManager.GetString("Component_CertificationNumber_Attr", resourceCulture);
             }
         }
         
diff --git a/VectoCore/VectoCore/Resources/XMLNames.resx b/VectoCore/VectoCore/Resources/XMLNames.resx
index ad6df583b3..bbfeacc197 100644
--- a/VectoCore/VectoCore/Resources/XMLNames.resx
+++ b/VectoCore/VectoCore/Resources/XMLNames.resx
@@ -555,8 +555,8 @@
 	<data name="Component_Model" xml:space="preserve">
 		<value>Model</value>
 	</data>
-	<data name="Component_CertificationNumber" xml:space="preserve">
-		<value>CertificationNumber</value>
+	<data name="Component_CertificationNumber_Attr" xml:space="preserve">
+		<value>certificationNumber</value>
 	</data>
 	<data name="Angledrive_LossMap_Entry" xml:space="preserve">
 		<value>Entry</value>
diff --git a/VectoCore/VectoCoreTest/TestData/XML/XMLReaderEngineering/engineering_gearbox-sample_ref.xml b/VectoCore/VectoCoreTest/TestData/XML/XMLReaderEngineering/engineering_gearbox-sample_ref.xml
index 024225b62e..8f15d664a9 100644
--- a/VectoCore/VectoCoreTest/TestData/XML/XMLReaderEngineering/engineering_gearbox-sample_ref.xml
+++ b/VectoCore/VectoCoreTest/TestData/XML/XMLReaderEngineering/engineering_gearbox-sample_ref.xml
@@ -128,6 +128,10 @@
 		</Signature>
 		<TorqueConverter>
 			<Data>
+				<Manufacturer>Generic Torqueconverter Manufacturer</Manufacturer>
+						<Model>Generic Torqueconverter</Model>
+						<Creator>Markus Quaritsch, TUG ITI</Creator>
+						<Date>2017-01-11T11:00:00Z</Date>
 				<ReferenceRPM>1000</ReferenceRPM>
 				<Characteristics>
 					<Resource type="csv" file="tc_data.vtcc"/>
diff --git a/VectoCore/VectoCoreTest/TestData/XML/XMLReaderEngineering/engineering_job-sample_FULL.xml b/VectoCore/VectoCoreTest/TestData/XML/XMLReaderEngineering/engineering_job-sample_FULL.xml
index 726dbaf471..7e6407b19d 100644
--- a/VectoCore/VectoCoreTest/TestData/XML/XMLReaderEngineering/engineering_job-sample_FULL.xml
+++ b/VectoCore/VectoCoreTest/TestData/XML/XMLReaderEngineering/engineering_job-sample_FULL.xml
@@ -2552,6 +2552,10 @@
 				</Signature>
 				<TorqueConverter>
 					<Data>
+					<Manufacturer>Generic Torqueconverter Manufacturer</Manufacturer>
+					<Model>Generic Torqueconverter</Model>
+					<Creator>Markus Quaritsch, TUG ITI</Creator>
+					<Date>2017-01-11T11:00:00Z</Date>
 						<ReferenceRPM>1000</ReferenceRPM>
 						<Characteristics>
 							<Entry speedRatio="0.0000" inputTorqueRef="300.00" torqueRatio="1.80"/>
-- 
GitLab