Index: Ringtoets.sln
===================================================================
diff -u -r0585edaba71d05905dd6196ded7356dbd5155214 -r457970572d405d707ca5a96836d6a48babffc3a7
--- Ringtoets.sln (.../Ringtoets.sln) (revision 0585edaba71d05905dd6196ded7356dbd5155214)
+++ Ringtoets.sln (.../Ringtoets.sln) (revision 457970572d405d707ca5a96836d6a48babffc3a7)
@@ -1865,7 +1865,7 @@
{C90B77DA-E421-43CC-B82E-529651BC21AC} = {C90B77DA-E421-43CC-B82E-529651BC21AC}
EndProjectSection
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Riskeer.Integration.IO", "Ringtoets\Integration\src\Ringtoets.Integration.IO\Riskeer.Integration.IO.csproj", "{D693D18E-C257-4FDE-96BC-F6E6FB043ECF}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Riskeer.Integration.IO", "Ringtoets\Integration\src\Riskeer.Integration.IO\Riskeer.Integration.IO.csproj", "{D693D18E-C257-4FDE-96BC-F6E6FB043ECF}"
ProjectSection(ProjectDependencies) = postProject
{C90B77DA-E421-43CC-B82E-529651BC21AC} = {C90B77DA-E421-43CC-B82E-529651BC21AC}
EndProjectSection
Fisheye: Tag 457970572d405d707ca5a96836d6a48babffc3a7 refers to a dead (removed) revision in file `Ringtoets/Integration/src/Ringtoets.Integration.IO/AggregatedSerializable/AggregatedSerializableCombinedFailureMechanismSectionAssemblies.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 457970572d405d707ca5a96836d6a48babffc3a7 refers to a dead (removed) revision in file `Ringtoets/Integration/src/Ringtoets.Integration.IO/AggregatedSerializable/AggregatedSerializableCombinedFailureMechanismSectionAssembly.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 457970572d405d707ca5a96836d6a48babffc3a7 refers to a dead (removed) revision in file `Ringtoets/Integration/src/Ringtoets.Integration.IO/AggregatedSerializable/AggregatedSerializableFailureMechanism.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 457970572d405d707ca5a96836d6a48babffc3a7 refers to a dead (removed) revision in file `Ringtoets/Integration/src/Ringtoets.Integration.IO/AggregatedSerializable/AggregatedSerializableFailureMechanismSectionAssembly.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 457970572d405d707ca5a96836d6a48babffc3a7 refers to a dead (removed) revision in file `Ringtoets/Integration/src/Ringtoets.Integration.IO/Assembly/ExportableAggregatedFailureMechanismSectionAssemblyResult.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 457970572d405d707ca5a96836d6a48babffc3a7 refers to a dead (removed) revision in file `Ringtoets/Integration/src/Ringtoets.Integration.IO/Assembly/ExportableAggregatedFailureMechanismSectionAssemblyResultBase.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 457970572d405d707ca5a96836d6a48babffc3a7 refers to a dead (removed) revision in file `Ringtoets/Integration/src/Ringtoets.Integration.IO/Assembly/ExportableAggregatedFailureMechanismSectionAssemblyResultWithProbability.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 457970572d405d707ca5a96836d6a48babffc3a7 refers to a dead (removed) revision in file `Ringtoets/Integration/src/Ringtoets.Integration.IO/Assembly/ExportableAggregatedFailureMechanismSectionAssemblyResultWithoutDetailedAssembly.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 457970572d405d707ca5a96836d6a48babffc3a7 refers to a dead (removed) revision in file `Ringtoets/Integration/src/Ringtoets.Integration.IO/Assembly/ExportableAggregatedFailureMechanismSectionAssemblyWithCombinedProbabilityResult.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 457970572d405d707ca5a96836d6a48babffc3a7 refers to a dead (removed) revision in file `Ringtoets/Integration/src/Ringtoets.Integration.IO/Assembly/ExportableAggregatedFailureMechanismSectionAssemblyWithCombinedResult.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 457970572d405d707ca5a96836d6a48babffc3a7 refers to a dead (removed) revision in file `Ringtoets/Integration/src/Ringtoets.Integration.IO/Assembly/ExportableAssemblyMethod.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 457970572d405d707ca5a96836d6a48babffc3a7 refers to a dead (removed) revision in file `Ringtoets/Integration/src/Ringtoets.Integration.IO/Assembly/ExportableAssessmentSection.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 457970572d405d707ca5a96836d6a48babffc3a7 refers to a dead (removed) revision in file `Ringtoets/Integration/src/Ringtoets.Integration.IO/Assembly/ExportableAssessmentSectionAssemblyResult.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 457970572d405d707ca5a96836d6a48babffc3a7 refers to a dead (removed) revision in file `Ringtoets/Integration/src/Ringtoets.Integration.IO/Assembly/ExportableCombinedFailureMechanismSection.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 457970572d405d707ca5a96836d6a48babffc3a7 refers to a dead (removed) revision in file `Ringtoets/Integration/src/Ringtoets.Integration.IO/Assembly/ExportableCombinedSectionAssembly.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 457970572d405d707ca5a96836d6a48babffc3a7 refers to a dead (removed) revision in file `Ringtoets/Integration/src/Ringtoets.Integration.IO/Assembly/ExportableFailureMechanism.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 457970572d405d707ca5a96836d6a48babffc3a7 refers to a dead (removed) revision in file `Ringtoets/Integration/src/Ringtoets.Integration.IO/Assembly/ExportableFailureMechanismAssemblyResult.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 457970572d405d707ca5a96836d6a48babffc3a7 refers to a dead (removed) revision in file `Ringtoets/Integration/src/Ringtoets.Integration.IO/Assembly/ExportableFailureMechanismAssemblyResultWithProbability.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 457970572d405d707ca5a96836d6a48babffc3a7 refers to a dead (removed) revision in file `Ringtoets/Integration/src/Ringtoets.Integration.IO/Assembly/ExportableFailureMechanismCombinedSectionAssemblyResult.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 457970572d405d707ca5a96836d6a48babffc3a7 refers to a dead (removed) revision in file `Ringtoets/Integration/src/Ringtoets.Integration.IO/Assembly/ExportableFailureMechanismGroup.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 457970572d405d707ca5a96836d6a48babffc3a7 refers to a dead (removed) revision in file `Ringtoets/Integration/src/Ringtoets.Integration.IO/Assembly/ExportableFailureMechanismSection.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 457970572d405d707ca5a96836d6a48babffc3a7 refers to a dead (removed) revision in file `Ringtoets/Integration/src/Ringtoets.Integration.IO/Assembly/ExportableFailureMechanismType.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 457970572d405d707ca5a96836d6a48babffc3a7 refers to a dead (removed) revision in file `Ringtoets/Integration/src/Ringtoets.Integration.IO/Assembly/ExportableSectionAssemblyResult.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 457970572d405d707ca5a96836d6a48babffc3a7 refers to a dead (removed) revision in file `Ringtoets/Integration/src/Ringtoets.Integration.IO/Assembly/ExportableSectionAssemblyResultWithProbability.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 457970572d405d707ca5a96836d6a48babffc3a7 refers to a dead (removed) revision in file `Ringtoets/Integration/src/Ringtoets.Integration.IO/Creators/AggregatedSerializableCombinedFailureMechanismSectionAssembliesCreator.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 457970572d405d707ca5a96836d6a48babffc3a7 refers to a dead (removed) revision in file `Ringtoets/Integration/src/Ringtoets.Integration.IO/Creators/AggregatedSerializableCombinedFailureMechanismSectionAssemblyCreator.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 457970572d405d707ca5a96836d6a48babffc3a7 refers to a dead (removed) revision in file `Ringtoets/Integration/src/Ringtoets.Integration.IO/Creators/AggregatedSerializableFailureMechanismCreator.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 457970572d405d707ca5a96836d6a48babffc3a7 refers to a dead (removed) revision in file `Ringtoets/Integration/src/Ringtoets.Integration.IO/Creators/AggregatedSerializableFailureMechanismSectionAssemblyCreator.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 457970572d405d707ca5a96836d6a48babffc3a7 refers to a dead (removed) revision in file `Ringtoets/Integration/src/Ringtoets.Integration.IO/Creators/SerializableAssemblyCreator.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 457970572d405d707ca5a96836d6a48babffc3a7 refers to a dead (removed) revision in file `Ringtoets/Integration/src/Ringtoets.Integration.IO/Creators/SerializableAssemblyMethodCreator.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 457970572d405d707ca5a96836d6a48babffc3a7 refers to a dead (removed) revision in file `Ringtoets/Integration/src/Ringtoets.Integration.IO/Creators/SerializableAssessmentProcessCreator.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 457970572d405d707ca5a96836d6a48babffc3a7 refers to a dead (removed) revision in file `Ringtoets/Integration/src/Ringtoets.Integration.IO/Creators/SerializableAssessmentSectionAssemblyResultCreator.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 457970572d405d707ca5a96836d6a48babffc3a7 refers to a dead (removed) revision in file `Ringtoets/Integration/src/Ringtoets.Integration.IO/Creators/SerializableAssessmentSectionCategoryGroupCreator.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 457970572d405d707ca5a96836d6a48babffc3a7 refers to a dead (removed) revision in file `Ringtoets/Integration/src/Ringtoets.Integration.IO/Creators/SerializableAssessmentSectionCreator.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 457970572d405d707ca5a96836d6a48babffc3a7 refers to a dead (removed) revision in file `Ringtoets/Integration/src/Ringtoets.Integration.IO/Creators/SerializableCombinedFailureMechanismSectionAssemblyResultCreator.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 457970572d405d707ca5a96836d6a48babffc3a7 refers to a dead (removed) revision in file `Ringtoets/Integration/src/Ringtoets.Integration.IO/Creators/SerializableFailureMechanismCategoryGroupCreator.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 457970572d405d707ca5a96836d6a48babffc3a7 refers to a dead (removed) revision in file `Ringtoets/Integration/src/Ringtoets.Integration.IO/Creators/SerializableFailureMechanismCreator.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 457970572d405d707ca5a96836d6a48babffc3a7 refers to a dead (removed) revision in file `Ringtoets/Integration/src/Ringtoets.Integration.IO/Creators/SerializableFailureMechanismGroupCreator.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 457970572d405d707ca5a96836d6a48babffc3a7 refers to a dead (removed) revision in file `Ringtoets/Integration/src/Ringtoets.Integration.IO/Creators/SerializableFailureMechanismResultCreator.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 457970572d405d707ca5a96836d6a48babffc3a7 refers to a dead (removed) revision in file `Ringtoets/Integration/src/Ringtoets.Integration.IO/Creators/SerializableFailureMechanismSectionAssemblyResultCreator.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 457970572d405d707ca5a96836d6a48babffc3a7 refers to a dead (removed) revision in file `Ringtoets/Integration/src/Ringtoets.Integration.IO/Creators/SerializableFailureMechanismSectionCategoryGroupCreator.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 457970572d405d707ca5a96836d6a48babffc3a7 refers to a dead (removed) revision in file `Ringtoets/Integration/src/Ringtoets.Integration.IO/Creators/SerializableFailureMechanismSectionCreator.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 457970572d405d707ca5a96836d6a48babffc3a7 refers to a dead (removed) revision in file `Ringtoets/Integration/src/Ringtoets.Integration.IO/Creators/SerializableFailureMechanismTypeCreator.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 457970572d405d707ca5a96836d6a48babffc3a7 refers to a dead (removed) revision in file `Ringtoets/Integration/src/Ringtoets.Integration.IO/Creators/SerializableTotalAssemblyResultCreator.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 457970572d405d707ca5a96836d6a48babffc3a7 refers to a dead (removed) revision in file `Ringtoets/Integration/src/Ringtoets.Integration.IO/Exceptions/AssemblyCreatorException.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 457970572d405d707ca5a96836d6a48babffc3a7 refers to a dead (removed) revision in file `Ringtoets/Integration/src/Ringtoets.Integration.IO/Exporters/AssemblyExporter.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 457970572d405d707ca5a96836d6a48babffc3a7 refers to a dead (removed) revision in file `Ringtoets/Integration/src/Ringtoets.Integration.IO/Exporters/HydraulicBoundaryLocationsExporter.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 457970572d405d707ca5a96836d6a48babffc3a7 refers to a dead (removed) revision in file `Ringtoets/Integration/src/Ringtoets.Integration.IO/Exporters/HydraulicBoundaryLocationsWriter.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 457970572d405d707ca5a96836d6a48babffc3a7 refers to a dead (removed) revision in file `Ringtoets/Integration/src/Ringtoets.Integration.IO/Factories/ExportableAssessmentSectionFactory.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 457970572d405d707ca5a96836d6a48babffc3a7 refers to a dead (removed) revision in file `Ringtoets/Integration/src/Ringtoets.Integration.IO/Factories/ExportableClosingStructuresFailureMechanismFactory.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 457970572d405d707ca5a96836d6a48babffc3a7 refers to a dead (removed) revision in file `Ringtoets/Integration/src/Ringtoets.Integration.IO/Factories/ExportableCombinedSectionAssemblyFactory.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 457970572d405d707ca5a96836d6a48babffc3a7 refers to a dead (removed) revision in file `Ringtoets/Integration/src/Ringtoets.Integration.IO/Factories/ExportableDuneErosionFailureMechanismFactory.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 457970572d405d707ca5a96836d6a48babffc3a7 refers to a dead (removed) revision in file `Ringtoets/Integration/src/Ringtoets.Integration.IO/Factories/ExportableFailureMechanismFactory.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 457970572d405d707ca5a96836d6a48babffc3a7 refers to a dead (removed) revision in file `Ringtoets/Integration/src/Ringtoets.Integration.IO/Factories/ExportableGrassCoverErosionInwardsFailureMechanismFactory.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 457970572d405d707ca5a96836d6a48babffc3a7 refers to a dead (removed) revision in file `Ringtoets/Integration/src/Ringtoets.Integration.IO/Factories/ExportableGrassCoverErosionOutwardsFailureMechanismFactory.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 457970572d405d707ca5a96836d6a48babffc3a7 refers to a dead (removed) revision in file `Ringtoets/Integration/src/Ringtoets.Integration.IO/Factories/ExportableGrassCoverSlipOffInwardsFailureMechanismFactory.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 457970572d405d707ca5a96836d6a48babffc3a7 refers to a dead (removed) revision in file `Ringtoets/Integration/src/Ringtoets.Integration.IO/Factories/ExportableGrassCoverSlipOffOutwardsFailureMechanismFactory.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 457970572d405d707ca5a96836d6a48babffc3a7 refers to a dead (removed) revision in file `Ringtoets/Integration/src/Ringtoets.Integration.IO/Factories/ExportableHeightStructuresFailureMechanismFactory.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 457970572d405d707ca5a96836d6a48babffc3a7 refers to a dead (removed) revision in file `Ringtoets/Integration/src/Ringtoets.Integration.IO/Factories/ExportableMacroStabilityInwardsFailureMechanismFactory.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 457970572d405d707ca5a96836d6a48babffc3a7 refers to a dead (removed) revision in file `Ringtoets/Integration/src/Ringtoets.Integration.IO/Factories/ExportableMacroStabilityOutwardsFailureMechanismFactory.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 457970572d405d707ca5a96836d6a48babffc3a7 refers to a dead (removed) revision in file `Ringtoets/Integration/src/Ringtoets.Integration.IO/Factories/ExportableMicrostabilityFailureMechanismFactory.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 457970572d405d707ca5a96836d6a48babffc3a7 refers to a dead (removed) revision in file `Ringtoets/Integration/src/Ringtoets.Integration.IO/Factories/ExportablePipingFailureMechanismFactory.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 457970572d405d707ca5a96836d6a48babffc3a7 refers to a dead (removed) revision in file `Ringtoets/Integration/src/Ringtoets.Integration.IO/Factories/ExportablePipingStructureFailureMechanismFactory.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 457970572d405d707ca5a96836d6a48babffc3a7 refers to a dead (removed) revision in file `Ringtoets/Integration/src/Ringtoets.Integration.IO/Factories/ExportableSectionAssemblyResultFactory.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 457970572d405d707ca5a96836d6a48babffc3a7 refers to a dead (removed) revision in file `Ringtoets/Integration/src/Ringtoets.Integration.IO/Factories/ExportableStabilityPointStructuresFailureMechanismFactory.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 457970572d405d707ca5a96836d6a48babffc3a7 refers to a dead (removed) revision in file `Ringtoets/Integration/src/Ringtoets.Integration.IO/Factories/ExportableStabilityStoneCoverFailureMechanismFactory.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 457970572d405d707ca5a96836d6a48babffc3a7 refers to a dead (removed) revision in file `Ringtoets/Integration/src/Ringtoets.Integration.IO/Factories/ExportableStrengthStabilityLengthwiseConstructionFailureMechanismFactory.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 457970572d405d707ca5a96836d6a48babffc3a7 refers to a dead (removed) revision in file `Ringtoets/Integration/src/Ringtoets.Integration.IO/Factories/ExportableTechnicalInnovationFailureMechanismFactory.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 457970572d405d707ca5a96836d6a48babffc3a7 refers to a dead (removed) revision in file `Ringtoets/Integration/src/Ringtoets.Integration.IO/Factories/ExportableWaterPressureAsphaltCoverFailureMechanismFactory.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 457970572d405d707ca5a96836d6a48babffc3a7 refers to a dead (removed) revision in file `Ringtoets/Integration/src/Ringtoets.Integration.IO/Factories/ExportableWaveImpactAsphaltCoverFailureMechanismFactory.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 457970572d405d707ca5a96836d6a48babffc3a7 refers to a dead (removed) revision in file `Ringtoets/Integration/src/Ringtoets.Integration.IO/Handlers/IHydraulicBoundaryDatabaseUpdateHandler.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 457970572d405d707ca5a96836d6a48babffc3a7 refers to a dead (removed) revision in file `Ringtoets/Integration/src/Ringtoets.Integration.IO/Handlers/IHydraulicLocationConfigurationDatabaseUpdateHandler.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 457970572d405d707ca5a96836d6a48babffc3a7 refers to a dead (removed) revision in file `Ringtoets/Integration/src/Ringtoets.Integration.IO/Helpers/ExportableFailureMechanismSectionHelper.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 457970572d405d707ca5a96836d6a48babffc3a7 refers to a dead (removed) revision in file `Ringtoets/Integration/src/Ringtoets.Integration.IO/Helpers/IdentifierGenerator.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 457970572d405d707ca5a96836d6a48babffc3a7 refers to a dead (removed) revision in file `Ringtoets/Integration/src/Ringtoets.Integration.IO/Importers/HydraulicBoundaryDatabaseImporter.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 457970572d405d707ca5a96836d6a48babffc3a7 refers to a dead (removed) revision in file `Ringtoets/Integration/src/Ringtoets.Integration.IO/Importers/HydraulicLocationConfigurationDatabaseImporter.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 457970572d405d707ca5a96836d6a48babffc3a7 refers to a dead (removed) revision in file `Ringtoets/Integration/src/Ringtoets.Integration.IO/Properties/AssemblyInfo.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 457970572d405d707ca5a96836d6a48babffc3a7 refers to a dead (removed) revision in file `Ringtoets/Integration/src/Ringtoets.Integration.IO/Properties/Resources.Designer.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 457970572d405d707ca5a96836d6a48babffc3a7 refers to a dead (removed) revision in file `Ringtoets/Integration/src/Ringtoets.Integration.IO/Properties/Resources.resx'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 457970572d405d707ca5a96836d6a48babffc3a7 refers to a dead (removed) revision in file `Ringtoets/Integration/src/Ringtoets.Integration.IO/Riskeer.Integration.IO.csproj'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 457970572d405d707ca5a96836d6a48babffc3a7 refers to a dead (removed) revision in file `Ringtoets/Integration/src/Ringtoets.Integration.IO/packages.config'.
Fisheye: No comparison available. Pass `N' to diff?
Index: Ringtoets/Integration/src/Riskeer.Integration.IO/AggregatedSerializable/AggregatedSerializableCombinedFailureMechanismSectionAssemblies.cs
===================================================================
diff -u
--- Ringtoets/Integration/src/Riskeer.Integration.IO/AggregatedSerializable/AggregatedSerializableCombinedFailureMechanismSectionAssemblies.cs (revision 0)
+++ Ringtoets/Integration/src/Riskeer.Integration.IO/AggregatedSerializable/AggregatedSerializableCombinedFailureMechanismSectionAssemblies.cs (revision 457970572d405d707ca5a96836d6a48babffc3a7)
@@ -0,0 +1,81 @@
+// Copyright (C) Stichting Deltares 2018. 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 Riskeer.AssemblyTool.IO.Model;
+
+namespace Riskeer.Integration.IO.AggregatedSerializable
+{
+ ///
+ /// Class that holds all the information that is related when creating a collection of .
+ ///
+ internal class AggregatedSerializableCombinedFailureMechanismSectionAssemblies
+ {
+ ///
+ /// Creates a new instance of .
+ ///
+ /// The
+ /// that the belongs to.
+ /// A collection of
+ /// that is associated with .
+ /// A collection of .
+ /// Thrown when any parameter is null.
+ public AggregatedSerializableCombinedFailureMechanismSectionAssemblies(SerializableFailureMechanismSectionCollection failureMechanismSectionCollection,
+ IEnumerable failureMechanismSections,
+ IEnumerable combinedFailureMechanismSectionAssemblies)
+ {
+ if (failureMechanismSectionCollection == null)
+ {
+ throw new ArgumentNullException(nameof(failureMechanismSectionCollection));
+ }
+
+ if (failureMechanismSections == null)
+ {
+ throw new ArgumentNullException(nameof(failureMechanismSections));
+ }
+
+ if (combinedFailureMechanismSectionAssemblies == null)
+ {
+ throw new ArgumentNullException(nameof(combinedFailureMechanismSectionAssemblies));
+ }
+
+ FailureMechanismSectionCollection = failureMechanismSectionCollection;
+ FailureMechanismSections = failureMechanismSections;
+ CombinedFailureMechanismSectionAssemblies = combinedFailureMechanismSectionAssemblies;
+ }
+
+ ///
+ /// Gets the collection where the serializable failure mechanism sections belongs to.
+ ///
+ public SerializableFailureMechanismSectionCollection FailureMechanismSectionCollection { get; }
+
+ ///
+ /// Gets the collection of serializable failure mechanism sections.
+ ///
+ public IEnumerable FailureMechanismSections { get; }
+
+ ///
+ /// Gets the collection of serializable combined failure mechanism section assemblies.
+ ///
+ public IEnumerable CombinedFailureMechanismSectionAssemblies { get; }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Integration/src/Riskeer.Integration.IO/AggregatedSerializable/AggregatedSerializableCombinedFailureMechanismSectionAssembly.cs
===================================================================
diff -u
--- Ringtoets/Integration/src/Riskeer.Integration.IO/AggregatedSerializable/AggregatedSerializableCombinedFailureMechanismSectionAssembly.cs (revision 0)
+++ Ringtoets/Integration/src/Riskeer.Integration.IO/AggregatedSerializable/AggregatedSerializableCombinedFailureMechanismSectionAssembly.cs (revision 457970572d405d707ca5a96836d6a48babffc3a7)
@@ -0,0 +1,66 @@
+// Copyright (C) Stichting Deltares 2018. 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 Riskeer.AssemblyTool.IO.Model;
+
+namespace Riskeer.Integration.IO.AggregatedSerializable
+{
+ ///
+ /// Class that holds all the information that is related when creating a .
+ ///
+ internal class AggregatedSerializableCombinedFailureMechanismSectionAssembly
+ {
+ ///
+ /// Creates a new instance of .
+ ///
+ /// The .
+ /// The
+ /// that is associated with .
+ /// Thrown when any parameter is null.
+ public AggregatedSerializableCombinedFailureMechanismSectionAssembly(SerializableFailureMechanismSection failureMechanismSection,
+ SerializableCombinedFailureMechanismSectionAssembly combinedFailureMechanismSectionAssembly)
+ {
+ if (failureMechanismSection == null)
+ {
+ throw new ArgumentNullException(nameof(failureMechanismSection));
+ }
+
+ if (combinedFailureMechanismSectionAssembly == null)
+ {
+ throw new ArgumentNullException(nameof(combinedFailureMechanismSectionAssembly));
+ }
+
+ FailureMechanismSection = failureMechanismSection;
+ CombinedFailureMechanismSectionAssembly = combinedFailureMechanismSectionAssembly;
+ }
+
+ ///
+ /// Gets the failure mechanism section.
+ ///
+ public SerializableFailureMechanismSection FailureMechanismSection { get; }
+
+ ///
+ /// Gets the combined failure mechanism section assembly.
+ ///
+ public SerializableCombinedFailureMechanismSectionAssembly CombinedFailureMechanismSectionAssembly { get; }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Integration/src/Riskeer.Integration.IO/AggregatedSerializable/AggregatedSerializableFailureMechanism.cs
===================================================================
diff -u
--- Ringtoets/Integration/src/Riskeer.Integration.IO/AggregatedSerializable/AggregatedSerializableFailureMechanism.cs (revision 0)
+++ Ringtoets/Integration/src/Riskeer.Integration.IO/AggregatedSerializable/AggregatedSerializableFailureMechanism.cs (revision 457970572d405d707ca5a96836d6a48babffc3a7)
@@ -0,0 +1,95 @@
+// Copyright (C) Stichting Deltares 2018. 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 Riskeer.AssemblyTool.IO.Model;
+
+namespace Riskeer.Integration.IO.AggregatedSerializable
+{
+ ///
+ /// Class that holds all the information that is related when creating a .
+ ///
+ internal class AggregatedSerializableFailureMechanism
+ {
+ ///
+ /// Creates a new instance of .
+ ///
+ /// The .
+ /// The
+ /// that belongs to the failure mechanism.
+ /// A collection of
+ /// that belongs to the failure mechanism.
+ /// A collection of
+ /// that belongs to the failure mechanism.
+ /// Thrown when any parameter is null.
+ public AggregatedSerializableFailureMechanism(SerializableFailureMechanism failureMechanism,
+ SerializableFailureMechanismSectionCollection failureMechanismSectionCollection,
+ IEnumerable failureMechanismSections,
+ IEnumerable failureMechanismSectionAssemblyResults)
+ {
+ if (failureMechanism == null)
+ {
+ throw new ArgumentNullException(nameof(failureMechanism));
+ }
+
+ if (failureMechanismSectionCollection == null)
+ {
+ throw new ArgumentNullException(nameof(failureMechanismSectionCollection));
+ }
+
+ if (failureMechanismSections == null)
+ {
+ throw new ArgumentNullException(nameof(failureMechanismSections));
+ }
+
+ if (failureMechanismSectionAssemblyResults == null)
+ {
+ throw new ArgumentNullException(nameof(failureMechanismSectionAssemblyResults));
+ }
+
+ FailureMechanism = failureMechanism;
+ FailureMechanismSectionCollection = failureMechanismSectionCollection;
+ FailureMechanismSections = failureMechanismSections;
+ FailureMechanismSectionAssemblyResults = failureMechanismSectionAssemblyResults;
+ }
+
+ ///
+ /// Gets the serializable failure mechanism.
+ ///
+ public SerializableFailureMechanism FailureMechanism { get; }
+
+ ///
+ /// Gets the collection where the serializable failure mechanism sections belongs to.
+ ///
+ public SerializableFailureMechanismSectionCollection FailureMechanismSectionCollection { get; }
+
+ ///
+ /// Gets the collection of serializable failure mechanism sections.
+ ///
+ public IEnumerable FailureMechanismSections { get; }
+
+ ///
+ /// Gets the collection of serializable failure mechanism section assembly results.
+ ///
+ public IEnumerable FailureMechanismSectionAssemblyResults { get; }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Integration/src/Riskeer.Integration.IO/AggregatedSerializable/AggregatedSerializableFailureMechanismSectionAssembly.cs
===================================================================
diff -u
--- Ringtoets/Integration/src/Riskeer.Integration.IO/AggregatedSerializable/AggregatedSerializableFailureMechanismSectionAssembly.cs (revision 0)
+++ Ringtoets/Integration/src/Riskeer.Integration.IO/AggregatedSerializable/AggregatedSerializableFailureMechanismSectionAssembly.cs (revision 457970572d405d707ca5a96836d6a48babffc3a7)
@@ -0,0 +1,66 @@
+// Copyright (C) Stichting Deltares 2018. 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 Riskeer.AssemblyTool.IO.Model;
+
+namespace Riskeer.Integration.IO.AggregatedSerializable
+{
+ ///
+ /// Class that holds all the information that is related when creating a .
+ ///
+ internal class AggregatedSerializableFailureMechanismSectionAssembly
+ {
+ ///
+ /// Creates a new instance of see cref="AggregatedSerializableFailureMechanismSectionAssembly"/>.
+ ///
+ /// The .
+ /// The
+ /// that is associated with .
+ /// Thrown when any parameter is null.
+ public AggregatedSerializableFailureMechanismSectionAssembly(SerializableFailureMechanismSection failureMechanismSection,
+ SerializableFailureMechanismSectionAssembly failureMechanismSectionAssembly)
+ {
+ if (failureMechanismSection == null)
+ {
+ throw new ArgumentNullException(nameof(failureMechanismSection));
+ }
+
+ if (failureMechanismSectionAssembly == null)
+ {
+ throw new ArgumentNullException(nameof(failureMechanismSectionAssembly));
+ }
+
+ FailureMechanismSection = failureMechanismSection;
+ FailureMechanismSectionAssembly = failureMechanismSectionAssembly;
+ }
+
+ ///
+ /// Gets the failure mechanism section.
+ ///
+ public SerializableFailureMechanismSection FailureMechanismSection { get; }
+
+ ///
+ /// Gets the failure mechanism section assembly result.
+ ///
+ public SerializableFailureMechanismSectionAssembly FailureMechanismSectionAssembly { get; }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Integration/src/Riskeer.Integration.IO/Assembly/ExportableAggregatedFailureMechanismSectionAssemblyResult.cs
===================================================================
diff -u
--- Ringtoets/Integration/src/Riskeer.Integration.IO/Assembly/ExportableAggregatedFailureMechanismSectionAssemblyResult.cs (revision 0)
+++ Ringtoets/Integration/src/Riskeer.Integration.IO/Assembly/ExportableAggregatedFailureMechanismSectionAssemblyResult.cs (revision 457970572d405d707ca5a96836d6a48babffc3a7)
@@ -0,0 +1,94 @@
+// Copyright (C) Stichting Deltares 2018. 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;
+
+namespace Riskeer.Integration.IO.Assembly
+{
+ ///
+ /// Class that holds all the information to export the assembly result of a failure mechanism section.
+ ///
+ public class ExportableAggregatedFailureMechanismSectionAssemblyResult
+ : ExportableAggregatedFailureMechanismSectionAssemblyResultBase
+ {
+ ///
+ /// Creates a new instance of .
+ ///
+ /// The failure mechanism section.
+ /// The simple assembly result of the failure mechanism section.
+ /// The detailed assembly result of the failure mechanism section.
+ /// The tailor made assembly result of the failure mechanism section.
+ /// The combined assembly result of the failure mechanism section.
+ /// Thrown when any parameter is null.
+ public ExportableAggregatedFailureMechanismSectionAssemblyResult(ExportableFailureMechanismSection failureMechanismSection,
+ ExportableSectionAssemblyResult simpleAssembly,
+ ExportableSectionAssemblyResult detailedAssembly,
+ ExportableSectionAssemblyResult tailorMadeAssembly,
+ ExportableSectionAssemblyResult combinedAssembly)
+ : base(failureMechanismSection)
+ {
+ if (simpleAssembly == null)
+ {
+ throw new ArgumentNullException(nameof(simpleAssembly));
+ }
+
+ if (detailedAssembly == null)
+ {
+ throw new ArgumentNullException(nameof(detailedAssembly));
+ }
+
+ if (tailorMadeAssembly == null)
+ {
+ throw new ArgumentNullException(nameof(tailorMadeAssembly));
+ }
+
+ if (combinedAssembly == null)
+ {
+ throw new ArgumentNullException(nameof(combinedAssembly));
+ }
+
+ SimpleAssembly = simpleAssembly;
+ DetailedAssembly = detailedAssembly;
+ TailorMadeAssembly = tailorMadeAssembly;
+ CombinedAssembly = combinedAssembly;
+ }
+
+ ///
+ /// Gets the simple assembly result.
+ ///
+ public ExportableSectionAssemblyResult SimpleAssembly { get; }
+
+ ///
+ /// Gets the detailed assembly result.
+ ///
+ public ExportableSectionAssemblyResult DetailedAssembly { get; }
+
+ ///
+ /// Gets the tailor made assembly result.
+ ///
+ public ExportableSectionAssemblyResult TailorMadeAssembly { get; }
+
+ ///
+ /// Gets the combined assembly result.
+ ///
+ public ExportableSectionAssemblyResult CombinedAssembly { get; }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Integration/src/Riskeer.Integration.IO/Assembly/ExportableAggregatedFailureMechanismSectionAssemblyResultBase.cs
===================================================================
diff -u
--- Ringtoets/Integration/src/Riskeer.Integration.IO/Assembly/ExportableAggregatedFailureMechanismSectionAssemblyResultBase.cs (revision 0)
+++ Ringtoets/Integration/src/Riskeer.Integration.IO/Assembly/ExportableAggregatedFailureMechanismSectionAssemblyResultBase.cs (revision 457970572d405d707ca5a96836d6a48babffc3a7)
@@ -0,0 +1,51 @@
+// Copyright (C) Stichting Deltares 2018. 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;
+
+namespace Riskeer.Integration.IO.Assembly
+{
+ ///
+ /// Base implementation to hold all information for exporting assembly results of a failure mechanism section.
+ ///
+ public abstract class ExportableAggregatedFailureMechanismSectionAssemblyResultBase
+ {
+ ///
+ /// Creates a new instance of .
+ ///
+ /// The failure mechanism section.
+ /// Thrown when is null.
+ protected ExportableAggregatedFailureMechanismSectionAssemblyResultBase(ExportableFailureMechanismSection failureMechanismSection)
+ {
+ if (failureMechanismSection == null)
+ {
+ throw new ArgumentNullException(nameof(failureMechanismSection));
+ }
+
+ FailureMechanismSection = failureMechanismSection;
+ }
+
+ ///
+ /// Gets the failure mechanism section.
+ ///
+ public ExportableFailureMechanismSection FailureMechanismSection { get; }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Integration/src/Riskeer.Integration.IO/Assembly/ExportableAggregatedFailureMechanismSectionAssemblyResultWithProbability.cs
===================================================================
diff -u
--- Ringtoets/Integration/src/Riskeer.Integration.IO/Assembly/ExportableAggregatedFailureMechanismSectionAssemblyResultWithProbability.cs (revision 0)
+++ Ringtoets/Integration/src/Riskeer.Integration.IO/Assembly/ExportableAggregatedFailureMechanismSectionAssemblyResultWithProbability.cs (revision 457970572d405d707ca5a96836d6a48babffc3a7)
@@ -0,0 +1,94 @@
+// Copyright (C) Stichting Deltares 2018. 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;
+
+namespace Riskeer.Integration.IO.Assembly
+{
+ ///
+ /// Class that holds all the information to export a failure mechanism section assembly result with probability.
+ ///
+ public class ExportableAggregatedFailureMechanismSectionAssemblyResultWithProbability
+ : ExportableAggregatedFailureMechanismSectionAssemblyResultBase
+ {
+ ///
+ /// Creates a new instance of .
+ ///
+ /// The failure mechanism section.
+ /// The simple assembly result of the failure mechanism section.
+ /// The detailed assembly result of the failure mechanism section.
+ /// The tailor made assembly result of the failure mechanism section.
+ /// The combined assembly result of the failure mechanism section.
+ /// Thrown when any parameter is null.
+ public ExportableAggregatedFailureMechanismSectionAssemblyResultWithProbability(ExportableFailureMechanismSection failureMechanismSection,
+ ExportableSectionAssemblyResultWithProbability simpleAssembly,
+ ExportableSectionAssemblyResultWithProbability detailedAssembly,
+ ExportableSectionAssemblyResultWithProbability tailorMadeAssembly,
+ ExportableSectionAssemblyResultWithProbability combinedAssembly)
+ : base(failureMechanismSection)
+ {
+ if (simpleAssembly == null)
+ {
+ throw new ArgumentNullException(nameof(simpleAssembly));
+ }
+
+ if (detailedAssembly == null)
+ {
+ throw new ArgumentNullException(nameof(detailedAssembly));
+ }
+
+ if (tailorMadeAssembly == null)
+ {
+ throw new ArgumentNullException(nameof(tailorMadeAssembly));
+ }
+
+ if (combinedAssembly == null)
+ {
+ throw new ArgumentNullException(nameof(combinedAssembly));
+ }
+
+ SimpleAssembly = simpleAssembly;
+ DetailedAssembly = detailedAssembly;
+ TailorMadeAssembly = tailorMadeAssembly;
+ CombinedAssembly = combinedAssembly;
+ }
+
+ ///
+ /// Gets the simple assembly result.
+ ///
+ public ExportableSectionAssemblyResultWithProbability SimpleAssembly { get; }
+
+ ///
+ /// Gets the detailed assembly result.
+ ///
+ public ExportableSectionAssemblyResultWithProbability DetailedAssembly { get; }
+
+ ///
+ /// Gets the tailor made assembly result.
+ ///
+ public ExportableSectionAssemblyResultWithProbability TailorMadeAssembly { get; }
+
+ ///
+ /// Gets the combined assembly result.
+ ///
+ public ExportableSectionAssemblyResultWithProbability CombinedAssembly { get; }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Integration/src/Riskeer.Integration.IO/Assembly/ExportableAggregatedFailureMechanismSectionAssemblyResultWithoutDetailedAssembly.cs
===================================================================
diff -u
--- Ringtoets/Integration/src/Riskeer.Integration.IO/Assembly/ExportableAggregatedFailureMechanismSectionAssemblyResultWithoutDetailedAssembly.cs (revision 0)
+++ Ringtoets/Integration/src/Riskeer.Integration.IO/Assembly/ExportableAggregatedFailureMechanismSectionAssemblyResultWithoutDetailedAssembly.cs (revision 457970572d405d707ca5a96836d6a48babffc3a7)
@@ -0,0 +1,82 @@
+// Copyright (C) Stichting Deltares 2018. 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;
+
+namespace Riskeer.Integration.IO.Assembly
+{
+ ///
+ /// Class that holds all the information to export an assembly result without a detailed assembly
+ /// of a failure mechanism section.
+ ///
+ public class ExportableAggregatedFailureMechanismSectionAssemblyResultWithoutDetailedAssembly
+ : ExportableAggregatedFailureMechanismSectionAssemblyResultBase
+ {
+ ///
+ /// Creates a new instance of .
+ ///
+ /// The failure mechanism section.
+ /// The simple assembly result of the failure mechanism section.
+ /// The tailor made assembly result of the failure mechanism section.
+ /// The combined assembly result of the failure mechanism section.
+ /// Thrown when any parameter is null.
+ public ExportableAggregatedFailureMechanismSectionAssemblyResultWithoutDetailedAssembly(ExportableFailureMechanismSection failureMechanismSection,
+ ExportableSectionAssemblyResult simpleAssembly,
+ ExportableSectionAssemblyResult tailorMadeAssembly,
+ ExportableSectionAssemblyResult combinedAssembly)
+ : base(failureMechanismSection)
+ {
+ if (simpleAssembly == null)
+ {
+ throw new ArgumentNullException(nameof(simpleAssembly));
+ }
+
+ if (tailorMadeAssembly == null)
+ {
+ throw new ArgumentNullException(nameof(tailorMadeAssembly));
+ }
+
+ if (combinedAssembly == null)
+ {
+ throw new ArgumentNullException(nameof(combinedAssembly));
+ }
+
+ SimpleAssembly = simpleAssembly;
+ TailorMadeAssembly = tailorMadeAssembly;
+ CombinedAssembly = combinedAssembly;
+ }
+
+ ///
+ /// Gets the simple assembly result.
+ ///
+ public ExportableSectionAssemblyResult SimpleAssembly { get; }
+
+ ///
+ /// Gets the tailor made assembly result.
+ ///
+ public ExportableSectionAssemblyResult TailorMadeAssembly { get; }
+
+ ///
+ /// Gets the combined assembly result.
+ ///
+ public ExportableSectionAssemblyResult CombinedAssembly { get; }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Integration/src/Riskeer.Integration.IO/Assembly/ExportableAggregatedFailureMechanismSectionAssemblyWithCombinedProbabilityResult.cs
===================================================================
diff -u
--- Ringtoets/Integration/src/Riskeer.Integration.IO/Assembly/ExportableAggregatedFailureMechanismSectionAssemblyWithCombinedProbabilityResult.cs (revision 0)
+++ Ringtoets/Integration/src/Riskeer.Integration.IO/Assembly/ExportableAggregatedFailureMechanismSectionAssemblyWithCombinedProbabilityResult.cs (revision 457970572d405d707ca5a96836d6a48babffc3a7)
@@ -0,0 +1,56 @@
+// Copyright (C) Stichting Deltares 2018. 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;
+
+namespace Riskeer.Integration.IO.Assembly
+{
+ ///
+ /// Class that holds all the information to export an assembly result with probability and a combined assembly result
+ /// of a failure mechanism section.
+ ///
+ public class ExportableAggregatedFailureMechanismSectionAssemblyWithCombinedProbabilityResult
+ : ExportableAggregatedFailureMechanismSectionAssemblyResultBase
+ {
+ ///
+ /// Creates a new instance of .
+ ///
+ /// The failure mechanism section.
+ /// The combined assembly result.
+ /// Thrown when any parameter is null.
+ public ExportableAggregatedFailureMechanismSectionAssemblyWithCombinedProbabilityResult(ExportableFailureMechanismSection failureMechanismSection,
+ ExportableSectionAssemblyResultWithProbability combinedAssembly)
+ : base(failureMechanismSection)
+ {
+ if (combinedAssembly == null)
+ {
+ throw new ArgumentNullException(nameof(combinedAssembly));
+ }
+
+ CombinedAssembly = combinedAssembly;
+ }
+
+ ///
+ /// Gets the combined assembly result.
+ ///
+ public ExportableSectionAssemblyResultWithProbability CombinedAssembly { get; }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Integration/src/Riskeer.Integration.IO/Assembly/ExportableAggregatedFailureMechanismSectionAssemblyWithCombinedResult.cs
===================================================================
diff -u
--- Ringtoets/Integration/src/Riskeer.Integration.IO/Assembly/ExportableAggregatedFailureMechanismSectionAssemblyWithCombinedResult.cs (revision 0)
+++ Ringtoets/Integration/src/Riskeer.Integration.IO/Assembly/ExportableAggregatedFailureMechanismSectionAssemblyWithCombinedResult.cs (revision 457970572d405d707ca5a96836d6a48babffc3a7)
@@ -0,0 +1,56 @@
+// Copyright (C) Stichting Deltares 2018. 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;
+
+namespace Riskeer.Integration.IO.Assembly
+{
+ ///
+ /// Class that holds all the information to export an assembly result with a combined assembly result
+ /// of a failure mechanism section.
+ ///
+ public class ExportableAggregatedFailureMechanismSectionAssemblyWithCombinedResult
+ : ExportableAggregatedFailureMechanismSectionAssemblyResultBase
+ {
+ ///
+ /// Creates a new instance of .
+ ///
+ /// The failure mechanism section.
+ /// The combined assembly result.
+ /// Thrown when any parameter is null.
+ public ExportableAggregatedFailureMechanismSectionAssemblyWithCombinedResult(ExportableFailureMechanismSection failureMechanismSection,
+ ExportableSectionAssemblyResult combinedAssembly)
+ : base(failureMechanismSection)
+ {
+ if (combinedAssembly == null)
+ {
+ throw new ArgumentNullException(nameof(combinedAssembly));
+ }
+
+ CombinedAssembly = combinedAssembly;
+ }
+
+ ///
+ /// Gets the combined assembly result.
+ ///
+ public ExportableSectionAssemblyResult CombinedAssembly { get; }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Integration/src/Riskeer.Integration.IO/Assembly/ExportableAssemblyMethod.cs
===================================================================
diff -u
--- Ringtoets/Integration/src/Riskeer.Integration.IO/Assembly/ExportableAssemblyMethod.cs (revision 0)
+++ Ringtoets/Integration/src/Riskeer.Integration.IO/Assembly/ExportableAssemblyMethod.cs (revision 457970572d405d707ca5a96836d6a48babffc3a7)
@@ -0,0 +1,139 @@
+// Copyright (C) Stichting Deltares 2018. 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 Riskeer.Integration.IO.Assembly
+{
+ ///
+ /// Enum defining the exportable assembly methods.
+ ///
+ public enum ExportableAssemblyMethod
+ {
+ ///
+ /// Represents the assembly method WBI-0E-1.
+ ///
+ WBI0E1 = 1,
+
+ ///
+ /// Represents the assembly method WBI-0E-3.
+ ///
+ WBI0E3 = 2,
+
+ ///
+ /// Represents the assembly method WBI-0G-1.
+ ///
+ WBI0G1 = 3,
+
+ ///
+ /// Represents the assembly method WBI-0G-3.
+ ///
+ WBI0G3 = 4,
+
+ ///
+ /// Represents the assembly method WBI-0G-4.
+ ///
+ WBI0G4 = 5,
+
+ ///
+ /// Represents the assembly method WBI-0G-5.
+ ///
+ WBI0G5 = 6,
+
+ ///
+ /// Represents the assembly method WBI-0G-6.
+ ///
+ WBI0G6 = 7,
+
+ ///
+ /// Represents the assembly method WBI-0T-1.
+ ///
+ WBI0T1 = 8,
+
+ ///
+ /// Represents the assembly method WBI-0T-3.
+ ///
+ WBI0T3 = 9,
+
+ ///
+ /// Represents the assembly method WBI-0T-4.
+ ///
+ WBI0T4 = 10,
+
+ ///
+ /// Represents the assembly method WBI-0T-5.
+ ///
+ WBI0T5 = 11,
+
+ ///
+ /// Represents the assembly method WBI-0T-6.
+ ///
+ WBI0T6 = 12,
+
+ ///
+ /// Represents the assembly method WBI-0T-7.
+ ///
+ WBI0T7 = 13,
+
+ ///
+ /// Represents the assembly method WBI-0A-1.
+ ///
+ WBI0A1 = 14,
+
+ ///
+ /// Represents the assembly method WBI-1A-1.
+ ///
+ WBI1A1 = 15,
+
+ ///
+ /// Represents the assembly method WBI-1B-1.
+ ///
+ WBI1B1 = 16,
+
+ ///
+ /// Represents the assembly method WBI-2A-1.
+ ///
+ WBI2A1 = 17,
+
+ ///
+ /// Represents the assembly method WBI-2B-1.
+ ///
+ WBI2B1 = 18,
+
+ ///
+ /// Represents the assembly method WBI-2C-1.
+ ///
+ WBI2C1 = 19,
+
+ ///
+ /// Represents the assembly method WBI-3A-1.
+ ///
+ WBI3A1 = 20,
+
+ ///
+ /// Represents the assembly method WBI-3B-1.
+ ///
+ WBI3B1 = 21,
+
+ ///
+ /// Represents the assembly method WBI-3C-1.
+ ///
+ WBI3C1 = 22
+ }
+}
\ No newline at end of file
Index: Ringtoets/Integration/src/Riskeer.Integration.IO/Assembly/ExportableAssessmentSection.cs
===================================================================
diff -u
--- Ringtoets/Integration/src/Riskeer.Integration.IO/Assembly/ExportableAssessmentSection.cs (revision 0)
+++ Ringtoets/Integration/src/Riskeer.Integration.IO/Assembly/ExportableAssessmentSection.cs (revision 457970572d405d707ca5a96836d6a48babffc3a7)
@@ -0,0 +1,163 @@
+// Copyright (C) Stichting Deltares 2018. 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 Core.Common.Base.Geometry;
+
+namespace Riskeer.Integration.IO.Assembly
+{
+ ///
+ /// Class that holds all the information to export the assembly results
+ /// of an assessment section.
+ ///
+ public class ExportableAssessmentSection
+ {
+ ///
+ /// Creates an instance of .
+ ///
+ /// The name of the assessment section.
+ /// The id of the assessment section.
+ /// The geometry of the assessment section.
+ /// The assembly result of the assessment section.
+ /// The total assembly result with probability
+ /// of the failure mechanisms.
+ /// The total assembly result without probability
+ /// of the failure mechanisms.
+ /// The assembly results with probability of failure
+ /// mechanisms belonging to this assessment section.
+ /// The assembly results without probability
+ /// of failure mechanisms belonging to this assessment section.
+ /// The combined section assembly results
+ /// of this assessment section.
+ /// Thrown when any parameter is null.
+ public ExportableAssessmentSection(string name,
+ string id,
+ IEnumerable geometry,
+ ExportableAssessmentSectionAssemblyResult assessmentSectionAssembly,
+ ExportableFailureMechanismAssemblyResultWithProbability failureMechanismAssemblyWithProbability,
+ ExportableFailureMechanismAssemblyResult failureMechanismAssemblyWithoutProbability,
+ IEnumerable> failureMechanismsWithProbability,
+ IEnumerable> failureMechanismsWithoutProbability,
+ IEnumerable combinedSectionAssemblyResults)
+ {
+ if (name == null)
+ {
+ throw new ArgumentNullException(nameof(name));
+ }
+
+ if (id == null)
+ {
+ throw new ArgumentNullException(nameof(id));
+ }
+
+ if (geometry == null)
+ {
+ throw new ArgumentNullException(nameof(geometry));
+ }
+
+ if (assessmentSectionAssembly == null)
+ {
+ throw new ArgumentNullException(nameof(assessmentSectionAssembly));
+ }
+
+ if (failureMechanismAssemblyWithProbability == null)
+ {
+ throw new ArgumentNullException(nameof(failureMechanismAssemblyWithProbability));
+ }
+
+ if (failureMechanismAssemblyWithoutProbability == null)
+ {
+ throw new ArgumentNullException(nameof(failureMechanismAssemblyWithoutProbability));
+ }
+
+ if (failureMechanismsWithProbability == null)
+ {
+ throw new ArgumentNullException(nameof(failureMechanismsWithProbability));
+ }
+
+ if (failureMechanismsWithoutProbability == null)
+ {
+ throw new ArgumentNullException(nameof(failureMechanismsWithoutProbability));
+ }
+
+ if (combinedSectionAssemblyResults == null)
+ {
+ throw new ArgumentNullException(nameof(combinedSectionAssemblyResults));
+ }
+
+ Name = name;
+ Id = id;
+ Geometry = geometry;
+ AssessmentSectionAssembly = assessmentSectionAssembly;
+ FailureMechanismAssemblyWithProbability = failureMechanismAssemblyWithProbability;
+ FailureMechanismAssemblyWithoutProbability = failureMechanismAssemblyWithoutProbability;
+ FailureMechanismsWithProbability = failureMechanismsWithProbability;
+ FailureMechanismsWithoutProbability = failureMechanismsWithoutProbability;
+ CombinedSectionAssemblies = combinedSectionAssemblyResults;
+ }
+
+ ///
+ /// Gets the name of the assessment section.
+ ///
+ public string Name { get; }
+
+ ///
+ /// Gets the id of the assessment section.
+ ///
+ public string Id { get; }
+
+ ///
+ /// Gets the geometry of the assessment section.
+ ///
+ public IEnumerable Geometry { get; }
+
+ ///
+ /// Gets the assembly result of the assessment section.
+ ///
+ public ExportableAssessmentSectionAssemblyResult AssessmentSectionAssembly { get; }
+
+ ///
+ /// Gets the total assembly result of the failure mechanisms with probability.
+ ///
+ public ExportableFailureMechanismAssemblyResultWithProbability FailureMechanismAssemblyWithProbability { get; }
+
+ ///
+ /// Gets the total assembly result of the failure mechanism without probability.
+ ///
+ public ExportableFailureMechanismAssemblyResult FailureMechanismAssemblyWithoutProbability { get; }
+
+ ///
+ /// Gets the collection of assembly results with probability of failure mechanisms belonging to this assessment section.
+ ///
+ public IEnumerable> FailureMechanismsWithProbability { get; }
+
+ ///
+ /// Gets the collection of assembly results without probability of failure mechanisms belonging to this assessment section.
+ ///
+ public IEnumerable> FailureMechanismsWithoutProbability { get; }
+
+ ///
+ /// Gets the collection of combined section assembly results of this assessment section.
+ ///
+ public IEnumerable CombinedSectionAssemblies { get; }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Integration/src/Riskeer.Integration.IO/Assembly/ExportableAssessmentSectionAssemblyResult.cs
===================================================================
diff -u
--- Ringtoets/Integration/src/Riskeer.Integration.IO/Assembly/ExportableAssessmentSectionAssemblyResult.cs (revision 0)
+++ Ringtoets/Integration/src/Riskeer.Integration.IO/Assembly/ExportableAssessmentSectionAssemblyResult.cs (revision 457970572d405d707ca5a96836d6a48babffc3a7)
@@ -0,0 +1,54 @@
+// Copyright (C) Stichting Deltares 2018. 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 Riskeer.AssemblyTool.Data;
+
+namespace Riskeer.Integration.IO.Assembly
+{
+ ///
+ /// Class that holds all the information to export the assembly result
+ /// of an assessment section.
+ ///
+ public class ExportableAssessmentSectionAssemblyResult
+ {
+ ///
+ /// Creates an instance of .
+ ///
+ /// The method that was used to assemble this result.
+ /// The assembly result.
+ public ExportableAssessmentSectionAssemblyResult(ExportableAssemblyMethod assemblyMethod,
+ AssessmentSectionAssemblyCategoryGroup assemblyCategory)
+ {
+ AssemblyMethod = assemblyMethod;
+ AssemblyCategory = assemblyCategory;
+ }
+
+ ///
+ /// Gets the assembly method that was used to assemble the assembly result.
+ ///
+ public ExportableAssemblyMethod AssemblyMethod { get; }
+
+ ///
+ /// Gets the assembly category.
+ ///
+ public AssessmentSectionAssemblyCategoryGroup AssemblyCategory { get; }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Integration/src/Riskeer.Integration.IO/Assembly/ExportableCombinedFailureMechanismSection.cs
===================================================================
diff -u
--- Ringtoets/Integration/src/Riskeer.Integration.IO/Assembly/ExportableCombinedFailureMechanismSection.cs (revision 0)
+++ Ringtoets/Integration/src/Riskeer.Integration.IO/Assembly/ExportableCombinedFailureMechanismSection.cs (revision 457970572d405d707ca5a96836d6a48babffc3a7)
@@ -0,0 +1,59 @@
+// Copyright (C) Stichting Deltares 2018. 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 Core.Common.Base.Geometry;
+
+namespace Riskeer.Integration.IO.Assembly
+{
+ ///
+ /// Class that holds all the information to export a failure mechanism section
+ /// which is the result of an combined section assembly.
+ ///
+ public class ExportableCombinedFailureMechanismSection : ExportableFailureMechanismSection
+ {
+ ///
+ /// Creates a new instance of .
+ ///
+ /// The geometry of the failure mechanism section.
+ /// The start distance of the failure mechanism section between the section
+ /// and the start of the reference line in meters.
+ /// The end distance of the failure mechanism section between the section
+ /// and the start of the reference line in meters.
+ /// The assembly method which was used to get this section.
+ /// Thrown when
+ /// is null.
+ public ExportableCombinedFailureMechanismSection(IEnumerable geometry,
+ double startDistance,
+ double endDistance,
+ ExportableAssemblyMethod assemblyMethod)
+ : base(geometry, startDistance, endDistance)
+ {
+ AssemblyMethod = assemblyMethod;
+ }
+
+ ///
+ /// Gets the assembly method that was used to get this section.
+ ///
+ public ExportableAssemblyMethod AssemblyMethod { get; }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Integration/src/Riskeer.Integration.IO/Assembly/ExportableCombinedSectionAssembly.cs
===================================================================
diff -u
--- Ringtoets/Integration/src/Riskeer.Integration.IO/Assembly/ExportableCombinedSectionAssembly.cs (revision 0)
+++ Ringtoets/Integration/src/Riskeer.Integration.IO/Assembly/ExportableCombinedSectionAssembly.cs (revision 457970572d405d707ca5a96836d6a48babffc3a7)
@@ -0,0 +1,78 @@
+// Copyright (C) Stichting Deltares 2018. 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;
+
+namespace Riskeer.Integration.IO.Assembly
+{
+ ///
+ /// Class that holds all the information to export an combined section assembly result.
+ ///
+ public class ExportableCombinedSectionAssembly
+ {
+ ///
+ /// Creates a new instance of .
+ ///
+ /// The section that belongs to the assembly result.
+ /// The combined assembly result of this section.
+ /// The assembly results per failure mechanism.
+ /// Thrown when any parameter is null.
+ public ExportableCombinedSectionAssembly(ExportableCombinedFailureMechanismSection section,
+ ExportableSectionAssemblyResult combinedSectionAssemblyResult,
+ IEnumerable failureMechanismResults)
+ {
+ if (section == null)
+ {
+ throw new ArgumentNullException(nameof(section));
+ }
+
+ if (combinedSectionAssemblyResult == null)
+ {
+ throw new ArgumentNullException(nameof(combinedSectionAssemblyResult));
+ }
+
+ if (failureMechanismResults == null)
+ {
+ throw new ArgumentNullException(nameof(failureMechanismResults));
+ }
+
+ Section = section;
+ CombinedSectionAssemblyResult = combinedSectionAssemblyResult;
+ FailureMechanismResults = failureMechanismResults;
+ }
+
+ ///
+ /// Gets the section of the assembly.
+ ///
+ public ExportableCombinedFailureMechanismSection Section { get; }
+
+ ///
+ /// Gets the combined assembly result of this section.
+ ///
+ public ExportableSectionAssemblyResult CombinedSectionAssemblyResult { get; }
+
+ ///
+ /// Gets the assembly results per failure mechanism.
+ ///
+ public IEnumerable FailureMechanismResults { get; }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Integration/src/Riskeer.Integration.IO/Assembly/ExportableFailureMechanism.cs
===================================================================
diff -u
--- Ringtoets/Integration/src/Riskeer.Integration.IO/Assembly/ExportableFailureMechanism.cs (revision 0)
+++ Ringtoets/Integration/src/Riskeer.Integration.IO/Assembly/ExportableFailureMechanism.cs (revision 457970572d405d707ca5a96836d6a48babffc3a7)
@@ -0,0 +1,84 @@
+// Copyright (C) Stichting Deltares 2018. 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;
+
+namespace Riskeer.Integration.IO.Assembly
+{
+ ///
+ /// Class that holds all the information to export the assembly of a failure mechanism.
+ ///
+ /// The type of .
+ public class ExportableFailureMechanism
+ where TFailureMechanismAssemblyResult : ExportableFailureMechanismAssemblyResult
+ {
+ ///
+ /// Creates a new instance of .
+ ///
+ /// The assembly result of the failure mechanism.
+ /// The assembly results for the failure mechanism sections.
+ /// The code of the failure mechanism.
+ /// The group of the failure mechanism.
+ /// Thrown when ,
+ /// or is null.
+ public ExportableFailureMechanism(TFailureMechanismAssemblyResult failureMechanismAssembly,
+ IEnumerable sectionAssemblyResults,
+ ExportableFailureMechanismType code,
+ ExportableFailureMechanismGroup group)
+ {
+ if (failureMechanismAssembly == null)
+ {
+ throw new ArgumentNullException(nameof(failureMechanismAssembly));
+ }
+
+ if (sectionAssemblyResults == null)
+ {
+ throw new ArgumentNullException(nameof(sectionAssemblyResults));
+ }
+
+ FailureMechanismAssembly = failureMechanismAssembly;
+ SectionAssemblyResults = sectionAssemblyResults;
+ Code = code;
+ Group = group;
+ }
+
+ ///
+ /// Gets the assembly result of the failure mechanism.
+ ///
+ public TFailureMechanismAssemblyResult FailureMechanismAssembly { get; }
+
+ ///
+ /// Gets the collection of assembly results.
+ ///
+ public IEnumerable SectionAssemblyResults { get; }
+
+ ///
+ /// Gets the code of the failure mechanism.
+ ///
+ public ExportableFailureMechanismType Code { get; }
+
+ ///
+ /// Gets the group of the failure mechanism.
+ ///
+ public ExportableFailureMechanismGroup Group { get; }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Integration/src/Riskeer.Integration.IO/Assembly/ExportableFailureMechanismAssemblyResult.cs
===================================================================
diff -u
--- Ringtoets/Integration/src/Riskeer.Integration.IO/Assembly/ExportableFailureMechanismAssemblyResult.cs (revision 0)
+++ Ringtoets/Integration/src/Riskeer.Integration.IO/Assembly/ExportableFailureMechanismAssemblyResult.cs (revision 457970572d405d707ca5a96836d6a48babffc3a7)
@@ -0,0 +1,53 @@
+// Copyright (C) Stichting Deltares 2018. 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 Riskeer.AssemblyTool.Data;
+
+namespace Riskeer.Integration.IO.Assembly
+{
+ ///
+ /// Class that holds the information to export the assembly result of a failure mechanism.
+ ///
+ public class ExportableFailureMechanismAssemblyResult
+ {
+ ///
+ /// Creates a new instance of .
+ ///
+ /// The method that was used to assemble this result.
+ /// The assembly result.
+ public ExportableFailureMechanismAssemblyResult(ExportableAssemblyMethod assemblyMethod,
+ FailureMechanismAssemblyCategoryGroup assemblyCategory)
+ {
+ AssemblyMethod = assemblyMethod;
+ AssemblyCategory = assemblyCategory;
+ }
+
+ ///
+ /// Gets the assembly method that was used to assemble the assembly result.
+ ///
+ public ExportableAssemblyMethod AssemblyMethod { get; }
+
+ ///
+ /// Gets the assembly category result.
+ ///
+ public FailureMechanismAssemblyCategoryGroup AssemblyCategory { get; }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Integration/src/Riskeer.Integration.IO/Assembly/ExportableFailureMechanismAssemblyResultWithProbability.cs
===================================================================
diff -u
--- Ringtoets/Integration/src/Riskeer.Integration.IO/Assembly/ExportableFailureMechanismAssemblyResultWithProbability.cs (revision 0)
+++ Ringtoets/Integration/src/Riskeer.Integration.IO/Assembly/ExportableFailureMechanismAssemblyResultWithProbability.cs (revision 457970572d405d707ca5a96836d6a48babffc3a7)
@@ -0,0 +1,50 @@
+// Copyright (C) Stichting Deltares 2018. 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 Riskeer.AssemblyTool.Data;
+
+namespace Riskeer.Integration.IO.Assembly
+{
+ ///
+ /// Class that holds the information to export the assembly result with probability of a failure mechanism.
+ ///
+ public class ExportableFailureMechanismAssemblyResultWithProbability : ExportableFailureMechanismAssemblyResult
+ {
+ ///
+ /// Creates a new instance of .
+ ///
+ /// The method that was used to assemble this result.
+ /// The assembly result.
+ /// The probability of the assembly result.
+ public ExportableFailureMechanismAssemblyResultWithProbability(ExportableAssemblyMethod assemblyMethod,
+ FailureMechanismAssemblyCategoryGroup assemblyCategory,
+ double probability)
+ : base(assemblyMethod, assemblyCategory)
+ {
+ Probability = probability;
+ }
+
+ ///
+ /// Gets the probability of the assembly result of this failure mechanism.
+ ///
+ public double Probability { get; }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Integration/src/Riskeer.Integration.IO/Assembly/ExportableFailureMechanismCombinedSectionAssemblyResult.cs
===================================================================
diff -u
--- Ringtoets/Integration/src/Riskeer.Integration.IO/Assembly/ExportableFailureMechanismCombinedSectionAssemblyResult.cs (revision 0)
+++ Ringtoets/Integration/src/Riskeer.Integration.IO/Assembly/ExportableFailureMechanismCombinedSectionAssemblyResult.cs (revision 457970572d405d707ca5a96836d6a48babffc3a7)
@@ -0,0 +1,59 @@
+// Copyright (C) Stichting Deltares 2018. 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;
+
+namespace Riskeer.Integration.IO.Assembly
+{
+ ///
+ /// Class that holds all the information to export a combined section assembly result of a failure mechanism.
+ ///
+ public class ExportableFailureMechanismCombinedSectionAssemblyResult
+ {
+ ///
+ /// Creates a new instance of
+ ///
+ /// The assembly result of the combined section.
+ /// The code of the failure mechanism.
+ /// Thrown when is null.
+ public ExportableFailureMechanismCombinedSectionAssemblyResult(ExportableSectionAssemblyResult sectionAssemblyResult,
+ ExportableFailureMechanismType code)
+ {
+ if (sectionAssemblyResult == null)
+ {
+ throw new ArgumentNullException(nameof(sectionAssemblyResult));
+ }
+
+ SectionAssemblyResult = sectionAssemblyResult;
+ Code = code;
+ }
+
+ ///
+ /// Gets the assembly result of this combined section.
+ ///
+ public ExportableSectionAssemblyResult SectionAssemblyResult { get; }
+
+ ///
+ /// Gets the code of the failure mechanism.
+ ///
+ public ExportableFailureMechanismType Code { get; }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Integration/src/Riskeer.Integration.IO/Assembly/ExportableFailureMechanismGroup.cs
===================================================================
diff -u
--- Ringtoets/Integration/src/Riskeer.Integration.IO/Assembly/ExportableFailureMechanismGroup.cs (revision 0)
+++ Ringtoets/Integration/src/Riskeer.Integration.IO/Assembly/ExportableFailureMechanismGroup.cs (revision 457970572d405d707ca5a96836d6a48babffc3a7)
@@ -0,0 +1,49 @@
+// Copyright (C) Stichting Deltares 2018. 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 Riskeer.Integration.IO.Assembly
+{
+ ///
+ /// Enum defining the exportable failure mechanism groups.
+ ///
+ public enum ExportableFailureMechanismGroup
+ {
+ ///
+ /// Represents the failure mechanism group 1.
+ ///
+ Group1 = 1,
+
+ ///
+ /// Represents the failure mechanism group 2.
+ ///
+ Group2 = 2,
+
+ ///
+ /// Represents the failure mechanism group 3.
+ ///
+ Group3 = 3,
+
+ ///
+ /// Represents the failure mechanism group 4.
+ ///
+ Group4 = 4
+ }
+}
\ No newline at end of file
Index: Ringtoets/Integration/src/Riskeer.Integration.IO/Assembly/ExportableFailureMechanismSection.cs
===================================================================
diff -u
--- Ringtoets/Integration/src/Riskeer.Integration.IO/Assembly/ExportableFailureMechanismSection.cs (revision 0)
+++ Ringtoets/Integration/src/Riskeer.Integration.IO/Assembly/ExportableFailureMechanismSection.cs (revision 457970572d405d707ca5a96836d6a48babffc3a7)
@@ -0,0 +1,71 @@
+// Copyright (C) Stichting Deltares 2018. 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 Core.Common.Base.Geometry;
+
+namespace Riskeer.Integration.IO.Assembly
+{
+ ///
+ /// Class which holds all the information to export a failure mechanism section.
+ ///
+ public class ExportableFailureMechanismSection
+ {
+ ///
+ /// Creates a new instance of .
+ ///
+ /// The geometry of the failure mechanism section.
+ /// The start distance of the failure mechanism section between the section
+ /// and the start of the reference line in meters.
+ /// The end distance of the failure mechanism section between the section
+ /// and the start of the reference line in meters.
+ /// Thrown when is null.
+ public ExportableFailureMechanismSection(IEnumerable geometry, double startDistance, double endDistance)
+ {
+ if (geometry == null)
+ {
+ throw new ArgumentNullException(nameof(geometry));
+ }
+
+ Geometry = geometry;
+ StartDistance = startDistance;
+ EndDistance = endDistance;
+ }
+
+ ///
+ /// Gets the geometry of this failure mechanism section.
+ ///
+ public IEnumerable Geometry { get; }
+
+ ///
+ /// Gets the start distance between this failure mechanism section and the start of the reference line.
+ /// [m]
+ ///
+ public double StartDistance { get; }
+
+ ///
+ /// Gets the end distance between this failure mechanism section and the reference line.
+ /// [m]
+ ///
+ public double EndDistance { get; }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Integration/src/Riskeer.Integration.IO/Assembly/ExportableFailureMechanismType.cs
===================================================================
diff -u
--- Ringtoets/Integration/src/Riskeer.Integration.IO/Assembly/ExportableFailureMechanismType.cs (revision 0)
+++ Ringtoets/Integration/src/Riskeer.Integration.IO/Assembly/ExportableFailureMechanismType.cs (revision 457970572d405d707ca5a96836d6a48babffc3a7)
@@ -0,0 +1,119 @@
+// Copyright (C) Stichting Deltares 2018. 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 Riskeer.Integration.IO.Assembly
+{
+ ///
+ /// Enum representing the exportable failure mechanism types.
+ ///
+ public enum ExportableFailureMechanismType
+ {
+ ///
+ /// Represents the failure mechanism macro stability inwards.
+ ///
+ STBI = 1,
+
+ ///
+ /// Represents the failure mechanism macro stability outwards.
+ ///
+ STBU = 2,
+
+ ///
+ /// Represents the failure mechanism piping.
+ ///
+ STPH = 3,
+
+ ///
+ /// Represents the failure mechanism microstability.
+ ///
+ STMI = 4,
+
+ ///
+ /// Represents the failure mechanism wave impact asphalt cover.
+ ///
+ AGK = 5,
+
+ ///
+ /// Represents the failure mechanism water pressure asphalt cover.
+ ///
+ AWO = 6,
+
+ ///
+ /// Represents the failure mechanism grass cover erosion outwards.
+ ///
+ GEBU = 7,
+
+ ///
+ /// Represents the failure mechanism grass cover slipoff outwards.
+ ///
+ GABU = 8,
+
+ ///
+ /// Represents the failure mechanism grass cover erosion inwards.
+ ///
+ GEKB = 9,
+
+ ///
+ /// Represents the failure mechanism grass cover slipoff inwards.
+ ///
+ GABI = 10,
+
+ ///
+ /// Represents the failure mechanism stability stone cover.
+ ///
+ ZST = 11,
+
+ ///
+ /// Represents the failure mechanism dune erosion.
+ ///
+ DA = 12,
+
+ ///
+ /// Represents the failure mechanism height structures.
+ ///
+ HTKW = 13,
+
+ ///
+ /// Represents the failure mechanism closing structures.
+ ///
+ BSKW = 14,
+
+ ///
+ /// Represents the failure mechanism piping structures.
+ ///
+ PKW = 15,
+
+ ///
+ /// Represents the failure mechanism stability point structures.
+ ///
+ STKWp = 16,
+
+ ///
+ /// Represents the failure mechanism strength stability lengthwise construction.
+ ///
+ STKWl = 17,
+
+ ///
+ /// Represents the failure mechanism technical innovation.
+ ///
+ INN = 18
+ }
+}
\ No newline at end of file
Index: Ringtoets/Integration/src/Riskeer.Integration.IO/Assembly/ExportableSectionAssemblyResult.cs
===================================================================
diff -u
--- Ringtoets/Integration/src/Riskeer.Integration.IO/Assembly/ExportableSectionAssemblyResult.cs (revision 0)
+++ Ringtoets/Integration/src/Riskeer.Integration.IO/Assembly/ExportableSectionAssemblyResult.cs (revision 457970572d405d707ca5a96836d6a48babffc3a7)
@@ -0,0 +1,53 @@
+// Copyright (C) Stichting Deltares 2018. 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 Riskeer.AssemblyTool.Data;
+
+namespace Riskeer.Integration.IO.Assembly
+{
+ ///
+ /// Class that holds all the information to export an assembly result for a failure mechanism section.
+ ///
+ public class ExportableSectionAssemblyResult
+ {
+ ///
+ /// Creates a new instance of .
+ ///
+ /// The method that was used to assemble this result.
+ /// The assembly result of this section.
+ public ExportableSectionAssemblyResult(ExportableAssemblyMethod assemblyMethod,
+ FailureMechanismSectionAssemblyCategoryGroup assemblyCategory)
+ {
+ AssemblyMethod = assemblyMethod;
+ AssemblyCategory = assemblyCategory;
+ }
+
+ ///
+ /// Gets the assembly method that was used to assemble the assembly result.
+ ///
+ public ExportableAssemblyMethod AssemblyMethod { get; }
+
+ ///
+ /// Gets the assembly result of this section.
+ ///
+ public FailureMechanismSectionAssemblyCategoryGroup AssemblyCategory { get; }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Integration/src/Riskeer.Integration.IO/Assembly/ExportableSectionAssemblyResultWithProbability.cs
===================================================================
diff -u
--- Ringtoets/Integration/src/Riskeer.Integration.IO/Assembly/ExportableSectionAssemblyResultWithProbability.cs (revision 0)
+++ Ringtoets/Integration/src/Riskeer.Integration.IO/Assembly/ExportableSectionAssemblyResultWithProbability.cs (revision 457970572d405d707ca5a96836d6a48babffc3a7)
@@ -0,0 +1,50 @@
+// Copyright (C) Stichting Deltares 2018. 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 Riskeer.AssemblyTool.Data;
+
+namespace Riskeer.Integration.IO.Assembly
+{
+ ///
+ /// Class that holds all the information to export an assembly result with a probability for a failure mechanism section.
+ ///
+ public class ExportableSectionAssemblyResultWithProbability : ExportableSectionAssemblyResult
+ {
+ ///
+ /// Creates a new instance of .
+ ///
+ /// The method that was used to assemble this result.
+ /// The assembly result of this section.
+ /// The probability of the assembly result of this section.
+ public ExportableSectionAssemblyResultWithProbability(ExportableAssemblyMethod assemblyMethod,
+ FailureMechanismSectionAssemblyCategoryGroup assemblyCategory,
+ double probability)
+ : base(assemblyMethod, assemblyCategory)
+ {
+ Probability = probability;
+ }
+
+ ///
+ /// Gets the probability of the assembly result of this section.
+ ///
+ public double Probability { get; }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Integration/src/Riskeer.Integration.IO/Creators/AggregatedSerializableCombinedFailureMechanismSectionAssembliesCreator.cs
===================================================================
diff -u
--- Ringtoets/Integration/src/Riskeer.Integration.IO/Creators/AggregatedSerializableCombinedFailureMechanismSectionAssembliesCreator.cs (revision 0)
+++ Ringtoets/Integration/src/Riskeer.Integration.IO/Creators/AggregatedSerializableCombinedFailureMechanismSectionAssembliesCreator.cs (revision 457970572d405d707ca5a96836d6a48babffc3a7)
@@ -0,0 +1,83 @@
+// Copyright (C) Stichting Deltares 2018. 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 Riskeer.AssemblyTool.IO.Model;
+using Riskeer.Integration.IO.AggregatedSerializable;
+using Riskeer.Integration.IO.Assembly;
+using Riskeer.Integration.IO.Exceptions;
+using Riskeer.Integration.IO.Helpers;
+using Riskeer.Integration.IO.Properties;
+
+namespace Riskeer.Integration.IO.Creators
+{
+ ///
+ /// Creator to create instances of .
+ ///
+ internal static class AggregatedSerializableCombinedFailureMechanismSectionAssembliesCreator
+ {
+ ///
+ /// Creates an instance of
+ /// based on its input parameters.
+ ///
+ /// The generator to generate ids for the serializable components.
+ /// The the serializable components belong to.
+ /// The collection of
+ /// to create an for.
+ /// An .
+ /// Thrown when any parameter is null.
+ /// Thrown when is invalid to
+ /// create a serializable counterpart for.
+ public static AggregatedSerializableCombinedFailureMechanismSectionAssemblies Create(IdentifierGenerator idGenerator,
+ SerializableTotalAssemblyResult totalAssemblyResult,
+ IEnumerable combinedSectionAssemblies)
+ {
+ if (idGenerator == null)
+ {
+ throw new ArgumentNullException(nameof(idGenerator));
+ }
+
+ if (totalAssemblyResult == null)
+ {
+ throw new ArgumentNullException(nameof(totalAssemblyResult));
+ }
+
+ if (combinedSectionAssemblies == null)
+ {
+ throw new ArgumentNullException(nameof(combinedSectionAssemblies));
+ }
+
+ var failureMechanismSectionCollection = new SerializableFailureMechanismSectionCollection(
+ idGenerator.GetNewId(Resources.SerializableFailureMechanismSectionCollection_IdPrefix));
+
+ AggregatedSerializableCombinedFailureMechanismSectionAssembly[] aggregatedAssemblies =
+ combinedSectionAssemblies.Select(assembly => AggregatedSerializableCombinedFailureMechanismSectionAssemblyCreator.Create(
+ idGenerator, totalAssemblyResult, failureMechanismSectionCollection, assembly))
+ .ToArray();
+
+ return new AggregatedSerializableCombinedFailureMechanismSectionAssemblies(failureMechanismSectionCollection,
+ aggregatedAssemblies.Select(ag => ag.FailureMechanismSection),
+ aggregatedAssemblies.Select(ag => ag.CombinedFailureMechanismSectionAssembly));
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Integration/src/Riskeer.Integration.IO/Creators/AggregatedSerializableCombinedFailureMechanismSectionAssemblyCreator.cs
===================================================================
diff -u
--- Ringtoets/Integration/src/Riskeer.Integration.IO/Creators/AggregatedSerializableCombinedFailureMechanismSectionAssemblyCreator.cs (revision 0)
+++ Ringtoets/Integration/src/Riskeer.Integration.IO/Creators/AggregatedSerializableCombinedFailureMechanismSectionAssemblyCreator.cs (revision 457970572d405d707ca5a96836d6a48babffc3a7)
@@ -0,0 +1,96 @@
+// Copyright (C) Stichting Deltares 2018. 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.Linq;
+using Riskeer.AssemblyTool.IO.Model;
+using Riskeer.AssemblyTool.IO.Model.Enums;
+using Riskeer.Integration.IO.AggregatedSerializable;
+using Riskeer.Integration.IO.Assembly;
+using Riskeer.Integration.IO.Exceptions;
+using Riskeer.Integration.IO.Helpers;
+using Riskeer.Integration.IO.Properties;
+
+namespace Riskeer.Integration.IO.Creators
+{
+ ///
+ /// Creator to create instances of .
+ ///
+ internal static class AggregatedSerializableCombinedFailureMechanismSectionAssemblyCreator
+ {
+ ///
+ /// Creates an instance of
+ /// based on its input parameters.
+ ///
+ /// The generator to generate ids for the serializable components.
+ /// The the serializable
+ /// components belongs to.
+ /// The
+ /// the serializable failure mechanism sections belong to.
+ /// The to create an
+ /// for.
+ /// An .
+ /// Thrown when any parameter is null.
+ /// Thrown when
+ /// is invalid to create a serializable counterpart for.
+ public static AggregatedSerializableCombinedFailureMechanismSectionAssembly Create(IdentifierGenerator idGenerator,
+ SerializableTotalAssemblyResult serializableTotalAssemblyResult,
+ SerializableFailureMechanismSectionCollection serializableFailureMechanismSectionCollection,
+ ExportableCombinedSectionAssembly combinedSectionAssembly)
+ {
+ if (idGenerator == null)
+ {
+ throw new ArgumentNullException(nameof(idGenerator));
+ }
+
+ if (serializableTotalAssemblyResult == null)
+ {
+ throw new ArgumentNullException(nameof(serializableTotalAssemblyResult));
+ }
+
+ if (serializableFailureMechanismSectionCollection == null)
+ {
+ throw new ArgumentNullException(nameof(serializableFailureMechanismSectionCollection));
+ }
+
+ if (combinedSectionAssembly == null)
+ {
+ throw new ArgumentNullException(nameof(combinedSectionAssembly));
+ }
+
+ SerializableFailureMechanismSection failureMechanismSection = SerializableFailureMechanismSectionCreator.Create(idGenerator,
+ serializableFailureMechanismSectionCollection,
+ combinedSectionAssembly.Section);
+
+ return new AggregatedSerializableCombinedFailureMechanismSectionAssembly(
+ failureMechanismSection,
+ new SerializableCombinedFailureMechanismSectionAssembly(
+ idGenerator.GetNewId(Resources.SerializableCombinedFailureMechanismSectionAssembly_IdPrefix),
+ serializableTotalAssemblyResult,
+ failureMechanismSection,
+ combinedSectionAssembly.FailureMechanismResults
+ .Select(SerializableCombinedFailureMechanismSectionAssemblyResultCreator.Create)
+ .ToArray(),
+ SerializableFailureMechanismSectionAssemblyResultCreator.Create(SerializableAssessmentType.CombinedSectionAssessment,
+ combinedSectionAssembly.CombinedSectionAssemblyResult)));
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Integration/src/Riskeer.Integration.IO/Creators/AggregatedSerializableFailureMechanismCreator.cs
===================================================================
diff -u
--- Ringtoets/Integration/src/Riskeer.Integration.IO/Creators/AggregatedSerializableFailureMechanismCreator.cs (revision 0)
+++ Ringtoets/Integration/src/Riskeer.Integration.IO/Creators/AggregatedSerializableFailureMechanismCreator.cs (revision 457970572d405d707ca5a96836d6a48babffc3a7)
@@ -0,0 +1,187 @@
+// Copyright (C) Stichting Deltares 2018. 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.Linq;
+using Riskeer.AssemblyTool.IO.Model;
+using Riskeer.Integration.IO.AggregatedSerializable;
+using Riskeer.Integration.IO.Assembly;
+using Riskeer.Integration.IO.Exceptions;
+using Riskeer.Integration.IO.Helpers;
+using Riskeer.Integration.IO.Properties;
+
+namespace Riskeer.Integration.IO.Creators
+{
+ ///
+ /// Creator to create instances of .
+ ///
+ internal static class AggregatedSerializableFailureMechanismCreator
+ {
+ ///
+ /// Creates an instance of based on its input parameters.
+ ///
+ /// The generator to generate ids for the serializable components.
+ /// The
+ /// the serializable components belong to.
+ /// The
+ /// without a probability to create an for.
+ /// An .
+ /// Thrown when any parameter is null.
+ /// Thrown when
+ /// is invalid to create a serializable counterpart for.
+ /// Thrown when the
+ /// contains unsupported items in the failure mechanism section assembly results.
+ public static AggregatedSerializableFailureMechanism Create(IdentifierGenerator idGenerator,
+ SerializableTotalAssemblyResult serializableTotalAssemblyResult,
+ ExportableFailureMechanism failureMechanism)
+ {
+ if (idGenerator == null)
+ {
+ throw new ArgumentNullException(nameof(idGenerator));
+ }
+
+ if (serializableTotalAssemblyResult == null)
+ {
+ throw new ArgumentNullException(nameof(serializableTotalAssemblyResult));
+ }
+
+ if (failureMechanism == null)
+ {
+ throw new ArgumentNullException(nameof(failureMechanism));
+ }
+
+ SerializableFailureMechanism serializableFailureMechanism = SerializableFailureMechanismCreator.Create(idGenerator, serializableTotalAssemblyResult, failureMechanism);
+ var serializableCollection = new SerializableFailureMechanismSectionCollection(idGenerator.GetNewId(Resources.SerializableFailureMechanismSectionCollection_IdPrefix));
+
+ AggregatedSerializableFailureMechanismSectionAssembly[] serializableFailureMechanismSectionAssemblyResults =
+ failureMechanism.SectionAssemblyResults
+ .Select(sectionAssemblyResult => CreateFailureMechanismSectionAssembly(idGenerator,
+ serializableFailureMechanism,
+ serializableCollection,
+ sectionAssemblyResult))
+ .ToArray();
+
+ return new AggregatedSerializableFailureMechanism(serializableFailureMechanism,
+ serializableCollection,
+ serializableFailureMechanismSectionAssemblyResults.Select(fmr => fmr.FailureMechanismSection),
+ serializableFailureMechanismSectionAssemblyResults.Select(fmr => fmr.FailureMechanismSectionAssembly));
+ }
+
+ ///
+ /// Creates an instance of based on its input parameters.
+ ///
+ /// The id generator to generate an id for the serializable components.
+ /// The the serializable components belong to.
+ /// The with a probability to
+ /// create an for.
+ /// An .
+ /// Thrown when any parameter is null.
+ /// Thrown when is invalid to create a serializable counterpart for.
+ /// Thrown when the
+ /// contains unsupported items in the failure mechanism section assembly results.
+ public static AggregatedSerializableFailureMechanism Create(IdentifierGenerator idGenerator,
+ SerializableTotalAssemblyResult serializableTotalAssemblyResult,
+ ExportableFailureMechanism failureMechanism)
+ {
+ if (idGenerator == null)
+ {
+ throw new ArgumentNullException(nameof(idGenerator));
+ }
+
+ if (serializableTotalAssemblyResult == null)
+ {
+ throw new ArgumentNullException(nameof(serializableTotalAssemblyResult));
+ }
+
+ if (failureMechanism == null)
+ {
+ throw new ArgumentNullException(nameof(failureMechanism));
+ }
+
+ SerializableFailureMechanism serializableFailureMechanism = SerializableFailureMechanismCreator.Create(idGenerator, serializableTotalAssemblyResult, failureMechanism);
+ var serializableCollection = new SerializableFailureMechanismSectionCollection(idGenerator.GetNewId(Resources.SerializableFailureMechanismSectionCollection_IdPrefix));
+
+ AggregatedSerializableFailureMechanismSectionAssembly[] serializableFailureMechanismSectionAssemblyResults =
+ failureMechanism.SectionAssemblyResults
+ .Select(sectionAssemblyResult => CreateFailureMechanismSectionAssembly(idGenerator,
+ serializableFailureMechanism,
+ serializableCollection,
+ sectionAssemblyResult))
+ .ToArray();
+
+ return new AggregatedSerializableFailureMechanism(serializableFailureMechanism,
+ serializableCollection,
+ serializableFailureMechanismSectionAssemblyResults.Select(fmr => fmr.FailureMechanismSection),
+ serializableFailureMechanismSectionAssemblyResults.Select(fmr => fmr.FailureMechanismSectionAssembly));
+ }
+
+ ///
+ /// Creates an instance of based on its input parameters.
+ ///
+ /// The id generator to generate the id for the serializable components.
+ /// The the section assembly belongs to.
+ /// The the section assembly belongs to.
+ /// An aggregated failure mechanism section assembly result to
+ /// create an for.
+ /// An .
+ /// Thrown when is invalid to create a serializable counterpart for.
+ /// Thrown when an
+ /// cannot be created for .
+ private static AggregatedSerializableFailureMechanismSectionAssembly CreateFailureMechanismSectionAssembly(
+ IdentifierGenerator idGenerator,
+ SerializableFailureMechanism serializableFailureMechanism,
+ SerializableFailureMechanismSectionCollection serializableCollection,
+ ExportableAggregatedFailureMechanismSectionAssemblyResultBase failureMechanismSectionAssemblyResult)
+ {
+ var resultWithProbability = failureMechanismSectionAssemblyResult as ExportableAggregatedFailureMechanismSectionAssemblyResultWithProbability;
+ if (resultWithProbability != null)
+ {
+ return AggregatedSerializableFailureMechanismSectionAssemblyCreator.Create(idGenerator, serializableCollection, serializableFailureMechanism, resultWithProbability);
+ }
+
+ var resultWithoutProbability = failureMechanismSectionAssemblyResult as ExportableAggregatedFailureMechanismSectionAssemblyResult;
+ if (resultWithoutProbability != null)
+ {
+ return AggregatedSerializableFailureMechanismSectionAssemblyCreator.Create(idGenerator, serializableCollection, serializableFailureMechanism, resultWithoutProbability);
+ }
+
+ var resultWithoutDetailedAssembly = failureMechanismSectionAssemblyResult as ExportableAggregatedFailureMechanismSectionAssemblyResultWithoutDetailedAssembly;
+ if (resultWithoutDetailedAssembly != null)
+ {
+ return AggregatedSerializableFailureMechanismSectionAssemblyCreator.Create(idGenerator, serializableCollection, serializableFailureMechanism, resultWithoutDetailedAssembly);
+ }
+
+ var resultWithCombinedAssembly = failureMechanismSectionAssemblyResult as ExportableAggregatedFailureMechanismSectionAssemblyWithCombinedResult;
+ if (resultWithCombinedAssembly != null)
+ {
+ return AggregatedSerializableFailureMechanismSectionAssemblyCreator.Create(idGenerator, serializableCollection, serializableFailureMechanism, resultWithCombinedAssembly);
+ }
+
+ var resultWithCombinedProbabilityAssembly = failureMechanismSectionAssemblyResult as ExportableAggregatedFailureMechanismSectionAssemblyWithCombinedProbabilityResult;
+ if (resultWithCombinedProbabilityAssembly != null)
+ {
+ return AggregatedSerializableFailureMechanismSectionAssemblyCreator.Create(idGenerator, serializableCollection, serializableFailureMechanism, resultWithCombinedProbabilityAssembly);
+ }
+
+ throw new NotSupportedException($"{failureMechanismSectionAssemblyResult.GetType().Name} is not supported.");
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Integration/src/Riskeer.Integration.IO/Creators/AggregatedSerializableFailureMechanismSectionAssemblyCreator.cs
===================================================================
diff -u
--- Ringtoets/Integration/src/Riskeer.Integration.IO/Creators/AggregatedSerializableFailureMechanismSectionAssemblyCreator.cs (revision 0)
+++ Ringtoets/Integration/src/Riskeer.Integration.IO/Creators/AggregatedSerializableFailureMechanismSectionAssemblyCreator.cs (revision 457970572d405d707ca5a96836d6a48babffc3a7)
@@ -0,0 +1,380 @@
+// Copyright (C) Stichting Deltares 2018. 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 Riskeer.AssemblyTool.Data;
+using Riskeer.AssemblyTool.IO.Model;
+using Riskeer.AssemblyTool.IO.Model.DataTypes;
+using Riskeer.AssemblyTool.IO.Model.Enums;
+using Riskeer.Integration.IO.AggregatedSerializable;
+using Riskeer.Integration.IO.Assembly;
+using Riskeer.Integration.IO.Exceptions;
+using Riskeer.Integration.IO.Helpers;
+using Riskeer.Integration.IO.Properties;
+
+namespace Riskeer.Integration.IO.Creators
+{
+ ///
+ /// Creator to create instances of .
+ ///
+ internal static class AggregatedSerializableFailureMechanismSectionAssemblyCreator
+ {
+ ///
+ /// Creates an instance of based on its input parameters.
+ ///
+ /// The generator to generate ids for the serializable components.
+ /// The the result belongs to.
+ /// The the result belongs to.
+ /// The
+ /// to create an for.
+ /// An .
+ /// Thrown when any parameter is null.
+ /// Thrown when is invalid to create a serializable counterpart for.
+ public static AggregatedSerializableFailureMechanismSectionAssembly Create(IdentifierGenerator idGenerator,
+ SerializableFailureMechanismSectionCollection serializableCollection,
+ SerializableFailureMechanism serializableFailureMechanism,
+ ExportableAggregatedFailureMechanismSectionAssemblyResult sectionResult)
+ {
+ if (idGenerator == null)
+ {
+ throw new ArgumentNullException(nameof(idGenerator));
+ }
+
+ if (serializableCollection == null)
+ {
+ throw new ArgumentNullException(nameof(serializableCollection));
+ }
+
+ if (serializableFailureMechanism == null)
+ {
+ throw new ArgumentNullException(nameof(serializableFailureMechanism));
+ }
+
+ if (sectionResult == null)
+ {
+ throw new ArgumentNullException(nameof(sectionResult));
+ }
+
+ SerializableFailureMechanismSection failureMechanismSection = SerializableFailureMechanismSectionCreator.Create(idGenerator,
+ serializableCollection,
+ sectionResult.FailureMechanismSection);
+
+ var failureMechanismSectionAssembly = new SerializableFailureMechanismSectionAssembly(idGenerator.GetNewId(Resources.SerializableFailureMechanismSectionAssembly_IdPrefix),
+ serializableFailureMechanism,
+ failureMechanismSection,
+ CreateAssemblySectionResults(sectionResult),
+ SerializableFailureMechanismSectionAssemblyResultCreator.Create(SerializableAssessmentType.CombinedAssessment,
+ sectionResult.CombinedAssembly));
+ return new AggregatedSerializableFailureMechanismSectionAssembly(failureMechanismSection,
+ failureMechanismSectionAssembly);
+ }
+
+ ///
+ /// Creates an instance of based on its input parameters.
+ ///
+ /// The id generator to generate an id for .
+ /// The the result belongs to.
+ /// The the result belongs to.
+ /// The
+ /// to create an for.
+ /// An .
+ /// Thrown when any parameter is null.
+ /// Thrown when is invalid to create a serializable counterpart for.
+ public static AggregatedSerializableFailureMechanismSectionAssembly Create(IdentifierGenerator idGenerator,
+ SerializableFailureMechanismSectionCollection serializableCollection,
+ SerializableFailureMechanism serializableFailureMechanism,
+ ExportableAggregatedFailureMechanismSectionAssemblyResultWithProbability sectionResult)
+ {
+ if (idGenerator == null)
+ {
+ throw new ArgumentNullException(nameof(idGenerator));
+ }
+
+ if (serializableCollection == null)
+ {
+ throw new ArgumentNullException(nameof(serializableCollection));
+ }
+
+ if (serializableFailureMechanism == null)
+ {
+ throw new ArgumentNullException(nameof(serializableFailureMechanism));
+ }
+
+ if (sectionResult == null)
+ {
+ throw new ArgumentNullException(nameof(sectionResult));
+ }
+
+ SerializableFailureMechanismSection failureMechanismSection = SerializableFailureMechanismSectionCreator.Create(idGenerator,
+ serializableCollection,
+ sectionResult.FailureMechanismSection);
+
+ var failureMechanismSectionAssembly = new SerializableFailureMechanismSectionAssembly(idGenerator.GetNewId(Resources.SerializableFailureMechanismSectionAssembly_IdPrefix),
+ serializableFailureMechanism,
+ failureMechanismSection,
+ CreateAssemblySectionResults(sectionResult),
+ SerializableFailureMechanismSectionAssemblyResultCreator.Create(SerializableAssessmentType.CombinedAssessment,
+ sectionResult.CombinedAssembly));
+ return new AggregatedSerializableFailureMechanismSectionAssembly(failureMechanismSection,
+ failureMechanismSectionAssembly);
+ }
+
+ ///
+ /// Creates an instance of based on its input parameters.
+ ///
+ /// The id generator to generate an id for .
+ /// The the result belongs to.
+ /// The the result belongs to.
+ /// The
+ /// to create an for.
+ /// An .
+ /// Thrown when any parameter is null.
+ /// Thrown when is invalid to create a serializable counterpart for.
+ public static AggregatedSerializableFailureMechanismSectionAssembly Create(IdentifierGenerator idGenerator,
+ SerializableFailureMechanismSectionCollection serializableCollection,
+ SerializableFailureMechanism serializableFailureMechanism,
+ ExportableAggregatedFailureMechanismSectionAssemblyResultWithoutDetailedAssembly sectionResult)
+ {
+ if (idGenerator == null)
+ {
+ throw new ArgumentNullException(nameof(idGenerator));
+ }
+
+ if (serializableCollection == null)
+ {
+ throw new ArgumentNullException(nameof(serializableCollection));
+ }
+
+ if (serializableFailureMechanism == null)
+ {
+ throw new ArgumentNullException(nameof(serializableFailureMechanism));
+ }
+
+ if (sectionResult == null)
+ {
+ throw new ArgumentNullException(nameof(sectionResult));
+ }
+
+ SerializableFailureMechanismSection failureMechanismSection = SerializableFailureMechanismSectionCreator.Create(idGenerator,
+ serializableCollection,
+ sectionResult.FailureMechanismSection);
+
+ var failureMechanismSectionAssembly = new SerializableFailureMechanismSectionAssembly(idGenerator.GetNewId(Resources.SerializableFailureMechanismSectionAssembly_IdPrefix),
+ serializableFailureMechanism,
+ failureMechanismSection,
+ CreateAssemblySectionResults(sectionResult),
+ SerializableFailureMechanismSectionAssemblyResultCreator.Create(SerializableAssessmentType.CombinedAssessment,
+ sectionResult.CombinedAssembly));
+ return new AggregatedSerializableFailureMechanismSectionAssembly(failureMechanismSection,
+ failureMechanismSectionAssembly);
+ }
+
+ ///
+ /// Creates an instance of based on its input parameters.
+ ///
+ /// The id generator to generate an id for .
+ /// The the result belongs to.
+ /// The the result belongs to.
+ /// The
+ /// to create an for.
+ /// An .
+ /// Thrown when any parameter is null.
+ /// Thrown when is invalid to create a serializable counterpart for.
+ public static AggregatedSerializableFailureMechanismSectionAssembly Create(IdentifierGenerator idGenerator,
+ SerializableFailureMechanismSectionCollection serializableCollection,
+ SerializableFailureMechanism serializableFailureMechanism,
+ ExportableAggregatedFailureMechanismSectionAssemblyWithCombinedResult sectionResult)
+ {
+ if (idGenerator == null)
+ {
+ throw new ArgumentNullException(nameof(idGenerator));
+ }
+
+ if (serializableCollection == null)
+ {
+ throw new ArgumentNullException(nameof(serializableCollection));
+ }
+
+ if (serializableFailureMechanism == null)
+ {
+ throw new ArgumentNullException(nameof(serializableFailureMechanism));
+ }
+
+ if (sectionResult == null)
+ {
+ throw new ArgumentNullException(nameof(sectionResult));
+ }
+
+ SerializableFailureMechanismSection failureMechanismSection = SerializableFailureMechanismSectionCreator.Create(idGenerator,
+ serializableCollection,
+ sectionResult.FailureMechanismSection);
+
+ var failureMechanismSectionAssembly = new SerializableFailureMechanismSectionAssembly(idGenerator.GetNewId(Resources.SerializableFailureMechanismSectionAssembly_IdPrefix),
+ serializableFailureMechanism,
+ failureMechanismSection,
+ new SerializableFailureMechanismSectionAssemblyResult[0],
+ SerializableFailureMechanismSectionAssemblyResultCreator.Create(SerializableAssessmentType.CombinedAssessment,
+ sectionResult.CombinedAssembly));
+ return new AggregatedSerializableFailureMechanismSectionAssembly(failureMechanismSection,
+ failureMechanismSectionAssembly);
+ }
+
+ ///
+ /// Creates an instance of based on its input parameters.
+ ///
+ /// The id generator to generate an id for .
+ /// The the result belongs to.
+ /// The the result belongs to.
+ /// The to create an
+ /// for.
+ /// An .
+ /// Thrown when any parameter is null.
+ /// Thrown when is invalid to create a serializable counterpart for.
+ public static AggregatedSerializableFailureMechanismSectionAssembly Create(IdentifierGenerator idGenerator,
+ SerializableFailureMechanismSectionCollection serializableCollection,
+ SerializableFailureMechanism serializableFailureMechanism,
+ ExportableAggregatedFailureMechanismSectionAssemblyWithCombinedProbabilityResult sectionResult)
+ {
+ if (idGenerator == null)
+ {
+ throw new ArgumentNullException(nameof(idGenerator));
+ }
+
+ if (serializableCollection == null)
+ {
+ throw new ArgumentNullException(nameof(serializableCollection));
+ }
+
+ if (serializableFailureMechanism == null)
+ {
+ throw new ArgumentNullException(nameof(serializableFailureMechanism));
+ }
+
+ if (sectionResult == null)
+ {
+ throw new ArgumentNullException(nameof(sectionResult));
+ }
+
+ SerializableFailureMechanismSection failureMechanismSection = SerializableFailureMechanismSectionCreator.Create(idGenerator,
+ serializableCollection,
+ sectionResult.FailureMechanismSection);
+
+ var failureMechanismSectionAssembly = new SerializableFailureMechanismSectionAssembly(idGenerator.GetNewId(Resources.SerializableFailureMechanismSectionAssembly_IdPrefix),
+ serializableFailureMechanism,
+ failureMechanismSection,
+ new SerializableFailureMechanismSectionAssemblyResult[0],
+ SerializableFailureMechanismSectionAssemblyResultCreator.Create(SerializableAssessmentType.CombinedAssessment,
+ sectionResult.CombinedAssembly));
+ return new AggregatedSerializableFailureMechanismSectionAssembly(failureMechanismSection,
+ failureMechanismSectionAssembly);
+ }
+
+ ///
+ /// Creates a collection of based on .
+ ///
+ /// The to create a collection of
+ /// for.
+ /// Thrown when is invalid to create a serializable counterpart for.
+ private static SerializableFailureMechanismSectionAssemblyResult[] CreateAssemblySectionResults(ExportableAggregatedFailureMechanismSectionAssemblyResult sectionResult)
+ {
+ var serializableSectionAssemblyResults = new List();
+
+ if (sectionResult.SimpleAssembly.AssemblyCategory != FailureMechanismSectionAssemblyCategoryGroup.None)
+ {
+ serializableSectionAssemblyResults.Add(SerializableFailureMechanismSectionAssemblyResultCreator.Create(SerializableAssessmentType.SimpleAssessment,
+ sectionResult.SimpleAssembly));
+ }
+
+ if (sectionResult.DetailedAssembly.AssemblyCategory != FailureMechanismSectionAssemblyCategoryGroup.None)
+ {
+ serializableSectionAssemblyResults.Add(SerializableFailureMechanismSectionAssemblyResultCreator.Create(SerializableAssessmentType.DetailedAssessment,
+ sectionResult.DetailedAssembly));
+ }
+
+ if (sectionResult.TailorMadeAssembly.AssemblyCategory != FailureMechanismSectionAssemblyCategoryGroup.None)
+ {
+ serializableSectionAssemblyResults.Add(SerializableFailureMechanismSectionAssemblyResultCreator.Create(SerializableAssessmentType.TailorMadeAssessment,
+ sectionResult.TailorMadeAssembly));
+ }
+
+ return serializableSectionAssemblyResults.ToArray();
+ }
+
+ ///
+ /// Creates a collection of based on .
+ ///
+ /// The to create a collection of
+ /// for.
+ /// Thrown when is invalid to create a serializable counterpart for.
+ private static SerializableFailureMechanismSectionAssemblyResult[] CreateAssemblySectionResults(
+ ExportableAggregatedFailureMechanismSectionAssemblyResultWithProbability sectionResult)
+ {
+ var serializableSectionAssemblyResults = new List();
+
+ if (sectionResult.SimpleAssembly.AssemblyCategory != FailureMechanismSectionAssemblyCategoryGroup.None)
+ {
+ serializableSectionAssemblyResults.Add(SerializableFailureMechanismSectionAssemblyResultCreator.Create(SerializableAssessmentType.SimpleAssessment,
+ sectionResult.SimpleAssembly));
+ }
+
+ if (sectionResult.DetailedAssembly.AssemblyCategory != FailureMechanismSectionAssemblyCategoryGroup.None)
+ {
+ serializableSectionAssemblyResults.Add(SerializableFailureMechanismSectionAssemblyResultCreator.Create(SerializableAssessmentType.DetailedAssessment,
+ sectionResult.DetailedAssembly));
+ }
+
+ if (sectionResult.TailorMadeAssembly.AssemblyCategory != FailureMechanismSectionAssemblyCategoryGroup.None)
+ {
+ serializableSectionAssemblyResults.Add(SerializableFailureMechanismSectionAssemblyResultCreator.Create(SerializableAssessmentType.TailorMadeAssessment,
+ sectionResult.TailorMadeAssembly));
+ }
+
+ return serializableSectionAssemblyResults.ToArray();
+ }
+
+ ///
+ /// Creates a collection of based on .
+ ///
+ /// The to create a collection of
+ /// for.
+ /// Thrown when is invalid to create a serializable counterpart for.
+ private static SerializableFailureMechanismSectionAssemblyResult[] CreateAssemblySectionResults(
+ ExportableAggregatedFailureMechanismSectionAssemblyResultWithoutDetailedAssembly sectionResult)
+ {
+ var serializableSectionAssemblyResults = new List();
+
+ if (sectionResult.SimpleAssembly.AssemblyCategory != FailureMechanismSectionAssemblyCategoryGroup.None)
+ {
+ serializableSectionAssemblyResults.Add(SerializableFailureMechanismSectionAssemblyResultCreator.Create(SerializableAssessmentType.SimpleAssessment,
+ sectionResult.SimpleAssembly));
+ }
+
+ if (sectionResult.TailorMadeAssembly.AssemblyCategory != FailureMechanismSectionAssemblyCategoryGroup.None)
+ {
+ serializableSectionAssemblyResults.Add(SerializableFailureMechanismSectionAssemblyResultCreator.Create(SerializableAssessmentType.TailorMadeAssessment,
+ sectionResult.TailorMadeAssembly));
+ }
+
+ return serializableSectionAssemblyResults.ToArray();
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Integration/src/Riskeer.Integration.IO/Creators/SerializableAssemblyCreator.cs
===================================================================
diff -u
--- Ringtoets/Integration/src/Riskeer.Integration.IO/Creators/SerializableAssemblyCreator.cs (revision 0)
+++ Ringtoets/Integration/src/Riskeer.Integration.IO/Creators/SerializableAssemblyCreator.cs (revision 457970572d405d707ca5a96836d6a48babffc3a7)
@@ -0,0 +1,171 @@
+// Copyright (C) Stichting Deltares 2018. 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.Geometry;
+using Riskeer.AssemblyTool.IO.Model;
+using Riskeer.Integration.IO.AggregatedSerializable;
+using Riskeer.Integration.IO.Assembly;
+using Riskeer.Integration.IO.Exceptions;
+using Riskeer.Integration.IO.Helpers;
+using Riskeer.Integration.IO.Properties;
+
+namespace Riskeer.Integration.IO.Creators
+{
+ ///
+ /// Creator to create instances of .
+ ///
+ public static class SerializableAssemblyCreator
+ {
+ ///
+ /// Creates an instance of based
+ /// on .
+ ///
+ /// The
+ /// to create a for.
+ /// A .
+ /// Thrown when
+ /// is null.
+ /// Thrown when the is invalid
+ /// to create a serializable counterpart for.
+ public static SerializableAssembly Create(ExportableAssessmentSection assessmentSection)
+ {
+ if (assessmentSection == null)
+ {
+ throw new ArgumentNullException(nameof(assessmentSection));
+ }
+
+ var idGenerator = new IdentifierGenerator();
+ string serializableAssemblyId = idGenerator.GetNewId(Resources.SerializableAssembly_IdPrefix);
+
+ SerializableAssessmentSection serializableAssessmentSection = SerializableAssessmentSectionCreator.Create(assessmentSection);
+ SerializableAssessmentProcess serializableAssessmentProcess = SerializableAssessmentProcessCreator.Create(idGenerator, serializableAssessmentSection);
+ SerializableTotalAssemblyResult serializableTotalAssemblyResult =
+ SerializableTotalAssemblyResultCreator.Create(idGenerator,
+ serializableAssessmentProcess,
+ SerializableFailureMechanismResultCreator.Create(assessmentSection.FailureMechanismAssemblyWithProbability),
+ SerializableFailureMechanismResultCreator.Create(assessmentSection.FailureMechanismAssemblyWithoutProbability),
+ SerializableAssessmentSectionAssemblyResultCreator.Create(assessmentSection.AssessmentSectionAssembly));
+
+ AggregatedSerializableFailureMechanism[] aggregatedFailureMechanismsWithProbability = assessmentSection.FailureMechanismsWithProbability
+ .Select(fm => CreateFailureMechanismsWithProbability(idGenerator, serializableTotalAssemblyResult, fm))
+ .ToArray();
+ AggregatedSerializableFailureMechanism[] aggregatedFailureMechanismsWithoutProbability = assessmentSection.FailureMechanismsWithoutProbability
+ .Select(fm => CreateFailureMechanismsWithoutProbability(idGenerator, serializableTotalAssemblyResult, fm))
+ .ToArray();
+
+ AggregatedSerializableCombinedFailureMechanismSectionAssemblies aggregatedSerializableCombinedFailureMechanismSectionAssemblies =
+ AggregatedSerializableCombinedFailureMechanismSectionAssembliesCreator.Create(idGenerator,
+ serializableTotalAssemblyResult,
+ assessmentSection.CombinedSectionAssemblies);
+
+ return new SerializableAssembly(serializableAssemblyId,
+ GetLowerCorner(assessmentSection.Geometry),
+ GetUpperCorner(assessmentSection.Geometry),
+ serializableAssessmentSection,
+ serializableAssessmentProcess,
+ serializableTotalAssemblyResult,
+ GetAllSerializableFailureMechanisms(aggregatedFailureMechanismsWithProbability,
+ aggregatedFailureMechanismsWithoutProbability),
+ GetAllSerializableFailureMechanismSectionAssemblies(aggregatedFailureMechanismsWithProbability,
+ aggregatedFailureMechanismsWithoutProbability),
+ aggregatedSerializableCombinedFailureMechanismSectionAssemblies.CombinedFailureMechanismSectionAssemblies,
+ GetAllSerializableFailureMechanismSectionCollections(aggregatedFailureMechanismsWithProbability,
+ aggregatedFailureMechanismsWithoutProbability,
+ aggregatedSerializableCombinedFailureMechanismSectionAssemblies),
+ GetAllSerializableFailureMechanismSections(aggregatedFailureMechanismsWithProbability,
+ aggregatedFailureMechanismsWithoutProbability,
+ aggregatedSerializableCombinedFailureMechanismSectionAssemblies));
+ }
+
+ private static AggregatedSerializableFailureMechanism CreateFailureMechanismsWithProbability(IdentifierGenerator idGenerator,
+ SerializableTotalAssemblyResult serializableTotalAssemblyResult,
+ ExportableFailureMechanism failureMechanism)
+ {
+ return AggregatedSerializableFailureMechanismCreator.Create(idGenerator, serializableTotalAssemblyResult, failureMechanism);
+ }
+
+ private static AggregatedSerializableFailureMechanism CreateFailureMechanismsWithoutProbability(IdentifierGenerator idGenerator,
+ SerializableTotalAssemblyResult serializableTotalAssemblyResult,
+ ExportableFailureMechanism failureMechanism)
+ {
+ return AggregatedSerializableFailureMechanismCreator.Create(idGenerator, serializableTotalAssemblyResult, failureMechanism);
+ }
+
+ private static IEnumerable GetAllSerializableFailureMechanismSectionAssemblies(
+ IEnumerable aggregatedFailureMechanismsWithProbability,
+ IEnumerable aggregatedFailureMechanismsWithoutProbability)
+ {
+ var serializableFailureMechanismSectionAssemblies = new List();
+ serializableFailureMechanismSectionAssemblies.AddRange(aggregatedFailureMechanismsWithProbability.SelectMany(afm => afm.FailureMechanismSectionAssemblyResults));
+ serializableFailureMechanismSectionAssemblies.AddRange(aggregatedFailureMechanismsWithoutProbability.SelectMany(afm => afm.FailureMechanismSectionAssemblyResults));
+ return serializableFailureMechanismSectionAssemblies;
+ }
+
+ private static IEnumerable GetAllSerializableFailureMechanismSections(
+ IEnumerable aggregatedFailureMechanismsWithProbability,
+ IEnumerable aggregatedFailureMechanismsWithoutProbability,
+ AggregatedSerializableCombinedFailureMechanismSectionAssemblies aggregatedSerializableCombinedFailureMechanismSectionAssemblies)
+ {
+ var serializableFailureMechanismSections = new List();
+ serializableFailureMechanismSections.AddRange(aggregatedFailureMechanismsWithProbability.SelectMany(afm => afm.FailureMechanismSections));
+ serializableFailureMechanismSections.AddRange(aggregatedFailureMechanismsWithoutProbability.SelectMany(afm => afm.FailureMechanismSections));
+ serializableFailureMechanismSections.AddRange(aggregatedSerializableCombinedFailureMechanismSectionAssemblies.FailureMechanismSections);
+ return serializableFailureMechanismSections;
+ }
+
+ private static IEnumerable GetAllSerializableFailureMechanismSectionCollections(
+ IEnumerable aggregatedFailureMechanismsWithProbability,
+ IEnumerable aggregatedFailureMechanismsWithoutProbability,
+ AggregatedSerializableCombinedFailureMechanismSectionAssemblies aggregatedSerializableCombinedFailureMechanismSectionAssemblies)
+ {
+ var serializableFailureMechanismSectionCollection = new List();
+ serializableFailureMechanismSectionCollection.AddRange(aggregatedFailureMechanismsWithProbability.Select(afm => afm.FailureMechanismSectionCollection));
+ serializableFailureMechanismSectionCollection.AddRange(aggregatedFailureMechanismsWithoutProbability.Select(afm => afm.FailureMechanismSectionCollection));
+ serializableFailureMechanismSectionCollection.Add(aggregatedSerializableCombinedFailureMechanismSectionAssemblies.FailureMechanismSectionCollection);
+ return serializableFailureMechanismSectionCollection;
+ }
+
+ private static IEnumerable GetAllSerializableFailureMechanisms(
+ IEnumerable aggregatedFailureMechanismsWithProbability,
+ IEnumerable aggregatedFailureMechanismsWithoutProbability)
+ {
+ var serializableFailureMechanisms = new List();
+ serializableFailureMechanisms.AddRange(aggregatedFailureMechanismsWithProbability.Select(afm => afm.FailureMechanism));
+ serializableFailureMechanisms.AddRange(aggregatedFailureMechanismsWithoutProbability.Select(afm => afm.FailureMechanism));
+ return serializableFailureMechanisms;
+ }
+
+ private static Point2D GetLowerCorner(IEnumerable geometry)
+ {
+ return new Point2D(geometry.Select(p => p.X).Min(),
+ geometry.Select(p => p.Y).Min());
+ }
+
+ private static Point2D GetUpperCorner(IEnumerable geometry)
+ {
+ return new Point2D(geometry.Select(p => p.X).Max(),
+ geometry.Select(p => p.Y).Max());
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Integration/src/Riskeer.Integration.IO/Creators/SerializableAssemblyMethodCreator.cs
===================================================================
diff -u
--- Ringtoets/Integration/src/Riskeer.Integration.IO/Creators/SerializableAssemblyMethodCreator.cs (revision 0)
+++ Ringtoets/Integration/src/Riskeer.Integration.IO/Creators/SerializableAssemblyMethodCreator.cs (revision 457970572d405d707ca5a96836d6a48babffc3a7)
@@ -0,0 +1,105 @@
+// Copyright (C) Stichting Deltares 2018. 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 Riskeer.AssemblyTool.IO.Model.Enums;
+using Riskeer.Integration.IO.Assembly;
+
+namespace Riskeer.Integration.IO.Creators
+{
+ ///
+ /// Creator to create .
+ ///
+ public static class SerializableAssemblyMethodCreator
+ {
+ ///
+ /// Creates a based on
+ /// .
+ ///
+ /// The
+ /// to create a for.
+ /// A .
+ /// Thrown when
+ /// is an invalid value.
+ /// Thrown when
+ /// is a valid value, but unsupported.
+ public static SerializableAssemblyMethod Create(ExportableAssemblyMethod assemblyMethod)
+ {
+ if (!Enum.IsDefined(typeof(ExportableAssemblyMethod), assemblyMethod))
+ {
+ throw new InvalidEnumArgumentException(nameof(assemblyMethod),
+ (int) assemblyMethod,
+ typeof(ExportableAssemblyMethod));
+ }
+
+ switch (assemblyMethod)
+ {
+ case ExportableAssemblyMethod.WBI0E1:
+ return SerializableAssemblyMethod.WBI0E1;
+ case ExportableAssemblyMethod.WBI0E3:
+ return SerializableAssemblyMethod.WBI0E3;
+ case ExportableAssemblyMethod.WBI0G1:
+ return SerializableAssemblyMethod.WBI0G1;
+ case ExportableAssemblyMethod.WBI0G3:
+ return SerializableAssemblyMethod.WBI0G3;
+ case ExportableAssemblyMethod.WBI0G4:
+ return SerializableAssemblyMethod.WBI0G4;
+ case ExportableAssemblyMethod.WBI0G5:
+ return SerializableAssemblyMethod.WBI0G5;
+ case ExportableAssemblyMethod.WBI0G6:
+ return SerializableAssemblyMethod.WBI0G6;
+ case ExportableAssemblyMethod.WBI0T1:
+ return SerializableAssemblyMethod.WBI0T1;
+ case ExportableAssemblyMethod.WBI0T3:
+ return SerializableAssemblyMethod.WBI0T3;
+ case ExportableAssemblyMethod.WBI0T4:
+ return SerializableAssemblyMethod.WBI0T4;
+ case ExportableAssemblyMethod.WBI0T5:
+ return SerializableAssemblyMethod.WBI0T5;
+ case ExportableAssemblyMethod.WBI0T6:
+ return SerializableAssemblyMethod.WBI0T6;
+ case ExportableAssemblyMethod.WBI0T7:
+ return SerializableAssemblyMethod.WBI0T7;
+ case ExportableAssemblyMethod.WBI0A1:
+ return SerializableAssemblyMethod.WBI0A1;
+ case ExportableAssemblyMethod.WBI1A1:
+ return SerializableAssemblyMethod.WBI1A1;
+ case ExportableAssemblyMethod.WBI1B1:
+ return SerializableAssemblyMethod.WBI1B1;
+ case ExportableAssemblyMethod.WBI2A1:
+ return SerializableAssemblyMethod.WBI2A1;
+ case ExportableAssemblyMethod.WBI2B1:
+ return SerializableAssemblyMethod.WBI2B1;
+ case ExportableAssemblyMethod.WBI2C1:
+ return SerializableAssemblyMethod.WBI2C1;
+ case ExportableAssemblyMethod.WBI3A1:
+ return SerializableAssemblyMethod.WBI3A1;
+ case ExportableAssemblyMethod.WBI3B1:
+ return SerializableAssemblyMethod.WBI3B1;
+ case ExportableAssemblyMethod.WBI3C1:
+ return SerializableAssemblyMethod.WBI3C1;
+ default:
+ throw new NotSupportedException();
+ }
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Integration/src/Riskeer.Integration.IO/Creators/SerializableAssessmentProcessCreator.cs
===================================================================
diff -u
--- Ringtoets/Integration/src/Riskeer.Integration.IO/Creators/SerializableAssessmentProcessCreator.cs (revision 0)
+++ Ringtoets/Integration/src/Riskeer.Integration.IO/Creators/SerializableAssessmentProcessCreator.cs (revision 457970572d405d707ca5a96836d6a48babffc3a7)
@@ -0,0 +1,56 @@
+// Copyright (C) Stichting Deltares 2018. 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 Riskeer.AssemblyTool.IO.Model;
+using Riskeer.Integration.IO.Helpers;
+using Riskeer.Integration.IO.Properties;
+
+namespace Riskeer.Integration.IO.Creators
+{
+ ///
+ /// Creator to create instances of
+ ///
+ public static class SerializableAssessmentProcessCreator
+ {
+ ///
+ /// Creates an instance of
+ /// based on its input parameters.
+ ///
+ /// The generator to generate an id for the
+ /// .
+ /// The
+ /// this process belongs to.
+ /// A .
+ /// Thrown when any parameter is null.
+ public static SerializableAssessmentProcess Create(IdentifierGenerator idGenerator,
+ SerializableAssessmentSection assessmentSection)
+ {
+ if (idGenerator == null)
+ {
+ throw new ArgumentNullException(nameof(idGenerator));
+ }
+
+ return new SerializableAssessmentProcess(idGenerator.GetNewId(Resources.SerializableAssessmentProcess_IdPrefix),
+ assessmentSection);
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Integration/src/Riskeer.Integration.IO/Creators/SerializableAssessmentSectionAssemblyResultCreator.cs
===================================================================
diff -u
--- Ringtoets/Integration/src/Riskeer.Integration.IO/Creators/SerializableAssessmentSectionAssemblyResultCreator.cs (revision 0)
+++ Ringtoets/Integration/src/Riskeer.Integration.IO/Creators/SerializableAssessmentSectionAssemblyResultCreator.cs (revision 457970572d405d707ca5a96836d6a48babffc3a7)
@@ -0,0 +1,52 @@
+// Copyright (C) Stichting Deltares 2018. 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 Riskeer.AssemblyTool.IO.Model.DataTypes;
+using Riskeer.Integration.IO.Assembly;
+
+namespace Riskeer.Integration.IO.Creators
+{
+ ///
+ /// Creator to create instances of
+ ///
+ public static class SerializableAssessmentSectionAssemblyResultCreator
+ {
+ ///
+ /// Creates an instance of based
+ /// on .
+ ///
+ /// The to create a
+ /// a for.
+ /// A ,
+ /// Thrown when is null.
+ public static SerializableAssessmentSectionAssemblyResult Create(ExportableAssessmentSectionAssemblyResult result)
+ {
+ if (result == null)
+ {
+ throw new ArgumentNullException(nameof(result));
+ }
+
+ return new SerializableAssessmentSectionAssemblyResult(SerializableAssemblyMethodCreator.Create(result.AssemblyMethod),
+ SerializableAssessmentSectionCategoryGroupCreator.Create(result.AssemblyCategory));
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Integration/src/Riskeer.Integration.IO/Creators/SerializableAssessmentSectionCategoryGroupCreator.cs
===================================================================
diff -u
--- Ringtoets/Integration/src/Riskeer.Integration.IO/Creators/SerializableAssessmentSectionCategoryGroupCreator.cs (revision 0)
+++ Ringtoets/Integration/src/Riskeer.Integration.IO/Creators/SerializableAssessmentSectionCategoryGroupCreator.cs (revision 457970572d405d707ca5a96836d6a48babffc3a7)
@@ -0,0 +1,72 @@
+// Copyright (C) Stichting Deltares 2018. 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 Riskeer.AssemblyTool.Data;
+using Riskeer.AssemblyTool.IO.Model.Enums;
+
+namespace Riskeer.Integration.IO.Creators
+{
+ ///
+ /// Creator to create .
+ ///
+ public static class SerializableAssessmentSectionCategoryGroupCreator
+ {
+ ///
+ /// Creates a based on .
+ ///
+ /// The to
+ /// create a for.
+ /// A .
+ /// Thrown when
+ /// is an invalid value.
+ /// Thrown when
+ /// is a valid value, but unsupported.
+ public static SerializableAssessmentSectionCategoryGroup Create(AssessmentSectionAssemblyCategoryGroup categoryGroup)
+ {
+ if (!Enum.IsDefined(typeof(AssessmentSectionAssemblyCategoryGroup), categoryGroup))
+ {
+ throw new InvalidEnumArgumentException(nameof(categoryGroup),
+ (int) categoryGroup,
+ typeof(AssessmentSectionAssemblyCategoryGroup));
+ }
+
+ switch (categoryGroup)
+ {
+ case AssessmentSectionAssemblyCategoryGroup.NotAssessed:
+ return SerializableAssessmentSectionCategoryGroup.NotAssessed;
+ case AssessmentSectionAssemblyCategoryGroup.APlus:
+ return SerializableAssessmentSectionCategoryGroup.APlus;
+ case AssessmentSectionAssemblyCategoryGroup.A:
+ return SerializableAssessmentSectionCategoryGroup.A;
+ case AssessmentSectionAssemblyCategoryGroup.B:
+ return SerializableAssessmentSectionCategoryGroup.B;
+ case AssessmentSectionAssemblyCategoryGroup.C:
+ return SerializableAssessmentSectionCategoryGroup.C;
+ case AssessmentSectionAssemblyCategoryGroup.D:
+ return SerializableAssessmentSectionCategoryGroup.D;
+ default:
+ throw new NotSupportedException();
+ }
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Integration/src/Riskeer.Integration.IO/Creators/SerializableAssessmentSectionCreator.cs
===================================================================
diff -u
--- Ringtoets/Integration/src/Riskeer.Integration.IO/Creators/SerializableAssessmentSectionCreator.cs (revision 0)
+++ Ringtoets/Integration/src/Riskeer.Integration.IO/Creators/SerializableAssessmentSectionCreator.cs (revision 457970572d405d707ca5a96836d6a48babffc3a7)
@@ -0,0 +1,54 @@
+// Copyright (C) Stichting Deltares 2018. 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 Riskeer.AssemblyTool.IO.Model;
+using Riskeer.Integration.IO.Assembly;
+using Riskeer.Integration.IO.Helpers;
+
+namespace Riskeer.Integration.IO.Creators
+{
+ ///
+ /// Creator to create instances of .
+ ///
+ public static class SerializableAssessmentSectionCreator
+ {
+ ///
+ /// Creates an instance of
+ /// based on .
+ ///
+ /// The
+ /// to create a for.
+ /// A .
+ /// Thrown when any parameter is null.
+ public static SerializableAssessmentSection Create(ExportableAssessmentSection assessmentSection)
+ {
+ if (assessmentSection == null)
+ {
+ throw new ArgumentNullException(nameof(assessmentSection));
+ }
+
+ return new SerializableAssessmentSection(IdentifierGenerator.GeneratedId(assessmentSection),
+ assessmentSection.Name,
+ assessmentSection.Geometry);
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Integration/src/Riskeer.Integration.IO/Creators/SerializableCombinedFailureMechanismSectionAssemblyResultCreator.cs
===================================================================
diff -u
--- Ringtoets/Integration/src/Riskeer.Integration.IO/Creators/SerializableCombinedFailureMechanismSectionAssemblyResultCreator.cs (revision 0)
+++ Ringtoets/Integration/src/Riskeer.Integration.IO/Creators/SerializableCombinedFailureMechanismSectionAssemblyResultCreator.cs (revision 457970572d405d707ca5a96836d6a48babffc3a7)
@@ -0,0 +1,63 @@
+// Copyright (C) Stichting Deltares 2018. 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 Riskeer.AssemblyTool.Data;
+using Riskeer.AssemblyTool.IO.Model.DataTypes;
+using Riskeer.Integration.IO.Assembly;
+using Riskeer.Integration.IO.Exceptions;
+
+namespace Riskeer.Integration.IO.Creators
+{
+ ///
+ /// Creator to create instances of .
+ ///
+ public static class SerializableCombinedFailureMechanismSectionAssemblyResultCreator
+ {
+ ///
+ /// Creates an instance of
+ /// based on .
+ ///
+ /// The
+ /// to create a for.
+ /// A .
+ /// Thrown when is null.
+ /// Thrown when
+ /// is invalid to create a serializable counterpart for.
+ public static SerializableCombinedFailureMechanismSectionAssemblyResult Create(ExportableFailureMechanismCombinedSectionAssemblyResult sectionResult)
+ {
+ if (sectionResult == null)
+ {
+ throw new ArgumentNullException(nameof(sectionResult));
+ }
+
+ ExportableSectionAssemblyResult sectionResultSectionAssemblyResult = sectionResult.SectionAssemblyResult;
+ if (sectionResultSectionAssemblyResult.AssemblyCategory == FailureMechanismSectionAssemblyCategoryGroup.None)
+ {
+ throw new AssemblyCreatorException("The assembly result is invalid and cannot be created.");
+ }
+
+ return new SerializableCombinedFailureMechanismSectionAssemblyResult(SerializableAssemblyMethodCreator.Create(sectionResultSectionAssemblyResult.AssemblyMethod),
+ SerializableFailureMechanismTypeCreator.Create(sectionResult.Code),
+ SerializableFailureMechanismSectionCategoryGroupCreator.Create(sectionResultSectionAssemblyResult.AssemblyCategory));
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Integration/src/Riskeer.Integration.IO/Creators/SerializableFailureMechanismCategoryGroupCreator.cs
===================================================================
diff -u
--- Ringtoets/Integration/src/Riskeer.Integration.IO/Creators/SerializableFailureMechanismCategoryGroupCreator.cs (revision 0)
+++ Ringtoets/Integration/src/Riskeer.Integration.IO/Creators/SerializableFailureMechanismCategoryGroupCreator.cs (revision 457970572d405d707ca5a96836d6a48babffc3a7)
@@ -0,0 +1,76 @@
+// Copyright (C) Stichting Deltares 2018. 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 Riskeer.AssemblyTool.Data;
+using Riskeer.AssemblyTool.IO.Model.Enums;
+
+namespace Riskeer.Integration.IO.Creators
+{
+ ///
+ /// Creator to create .
+ ///
+ public static class SerializableFailureMechanismCategoryGroupCreator
+ {
+ ///
+ /// Creates a based on .
+ ///
+ /// The to
+ /// create a for.
+ /// A .
+ /// Thrown when
+ /// is an invalid value.
+ /// Thrown when
+ /// is a valid value, but unsupported.
+ public static SerializableFailureMechanismCategoryGroup Create(FailureMechanismAssemblyCategoryGroup categoryGroup)
+ {
+ if (!Enum.IsDefined(typeof(FailureMechanismAssemblyCategoryGroup), categoryGroup))
+ {
+ throw new InvalidEnumArgumentException(nameof(categoryGroup),
+ (int) categoryGroup,
+ typeof(FailureMechanismAssemblyCategoryGroup));
+ }
+
+ switch (categoryGroup)
+ {
+ case FailureMechanismAssemblyCategoryGroup.NotApplicable:
+ return SerializableFailureMechanismCategoryGroup.NotApplicable;
+ case FailureMechanismAssemblyCategoryGroup.It:
+ return SerializableFailureMechanismCategoryGroup.It;
+ case FailureMechanismAssemblyCategoryGroup.IIt:
+ return SerializableFailureMechanismCategoryGroup.IIt;
+ case FailureMechanismAssemblyCategoryGroup.IIIt:
+ return SerializableFailureMechanismCategoryGroup.IIIt;
+ case FailureMechanismAssemblyCategoryGroup.IVt:
+ return SerializableFailureMechanismCategoryGroup.IVt;
+ case FailureMechanismAssemblyCategoryGroup.Vt:
+ return SerializableFailureMechanismCategoryGroup.Vt;
+ case FailureMechanismAssemblyCategoryGroup.VIt:
+ return SerializableFailureMechanismCategoryGroup.VIt;
+ case FailureMechanismAssemblyCategoryGroup.VIIt:
+ return SerializableFailureMechanismCategoryGroup.VIIt;
+ default:
+ throw new NotSupportedException();
+ }
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Integration/src/Riskeer.Integration.IO/Creators/SerializableFailureMechanismCreator.cs
===================================================================
diff -u
--- Ringtoets/Integration/src/Riskeer.Integration.IO/Creators/SerializableFailureMechanismCreator.cs (revision 0)
+++ Ringtoets/Integration/src/Riskeer.Integration.IO/Creators/SerializableFailureMechanismCreator.cs (revision 457970572d405d707ca5a96836d6a48babffc3a7)
@@ -0,0 +1,112 @@
+// Copyright (C) Stichting Deltares 2018. 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 Riskeer.AssemblyTool.IO.Model;
+using Riskeer.Integration.IO.Assembly;
+using Riskeer.Integration.IO.Exceptions;
+using Riskeer.Integration.IO.Helpers;
+using Riskeer.Integration.IO.Properties;
+
+namespace Riskeer.Integration.IO.Creators
+{
+ ///
+ /// Creator to create instances of
+ ///
+ public static class SerializableFailureMechanismCreator
+ {
+ ///
+ /// Creates an instance of based on its input parameters.
+ ///
+ /// The generator to generate an id for the .
+ /// The
+ /// the belongs to.
+ /// The
+ /// without a probability assembly result to create a for.
+ /// A
+ /// Thrown when any parameter is null.
+ /// Thrown when is invalid to
+ /// create a serializable counterpart for.
+ public static SerializableFailureMechanism Create(IdentifierGenerator idGenerator,
+ SerializableTotalAssemblyResult serializableTotalAssembly,
+ ExportableFailureMechanism failureMechanism)
+ {
+ if (idGenerator == null)
+ {
+ throw new ArgumentNullException(nameof(idGenerator));
+ }
+
+ if (serializableTotalAssembly == null)
+ {
+ throw new ArgumentNullException(nameof(serializableTotalAssembly));
+ }
+
+ if (failureMechanism == null)
+ {
+ throw new ArgumentNullException(nameof(failureMechanism));
+ }
+
+ return new SerializableFailureMechanism(idGenerator.GetNewId(Resources.SerializableFailureMechanismCreator_IdPrefix),
+ serializableTotalAssembly,
+ SerializableFailureMechanismTypeCreator.Create(failureMechanism.Code),
+ SerializableFailureMechanismGroupCreator.Create(failureMechanism.Group),
+ SerializableFailureMechanismResultCreator.Create(failureMechanism.FailureMechanismAssembly));
+ }
+
+ ///
+ /// Creates an instance of based on its input parameters.
+ ///
+ /// The generator to generate an id for the .
+ /// The
+ /// the belongs to.
+ /// The
+ /// with a probability assembly result to create a for.
+ /// A .
+ /// Thrown when any parameter is null.
+ /// Thrown when is invalid to
+ /// create a serializable counterpart for.
+ public static SerializableFailureMechanism Create(IdentifierGenerator idGenerator,
+ SerializableTotalAssemblyResult serializableTotalAssembly,
+ ExportableFailureMechanism failureMechanism)
+ {
+ if (idGenerator == null)
+ {
+ throw new ArgumentNullException(nameof(idGenerator));
+ }
+
+ if (serializableTotalAssembly == null)
+ {
+ throw new ArgumentNullException(nameof(serializableTotalAssembly));
+ }
+
+ if (failureMechanism == null)
+ {
+ throw new ArgumentNullException(nameof(failureMechanism));
+ }
+
+ return new SerializableFailureMechanism(idGenerator.GetNewId(Resources.SerializableFailureMechanismCreator_IdPrefix),
+ serializableTotalAssembly,
+ SerializableFailureMechanismTypeCreator.Create(failureMechanism.Code),
+ SerializableFailureMechanismGroupCreator.Create(failureMechanism.Group),
+ SerializableFailureMechanismResultCreator.Create(failureMechanism.FailureMechanismAssembly));
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Integration/src/Riskeer.Integration.IO/Creators/SerializableFailureMechanismGroupCreator.cs
===================================================================
diff -u
--- Ringtoets/Integration/src/Riskeer.Integration.IO/Creators/SerializableFailureMechanismGroupCreator.cs (revision 0)
+++ Ringtoets/Integration/src/Riskeer.Integration.IO/Creators/SerializableFailureMechanismGroupCreator.cs (revision 457970572d405d707ca5a96836d6a48babffc3a7)
@@ -0,0 +1,68 @@
+// Copyright (C) Stichting Deltares 2018. 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 Riskeer.AssemblyTool.IO.Model.Enums;
+using Riskeer.Integration.IO.Assembly;
+
+namespace Riskeer.Integration.IO.Creators
+{
+ ///
+ /// Creator to create
+ ///
+ public static class SerializableFailureMechanismGroupCreator
+ {
+ ///
+ /// Creates a based on .
+ ///
+ /// The to
+ /// create a for.
+ /// A .
+ /// Thrown when
+ /// is an invalid value.
+ /// Thrown when
+ /// is a valid value, but unsupported.
+ public static SerializableFailureMechanismGroup Create(ExportableFailureMechanismGroup failureMechanismGroup)
+ {
+ if (!Enum.IsDefined(typeof(ExportableFailureMechanismGroup), failureMechanismGroup))
+ {
+ throw new InvalidEnumArgumentException(nameof(failureMechanismGroup),
+ (int) failureMechanismGroup,
+ typeof(ExportableFailureMechanismGroup));
+ }
+
+ switch (failureMechanismGroup)
+ {
+ case ExportableFailureMechanismGroup.Group1:
+ return SerializableFailureMechanismGroup.Group1;
+ case ExportableFailureMechanismGroup.Group2:
+ return SerializableFailureMechanismGroup.Group2;
+ case ExportableFailureMechanismGroup.Group3:
+ return SerializableFailureMechanismGroup.Group3;
+ case ExportableFailureMechanismGroup.Group4:
+ return SerializableFailureMechanismGroup.Group4;
+ default:
+ throw new NotSupportedException();
+ }
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Integration/src/Riskeer.Integration.IO/Creators/SerializableFailureMechanismResultCreator.cs
===================================================================
diff -u
--- Ringtoets/Integration/src/Riskeer.Integration.IO/Creators/SerializableFailureMechanismResultCreator.cs (revision 0)
+++ Ringtoets/Integration/src/Riskeer.Integration.IO/Creators/SerializableFailureMechanismResultCreator.cs (revision 457970572d405d707ca5a96836d6a48babffc3a7)
@@ -0,0 +1,98 @@
+// Copyright (C) Stichting Deltares 2018. 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 Riskeer.AssemblyTool.Data;
+using Riskeer.AssemblyTool.IO.Model.DataTypes;
+using Riskeer.Integration.IO.Assembly;
+using Riskeer.Integration.IO.Exceptions;
+
+namespace Riskeer.Integration.IO.Creators
+{
+ ///
+ /// Creator to create instances of .
+ ///
+ public static class SerializableFailureMechanismResultCreator
+ {
+ ///
+ /// Creates an instance of
+ /// based on .
+ ///
+ /// The
+ /// to create a for.
+ /// A .
+ /// Thrown when
+ /// is null.
+ /// Thrown when
+ /// is invalid to create a serializable counterpart for.
+ public static SerializableFailureMechanismAssemblyResult Create(ExportableFailureMechanismAssemblyResult result)
+ {
+ if (result == null)
+ {
+ throw new ArgumentNullException(nameof(result));
+ }
+
+ ValidateAssemblyResult(result);
+
+ return new SerializableFailureMechanismAssemblyResult(SerializableAssemblyMethodCreator.Create(result.AssemblyMethod),
+ SerializableFailureMechanismCategoryGroupCreator.Create(result.AssemblyCategory));
+ }
+
+ ///
+ /// Creates an instance of
+ /// based on .
+ ///
+ /// The
+ /// to create a for.
+ /// A .
+ /// Thrown when
+ /// is null.
+ /// Thrown when
+ /// is invalid to create a serializable counterpart for.
+ public static SerializableFailureMechanismAssemblyResult Create(ExportableFailureMechanismAssemblyResultWithProbability result)
+ {
+ if (result == null)
+ {
+ throw new ArgumentNullException(nameof(result));
+ }
+
+ ValidateAssemblyResult(result);
+
+ return new SerializableFailureMechanismAssemblyResult(SerializableAssemblyMethodCreator.Create(result.AssemblyMethod),
+ SerializableFailureMechanismCategoryGroupCreator.Create(result.AssemblyCategory),
+ result.Probability);
+ }
+
+ ///
+ /// Validates the to determine whether a serializable assembly result can be created.
+ ///
+ /// The to validate.
+ /// Thrown when is invalid
+ /// and a serializable assembly result cannot be created.
+ private static void ValidateAssemblyResult(ExportableFailureMechanismAssemblyResult result)
+ {
+ if (result.AssemblyCategory == FailureMechanismAssemblyCategoryGroup.None)
+ {
+ throw new AssemblyCreatorException(@"The assembly result is invalid and cannot be created.");
+ }
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Integration/src/Riskeer.Integration.IO/Creators/SerializableFailureMechanismSectionAssemblyResultCreator.cs
===================================================================
diff -u
--- Ringtoets/Integration/src/Riskeer.Integration.IO/Creators/SerializableFailureMechanismSectionAssemblyResultCreator.cs (revision 0)
+++ Ringtoets/Integration/src/Riskeer.Integration.IO/Creators/SerializableFailureMechanismSectionAssemblyResultCreator.cs (revision 457970572d405d707ca5a96836d6a48babffc3a7)
@@ -0,0 +1,105 @@
+// Copyright (C) Stichting Deltares 2018. 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 Riskeer.AssemblyTool.Data;
+using Riskeer.AssemblyTool.IO.Model.DataTypes;
+using Riskeer.AssemblyTool.IO.Model.Enums;
+using Riskeer.Integration.IO.Assembly;
+using Riskeer.Integration.IO.Exceptions;
+
+namespace Riskeer.Integration.IO.Creators
+{
+ ///
+ /// Creator to create instances of
+ ///
+ public static class SerializableFailureMechanismSectionAssemblyResultCreator
+ {
+ ///
+ /// Creates an instance of
+ /// based on its input parameters.
+ ///
+ /// The type of assessment the
+ /// represents.
+ /// The to create a
+ /// for.
+ /// A .
+ /// Thrown when is null.
+ /// Thrown when is invalid to
+ /// create a serializable counterpart for.
+ public static SerializableFailureMechanismSectionAssemblyResult Create(SerializableAssessmentType assessmentType,
+ ExportableSectionAssemblyResult sectionResult)
+ {
+ if (sectionResult == null)
+ {
+ throw new ArgumentNullException(nameof(sectionResult));
+ }
+
+ ValidateAssemblyResult(sectionResult);
+
+ return new SerializableFailureMechanismSectionAssemblyResult(SerializableAssemblyMethodCreator.Create(sectionResult.AssemblyMethod),
+ assessmentType,
+ SerializableFailureMechanismSectionCategoryGroupCreator.Create(sectionResult.AssemblyCategory));
+ }
+
+ ///
+ /// Creates an instance of
+ /// based on its input parameters.
+ ///
+ /// The type of assessment the
+ /// represents.
+ /// The to create a
+ /// for.
+ /// A .
+ /// Thrown when is null.
+ /// Thrown when is invalid to
+ /// create a serializable counterpart for.
+ public static SerializableFailureMechanismSectionAssemblyResult Create(SerializableAssessmentType assessmentType,
+ ExportableSectionAssemblyResultWithProbability sectionResult)
+ {
+ if (sectionResult == null)
+ {
+ throw new ArgumentNullException(nameof(sectionResult));
+ }
+
+ ValidateAssemblyResult(sectionResult);
+
+ return new SerializableFailureMechanismSectionAssemblyResult(SerializableAssemblyMethodCreator.Create(sectionResult.AssemblyMethod),
+ assessmentType,
+ SerializableFailureMechanismSectionCategoryGroupCreator.Create(sectionResult.AssemblyCategory),
+ sectionResult.Probability);
+ }
+
+ ///
+ /// Validates the to determine whether a serializable section assembly result can be created.
+ ///
+ /// The to validate.
+ /// Thrown when is invalid
+ /// and a serializable assembly result cannot be created.
+ private static void ValidateAssemblyResult(ExportableSectionAssemblyResult sectionResult)
+ {
+ if (sectionResult.AssemblyCategory == FailureMechanismSectionAssemblyCategoryGroup.None)
+ {
+ throw new AssemblyCreatorException(@"The assembly result is invalid and cannot be created.");
+ }
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Integration/src/Riskeer.Integration.IO/Creators/SerializableFailureMechanismSectionCategoryGroupCreator.cs
===================================================================
diff -u
--- Ringtoets/Integration/src/Riskeer.Integration.IO/Creators/SerializableFailureMechanismSectionCategoryGroupCreator.cs (revision 0)
+++ Ringtoets/Integration/src/Riskeer.Integration.IO/Creators/SerializableFailureMechanismSectionCategoryGroupCreator.cs (revision 457970572d405d707ca5a96836d6a48babffc3a7)
@@ -0,0 +1,76 @@
+// Copyright (C) Stichting Deltares 2018. 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 Riskeer.AssemblyTool.Data;
+using Riskeer.AssemblyTool.IO.Model.Enums;
+
+namespace Riskeer.Integration.IO.Creators
+{
+ ///
+ /// Creator to create .
+ ///
+ public static class SerializableFailureMechanismSectionCategoryGroupCreator
+ {
+ ///
+ /// Creates a based on .
+ ///
+ /// The to
+ /// create a for.
+ /// A .
+ /// Thrown when
+ /// is an invalid value.
+ /// Thrown when
+ /// is a valid value, but unsupported.
+ public static SerializableFailureMechanismSectionCategoryGroup Create(FailureMechanismSectionAssemblyCategoryGroup categoryGroup)
+ {
+ if (!Enum.IsDefined(typeof(FailureMechanismSectionAssemblyCategoryGroup), categoryGroup))
+ {
+ throw new InvalidEnumArgumentException(nameof(categoryGroup),
+ (int) categoryGroup,
+ typeof(FailureMechanismSectionAssemblyCategoryGroup));
+ }
+
+ switch (categoryGroup)
+ {
+ case FailureMechanismSectionAssemblyCategoryGroup.NotApplicable:
+ return SerializableFailureMechanismSectionCategoryGroup.NotApplicable;
+ case FailureMechanismSectionAssemblyCategoryGroup.Iv:
+ return SerializableFailureMechanismSectionCategoryGroup.Iv;
+ case FailureMechanismSectionAssemblyCategoryGroup.IIv:
+ return SerializableFailureMechanismSectionCategoryGroup.IIv;
+ case FailureMechanismSectionAssemblyCategoryGroup.IIIv:
+ return SerializableFailureMechanismSectionCategoryGroup.IIIv;
+ case FailureMechanismSectionAssemblyCategoryGroup.IVv:
+ return SerializableFailureMechanismSectionCategoryGroup.IVv;
+ case FailureMechanismSectionAssemblyCategoryGroup.Vv:
+ return SerializableFailureMechanismSectionCategoryGroup.Vv;
+ case FailureMechanismSectionAssemblyCategoryGroup.VIv:
+ return SerializableFailureMechanismSectionCategoryGroup.VIv;
+ case FailureMechanismSectionAssemblyCategoryGroup.VIIv:
+ return SerializableFailureMechanismSectionCategoryGroup.VIIv;
+ default:
+ throw new NotSupportedException();
+ }
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Integration/src/Riskeer.Integration.IO/Creators/SerializableFailureMechanismSectionCreator.cs
===================================================================
diff -u
--- Ringtoets/Integration/src/Riskeer.Integration.IO/Creators/SerializableFailureMechanismSectionCreator.cs (revision 0)
+++ Ringtoets/Integration/src/Riskeer.Integration.IO/Creators/SerializableFailureMechanismSectionCreator.cs (revision 457970572d405d707ca5a96836d6a48babffc3a7)
@@ -0,0 +1,115 @@
+// Copyright (C) Stichting Deltares 2018. 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 Riskeer.AssemblyTool.IO.Model;
+using Riskeer.AssemblyTool.IO.Model.Enums;
+using Riskeer.Integration.IO.Assembly;
+using Riskeer.Integration.IO.Helpers;
+using Riskeer.Integration.IO.Properties;
+
+namespace Riskeer.Integration.IO.Creators
+{
+ ///
+ /// Creator to create instances of .
+ ///
+ public static class SerializableFailureMechanismSectionCreator
+ {
+ ///
+ /// Creates a based on
+ /// its input parameters.
+ ///
+ /// The generator to generate an id
+ /// for the .
+ /// The
+ /// this section belongs to.
+ /// The
+ /// to create a for.
+ /// A .
+ /// Thrown when any parameter is null.
+ public static SerializableFailureMechanismSection Create(IdentifierGenerator idGenerator,
+ SerializableFailureMechanismSectionCollection serializableCollection,
+ ExportableFailureMechanismSection section)
+ {
+ if (idGenerator == null)
+ {
+ throw new ArgumentNullException(nameof(idGenerator));
+ }
+
+ if (serializableCollection == null)
+ {
+ throw new ArgumentNullException(nameof(serializableCollection));
+ }
+
+ if (section == null)
+ {
+ throw new ArgumentNullException(nameof(section));
+ }
+
+ return new SerializableFailureMechanismSection(idGenerator.GetNewId(Resources.SerializableFailureMechanismSection_IdPrefix),
+ serializableCollection,
+ section.StartDistance,
+ section.EndDistance,
+ section.Geometry,
+ SerializableFailureMechanismSectionType.FailureMechanism);
+ }
+
+ ///
+ /// Creates an instance of based on
+ /// its input parameters.
+ ///
+ /// The id generator to generate an id
+ /// for .
+ /// The
+ /// this section belongs to.
+ /// The
+ /// to create a for.
+ /// A .
+ /// Thrown when any parameter is null.
+ public static SerializableFailureMechanismSection Create(IdentifierGenerator idGenerator,
+ SerializableFailureMechanismSectionCollection serializableCollection,
+ ExportableCombinedFailureMechanismSection section)
+ {
+ if (idGenerator == null)
+ {
+ throw new ArgumentNullException(nameof(idGenerator));
+ }
+
+ if (serializableCollection == null)
+ {
+ throw new ArgumentNullException(nameof(serializableCollection));
+ }
+
+ if (section == null)
+ {
+ throw new ArgumentNullException(nameof(section));
+ }
+
+ return new SerializableFailureMechanismSection(idGenerator.GetNewId(Resources.SerializableFailureMechanismSection_IdPrefix),
+ serializableCollection,
+ section.StartDistance,
+ section.EndDistance,
+ section.Geometry,
+ SerializableFailureMechanismSectionType.Combined,
+ SerializableAssemblyMethodCreator.Create(section.AssemblyMethod));
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Integration/src/Riskeer.Integration.IO/Creators/SerializableFailureMechanismTypeCreator.cs
===================================================================
diff -u
--- Ringtoets/Integration/src/Riskeer.Integration.IO/Creators/SerializableFailureMechanismTypeCreator.cs (revision 0)
+++ Ringtoets/Integration/src/Riskeer.Integration.IO/Creators/SerializableFailureMechanismTypeCreator.cs (revision 457970572d405d707ca5a96836d6a48babffc3a7)
@@ -0,0 +1,96 @@
+// Copyright (C) Stichting Deltares 2018. 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 Riskeer.AssemblyTool.IO.Model.Enums;
+using Riskeer.Integration.IO.Assembly;
+
+namespace Riskeer.Integration.IO.Creators
+{
+ ///
+ /// Creator to create
+ ///
+ public static class SerializableFailureMechanismTypeCreator
+ {
+ ///
+ /// Creates a based on .
+ ///
+ /// The to
+ /// create a for.
+ /// A .
+ /// Thrown when
+ /// is an invalid value.
+ /// Thrown when
+ /// is a valid value, but unsupported.
+ public static SerializableFailureMechanismType Create(ExportableFailureMechanismType failureMechanismType)
+ {
+ if (!Enum.IsDefined(typeof(ExportableFailureMechanismType), failureMechanismType))
+ {
+ throw new InvalidEnumArgumentException(nameof(failureMechanismType),
+ (int) failureMechanismType,
+ typeof(ExportableFailureMechanismType));
+ }
+
+ switch (failureMechanismType)
+ {
+ case ExportableFailureMechanismType.STBI:
+ return SerializableFailureMechanismType.STBI;
+ case ExportableFailureMechanismType.STBU:
+ return SerializableFailureMechanismType.STBU;
+ case ExportableFailureMechanismType.STPH:
+ return SerializableFailureMechanismType.STPH;
+ case ExportableFailureMechanismType.STMI:
+ return SerializableFailureMechanismType.STMI;
+ case ExportableFailureMechanismType.AGK:
+ return SerializableFailureMechanismType.AGK;
+ case ExportableFailureMechanismType.AWO:
+ return SerializableFailureMechanismType.AWO;
+ case ExportableFailureMechanismType.GEBU:
+ return SerializableFailureMechanismType.GEBU;
+ case ExportableFailureMechanismType.GABU:
+ return SerializableFailureMechanismType.GABU;
+ case ExportableFailureMechanismType.GEKB:
+ return SerializableFailureMechanismType.GEKB;
+ case ExportableFailureMechanismType.GABI:
+ return SerializableFailureMechanismType.GABI;
+ case ExportableFailureMechanismType.ZST:
+ return SerializableFailureMechanismType.ZST;
+ case ExportableFailureMechanismType.DA:
+ return SerializableFailureMechanismType.DA;
+ case ExportableFailureMechanismType.HTKW:
+ return SerializableFailureMechanismType.HTKW;
+ case ExportableFailureMechanismType.BSKW:
+ return SerializableFailureMechanismType.BSKW;
+ case ExportableFailureMechanismType.PKW:
+ return SerializableFailureMechanismType.PKW;
+ case ExportableFailureMechanismType.STKWp:
+ return SerializableFailureMechanismType.STKWp;
+ case ExportableFailureMechanismType.STKWl:
+ return SerializableFailureMechanismType.STKWl;
+ case ExportableFailureMechanismType.INN:
+ return SerializableFailureMechanismType.INN;
+ default:
+ throw new NotSupportedException();
+ }
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Integration/src/Riskeer.Integration.IO/Creators/SerializableTotalAssemblyResultCreator.cs
===================================================================
diff -u
--- Ringtoets/Integration/src/Riskeer.Integration.IO/Creators/SerializableTotalAssemblyResultCreator.cs (revision 0)
+++ Ringtoets/Integration/src/Riskeer.Integration.IO/Creators/SerializableTotalAssemblyResultCreator.cs (revision 457970572d405d707ca5a96836d6a48babffc3a7)
@@ -0,0 +1,64 @@
+// Copyright (C) Stichting Deltares 2018. 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 Riskeer.AssemblyTool.IO.Model;
+using Riskeer.AssemblyTool.IO.Model.DataTypes;
+using Riskeer.Integration.IO.Helpers;
+using Riskeer.Integration.IO.Properties;
+
+namespace Riskeer.Integration.IO.Creators
+{
+ ///
+ /// Creator to create instances of
+ ///
+ public static class SerializableTotalAssemblyResultCreator
+ {
+ ///
+ /// Creates an instance of
+ /// based on its input parameters
+ ///
+ /// The generator to generate an id for the .
+ /// The assessment process this result belongs to.
+ /// The assembly result for failure mechanisms with probability.
+ /// The assembly result for failure mechanisms without probability.
+ /// The assembly result for the assessment section.
+ /// A .
+ /// Thrown when any parameter is null.
+ public static SerializableTotalAssemblyResult Create(IdentifierGenerator idGenerator,
+ SerializableAssessmentProcess assessmentProcess,
+ SerializableFailureMechanismAssemblyResult failureMechanismAssemblyResultWithProbability,
+ SerializableFailureMechanismAssemblyResult failureMechanismAssemblyResultWithoutProbability,
+ SerializableAssessmentSectionAssemblyResult assessmentSectionAssemblyResult)
+ {
+ if (idGenerator == null)
+ {
+ throw new ArgumentNullException(nameof(idGenerator));
+ }
+
+ return new SerializableTotalAssemblyResult(idGenerator.GetNewId(Resources.SerializableTotalAssemblyResult_IdPrefix),
+ assessmentProcess,
+ failureMechanismAssemblyResultWithoutProbability,
+ failureMechanismAssemblyResultWithProbability,
+ assessmentSectionAssemblyResult);
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Integration/src/Riskeer.Integration.IO/Exceptions/AssemblyCreatorException.cs
===================================================================
diff -u
--- Ringtoets/Integration/src/Riskeer.Integration.IO/Exceptions/AssemblyCreatorException.cs (revision 0)
+++ Ringtoets/Integration/src/Riskeer.Integration.IO/Exceptions/AssemblyCreatorException.cs (revision 457970572d405d707ca5a96836d6a48babffc3a7)
@@ -0,0 +1,68 @@
+// Copyright (C) Stichting Deltares 2018. 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.Runtime.Serialization;
+
+namespace Riskeer.Integration.IO.Exceptions
+{
+ ///
+ /// Exception thrown when the assembly result cannot be created.
+ ///
+ [Serializable]
+ public class AssemblyCreatorException : Exception
+ {
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public AssemblyCreatorException() {}
+
+ ///
+ /// Initializes a new instance of the class
+ /// with a specified error message.
+ ///
+ /// The message that describes the error.
+ public AssemblyCreatorException(string message)
+ : base(message) {}
+
+ ///
+ /// Initializes a new instance of the class with a specified error message
+ /// and a reference to the inner exception that is the cause of this exception.
+ ///
+ /// The error message that explains the reason for the exception.
+ /// The exception that is the cause of the current exception,
+ /// or null if no inner exception is specified.
+ public AssemblyCreatorException(string message, Exception innerException) : base(message, innerException) {}
+
+ ///
+ /// Initializes a new instance of with
+ /// serialized data.
+ /// The that holds the serialized
+ /// object data about the exception being thrown.
+ /// The that contains contextual
+ /// information about the source or destination.
+ /// The parameter is
+ /// null.
+ /// The class name is null or
+ /// is zero (0).
+ protected AssemblyCreatorException(SerializationInfo info, StreamingContext context) : base(info, context) {}
+ }
+}
\ No newline at end of file
Index: Ringtoets/Integration/src/Riskeer.Integration.IO/Exporters/AssemblyExporter.cs
===================================================================
diff -u
--- Ringtoets/Integration/src/Riskeer.Integration.IO/Exporters/AssemblyExporter.cs (revision 0)
+++ Ringtoets/Integration/src/Riskeer.Integration.IO/Exporters/AssemblyExporter.cs (revision 457970572d405d707ca5a96836d6a48babffc3a7)
@@ -0,0 +1,131 @@
+// Copyright (C) Stichting Deltares 2018. 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 Core.Common.Base.IO;
+using Core.Common.IO.Exceptions;
+using Core.Common.Util;
+using log4net;
+using Ringtoets.Common.Data.Exceptions;
+using Riskeer.AssemblyTool.Data;
+using Riskeer.AssemblyTool.IO;
+using Riskeer.Integration.Data;
+using Riskeer.Integration.Data.Assembly;
+using Riskeer.Integration.IO.Assembly;
+using Riskeer.Integration.IO.Creators;
+using Riskeer.Integration.IO.Exceptions;
+using Riskeer.Integration.IO.Factories;
+using Riskeer.Integration.IO.Properties;
+
+namespace Riskeer.Integration.IO.Exporters
+{
+ ///
+ /// Exports assembly results of the assessment section.
+ ///
+ public class AssemblyExporter : IFileExporter
+ {
+ private static readonly ILog log = LogManager.GetLogger(typeof(AssemblyExporter));
+ private readonly AssessmentSection assessmentSection;
+ private readonly string filePath;
+
+ ///
+ /// Creates a new instance of .
+ ///
+ /// The to retrieve the assembly results from.
+ /// The path of the file to export to.
+ /// Thrown when is null.
+ /// Thrown when is invalid.
+ public AssemblyExporter(AssessmentSection assessmentSection, string filePath)
+ {
+ if (assessmentSection == null)
+ {
+ throw new ArgumentNullException(nameof(assessmentSection));
+ }
+
+ IOUtils.ValidateFilePath(filePath);
+
+ this.assessmentSection = assessmentSection;
+ this.filePath = filePath;
+ }
+
+ public bool Export()
+ {
+ CheckManualAssembly();
+
+ ExportableAssessmentSection exportableAssessmentSection = CreateExportableAssessmentSection();
+ if (!ValidateExportableAssessmentSection(exportableAssessmentSection))
+ {
+ LogErrorMessage();
+ return false;
+ }
+
+ try
+ {
+ SerializableAssemblyWriter.WriteAssembly(SerializableAssemblyCreator.Create(exportableAssessmentSection),
+ filePath);
+ }
+ catch (AssemblyCreatorException)
+ {
+ LogErrorMessage();
+ return false;
+ }
+ catch (CriticalFileWriteException e)
+ {
+ log.ErrorFormat(Resources.AssemblyExporter_Error_Exception_0_no_AssemblyResult_exported, e.Message);
+ return false;
+ }
+
+ return true;
+ }
+
+ private void CheckManualAssembly()
+ {
+ if (AssessmentSectionHelper.HasManualAssemblyResults(assessmentSection))
+ {
+ log.Warn(Resources.AssemblyExporter_CheckManualAssembly_Assembly_result_contains_manual_results_exporter_will_ignore_manual_results);
+ }
+ }
+
+ private ExportableAssessmentSection CreateExportableAssessmentSection()
+ {
+ try
+ {
+ return ExportableAssessmentSectionFactory.CreateExportableAssessmentSection(assessmentSection);
+ }
+ catch (AssemblyException)
+ {
+ return null;
+ }
+ }
+
+ private static bool ValidateExportableAssessmentSection(ExportableAssessmentSection exportableAssessmentSection)
+ {
+ return exportableAssessmentSection != null
+ && exportableAssessmentSection.AssessmentSectionAssembly.AssemblyCategory != AssessmentSectionAssemblyCategoryGroup.None
+ && exportableAssessmentSection.AssessmentSectionAssembly.AssemblyCategory != AssessmentSectionAssemblyCategoryGroup.NotApplicable;
+ }
+
+ private static void LogErrorMessage()
+ {
+ log.Error(Resources.AssemblyExporter_LogErrorMessage_Only_possible_to_export_a_complete_AssemblyResult);
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Integration/src/Riskeer.Integration.IO/Exporters/HydraulicBoundaryLocationsExporter.cs
===================================================================
diff -u
--- Ringtoets/Integration/src/Riskeer.Integration.IO/Exporters/HydraulicBoundaryLocationsExporter.cs (revision 0)
+++ Ringtoets/Integration/src/Riskeer.Integration.IO/Exporters/HydraulicBoundaryLocationsExporter.cs (revision 457970572d405d707ca5a96836d6a48babffc3a7)
@@ -0,0 +1,80 @@
+// Copyright (C) Stichting Deltares 2018. 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 Core.Common.Base.IO;
+using Core.Common.IO.Exceptions;
+using Core.Common.Util;
+using log4net;
+using Ringtoets.Common.Data.AssessmentSection;
+using Ringtoets.Common.Util;
+using RingtoetsCommonIOResources = Ringtoets.Common.IO.Properties.Resources;
+
+namespace Riskeer.Integration.IO.Exporters
+{
+ ///
+ /// Exports hydraulic boundary locations and stores them as a shapefile.
+ ///
+ public class HydraulicBoundaryLocationsExporter : IFileExporter
+ {
+ private static readonly ILog log = LogManager.GetLogger(typeof(HydraulicBoundaryLocationsExporter));
+ private readonly IAssessmentSection assessmentSection;
+ private readonly string filePath;
+
+ ///
+ /// Creates a new instance of .
+ ///
+ /// The assessment section to get locations and calculations from.
+ /// The path of the file to export to.
+ /// Thrown when
+ /// is null.
+ /// Thrown when is invalid.
+ public HydraulicBoundaryLocationsExporter(IAssessmentSection assessmentSection, string filePath)
+ {
+ if (assessmentSection == null)
+ {
+ throw new ArgumentNullException(nameof(assessmentSection));
+ }
+
+ IOUtils.ValidateFilePath(filePath);
+
+ this.assessmentSection = assessmentSection;
+ this.filePath = filePath;
+ }
+
+ public bool Export()
+ {
+ try
+ {
+ HydraulicBoundaryLocationsWriter.WriteHydraulicBoundaryLocations(
+ AggregatedHydraulicBoundaryLocationFactory.CreateAggregatedHydraulicBoundaryLocations(assessmentSection),
+ filePath);
+ }
+ catch (CriticalFileWriteException e)
+ {
+ log.ErrorFormat(RingtoetsCommonIOResources.HydraulicBoundaryLocationsExporter_Error_Exception_0_no_HydraulicBoundaryLocations_exported, e.Message);
+ return false;
+ }
+
+ return true;
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Integration/src/Riskeer.Integration.IO/Exporters/HydraulicBoundaryLocationsWriter.cs
===================================================================
diff -u
--- Ringtoets/Integration/src/Riskeer.Integration.IO/Exporters/HydraulicBoundaryLocationsWriter.cs (revision 0)
+++ Ringtoets/Integration/src/Riskeer.Integration.IO/Exporters/HydraulicBoundaryLocationsWriter.cs (revision 457970572d405d707ca5a96836d6a48babffc3a7)
@@ -0,0 +1,80 @@
+// Copyright (C) Stichting Deltares 2018. 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.IO.Exceptions;
+using Core.Components.Gis.Data;
+using Core.Components.Gis.IO.Writers;
+using Ringtoets.Common.Util;
+
+namespace Riskeer.Integration.IO.Exporters
+{
+ ///
+ /// Shapefile writer that writes the locations of a collection of
+ /// as point features.
+ ///
+ internal static class HydraulicBoundaryLocationsWriter
+ {
+ ///
+ /// Writes the collection of as point features in a shapefile.
+ ///
+ /// The hydraulic boundary locations to be written to file.
+ /// The path to the shapefile.
+ /// Thrown when or
+ /// is null.
+ /// Thrown when is invalid.
+ /// Thrown when the shapefile cannot be written.
+ public static void WriteHydraulicBoundaryLocations(IEnumerable locations, string filePath)
+ {
+ if (locations == null)
+ {
+ throw new ArgumentNullException(nameof(locations));
+ }
+
+ if (filePath == null)
+ {
+ throw new ArgumentNullException(nameof(filePath));
+ }
+
+ var pointShapeFileWriter = new PointShapeFileWriter();
+
+ foreach (MapPointData mapDataLocation in locations.Select(CreateLocationData))
+ {
+ pointShapeFileWriter.CopyToFeature(mapDataLocation);
+ }
+
+ pointShapeFileWriter.SaveAs(filePath);
+ }
+
+ private static MapPointData CreateLocationData(AggregatedHydraulicBoundaryLocation location)
+ {
+ return new MapPointData(location.Name)
+ {
+ Features = new[]
+ {
+ HydraulicBoundaryLocationMapDataFeaturesFactory.CreateHydraulicBoundaryLocationFeature(location)
+ }
+ };
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Integration/src/Riskeer.Integration.IO/Factories/ExportableAssessmentSectionFactory.cs
===================================================================
diff -u
--- Ringtoets/Integration/src/Riskeer.Integration.IO/Factories/ExportableAssessmentSectionFactory.cs (revision 0)
+++ Ringtoets/Integration/src/Riskeer.Integration.IO/Factories/ExportableAssessmentSectionFactory.cs (revision 457970572d405d707ca5a96836d6a48babffc3a7)
@@ -0,0 +1,170 @@
+// Copyright (C) Stichting Deltares 2018. 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 Ringtoets.Common.Data.Exceptions;
+using Riskeer.AssemblyTool.Data;
+using Riskeer.Integration.Data;
+using Riskeer.Integration.Data.Assembly;
+using Riskeer.Integration.IO.Assembly;
+
+namespace Riskeer.Integration.IO.Factories
+{
+ ///
+ /// Factory to create instances of
+ /// with assembly results.
+ ///
+ public static class ExportableAssessmentSectionFactory
+ {
+ ///
+ /// Creates an with assembly results
+ /// based on .
+ ///
+ /// The to create
+ /// an for.
+ /// An with assembly results.
+ /// Thrown when
+ /// is null.
+ /// Thrown when no reference line is set for .
+ /// Thrown when assembly results cannot be created for .
+ public static ExportableAssessmentSection CreateExportableAssessmentSection(AssessmentSection assessmentSection)
+ {
+ if (assessmentSection == null)
+ {
+ throw new ArgumentNullException(nameof(assessmentSection));
+ }
+
+ return new ExportableAssessmentSection(assessmentSection.Name,
+ assessmentSection.Id,
+ assessmentSection.ReferenceLine.Points,
+ CreateExportableAssessmentSectionAssemblyResult(assessmentSection),
+ CreateExportableFailureMechanismAssemblyResultWithProbability(assessmentSection),
+ CreateExportableFailureMechanismAssemblyResultWithoutProbability(assessmentSection),
+ CreateExportableFailureMechanismsWithProbability(assessmentSection),
+ CreateExportableFailureMechanismsWithoutProbability(assessmentSection),
+ CreateExportableCombinedSectionAssemblyCollection(assessmentSection));
+ }
+
+ ///
+ /// Creates an with the assembly result
+ /// based on .
+ ///
+ /// The assessment section to create an for.
+ /// An with assembly result.
+ /// Thrown when assembly result cannot be created for .
+ private static ExportableAssessmentSectionAssemblyResult CreateExportableAssessmentSectionAssemblyResult(AssessmentSection assessmentSection)
+ {
+ return new ExportableAssessmentSectionAssemblyResult(ExportableAssemblyMethod.WBI2C1,
+ AssessmentSectionAssemblyFactory.AssembleAssessmentSection(assessmentSection, false));
+ }
+
+ ///
+ /// Creates an with the assembly result
+ /// based on .
+ ///
+ /// The assessment section to create an for.
+ /// An with assembly result.
+ /// Thrown when assembly result cannot be created for .
+ private static ExportableFailureMechanismAssemblyResultWithProbability CreateExportableFailureMechanismAssemblyResultWithProbability(AssessmentSection assessmentSection)
+ {
+ FailureMechanismAssembly assemblyResult = AssessmentSectionAssemblyFactory.AssembleFailureMechanismsWithProbability(assessmentSection, false);
+ return new ExportableFailureMechanismAssemblyResultWithProbability(ExportableAssemblyMethod.WBI2B1,
+ assemblyResult.Group,
+ assemblyResult.Probability);
+ }
+
+ ///
+ /// Creates an with the assembly result
+ /// based on .
+ ///
+ /// The assessment section to create an for.
+ /// An with assembly result.
+ /// Thrown when assembly result cannot be created for .
+ private static ExportableFailureMechanismAssemblyResult CreateExportableFailureMechanismAssemblyResultWithoutProbability(AssessmentSection assessmentSection)
+ {
+ return new ExportableFailureMechanismAssemblyResult(ExportableAssemblyMethod.WBI2A1,
+ AssessmentSectionAssemblyFactory.AssembleFailureMechanismsWithoutProbability(assessmentSection, false));
+ }
+
+ ///
+ /// Creates a collection of
+ /// for failure mechanisms with an assembly result with a probability based on .
+ ///
+ /// The assessment section to create a collection of
+ /// with probability for.
+ /// A collection of based on failure
+ /// mechanisms with assembly results with a probability.
+ /// Thrown when assembly results cannot be created for .
+ private static IEnumerable> CreateExportableFailureMechanismsWithProbability(AssessmentSection assessmentSection)
+ {
+ return new[]
+ {
+ ExportablePipingFailureMechanismFactory.CreateExportableFailureMechanism(assessmentSection.Piping, assessmentSection),
+ ExportableMacroStabilityInwardsFailureMechanismFactory.CreateExportableFailureMechanism(assessmentSection.MacroStabilityInwards, assessmentSection),
+ ExportableGrassCoverErosionInwardsFailureMechanismFactory.CreateExportableFailureMechanism(assessmentSection.GrassCoverErosionInwards, assessmentSection),
+ ExportableHeightStructuresFailureMechanismFactory.CreateExportableFailureMechanism(assessmentSection.HeightStructures, assessmentSection),
+ ExportableClosingStructuresFailureMechanismFactory.CreateExportableFailureMechanism(assessmentSection.ClosingStructures, assessmentSection),
+ ExportableStabilityPointStructuresFailureMechanismFactory.CreateExportableFailureMechanism(assessmentSection.StabilityPointStructures, assessmentSection)
+ };
+ }
+
+ ///
+ /// Creates a collection of
+ /// for failure mechanisms with an assembly result without a probability based on .
+ ///
+ /// The assessment section to create a collection of
+ /// with probability for.
+ /// A collection of based on failure
+ /// mechanisms with assembly results without a probability.
+ /// Thrown when assembly results cannot be created for .
+ private static IEnumerable> CreateExportableFailureMechanismsWithoutProbability(AssessmentSection assessmentSection)
+ {
+ return new[]
+ {
+ ExportableStabilityStoneCoverFailureMechanismFactory.CreateExportableFailureMechanism(assessmentSection.StabilityStoneCover, assessmentSection),
+ ExportableWaveImpactAsphaltCoverFailureMechanismFactory.CreateExportableFailureMechanism(assessmentSection.WaveImpactAsphaltCover, assessmentSection),
+ ExportableGrassCoverErosionOutwardsFailureMechanismFactory.CreateExportableFailureMechanism(assessmentSection.GrassCoverErosionOutwards, assessmentSection),
+ ExportableDuneErosionFailureMechanismFactory.CreateExportableFailureMechanism(assessmentSection.DuneErosion, assessmentSection),
+ ExportableMacroStabilityOutwardsFailureMechanismFactory.CreateExportableFailureMechanism(assessmentSection.MacroStabilityOutwards, assessmentSection),
+ ExportableMicrostabilityFailureMechanismFactory.CreateExportableFailureMechanism(assessmentSection.Microstability, assessmentSection),
+ ExportableGrassCoverSlipOffOutwardsFailureMechanismFactory.CreateExportableFailureMechanism(assessmentSection.GrassCoverSlipOffOutwards, assessmentSection),
+ ExportableGrassCoverSlipOffInwardsFailureMechanismFactory.CreateExportableFailureMechanism(assessmentSection.GrassCoverSlipOffInwards, assessmentSection),
+ ExportablePipingStructureFailureMechanismFactory.CreateExportableFailureMechanism(assessmentSection.PipingStructure, assessmentSection),
+ ExportableWaterPressureAsphaltCoverFailureMechanismFactory.CreateExportableFailureMechanism(assessmentSection.WaterPressureAsphaltCover, assessmentSection),
+ ExportableStrengthStabilityLengthwiseConstructionFailureMechanismFactory.CreateExportableFailureMechanism(assessmentSection.StrengthStabilityLengthwiseConstruction, assessmentSection),
+ ExportableTechnicalInnovationFailureMechanismFactory.CreateExportableFailureMechanism(assessmentSection.TechnicalInnovation, assessmentSection)
+ };
+ }
+
+ ///
+ /// Creates a collection of based on .
+ ///
+ /// The assessment section to create a collection of for.
+ /// A .
+ /// Thrown when assembly results cannot be created for .
+ private static IEnumerable CreateExportableCombinedSectionAssemblyCollection(AssessmentSection assessmentSection)
+ {
+ IEnumerable assemblyResults = AssessmentSectionAssemblyFactory.AssembleCombinedPerFailureMechanismSection(assessmentSection, false);
+ return ExportableCombinedSectionAssemblyFactory.CreateExportableCombinedSectionAssemblyCollection(assemblyResults, assessmentSection.ReferenceLine);
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Integration/src/Riskeer.Integration.IO/Factories/ExportableClosingStructuresFailureMechanismFactory.cs
===================================================================
diff -u
--- Ringtoets/Integration/src/Riskeer.Integration.IO/Factories/ExportableClosingStructuresFailureMechanismFactory.cs (revision 0)
+++ Ringtoets/Integration/src/Riskeer.Integration.IO/Factories/ExportableClosingStructuresFailureMechanismFactory.cs (revision 457970572d405d707ca5a96836d6a48babffc3a7)
@@ -0,0 +1,134 @@
+// Copyright (C) Stichting Deltares 2018. 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 Ringtoets.ClosingStructures.Data;
+using Ringtoets.Common.Data.AssessmentSection;
+using Ringtoets.Common.Data.Exceptions;
+using Riskeer.AssemblyTool.Data;
+using Riskeer.Integration.IO.Assembly;
+using Riskeer.Integration.IO.Helpers;
+
+namespace Riskeer.Integration.IO.Factories
+{
+ ///
+ /// Factory to create instances of
+ /// with assembly results for closing structures.
+ ///
+ public static class ExportableClosingStructuresFailureMechanismFactory
+ {
+ private const ExportableFailureMechanismType failureMechanismCode = ExportableFailureMechanismType.BSKW;
+ private const ExportableFailureMechanismGroup failureMechanismGroup = ExportableFailureMechanismGroup.Group1;
+ private const ExportableAssemblyMethod failureMechanismAssemblyMethod = ExportableAssemblyMethod.WBI1B1;
+
+ ///
+ /// Creates an
+ /// with assembly results based on the input parameters.
+ ///
+ /// The to create an
+ /// for.
+ /// The assessment section the failure mechanism belongs to.
+ /// An with assembly results.
+ /// Thrown when any parameter is null.
+ /// Thrown when assembly results cannot be created.
+ public static ExportableFailureMechanism CreateExportableFailureMechanism(
+ ClosingStructuresFailureMechanism failureMechanism,
+ IAssessmentSection assessmentSection)
+ {
+ if (failureMechanism == null)
+ {
+ throw new ArgumentNullException(nameof(failureMechanism));
+ }
+
+ if (assessmentSection == null)
+ {
+ throw new ArgumentNullException(nameof(assessmentSection));
+ }
+
+ if (!failureMechanism.IsRelevant)
+ {
+ return ExportableFailureMechanismFactory.CreateDefaultExportableFailureMechanismWithProbability(assessmentSection,
+ failureMechanismCode,
+ failureMechanismGroup,
+ failureMechanismAssemblyMethod);
+ }
+
+ FailureMechanismAssembly failureMechanismAssembly = ClosingStructuresFailureMechanismAssemblyFactory.AssembleFailureMechanism(failureMechanism, assessmentSection, false);
+
+ return new ExportableFailureMechanism(
+ new ExportableFailureMechanismAssemblyResultWithProbability(failureMechanismAssemblyMethod,
+ failureMechanismAssembly.Group,
+ failureMechanismAssembly.Probability),
+ CreateExportableFailureMechanismSectionResults(failureMechanism, assessmentSection),
+ failureMechanismCode,
+ failureMechanismGroup);
+ }
+
+ ///
+ /// Creates a collection of
+ /// with assembly results based on .
+ ///
+ /// The to create the collection of
+ /// for.
+ /// The assessment section the failure mechanism belongs to.
+ /// A collection of .
+ /// Thrown when assembly results cannot be created.
+ private static IEnumerable CreateExportableFailureMechanismSectionResults(
+ ClosingStructuresFailureMechanism failureMechanism,
+ IAssessmentSection assessmentSection)
+ {
+ IDictionary failureMechanismSectionsLookup =
+ ExportableFailureMechanismSectionHelper.CreateFailureMechanismSectionResultLookup(failureMechanism.SectionResults);
+
+ var exportableResults = new List();
+ foreach (KeyValuePair failureMechanismSectionPair in failureMechanismSectionsLookup)
+ {
+ ClosingStructuresFailureMechanismSectionResult failureMechanismSectionResult = failureMechanismSectionPair.Key;
+
+ FailureMechanismSectionAssembly simpleAssembly =
+ ClosingStructuresFailureMechanismAssemblyFactory.AssembleSimpleAssessment(failureMechanismSectionResult);
+ FailureMechanismSectionAssembly detailedAssembly =
+ ClosingStructuresFailureMechanismAssemblyFactory.AssembleDetailedAssessment(failureMechanismSectionResult,
+ failureMechanism,
+ assessmentSection);
+ FailureMechanismSectionAssembly tailorMadeAssembly =
+ ClosingStructuresFailureMechanismAssemblyFactory.AssembleTailorMadeAssessment(failureMechanismSectionResult,
+ failureMechanism,
+ assessmentSection);
+ FailureMechanismSectionAssembly combinedAssembly =
+ ClosingStructuresFailureMechanismAssemblyFactory.AssembleCombinedAssessment(failureMechanismSectionResult,
+ failureMechanism,
+ assessmentSection);
+
+ exportableResults.Add(
+ new ExportableAggregatedFailureMechanismSectionAssemblyResultWithProbability(
+ failureMechanismSectionPair.Value,
+ ExportableSectionAssemblyResultFactory.CreateExportableSectionAssemblyResultWithProbability(simpleAssembly, ExportableAssemblyMethod.WBI0E1),
+ ExportableSectionAssemblyResultFactory.CreateExportableSectionAssemblyResultWithProbability(detailedAssembly, ExportableAssemblyMethod.WBI0G3),
+ ExportableSectionAssemblyResultFactory.CreateExportableSectionAssemblyResultWithProbability(tailorMadeAssembly, ExportableAssemblyMethod.WBI0T3),
+ ExportableSectionAssemblyResultFactory.CreateExportableSectionAssemblyResultWithProbability(combinedAssembly, ExportableAssemblyMethod.WBI0A1)));
+ }
+
+ return exportableResults;
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Integration/src/Riskeer.Integration.IO/Factories/ExportableCombinedSectionAssemblyFactory.cs
===================================================================
diff -u
--- Ringtoets/Integration/src/Riskeer.Integration.IO/Factories/ExportableCombinedSectionAssemblyFactory.cs (revision 0)
+++ Ringtoets/Integration/src/Riskeer.Integration.IO/Factories/ExportableCombinedSectionAssemblyFactory.cs (revision 457970572d405d707ca5a96836d6a48babffc3a7)
@@ -0,0 +1,116 @@
+// Copyright (C) Stichting Deltares 2018. 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 Ringtoets.Common.Data.AssessmentSection;
+using Riskeer.AssemblyTool.Data;
+using Riskeer.Integration.Data.Assembly;
+using Riskeer.Integration.IO.Assembly;
+using Riskeer.Integration.Util;
+
+namespace Riskeer.Integration.IO.Factories
+{
+ ///
+ /// Factory to create instances of
+ ///
+ public static class ExportableCombinedSectionAssemblyFactory
+ {
+ ///
+ /// Creates a collection of
+ /// based on .
+ ///
+ /// A collection of combined section results to
+ /// create a collection of for.
+ /// The reference line to map the sections to.
+ /// A collection of .
+ /// Thrown when any parameter is null.
+ public static IEnumerable CreateExportableCombinedSectionAssemblyCollection(
+ IEnumerable combinedSectionAssemblyResults,
+ ReferenceLine referenceLine)
+ {
+ if (combinedSectionAssemblyResults == null)
+ {
+ throw new ArgumentNullException(nameof(combinedSectionAssemblyResults));
+ }
+
+ if (referenceLine == null)
+ {
+ throw new ArgumentNullException(nameof(referenceLine));
+ }
+
+ var sectionResults = new List();
+ foreach (CombinedFailureMechanismSectionAssemblyResult assemblyResult in combinedSectionAssemblyResults)
+ {
+ var exportableSection = new ExportableCombinedFailureMechanismSection(
+ FailureMechanismSectionHelper.GetFailureMechanismSectionGeometry(
+ referenceLine, assemblyResult.SectionStart, assemblyResult.SectionEnd),
+ assemblyResult.SectionStart,
+ assemblyResult.SectionEnd,
+ ExportableAssemblyMethod.WBI3A1);
+
+ var exportableSectionResult = new ExportableCombinedSectionAssembly(exportableSection,
+ new ExportableSectionAssemblyResult(ExportableAssemblyMethod.WBI3C1,
+ assemblyResult.TotalResult),
+ CreateFailureMechanismCombinedSectionAssemblyResults(assemblyResult));
+
+ sectionResults.Add(exportableSectionResult);
+ }
+
+ return sectionResults;
+ }
+
+ private static IEnumerable CreateFailureMechanismCombinedSectionAssemblyResults(
+ CombinedFailureMechanismSectionAssemblyResult assemblyResult)
+ {
+ return new[]
+ {
+ CreateExportableFailureMechanismCombinedSectionAssemblyResult(assemblyResult.Piping, ExportableFailureMechanismType.STPH),
+ CreateExportableFailureMechanismCombinedSectionAssemblyResult(assemblyResult.GrassCoverErosionInwards, ExportableFailureMechanismType.GEKB),
+ CreateExportableFailureMechanismCombinedSectionAssemblyResult(assemblyResult.MacroStabilityInwards, ExportableFailureMechanismType.STBI),
+ CreateExportableFailureMechanismCombinedSectionAssemblyResult(assemblyResult.MacroStabilityOutwards, ExportableFailureMechanismType.STBU),
+ CreateExportableFailureMechanismCombinedSectionAssemblyResult(assemblyResult.Microstability, ExportableFailureMechanismType.STMI),
+ CreateExportableFailureMechanismCombinedSectionAssemblyResult(assemblyResult.StabilityStoneCover, ExportableFailureMechanismType.ZST),
+ CreateExportableFailureMechanismCombinedSectionAssemblyResult(assemblyResult.WaveImpactAsphaltCover, ExportableFailureMechanismType.AGK),
+ CreateExportableFailureMechanismCombinedSectionAssemblyResult(assemblyResult.WaterPressureAsphaltCover, ExportableFailureMechanismType.AWO),
+ CreateExportableFailureMechanismCombinedSectionAssemblyResult(assemblyResult.GrassCoverErosionOutwards, ExportableFailureMechanismType.GEBU),
+ CreateExportableFailureMechanismCombinedSectionAssemblyResult(assemblyResult.GrassCoverSlipOffOutwards, ExportableFailureMechanismType.GABU),
+ CreateExportableFailureMechanismCombinedSectionAssemblyResult(assemblyResult.GrassCoverSlipOffInwards, ExportableFailureMechanismType.GABI),
+ CreateExportableFailureMechanismCombinedSectionAssemblyResult(assemblyResult.HeightStructures, ExportableFailureMechanismType.HTKW),
+ CreateExportableFailureMechanismCombinedSectionAssemblyResult(assemblyResult.ClosingStructures, ExportableFailureMechanismType.BSKW),
+ CreateExportableFailureMechanismCombinedSectionAssemblyResult(assemblyResult.PipingStructure, ExportableFailureMechanismType.PKW),
+ CreateExportableFailureMechanismCombinedSectionAssemblyResult(assemblyResult.StabilityPointStructures, ExportableFailureMechanismType.STKWp),
+ CreateExportableFailureMechanismCombinedSectionAssemblyResult(assemblyResult.StrengthStabilityLengthwiseConstruction, ExportableFailureMechanismType.STKWl),
+ CreateExportableFailureMechanismCombinedSectionAssemblyResult(assemblyResult.DuneErosion, ExportableFailureMechanismType.DA),
+ CreateExportableFailureMechanismCombinedSectionAssemblyResult(assemblyResult.TechnicalInnovation, ExportableFailureMechanismType.INN)
+ };
+ }
+
+ private static ExportableFailureMechanismCombinedSectionAssemblyResult CreateExportableFailureMechanismCombinedSectionAssemblyResult(
+ FailureMechanismSectionAssemblyCategoryGroup sectionAssemblyResult,
+ ExportableFailureMechanismType failureMechanismCode)
+ {
+ return new ExportableFailureMechanismCombinedSectionAssemblyResult(new ExportableSectionAssemblyResult(ExportableAssemblyMethod.WBI3B1,
+ sectionAssemblyResult),
+ failureMechanismCode);
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Integration/src/Riskeer.Integration.IO/Factories/ExportableDuneErosionFailureMechanismFactory.cs
===================================================================
diff -u
--- Ringtoets/Integration/src/Riskeer.Integration.IO/Factories/ExportableDuneErosionFailureMechanismFactory.cs (revision 0)
+++ Ringtoets/Integration/src/Riskeer.Integration.IO/Factories/ExportableDuneErosionFailureMechanismFactory.cs (revision 457970572d405d707ca5a96836d6a48babffc3a7)
@@ -0,0 +1,124 @@
+// Copyright (C) Stichting Deltares 2018. 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 Ringtoets.Common.Data.AssessmentSection;
+using Ringtoets.Common.Data.Exceptions;
+using Ringtoets.DuneErosion.Data;
+using Riskeer.AssemblyTool.Data;
+using Riskeer.Integration.IO.Assembly;
+using Riskeer.Integration.IO.Helpers;
+
+namespace Riskeer.Integration.IO.Factories
+{
+ ///
+ /// Factory to create instances of
+ /// with assembly results for dune erosion.
+ ///
+ public static class ExportableDuneErosionFailureMechanismFactory
+ {
+ private const ExportableFailureMechanismType failureMechanismCode = ExportableFailureMechanismType.DA;
+ private const ExportableFailureMechanismGroup failureMechanismGroup = ExportableFailureMechanismGroup.Group3;
+ private const ExportableAssemblyMethod failureMechanismAssemblyMethod = ExportableAssemblyMethod.WBI1A1;
+
+ ///
+ /// Creates an
+ /// with assembly results based on the input parameters.
+ ///
+ /// The to create an
+ /// for.
+ /// The assessment section the failure mechanism belongs to.
+ /// An with assembly results.
+ /// Thrown when any parameter is null.
+ /// Thrown when assembly results cannot be created.
+ public static ExportableFailureMechanism CreateExportableFailureMechanism(
+ DuneErosionFailureMechanism failureMechanism,
+ IAssessmentSection assessmentSection)
+ {
+ if (failureMechanism == null)
+ {
+ throw new ArgumentNullException(nameof(failureMechanism));
+ }
+
+ if (assessmentSection == null)
+ {
+ throw new ArgumentNullException(nameof(assessmentSection));
+ }
+
+ if (!failureMechanism.IsRelevant)
+ {
+ return ExportableFailureMechanismFactory.CreateDefaultExportableFailureMechanismWithoutProbability(assessmentSection,
+ failureMechanismCode,
+ failureMechanismGroup,
+ failureMechanismAssemblyMethod);
+ }
+
+ FailureMechanismAssemblyCategoryGroup failureMechanismAssembly = DuneErosionFailureMechanismAssemblyFactory.AssembleFailureMechanism(failureMechanism, false);
+
+ return new ExportableFailureMechanism(
+ new ExportableFailureMechanismAssemblyResult(failureMechanismAssemblyMethod, failureMechanismAssembly),
+ CreateFailureMechanismSectionResults(failureMechanism.SectionResults),
+ failureMechanismCode,
+ failureMechanismGroup);
+ }
+
+ ///
+ /// Creates a collection of
+ /// with assembly results based on .
+ ///
+ /// The collection of
+ /// to create a collection of for..
+ /// A collection of .
+ /// Thrown when assembly results cannot be created.
+ private static IEnumerable CreateFailureMechanismSectionResults(
+ IEnumerable failureMechanismSectionResults)
+ {
+ IDictionary failureMechanismSectionsLookup =
+ ExportableFailureMechanismSectionHelper.CreateFailureMechanismSectionResultLookup(failureMechanismSectionResults);
+
+ var exportableResults = new List();
+ foreach (KeyValuePair failureMechanismSectionPair in failureMechanismSectionsLookup)
+ {
+ DuneErosionFailureMechanismSectionResult failureMechanismSectionResult = failureMechanismSectionPair.Key;
+
+ FailureMechanismSectionAssemblyCategoryGroup simpleAssembly =
+ DuneErosionFailureMechanismAssemblyFactory.AssembleSimpleAssessment(failureMechanismSectionResult);
+ FailureMechanismSectionAssemblyCategoryGroup detailedAssembly =
+ DuneErosionFailureMechanismAssemblyFactory.AssembleDetailedAssessment(failureMechanismSectionResult);
+ FailureMechanismSectionAssemblyCategoryGroup tailorMadeAssembly =
+ DuneErosionFailureMechanismAssemblyFactory.AssembleTailorMadeAssessment(failureMechanismSectionResult);
+ FailureMechanismSectionAssemblyCategoryGroup combinedAssembly =
+ DuneErosionFailureMechanismAssemblyFactory.AssembleCombinedAssessment(failureMechanismSectionResult);
+
+ exportableResults.Add(
+ new ExportableAggregatedFailureMechanismSectionAssemblyResult(
+ failureMechanismSectionPair.Value,
+ ExportableSectionAssemblyResultFactory.CreateExportableSectionAssemblyResult(simpleAssembly, ExportableAssemblyMethod.WBI0E3),
+ ExportableSectionAssemblyResultFactory.CreateExportableSectionAssemblyResult(detailedAssembly, ExportableAssemblyMethod.WBI0G6),
+ ExportableSectionAssemblyResultFactory.CreateExportableSectionAssemblyResult(tailorMadeAssembly, ExportableAssemblyMethod.WBI0T4),
+ ExportableSectionAssemblyResultFactory.CreateExportableSectionAssemblyResult(combinedAssembly, ExportableAssemblyMethod.WBI0A1)));
+ }
+
+ return exportableResults;
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Integration/src/Riskeer.Integration.IO/Factories/ExportableFailureMechanismFactory.cs
===================================================================
diff -u
--- Ringtoets/Integration/src/Riskeer.Integration.IO/Factories/ExportableFailureMechanismFactory.cs (revision 0)
+++ Ringtoets/Integration/src/Riskeer.Integration.IO/Factories/ExportableFailureMechanismFactory.cs (revision 457970572d405d707ca5a96836d6a48babffc3a7)
@@ -0,0 +1,109 @@
+// Copyright (C) Stichting Deltares 2018. 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.Data.AssessmentSection;
+using Riskeer.AssemblyTool.Data;
+using Riskeer.Integration.IO.Assembly;
+
+namespace Riskeer.Integration.IO.Factories
+{
+ ///
+ /// Factory to create instances of .
+ ///
+ public static class ExportableFailureMechanismFactory
+ {
+ ///
+ /// Creates a default instance of an
+ /// with a probability based on its input parameters.
+ ///
+ /// The assessment section the failure mechanism belongs to.
+ /// The of the failure mechanism.
+ /// The of the failure mechanism.
+ /// The assembly method which is used to obtain the general assembly result of the failure mechanism.
+ /// An with default values.
+ /// Thrown when is null.
+ public static ExportableFailureMechanism CreateDefaultExportableFailureMechanismWithProbability(
+ IAssessmentSection assessmentSection,
+ ExportableFailureMechanismType failureMechanismCode,
+ ExportableFailureMechanismGroup failureMechanismGroup,
+ ExportableAssemblyMethod assemblyMethod)
+ {
+ if (assessmentSection == null)
+ {
+ throw new ArgumentNullException(nameof(assessmentSection));
+ }
+
+ return new ExportableFailureMechanism(
+ new ExportableFailureMechanismAssemblyResultWithProbability(assemblyMethod,
+ FailureMechanismAssemblyCategoryGroup.NotApplicable,
+ 0),
+ new[]
+ {
+ new ExportableAggregatedFailureMechanismSectionAssemblyWithCombinedProbabilityResult(CreateExportableFailureMechanismSection(assessmentSection.ReferenceLine),
+ new ExportableSectionAssemblyResultWithProbability(ExportableAssemblyMethod.WBI0A1,
+ FailureMechanismSectionAssemblyCategoryGroup.NotApplicable,
+ 0))
+ },
+ failureMechanismCode,
+ failureMechanismGroup);
+ }
+
+ ///
+ /// Creates a default instance of an
+ /// without a probability based on its input parameters.
+ ///
+ /// The assessment section the failure mechanism belongs to.
+ /// The of the failure mechanism.
+ /// The of the failure mechanism.
+ /// The assembly method which is used to obtain the general assembly result of the failure mechanism.
+ /// An with default values.
+ /// Thrown when is null.
+ public static ExportableFailureMechanism CreateDefaultExportableFailureMechanismWithoutProbability(
+ IAssessmentSection assessmentSection,
+ ExportableFailureMechanismType failureMechanismCode,
+ ExportableFailureMechanismGroup failureMechanismGroup,
+ ExportableAssemblyMethod assemblyMethod)
+ {
+ if (assessmentSection == null)
+ {
+ throw new ArgumentNullException(nameof(assessmentSection));
+ }
+
+ return new ExportableFailureMechanism(
+ new ExportableFailureMechanismAssemblyResult(assemblyMethod,
+ FailureMechanismAssemblyCategoryGroup.NotApplicable),
+ new[]
+ {
+ new ExportableAggregatedFailureMechanismSectionAssemblyWithCombinedResult(CreateExportableFailureMechanismSection(assessmentSection.ReferenceLine),
+ new ExportableSectionAssemblyResult(ExportableAssemblyMethod.WBI0A1,
+ FailureMechanismSectionAssemblyCategoryGroup.NotApplicable))
+ },
+ failureMechanismCode,
+ failureMechanismGroup);
+ }
+
+ private static ExportableFailureMechanismSection CreateExportableFailureMechanismSection(ReferenceLine referenceLine)
+ {
+ return new ExportableFailureMechanismSection(referenceLine.Points, 0, referenceLine.Length);
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Integration/src/Riskeer.Integration.IO/Factories/ExportableGrassCoverErosionInwardsFailureMechanismFactory.cs
===================================================================
diff -u
--- Ringtoets/Integration/src/Riskeer.Integration.IO/Factories/ExportableGrassCoverErosionInwardsFailureMechanismFactory.cs (revision 0)
+++ Ringtoets/Integration/src/Riskeer.Integration.IO/Factories/ExportableGrassCoverErosionInwardsFailureMechanismFactory.cs (revision 457970572d405d707ca5a96836d6a48babffc3a7)
@@ -0,0 +1,134 @@
+// Copyright (C) Stichting Deltares 2018. 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 Ringtoets.Common.Data.AssessmentSection;
+using Ringtoets.Common.Data.Exceptions;
+using Ringtoets.GrassCoverErosionInwards.Data;
+using Riskeer.AssemblyTool.Data;
+using Riskeer.Integration.IO.Assembly;
+using Riskeer.Integration.IO.Helpers;
+
+namespace Riskeer.Integration.IO.Factories
+{
+ ///
+ /// Factory to create instances of
+ /// with assembly results for grass cover erosion inwards.
+ ///
+ public static class ExportableGrassCoverErosionInwardsFailureMechanismFactory
+ {
+ private const ExportableFailureMechanismType failureMechanismCode = ExportableFailureMechanismType.GEKB;
+ private const ExportableFailureMechanismGroup failureMechanismGroup = ExportableFailureMechanismGroup.Group1;
+ private const ExportableAssemblyMethod failureMechanismAssemblyMethod = ExportableAssemblyMethod.WBI1B1;
+
+ ///
+ /// Creates an
+ /// with assembly results based on the input parameters.
+ ///
+ /// The to create an
+ /// for.
+ /// The assessment section the failure mechanism belongs to.
+ /// An with assembly results.
+ /// Thrown when any parameter is null.
+ /// Thrown when assembly results cannot be created.
+ public static ExportableFailureMechanism CreateExportableFailureMechanism(
+ GrassCoverErosionInwardsFailureMechanism failureMechanism,
+ IAssessmentSection assessmentSection)
+ {
+ if (failureMechanism == null)
+ {
+ throw new ArgumentNullException(nameof(failureMechanism));
+ }
+
+ if (assessmentSection == null)
+ {
+ throw new ArgumentNullException(nameof(assessmentSection));
+ }
+
+ if (!failureMechanism.IsRelevant)
+ {
+ return ExportableFailureMechanismFactory.CreateDefaultExportableFailureMechanismWithProbability(assessmentSection,
+ failureMechanismCode,
+ failureMechanismGroup,
+ failureMechanismAssemblyMethod);
+ }
+
+ FailureMechanismAssembly failureMechanismAssembly = GrassCoverErosionInwardsFailureMechanismAssemblyFactory.AssembleFailureMechanism(failureMechanism, assessmentSection, false);
+
+ return new ExportableFailureMechanism(
+ new ExportableFailureMechanismAssemblyResultWithProbability(failureMechanismAssemblyMethod,
+ failureMechanismAssembly.Group,
+ failureMechanismAssembly.Probability),
+ CreateExportableFailureMechanismSectionResults(failureMechanism, assessmentSection),
+ failureMechanismCode,
+ failureMechanismGroup);
+ }
+
+ ///
+ /// Creates a collection of
+ /// with assembly results based on .
+ ///
+ /// The to create a a collection
+ /// of for.
+ /// The assessment section the failure mechanism belongs to.
+ /// A collection of .
+ /// Thrown when assembly results cannot be created.
+ private static IEnumerable CreateExportableFailureMechanismSectionResults(
+ GrassCoverErosionInwardsFailureMechanism failureMechanism,
+ IAssessmentSection assessmentSection)
+ {
+ IDictionary failureMechanismSectionsLookup =
+ ExportableFailureMechanismSectionHelper.CreateFailureMechanismSectionResultLookup(failureMechanism.SectionResults);
+
+ var exportableResults = new List();
+ foreach (KeyValuePair failureMechanismSectionPair in failureMechanismSectionsLookup)
+ {
+ GrassCoverErosionInwardsFailureMechanismSectionResult failureMechanismSectionResult = failureMechanismSectionPair.Key;
+
+ FailureMechanismSectionAssembly simpleAssembly =
+ GrassCoverErosionInwardsFailureMechanismAssemblyFactory.AssembleSimpleAssessment(failureMechanismSectionResult);
+ FailureMechanismSectionAssembly detailedAssembly =
+ GrassCoverErosionInwardsFailureMechanismAssemblyFactory.AssembleDetailedAssessment(failureMechanismSectionResult,
+ failureMechanism,
+ assessmentSection);
+ FailureMechanismSectionAssembly tailorMadeAssembly =
+ GrassCoverErosionInwardsFailureMechanismAssemblyFactory.AssembleTailorMadeAssessment(failureMechanismSectionResult,
+ failureMechanism,
+ assessmentSection);
+ FailureMechanismSectionAssembly combinedAssembly =
+ GrassCoverErosionInwardsFailureMechanismAssemblyFactory.AssembleCombinedAssessment(failureMechanismSectionResult,
+ failureMechanism,
+ assessmentSection);
+
+ exportableResults.Add(
+ new ExportableAggregatedFailureMechanismSectionAssemblyResultWithProbability(
+ failureMechanismSectionPair.Value,
+ ExportableSectionAssemblyResultFactory.CreateExportableSectionAssemblyResultWithProbability(simpleAssembly, ExportableAssemblyMethod.WBI0E3),
+ ExportableSectionAssemblyResultFactory.CreateExportableSectionAssemblyResultWithProbability(detailedAssembly, ExportableAssemblyMethod.WBI0G3),
+ ExportableSectionAssemblyResultFactory.CreateExportableSectionAssemblyResultWithProbability(tailorMadeAssembly, ExportableAssemblyMethod.WBI0T3),
+ ExportableSectionAssemblyResultFactory.CreateExportableSectionAssemblyResultWithProbability(combinedAssembly, ExportableAssemblyMethod.WBI0A1)));
+ }
+
+ return exportableResults;
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Integration/src/Riskeer.Integration.IO/Factories/ExportableGrassCoverErosionOutwardsFailureMechanismFactory.cs
===================================================================
diff -u
--- Ringtoets/Integration/src/Riskeer.Integration.IO/Factories/ExportableGrassCoverErosionOutwardsFailureMechanismFactory.cs (revision 0)
+++ Ringtoets/Integration/src/Riskeer.Integration.IO/Factories/ExportableGrassCoverErosionOutwardsFailureMechanismFactory.cs (revision 457970572d405d707ca5a96836d6a48babffc3a7)
@@ -0,0 +1,124 @@
+// Copyright (C) Stichting Deltares 2018. 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 Ringtoets.Common.Data.AssessmentSection;
+using Ringtoets.Common.Data.Exceptions;
+using Ringtoets.GrassCoverErosionOutwards.Data;
+using Riskeer.AssemblyTool.Data;
+using Riskeer.Integration.IO.Assembly;
+using Riskeer.Integration.IO.Helpers;
+
+namespace Riskeer.Integration.IO.Factories
+{
+ ///
+ /// Factory to create instances of
+ /// with assembly results for grass cover erosion outwards.
+ ///
+ public static class ExportableGrassCoverErosionOutwardsFailureMechanismFactory
+ {
+ private const ExportableFailureMechanismType failureMechanismCode = ExportableFailureMechanismType.GEBU;
+ private const ExportableFailureMechanismGroup failureMechanismGroup = ExportableFailureMechanismGroup.Group3;
+ private const ExportableAssemblyMethod failureMechanismAssemblyMethod = ExportableAssemblyMethod.WBI1A1;
+
+ ///
+ /// Creates an
+ /// with assembly results based on the input parameters.
+ ///
+ /// The to create an
+ /// for.
+ /// The assessment section the failure mechanism belongs to.
+ /// An with assembly results.
+ /// Thrown when any parameter is null.
+ /// Thrown when assembly results cannot be created.
+ public static ExportableFailureMechanism CreateExportableFailureMechanism(
+ GrassCoverErosionOutwardsFailureMechanism failureMechanism,
+ IAssessmentSection assessmentSection)
+ {
+ if (failureMechanism == null)
+ {
+ throw new ArgumentNullException(nameof(failureMechanism));
+ }
+
+ if (assessmentSection == null)
+ {
+ throw new ArgumentNullException(nameof(assessmentSection));
+ }
+
+ if (!failureMechanism.IsRelevant)
+ {
+ return ExportableFailureMechanismFactory.CreateDefaultExportableFailureMechanismWithoutProbability(assessmentSection,
+ failureMechanismCode,
+ failureMechanismGroup,
+ failureMechanismAssemblyMethod);
+ }
+
+ FailureMechanismAssemblyCategoryGroup failureMechanismAssembly = GrassCoverErosionOutwardsFailureMechanismAssemblyFactory.AssembleFailureMechanism(failureMechanism, false);
+
+ return new ExportableFailureMechanism(
+ new ExportableFailureMechanismAssemblyResult(failureMechanismAssemblyMethod, failureMechanismAssembly),
+ CreateFailureMechanismSectionResults(failureMechanism.SectionResults),
+ failureMechanismCode,
+ failureMechanismGroup);
+ }
+
+ ///
+ /// Creates a collection of
+ /// with assembly results based on .
+ ///
+ /// The collection of
+ /// to create a collection of for.
+ /// A collection of .
+ /// Thrown when assembly results cannot be created.
+ private static IEnumerable CreateFailureMechanismSectionResults(
+ IEnumerable failureMechanismSectionResults)
+ {
+ IDictionary failureMechanismSectionsLookup =
+ ExportableFailureMechanismSectionHelper.CreateFailureMechanismSectionResultLookup(failureMechanismSectionResults);
+
+ var exportableResults = new List();
+ foreach (KeyValuePair failureMechanismSectionPair in failureMechanismSectionsLookup)
+ {
+ GrassCoverErosionOutwardsFailureMechanismSectionResult failureMechanismSectionResult = failureMechanismSectionPair.Key;
+
+ FailureMechanismSectionAssemblyCategoryGroup simpleAssembly =
+ GrassCoverErosionOutwardsFailureMechanismAssemblyFactory.AssembleSimpleAssessment(failureMechanismSectionResult);
+ FailureMechanismSectionAssemblyCategoryGroup detailedAssembly =
+ GrassCoverErosionOutwardsFailureMechanismAssemblyFactory.AssembleDetailedAssessment(failureMechanismSectionResult);
+ FailureMechanismSectionAssemblyCategoryGroup tailorMadeAssembly =
+ GrassCoverErosionOutwardsFailureMechanismAssemblyFactory.AssembleTailorMadeAssessment(failureMechanismSectionResult);
+ FailureMechanismSectionAssemblyCategoryGroup combinedAssembly =
+ GrassCoverErosionOutwardsFailureMechanismAssemblyFactory.AssembleCombinedAssessment(failureMechanismSectionResult);
+
+ exportableResults.Add(
+ new ExportableAggregatedFailureMechanismSectionAssemblyResult(
+ failureMechanismSectionPair.Value,
+ ExportableSectionAssemblyResultFactory.CreateExportableSectionAssemblyResult(simpleAssembly, ExportableAssemblyMethod.WBI0E1),
+ ExportableSectionAssemblyResultFactory.CreateExportableSectionAssemblyResult(detailedAssembly, ExportableAssemblyMethod.WBI0G6),
+ ExportableSectionAssemblyResultFactory.CreateExportableSectionAssemblyResult(tailorMadeAssembly, ExportableAssemblyMethod.WBI0T4),
+ ExportableSectionAssemblyResultFactory.CreateExportableSectionAssemblyResult(combinedAssembly, ExportableAssemblyMethod.WBI0A1)));
+ }
+
+ return exportableResults;
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Integration/src/Riskeer.Integration.IO/Factories/ExportableGrassCoverSlipOffInwardsFailureMechanismFactory.cs
===================================================================
diff -u
--- Ringtoets/Integration/src/Riskeer.Integration.IO/Factories/ExportableGrassCoverSlipOffInwardsFailureMechanismFactory.cs (revision 0)
+++ Ringtoets/Integration/src/Riskeer.Integration.IO/Factories/ExportableGrassCoverSlipOffInwardsFailureMechanismFactory.cs (revision 457970572d405d707ca5a96836d6a48babffc3a7)
@@ -0,0 +1,125 @@
+// Copyright (C) Stichting Deltares 2018. 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 Ringtoets.Common.Data.AssessmentSection;
+using Ringtoets.Common.Data.Exceptions;
+using Riskeer.AssemblyTool.Data;
+using Riskeer.Integration.Data.StandAlone;
+using Riskeer.Integration.Data.StandAlone.AssemblyFactories;
+using Riskeer.Integration.Data.StandAlone.SectionResults;
+using Riskeer.Integration.IO.Assembly;
+using Riskeer.Integration.IO.Helpers;
+
+namespace Riskeer.Integration.IO.Factories
+{
+ ///
+ /// Factory to create instances of
+ /// with assembly results for grass cover slip off inwards.
+ ///
+ public static class ExportableGrassCoverSlipOffInwardsFailureMechanismFactory
+ {
+ private const ExportableFailureMechanismType failureMechanismCode = ExportableFailureMechanismType.GABI;
+ private const ExportableFailureMechanismGroup failureMechanismGroup = ExportableFailureMechanismGroup.Group4;
+ private const ExportableAssemblyMethod failureMechanismAssemblyMethod = ExportableAssemblyMethod.WBI1A1;
+
+ ///
+ /// Creates an
+ /// with assembly results based on the input parameters.
+ ///
+ /// The to create an
+ /// for.
+ /// The assessment section the failure mechanism belongs to.
+ /// An with assembly results.
+ /// Thrown when any parameter is null.
+ /// Thrown when assembly results cannot be created.
+ public static ExportableFailureMechanism CreateExportableFailureMechanism(
+ GrassCoverSlipOffInwardsFailureMechanism failureMechanism,
+ IAssessmentSection assessmentSection)
+ {
+ if (failureMechanism == null)
+ {
+ throw new ArgumentNullException(nameof(failureMechanism));
+ }
+
+ if (assessmentSection == null)
+ {
+ throw new ArgumentNullException(nameof(assessmentSection));
+ }
+
+ if (!failureMechanism.IsRelevant)
+ {
+ return ExportableFailureMechanismFactory.CreateDefaultExportableFailureMechanismWithoutProbability(assessmentSection,
+ failureMechanismCode,
+ failureMechanismGroup,
+ failureMechanismAssemblyMethod);
+ }
+
+ FailureMechanismAssemblyCategoryGroup failureMechanismAssembly = GrassCoverSlipOffInwardsFailureMechanismAssemblyFactory.AssembleFailureMechanism(failureMechanism, false);
+ return new ExportableFailureMechanism(
+ new ExportableFailureMechanismAssemblyResult(failureMechanismAssemblyMethod, failureMechanismAssembly),
+ CreateFailureMechanismSectionResults(failureMechanism.SectionResults),
+ failureMechanismCode,
+ failureMechanismGroup);
+ }
+
+ ///
+ /// Creates a collection of
+ /// with assembly results based on .
+ ///
+ /// The collection of
+ /// to create a collection of for.
+ /// A collection of .
+ /// Thrown when assembly results cannot be created.
+ private static IEnumerable CreateFailureMechanismSectionResults(
+ IEnumerable failureMechanismSectionResults)
+ {
+ IDictionary failureMechanismSectionsLookup =
+ ExportableFailureMechanismSectionHelper.CreateFailureMechanismSectionResultLookup(failureMechanismSectionResults);
+
+ var exportableResults = new List();
+ foreach (KeyValuePair failureMechanismSectionPair in failureMechanismSectionsLookup)
+ {
+ GrassCoverSlipOffInwardsFailureMechanismSectionResult failureMechanismSectionResult = failureMechanismSectionPair.Key;
+
+ FailureMechanismSectionAssemblyCategoryGroup simpleAssembly =
+ GrassCoverSlipOffInwardsFailureMechanismAssemblyFactory.AssembleSimpleAssessment(failureMechanismSectionResult);
+ FailureMechanismSectionAssemblyCategoryGroup detailedAssembly =
+ GrassCoverSlipOffInwardsFailureMechanismAssemblyFactory.AssembleDetailedAssessment(failureMechanismSectionResult);
+ FailureMechanismSectionAssemblyCategoryGroup tailorMadeAssembly =
+ GrassCoverSlipOffInwardsFailureMechanismAssemblyFactory.AssembleTailorMadeAssessment(failureMechanismSectionResult);
+ FailureMechanismSectionAssemblyCategoryGroup combinedAssembly =
+ GrassCoverSlipOffInwardsFailureMechanismAssemblyFactory.AssembleCombinedAssessment(failureMechanismSectionResult);
+
+ exportableResults.Add(
+ new ExportableAggregatedFailureMechanismSectionAssemblyResult(
+ failureMechanismSectionPair.Value,
+ ExportableSectionAssemblyResultFactory.CreateExportableSectionAssemblyResult(simpleAssembly, ExportableAssemblyMethod.WBI0E1),
+ ExportableSectionAssemblyResultFactory.CreateExportableSectionAssemblyResult(detailedAssembly, ExportableAssemblyMethod.WBI0G1),
+ ExportableSectionAssemblyResultFactory.CreateExportableSectionAssemblyResult(tailorMadeAssembly, ExportableAssemblyMethod.WBI0T1),
+ ExportableSectionAssemblyResultFactory.CreateExportableSectionAssemblyResult(combinedAssembly, ExportableAssemblyMethod.WBI0A1)));
+ }
+
+ return exportableResults;
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Integration/src/Riskeer.Integration.IO/Factories/ExportableGrassCoverSlipOffOutwardsFailureMechanismFactory.cs
===================================================================
diff -u
--- Ringtoets/Integration/src/Riskeer.Integration.IO/Factories/ExportableGrassCoverSlipOffOutwardsFailureMechanismFactory.cs (revision 0)
+++ Ringtoets/Integration/src/Riskeer.Integration.IO/Factories/ExportableGrassCoverSlipOffOutwardsFailureMechanismFactory.cs (revision 457970572d405d707ca5a96836d6a48babffc3a7)
@@ -0,0 +1,126 @@
+// Copyright (C) Stichting Deltares 2018. 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 Ringtoets.Common.Data.AssessmentSection;
+using Ringtoets.Common.Data.Exceptions;
+using Riskeer.AssemblyTool.Data;
+using Riskeer.Integration.Data.StandAlone;
+using Riskeer.Integration.Data.StandAlone.AssemblyFactories;
+using Riskeer.Integration.Data.StandAlone.SectionResults;
+using Riskeer.Integration.IO.Assembly;
+using Riskeer.Integration.IO.Helpers;
+
+namespace Riskeer.Integration.IO.Factories
+{
+ ///
+ /// Factory to create instances of
+ /// with assembly results for grass cover slip off outwards.
+ ///
+ public static class ExportableGrassCoverSlipOffOutwardsFailureMechanismFactory
+ {
+ private const ExportableFailureMechanismType failureMechanismCode = ExportableFailureMechanismType.GABU;
+ private const ExportableFailureMechanismGroup failureMechanismGroup = ExportableFailureMechanismGroup.Group4;
+ private const ExportableAssemblyMethod failureMechanismAssemblyMethod = ExportableAssemblyMethod.WBI1A1;
+
+ ///
+ /// Creates an
+ /// with assembly results based on the input parameters.
+ ///
+ /// The to create an
+ /// for.
+ /// The assessment section the failure mechanism belongs to.
+ /// An with assembly results.
+ /// Thrown when any parameter is null.
+ /// Thrown when assembly results cannot be created.
+ public static ExportableFailureMechanism CreateExportableFailureMechanism(
+ GrassCoverSlipOffOutwardsFailureMechanism failureMechanism,
+ IAssessmentSection assessmentSection)
+ {
+ if (failureMechanism == null)
+ {
+ throw new ArgumentNullException(nameof(failureMechanism));
+ }
+
+ if (assessmentSection == null)
+ {
+ throw new ArgumentNullException(nameof(assessmentSection));
+ }
+
+ if (!failureMechanism.IsRelevant)
+ {
+ return ExportableFailureMechanismFactory.CreateDefaultExportableFailureMechanismWithoutProbability(assessmentSection,
+ failureMechanismCode,
+ failureMechanismGroup,
+ failureMechanismAssemblyMethod);
+ }
+
+ FailureMechanismAssemblyCategoryGroup failureMechanismAssembly = GrassCoverSlipOffOutwardsFailureMechanismAssemblyFactory.AssembleFailureMechanism(failureMechanism, false);
+
+ return new ExportableFailureMechanism(
+ new ExportableFailureMechanismAssemblyResult(failureMechanismAssemblyMethod, failureMechanismAssembly),
+ CreateFailureMechanismSectionResults(failureMechanism.SectionResults),
+ failureMechanismCode,
+ failureMechanismGroup);
+ }
+
+ ///
+ /// Creates a collection of
+ /// with assembly results based on .
+ ///
+ /// The collection of
+ /// to create a for.
+ /// A collection of .
+ /// Thrown when assembly results cannot be created.
+ private static IEnumerable CreateFailureMechanismSectionResults(
+ IEnumerable failureMechanismSectionResults)
+ {
+ IDictionary failureMechanismSectionsLookup =
+ ExportableFailureMechanismSectionHelper.CreateFailureMechanismSectionResultLookup(failureMechanismSectionResults);
+
+ var exportableResults = new List();
+ foreach (KeyValuePair failureMechanismSectionPair in failureMechanismSectionsLookup)
+ {
+ GrassCoverSlipOffOutwardsFailureMechanismSectionResult failureMechanismSectionResult = failureMechanismSectionPair.Key;
+
+ FailureMechanismSectionAssemblyCategoryGroup simpleAssembly =
+ GrassCoverSlipOffOutwardsFailureMechanismAssemblyFactory.AssembleSimpleAssessment(failureMechanismSectionResult);
+ FailureMechanismSectionAssemblyCategoryGroup detailedAssembly =
+ GrassCoverSlipOffOutwardsFailureMechanismAssemblyFactory.AssembleDetailedAssessment(failureMechanismSectionResult);
+ FailureMechanismSectionAssemblyCategoryGroup tailorMadeAssembly =
+ GrassCoverSlipOffOutwardsFailureMechanismAssemblyFactory.AssembleTailorMadeAssessment(failureMechanismSectionResult);
+ FailureMechanismSectionAssemblyCategoryGroup combinedAssembly =
+ GrassCoverSlipOffOutwardsFailureMechanismAssemblyFactory.AssembleCombinedAssessment(failureMechanismSectionResult);
+
+ exportableResults.Add(
+ new ExportableAggregatedFailureMechanismSectionAssemblyResult(
+ failureMechanismSectionPair.Value,
+ ExportableSectionAssemblyResultFactory.CreateExportableSectionAssemblyResult(simpleAssembly, ExportableAssemblyMethod.WBI0E1),
+ ExportableSectionAssemblyResultFactory.CreateExportableSectionAssemblyResult(detailedAssembly, ExportableAssemblyMethod.WBI0G1),
+ ExportableSectionAssemblyResultFactory.CreateExportableSectionAssemblyResult(tailorMadeAssembly, ExportableAssemblyMethod.WBI0T1),
+ ExportableSectionAssemblyResultFactory.CreateExportableSectionAssemblyResult(combinedAssembly, ExportableAssemblyMethod.WBI0A1)));
+ }
+
+ return exportableResults;
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Integration/src/Riskeer.Integration.IO/Factories/ExportableHeightStructuresFailureMechanismFactory.cs
===================================================================
diff -u
--- Ringtoets/Integration/src/Riskeer.Integration.IO/Factories/ExportableHeightStructuresFailureMechanismFactory.cs (revision 0)
+++ Ringtoets/Integration/src/Riskeer.Integration.IO/Factories/ExportableHeightStructuresFailureMechanismFactory.cs (revision 457970572d405d707ca5a96836d6a48babffc3a7)
@@ -0,0 +1,134 @@
+// Copyright (C) Stichting Deltares 2018. 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 Ringtoets.Common.Data.AssessmentSection;
+using Ringtoets.Common.Data.Exceptions;
+using Ringtoets.HeightStructures.Data;
+using Riskeer.AssemblyTool.Data;
+using Riskeer.Integration.IO.Assembly;
+using Riskeer.Integration.IO.Helpers;
+
+namespace Riskeer.Integration.IO.Factories
+{
+ ///
+ /// Factory to create instances of
+ /// with assembly results for height structures.
+ ///
+ public static class ExportableHeightStructuresFailureMechanismFactory
+ {
+ private const ExportableFailureMechanismType failureMechanismCode = ExportableFailureMechanismType.HTKW;
+ private const ExportableFailureMechanismGroup failureMechanismGroup = ExportableFailureMechanismGroup.Group1;
+ private const ExportableAssemblyMethod failureMechanismAssemblyMethod = ExportableAssemblyMethod.WBI1B1;
+
+ ///
+ /// Creates an
+ /// with assembly results based on the input parameters.
+ ///
+ /// The to create an
+ /// for.
+ /// The assessment section the failure mechanism belongs to.
+ /// An with assembly results.
+ /// Thrown when any parameter is null.
+ /// Thrown when assembly results cannot be created.
+ public static ExportableFailureMechanism CreateExportableFailureMechanism(
+ HeightStructuresFailureMechanism failureMechanism,
+ IAssessmentSection assessmentSection)
+ {
+ if (failureMechanism == null)
+ {
+ throw new ArgumentNullException(nameof(failureMechanism));
+ }
+
+ if (assessmentSection == null)
+ {
+ throw new ArgumentNullException(nameof(assessmentSection));
+ }
+
+ if (!failureMechanism.IsRelevant)
+ {
+ return ExportableFailureMechanismFactory.CreateDefaultExportableFailureMechanismWithProbability(assessmentSection,
+ failureMechanismCode,
+ failureMechanismGroup,
+ failureMechanismAssemblyMethod);
+ }
+
+ FailureMechanismAssembly failureMechanismAssembly = HeightStructuresFailureMechanismAssemblyFactory.AssembleFailureMechanism(failureMechanism, assessmentSection, false);
+
+ return new ExportableFailureMechanism(
+ new ExportableFailureMechanismAssemblyResultWithProbability(failureMechanismAssemblyMethod,
+ failureMechanismAssembly.Group,
+ failureMechanismAssembly.Probability),
+ CreateExportableFailureMechanismSectionResults(failureMechanism, assessmentSection),
+ failureMechanismCode,
+ failureMechanismGroup);
+ }
+
+ ///
+ /// Creates a collection of
+ /// with assembly results based on .
+ ///
+ /// The to create a collection of
+ /// for.
+ /// The assessment section the failure mechanism belongs to.
+ /// A collection of .
+ /// Thrown when assembly results cannot be created.
+ private static IEnumerable CreateExportableFailureMechanismSectionResults(
+ HeightStructuresFailureMechanism failureMechanism,
+ IAssessmentSection assessmentSection)
+ {
+ IDictionary failureMechanismSectionsLookup =
+ ExportableFailureMechanismSectionHelper.CreateFailureMechanismSectionResultLookup(failureMechanism.SectionResults);
+
+ var exportableResults = new List();
+ foreach (KeyValuePair failureMechanismSectionPair in failureMechanismSectionsLookup)
+ {
+ HeightStructuresFailureMechanismSectionResult failureMechanismSectionResult = failureMechanismSectionPair.Key;
+
+ FailureMechanismSectionAssembly simpleAssembly =
+ HeightStructuresFailureMechanismAssemblyFactory.AssembleSimpleAssessment(failureMechanismSectionResult);
+ FailureMechanismSectionAssembly detailedAssembly =
+ HeightStructuresFailureMechanismAssemblyFactory.AssembleDetailedAssessment(failureMechanismSectionResult,
+ failureMechanism,
+ assessmentSection);
+ FailureMechanismSectionAssembly tailorMadeAssembly =
+ HeightStructuresFailureMechanismAssemblyFactory.AssembleTailorMadeAssessment(failureMechanismSectionResult,
+ failureMechanism,
+ assessmentSection);
+ FailureMechanismSectionAssembly combinedAssembly =
+ HeightStructuresFailureMechanismAssemblyFactory.AssembleCombinedAssessment(failureMechanismSectionResult,
+ failureMechanism,
+ assessmentSection);
+
+ exportableResults.Add(
+ new ExportableAggregatedFailureMechanismSectionAssemblyResultWithProbability(
+ failureMechanismSectionPair.Value,
+ ExportableSectionAssemblyResultFactory.CreateExportableSectionAssemblyResultWithProbability(simpleAssembly, ExportableAssemblyMethod.WBI0E1),
+ ExportableSectionAssemblyResultFactory.CreateExportableSectionAssemblyResultWithProbability(detailedAssembly, ExportableAssemblyMethod.WBI0G3),
+ ExportableSectionAssemblyResultFactory.CreateExportableSectionAssemblyResultWithProbability(tailorMadeAssembly, ExportableAssemblyMethod.WBI0T3),
+ ExportableSectionAssemblyResultFactory.CreateExportableSectionAssemblyResultWithProbability(combinedAssembly, ExportableAssemblyMethod.WBI0A1)));
+ }
+
+ return exportableResults;
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Integration/src/Riskeer.Integration.IO/Factories/ExportableMacroStabilityInwardsFailureMechanismFactory.cs
===================================================================
diff -u
--- Ringtoets/Integration/src/Riskeer.Integration.IO/Factories/ExportableMacroStabilityInwardsFailureMechanismFactory.cs (revision 0)
+++ Ringtoets/Integration/src/Riskeer.Integration.IO/Factories/ExportableMacroStabilityInwardsFailureMechanismFactory.cs (revision 457970572d405d707ca5a96836d6a48babffc3a7)
@@ -0,0 +1,140 @@
+// Copyright (C) Stichting Deltares 2018. 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 Ringtoets.Common.Data.AssessmentSection;
+using Ringtoets.Common.Data.Exceptions;
+using Ringtoets.MacroStabilityInwards.Data;
+using Riskeer.AssemblyTool.Data;
+using Riskeer.Integration.IO.Assembly;
+using Riskeer.Integration.IO.Helpers;
+
+namespace Riskeer.Integration.IO.Factories
+{
+ ///
+ /// Factory to create instances of
+ /// with assembly results for macro stability inwards.
+ ///
+ public static class ExportableMacroStabilityInwardsFailureMechanismFactory
+ {
+ private const ExportableFailureMechanismGroup failureMechanismGroup = ExportableFailureMechanismGroup.Group2;
+ private const ExportableFailureMechanismType failureMechanismCode = ExportableFailureMechanismType.STBI;
+ private const ExportableAssemblyMethod failureMechanismAssemblyMethod = ExportableAssemblyMethod.WBI1B1;
+
+ ///
+ /// Creates an
+ /// with assembly results based on the input parameters.
+ ///
+ /// The to create an
+ /// for.
+ /// The assessment section the failure mechanism belongs to.
+ /// An with assembly results.
+ /// Thrown when any parameter is null.
+ /// Thrown when assembly results cannot be created.
+ public static ExportableFailureMechanism CreateExportableFailureMechanism(
+ MacroStabilityInwardsFailureMechanism failureMechanism,
+ IAssessmentSection assessmentSection)
+ {
+ if (failureMechanism == null)
+ {
+ throw new ArgumentNullException(nameof(failureMechanism));
+ }
+
+ if (assessmentSection == null)
+ {
+ throw new ArgumentNullException(nameof(assessmentSection));
+ }
+
+ if (!failureMechanism.IsRelevant)
+ {
+ return ExportableFailureMechanismFactory.CreateDefaultExportableFailureMechanismWithProbability(assessmentSection,
+ failureMechanismCode,
+ failureMechanismGroup,
+ failureMechanismAssemblyMethod);
+ }
+
+ FailureMechanismAssembly failureMechanismAssembly = MacroStabilityInwardsFailureMechanismAssemblyFactory.AssembleFailureMechanism(failureMechanism, assessmentSection, false);
+
+ return new ExportableFailureMechanism(
+ new ExportableFailureMechanismAssemblyResultWithProbability(failureMechanismAssemblyMethod,
+ failureMechanismAssembly.Group,
+ failureMechanismAssembly.Probability),
+ CreateExportableFailureMechanismSectionResults(failureMechanism, assessmentSection),
+ failureMechanismCode,
+ failureMechanismGroup);
+ }
+
+ ///
+ /// Creates a collection of
+ /// with assembly results based on .
+ ///
+ /// The to create a collection
+ /// of for.
+ /// The assessment section the failure mechanism belongs to.
+ /// A collection of .
+ /// Thrown when assembly results cannot be created.
+ private static IEnumerable CreateExportableFailureMechanismSectionResults(
+ MacroStabilityInwardsFailureMechanism failureMechanism,
+ IAssessmentSection assessmentSection)
+ {
+ IDictionary failureMechanismSectionsLookup =
+ ExportableFailureMechanismSectionHelper.CreateFailureMechanismSectionResultLookup(failureMechanism.SectionResults);
+
+ IEnumerable macroStabilityInwardsCalculationScenarios =
+ failureMechanism.Calculations.Cast();
+
+ var exportableResults = new List();
+ foreach (KeyValuePair failureMechanismSectionPair in failureMechanismSectionsLookup)
+ {
+ MacroStabilityInwardsFailureMechanismSectionResult failureMechanismSectionResult = failureMechanismSectionPair.Key;
+
+ FailureMechanismSectionAssembly simpleAssembly =
+ MacroStabilityInwardsFailureMechanismAssemblyFactory.AssembleSimpleAssessment(failureMechanismSectionResult);
+ FailureMechanismSectionAssembly detailedAssembly =
+ MacroStabilityInwardsFailureMechanismAssemblyFactory.AssembleDetailedAssessment(failureMechanismSectionResult,
+ macroStabilityInwardsCalculationScenarios,
+ failureMechanism,
+ assessmentSection);
+ FailureMechanismSectionAssembly tailorMadeAssembly =
+ MacroStabilityInwardsFailureMechanismAssemblyFactory.AssembleTailorMadeAssessment(failureMechanismSectionResult,
+ failureMechanism,
+ assessmentSection);
+ FailureMechanismSectionAssembly combinedAssembly =
+ MacroStabilityInwardsFailureMechanismAssemblyFactory.AssembleCombinedAssessment(failureMechanismSectionResult,
+ macroStabilityInwardsCalculationScenarios,
+ failureMechanism,
+ assessmentSection);
+
+ exportableResults.Add(
+ new ExportableAggregatedFailureMechanismSectionAssemblyResultWithProbability(
+ failureMechanismSectionPair.Value,
+ ExportableSectionAssemblyResultFactory.CreateExportableSectionAssemblyResultWithProbability(simpleAssembly, ExportableAssemblyMethod.WBI0E1),
+ ExportableSectionAssemblyResultFactory.CreateExportableSectionAssemblyResultWithProbability(detailedAssembly, ExportableAssemblyMethod.WBI0G5),
+ ExportableSectionAssemblyResultFactory.CreateExportableSectionAssemblyResultWithProbability(tailorMadeAssembly, ExportableAssemblyMethod.WBI0T5),
+ ExportableSectionAssemblyResultFactory.CreateExportableSectionAssemblyResultWithProbability(combinedAssembly, ExportableAssemblyMethod.WBI0A1)));
+ }
+
+ return exportableResults;
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Integration/src/Riskeer.Integration.IO/Factories/ExportableMacroStabilityOutwardsFailureMechanismFactory.cs
===================================================================
diff -u
--- Ringtoets/Integration/src/Riskeer.Integration.IO/Factories/ExportableMacroStabilityOutwardsFailureMechanismFactory.cs (revision 0)
+++ Ringtoets/Integration/src/Riskeer.Integration.IO/Factories/ExportableMacroStabilityOutwardsFailureMechanismFactory.cs (revision 457970572d405d707ca5a96836d6a48babffc3a7)
@@ -0,0 +1,135 @@
+// Copyright (C) Stichting Deltares 2018. 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 Ringtoets.Common.Data.AssessmentSection;
+using Ringtoets.Common.Data.Exceptions;
+using Riskeer.AssemblyTool.Data;
+using Riskeer.Integration.Data.StandAlone;
+using Riskeer.Integration.Data.StandAlone.AssemblyFactories;
+using Riskeer.Integration.Data.StandAlone.SectionResults;
+using Riskeer.Integration.IO.Assembly;
+using Riskeer.Integration.IO.Helpers;
+
+namespace Riskeer.Integration.IO.Factories
+{
+ ///
+ /// Factory to create instances of
+ /// with assembly results for macro stability outwards.
+ ///
+ public static class ExportableMacroStabilityOutwardsFailureMechanismFactory
+ {
+ private const ExportableFailureMechanismGroup failureMechanismGroup = ExportableFailureMechanismGroup.Group4;
+ private const ExportableFailureMechanismType failureMechanismCode = ExportableFailureMechanismType.STBU;
+ private const ExportableAssemblyMethod failureMechanismAssemblyMethod = ExportableAssemblyMethod.WBI1A1;
+
+ ///
+ /// Creates an
+ /// with assembly results based on the input parameters.
+ ///
+ /// The to create an
+ /// for.
+ /// The assessment section the failure mechanism belongs to.
+ /// An with assembly results.
+ /// Thrown when any parameter is null.
+ /// Thrown when assembly results cannot be created.
+ public static ExportableFailureMechanism CreateExportableFailureMechanism(
+ MacroStabilityOutwardsFailureMechanism failureMechanism,
+ IAssessmentSection assessmentSection)
+ {
+ if (failureMechanism == null)
+ {
+ throw new ArgumentNullException(nameof(failureMechanism));
+ }
+
+ if (assessmentSection == null)
+ {
+ throw new ArgumentNullException(nameof(assessmentSection));
+ }
+
+ if (!failureMechanism.IsRelevant)
+ {
+ return ExportableFailureMechanismFactory.CreateDefaultExportableFailureMechanismWithoutProbability(assessmentSection,
+ failureMechanismCode,
+ failureMechanismGroup,
+ failureMechanismAssemblyMethod);
+ }
+
+ FailureMechanismAssemblyCategoryGroup failureMechanismAssembly = MacroStabilityOutwardsFailureMechanismAssemblyFactory.AssembleFailureMechanism(failureMechanism,
+ assessmentSection,
+ false);
+ return new ExportableFailureMechanism(
+ new ExportableFailureMechanismAssemblyResult(failureMechanismAssemblyMethod, failureMechanismAssembly),
+ CreateExportableFailureMechanismSectionResults(failureMechanism, assessmentSection),
+ failureMechanismCode,
+ failureMechanismGroup);
+ }
+
+ ///
+ /// Creates a collection of
+ /// with assembly results based on .
+ ///
+ /// The to create a collection of
+ /// for.
+ /// The assessment section the failure mechanism belongs to.
+ /// A collection of .
+ /// Thrown when assembly results cannot be created.
+ private static IEnumerable CreateExportableFailureMechanismSectionResults(
+ MacroStabilityOutwardsFailureMechanism failureMechanism,
+ IAssessmentSection assessmentSection)
+ {
+ IDictionary failureMechanismSectionsLookup =
+ ExportableFailureMechanismSectionHelper.CreateFailureMechanismSectionResultLookup(failureMechanism.SectionResults);
+
+ var exportableResults = new List();
+ foreach (KeyValuePair failureMechanismSectionPair in failureMechanismSectionsLookup)
+ {
+ MacroStabilityOutwardsFailureMechanismSectionResult failureMechanismSectionResult = failureMechanismSectionPair.Key;
+
+ FailureMechanismSectionAssemblyCategoryGroup simpleAssembly =
+ MacroStabilityOutwardsFailureMechanismAssemblyFactory.AssembleSimpleAssessment(failureMechanismSectionResult);
+ FailureMechanismSectionAssemblyCategoryGroup detailedAssembly =
+ MacroStabilityOutwardsFailureMechanismAssemblyFactory.AssembleDetailedAssessment(failureMechanismSectionResult,
+ failureMechanism,
+ assessmentSection);
+ FailureMechanismSectionAssemblyCategoryGroup tailorMadeAssembly =
+ MacroStabilityOutwardsFailureMechanismAssemblyFactory.AssembleTailorMadeAssessment(failureMechanismSectionResult,
+ failureMechanism,
+ assessmentSection);
+ FailureMechanismSectionAssemblyCategoryGroup combinedAssembly =
+ MacroStabilityOutwardsFailureMechanismAssemblyFactory.AssembleCombinedAssessment(failureMechanismSectionResult,
+ failureMechanism,
+ assessmentSection);
+
+ exportableResults.Add(
+ new ExportableAggregatedFailureMechanismSectionAssemblyResult(
+ failureMechanismSectionPair.Value,
+ ExportableSectionAssemblyResultFactory.CreateExportableSectionAssemblyResult(simpleAssembly, ExportableAssemblyMethod.WBI0E1),
+ ExportableSectionAssemblyResultFactory.CreateExportableSectionAssemblyResult(detailedAssembly, ExportableAssemblyMethod.WBI0G3),
+ ExportableSectionAssemblyResultFactory.CreateExportableSectionAssemblyResult(tailorMadeAssembly, ExportableAssemblyMethod.WBI0T7),
+ ExportableSectionAssemblyResultFactory.CreateExportableSectionAssemblyResult(combinedAssembly, ExportableAssemblyMethod.WBI0A1)));
+ }
+
+ return exportableResults;
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Integration/src/Riskeer.Integration.IO/Factories/ExportableMicrostabilityFailureMechanismFactory.cs
===================================================================
diff -u
--- Ringtoets/Integration/src/Riskeer.Integration.IO/Factories/ExportableMicrostabilityFailureMechanismFactory.cs (revision 0)
+++ Ringtoets/Integration/src/Riskeer.Integration.IO/Factories/ExportableMicrostabilityFailureMechanismFactory.cs (revision 457970572d405d707ca5a96836d6a48babffc3a7)
@@ -0,0 +1,126 @@
+// Copyright (C) Stichting Deltares 2018. 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 Ringtoets.Common.Data.AssessmentSection;
+using Ringtoets.Common.Data.Exceptions;
+using Riskeer.AssemblyTool.Data;
+using Riskeer.Integration.Data.StandAlone;
+using Riskeer.Integration.Data.StandAlone.AssemblyFactories;
+using Riskeer.Integration.Data.StandAlone.SectionResults;
+using Riskeer.Integration.IO.Assembly;
+using Riskeer.Integration.IO.Helpers;
+
+namespace Riskeer.Integration.IO.Factories
+{
+ ///
+ /// Factory to create instances of
+ /// with assembly results for microstability.
+ ///
+ public static class ExportableMicrostabilityFailureMechanismFactory
+ {
+ private const ExportableFailureMechanismType failureMechanismCode = ExportableFailureMechanismType.STMI;
+ private const ExportableFailureMechanismGroup failureMechanismGroup = ExportableFailureMechanismGroup.Group4;
+ private const ExportableAssemblyMethod failureMechanismAssemblyMethod = ExportableAssemblyMethod.WBI1A1;
+
+ ///
+ /// Creates an
+ /// with assembly results based on the input parameters.
+ ///
+ /// The to create an
+ /// for.
+ /// The assessment section the failure mechanism belongs to.
+ /// An with assembly results.
+ /// Thrown when any parameter is null.
+ /// Thrown when assembly results cannot be created.
+ public static ExportableFailureMechanism CreateExportableFailureMechanism(
+ MicrostabilityFailureMechanism failureMechanism,
+ IAssessmentSection assessmentSection)
+ {
+ if (failureMechanism == null)
+ {
+ throw new ArgumentNullException(nameof(failureMechanism));
+ }
+
+ if (assessmentSection == null)
+ {
+ throw new ArgumentNullException(nameof(assessmentSection));
+ }
+
+ if (!failureMechanism.IsRelevant)
+ {
+ return ExportableFailureMechanismFactory.CreateDefaultExportableFailureMechanismWithoutProbability(assessmentSection,
+ failureMechanismCode,
+ failureMechanismGroup,
+ failureMechanismAssemblyMethod);
+ }
+
+ FailureMechanismAssemblyCategoryGroup failureMechanismAssembly = MicrostabilityFailureMechanismAssemblyFactory.AssembleFailureMechanism(failureMechanism, false);
+
+ return new ExportableFailureMechanism(
+ new ExportableFailureMechanismAssemblyResult(failureMechanismAssemblyMethod, failureMechanismAssembly),
+ CreateFailureMechanismSectionResults(failureMechanism.SectionResults),
+ failureMechanismCode,
+ failureMechanismGroup);
+ }
+
+ ///
+ /// Creates a collection of
+ /// with assembly results based on .
+ ///
+ /// The collection of
+ /// to create a collection of for.
+ /// A collection of .
+ /// Thrown when assembly results cannot be created.
+ private static IEnumerable CreateFailureMechanismSectionResults(
+ IEnumerable failureMechanismSectionResults)
+ {
+ IDictionary failureMechanismSectionsLookup =
+ ExportableFailureMechanismSectionHelper.CreateFailureMechanismSectionResultLookup(failureMechanismSectionResults);
+
+ var exportableResults = new List();
+ foreach (KeyValuePair failureMechanismSectionPair in failureMechanismSectionsLookup)
+ {
+ MicrostabilityFailureMechanismSectionResult failureMechanismSectionResult = failureMechanismSectionPair.Key;
+
+ FailureMechanismSectionAssemblyCategoryGroup simpleAssembly =
+ MicrostabilityFailureMechanismAssemblyFactory.AssembleSimpleAssessment(failureMechanismSectionResult);
+ FailureMechanismSectionAssemblyCategoryGroup detailedAssembly =
+ MicrostabilityFailureMechanismAssemblyFactory.AssembleDetailedAssessment(failureMechanismSectionResult);
+ FailureMechanismSectionAssemblyCategoryGroup tailorMadeAssembly =
+ MicrostabilityFailureMechanismAssemblyFactory.AssembleTailorMadeAssessment(failureMechanismSectionResult);
+ FailureMechanismSectionAssemblyCategoryGroup combinedAssembly =
+ MicrostabilityFailureMechanismAssemblyFactory.AssembleCombinedAssessment(failureMechanismSectionResult);
+
+ exportableResults.Add(
+ new ExportableAggregatedFailureMechanismSectionAssemblyResult(
+ failureMechanismSectionPair.Value,
+ ExportableSectionAssemblyResultFactory.CreateExportableSectionAssemblyResult(simpleAssembly, ExportableAssemblyMethod.WBI0E1),
+ ExportableSectionAssemblyResultFactory.CreateExportableSectionAssemblyResult(detailedAssembly, ExportableAssemblyMethod.WBI0G1),
+ ExportableSectionAssemblyResultFactory.CreateExportableSectionAssemblyResult(tailorMadeAssembly, ExportableAssemblyMethod.WBI0T1),
+ ExportableSectionAssemblyResultFactory.CreateExportableSectionAssemblyResult(combinedAssembly, ExportableAssemblyMethod.WBI0A1)));
+ }
+
+ return exportableResults;
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Integration/src/Riskeer.Integration.IO/Factories/ExportablePipingFailureMechanismFactory.cs
===================================================================
diff -u
--- Ringtoets/Integration/src/Riskeer.Integration.IO/Factories/ExportablePipingFailureMechanismFactory.cs (revision 0)
+++ Ringtoets/Integration/src/Riskeer.Integration.IO/Factories/ExportablePipingFailureMechanismFactory.cs (revision 457970572d405d707ca5a96836d6a48babffc3a7)
@@ -0,0 +1,139 @@
+// Copyright (C) Stichting Deltares 2018. 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 Ringtoets.Common.Data.AssessmentSection;
+using Ringtoets.Common.Data.Exceptions;
+using Ringtoets.Piping.Data;
+using Riskeer.AssemblyTool.Data;
+using Riskeer.Integration.IO.Assembly;
+using Riskeer.Integration.IO.Helpers;
+
+namespace Riskeer.Integration.IO.Factories
+{
+ ///
+ /// Factory to create instances of
+ /// with assembly results for piping.
+ ///
+ public static class ExportablePipingFailureMechanismFactory
+ {
+ private const ExportableFailureMechanismType failureMechanismCode = ExportableFailureMechanismType.STPH;
+ private const ExportableFailureMechanismGroup failureMechanismGroup = ExportableFailureMechanismGroup.Group2;
+ private const ExportableAssemblyMethod failureMechanismAssemblyMethod = ExportableAssemblyMethod.WBI1B1;
+
+ ///
+ /// Creates an
+ /// with assembly results based on the input parameters.
+ ///
+ /// The to create an
+ /// for.
+ /// The assessment section the failure mechanism belongs to.
+ /// An with assembly results.
+ /// Thrown when any parameter is null.
+ /// Thrown when assembly results cannot be created.
+ public static ExportableFailureMechanism CreateExportableFailureMechanism(
+ PipingFailureMechanism failureMechanism,
+ IAssessmentSection assessmentSection)
+ {
+ if (failureMechanism == null)
+ {
+ throw new ArgumentNullException(nameof(failureMechanism));
+ }
+
+ if (assessmentSection == null)
+ {
+ throw new ArgumentNullException(nameof(assessmentSection));
+ }
+
+ if (!failureMechanism.IsRelevant)
+ {
+ return ExportableFailureMechanismFactory.CreateDefaultExportableFailureMechanismWithProbability(assessmentSection,
+ failureMechanismCode,
+ failureMechanismGroup,
+ failureMechanismAssemblyMethod);
+ }
+
+ FailureMechanismAssembly failureMechanismAssembly = PipingFailureMechanismAssemblyFactory.AssembleFailureMechanism(failureMechanism, assessmentSection, false);
+
+ return new ExportableFailureMechanism(
+ new ExportableFailureMechanismAssemblyResultWithProbability(failureMechanismAssemblyMethod,
+ failureMechanismAssembly.Group,
+ failureMechanismAssembly.Probability),
+ CreateExportableFailureMechanismSectionResults(failureMechanism, assessmentSection),
+ failureMechanismCode,
+ failureMechanismGroup);
+ }
+
+ ///
+ /// Creates a collection of
+ /// with assembly results based on .
+ ///
+ /// The to create a
+ /// collection of for.
+ /// The assessment section the sections belong to.
+ /// A collection of .
+ /// Thrown when assembly results cannot be created.
+ private static IEnumerable CreateExportableFailureMechanismSectionResults(
+ PipingFailureMechanism failureMechanism,
+ IAssessmentSection assessmentSection)
+ {
+ IDictionary failureMechanismSectionsLookup =
+ ExportableFailureMechanismSectionHelper.CreateFailureMechanismSectionResultLookup(failureMechanism.SectionResults);
+
+ IEnumerable pipingCalculationScenarios = failureMechanism.Calculations.Cast();
+
+ var exportableResults = new List();
+ foreach (KeyValuePair failureMechanismSectionPair in failureMechanismSectionsLookup)
+ {
+ PipingFailureMechanismSectionResult failureMechanismSectionResult = failureMechanismSectionPair.Key;
+
+ FailureMechanismSectionAssembly simpleAssembly =
+ PipingFailureMechanismAssemblyFactory.AssembleSimpleAssessment(failureMechanismSectionResult);
+ FailureMechanismSectionAssembly detailedAssembly =
+ PipingFailureMechanismAssemblyFactory.AssembleDetailedAssessment(failureMechanismSectionResult,
+ pipingCalculationScenarios,
+ failureMechanism,
+ assessmentSection);
+ FailureMechanismSectionAssembly tailorMadeAssembly =
+ PipingFailureMechanismAssemblyFactory.AssembleTailorMadeAssessment(failureMechanismSectionResult,
+ failureMechanism,
+ assessmentSection);
+ FailureMechanismSectionAssembly combinedAssembly =
+ PipingFailureMechanismAssemblyFactory.AssembleCombinedAssessment(failureMechanismSectionResult,
+ pipingCalculationScenarios,
+ failureMechanism,
+ assessmentSection);
+
+ exportableResults.Add(
+ new ExportableAggregatedFailureMechanismSectionAssemblyResultWithProbability(
+ failureMechanismSectionPair.Value,
+ ExportableSectionAssemblyResultFactory.CreateExportableSectionAssemblyResultWithProbability(simpleAssembly, ExportableAssemblyMethod.WBI0E1),
+ ExportableSectionAssemblyResultFactory.CreateExportableSectionAssemblyResultWithProbability(detailedAssembly, ExportableAssemblyMethod.WBI0G5),
+ ExportableSectionAssemblyResultFactory.CreateExportableSectionAssemblyResultWithProbability(tailorMadeAssembly, ExportableAssemblyMethod.WBI0T5),
+ ExportableSectionAssemblyResultFactory.CreateExportableSectionAssemblyResultWithProbability(combinedAssembly, ExportableAssemblyMethod.WBI0A1)));
+ }
+
+ return exportableResults;
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Integration/src/Riskeer.Integration.IO/Factories/ExportablePipingStructureFailureMechanismFactory.cs
===================================================================
diff -u
--- Ringtoets/Integration/src/Riskeer.Integration.IO/Factories/ExportablePipingStructureFailureMechanismFactory.cs (revision 0)
+++ Ringtoets/Integration/src/Riskeer.Integration.IO/Factories/ExportablePipingStructureFailureMechanismFactory.cs (revision 457970572d405d707ca5a96836d6a48babffc3a7)
@@ -0,0 +1,126 @@
+// Copyright (C) Stichting Deltares 2018. 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 Ringtoets.Common.Data.AssessmentSection;
+using Ringtoets.Common.Data.Exceptions;
+using Riskeer.AssemblyTool.Data;
+using Riskeer.Integration.Data.StandAlone;
+using Riskeer.Integration.Data.StandAlone.AssemblyFactories;
+using Riskeer.Integration.Data.StandAlone.SectionResults;
+using Riskeer.Integration.IO.Assembly;
+using Riskeer.Integration.IO.Helpers;
+
+namespace Riskeer.Integration.IO.Factories
+{
+ ///
+ /// Factory to create instances of
+ /// with assembly results for piping structure.
+ ///
+ public static class ExportablePipingStructureFailureMechanismFactory
+ {
+ private const ExportableFailureMechanismType failureMechanismCode = ExportableFailureMechanismType.PKW;
+ private const ExportableFailureMechanismGroup failureMechanismGroup = ExportableFailureMechanismGroup.Group4;
+ private const ExportableAssemblyMethod failureMechanismAssemblyMethod = ExportableAssemblyMethod.WBI1A1;
+
+ ///
+ /// Creates an
+ /// with assembly results based on the input parameters.
+ ///
+ /// The to create an
+ /// for.
+ /// The assessment section the failure mechanism belongs to.
+ /// An with assembly results.
+ /// Thrown when any parameter is null.
+ /// Thrown when assembly results cannot be created.
+ public static ExportableFailureMechanism CreateExportableFailureMechanism(
+ PipingStructureFailureMechanism failureMechanism,
+ IAssessmentSection assessmentSection)
+ {
+ if (failureMechanism == null)
+ {
+ throw new ArgumentNullException(nameof(failureMechanism));
+ }
+
+ if (assessmentSection == null)
+ {
+ throw new ArgumentNullException(nameof(assessmentSection));
+ }
+
+ if (!failureMechanism.IsRelevant)
+ {
+ return ExportableFailureMechanismFactory.CreateDefaultExportableFailureMechanismWithoutProbability(assessmentSection,
+ failureMechanismCode,
+ failureMechanismGroup,
+ failureMechanismAssemblyMethod);
+ }
+
+ FailureMechanismAssemblyCategoryGroup failureMechanismAssembly = PipingStructureFailureMechanismAssemblyFactory.AssembleFailureMechanism(failureMechanism, false);
+
+ return new ExportableFailureMechanism(
+ new ExportableFailureMechanismAssemblyResult(failureMechanismAssemblyMethod, failureMechanismAssembly),
+ CreateFailureMechanismSectionResults(failureMechanism.SectionResults),
+ failureMechanismCode,
+ failureMechanismGroup);
+ }
+
+ ///
+ /// Creates a collection of
+ /// with assembly results based on the sections in .
+ ///
+ /// The collection of
+ /// to create a collection of for.
+ /// A collection of .
+ /// Thrown when assembly results cannot be created.
+ private static IEnumerable CreateFailureMechanismSectionResults(
+ IEnumerable failureMechanismSectionResults)
+ {
+ IDictionary failureMechanismSectionsLookup =
+ ExportableFailureMechanismSectionHelper.CreateFailureMechanismSectionResultLookup(failureMechanismSectionResults);
+
+ var exportableResults = new List();
+ foreach (KeyValuePair failureMechanismSectionPair in failureMechanismSectionsLookup)
+ {
+ PipingStructureFailureMechanismSectionResult failureMechanismSectionResult = failureMechanismSectionPair.Key;
+
+ FailureMechanismSectionAssemblyCategoryGroup simpleAssembly =
+ PipingStructureFailureMechanismAssemblyFactory.AssembleSimpleAssessment(failureMechanismSectionResult);
+ FailureMechanismSectionAssemblyCategoryGroup detailedAssembly =
+ PipingStructureFailureMechanismAssemblyFactory.AssembleDetailedAssessment(failureMechanismSectionResult);
+ FailureMechanismSectionAssemblyCategoryGroup tailorMadeAssembly =
+ PipingStructureFailureMechanismAssemblyFactory.AssembleTailorMadeAssessment(failureMechanismSectionResult);
+ FailureMechanismSectionAssemblyCategoryGroup combinedAssembly =
+ PipingStructureFailureMechanismAssemblyFactory.AssembleCombinedAssessment(failureMechanismSectionResult);
+
+ exportableResults.Add(
+ new ExportableAggregatedFailureMechanismSectionAssemblyResult(
+ failureMechanismSectionPair.Value,
+ ExportableSectionAssemblyResultFactory.CreateExportableSectionAssemblyResult(simpleAssembly, ExportableAssemblyMethod.WBI0E1),
+ ExportableSectionAssemblyResultFactory.CreateExportableSectionAssemblyResult(detailedAssembly, ExportableAssemblyMethod.WBI0G1),
+ ExportableSectionAssemblyResultFactory.CreateExportableSectionAssemblyResult(tailorMadeAssembly, ExportableAssemblyMethod.WBI0T1),
+ ExportableSectionAssemblyResultFactory.CreateExportableSectionAssemblyResult(combinedAssembly, ExportableAssemblyMethod.WBI0A1)));
+ }
+
+ return exportableResults;
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Integration/src/Riskeer.Integration.IO/Factories/ExportableSectionAssemblyResultFactory.cs
===================================================================
diff -u
--- Ringtoets/Integration/src/Riskeer.Integration.IO/Factories/ExportableSectionAssemblyResultFactory.cs (revision 0)
+++ Ringtoets/Integration/src/Riskeer.Integration.IO/Factories/ExportableSectionAssemblyResultFactory.cs (revision 457970572d405d707ca5a96836d6a48babffc3a7)
@@ -0,0 +1,74 @@
+// Copyright (C) Stichting Deltares 2018. 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 Riskeer.AssemblyTool.Data;
+using Riskeer.Integration.IO.Assembly;
+
+namespace Riskeer.Integration.IO.Factories
+{
+ ///
+ /// Factory to create instances of .
+ ///
+ public static class ExportableSectionAssemblyResultFactory
+ {
+ ///
+ /// Creates an instance of
+ /// based on the .
+ ///
+ /// The assembly result of this section.
+ /// The assembly method
+ /// which was used to generate the result.
+ /// An .
+ /// Thrown when
+ /// is null.
+ public static ExportableSectionAssemblyResult CreateExportableSectionAssemblyResult(
+ FailureMechanismSectionAssemblyCategoryGroup failureMechanismSectionAssembly,
+ ExportableAssemblyMethod assemblyMethod)
+ {
+ return new ExportableSectionAssemblyResult(assemblyMethod, failureMechanismSectionAssembly);
+ }
+
+ ///
+ /// Creates an instance of
+ /// based on the .
+ ///
+ /// The assembly result of this section.
+ /// The assembly method
+ /// which was used to generate the result.
+ /// An .
+ /// Thrown when
+ /// is null.
+ public static ExportableSectionAssemblyResultWithProbability CreateExportableSectionAssemblyResultWithProbability(
+ FailureMechanismSectionAssembly failureMechanismSectionAssembly,
+ ExportableAssemblyMethod assemblyMethod)
+ {
+ if (failureMechanismSectionAssembly == null)
+ {
+ throw new ArgumentNullException(nameof(failureMechanismSectionAssembly));
+ }
+
+ return new ExportableSectionAssemblyResultWithProbability(assemblyMethod,
+ failureMechanismSectionAssembly.Group,
+ failureMechanismSectionAssembly.Probability);
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Integration/src/Riskeer.Integration.IO/Factories/ExportableStabilityPointStructuresFailureMechanismFactory.cs
===================================================================
diff -u
--- Ringtoets/Integration/src/Riskeer.Integration.IO/Factories/ExportableStabilityPointStructuresFailureMechanismFactory.cs (revision 0)
+++ Ringtoets/Integration/src/Riskeer.Integration.IO/Factories/ExportableStabilityPointStructuresFailureMechanismFactory.cs (revision 457970572d405d707ca5a96836d6a48babffc3a7)
@@ -0,0 +1,134 @@
+// Copyright (C) Stichting Deltares 2018. 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 Ringtoets.Common.Data.AssessmentSection;
+using Ringtoets.Common.Data.Exceptions;
+using Ringtoets.StabilityPointStructures.Data;
+using Riskeer.AssemblyTool.Data;
+using Riskeer.Integration.IO.Assembly;
+using Riskeer.Integration.IO.Helpers;
+
+namespace Riskeer.Integration.IO.Factories
+{
+ ///
+ /// Factory to create instances of
+ /// with assembly results for stability point structures.
+ ///
+ public static class ExportableStabilityPointStructuresFailureMechanismFactory
+ {
+ private const ExportableFailureMechanismType failureMechanismCode = ExportableFailureMechanismType.STKWp;
+ private const ExportableFailureMechanismGroup failureMechanismGroup = ExportableFailureMechanismGroup.Group1;
+ private const ExportableAssemblyMethod failureMechanismAssemblyMethod = ExportableAssemblyMethod.WBI1B1;
+
+ ///
+ /// Creates an
+ /// with assembly results based on the input parameters.
+ ///
+ /// The to create an
+ /// for.
+ /// The assessment section the failure mechanism belongs to.
+ /// An with assembly results.
+ /// Thrown when any parameter is null.
+ /// Thrown when assembly results cannot be created.
+ public static ExportableFailureMechanism CreateExportableFailureMechanism(
+ StabilityPointStructuresFailureMechanism failureMechanism,
+ IAssessmentSection assessmentSection)
+ {
+ if (failureMechanism == null)
+ {
+ throw new ArgumentNullException(nameof(failureMechanism));
+ }
+
+ if (assessmentSection == null)
+ {
+ throw new ArgumentNullException(nameof(assessmentSection));
+ }
+
+ if (!failureMechanism.IsRelevant)
+ {
+ return ExportableFailureMechanismFactory.CreateDefaultExportableFailureMechanismWithProbability(assessmentSection,
+ failureMechanismCode,
+ failureMechanismGroup,
+ failureMechanismAssemblyMethod);
+ }
+
+ FailureMechanismAssembly failureMechanismAssembly = StabilityPointStructuresFailureMechanismAssemblyFactory.AssembleFailureMechanism(failureMechanism, assessmentSection, false);
+
+ return new ExportableFailureMechanism(
+ new ExportableFailureMechanismAssemblyResultWithProbability(failureMechanismAssemblyMethod,
+ failureMechanismAssembly.Group,
+ failureMechanismAssembly.Probability),
+ CreateExportableFailureMechanismSectionResults(failureMechanism, assessmentSection),
+ failureMechanismCode,
+ failureMechanismGroup);
+ }
+
+ ///
+ /// Creates a collection of
+ /// with assembly results based on .
+ ///
+ /// The
+ /// to create a collection of for.
+ /// The assessment section the failure mechanism belongs to.
+ /// A collection of .
+ /// Thrown when assembly results cannot be created.
+ private static IEnumerable CreateExportableFailureMechanismSectionResults(
+ StabilityPointStructuresFailureMechanism failureMechanism,
+ IAssessmentSection assessmentSection)
+ {
+ IDictionary failureMechanismSectionsLookup =
+ ExportableFailureMechanismSectionHelper.CreateFailureMechanismSectionResultLookup(failureMechanism.SectionResults);
+
+ var exportableResults = new List();
+ foreach (KeyValuePair failureMechanismSectionPair in failureMechanismSectionsLookup)
+ {
+ StabilityPointStructuresFailureMechanismSectionResult failureMechanismSectionResult = failureMechanismSectionPair.Key;
+
+ FailureMechanismSectionAssembly simpleAssembly =
+ StabilityPointStructuresFailureMechanismAssemblyFactory.AssembleSimpleAssessment(failureMechanismSectionResult);
+ FailureMechanismSectionAssembly detailedAssembly =
+ StabilityPointStructuresFailureMechanismAssemblyFactory.AssembleDetailedAssessment(failureMechanismSectionResult,
+ failureMechanism,
+ assessmentSection);
+ FailureMechanismSectionAssembly tailorMadeAssembly =
+ StabilityPointStructuresFailureMechanismAssemblyFactory.AssembleTailorMadeAssessment(failureMechanismSectionResult,
+ failureMechanism,
+ assessmentSection);
+ FailureMechanismSectionAssembly combinedAssembly =
+ StabilityPointStructuresFailureMechanismAssemblyFactory.AssembleCombinedAssessment(failureMechanismSectionResult,
+ failureMechanism,
+ assessmentSection);
+
+ exportableResults.Add(
+ new ExportableAggregatedFailureMechanismSectionAssemblyResultWithProbability(
+ failureMechanismSectionPair.Value,
+ ExportableSectionAssemblyResultFactory.CreateExportableSectionAssemblyResultWithProbability(simpleAssembly, ExportableAssemblyMethod.WBI0E3),
+ ExportableSectionAssemblyResultFactory.CreateExportableSectionAssemblyResultWithProbability(detailedAssembly, ExportableAssemblyMethod.WBI0G3),
+ ExportableSectionAssemblyResultFactory.CreateExportableSectionAssemblyResultWithProbability(tailorMadeAssembly, ExportableAssemblyMethod.WBI0T3),
+ ExportableSectionAssemblyResultFactory.CreateExportableSectionAssemblyResultWithProbability(combinedAssembly, ExportableAssemblyMethod.WBI0A1)));
+ }
+
+ return exportableResults;
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Integration/src/Riskeer.Integration.IO/Factories/ExportableStabilityStoneCoverFailureMechanismFactory.cs
===================================================================
diff -u
--- Ringtoets/Integration/src/Riskeer.Integration.IO/Factories/ExportableStabilityStoneCoverFailureMechanismFactory.cs (revision 0)
+++ Ringtoets/Integration/src/Riskeer.Integration.IO/Factories/ExportableStabilityStoneCoverFailureMechanismFactory.cs (revision 457970572d405d707ca5a96836d6a48babffc3a7)
@@ -0,0 +1,124 @@
+// Copyright (C) Stichting Deltares 2018. 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 Ringtoets.Common.Data.AssessmentSection;
+using Ringtoets.Common.Data.Exceptions;
+using Ringtoets.StabilityStoneCover.Data;
+using Riskeer.AssemblyTool.Data;
+using Riskeer.Integration.IO.Assembly;
+using Riskeer.Integration.IO.Helpers;
+
+namespace Riskeer.Integration.IO.Factories
+{
+ ///
+ /// Factory to create instances of
+ /// with assembly results for stability stone cover.
+ ///
+ public static class ExportableStabilityStoneCoverFailureMechanismFactory
+ {
+ private const ExportableFailureMechanismType failureMechanismCode = ExportableFailureMechanismType.ZST;
+ private const ExportableFailureMechanismGroup failureMechanismGroup = ExportableFailureMechanismGroup.Group3;
+ private const ExportableAssemblyMethod failureMechanismAssemblyMethod = ExportableAssemblyMethod.WBI1A1;
+
+ ///
+ /// Creates an
+ /// with assembly results based on the input parameters.
+ ///
+ /// The to create an
+ /// for.
+ /// The assessment section the failure mechanism belongs to.
+ /// An with assembly results.
+ /// Thrown when any parameter is null.
+ /// Thrown when assembly results cannot be created.
+ public static ExportableFailureMechanism CreateExportableFailureMechanism(
+ StabilityStoneCoverFailureMechanism failureMechanism,
+ IAssessmentSection assessmentSection)
+ {
+ if (failureMechanism == null)
+ {
+ throw new ArgumentNullException(nameof(failureMechanism));
+ }
+
+ if (assessmentSection == null)
+ {
+ throw new ArgumentNullException(nameof(assessmentSection));
+ }
+
+ if (!failureMechanism.IsRelevant)
+ {
+ return ExportableFailureMechanismFactory.CreateDefaultExportableFailureMechanismWithoutProbability(assessmentSection,
+ failureMechanismCode,
+ failureMechanismGroup,
+ failureMechanismAssemblyMethod);
+ }
+
+ FailureMechanismAssemblyCategoryGroup failureMechanismAssembly = StabilityStoneCoverFailureMechanismAssemblyFactory.AssembleFailureMechanism(failureMechanism, false);
+
+ return new ExportableFailureMechanism(
+ new ExportableFailureMechanismAssemblyResult(failureMechanismAssemblyMethod, failureMechanismAssembly),
+ CreateFailureMechanismSectionResults(failureMechanism.SectionResults),
+ failureMechanismCode,
+ failureMechanismGroup);
+ }
+
+ ///
+ /// Creates a collection of
+ /// with assembly results based on .
+ ///
+ /// The collection of
+ /// to create a for.
+ /// A collection of .
+ /// Thrown when assembly results cannot be created.
+ private static IEnumerable CreateFailureMechanismSectionResults(
+ IEnumerable failureMechanismSectionResults)
+ {
+ IDictionary failureMechanismSectionsLookup =
+ ExportableFailureMechanismSectionHelper.CreateFailureMechanismSectionResultLookup(failureMechanismSectionResults);
+
+ var exportableResults = new List();
+ foreach (KeyValuePair failureMechanismSectionPair in failureMechanismSectionsLookup)
+ {
+ StabilityStoneCoverFailureMechanismSectionResult failureMechanismSectionResult = failureMechanismSectionPair.Key;
+
+ FailureMechanismSectionAssemblyCategoryGroup simpleAssembly =
+ StabilityStoneCoverFailureMechanismAssemblyFactory.AssembleSimpleAssessment(failureMechanismSectionResult);
+ FailureMechanismSectionAssemblyCategoryGroup detailedAssembly =
+ StabilityStoneCoverFailureMechanismAssemblyFactory.AssembleDetailedAssessment(failureMechanismSectionResult);
+ FailureMechanismSectionAssemblyCategoryGroup tailorMadeAssembly =
+ StabilityStoneCoverFailureMechanismAssemblyFactory.AssembleTailorMadeAssessment(failureMechanismSectionResult);
+ FailureMechanismSectionAssemblyCategoryGroup combinedAssembly =
+ StabilityStoneCoverFailureMechanismAssemblyFactory.AssembleCombinedAssessment(failureMechanismSectionResult);
+
+ exportableResults.Add(
+ new ExportableAggregatedFailureMechanismSectionAssemblyResult(
+ failureMechanismSectionPair.Value,
+ ExportableSectionAssemblyResultFactory.CreateExportableSectionAssemblyResult(simpleAssembly, ExportableAssemblyMethod.WBI0E3),
+ ExportableSectionAssemblyResultFactory.CreateExportableSectionAssemblyResult(detailedAssembly, ExportableAssemblyMethod.WBI0G6),
+ ExportableSectionAssemblyResultFactory.CreateExportableSectionAssemblyResult(tailorMadeAssembly, ExportableAssemblyMethod.WBI0T4),
+ ExportableSectionAssemblyResultFactory.CreateExportableSectionAssemblyResult(combinedAssembly, ExportableAssemblyMethod.WBI0A1)));
+ }
+
+ return exportableResults;
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Integration/src/Riskeer.Integration.IO/Factories/ExportableStrengthStabilityLengthwiseConstructionFailureMechanismFactory.cs
===================================================================
diff -u
--- Ringtoets/Integration/src/Riskeer.Integration.IO/Factories/ExportableStrengthStabilityLengthwiseConstructionFailureMechanismFactory.cs (revision 0)
+++ Ringtoets/Integration/src/Riskeer.Integration.IO/Factories/ExportableStrengthStabilityLengthwiseConstructionFailureMechanismFactory.cs (revision 457970572d405d707ca5a96836d6a48babffc3a7)
@@ -0,0 +1,123 @@
+// Copyright (C) Stichting Deltares 2018. 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 Ringtoets.Common.Data.AssessmentSection;
+using Ringtoets.Common.Data.Exceptions;
+using Riskeer.AssemblyTool.Data;
+using Riskeer.Integration.Data.StandAlone;
+using Riskeer.Integration.Data.StandAlone.AssemblyFactories;
+using Riskeer.Integration.Data.StandAlone.SectionResults;
+using Riskeer.Integration.IO.Assembly;
+using Riskeer.Integration.IO.Helpers;
+
+namespace Riskeer.Integration.IO.Factories
+{
+ ///
+ /// Factory to create instances of
+ /// with assembly results for strength stability lengthwise construction.
+ ///
+ public static class ExportableStrengthStabilityLengthwiseConstructionFailureMechanismFactory
+ {
+ private const ExportableFailureMechanismType failureMechanismCode = ExportableFailureMechanismType.STKWl;
+ private const ExportableFailureMechanismGroup failureMechanismGroup = ExportableFailureMechanismGroup.Group4;
+ private const ExportableAssemblyMethod failureMechanismAssemblyMethod = ExportableAssemblyMethod.WBI1A1;
+
+ ///
+ /// Creates an
+ /// with assembly results based on the input parameters.
+ ///
+ /// The to create an
+ /// for.
+ /// The assessment section the failure mechanism belongs to.
+ /// An with assembly results.
+ /// Thrown when any parameter is null.
+ /// Thrown when assembly results cannot be created.
+ public static ExportableFailureMechanism CreateExportableFailureMechanism(
+ StrengthStabilityLengthwiseConstructionFailureMechanism failureMechanism,
+ IAssessmentSection assessmentSection)
+ {
+ if (failureMechanism == null)
+ {
+ throw new ArgumentNullException(nameof(failureMechanism));
+ }
+
+ if (assessmentSection == null)
+ {
+ throw new ArgumentNullException(nameof(assessmentSection));
+ }
+
+ if (!failureMechanism.IsRelevant)
+ {
+ return ExportableFailureMechanismFactory.CreateDefaultExportableFailureMechanismWithoutProbability(assessmentSection,
+ failureMechanismCode,
+ failureMechanismGroup,
+ failureMechanismAssemblyMethod);
+ }
+
+ FailureMechanismAssemblyCategoryGroup failureMechanismAssembly = StrengthStabilityLengthwiseConstructionFailureMechanismAssemblyFactory.AssembleFailureMechanism(failureMechanism, false);
+
+ return new ExportableFailureMechanism(
+ new ExportableFailureMechanismAssemblyResult(failureMechanismAssemblyMethod, failureMechanismAssembly),
+ CreateFailureMechanismSectionResults(failureMechanism.SectionResults),
+ failureMechanismCode,
+ failureMechanismGroup);
+ }
+
+ ///
+ /// Creates a collection of
+ /// with assembly results based .
+ ///
+ /// The collection of
+ /// to create a collection of for.
+ /// A collection of .
+ /// Thrown when assembly results cannot be created.
+ private static IEnumerable CreateFailureMechanismSectionResults(
+ IEnumerable failureMechanismSectionResults)
+ {
+ IDictionary failureMechanismSectionsLookup =
+ ExportableFailureMechanismSectionHelper.CreateFailureMechanismSectionResultLookup(failureMechanismSectionResults);
+
+ var exportableResults = new List();
+ foreach (KeyValuePair failureMechanismSectionPair in failureMechanismSectionsLookup)
+ {
+ StrengthStabilityLengthwiseConstructionFailureMechanismSectionResult failureMechanismSectionResult = failureMechanismSectionPair.Key;
+
+ FailureMechanismSectionAssemblyCategoryGroup simpleAssembly =
+ StrengthStabilityLengthwiseConstructionFailureMechanismAssemblyFactory.AssembleSimpleAssessment(failureMechanismSectionResult);
+ FailureMechanismSectionAssemblyCategoryGroup tailorMadeAssembly =
+ StrengthStabilityLengthwiseConstructionFailureMechanismAssemblyFactory.AssembleTailorMadeAssessment(failureMechanismSectionResult);
+ FailureMechanismSectionAssemblyCategoryGroup combinedAssembly =
+ StrengthStabilityLengthwiseConstructionFailureMechanismAssemblyFactory.AssembleCombinedAssessment(failureMechanismSectionResult);
+
+ exportableResults.Add(
+ new ExportableAggregatedFailureMechanismSectionAssemblyResultWithoutDetailedAssembly(
+ failureMechanismSectionPair.Value,
+ ExportableSectionAssemblyResultFactory.CreateExportableSectionAssemblyResult(simpleAssembly, ExportableAssemblyMethod.WBI0E1),
+ ExportableSectionAssemblyResultFactory.CreateExportableSectionAssemblyResult(tailorMadeAssembly, ExportableAssemblyMethod.WBI0T1),
+ ExportableSectionAssemblyResultFactory.CreateExportableSectionAssemblyResult(combinedAssembly, ExportableAssemblyMethod.WBI0A1)));
+ }
+
+ return exportableResults;
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Integration/src/Riskeer.Integration.IO/Factories/ExportableTechnicalInnovationFailureMechanismFactory.cs
===================================================================
diff -u
--- Ringtoets/Integration/src/Riskeer.Integration.IO/Factories/ExportableTechnicalInnovationFailureMechanismFactory.cs (revision 0)
+++ Ringtoets/Integration/src/Riskeer.Integration.IO/Factories/ExportableTechnicalInnovationFailureMechanismFactory.cs (revision 457970572d405d707ca5a96836d6a48babffc3a7)
@@ -0,0 +1,123 @@
+// Copyright (C) Stichting Deltares 2018. 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 Ringtoets.Common.Data.AssessmentSection;
+using Ringtoets.Common.Data.Exceptions;
+using Riskeer.AssemblyTool.Data;
+using Riskeer.Integration.Data.StandAlone;
+using Riskeer.Integration.Data.StandAlone.AssemblyFactories;
+using Riskeer.Integration.Data.StandAlone.SectionResults;
+using Riskeer.Integration.IO.Assembly;
+using Riskeer.Integration.IO.Helpers;
+
+namespace Riskeer.Integration.IO.Factories
+{
+ ///
+ /// Factory to create instances of
+ /// with assembly results for technical innovation.
+ ///
+ public static class ExportableTechnicalInnovationFailureMechanismFactory
+ {
+ private const ExportableFailureMechanismType failureMechanismCode = ExportableFailureMechanismType.INN;
+ private const ExportableFailureMechanismGroup failureMechanismGroup = ExportableFailureMechanismGroup.Group4;
+ private const ExportableAssemblyMethod failureMechanismAssemblyMethod = ExportableAssemblyMethod.WBI1A1;
+
+ ///
+ /// Creates an
+ /// with assembly results based on the input parameters.
+ ///
+ /// The to create an
+ /// for.
+ /// The assessment section the failure mechanism belongs to.
+ /// An with assembly results.
+ /// Thrown when any parameter is null.
+ /// Thrown when assembly results cannot be created.
+ public static ExportableFailureMechanism CreateExportableFailureMechanism(
+ TechnicalInnovationFailureMechanism failureMechanism,
+ IAssessmentSection assessmentSection)
+ {
+ if (failureMechanism == null)
+ {
+ throw new ArgumentNullException(nameof(failureMechanism));
+ }
+
+ if (assessmentSection == null)
+ {
+ throw new ArgumentNullException(nameof(assessmentSection));
+ }
+
+ if (!failureMechanism.IsRelevant)
+ {
+ return ExportableFailureMechanismFactory.CreateDefaultExportableFailureMechanismWithoutProbability(assessmentSection,
+ failureMechanismCode,
+ failureMechanismGroup,
+ failureMechanismAssemblyMethod);
+ }
+
+ FailureMechanismAssemblyCategoryGroup failureMechanismAssembly = TechnicalInnovationFailureMechanismAssemblyFactory.AssembleFailureMechanism(failureMechanism, false);
+
+ return new ExportableFailureMechanism(
+ new ExportableFailureMechanismAssemblyResult(failureMechanismAssemblyMethod, failureMechanismAssembly),
+ CreateFailureMechanismSectionResults(failureMechanism.SectionResults),
+ failureMechanismCode,
+ failureMechanismGroup);
+ }
+
+ ///
+ /// Creates a collection of
+ /// with assembly results based on .
+ ///
+ /// The collection of
+ /// to create a collection of for.
+ /// A collection of .
+ /// Thrown when assembly results cannot be created.
+ private static IEnumerable CreateFailureMechanismSectionResults(
+ IEnumerable failureMechanismSectionResults)
+ {
+ IDictionary failureMechanismSectionsLookup =
+ ExportableFailureMechanismSectionHelper.CreateFailureMechanismSectionResultLookup(failureMechanismSectionResults);
+
+ var exportableResults = new List();
+ foreach (KeyValuePair failureMechanismSectionPair in failureMechanismSectionsLookup)
+ {
+ TechnicalInnovationFailureMechanismSectionResult failureMechanismSectionResult = failureMechanismSectionPair.Key;
+
+ FailureMechanismSectionAssemblyCategoryGroup simpleAssembly =
+ TechnicalInnovationFailureMechanismAssemblyFactory.AssembleSimpleAssessment(failureMechanismSectionResult);
+ FailureMechanismSectionAssemblyCategoryGroup tailorMadeAssembly =
+ TechnicalInnovationFailureMechanismAssemblyFactory.AssembleTailorMadeAssessment(failureMechanismSectionResult);
+ FailureMechanismSectionAssemblyCategoryGroup combinedAssembly =
+ TechnicalInnovationFailureMechanismAssemblyFactory.AssembleCombinedAssessment(failureMechanismSectionResult);
+
+ exportableResults.Add(
+ new ExportableAggregatedFailureMechanismSectionAssemblyResultWithoutDetailedAssembly(
+ failureMechanismSectionPair.Value,
+ ExportableSectionAssemblyResultFactory.CreateExportableSectionAssemblyResult(simpleAssembly, ExportableAssemblyMethod.WBI0E1),
+ ExportableSectionAssemblyResultFactory.CreateExportableSectionAssemblyResult(tailorMadeAssembly, ExportableAssemblyMethod.WBI0T1),
+ ExportableSectionAssemblyResultFactory.CreateExportableSectionAssemblyResult(combinedAssembly, ExportableAssemblyMethod.WBI0A1)));
+ }
+
+ return exportableResults;
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Integration/src/Riskeer.Integration.IO/Factories/ExportableWaterPressureAsphaltCoverFailureMechanismFactory.cs
===================================================================
diff -u
--- Ringtoets/Integration/src/Riskeer.Integration.IO/Factories/ExportableWaterPressureAsphaltCoverFailureMechanismFactory.cs (revision 0)
+++ Ringtoets/Integration/src/Riskeer.Integration.IO/Factories/ExportableWaterPressureAsphaltCoverFailureMechanismFactory.cs (revision 457970572d405d707ca5a96836d6a48babffc3a7)
@@ -0,0 +1,123 @@
+// Copyright (C) Stichting Deltares 2018. 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 Ringtoets.Common.Data.AssessmentSection;
+using Ringtoets.Common.Data.Exceptions;
+using Riskeer.AssemblyTool.Data;
+using Riskeer.Integration.Data.StandAlone;
+using Riskeer.Integration.Data.StandAlone.AssemblyFactories;
+using Riskeer.Integration.Data.StandAlone.SectionResults;
+using Riskeer.Integration.IO.Assembly;
+using Riskeer.Integration.IO.Helpers;
+
+namespace Riskeer.Integration.IO.Factories
+{
+ ///
+ /// Factory to create instances of
+ /// with assembly results for water pressure asphalt cover.
+ ///
+ public static class ExportableWaterPressureAsphaltCoverFailureMechanismFactory
+ {
+ private const ExportableFailureMechanismType failureMechanismCode = ExportableFailureMechanismType.AWO;
+ private const ExportableFailureMechanismGroup failureMechanismGroup = ExportableFailureMechanismGroup.Group4;
+ private const ExportableAssemblyMethod failureMechanismAssemblyMethod = ExportableAssemblyMethod.WBI1A1;
+
+ ///
+ /// Creates an
+ /// with assembly results based on the input parameters.
+ ///
+ /// The to create an
+ /// for.
+ /// The assessment section the failure mechanism belongs to.
+ /// An with assembly results.
+ /// Thrown when any parameter is null.
+ /// Thrown when assembly results cannot be created.
+ public static ExportableFailureMechanism CreateExportableFailureMechanism(
+ WaterPressureAsphaltCoverFailureMechanism failureMechanism,
+ IAssessmentSection assessmentSection)
+ {
+ if (failureMechanism == null)
+ {
+ throw new ArgumentNullException(nameof(failureMechanism));
+ }
+
+ if (assessmentSection == null)
+ {
+ throw new ArgumentNullException(nameof(assessmentSection));
+ }
+
+ if (!failureMechanism.IsRelevant)
+ {
+ return ExportableFailureMechanismFactory.CreateDefaultExportableFailureMechanismWithoutProbability(assessmentSection,
+ failureMechanismCode,
+ failureMechanismGroup,
+ failureMechanismAssemblyMethod);
+ }
+
+ FailureMechanismAssemblyCategoryGroup failureMechanismAssembly = WaterPressureAsphaltCoverFailureMechanismAssemblyFactory.AssembleFailureMechanism(failureMechanism, false);
+
+ return new ExportableFailureMechanism(
+ new ExportableFailureMechanismAssemblyResult(failureMechanismAssemblyMethod, failureMechanismAssembly),
+ CreateFailureMechanismSectionResults(failureMechanism.SectionResults),
+ failureMechanismCode,
+ failureMechanismGroup);
+ }
+
+ ///
+ /// Creates a collection of
+ /// with assembly results based on .
+ ///
+ /// The collection of
+ /// to create a collection of for.
+ /// A collection of .
+ /// Thrown when assembly results cannot be created.
+ private static IEnumerable CreateFailureMechanismSectionResults(
+ IEnumerable failureMechanismSectionResults)
+ {
+ IDictionary failureMechanismSectionsLookup =
+ ExportableFailureMechanismSectionHelper.CreateFailureMechanismSectionResultLookup(failureMechanismSectionResults);
+
+ var exportableResults = new List();
+ foreach (KeyValuePair failureMechanismSectionPair in failureMechanismSectionsLookup)
+ {
+ WaterPressureAsphaltCoverFailureMechanismSectionResult failureMechanismSectionResult = failureMechanismSectionPair.Key;
+
+ FailureMechanismSectionAssemblyCategoryGroup simpleAssembly =
+ WaterPressureAsphaltCoverFailureMechanismAssemblyFactory.AssembleSimpleAssessment(failureMechanismSectionResult);
+ FailureMechanismSectionAssemblyCategoryGroup tailorMadeAssembly =
+ WaterPressureAsphaltCoverFailureMechanismAssemblyFactory.AssembleTailorMadeAssessment(failureMechanismSectionResult);
+ FailureMechanismSectionAssemblyCategoryGroup combinedAssembly =
+ WaterPressureAsphaltCoverFailureMechanismAssemblyFactory.AssembleCombinedAssessment(failureMechanismSectionResult);
+
+ exportableResults.Add(
+ new ExportableAggregatedFailureMechanismSectionAssemblyResultWithoutDetailedAssembly(
+ failureMechanismSectionPair.Value,
+ ExportableSectionAssemblyResultFactory.CreateExportableSectionAssemblyResult(simpleAssembly, ExportableAssemblyMethod.WBI0E1),
+ ExportableSectionAssemblyResultFactory.CreateExportableSectionAssemblyResult(tailorMadeAssembly, ExportableAssemblyMethod.WBI0T1),
+ ExportableSectionAssemblyResultFactory.CreateExportableSectionAssemblyResult(combinedAssembly, ExportableAssemblyMethod.WBI0A1)));
+ }
+
+ return exportableResults;
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Integration/src/Riskeer.Integration.IO/Factories/ExportableWaveImpactAsphaltCoverFailureMechanismFactory.cs
===================================================================
diff -u
--- Ringtoets/Integration/src/Riskeer.Integration.IO/Factories/ExportableWaveImpactAsphaltCoverFailureMechanismFactory.cs (revision 0)
+++ Ringtoets/Integration/src/Riskeer.Integration.IO/Factories/ExportableWaveImpactAsphaltCoverFailureMechanismFactory.cs (revision 457970572d405d707ca5a96836d6a48babffc3a7)
@@ -0,0 +1,124 @@
+// Copyright (C) Stichting Deltares 2018. 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 Ringtoets.Common.Data.AssessmentSection;
+using Ringtoets.Common.Data.Exceptions;
+using Ringtoets.WaveImpactAsphaltCover.Data;
+using Riskeer.AssemblyTool.Data;
+using Riskeer.Integration.IO.Assembly;
+using Riskeer.Integration.IO.Helpers;
+
+namespace Riskeer.Integration.IO.Factories
+{
+ ///
+ /// Factory to create instances of
+ /// with assembly results for wave impact asphalt cover.
+ ///
+ public static class ExportableWaveImpactAsphaltCoverFailureMechanismFactory
+ {
+ private const ExportableFailureMechanismType failureMechanismCode = ExportableFailureMechanismType.AGK;
+ private const ExportableFailureMechanismGroup failureMechanismGroup = ExportableFailureMechanismGroup.Group3;
+ private const ExportableAssemblyMethod failureMechanismAssemblyMethod = ExportableAssemblyMethod.WBI1A1;
+
+ ///
+ /// Creates an
+ /// with assembly results based on the input parameters.
+ ///
+ /// The to create an
+ /// for.
+ /// The assessment section the failure mechanism belongs to.
+ /// An with assembly results.
+ /// Thrown when any parameter is null.
+ /// Thrown when assembly results cannot be created.
+ public static ExportableFailureMechanism CreateExportableFailureMechanism(
+ WaveImpactAsphaltCoverFailureMechanism failureMechanism,
+ IAssessmentSection assessmentSection)
+ {
+ if (failureMechanism == null)
+ {
+ throw new ArgumentNullException(nameof(failureMechanism));
+ }
+
+ if (assessmentSection == null)
+ {
+ throw new ArgumentNullException(nameof(assessmentSection));
+ }
+
+ if (!failureMechanism.IsRelevant)
+ {
+ return ExportableFailureMechanismFactory.CreateDefaultExportableFailureMechanismWithoutProbability(assessmentSection,
+ failureMechanismCode,
+ failureMechanismGroup,
+ failureMechanismAssemblyMethod);
+ }
+
+ FailureMechanismAssemblyCategoryGroup failureMechanismAssembly = WaveImpactAsphaltCoverFailureMechanismAssemblyFactory.AssembleFailureMechanism(failureMechanism, false);
+
+ return new ExportableFailureMechanism(
+ new ExportableFailureMechanismAssemblyResult(failureMechanismAssemblyMethod, failureMechanismAssembly),
+ CreateFailureMechanismSectionResults(failureMechanism.SectionResults),
+ failureMechanismCode,
+ failureMechanismGroup);
+ }
+
+ ///
+ /// Creates a collection of
+ /// with assembly results based on .
+ ///
+ /// The collection of
+ /// to create a collection of for.
+ /// A collection of .
+ /// Thrown when assembly results cannot be created.
+ private static IEnumerable CreateFailureMechanismSectionResults(
+ IEnumerable failureMechanismSectionResults)
+ {
+ IDictionary failureMechanismSectionsLookup =
+ ExportableFailureMechanismSectionHelper.CreateFailureMechanismSectionResultLookup(failureMechanismSectionResults);
+
+ var exportableResults = new List();
+ foreach (KeyValuePair failureMechanismSectionPair in failureMechanismSectionsLookup)
+ {
+ WaveImpactAsphaltCoverFailureMechanismSectionResult failureMechanismSectionResult = failureMechanismSectionPair.Key;
+
+ FailureMechanismSectionAssemblyCategoryGroup simpleAssembly =
+ WaveImpactAsphaltCoverFailureMechanismAssemblyFactory.AssembleSimpleAssessment(failureMechanismSectionResult);
+ FailureMechanismSectionAssemblyCategoryGroup detailedAssembly =
+ WaveImpactAsphaltCoverFailureMechanismAssemblyFactory.AssembleDetailedAssessment(failureMechanismSectionResult);
+ FailureMechanismSectionAssemblyCategoryGroup tailorMadeAssembly =
+ WaveImpactAsphaltCoverFailureMechanismAssemblyFactory.AssembleTailorMadeAssessment(failureMechanismSectionResult);
+ FailureMechanismSectionAssemblyCategoryGroup combinedAssembly =
+ WaveImpactAsphaltCoverFailureMechanismAssemblyFactory.AssembleCombinedAssessment(failureMechanismSectionResult);
+
+ exportableResults.Add(
+ new ExportableAggregatedFailureMechanismSectionAssemblyResult(
+ failureMechanismSectionPair.Value,
+ ExportableSectionAssemblyResultFactory.CreateExportableSectionAssemblyResult(simpleAssembly, ExportableAssemblyMethod.WBI0E1),
+ ExportableSectionAssemblyResultFactory.CreateExportableSectionAssemblyResult(detailedAssembly, ExportableAssemblyMethod.WBI0G6),
+ ExportableSectionAssemblyResultFactory.CreateExportableSectionAssemblyResult(tailorMadeAssembly, ExportableAssemblyMethod.WBI0T4),
+ ExportableSectionAssemblyResultFactory.CreateExportableSectionAssemblyResult(combinedAssembly, ExportableAssemblyMethod.WBI0A1)));
+ }
+
+ return exportableResults;
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Integration/src/Riskeer.Integration.IO/Handlers/IHydraulicBoundaryDatabaseUpdateHandler.cs
===================================================================
diff -u
--- Ringtoets/Integration/src/Riskeer.Integration.IO/Handlers/IHydraulicBoundaryDatabaseUpdateHandler.cs (revision 0)
+++ Ringtoets/Integration/src/Riskeer.Integration.IO/Handlers/IHydraulicBoundaryDatabaseUpdateHandler.cs (revision 457970572d405d707ca5a96836d6a48babffc3a7)
@@ -0,0 +1,77 @@
+// Copyright (C) Stichting Deltares 2018. 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 Core.Common.Base;
+using Ringtoets.Common.Data.Hydraulics;
+using Riskeer.HydraRing.IO.HydraulicBoundaryDatabase;
+using Riskeer.HydraRing.IO.HydraulicLocationConfigurationDatabase;
+
+namespace Riskeer.Integration.IO.Handlers
+{
+ ///
+ /// Interface for an object that can properly update a .
+ ///
+ public interface IHydraulicBoundaryDatabaseUpdateHandler
+ {
+ ///
+ /// Checks whether confirmation is required before updating the .
+ ///
+ /// The hydraulic boundary database.
+ /// The read hydraulic boundary database.
+ /// true when confirmation is required; false otherwise.
+ /// Thrown when any parameter is null.
+ bool IsConfirmationRequired(HydraulicBoundaryDatabase hydraulicBoundaryDatabase, ReadHydraulicBoundaryDatabase readHydraulicBoundaryDatabase);
+
+ ///
+ /// Gets confirmation for updating the .
+ ///
+ /// true when confirmation is given; false otherwise.
+ bool InquireConfirmation();
+
+ ///
+ /// Updates the and its dependent data with the
+ /// and the .
+ ///
+ /// The hydraulic boundary database to update.
+ /// The read hydraulic boundary database to update with.
+ /// The read hydraulic location configuration database to update with.
+ /// The location ids that should be excluded.
+ /// The file path of the read hydraulic boundary database.
+ /// The file path of the hlcd.
+ /// All objects that have been affected by the update.
+ /// Thrown when any parameter is null.
+ /// Thrown when the
+ /// cannot be updated with .
+ IEnumerable Update(HydraulicBoundaryDatabase hydraulicBoundaryDatabase,
+ ReadHydraulicBoundaryDatabase readHydraulicBoundaryDatabase,
+ ReadHydraulicLocationConfigurationDatabase readHydraulicLocationConfigurationDatabase,
+ IEnumerable excludedLocationIds,
+ string hydraulicBoundaryDatabaseFilePath,
+ string hlcdFilePath);
+
+ ///
+ /// Perform post-update actions.
+ ///
+ void DoPostUpdateActions();
+ }
+}
\ No newline at end of file
Index: Ringtoets/Integration/src/Riskeer.Integration.IO/Handlers/IHydraulicLocationConfigurationDatabaseUpdateHandler.cs
===================================================================
diff -u
--- Ringtoets/Integration/src/Riskeer.Integration.IO/Handlers/IHydraulicLocationConfigurationDatabaseUpdateHandler.cs (revision 0)
+++ Ringtoets/Integration/src/Riskeer.Integration.IO/Handlers/IHydraulicLocationConfigurationDatabaseUpdateHandler.cs (revision 457970572d405d707ca5a96836d6a48babffc3a7)
@@ -0,0 +1,56 @@
+// Copyright (C) Stichting Deltares 2018. 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 Core.Common.Base;
+using Ringtoets.Common.Data.Hydraulics;
+using Riskeer.HydraRing.IO.HydraulicLocationConfigurationDatabase;
+
+namespace Riskeer.Integration.IO.Handlers
+{
+ ///
+ /// Interface for an object that can properly update .
+ ///
+ public interface IHydraulicLocationConfigurationDatabaseUpdateHandler
+ {
+ ///
+ /// Gets confirmation for updating the .
+ ///
+ /// true when confirmation is given; false otherwise.
+ bool InquireConfirmation();
+
+ ///
+ /// Updates the and its dependent data with the
+ /// .
+ ///
+ /// The hydraulic boundary database to update the settings for.
+ /// The read hydraulic location
+ /// configuration database settings to update with.
+ /// The file path of the hlcd.
+ /// All objects that have been affected by the update.
+ /// Thrown when
+ /// or is null.
+ IEnumerable Update(HydraulicBoundaryDatabase hydraulicBoundaryDatabase,
+ ReadHydraulicLocationConfigurationDatabaseSettings readHydraulicLocationConfigurationDatabaseSettings,
+ string hlcdFilePath);
+ }
+}
\ No newline at end of file
Index: Ringtoets/Integration/src/Riskeer.Integration.IO/Helpers/ExportableFailureMechanismSectionHelper.cs
===================================================================
diff -u
--- Ringtoets/Integration/src/Riskeer.Integration.IO/Helpers/ExportableFailureMechanismSectionHelper.cs (revision 0)
+++ Ringtoets/Integration/src/Riskeer.Integration.IO/Helpers/ExportableFailureMechanismSectionHelper.cs (revision 457970572d405d707ca5a96836d6a48babffc3a7)
@@ -0,0 +1,71 @@
+// Copyright (C) Stichting Deltares 2018. 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 Ringtoets.Common.Data.FailureMechanism;
+using Riskeer.Integration.IO.Assembly;
+
+namespace Riskeer.Integration.IO.Helpers
+{
+ ///
+ /// Class containing helper methods for .
+ ///
+ public static class ExportableFailureMechanismSectionHelper
+ {
+ ///
+ /// Creates a lookup between failure mechanism section results and the corresponding
+ /// .
+ ///
+ /// The type of .
+ /// The failure mechanism sections results to create a
+ /// for.
+ /// A between the failure mechanism section results
+ /// and .
+ /// Thrown when is null.
+ public static IDictionary CreateFailureMechanismSectionResultLookup(
+ IEnumerable failureMechanismSectionResults)
+ where TSectionResult : FailureMechanismSectionResult
+ {
+ if (failureMechanismSectionResults == null)
+ {
+ throw new ArgumentNullException(nameof(failureMechanismSectionResults));
+ }
+
+ var failureMechanismSectionsLookup = new Dictionary();
+
+ double startDistance = 0;
+ foreach (TSectionResult sectionResult in failureMechanismSectionResults)
+ {
+ FailureMechanismSection failureMechanismSection = sectionResult.Section;
+ double endDistance = startDistance + failureMechanismSection.Length;
+
+ failureMechanismSectionsLookup[sectionResult] = new ExportableFailureMechanismSection(failureMechanismSection.Points,
+ startDistance,
+ endDistance);
+
+ startDistance = endDistance;
+ }
+
+ return failureMechanismSectionsLookup;
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Integration/src/Riskeer.Integration.IO/Helpers/IdentifierGenerator.cs
===================================================================
diff -u
--- Ringtoets/Integration/src/Riskeer.Integration.IO/Helpers/IdentifierGenerator.cs (revision 0)
+++ Ringtoets/Integration/src/Riskeer.Integration.IO/Helpers/IdentifierGenerator.cs (revision 457970572d405d707ca5a96836d6a48babffc3a7)
@@ -0,0 +1,87 @@
+// Copyright (C) Stichting Deltares 2018. 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 Riskeer.Integration.IO.Assembly;
+using Riskeer.Integration.IO.Properties;
+
+namespace Riskeer.Integration.IO.Helpers
+{
+ ///
+ /// Class to generate unique ids.
+ ///
+ public class IdentifierGenerator
+ {
+ private readonly Dictionary idLookup;
+
+ ///
+ /// Creates a new instance of .
+ ///
+ public IdentifierGenerator()
+ {
+ idLookup = new Dictionary();
+ }
+
+ ///
+ /// Gets a new unique id prefixed by .
+ ///
+ /// The prefix to be used for the generated id.
+ /// An unique id.
+ /// Thrown when is
+ /// null, empty or consists of only whitespaces.
+ public string GetNewId(string prefix)
+ {
+ if (string.IsNullOrWhiteSpace(prefix))
+ {
+ throw new ArgumentException($@"'{nameof(prefix)}' is null, empty or consists of whitespace.", nameof(prefix));
+ }
+
+ if (idLookup.ContainsKey(prefix))
+ {
+ idLookup[prefix]++;
+ }
+ else
+ {
+ idLookup[prefix] = 0;
+ }
+
+ return $"{prefix}.{idLookup[prefix]}";
+ }
+
+ ///
+ /// Gets an id based on .
+ ///
+ /// The
+ /// to generate an id for.
+ /// An id.
+ /// Thrown when is null.
+ public static string GeneratedId(ExportableAssessmentSection assessmentSection)
+ {
+ if (assessmentSection == null)
+ {
+ throw new ArgumentNullException(nameof(assessmentSection));
+ }
+
+ return $"{Resources.SerializableAssessmentSection_IdPrefix}.{assessmentSection.Id}";
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Integration/src/Riskeer.Integration.IO/Importers/HydraulicBoundaryDatabaseImporter.cs
===================================================================
diff -u
--- Ringtoets/Integration/src/Riskeer.Integration.IO/Importers/HydraulicBoundaryDatabaseImporter.cs (revision 0)
+++ Ringtoets/Integration/src/Riskeer.Integration.IO/Importers/HydraulicBoundaryDatabaseImporter.cs (revision 457970572d405d707ca5a96836d6a48babffc3a7)
@@ -0,0 +1,282 @@
+// Copyright (C) Stichting Deltares 2018. 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.IO;
+using System.Linq;
+using Core.Common.Base;
+using Core.Common.Base.IO;
+using Core.Common.IO.Exceptions;
+using Core.Common.IO.Readers;
+using Core.Common.Util.Builders;
+using Ringtoets.Common.Data.Hydraulics;
+using Ringtoets.Common.IO.HydraRing;
+using Riskeer.HydraRing.IO.HydraulicBoundaryDatabase;
+using Riskeer.HydraRing.IO.HydraulicLocationConfigurationDatabase;
+using Riskeer.Integration.IO.Handlers;
+using Riskeer.Integration.IO.Properties;
+using RingtoetsCommonIOResources = Ringtoets.Common.IO.Properties.Resources;
+
+namespace Riskeer.Integration.IO.Importers
+{
+ ///
+ /// Importer for hydraulic boundary database files and corresponding configuration files.
+ ///
+ public class HydraulicBoundaryDatabaseImporter : FileImporterBase
+ {
+ private const int numberOfSteps = 4;
+ private readonly List changedObservables = new List();
+ private readonly IHydraulicBoundaryDatabaseUpdateHandler updateHandler;
+
+ ///
+ /// Creates a new instance of .
+ ///
+ /// The hydraulic boundary database to import to.
+ /// The object responsible for updating the .
+ /// The path of the hydraulic boundary database file to import from.
+ /// Thrown when any parameter is null.
+ public HydraulicBoundaryDatabaseImporter(HydraulicBoundaryDatabase importTarget, IHydraulicBoundaryDatabaseUpdateHandler updateHandler,
+ string filePath)
+ : base(filePath, importTarget)
+ {
+ if (updateHandler == null)
+ {
+ throw new ArgumentNullException(nameof(updateHandler));
+ }
+
+ this.updateHandler = updateHandler;
+ }
+
+ protected override bool OnImport()
+ {
+ ReadResult readHydraulicBoundaryDatabaseResult = ReadHydraulicBoundaryDatabase();
+ if (readHydraulicBoundaryDatabaseResult.CriticalErrorOccurred || Canceled)
+ {
+ return false;
+ }
+
+ ReadHydraulicBoundaryDatabase readHydraulicBoundaryDatabase = readHydraulicBoundaryDatabaseResult.Items.Single();
+
+ InquireConfirmation(readHydraulicBoundaryDatabase);
+
+ if (Canceled)
+ {
+ return false;
+ }
+
+ ReadResult readHydraulicLocationConfigurationDatabaseResult = ReadHydraulicLocationConfigurationDatabase(
+ readHydraulicBoundaryDatabase.TrackId);
+
+ if (readHydraulicLocationConfigurationDatabaseResult.CriticalErrorOccurred || Canceled)
+ {
+ return false;
+ }
+
+ ReadHydraulicLocationConfigurationDatabase readHydraulicLocationConfigurationDatabase = readHydraulicLocationConfigurationDatabaseResult.Items.Single();
+ IEnumerable hydraulicLocationConfigurationDatabaseSettings =
+ readHydraulicLocationConfigurationDatabase.ReadHydraulicLocationConfigurationDatabaseSettings;
+ if (hydraulicLocationConfigurationDatabaseSettings != null && hydraulicLocationConfigurationDatabaseSettings.Count() != 1)
+ {
+ Log.Error(BuildErrorMessage(GetHlcdFilePath(), Resources.HydraulicBoundaryDatabaseImporter_HLCD_Invalid_number_of_ScenarioInformation_entries));
+ return false;
+ }
+
+ ReadResult> readExcludedLocationsResult = ReadExcludedLocations();
+
+ if (readExcludedLocationsResult.CriticalErrorOccurred || Canceled)
+ {
+ return false;
+ }
+
+ AddHydraulicBoundaryDatabaseToDataModel(readHydraulicBoundaryDatabase, readHydraulicLocationConfigurationDatabase,
+ readExcludedLocationsResult.Items.Single());
+
+ return true;
+ }
+
+ protected override void LogImportCanceledMessage()
+ {
+ Log.Info(Resources.HydraulicBoundaryDatabaseImporter_ProgressText_Import_canceled_No_data_changed);
+ }
+
+ protected override void DoPostImportUpdates()
+ {
+ updateHandler.DoPostUpdateActions();
+
+ base.DoPostImportUpdates();
+
+ foreach (IObservable changedObservable in changedObservables)
+ {
+ changedObservable.NotifyObservers();
+ }
+ }
+
+ private void InquireConfirmation(ReadHydraulicBoundaryDatabase readHydraulicBoundaryDatabase)
+ {
+ if (updateHandler.IsConfirmationRequired(ImportTarget, readHydraulicBoundaryDatabase))
+ {
+ if (!updateHandler.InquireConfirmation())
+ {
+ Cancel();
+ }
+ }
+ }
+
+ private ReadResult ReadHydraulicBoundaryDatabase()
+ {
+ NotifyProgress(Resources.HydraulicBoundaryDatabaseImporter_ProgressText_Reading_HRD_file, 1, numberOfSteps);
+ try
+ {
+ using (var reader = new HydraulicBoundaryDatabaseReader(FilePath))
+ {
+ return new ReadResult(false)
+ {
+ Items = new[]
+ {
+ reader.Read()
+ }
+ };
+ }
+ }
+ catch (Exception e) when (e is CriticalFileReadException || e is LineParseException)
+ {
+ return HandleCriticalFileReadError(e);
+ }
+ }
+
+ private ReadResult ReadHydraulicLocationConfigurationDatabase(long trackId)
+ {
+ NotifyProgress(Resources.HydraulicBoundaryDatabaseImporter_ProgressText_Reading_HLCD_file, 2, numberOfSteps);
+ try
+ {
+ using (var reader = new HydraulicLocationConfigurationDatabaseReader(GetHlcdFilePath()))
+ {
+ return ReadHydraulicLocationConfigurationDatabase(trackId, reader);
+ }
+ }
+ catch (CriticalFileReadException)
+ {
+ return HandleCriticalFileReadError(Resources.HydraulicBoundaryDatabaseImporter_HLCD_sqlite_Not_Found);
+ }
+ }
+
+ private ReadResult ReadHydraulicLocationConfigurationDatabase(long trackId, HydraulicLocationConfigurationDatabaseReader reader)
+ {
+ try
+ {
+ return new ReadResult(false)
+ {
+ Items = new[]
+ {
+ reader.Read(trackId)
+ }
+ };
+ }
+ catch (Exception e) when (e is CriticalFileReadException || e is LineParseException)
+ {
+ return HandleCriticalFileReadError(e);
+ }
+ }
+
+ private ReadResult> ReadExcludedLocations()
+ {
+ NotifyProgress(Resources.HydraulicBoundaryDatabaseImporter_ProgressText_Reading_HRD_settings_file, 3, numberOfSteps);
+ string settingsFilePath = HydraulicBoundaryDatabaseHelper.GetHydraulicBoundarySettingsDatabase(FilePath);
+ try
+ {
+ using (var reader = new HydraRingSettingsDatabaseReader(settingsFilePath))
+ {
+ return ReadExcludedLocations(reader);
+ }
+ }
+ catch (CriticalFileReadException e)
+ {
+ return HandleCriticalFileReadError>(
+ string.Format(Resources.HydraulicBoundaryDatabaseImporter_Cannot_open_hydraulic_calculation_settings_file_0_, e.Message));
+ }
+ }
+
+ private ReadResult> ReadExcludedLocations(HydraRingSettingsDatabaseReader reader)
+ {
+ try
+ {
+ return new ReadResult>(false)
+ {
+ Items = new[]
+ {
+ reader.ReadExcludedLocations().ToArray()
+ }
+ };
+ }
+ catch (CriticalFileReadException e)
+ {
+ return HandleCriticalFileReadError>(e.Message);
+ }
+ }
+
+ private void AddHydraulicBoundaryDatabaseToDataModel(ReadHydraulicBoundaryDatabase readHydraulicBoundaryDatabase,
+ ReadHydraulicLocationConfigurationDatabase readHydraulicLocationConfigurationDatabase,
+ IEnumerable excludedLocationIds)
+ {
+ NotifyProgress(RingtoetsCommonIOResources.Importer_ProgressText_Adding_imported_data_to_AssessmentSection, 4, numberOfSteps);
+ changedObservables.AddRange(updateHandler.Update(ImportTarget, readHydraulicBoundaryDatabase, readHydraulicLocationConfigurationDatabase,
+ excludedLocationIds, FilePath, GetHlcdFilePath()));
+ }
+
+ private ReadResult HandleCriticalFileReadError(Exception e)
+ {
+ string errorMessage = string.Format(Resources.HydraulicBoundaryDatabaseImporter_HandleCriticalFileReadError_Error_0_No_HydraulicBoundaryDatabase_imported,
+ e.Message);
+ Log.Error(errorMessage);
+ return new ReadResult(true);
+ }
+
+ private ReadResult HandleCriticalFileReadError(string message)
+ {
+ HandleCriticalFileReadError(message);
+ return new ReadResult(true);
+ }
+
+ private void HandleCriticalFileReadError(string message)
+ {
+ string errorMessage = BuildErrorMessage(message);
+ Log.Error(errorMessage);
+ }
+
+ private string GetHlcdFilePath()
+ {
+ return Path.Combine(Path.GetDirectoryName(FilePath), "hlcd.sqlite");
+ }
+
+ private string BuildErrorMessage(string message)
+ {
+ return BuildErrorMessage(FilePath, message);
+ }
+
+ private static string BuildErrorMessage(string filePath, string message)
+ {
+ return new FileReaderErrorMessageBuilder(filePath).Build(
+ string.Format(Resources.HydraulicBoundaryDatabaseImporter_HandleCriticalFileReadError_Error_0_No_HydraulicBoundaryDatabase_imported,
+ message));
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Integration/src/Riskeer.Integration.IO/Importers/HydraulicLocationConfigurationDatabaseImporter.cs
===================================================================
diff -u
--- Ringtoets/Integration/src/Riskeer.Integration.IO/Importers/HydraulicLocationConfigurationDatabaseImporter.cs (revision 0)
+++ Ringtoets/Integration/src/Riskeer.Integration.IO/Importers/HydraulicLocationConfigurationDatabaseImporter.cs (revision 457970572d405d707ca5a96836d6a48babffc3a7)
@@ -0,0 +1,220 @@
+// Copyright (C) Stichting Deltares 2018. 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.IO;
+using System.Linq;
+using Core.Common.Base;
+using Core.Common.Base.IO;
+using Core.Common.IO.Exceptions;
+using Core.Common.IO.Readers;
+using Core.Common.Util.Builders;
+using Ringtoets.Common.Data.Hydraulics;
+using Riskeer.HydraRing.IO.HydraulicBoundaryDatabase;
+using Riskeer.HydraRing.IO.HydraulicLocationConfigurationDatabase;
+using Riskeer.Integration.IO.Handlers;
+using Riskeer.Integration.IO.Properties;
+using RingtoetsCommonIOResources = Ringtoets.Common.IO.Properties.Resources;
+
+namespace Riskeer.Integration.IO.Importers
+{
+ ///
+ /// Importer for hydraulic location configuration database files.
+ ///
+ public class HydraulicLocationConfigurationDatabaseImporter : FileImporterBase
+ {
+ private const int numberOfSteps = 3;
+ private readonly List changedObservables = new List();
+ private readonly IHydraulicLocationConfigurationDatabaseUpdateHandler updateHandler;
+ private readonly HydraulicBoundaryDatabase hydraulicBoundaryDatabase;
+
+ ///
+ /// Creates a new instance of .
+ ///
+ /// The hydraulic location configuration settings to import to.
+ /// The handler responsible for updating the .
+ /// The hydraulic boundary database the settings belong to.
+ /// The path of the hydraulic location configuration settings file to import from.
+ /// Thrown when any parameter is null.
+ public HydraulicLocationConfigurationDatabaseImporter(HydraulicLocationConfigurationSettings importTarget,
+ IHydraulicLocationConfigurationDatabaseUpdateHandler updateHandler,
+ HydraulicBoundaryDatabase hydraulicBoundaryDatabase,
+ string filePath)
+ : base(filePath, importTarget)
+ {
+ if (updateHandler == null)
+ {
+ throw new ArgumentNullException(nameof(updateHandler));
+ }
+
+ if (hydraulicBoundaryDatabase == null)
+ {
+ throw new ArgumentNullException(nameof(hydraulicBoundaryDatabase));
+ }
+
+ this.updateHandler = updateHandler;
+ this.hydraulicBoundaryDatabase = hydraulicBoundaryDatabase;
+ }
+
+ protected override bool OnImport()
+ {
+ InquireConfirmation();
+
+ if (Canceled)
+ {
+ return false;
+ }
+
+ if (Path.GetDirectoryName(FilePath) != Path.GetDirectoryName(hydraulicBoundaryDatabase.FilePath))
+ {
+ Log.Error(BuildErrorMessage(FilePath, Resources.HydraulicLocationConfigurationDatabaseImporter_HLCD_not_in_same_folder_as_HRD));
+ return false;
+ }
+
+ ReadResult readTrackIdResult = ReadTrackId();
+
+ if (readTrackIdResult.CriticalErrorOccurred || Canceled)
+ {
+ return false;
+ }
+
+ ReadResult readHydraulicLocationConfigurationDatabaseResult = ReadHydraulicLocationConfigurationDatabase(
+ readTrackIdResult.Items.Single());
+
+ if (readHydraulicLocationConfigurationDatabaseResult.CriticalErrorOccurred || Canceled)
+ {
+ return false;
+ }
+
+ ReadHydraulicLocationConfigurationDatabase readHydraulicLocationConfigurationDatabase = readHydraulicLocationConfigurationDatabaseResult.Items.Single();
+ if (readHydraulicLocationConfigurationDatabase.ReadHydraulicLocationConfigurationDatabaseSettings != null
+ && readHydraulicLocationConfigurationDatabase.ReadHydraulicLocationConfigurationDatabaseSettings.Count() != 1)
+ {
+ Log.Error(BuildErrorMessage(FilePath, Resources.HydraulicLocationConfigurationDatabaseImporter_Invalid_number_of_ScenarioInformation_entries));
+ return false;
+ }
+
+ IEnumerable locationIds = hydraulicBoundaryDatabase.Locations.Select(l => l.Id);
+ long[] intersect = locationIds.Intersect(readHydraulicLocationConfigurationDatabase.LocationIdMappings.Select(l => l.HlcdLocationId))
+ .ToArray();
+
+ if (intersect.Length != locationIds.Count())
+ {
+ Log.Error(BuildErrorMessage(FilePath, Resources.HydraulicLocationConfigurationDatabaseImporter_Invalid_locationIds));
+ return false;
+ }
+
+ AddHydraulicLocationConfigurationSettingsToDataModel(
+ readHydraulicLocationConfigurationDatabase.ReadHydraulicLocationConfigurationDatabaseSettings?.Single());
+
+ return true;
+ }
+
+ protected override void LogImportCanceledMessage()
+ {
+ Log.Info(Resources.HydraulicLocationConfigurationDatabaseImporter_ProgressText_Import_canceled_No_data_changed);
+ }
+
+ protected override void DoPostImportUpdates()
+ {
+ base.DoPostImportUpdates();
+
+ foreach (IObservable changedObservable in changedObservables)
+ {
+ changedObservable.NotifyObservers();
+ }
+ }
+
+ private ReadResult ReadTrackId()
+ {
+ NotifyProgress(Resources.HydraulicBoundaryDatabaseImporter_ProgressText_Reading_HRD_file, 1, numberOfSteps);
+ try
+ {
+ using (var reader = new HydraulicBoundaryDatabaseReader(hydraulicBoundaryDatabase.FilePath))
+ {
+ return new ReadResult(false)
+ {
+ Items = new[]
+ {
+ reader.ReadTrackId()
+ }
+ };
+ }
+ }
+ catch (Exception e) when (e is CriticalFileReadException || e is LineParseException)
+ {
+ return HandleCriticalFileReadError(e);
+ }
+ }
+
+ private ReadResult ReadHydraulicLocationConfigurationDatabase(long trackId)
+ {
+ NotifyProgress(Resources.HydraulicBoundaryDatabaseImporter_ProgressText_Reading_HLCD_file, 2, numberOfSteps);
+ try
+ {
+ using (var reader = new HydraulicLocationConfigurationDatabaseReader(FilePath))
+ {
+ return new ReadResult(false)
+ {
+ Items = new[]
+ {
+ reader.Read(trackId)
+ }
+ };
+ }
+ }
+ catch (Exception e) when (e is CriticalFileReadException || e is LineParseException)
+ {
+ return HandleCriticalFileReadError(e);
+ }
+ }
+
+ private void InquireConfirmation()
+ {
+ if (!updateHandler.InquireConfirmation())
+ {
+ Cancel();
+ }
+ }
+
+ private void AddHydraulicLocationConfigurationSettingsToDataModel(ReadHydraulicLocationConfigurationDatabaseSettings readHydraulicLocationConfigurationDatabaseSettings)
+ {
+ NotifyProgress(RingtoetsCommonIOResources.Importer_ProgressText_Adding_imported_data_to_AssessmentSection, 3, numberOfSteps);
+ changedObservables.AddRange(updateHandler.Update(hydraulicBoundaryDatabase, readHydraulicLocationConfigurationDatabaseSettings, FilePath));
+ }
+
+ private ReadResult HandleCriticalFileReadError(Exception e)
+ {
+ string errorMessage = string.Format(Resources.HydraulicLocationConfigurationDatabaseImporter_HandleCriticalFileReadError_Error_0_No_HydraulicLocationConfigurationDatabase_imported,
+ e.Message);
+ Log.Error(errorMessage);
+ return new ReadResult(true);
+ }
+
+ private static string BuildErrorMessage(string filePath, string message)
+ {
+ return new FileReaderErrorMessageBuilder(filePath).Build(
+ string.Format(Resources.HydraulicLocationConfigurationDatabaseImporter_HandleCriticalFileReadError_Error_0_No_HydraulicLocationConfigurationDatabase_imported,
+ message));
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Integration/src/Riskeer.Integration.IO/Properties/AssemblyInfo.cs
===================================================================
diff -u
--- Ringtoets/Integration/src/Riskeer.Integration.IO/Properties/AssemblyInfo.cs (revision 0)
+++ Ringtoets/Integration/src/Riskeer.Integration.IO/Properties/AssemblyInfo.cs (revision 457970572d405d707ca5a96836d6a48babffc3a7)
@@ -0,0 +1,27 @@
+// Copyright (C) Stichting Deltares 2018. 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.Reflection;
+using System.Runtime.CompilerServices;
+
+[assembly: AssemblyTitle("Riskeer.Integration.IO")]
+[assembly: AssemblyProduct("Riskeer.Integration.IO")]
+[assembly: InternalsVisibleTo("Ringtoets.Integration.IO.Test")]
\ No newline at end of file
Index: Ringtoets/Integration/src/Riskeer.Integration.IO/Properties/Resources.Designer.cs
===================================================================
diff -u
--- Ringtoets/Integration/src/Riskeer.Integration.IO/Properties/Resources.Designer.cs (revision 0)
+++ Ringtoets/Integration/src/Riskeer.Integration.IO/Properties/Resources.Designer.cs (revision 457970572d405d707ca5a96836d6a48babffc3a7)
@@ -0,0 +1,319 @@
+// Copyright (C) Stichting Deltares 2018. 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.
+
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.42000
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace Riskeer.Integration.IO.Properties {
+ using System;
+
+
+ ///
+ /// A strongly-typed resource class, for looking up localized strings, etc.
+ ///
+ // This class was auto-generated by the StronglyTypedResourceBuilder
+ // class via a tool like ResGen or Visual Studio.
+ // To add or remove a member, edit your .ResX file then rerun ResGen
+ // with the /str option, or rebuild your VS project.
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ internal class Resources {
+
+ private static global::System.Resources.ResourceManager resourceMan;
+
+ private static global::System.Globalization.CultureInfo resourceCulture;
+
+ [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+ internal Resources() {
+ }
+
+ ///
+ /// Returns the cached ResourceManager instance used by this class.
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Resources.ResourceManager ResourceManager {
+ get {
+ if (object.ReferenceEquals(resourceMan, null)) {
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Riskeer.Integration.IO.Properties.Resources", typeof(Resources).Assembly);
+ resourceMan = temp;
+ }
+ return resourceMan;
+ }
+ }
+
+ ///
+ /// Overrides the current thread's CurrentUICulture property for all
+ /// resource lookups using this strongly typed resource class.
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Globalization.CultureInfo Culture {
+ get {
+ return resourceCulture;
+ }
+ set {
+ resourceCulture = value;
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Veiligheidsoordeel is (deels) gebaseerd op handmatig ingevoerde toetsoordelen. Tijdens het exporteren worden handmatig ingevoerde toetsoordelen genegeerd..
+ ///
+ internal static string AssemblyExporter_CheckManualAssembly_Assembly_result_contains_manual_results_exporter_will_ignore_manual_results {
+ get {
+ return ResourceManager.GetString("AssemblyExporter_CheckManualAssembly_Assembly_result_contains_manual_results_expo" +
+ "rter_will_ignore_manual_results", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to {0} Er is geen toetsoordeel geëxporteerd..
+ ///
+ internal static string AssemblyExporter_Error_Exception_0_no_AssemblyResult_exported {
+ get {
+ return ResourceManager.GetString("AssemblyExporter_Error_Exception_0_no_AssemblyResult_exported", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Om een toetsoordeel te kunnen exporteren moet voor alle vakken een resultaat zijn gespecificeerd..
+ ///
+ internal static string AssemblyExporter_LogErrorMessage_Only_possible_to_export_a_complete_AssemblyResult {
+ get {
+ return ResourceManager.GetString("AssemblyExporter_LogErrorMessage_Only_possible_to_export_a_complete_AssemblyResul" +
+ "t", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Kon het rekeninstellingen bestand niet openen. {0}.
+ ///
+ internal static string HydraulicBoundaryDatabaseImporter_Cannot_open_hydraulic_calculation_settings_file_0_ {
+ get {
+ return ResourceManager.GetString("HydraulicBoundaryDatabaseImporter_Cannot_open_hydraulic_calculation_settings_file" +
+ "_0_", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to {0}
+ ///Er is geen hydraulische belastingen database gekoppeld..
+ ///
+ internal static string HydraulicBoundaryDatabaseImporter_HandleCriticalFileReadError_Error_0_No_HydraulicBoundaryDatabase_imported {
+ get {
+ return ResourceManager.GetString("HydraulicBoundaryDatabaseImporter_HandleCriticalFileReadError_Error_0_No_Hydrauli" +
+ "cBoundaryDatabase_imported", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to De tabel 'ScenarioInformation' in het HLCD bestand moet exact 1 rij bevatten..
+ ///
+ internal static string HydraulicBoundaryDatabaseImporter_HLCD_Invalid_number_of_ScenarioInformation_entries {
+ get {
+ return ResourceManager.GetString("HydraulicBoundaryDatabaseImporter_HLCD_Invalid_number_of_ScenarioInformation_entr" +
+ "ies", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Het bijbehorende HLCD bestand is niet gevonden in dezelfde map als het HRD bestand..
+ ///
+ internal static string HydraulicBoundaryDatabaseImporter_HLCD_sqlite_Not_Found {
+ get {
+ return ResourceManager.GetString("HydraulicBoundaryDatabaseImporter_HLCD_sqlite_Not_Found", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Hydraulische belastingen database koppelen afgebroken. Geen gegevens gewijzigd..
+ ///
+ internal static string HydraulicBoundaryDatabaseImporter_ProgressText_Import_canceled_No_data_changed {
+ get {
+ return ResourceManager.GetString("HydraulicBoundaryDatabaseImporter_ProgressText_Import_canceled_No_data_changed", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Inlezen van het hydraulische locatie configuratie bestand..
+ ///
+ internal static string HydraulicBoundaryDatabaseImporter_ProgressText_Reading_HLCD_file {
+ get {
+ return ResourceManager.GetString("HydraulicBoundaryDatabaseImporter_ProgressText_Reading_HLCD_file", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Inlezen van het hydraulische belastingen bestand..
+ ///
+ internal static string HydraulicBoundaryDatabaseImporter_ProgressText_Reading_HRD_file {
+ get {
+ return ResourceManager.GetString("HydraulicBoundaryDatabaseImporter_ProgressText_Reading_HRD_file", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Inlezen van het rekeninstellingen bestand..
+ ///
+ internal static string HydraulicBoundaryDatabaseImporter_ProgressText_Reading_HRD_settings_file {
+ get {
+ return ResourceManager.GetString("HydraulicBoundaryDatabaseImporter_ProgressText_Reading_HRD_settings_file", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to {0}
+ ///Er is geen HLCD geïmporteerd..
+ ///
+ internal static string HydraulicLocationConfigurationDatabaseImporter_HandleCriticalFileReadError_Error_0_No_HydraulicLocationConfigurationDatabase_imported {
+ get {
+ return ResourceManager.GetString("HydraulicLocationConfigurationDatabaseImporter_HandleCriticalFileReadError_Error_" +
+ "0_No_HydraulicLocationConfigurationDatabase_imported", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Het HLCD bestand is niet gevonden in dezelfde map als het HRD bestand..
+ ///
+ internal static string HydraulicLocationConfigurationDatabaseImporter_HLCD_not_in_same_folder_as_HRD {
+ get {
+ return ResourceManager.GetString("HydraulicLocationConfigurationDatabaseImporter_HLCD_not_in_same_folder_as_HRD", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to 1 of meerdere locaties komen niet voor in de HLCD..
+ ///
+ internal static string HydraulicLocationConfigurationDatabaseImporter_Invalid_locationIds {
+ get {
+ return ResourceManager.GetString("HydraulicLocationConfigurationDatabaseImporter_Invalid_locationIds", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to De tabel 'ScenarioInformation' moet exact 1 rij bevatten..
+ ///
+ internal static string HydraulicLocationConfigurationDatabaseImporter_Invalid_number_of_ScenarioInformation_entries {
+ get {
+ return ResourceManager.GetString("HydraulicLocationConfigurationDatabaseImporter_Invalid_number_of_ScenarioInformat" +
+ "ion_entries", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to HLCD bestand importeren afgebroken. Geen gegevens gewijzigd..
+ ///
+ internal static string HydraulicLocationConfigurationDatabaseImporter_ProgressText_Import_canceled_No_data_changed {
+ get {
+ return ResourceManager.GetString("HydraulicLocationConfigurationDatabaseImporter_ProgressText_Import_canceled_No_da" +
+ "ta_changed", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Assemblage.
+ ///
+ internal static string SerializableAssembly_IdPrefix {
+ get {
+ return ResourceManager.GetString("SerializableAssembly_IdPrefix", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Bp.
+ ///
+ internal static string SerializableAssessmentProcess_IdPrefix {
+ get {
+ return ResourceManager.GetString("SerializableAssessmentProcess_IdPrefix", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Wks.
+ ///
+ internal static string SerializableAssessmentSection_IdPrefix {
+ get {
+ return ResourceManager.GetString("SerializableAssessmentSection_IdPrefix", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Gto.
+ ///
+ internal static string SerializableCombinedFailureMechanismSectionAssembly_IdPrefix {
+ get {
+ return ResourceManager.GetString("SerializableCombinedFailureMechanismSectionAssembly_IdPrefix", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Ts.
+ ///
+ internal static string SerializableFailureMechanismCreator_IdPrefix {
+ get {
+ return ResourceManager.GetString("SerializableFailureMechanismCreator_IdPrefix", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Tv.
+ ///
+ internal static string SerializableFailureMechanismSection_IdPrefix {
+ get {
+ return ResourceManager.GetString("SerializableFailureMechanismSection_IdPrefix", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to T.
+ ///
+ internal static string SerializableFailureMechanismSectionAssembly_IdPrefix {
+ get {
+ return ResourceManager.GetString("SerializableFailureMechanismSectionAssembly_IdPrefix", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Vi.
+ ///
+ internal static string SerializableFailureMechanismSectionCollection_IdPrefix {
+ get {
+ return ResourceManager.GetString("SerializableFailureMechanismSectionCollection_IdPrefix", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Vo.
+ ///
+ internal static string SerializableTotalAssemblyResult_IdPrefix {
+ get {
+ return ResourceManager.GetString("SerializableTotalAssemblyResult_IdPrefix", resourceCulture);
+ }
+ }
+ }
+}
Index: Ringtoets/Integration/src/Riskeer.Integration.IO/Properties/Resources.resx
===================================================================
diff -u
--- Ringtoets/Integration/src/Riskeer.Integration.IO/Properties/Resources.resx (revision 0)
+++ Ringtoets/Integration/src/Riskeer.Integration.IO/Properties/Resources.resx (revision 457970572d405d707ca5a96836d6a48babffc3a7)
@@ -0,0 +1,197 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ Wks
+
+
+ Vo
+
+
+ Assemblage
+
+
+ Bp
+
+
+ Ts
+
+
+ Tv
+
+
+ T
+
+
+ Vi
+
+
+ Gto
+
+
+ {0} Er is geen toetsoordeel geëxporteerd.
+
+
+ Om een toetsoordeel te kunnen exporteren moet voor alle vakken een resultaat zijn gespecificeerd.
+
+
+ Veiligheidsoordeel is (deels) gebaseerd op handmatig ingevoerde toetsoordelen. Tijdens het exporteren worden handmatig ingevoerde toetsoordelen genegeerd.
+
+
+ Inlezen van het hydraulische belastingen bestand.
+
+
+ {0}
+Er is geen hydraulische belastingen database gekoppeld.
+
+
+ Hydraulische belastingen database koppelen afgebroken. Geen gegevens gewijzigd.
+
+
+ Inlezen van het hydraulische locatie configuratie bestand.
+
+
+ Het bijbehorende HLCD bestand is niet gevonden in dezelfde map als het HRD bestand.
+
+
+ Inlezen van het rekeninstellingen bestand.
+
+
+ Kon het rekeninstellingen bestand niet openen. {0}
+
+
+ De tabel 'ScenarioInformation' in het HLCD bestand moet exact 1 rij bevatten.
+
+
+ {0}
+Er is geen HLCD geïmporteerd.
+
+
+ Het HLCD bestand is niet gevonden in dezelfde map als het HRD bestand.
+
+
+ De tabel 'ScenarioInformation' moet exact 1 rij bevatten.
+
+
+ HLCD bestand importeren afgebroken. Geen gegevens gewijzigd.
+
+
+ 1 of meerdere locaties komen niet voor in de HLCD.
+
+
\ No newline at end of file
Index: Ringtoets/Integration/src/Riskeer.Integration.IO/Riskeer.Integration.IO.csproj
===================================================================
diff -u
--- Ringtoets/Integration/src/Riskeer.Integration.IO/Riskeer.Integration.IO.csproj (revision 0)
+++ Ringtoets/Integration/src/Riskeer.Integration.IO/Riskeer.Integration.IO.csproj (revision 457970572d405d707ca5a96836d6a48babffc3a7)
@@ -0,0 +1,230 @@
+
+
+
+ {D693D18E-C257-4FDE-96BC-F6E6FB043ECF}
+ Riskeer.Integration.IO
+ Riskeer.Integration.IO
+
+
+
+
+ ..\..\..\..\packages\log4net.2.0.4\lib\net40-full\log4net.dll
+ True
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ True
+ True
+ Resources.resx
+
+
+
+
+ Copying.licenseheader
+
+
+
+
+
+ ResXFileCodeGenerator
+ Resources.Designer.cs
+
+
+
+
+ {3BBFD65B-B277-4E50-AE6D-BD24C3434609}
+ Core.Common.Base
+ False
+
+
+ {E344867E-9AC9-44C8-88A5-8185681679A9}
+ Core.Common.IO
+ False
+
+
+ {F49BD8B2-332A-4C91-A196-8CCE0A2C7D98}
+ Core.Common.Util
+ False
+
+
+ {FD264FAD-E6F9-47CC-97CD-770199A8E629}
+ Core.Components.Gis.IO
+ False
+
+
+ {318BA582-88C9-4816-A54A-A7E431461DE3}
+ Core.Components.Gis
+ False
+
+
+ {420ed9c3-0c33-47ea-b893-121a9c0db4f1}
+ Riskeer.AssemblyTool.Data
+ False
+
+
+ {b9838495-b090-4b84-a387-a8974f4f9cc4}
+ Riskeer.AssemblyTool.IO
+ False
+
+
+ {c6309704-d67b-434c-bc98-9f8910bc1d10}
+ Ringtoets.ClosingStructures.Data
+ False
+
+
+ {D4200F43-3F72-4F42-AF0A-8CED416A38EC}
+ Ringtoets.Common.Data
+ False
+
+
+ {52ba7627-cbab-4209-be77-3b5f31378277}
+ Ringtoets.Common.IO
+ False
+
+
+ {6A074D65-A81C-4C1C-8E24-F36C916E4ED7}
+ Ringtoets.Common.Util
+ False
+
+
+ {d1068432-c172-4aa6-847b-d9deb4c6de26}
+ Ringtoets.DuneErosion.Data
+ False
+
+
+ {90de728e-48ef-4665-ab38-3d88e41d9f4d}
+ Ringtoets.GrassCoverErosionInwards.Data
+ False
+
+
+ {e7225477-577f-4a17-b7ec-6721158e1543}
+ Ringtoets.GrassCoverErosionOutwards.Data
+ False
+
+
+ {1c0017d8-35b5-4ca0-8fc7-a83f46dbdc99}
+ Ringtoets.HeightStructures.Data
+ False
+
+
+ {B69D5B6C-6E14-4FA9-9EBC-8F97678CDB70}
+ Ringtoets.HydraRing.IO
+ False
+
+
+ {83d6b73e-91d5-46b0-9218-955da1f75f7c}
+ Ringtoets.MacroStabilityInwards.Data
+ False
+
+
+ {CE994CC9-6F6A-48AC-B4BE-02C30A21F4DB}
+ Ringtoets.Piping.Data
+ False
+
+
+ {3d4b9740-8348-4434-8d77-b611fc6ee57f}
+ Ringtoets.StabilityPointStructures.Data
+ False
+
+
+ {b479e3af-7c34-488c-bb73-d324100d36c9}
+ Ringtoets.StabilityStoneCover.Data
+ False
+
+
+ {567e0b69-5280-41ce-add6-443725a61c86}
+ Ringtoets.WaveImpactAsphaltCover.Data
+ False
+
+
+ {11F1F874-45AF-43E4-8AE5-15A5C9593E28}
+ Riskeer.Integration.Data
+ False
+
+
+ {d4d21027-b2cd-47e2-a299-70885cc93ab4}
+ Riskeer.Integration.Util
+ False
+
+
+
\ No newline at end of file
Index: Ringtoets/Integration/src/Riskeer.Integration.IO/packages.config
===================================================================
diff -u
--- Ringtoets/Integration/src/Riskeer.Integration.IO/packages.config (revision 0)
+++ Ringtoets/Integration/src/Riskeer.Integration.IO/packages.config (revision 457970572d405d707ca5a96836d6a48babffc3a7)
@@ -0,0 +1,25 @@
+
+
+
+
\ No newline at end of file