Index: Ringtoets/Common/src/Ringtoets.Common.IO/Properties/Resources.Designer.cs =================================================================== diff -u -r5e9837463c9e1f6fcf8404b943e374650586f99e -rb84f4b9c37b5ce0bd49b65269c4984c0bc1543e8 --- Ringtoets/Common/src/Ringtoets.Common.IO/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 5e9837463c9e1f6fcf8404b943e374650586f99e) +++ Ringtoets/Common/src/Ringtoets.Common.IO/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision b84f4b9c37b5ce0bd49b65269c4984c0bc1543e8) @@ -605,6 +605,26 @@ } /// + /// Looks up a localized string similar to <?xml version="1.0" encoding="utf-8"?><!-- + ///Copyright (C) Stichting Deltares 2016. 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 [rest of string was truncated]";. + /// + public static string GolfReductieSchema { + get { + return ResourceManager.GetString("GolfReductieSchema", resourceCulture); + } + } + + /// /// Looks up a localized string similar to <?xml version="1.0" encoding="utf-8"?> /// ///<!-- @@ -801,6 +821,26 @@ } /// + /// Looks up a localized string similar to <?xml version="1.0" encoding="utf-8"?><!-- + ///Copyright (C) Stichting Deltares 2016. 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 [rest of string was truncated]";. + /// + public static string OrientatieSchema { + get { + return ResourceManager.GetString("OrientatieSchema", resourceCulture); + } + } + + /// /// Looks up a localized string similar to Kon geen punten vinden in dit bestand.. /// public static string PointShapefileReader_File_can_only_contain_points { @@ -1467,5 +1507,25 @@ return ResourceManager.GetString("StructuresReader_GetNextStructure_Invalid_KWKIDENT", resourceCulture); } } + + /// + /// Looks up a localized string similar to <?xml version="1.0" encoding="utf-8"?><!-- + ///Copyright (C) Stichting Deltares 2016. 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 [rest of string was truncated]";. + /// + public static string VoorlandProfielSchema { + get { + return ResourceManager.GetString("VoorlandProfielSchema", resourceCulture); + } + } } } Index: Ringtoets/Common/src/Ringtoets.Common.IO/Properties/Resources.resx =================================================================== diff -u -r5e9837463c9e1f6fcf8404b943e374650586f99e -rb84f4b9c37b5ce0bd49b65269c4984c0bc1543e8 --- Ringtoets/Common/src/Ringtoets.Common.IO/Properties/Resources.resx (.../Resources.resx) (revision 5e9837463c9e1f6fcf8404b943e374650586f99e) +++ Ringtoets/Common/src/Ringtoets.Common.IO/Properties/Resources.resx (.../Resources.resx) (revision b84f4b9c37b5ce0bd49b65269c4984c0bc1543e8) @@ -534,4 +534,13 @@ Valideren berekeningenconfiguratie. + + ..\Resources\GolfReductieSchema.xsd;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8 + + + ..\Resources\OrientatieSchema.xsd;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252 + + + ..\Resources\VoorlandProfielSchema.xsd;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252 + \ No newline at end of file Index: Ringtoets/Common/src/Ringtoets.Common.IO/Resources/GolfReductieSchema.xsd =================================================================== diff -u --- Ringtoets/Common/src/Ringtoets.Common.IO/Resources/GolfReductieSchema.xsd (revision 0) +++ Ringtoets/Common/src/Ringtoets.Common.IO/Resources/GolfReductieSchema.xsd (revision b84f4b9c37b5ce0bd49b65269c4984c0bc1543e8) @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file Index: Ringtoets/Common/src/Ringtoets.Common.IO/Resources/OrientatieSchema.xsd =================================================================== diff -u --- Ringtoets/Common/src/Ringtoets.Common.IO/Resources/OrientatieSchema.xsd (revision 0) +++ Ringtoets/Common/src/Ringtoets.Common.IO/Resources/OrientatieSchema.xsd (revision b84f4b9c37b5ce0bd49b65269c4984c0bc1543e8) @@ -0,0 +1,32 @@ + + + + + + + + + + + \ No newline at end of file Index: Ringtoets/Common/src/Ringtoets.Common.IO/Resources/VoorlandProfielSchema.xsd =================================================================== diff -u --- Ringtoets/Common/src/Ringtoets.Common.IO/Resources/VoorlandProfielSchema.xsd (revision 0) +++ Ringtoets/Common/src/Ringtoets.Common.IO/Resources/VoorlandProfielSchema.xsd (revision b84f4b9c37b5ce0bd49b65269c4984c0bc1543e8) @@ -0,0 +1,40 @@ + + + + + + + + + + + + + \ No newline at end of file Index: Ringtoets/Common/src/Ringtoets.Common.IO/Ringtoets.Common.IO.csproj =================================================================== diff -u -rfc204f9f1958c10c27c00e43fc2dba43565f7b35 -rb84f4b9c37b5ce0bd49b65269c4984c0bc1543e8 --- Ringtoets/Common/src/Ringtoets.Common.IO/Ringtoets.Common.IO.csproj (.../Ringtoets.Common.IO.csproj) (revision fc204f9f1958c10c27c00e43fc2dba43565f7b35) +++ Ringtoets/Common/src/Ringtoets.Common.IO/Ringtoets.Common.IO.csproj (.../Ringtoets.Common.IO.csproj) (revision b84f4b9c37b5ce0bd49b65269c4984c0bc1543e8) @@ -120,12 +120,21 @@ Designer + + Designer + Designer + + Designer + Designer + + Designer + Index: Ringtoets/Revetment/src/Ringtoets.Revetment.IO/Properties/AssemblyInfo.cs =================================================================== diff -u -r2973c5f790a5131e427bd5f73e2a620044199639 -rb84f4b9c37b5ce0bd49b65269c4984c0bc1543e8 --- Ringtoets/Revetment/src/Ringtoets.Revetment.IO/Properties/AssemblyInfo.cs (.../AssemblyInfo.cs) (revision 2973c5f790a5131e427bd5f73e2a620044199639) +++ Ringtoets/Revetment/src/Ringtoets.Revetment.IO/Properties/AssemblyInfo.cs (.../AssemblyInfo.cs) (revision b84f4b9c37b5ce0bd49b65269c4984c0bc1543e8) @@ -20,8 +20,10 @@ // All rights reserved. using System.Reflection; +using System.Runtime.CompilerServices; using System.Runtime.InteropServices; [assembly: AssemblyTitle("Ringtoets.Revetment.IO")] [assembly: AssemblyProduct("Ringtoets.Revetment.IO")] -[assembly: Guid("c344f779-1341-47eb-acf6-e87560c57132")] \ No newline at end of file +[assembly: Guid("c344f779-1341-47eb-acf6-e87560c57132")] +[assembly: InternalsVisibleTo("Ringtoets.Revetment.IO.Test")] \ No newline at end of file Index: Ringtoets/Revetment/src/Ringtoets.Revetment.IO/Properties/Resources.Designer.cs =================================================================== diff -u -r878116dd950653a518d005a6f1a6e87e8ed585b1 -rb84f4b9c37b5ce0bd49b65269c4984c0bc1543e8 --- Ringtoets/Revetment/src/Ringtoets.Revetment.IO/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 878116dd950653a518d005a6f1a6e87e8ed585b1) +++ Ringtoets/Revetment/src/Ringtoets.Revetment.IO/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision b84f4b9c37b5ce0bd49b65269c4984c0bc1543e8) @@ -82,6 +82,28 @@ } /// + /// Looks up a localized string similar to <?xml version="1.0" encoding="UTF-8"?> + /// + ///<!-- + ///Copyright (C) Stichting Deltares 2016. 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 warrant [rest of string was truncated]";. + /// + internal static string BekledingenHrConfiguratieSchema { + get { + return ResourceManager.GetString("BekledingenHrConfiguratieSchema", resourceCulture); + } + } + + /// /// Looks up a localized string similar to Asfalt. /// internal static string CoverType_Asphalt { Index: Ringtoets/Revetment/src/Ringtoets.Revetment.IO/Properties/Resources.resx =================================================================== diff -u -r878116dd950653a518d005a6f1a6e87e8ed585b1 -rb84f4b9c37b5ce0bd49b65269c4984c0bc1543e8 --- Ringtoets/Revetment/src/Ringtoets.Revetment.IO/Properties/Resources.resx (.../Resources.resx) (revision 878116dd950653a518d005a6f1a6e87e8ed585b1) +++ Ringtoets/Revetment/src/Ringtoets.Revetment.IO/Properties/Resources.resx (.../Resources.resx) (revision b84f4b9c37b5ce0bd49b65269c4984c0bc1543e8) @@ -141,4 +141,8 @@ Gras + + + ..\Resources\BekledingenHrConfiguratieSchema.xsd;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252 + \ No newline at end of file Index: Ringtoets/Revetment/src/Ringtoets.Revetment.IO/Readers/ReadWaveConditionsInput.cs =================================================================== diff -u --- Ringtoets/Revetment/src/Ringtoets.Revetment.IO/Readers/ReadWaveConditionsInput.cs (revision 0) +++ Ringtoets/Revetment/src/Ringtoets.Revetment.IO/Readers/ReadWaveConditionsInput.cs (revision b84f4b9c37b5ce0bd49b65269c4984c0bc1543e8) @@ -0,0 +1,30 @@ +// Copyright (C) Stichting Deltares 2016. 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 Ringtoets.Common.IO.Readers; + +namespace Ringtoets.Revetment.IO.Readers +{ + internal class ReadWaveConditionsInput : IReadConfigurationItem + { + public string Name { get; } + } +} \ No newline at end of file Index: Ringtoets/Revetment/src/Ringtoets.Revetment.IO/Readers/WaveConditionsInputConfigurationReader.cs =================================================================== diff -u --- Ringtoets/Revetment/src/Ringtoets.Revetment.IO/Readers/WaveConditionsInputConfigurationReader.cs (revision 0) +++ Ringtoets/Revetment/src/Ringtoets.Revetment.IO/Readers/WaveConditionsInputConfigurationReader.cs (revision b84f4b9c37b5ce0bd49b65269c4984c0bc1543e8) @@ -0,0 +1,80 @@ +// Copyright (C) Stichting Deltares 2016. 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.IO.Exceptions; +using Ringtoets.Common.IO.Readers; +using Ringtoets.Revetment.IO.Properties; +using RingtoestCommonIOResources = Ringtoets.Common.IO.Properties.Resources; + +namespace Ringtoets.Revetment.IO.Readers +{ + /// + /// This class reads a wave conditions configuration from XML and creates a collection of corresponding + /// , typically containing one or more . + /// + internal class WaveConditionsInputConfigurationReader : ConfigurationReader + { + 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 WaveConditionsInputConfigurationReader(string xmlFilePath) + : base(xmlFilePath, + Resources.BekledingenHrConfiguratieSchema, + new Dictionary + { + { + hydraulicBoundaryLocationSchemaName, RingtoestCommonIOResources.HrLocatieSchema + }, + { + orientationSchemaName, RingtoestCommonIOResources.OrientatieSchema + }, + { + foreshoreProfileSchemaName, RingtoestCommonIOResources.VoorlandProfielSchema + }, + { + waveReductionSchemaName, RingtoestCommonIOResources.GolfReductieSchema + } + }) {} + + protected override ReadWaveConditionsInput ParseCalculationElement(XElement calculationElement) + { + throw new NotImplementedException(); + } + } +} \ No newline at end of file Index: Ringtoets/Revetment/src/Ringtoets.Revetment.IO/Resources/BekledingenHrConfiguratieSchema.xsd =================================================================== diff -u --- Ringtoets/Revetment/src/Ringtoets.Revetment.IO/Resources/BekledingenHrConfiguratieSchema.xsd (revision 0) +++ Ringtoets/Revetment/src/Ringtoets.Revetment.IO/Resources/BekledingenHrConfiguratieSchema.xsd (revision b84f4b9c37b5ce0bd49b65269c4984c0bc1543e8) @@ -0,0 +1,103 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file Index: Ringtoets/Revetment/src/Ringtoets.Revetment.IO/Ringtoets.Revetment.IO.csproj =================================================================== diff -u -rfde0ecf7d1d897337907d512aab471ead4a4c5e4 -rb84f4b9c37b5ce0bd49b65269c4984c0bc1543e8 --- Ringtoets/Revetment/src/Ringtoets.Revetment.IO/Ringtoets.Revetment.IO.csproj (.../Ringtoets.Revetment.IO.csproj) (revision fde0ecf7d1d897337907d512aab471ead4a4c5e4) +++ Ringtoets/Revetment/src/Ringtoets.Revetment.IO/Ringtoets.Revetment.IO.csproj (.../Ringtoets.Revetment.IO.csproj) (revision b84f4b9c37b5ce0bd49b65269c4984c0bc1543e8) @@ -39,6 +39,7 @@ + @@ -53,6 +54,8 @@ True Resources.resx + + @@ -64,6 +67,9 @@ Copying.licenseheader + + Designer + Index: Ringtoets/Revetment/test/Ringtoets.Revetment.IO.Test/Readers/ReadWaveConditionsInputTest.cs =================================================================== diff -u --- Ringtoets/Revetment/test/Ringtoets.Revetment.IO.Test/Readers/ReadWaveConditionsInputTest.cs (revision 0) +++ Ringtoets/Revetment/test/Ringtoets.Revetment.IO.Test/Readers/ReadWaveConditionsInputTest.cs (revision b84f4b9c37b5ce0bd49b65269c4984c0bc1543e8) @@ -0,0 +1,41 @@ +// Copyright (C) Stichting Deltares 2016. 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 NUnit.Framework; +using Ringtoets.Common.IO.Readers; +using Ringtoets.Revetment.IO.Readers; + +namespace Ringtoets.Revetment.IO.Test.Readers +{ + [TestFixture] + public class ReadWaveConditionsInputTest + { + [Test] + public void Constructor_ExpectedValues() + { + // Call + var readItem = new ReadWaveConditionsInput(); + + // Assert + Assert.IsInstanceOf(readItem); + } + } +} \ No newline at end of file Index: Ringtoets/Revetment/test/Ringtoets.Revetment.IO.Test/Readers/WaveConditionsInputConfigurationReaderTest.cs =================================================================== diff -u --- Ringtoets/Revetment/test/Ringtoets.Revetment.IO.Test/Readers/WaveConditionsInputConfigurationReaderTest.cs (revision 0) +++ Ringtoets/Revetment/test/Ringtoets.Revetment.IO.Test/Readers/WaveConditionsInputConfigurationReaderTest.cs (revision b84f4b9c37b5ce0bd49b65269c4984c0bc1543e8) @@ -0,0 +1,49 @@ +// Copyright (C) Stichting Deltares 2016. 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.IO; +using Core.Common.TestUtil; +using NUnit.Framework; +using Ringtoets.Common.IO.Readers; +using Ringtoets.Revetment.IO.Readers; + +namespace Ringtoets.Revetment.IO.Test.Readers +{ + [TestFixture] + public class WaveConditionsInputConfigurationReaderTest + { + private readonly string testDirectoryPath = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.Revetment.IO, + "WaveConditionsInputConfigurationReader"); + + [Test] + public void Constructor_ExpectedValues() + { + // Setup + string filePath = Path.Combine(testDirectoryPath, "validConfigurationEmptyCalculation.xml"); + + // Call + var reader = new WaveConditionsInputConfigurationReader(filePath); + + // Assert + Assert.IsInstanceOf>(reader); + } + } +} \ No newline at end of file Index: Ringtoets/Revetment/test/Ringtoets.Revetment.IO.Test/Ringtoets.Revetment.IO.Test.csproj =================================================================== diff -u -rfde0ecf7d1d897337907d512aab471ead4a4c5e4 -rb84f4b9c37b5ce0bd49b65269c4984c0bc1543e8 --- Ringtoets/Revetment/test/Ringtoets.Revetment.IO.Test/Ringtoets.Revetment.IO.Test.csproj (.../Ringtoets.Revetment.IO.Test.csproj) (revision fde0ecf7d1d897337907d512aab471ead4a4c5e4) +++ Ringtoets/Revetment/test/Ringtoets.Revetment.IO.Test/Ringtoets.Revetment.IO.Test.csproj (.../Ringtoets.Revetment.IO.Test.csproj) (revision b84f4b9c37b5ce0bd49b65269c4984c0bc1543e8) @@ -54,6 +54,8 @@ + + Index: Ringtoets/Revetment/test/Ringtoets.Revetment.IO.Test/test-data/WaveConditionsInputConfigurationReader/validConfigurationEmptyCalculation.xml =================================================================== diff -u --- Ringtoets/Revetment/test/Ringtoets.Revetment.IO.Test/test-data/WaveConditionsInputConfigurationReader/validConfigurationEmptyCalculation.xml (revision 0) +++ Ringtoets/Revetment/test/Ringtoets.Revetment.IO.Test/test-data/WaveConditionsInputConfigurationReader/validConfigurationEmptyCalculation.xml (revision b84f4b9c37b5ce0bd49b65269c4984c0bc1543e8) @@ -0,0 +1,4 @@ + + + +