Index: Riskeer/Common/src/Riskeer.Common.IO/Configurations/Import/CalculationConfigurationReader.cs
===================================================================
diff -u -r083a5a0ffd2030fe3d8d5ca5e1c78a06d7cff9b4 -r4b596cdfd60b2f47f25bb1d5fefa4f539a56905e
--- Riskeer/Common/src/Riskeer.Common.IO/Configurations/Import/CalculationConfigurationReader.cs (.../CalculationConfigurationReader.cs) (revision 083a5a0ffd2030fe3d8d5ca5e1c78a06d7cff9b4)
+++ Riskeer/Common/src/Riskeer.Common.IO/Configurations/Import/CalculationConfigurationReader.cs (.../CalculationConfigurationReader.cs) (revision 4b596cdfd60b2f47f25bb1d5fefa4f539a56905e)
@@ -23,7 +23,6 @@
using System.Collections.Generic;
using System.IO;
using System.Linq;
-using System.Reflection;
using System.Xml;
using System.Xml.Linq;
using System.Xml.Schema;
@@ -75,31 +74,36 @@
xmlDocument = LoadDocument(xmlFilePath);
- // Versie check XSD Versie 2 | Full XSD Versie 2 (inclusief nested) | Versie 1 naar Versie 2 XSLT
- // Versie check XSD Versie 1 | Full XSD Versie 1 (inclusief nested) | Versie 0 naar Versie 1 XSLT
- // Versie check XSD Versie 0 | Full XSD Versie 0 (inclusief nested) | -
-
- // < xs:element name = "configuratie" >
- //
- // attribute versie op 2
- //
- //
- // xs:element >
-
CalculationConfigurationSchemaDefinition matchingSchemaDefinition = GetMatchingSchemaDefinition(schemaDefinitions);
if (matchingSchemaDefinition == null)
{
return;
}
ValidateToSchema(xmlDocument, xmlFilePath, matchingSchemaDefinition.MainSchemaDefinition, matchingSchemaDefinition.NestedSchemaDefinitions);
-
+
ValidateNotEmpty(xmlDocument, xmlFilePath);
- // Migrate
+ // Migrate with XSLT
// ...
}
+ ///
+ /// Reads the calculation configuration from the XML and creates a collection of corresponding .
+ ///
+ /// A collection of read .
+ public IEnumerable Read()
+ {
+ return ParseElements(xmlDocument.Root?.Elements());
+ }
+
+ ///
+ /// Parses a read calculation element.
+ ///
+ /// The read calculation element to parse.
+ /// A parsed .
+ protected abstract TReadCalculation ParseCalculationElement(XElement calculationElement);
+
private CalculationConfigurationSchemaDefinition GetMatchingSchemaDefinition(IEnumerable schemaDefinitions)
{
for (var i = 0; i < schemaDefinitions.Count(); i++)
@@ -124,22 +128,6 @@
}
///
- /// Reads the calculation configuration from the XML and creates a collection of corresponding .
- ///
- /// A collection of read .
- public IEnumerable Read()
- {
- return ParseElements(xmlDocument.Root?.Elements());
- }
-
- ///
- /// Parses a read calculation element.
- ///
- /// The read calculation element to parse.
- /// A parsed .
- protected abstract TReadCalculation ParseCalculationElement(XElement calculationElement);
-
- ///
/// Validates whether a file exists at the provided .
///
/// The file path to validate.