Index: Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.IO/Configurations/GrassCoverErosionInwardsCalculationConfigurationReader.cs
===================================================================
diff -u -r8336ede0837d35257e8b85c3b0090b0774342d90 -rb1fd20384e0835b604bb68d94e16e8ead46ed93e
--- Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.IO/Configurations/GrassCoverErosionInwardsCalculationConfigurationReader.cs (.../GrassCoverErosionInwardsCalculationConfigurationReader.cs) (revision 8336ede0837d35257e8b85c3b0090b0774342d90)
+++ Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.IO/Configurations/GrassCoverErosionInwardsCalculationConfigurationReader.cs (.../GrassCoverErosionInwardsCalculationConfigurationReader.cs) (revision b1fd20384e0835b604bb68d94e16e8ead46ed93e)
@@ -35,9 +35,9 @@
///
/// This class reads a grass cover erosion inwards configuration from XML and creates
/// a collection of corresponding , typically
- /// containing one or more .
+ /// containing one or more .
///
- public class GrassCoverErosionInwardsCalculationConfigurationReader : CalculationConfigurationReader
+ public class GrassCoverErosionInwardsCalculationConfigurationReader : CalculationConfigurationReader
{
private const string hrLocatieSchemaName = "HrLocatieSchema.xsd";
private const string orientatieSchemaName = "OrientatieSchema.xsd";
@@ -80,11 +80,10 @@
}
}) {}
- protected override ReadGrassCoverErosionInwardsCalculation ParseCalculationElement(XElement calculationElement)
+ protected override GrassCoverErosionInwardsCalculationConfiguration ParseCalculationElement(XElement calculationElement)
{
- var constructionProperties = new ReadGrassCoverErosionInwardsCalculation.ConstructionProperties
+ var configuration = new GrassCoverErosionInwardsCalculationConfiguration(calculationElement.Attribute(ConfigurationSchemaIdentifiers.NameAttribute).Value)
{
- Name = calculationElement.Attribute(ConfigurationSchemaIdentifiers.NameAttribute).Value,
HydraulicBoundaryLocation = calculationElement.GetStringValueFromDescendantElement(ConfigurationSchemaIdentifiers.HydraulicBoundaryLocationElement),
DikeProfileId = calculationElement.GetStringValueFromDescendantElement(GrassCoverErosionInwardsCalculationConfigurationSchemaIdentifiers.DikeProfileElement),
Orientation = calculationElement.GetDoubleValueFromDescendantElement(ConfigurationSchemaIdentifiers.Orientation),
@@ -93,20 +92,11 @@
GrassCoverErosionInwardsCalculationConfigurationSchemaIdentifiers.DikeHeightCalculationTypeElement),
OvertoppingRateCalculationType = (ConfigurationHydraulicLoadsCalculationType?) calculationElement.GetConvertedValueFromDescendantStringElement(
GrassCoverErosionInwardsCalculationConfigurationSchemaIdentifiers.OvertoppingRateCalculationTypeElement),
- UseBreakWater = calculationElement.GetBoolValueFromDescendantElement(ConfigurationSchemaIdentifiers.UseBreakWater),
- BreakWaterType = (ConfigurationBreakWaterType?) calculationElement.GetConvertedValueFromDescendantStringElement(ConfigurationSchemaIdentifiers.BreakWaterType),
- BreakWaterHeight = calculationElement.GetDoubleValueFromDescendantElement(ConfigurationSchemaIdentifiers.BreakWaterHeight),
- UseForeshore = calculationElement.GetBoolValueFromDescendantElement(ConfigurationSchemaIdentifiers.UseForeshore)
+ WaveReduction = calculationElement.GetWaveReductionParameters(),
+ CriticalFlowRate = calculationElement.GetStochastConfiguration(GrassCoverErosionInwardsCalculationConfigurationSchemaIdentifiers.CriticalFlowRateStochastName)
};
- XElement criticalFlowRateElement = calculationElement.GetStochastElement(GrassCoverErosionInwardsCalculationConfigurationSchemaIdentifiers.CriticalFlowRateStochastName);
- if (criticalFlowRateElement != null)
- {
- constructionProperties.CriticalFlowRateMean = criticalFlowRateElement.GetDoubleValueFromDescendantElement(ConfigurationSchemaIdentifiers.MeanElement);
- constructionProperties.CriticalFlowRateStandardDeviation = criticalFlowRateElement.GetDoubleValueFromDescendantElement(ConfigurationSchemaIdentifiers.StandardDeviationElement);
- }
-
- return new ReadGrassCoverErosionInwardsCalculation(constructionProperties);
+ return configuration;
}
}
}
\ No newline at end of file