Code development platform for open source projects from the European Union institutions :large_blue_circle: EU Login authentication by SMS will be completely phased out by mid-2025. To see alternatives please check here

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

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

Merge pull request #475 in VECTO/vecto-sim from ~EMQUARIMA/vecto-sim:feature/VECTO-539-rename-tag-in-output-xml to develop

* commit '8c972fd7':
  renaming tag
parents 08c42caf 8c972fd7
No related branches found
No related tags found
No related merge requests found
......@@ -74,7 +74,7 @@ namespace TUGraz.VectoCore.OutputData.XML
new XElement(tns + XMLNames.Component_Manufacturer, modelData.VehicleData.Manufacturer),
new XElement(tns + XMLNames.Component_ManufacturerAddress, modelData.VehicleData.ManufacturerAddress),
new XElement(tns + XMLNames.Vehicle_VIN, modelData.VehicleData.VIN),
new XElement(tns + XMLNames.Vehicle_VehicleCategory, modelData.VehicleData.LegislativeClass.ToXMLFormat()),
new XElement(tns + XMLNames.Vehicle_LegislativeClass, modelData.VehicleData.LegislativeClass.ToXMLFormat()),
new XElement(tns + "VehicleGroup", segment.VehicleClass.GetClassNumber()),
new XElement(tns + XMLNames.Vehicle_AxleConfiguration, modelData.VehicleData.AxleConfiguration.GetName()),
new XElement(tns + XMLNames.Vehicle_GrossVehicleMass, modelData.VehicleData.GrossVehicleWeight.ToXMLFormat(0)),
......@@ -88,7 +88,7 @@ namespace TUGraz.VectoCore.OutputData.XML
new XElement(tns + "GearsCount", modelData.GearboxData.Gears.Count),
new XElement(tns + "Retarder", modelData.Retarder.Type.IsDedicatedComponent()),
new XElement(tns + "AxleRatio", modelData.AxleGearData.AxleGear.Ratio.ToXMLFormat(3))
);
);
InputDataIntegrity = new XElement(tns + "InputDataSignature",
modelData.InputDataHash == null ? CreateDummySig() : new XElement(modelData.InputDataHash));
}
......@@ -99,7 +99,7 @@ namespace TUGraz.VectoCore.OutputData.XML
new XElement(di + XMLNames.DI_Signature_Reference_DigestMethod,
new XAttribute(XMLNames.DI_Signature_Algorithm_Attr, "null")),
new XElement(di + XMLNames.DI_Signature_Reference_DigestValue, "NOT AVAILABLE")
);
);
}
public void AddResult(
......@@ -159,19 +159,19 @@ namespace TUGraz.VectoCore.OutputData.XML
var vehicle = new XElement(VehiclePart);
vehicle.Add(InputDataIntegrity);
retVal.Add(new XElement(tns + "VectoCustomerInformation",
new XAttribute("schemaVersion", "0.4"),
new XAttribute(XNamespace.Xmlns + "xsi", xsi.NamespaceName),
new XAttribute("xmlns", tns),
new XAttribute(XNamespace.Xmlns + "di", di),
new XAttribute(xsi + "schemaLocation",
string.Format("{0} {1}VectoCOC.xsd", tns, AbstractXMLWriter.SchemaLocationBaseUrl)),
new XElement(tns + "Data",
vehicle,
new XElement(tns + "ResultDataSignature", resultSignature),
results,
GetApplicationInfo())
new XAttribute("schemaVersion", "0.4"),
new XAttribute(XNamespace.Xmlns + "xsi", xsi.NamespaceName),
new XAttribute("xmlns", tns),
new XAttribute(XNamespace.Xmlns + "di", di),
new XAttribute(xsi + "schemaLocation",
string.Format("{0} {1}VectoCOC.xsd", tns, AbstractXMLWriter.SchemaLocationBaseUrl)),
new XElement(tns + "Data",
vehicle,
new XElement(tns + "ResultDataSignature", resultSignature),
results,
GetApplicationInfo())
)
);
);
var stream = new MemoryStream();
var writer = new StreamWriter(stream);
writer.Write(retVal);
......
......@@ -73,7 +73,7 @@ namespace TUGraz.VectoCore.OutputData.XML
{
VehiclePart.Add(
new XElement(tns + XMLNames.Vehicle_VIN, modelData.VehicleData.VIN),
new XElement(tns + XMLNames.Vehicle_VehicleCategory, modelData.VehicleData.LegislativeClass.ToXMLFormat()),
new XElement(tns + XMLNames.Vehicle_LegislativeClass, modelData.VehicleData.LegislativeClass.ToXMLFormat()),
new XElement(tns + "VehicleGroup", segment.VehicleClass.GetClassNumber()),
new XElement(tns + XMLNames.Vehicle_AxleConfiguration, modelData.VehicleData.AxleConfiguration.GetName()),
new XElement(tns + XMLNames.Vehicle_GrossVehicleMass, modelData.VehicleData.GrossVehicleWeight.ToXMLFormat(0)),
......
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