Index: Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.IO/Exporters/GrassCoverErosionOutwardsWaveConditionsExporter.cs
===================================================================
diff -u -rfcd32c8e949b4581cc20adcaa7cf7639fcb69d20 -r2057d3372084602a2d959db2e33dcf81de971a73
--- Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.IO/Exporters/GrassCoverErosionOutwardsWaveConditionsExporter.cs (.../GrassCoverErosionOutwardsWaveConditionsExporter.cs) (revision fcd32c8e949b4581cc20adcaa7cf7639fcb69d20)
+++ Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.IO/Exporters/GrassCoverErosionOutwardsWaveConditionsExporter.cs (.../GrassCoverErosionOutwardsWaveConditionsExporter.cs) (revision 2057d3372084602a2d959db2e33dcf81de971a73)
@@ -25,7 +25,7 @@
using Core.Common.IO.Exceptions;
using Ringtoets.GrassCoverErosionOutwards.Data;
using Ringtoets.Revetment.IO;
-using Ringtoets.Revetment.IO.Exporters;
+using Ringtoets.Revetment.IO.WaveConditions;
namespace Ringtoets.GrassCoverErosionOutwards.IO.Exporters
{
Index: Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.IO/Writers/GrassCoverErosionOutwardsCalculationConfigurationWriter.cs
===================================================================
diff -u -rfcd32c8e949b4581cc20adcaa7cf7639fcb69d20 -r2057d3372084602a2d959db2e33dcf81de971a73
--- Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.IO/Writers/GrassCoverErosionOutwardsCalculationConfigurationWriter.cs (.../GrassCoverErosionOutwardsCalculationConfigurationWriter.cs) (revision fcd32c8e949b4581cc20adcaa7cf7639fcb69d20)
+++ Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.IO/Writers/GrassCoverErosionOutwardsCalculationConfigurationWriter.cs (.../GrassCoverErosionOutwardsCalculationConfigurationWriter.cs) (revision 2057d3372084602a2d959db2e33dcf81de971a73)
@@ -22,7 +22,7 @@
using System.Xml;
using Ringtoets.Common.Data.Calculation;
using Ringtoets.GrassCoverErosionOutwards.Data;
-using Ringtoets.Revetment.IO.Writers;
+using Ringtoets.Revetment.IO.Configurations;
namespace Ringtoets.GrassCoverErosionOutwards.IO.Writers
{
Index: Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Plugin/GrassCoverErosionOutwardsPlugin.cs
===================================================================
diff -u -r09e5d13894b0b5e27add4e8d9d1e26686e4894b8 -r2057d3372084602a2d959db2e33dcf81de971a73
--- Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Plugin/GrassCoverErosionOutwardsPlugin.cs (.../GrassCoverErosionOutwardsPlugin.cs) (revision 09e5d13894b0b5e27add4e8d9d1e26686e4894b8)
+++ Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Plugin/GrassCoverErosionOutwardsPlugin.cs (.../GrassCoverErosionOutwardsPlugin.cs) (revision 2057d3372084602a2d959db2e33dcf81de971a73)
@@ -55,7 +55,7 @@
using Ringtoets.GrassCoverErosionOutwards.Plugin.Properties;
using Ringtoets.GrassCoverErosionOutwards.Service;
using Ringtoets.GrassCoverErosionOutwards.Service.MessageProviders;
-using Ringtoets.Revetment.IO.Importers;
+using Ringtoets.Revetment.IO.Configurations;
using RingtoetsGrassCoverErosionOutwardsFormsResources = Ringtoets.GrassCoverErosionOutwards.Forms.Properties.Resources;
using RingtoetsCommonDataResources = Ringtoets.Common.Data.Properties.Resources;
using RingtoetsCommonFormsResources = Ringtoets.Common.Forms.Properties.Resources;
Index: Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.IO.Test/Exporters/GrassCoverErosionOutwardsWaveConditionsExporterTest.cs
===================================================================
diff -u -rfcd32c8e949b4581cc20adcaa7cf7639fcb69d20 -r2057d3372084602a2d959db2e33dcf81de971a73
--- Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.IO.Test/Exporters/GrassCoverErosionOutwardsWaveConditionsExporterTest.cs (.../GrassCoverErosionOutwardsWaveConditionsExporterTest.cs) (revision fcd32c8e949b4581cc20adcaa7cf7639fcb69d20)
+++ Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.IO.Test/Exporters/GrassCoverErosionOutwardsWaveConditionsExporterTest.cs (.../GrassCoverErosionOutwardsWaveConditionsExporterTest.cs) (revision 2057d3372084602a2d959db2e33dcf81de971a73)
@@ -30,7 +30,7 @@
using Ringtoets.GrassCoverErosionOutwards.Data;
using Ringtoets.GrassCoverErosionOutwards.IO.Exporters;
using Ringtoets.Revetment.Data;
-using Ringtoets.Revetment.IO.Exporters;
+using Ringtoets.Revetment.IO.WaveConditions;
using Ringtoets.Revetment.TestUtil;
namespace Ringtoets.GrassCoverErosionOutwards.IO.Test.Exporters
Index: Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.IO.Test/Writers/GrassCoverErosionOutwardsCalculationConfigurationWriterTest.cs
===================================================================
diff -u -rfcd32c8e949b4581cc20adcaa7cf7639fcb69d20 -r2057d3372084602a2d959db2e33dcf81de971a73
--- Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.IO.Test/Writers/GrassCoverErosionOutwardsCalculationConfigurationWriterTest.cs (.../GrassCoverErosionOutwardsCalculationConfigurationWriterTest.cs) (revision fcd32c8e949b4581cc20adcaa7cf7639fcb69d20)
+++ Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.IO.Test/Writers/GrassCoverErosionOutwardsCalculationConfigurationWriterTest.cs (.../GrassCoverErosionOutwardsCalculationConfigurationWriterTest.cs) (revision 2057d3372084602a2d959db2e33dcf81de971a73)
@@ -30,7 +30,7 @@
using Ringtoets.GrassCoverErosionOutwards.Data;
using Ringtoets.GrassCoverErosionOutwards.IO.Writers;
using Ringtoets.Revetment.Data;
-using Ringtoets.Revetment.IO.Writers;
+using Ringtoets.Revetment.IO.Configurations;
namespace Ringtoets.GrassCoverErosionOutwards.IO.Test.Writers
{
Index: Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Plugin.Test/ExportInfos/GrassCoverErosionOutwardsWaveConditionsCalculationContextWaveConditionsExportInfoTest.cs
===================================================================
diff -u -rc4e2a1db42a818567d116298b5c163b56b69ce0e -r2057d3372084602a2d959db2e33dcf81de971a73
--- Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Plugin.Test/ExportInfos/GrassCoverErosionOutwardsWaveConditionsCalculationContextWaveConditionsExportInfoTest.cs (.../GrassCoverErosionOutwardsWaveConditionsCalculationContextWaveConditionsExportInfoTest.cs) (revision c4e2a1db42a818567d116298b5c163b56b69ce0e)
+++ Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Plugin.Test/ExportInfos/GrassCoverErosionOutwardsWaveConditionsCalculationContextWaveConditionsExportInfoTest.cs (.../GrassCoverErosionOutwardsWaveConditionsCalculationContextWaveConditionsExportInfoTest.cs) (revision 2057d3372084602a2d959db2e33dcf81de971a73)
@@ -29,7 +29,7 @@
using Ringtoets.Common.Data.AssessmentSection;
using Ringtoets.GrassCoverErosionOutwards.Data;
using Ringtoets.GrassCoverErosionOutwards.Forms.PresentationObjects;
-using Ringtoets.Revetment.IO.Exporters;
+using Ringtoets.Revetment.IO.WaveConditions;
using Ringtoets.Revetment.TestUtil;
using CoreCommonGuiResources = Core.Common.Gui.Properties.Resources;
Index: Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Plugin.Test/ExportInfos/GrassCoverErosionOutwardsWaveConditionsCalculationGroupContextWaveConditionsExportInfoTest.cs
===================================================================
diff -u -rc4e2a1db42a818567d116298b5c163b56b69ce0e -r2057d3372084602a2d959db2e33dcf81de971a73
--- Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Plugin.Test/ExportInfos/GrassCoverErosionOutwardsWaveConditionsCalculationGroupContextWaveConditionsExportInfoTest.cs (.../GrassCoverErosionOutwardsWaveConditionsCalculationGroupContextWaveConditionsExportInfoTest.cs) (revision c4e2a1db42a818567d116298b5c163b56b69ce0e)
+++ Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Plugin.Test/ExportInfos/GrassCoverErosionOutwardsWaveConditionsCalculationGroupContextWaveConditionsExportInfoTest.cs (.../GrassCoverErosionOutwardsWaveConditionsCalculationGroupContextWaveConditionsExportInfoTest.cs) (revision 2057d3372084602a2d959db2e33dcf81de971a73)
@@ -30,7 +30,7 @@
using Ringtoets.Common.Data.Calculation;
using Ringtoets.GrassCoverErosionOutwards.Data;
using Ringtoets.GrassCoverErosionOutwards.Forms.PresentationObjects;
-using Ringtoets.Revetment.IO.Exporters;
+using Ringtoets.Revetment.IO.WaveConditions;
using Ringtoets.Revetment.TestUtil;
using CoreCommonGuiResources = Core.Common.Gui.Properties.Resources;
Index: Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Plugin.Test/ImportInfos/GrassCoverErosionOutwardsWaveConditionsCalculationGroupContextImportInfoTest.cs
===================================================================
diff -u -rc4e2a1db42a818567d116298b5c163b56b69ce0e -r2057d3372084602a2d959db2e33dcf81de971a73
--- Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Plugin.Test/ImportInfos/GrassCoverErosionOutwardsWaveConditionsCalculationGroupContextImportInfoTest.cs (.../GrassCoverErosionOutwardsWaveConditionsCalculationGroupContextImportInfoTest.cs) (revision c4e2a1db42a818567d116298b5c163b56b69ce0e)
+++ Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Plugin.Test/ImportInfos/GrassCoverErosionOutwardsWaveConditionsCalculationGroupContextImportInfoTest.cs (.../GrassCoverErosionOutwardsWaveConditionsCalculationGroupContextImportInfoTest.cs) (revision 2057d3372084602a2d959db2e33dcf81de971a73)
@@ -32,7 +32,7 @@
using Ringtoets.Common.Data.TestUtil;
using Ringtoets.GrassCoverErosionOutwards.Data;
using Ringtoets.GrassCoverErosionOutwards.Forms.PresentationObjects;
-using Ringtoets.Revetment.IO.Importers;
+using Ringtoets.Revetment.IO.Configurations;
using RingtoetsCommonFormsResources = Ringtoets.Common.Forms.Properties.Resources;
namespace Ringtoets.GrassCoverErosionOutwards.Plugin.Test.ImportInfos
Index: Ringtoets/Revetment/src/Ringtoets.Revetment.IO/Configurations/ConfigurationWaveConditionsInputStepSize.cs
===================================================================
diff -u
--- Ringtoets/Revetment/src/Ringtoets.Revetment.IO/Configurations/ConfigurationWaveConditionsInputStepSize.cs (revision 0)
+++ Ringtoets/Revetment/src/Ringtoets.Revetment.IO/Configurations/ConfigurationWaveConditionsInputStepSize.cs (revision 2057d3372084602a2d959db2e33dcf81de971a73)
@@ -0,0 +1,44 @@
+// Copyright (C) Stichting Deltares 2017. All rights reserved.
+//
+// This file is part of Ringtoets.
+//
+// Ringtoets is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
+//
+// All names, logos, and references to "Deltares" are registered trademarks of
+// Stichting Deltares and remain full property of Stichting Deltares at all times.
+// All rights reserved.
+
+namespace Ringtoets.Revetment.IO.Configurations
+{
+ ///
+ /// Enum defining the possible step size value in a read wave conditions calculation.
+ ///
+ public enum ConfigurationWaveConditionsInputStepSize
+ {
+ ///
+ /// A step size of 0.5
+ ///
+ Half = 1,
+
+ ///
+ /// A step size of 1.0
+ ///
+ One = 2,
+
+ ///
+ /// A step size of 2.0
+ ///
+ Two = 3
+ }
+}
\ No newline at end of file
Index: Ringtoets/Revetment/src/Ringtoets.Revetment.IO/Configurations/Helpers/ConfigurationWaveConditionsInputStepSizeConverter.cs
===================================================================
diff -u
--- Ringtoets/Revetment/src/Ringtoets.Revetment.IO/Configurations/Helpers/ConfigurationWaveConditionsInputStepSizeConverter.cs (revision 0)
+++ Ringtoets/Revetment/src/Ringtoets.Revetment.IO/Configurations/Helpers/ConfigurationWaveConditionsInputStepSizeConverter.cs (revision 2057d3372084602a2d959db2e33dcf81de971a73)
@@ -0,0 +1,86 @@
+// Copyright (C) Stichting Deltares 2017. All rights reserved.
+//
+// This file is part of Ringtoets.
+//
+// Ringtoets is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
+//
+// All names, logos, and references to "Deltares" are registered trademarks of
+// Stichting Deltares and remain full property of Stichting Deltares at all times.
+// All rights reserved.
+
+using System;
+using System.ComponentModel;
+using System.Globalization;
+
+namespace Ringtoets.Revetment.IO.Configurations.Helpers
+{
+ ///
+ /// Converts to and back.
+ ///
+ public class ConfigurationWaveConditionsInputStepSizeConverter : TypeConverter
+ {
+ public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
+ {
+ if (destinationType == typeof(string))
+ {
+ switch ((ConfigurationWaveConditionsInputStepSize) value)
+ {
+ case ConfigurationWaveConditionsInputStepSize.Half:
+ return FormatStepSizeValue(culture, 0.5);
+ case ConfigurationWaveConditionsInputStepSize.One:
+ return FormatStepSizeValue(culture, 1.0);
+ case ConfigurationWaveConditionsInputStepSize.Two:
+ return FormatStepSizeValue(culture, 2.0);
+ }
+ }
+ return base.ConvertTo(context, culture, value, destinationType);
+ }
+
+ public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType)
+ {
+ if (sourceType == typeof(double?))
+ {
+ return true;
+ }
+ return base.CanConvertFrom(context, sourceType);
+ }
+
+ public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value)
+ {
+ var doubleValue = value as double?;
+ if (doubleValue != null)
+ {
+ if (Math.Abs(doubleValue.Value - 0.5) < double.Epsilon)
+ {
+ return ConfigurationWaveConditionsInputStepSize.Half;
+ }
+ if (Math.Abs(doubleValue.Value - 1) < double.Epsilon)
+ {
+ return ConfigurationWaveConditionsInputStepSize.One;
+ }
+ if (Math.Abs(doubleValue.Value - 2) < double.Epsilon)
+ {
+ return ConfigurationWaveConditionsInputStepSize.Two;
+ }
+ }
+
+ return base.ConvertFrom(context, culture, value);
+ }
+
+ private static string FormatStepSizeValue(CultureInfo culture, double stepSizeValue)
+ {
+ return string.Format(culture, "{0:0.0}", stepSizeValue);
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Revetment/src/Ringtoets.Revetment.IO/Configurations/WaveConditionsCalculationConfiguration.cs
===================================================================
diff -u
--- Ringtoets/Revetment/src/Ringtoets.Revetment.IO/Configurations/WaveConditionsCalculationConfiguration.cs (revision 0)
+++ Ringtoets/Revetment/src/Ringtoets.Revetment.IO/Configurations/WaveConditionsCalculationConfiguration.cs (revision 2057d3372084602a2d959db2e33dcf81de971a73)
@@ -0,0 +1,192 @@
+// Copyright (C) Stichting Deltares 2017. All rights reserved.
+//
+// This file is part of Ringtoets.
+//
+// Ringtoets is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
+//
+// All names, logos, and references to "Deltares" are registered trademarks of
+// Stichting Deltares and remain full property of Stichting Deltares at all times.
+// All rights reserved.
+
+using System;
+using Ringtoets.Common.IO.Configurations;
+
+namespace Ringtoets.Revetment.IO.Configurations
+{
+ ///
+ /// Class that represents a wave conditions calculation that is read via .
+ ///
+ public class WaveConditionsCalculationConfiguration : IConfigurationItem
+ {
+ ///
+ /// Creates a new instance of .
+ ///
+ /// The container of the properties for the .
+ /// Thrown when is null.
+ public WaveConditionsCalculationConfiguration(ConstructionProperties constructionProperties)
+ {
+ if (constructionProperties == null)
+ {
+ throw new ArgumentNullException(nameof(constructionProperties));
+ }
+
+ Name = constructionProperties.Name;
+ HydraulicBoundaryLocation = constructionProperties.HydraulicBoundaryLocation;
+ UpperBoundaryRevetment = constructionProperties.UpperBoundaryRevetment;
+ LowerBoundaryRevetment = constructionProperties.LowerBoundaryRevetment;
+ UpperBoundaryWaterLevels = constructionProperties.UpperBoundaryWaterLevels;
+ LowerBoundaryWaterLevels = constructionProperties.LowerBoundaryWaterLevels;
+ StepSize = constructionProperties.StepSize;
+ ForeshoreProfile = constructionProperties.ForeshoreProfile;
+ Orientation = constructionProperties.Orientation;
+ UseBreakWater = constructionProperties.UseBreakWater;
+ BreakWaterType = constructionProperties.BreakWaterType;
+ BreakWaterHeight = constructionProperties.BreakWaterHeight;
+ UseForeshore = constructionProperties.UseForeshore;
+ }
+
+ ///
+ /// Gets the name of the hydraulic boundary location of the read calculation.
+ ///
+ public string HydraulicBoundaryLocation { get; }
+
+ ///
+ /// Gets the upper boundary of the revetment of the read calculation.
+ ///
+ public double? UpperBoundaryRevetment { get; }
+
+ ///
+ /// Gets the lower boundary of the revetment of the read calculation.
+ ///
+ public double? LowerBoundaryRevetment { get; }
+
+ ///
+ /// Gets the upper boundary of the water levels of the read calculation.
+ ///
+ public double? UpperBoundaryWaterLevels { get; }
+
+ ///
+ /// Gets the lower boundary of the water levels of the read calculation.
+ ///
+ public double? LowerBoundaryWaterLevels { get; }
+
+ ///
+ /// Gets the step size of the read calculation.
+ ///
+ public ConfigurationWaveConditionsInputStepSize? StepSize { get; }
+
+ ///
+ /// Gets the name of the foreshore profile of the read calculation.
+ ///
+ public string ForeshoreProfile { get; }
+
+ ///
+ /// Gets the orientation of the read calculation.
+ ///
+ public double? Orientation { get; }
+
+ ///
+ /// Gets whether the breakwater should be used for the read calculation.
+ ///
+ public bool? UseBreakWater { get; }
+
+ ///
+ /// Gets the breakwater type of the read calculation.
+ ///
+ public ConfigurationBreakWaterType? BreakWaterType { get; }
+
+ ///
+ /// Gets the breakwater height of the read calculation.
+ ///
+ public double? BreakWaterHeight { get; }
+
+ ///
+ /// Gets whether the foreshore should be used for the read calculation.
+ ///
+ public bool? UseForeshore { get; }
+
+ public string Name { get; }
+
+ ///
+ /// Class holding the various construction parameters for .
+ ///
+ public class ConstructionProperties
+ {
+ ///
+ /// Gets or sets the value for .
+ ///
+ public string Name { internal get; set; }
+
+ ///
+ /// Gets or sets the value for .
+ ///
+ public string HydraulicBoundaryLocation { internal get; set; }
+
+ ///
+ /// Gets or sets the value for .
+ ///
+ public double? UpperBoundaryRevetment { internal get; set; }
+
+ ///
+ /// Gets or sets the value for .
+ ///
+ public double? LowerBoundaryRevetment { internal get; set; }
+
+ ///
+ /// Gets or sets the value for .
+ ///
+ public double? UpperBoundaryWaterLevels { internal get; set; }
+
+ ///
+ /// Gets or sets the value for .
+ ///
+ public double? LowerBoundaryWaterLevels { internal get; set; }
+
+ ///
+ /// Gets or sets the value for .
+ ///
+ public ConfigurationWaveConditionsInputStepSize? StepSize { internal get; set; }
+
+ ///
+ /// Gets or sets the value for .
+ ///
+ public string ForeshoreProfile { internal get; set; }
+
+ ///
+ /// Gets or sets the value for .
+ ///
+ public double? Orientation { internal get; set; }
+
+ ///
+ /// Gets or sets the value for .
+ ///
+ public bool? UseBreakWater { internal get; set; }
+
+ ///
+ /// Gets or sets the value for .
+ ///
+ public ConfigurationBreakWaterType? BreakWaterType { internal get; set; }
+
+ ///
+ /// Gets or sets the value for .
+ ///
+ public double? BreakWaterHeight { internal get; set; }
+
+ ///
+ /// Gets or sets the value for .
+ ///
+ public bool? UseForeshore { internal get; set; }
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Revetment/src/Ringtoets.Revetment.IO/Configurations/WaveConditionsCalculationConfigurationImporter.cs
===================================================================
diff -u
--- Ringtoets/Revetment/src/Ringtoets.Revetment.IO/Configurations/WaveConditionsCalculationConfigurationImporter.cs (revision 0)
+++ Ringtoets/Revetment/src/Ringtoets.Revetment.IO/Configurations/WaveConditionsCalculationConfigurationImporter.cs (revision 2057d3372084602a2d959db2e33dcf81de971a73)
@@ -0,0 +1,284 @@
+// Copyright (C) Stichting Deltares 2017. All rights reserved.
+//
+// This file is part of Ringtoets.
+//
+// Ringtoets is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
+//
+// All names, logos, and references to "Deltares" are registered trademarks of
+// Stichting Deltares and remain full property of Stichting Deltares at all times.
+// All rights reserved.
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using Core.Common.Base.Data;
+using Ringtoets.Common.Data.Calculation;
+using Ringtoets.Common.Data.DikeProfiles;
+using Ringtoets.Common.Data.Hydraulics;
+using Ringtoets.Common.IO.Configurations.Helpers;
+using Ringtoets.Common.IO.Configurations.Import;
+using Ringtoets.Revetment.Data;
+using Ringtoets.Revetment.IO.Properties;
+using RingtoetsCommonIOResources = Ringtoets.Common.IO.Properties.Resources;
+
+namespace Ringtoets.Revetment.IO.Configurations
+{
+ ///
+ /// Imports a wave conditions calculation configuration from an XML file and stores it on a
+ /// .
+ ///
+ /// The type of the calculation to import.
+ public class WaveConditionsCalculationConfigurationImporter
+ : CalculationConfigurationImporter
+ where T : ICalculation, new()
+ {
+ private readonly IEnumerable availableHydraulicBoundaryLocations;
+ private readonly IEnumerable availableForeshoreProfiles;
+
+ ///
+ /// Creates a new instance of .
+ ///
+ /// The path to the XML file to import from.
+ /// The calculation group to update.
+ /// The hydraulic boundary locations
+ /// used to check if the imported objects contain the right location.
+ /// The foreshore profiles used to check if
+ /// the imported objects contain the right profile.
+ /// Thrown when any parameter is
+ /// null.
+ public WaveConditionsCalculationConfigurationImporter(string xmlFilePath,
+ CalculationGroup importTarget,
+ IEnumerable hydraulicBoundaryLocations,
+ IEnumerable foreshoreProfiles)
+ : base(xmlFilePath, importTarget)
+ {
+ if (hydraulicBoundaryLocations == null)
+ {
+ throw new ArgumentNullException(nameof(hydraulicBoundaryLocations));
+ }
+ if (foreshoreProfiles == null)
+ {
+ throw new ArgumentNullException(nameof(foreshoreProfiles));
+ }
+ availableHydraulicBoundaryLocations = hydraulicBoundaryLocations;
+ availableForeshoreProfiles = foreshoreProfiles;
+ }
+
+ protected override WaveConditionsCalculationConfigurationReader CreateCalculationConfigurationReader(string xmlFilePath)
+ {
+ return new WaveConditionsCalculationConfigurationReader(xmlFilePath);
+ }
+
+ protected override ICalculation ParseReadCalculation(WaveConditionsCalculationConfiguration calculationConfiguration)
+ {
+ var waveConditionsCalculation = new T
+ {
+ Name = calculationConfiguration.Name
+ };
+
+ ReadStepSize(calculationConfiguration, waveConditionsCalculation);
+
+ if (TryReadHydraulicBoundaryLocation(calculationConfiguration.HydraulicBoundaryLocation, waveConditionsCalculation)
+ && TryReadBoundaries(calculationConfiguration, waveConditionsCalculation)
+ && TryReadForeshoreProfile(calculationConfiguration.ForeshoreProfile, waveConditionsCalculation)
+ && TryReadOrientation(calculationConfiguration, waveConditionsCalculation)
+ && TryReadWaveReduction(calculationConfiguration, waveConditionsCalculation))
+ {
+ return waveConditionsCalculation;
+ }
+ return null;
+ }
+
+ ///
+ /// Reads the boundaries of the calculation.
+ ///
+ /// The calculation read from the imported file.
+ /// The calculation to configure.
+ /// false when one of the boundaries is invalid, true otherwise.
+ private bool TryReadBoundaries(WaveConditionsCalculationConfiguration calculationConfiguration, ICalculation calculation)
+ {
+ WaveConditionsInput input = calculation.InputParameters;
+ return TryReadParameter(calculationConfiguration.UpperBoundaryRevetment,
+ v => input.UpperBoundaryRevetment = v,
+ Resources.WaveConditionsCalculationConfigurationImporter_UpperBoundaryRevetment_DisplayName,
+ calculation.Name)
+ && TryReadParameter(calculationConfiguration.LowerBoundaryRevetment,
+ v => input.LowerBoundaryRevetment = v,
+ Resources.WaveConditionsCalculationConfigurationImporter_LowerBoundaryRevetment_DisplayName,
+ calculation.Name)
+ && TryReadParameter(calculationConfiguration.UpperBoundaryWaterLevels,
+ v => input.UpperBoundaryWaterLevels = v,
+ Resources.WaveConditionsCalculationConfigurationImporter_UpperBoundaryWaterlevels_DisplayName,
+ calculation.Name)
+ && TryReadParameter(calculationConfiguration.LowerBoundaryWaterLevels,
+ v => input.LowerBoundaryWaterLevels = v,
+ Resources.WaveConditionsCalculationConfigurationImporter_LowerBoundaryWaterlevels_DisplayName,
+ calculation.Name);
+ }
+
+ private bool TryReadParameter(double? readValue, Action setAsRoundedDouble, string parameterName, string calculationName)
+ {
+ if (readValue.HasValue)
+ {
+ try
+ {
+ setAsRoundedDouble((RoundedDouble) readValue.Value);
+ }
+ catch (ArgumentOutOfRangeException e)
+ {
+ Log.LogOutOfRangeException(string.Format(
+ RingtoetsCommonIOResources.TryReadParameter_Value_0_ParameterName_1_is_invalid,
+ readValue.Value, parameterName),
+ calculationName, e);
+ return false;
+ }
+ }
+ return true;
+ }
+
+ private static void ReadStepSize(WaveConditionsCalculationConfiguration calculationConfiguration, ICalculation calculation)
+ {
+ if (calculationConfiguration.StepSize.HasValue)
+ {
+ calculation.InputParameters.StepSize = (WaveConditionsInputStepSize) calculationConfiguration.StepSize.Value;
+ }
+ }
+
+ private bool TryReadHydraulicBoundaryLocation(string locationName, ICalculation calculation)
+ {
+ HydraulicBoundaryLocation location;
+
+ if (TryReadHydraulicBoundaryLocation(locationName, calculation.Name, availableHydraulicBoundaryLocations, out location))
+ {
+ calculation.InputParameters.HydraulicBoundaryLocation = location;
+ return true;
+ }
+
+ return false;
+ }
+
+ private bool TryReadForeshoreProfile(string foreshoreProfileName, ICalculation calculation)
+ {
+ ForeshoreProfile foreshoreProfile;
+
+ if (TryReadForeshoreProfile(foreshoreProfileName, calculation.Name, availableForeshoreProfiles, out foreshoreProfile))
+ {
+ calculation.InputParameters.ForeshoreProfile = foreshoreProfile;
+ return true;
+ }
+
+ return false;
+ }
+
+ ///
+ /// Reads the orientation.
+ ///
+ /// The calculation read from the imported file.
+ /// The calculation to configure.
+ /// falce when the orientation is invalid, true otherwise.
+ private bool TryReadOrientation(WaveConditionsCalculationConfiguration calculationConfiguration, ICalculation calculation)
+ {
+ if (calculationConfiguration.Orientation.HasValue)
+ {
+ double orientation = calculationConfiguration.Orientation.Value;
+
+ try
+ {
+ calculation.InputParameters.Orientation = (RoundedDouble) orientation;
+ }
+ catch (ArgumentOutOfRangeException e)
+ {
+ Log.LogOutOfRangeException(string.Format(
+ RingtoetsCommonIOResources.TryReadParameter_Value_0_ParameterName_1_is_invalid,
+ orientation,
+ RingtoetsCommonIOResources.CalculationConfigurationImporter_Orientation_DisplayName),
+ calculation.Name, e);
+ return false;
+ }
+ }
+ return true;
+ }
+
+ ///
+ /// Reads the wave reduction parameters.
+ ///
+ /// The calculation read from the imported file.
+ /// The calculation to configure.
+ /// false when there is an invalid wave reduction parameter defined,
+ /// true otherwise.
+ private bool TryReadWaveReduction(WaveConditionsCalculationConfiguration calculationConfiguration, ICalculation calculation)
+ {
+ if (!ValidateWaveReduction(calculationConfiguration, calculation))
+ {
+ return false;
+ }
+
+ if (calculationConfiguration.UseForeshore.HasValue)
+ {
+ calculation.InputParameters.UseForeshore = calculationConfiguration.UseForeshore.Value;
+ }
+
+ if (calculationConfiguration.UseBreakWater.HasValue)
+ {
+ calculation.InputParameters.UseBreakWater = calculationConfiguration.UseBreakWater.Value;
+ }
+
+ if (calculationConfiguration.BreakWaterType.HasValue)
+ {
+ calculation.InputParameters.BreakWater.Type = (BreakWaterType) calculationConfiguration.BreakWaterType.Value;
+ }
+
+ if (calculationConfiguration.BreakWaterHeight.HasValue)
+ {
+ calculation.InputParameters.BreakWater.Height = (RoundedDouble) calculationConfiguration.BreakWaterHeight.Value;
+ }
+ return true;
+ }
+
+ ///
+ /// Validation to check if the defined wave reduction parameters are valid.
+ ///
+ /// The calculation read from the imported file.
+ /// The calculation to configure.
+ /// false when there is an invalid wave reduction parameter defined,
+ /// true otherwise.
+ private bool ValidateWaveReduction(WaveConditionsCalculationConfiguration calculationConfiguration, ICalculation calculation)
+ {
+ if (calculation.InputParameters.ForeshoreProfile == null)
+ {
+ if (calculationConfiguration.UseBreakWater.HasValue
+ || calculationConfiguration.UseForeshore.HasValue
+ || calculationConfiguration.BreakWaterHeight != null
+ || calculationConfiguration.BreakWaterType != null)
+ {
+ Log.LogCalculationConversionError(RingtoetsCommonIOResources.CalculationConfigurationImporter_ValidateWaveReduction_No_foreshore_profile_provided,
+ calculation.Name);
+ return false;
+ }
+ }
+ else if (!calculation.InputParameters.ForeshoreGeometry.Any())
+ {
+ if (calculationConfiguration.UseForeshore.HasValue && calculationConfiguration.UseForeshore.Value)
+ {
+ Log.LogCalculationConversionError(string.Format(
+ RingtoetsCommonIOResources.ReadForeshoreProfile_ForeshoreProfile_0_has_no_geometry_and_cannot_be_used,
+ calculationConfiguration.ForeshoreProfile),
+ calculation.Name);
+ return false;
+ }
+ }
+ return true;
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Revetment/src/Ringtoets.Revetment.IO/Configurations/WaveConditionsCalculationConfigurationReader.cs
===================================================================
diff -u
--- Ringtoets/Revetment/src/Ringtoets.Revetment.IO/Configurations/WaveConditionsCalculationConfigurationReader.cs (revision 0)
+++ Ringtoets/Revetment/src/Ringtoets.Revetment.IO/Configurations/WaveConditionsCalculationConfigurationReader.cs (revision 2057d3372084602a2d959db2e33dcf81de971a73)
@@ -0,0 +1,100 @@
+// Copyright (C) Stichting Deltares 2017. All rights reserved.
+//
+// This file is part of Ringtoets.
+//
+// Ringtoets is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
+//
+// All names, logos, and references to "Deltares" are registered trademarks of
+// Stichting Deltares and remain full property of Stichting Deltares at all times.
+// All rights reserved.
+
+using System;
+using System.Collections.Generic;
+using System.Xml.Linq;
+using Core.Common.Base.IO;
+using Ringtoets.Common.IO.Configurations;
+using Ringtoets.Common.IO.Configurations.Helpers;
+using Ringtoets.Common.IO.Configurations.Import;
+using Ringtoets.Revetment.IO.Configurations.Helpers;
+using Ringtoets.Revetment.IO.Properties;
+using RingtoestCommonIOResources = Ringtoets.Common.IO.Properties.Resources;
+
+namespace Ringtoets.Revetment.IO.Configurations
+{
+ ///
+ /// This class reads a wave conditions calculation configuration from XML and creates a collection of corresponding
+ /// , typically containing one or more .
+ ///
+ public class WaveConditionsCalculationConfigurationReader : CalculationConfigurationReader
+ {
+ private const string hydraulicBoundaryLocationSchemaName = "HrLocatieSchema.xsd";
+ private const string orientationSchemaName = "OrientatieSchema.xsd";
+ private const string foreshoreProfileSchemaName = "VoorlandProfielSchema.xsd";
+ private const string waveReductionSchemaName = "GolfReductieSchema.xsd";
+
+ ///
+ /// Creates a new instance of .
+ ///
+ /// The file path to the XML file.
+ /// Thrown when is invalid.
+ /// Thrown when:
+ ///
+ /// points to a file that does not exist.
+ /// points to a file that does not contain valid XML.
+ /// points to a file that does not pass the schema validation.
+ /// points to a file that does not contain configuration elements.
+ ///
+ ///
+ public WaveConditionsCalculationConfigurationReader(string xmlFilePath)
+ : base(xmlFilePath,
+ Resources.BekledingenHrConfiguratieSchema,
+ new Dictionary
+ {
+ {
+ hydraulicBoundaryLocationSchemaName, RingtoestCommonIOResources.HrLocatieSchema
+ },
+ {
+ orientationSchemaName, RingtoestCommonIOResources.OrientatieSchema
+ },
+ {
+ foreshoreProfileSchemaName, RingtoestCommonIOResources.VoorlandProfielSchema
+ },
+ {
+ waveReductionSchemaName, RingtoestCommonIOResources.GolfReductieSchema
+ }
+ }) {}
+
+ protected override WaveConditionsCalculationConfiguration ParseCalculationElement(XElement calculationElement)
+ {
+ var constructionProperties = new WaveConditionsCalculationConfiguration.ConstructionProperties
+ {
+ Name = calculationElement.Attribute(ConfigurationSchemaIdentifiers.NameAttribute).Value,
+ HydraulicBoundaryLocation = calculationElement.GetStringValueFromDescendantElement(ConfigurationSchemaIdentifiers.HydraulicBoundaryLocationElement),
+ UpperBoundaryRevetment = calculationElement.GetDoubleValueFromDescendantElement(WaveConditionsCalculationConfigurationSchemaIdentifiers.UpperBoundaryRevetment),
+ LowerBoundaryRevetment = calculationElement.GetDoubleValueFromDescendantElement(WaveConditionsCalculationConfigurationSchemaIdentifiers.LowerBoundaryRevetment),
+ UpperBoundaryWaterLevels = calculationElement.GetDoubleValueFromDescendantElement(WaveConditionsCalculationConfigurationSchemaIdentifiers.UpperBoundaryWaterLevels),
+ LowerBoundaryWaterLevels = calculationElement.GetDoubleValueFromDescendantElement(WaveConditionsCalculationConfigurationSchemaIdentifiers.LowerBoundaryWaterLevels),
+ StepSize = (ConfigurationWaveConditionsInputStepSize?) calculationElement.GetConvertedValueFromDescendantDoubleElement(WaveConditionsCalculationConfigurationSchemaIdentifiers.StepSize),
+ ForeshoreProfile = calculationElement.GetStringValueFromDescendantElement(WaveConditionsCalculationConfigurationSchemaIdentifiers.ForeshoreProfile),
+ Orientation = calculationElement.GetDoubleValueFromDescendantElement(ConfigurationSchemaIdentifiers.Orientation),
+ UseBreakWater = calculationElement.GetBoolValueFromDescendantElement(ConfigurationSchemaIdentifiers.UseBreakWater),
+ BreakWaterType = (ConfigurationBreakWaterType?) calculationElement.GetConvertedValueFromDescendantStringElement(ConfigurationSchemaIdentifiers.BreakWaterType),
+ BreakWaterHeight = calculationElement.GetDoubleValueFromDescendantElement(ConfigurationSchemaIdentifiers.BreakWaterHeight),
+ UseForeshore = calculationElement.GetBoolValueFromDescendantElement(ConfigurationSchemaIdentifiers.UseForeshore)
+ };
+
+ return new WaveConditionsCalculationConfiguration(constructionProperties);
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Revetment/src/Ringtoets.Revetment.IO/Configurations/WaveConditionsCalculationConfigurationSchemaIdentifiers.cs
===================================================================
diff -u
--- Ringtoets/Revetment/src/Ringtoets.Revetment.IO/Configurations/WaveConditionsCalculationConfigurationSchemaIdentifiers.cs (revision 0)
+++ Ringtoets/Revetment/src/Ringtoets.Revetment.IO/Configurations/WaveConditionsCalculationConfigurationSchemaIdentifiers.cs (revision 2057d3372084602a2d959db2e33dcf81de971a73)
@@ -0,0 +1,59 @@
+// Copyright (C) Stichting Deltares 2017. All rights reserved.
+//
+// This file is part of Ringtoets.
+//
+// Ringtoets is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
+//
+// All names, logos, and references to "Deltares" are registered trademarks of
+// Stichting Deltares and remain full property of Stichting Deltares at all times.
+// All rights reserved.
+
+namespace Ringtoets.Revetment.IO.Configurations
+{
+ ///
+ /// Container of identifiers related to the wave conditions calculation configuration schema definition.
+ ///
+ internal static class WaveConditionsCalculationConfigurationSchemaIdentifiers
+ {
+ ///
+ /// The tag of elements containing the upper boundary of revetment.
+ ///
+ internal const string UpperBoundaryRevetment = "bovengrensbekleding";
+
+ ///
+ /// The tag of elements containing the lower boundary of revetment.
+ ///
+ internal const string LowerBoundaryRevetment = "ondergrensbekleding";
+
+ ///
+ /// The tag of elements containing the upper boundary of water level.
+ ///
+ internal const string UpperBoundaryWaterLevels = "bovengrenswaterstanden";
+
+ ///
+ /// The tag of elements containing the lower boundary of water level.
+ ///
+ internal const string LowerBoundaryWaterLevels = "ondergrenswaterstanden";
+
+ ///
+ /// The tag of elements containing the step size of the water levels.
+ ///
+ internal const string StepSize = "stapgrootte";
+
+ ///
+ /// The tag of elements containing the name of the foreshore profile.
+ ///
+ internal const string ForeshoreProfile = "voorlandprofiel";
+ }
+}
\ No newline at end of file
Index: Ringtoets/Revetment/src/Ringtoets.Revetment.IO/Configurations/WaveConditionsCalculationConfigurationWriter.cs
===================================================================
diff -u
--- Ringtoets/Revetment/src/Ringtoets.Revetment.IO/Configurations/WaveConditionsCalculationConfigurationWriter.cs (revision 0)
+++ Ringtoets/Revetment/src/Ringtoets.Revetment.IO/Configurations/WaveConditionsCalculationConfigurationWriter.cs (revision 2057d3372084602a2d959db2e33dcf81de971a73)
@@ -0,0 +1,130 @@
+// Copyright (C) Stichting Deltares 2017. All rights reserved.
+//
+// This file is part of Ringtoets.
+//
+// Ringtoets is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
+//
+// All names, logos, and references to "Deltares" are registered trademarks of
+// Stichting Deltares and remain full property of Stichting Deltares at all times.
+// All rights reserved.
+
+using System.Xml;
+using Ringtoets.Common.Data.Calculation;
+using Ringtoets.Common.Data.DikeProfiles;
+using Ringtoets.Common.Data.Hydraulics;
+using Ringtoets.Common.IO.Configurations;
+using Ringtoets.Common.IO.Configurations.Export;
+using Ringtoets.Revetment.Data;
+using Ringtoets.Revetment.IO.Configurations.Helpers;
+
+namespace Ringtoets.Revetment.IO.Configurations
+{
+ ///
+ /// Base implementation of a writer for calculations that contain as input,
+ /// to XML format.
+ ///
+ /// The type of calculations that are written to file.
+ public abstract class WaveConditionsCalculationConfigurationWriter : CalculationConfigurationWriter where T : class, ICalculation
+ {
+ private readonly ConfigurationWaveConditionsInputStepSizeConverter configurationWaveConditionsInputStepSizeConverter;
+
+ ///
+ /// Created a new instance of .
+ ///
+ protected WaveConditionsCalculationConfigurationWriter()
+ {
+ configurationWaveConditionsInputStepSizeConverter = new ConfigurationWaveConditionsInputStepSizeConverter();
+ }
+
+ ///
+ /// Writes a single calculation with its in XML format to file.
+ ///
+ /// The name of the calculation to write.
+ /// The input of the calculation to write.
+ /// The writer to use for writing.
+ protected void WriteCalculation(string name, WaveConditionsInput input, XmlWriter writer)
+ {
+ writer.WriteStartElement(ConfigurationSchemaIdentifiers.CalculationElement);
+ writer.WriteAttributeString(ConfigurationSchemaIdentifiers.NameAttribute, name);
+
+ WriteHydraulicBoundaryLocation(input.HydraulicBoundaryLocation, writer);
+
+ writer.WriteElementString(
+ WaveConditionsCalculationConfigurationSchemaIdentifiers.UpperBoundaryRevetment,
+ XmlConvert.ToString(input.UpperBoundaryRevetment));
+ writer.WriteElementString(
+ WaveConditionsCalculationConfigurationSchemaIdentifiers.LowerBoundaryRevetment,
+ XmlConvert.ToString(input.LowerBoundaryRevetment));
+ writer.WriteElementString(
+ WaveConditionsCalculationConfigurationSchemaIdentifiers.UpperBoundaryWaterLevels,
+ XmlConvert.ToString(input.UpperBoundaryWaterLevels));
+ writer.WriteElementString(
+ WaveConditionsCalculationConfigurationSchemaIdentifiers.LowerBoundaryWaterLevels,
+ XmlConvert.ToString(input.LowerBoundaryWaterLevels));
+ writer.WriteElementString(
+ WaveConditionsCalculationConfigurationSchemaIdentifiers.StepSize,
+ configurationWaveConditionsInputStepSizeConverter.ConvertToInvariantString((ConfigurationWaveConditionsInputStepSize) input.StepSize));
+
+ WriteForeshoreProfile(input.ForeshoreProfile, writer);
+
+ writer.WriteElementString(
+ ConfigurationSchemaIdentifiers.Orientation,
+ XmlConvert.ToString(input.Orientation));
+
+ WriteWaveReduction(input, writer);
+
+ writer.WriteEndElement();
+ }
+
+ private static void WriteHydraulicBoundaryLocation(HydraulicBoundaryLocation hydraulicBoundaryLocation, XmlWriter writer)
+ {
+ if (hydraulicBoundaryLocation != null)
+ {
+ writer.WriteElementString(
+ ConfigurationSchemaIdentifiers.HydraulicBoundaryLocationElement,
+ hydraulicBoundaryLocation.Name);
+ }
+ }
+
+ private static void WriteForeshoreProfile(ForeshoreProfile foreshoreProfile, XmlWriter writer)
+ {
+ if (foreshoreProfile != null)
+ {
+ writer.WriteElementString(
+ WaveConditionsCalculationConfigurationSchemaIdentifiers.ForeshoreProfile,
+ foreshoreProfile.Id);
+ }
+ }
+
+ private static void WriteWaveReduction(WaveConditionsInput input, XmlWriter writer)
+ {
+ if (input.ForeshoreProfile != null)
+ {
+ writer.WriteStartElement(ConfigurationSchemaIdentifiers.WaveReduction);
+
+ writer.WriteElementString(
+ ConfigurationSchemaIdentifiers.UseBreakWater,
+ XmlConvert.ToString(input.UseBreakWater));
+
+ WriteBreakWaterProperties(input.BreakWater, writer);
+
+ writer.WriteElementString(
+ ConfigurationSchemaIdentifiers.UseForeshore,
+ XmlConvert.ToString(input.UseForeshore));
+
+ writer.WriteEndElement();
+ }
+ }
+ }
+}
\ No newline at end of file
Fisheye: Tag 2057d3372084602a2d959db2e33dcf81de971a73 refers to a dead (removed) revision in file `Ringtoets/Revetment/src/Ringtoets.Revetment.IO/CoverType.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 2057d3372084602a2d959db2e33dcf81de971a73 refers to a dead (removed) revision in file `Ringtoets/Revetment/src/Ringtoets.Revetment.IO/ExportableWaveConditions.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 2057d3372084602a2d959db2e33dcf81de971a73 refers to a dead (removed) revision in file `Ringtoets/Revetment/src/Ringtoets.Revetment.IO/ExportableWaveConditionsFactory.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 2057d3372084602a2d959db2e33dcf81de971a73 refers to a dead (removed) revision in file `Ringtoets/Revetment/src/Ringtoets.Revetment.IO/Exporters/WaveConditionsExporterBase.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 2057d3372084602a2d959db2e33dcf81de971a73 refers to a dead (removed) revision in file `Ringtoets/Revetment/src/Ringtoets.Revetment.IO/Importers/WaveConditionsCalculationConfigurationImporter.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 2057d3372084602a2d959db2e33dcf81de971a73 refers to a dead (removed) revision in file `Ringtoets/Revetment/src/Ringtoets.Revetment.IO/ReadWaveConditionsInputStepSize.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 2057d3372084602a2d959db2e33dcf81de971a73 refers to a dead (removed) revision in file `Ringtoets/Revetment/src/Ringtoets.Revetment.IO/ReadWaveConditionsInputStepSizeConverter.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 2057d3372084602a2d959db2e33dcf81de971a73 refers to a dead (removed) revision in file `Ringtoets/Revetment/src/Ringtoets.Revetment.IO/Readers/ReadWaveConditionsCalculation.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 2057d3372084602a2d959db2e33dcf81de971a73 refers to a dead (removed) revision in file `Ringtoets/Revetment/src/Ringtoets.Revetment.IO/Readers/WaveConditionsCalculationConfigurationReader.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: Ringtoets/Revetment/src/Ringtoets.Revetment.IO/Ringtoets.Revetment.IO.csproj
===================================================================
diff -u -r56daaecf144ac21035cad0977ae4c2c8294449c0 -r2057d3372084602a2d959db2e33dcf81de971a73
--- Ringtoets/Revetment/src/Ringtoets.Revetment.IO/Ringtoets.Revetment.IO.csproj (.../Ringtoets.Revetment.IO.csproj) (revision 56daaecf144ac21035cad0977ae4c2c8294449c0)
+++ Ringtoets/Revetment/src/Ringtoets.Revetment.IO/Ringtoets.Revetment.IO.csproj (.../Ringtoets.Revetment.IO.csproj) (revision 2057d3372084602a2d959db2e33dcf81de971a73)
@@ -45,24 +45,24 @@
Properties\GlobalAssembly.cs
-
-
-
-
+
+
+
+ TrueTrueResources.resx
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
@@ -112,6 +112,7 @@
Designer
+