Index: DamClients/DamUI/branches/DamUI 19.1/doc/DAM UI - Functional Design/DataFormat.tex
===================================================================
diff -u -r2360 -r2715
--- DamClients/DamUI/branches/DamUI 19.1/doc/DAM UI - Functional Design/DataFormat.tex	(.../DamUI 19.1; closed after 19.1.500 release/doc/DAM UI - Functional Design/DataFormat.tex)	(revision 2360)
+++ DamClients/DamUI/branches/DamUI 19.1/doc/DAM UI - Functional Design/DataFormat.tex	(.../DamUI 19.1/doc/DAM UI - Functional Design/DataFormat.tex)	(revision 2715)
@@ -1,25 +1,59 @@
 \chapter{Data format}\label{sec:USDataFormat}
 
-All required and optional import data is placed in table OverviewDataUIAndEngine.xls, tab DAM\_input
+Validation is done during three phases: import, editing in UI and for calculation.
 
+\section{Validation during import}
+
+All required and optional import data is placed in table OverviewDataUIAndEngine.xlsx, tab DAM\_input.
+
 \ProgramName can import data from csv files and shape files
 The sequence of import is
  1. csv files (except scenarios.csv), overwritten by:
 	2. shape files, overwritten by:
 		3. scenario.csv
+If data is not present during import the default value is used, when a default is available. Default values are mentioned in OverviewDataUIAndEngine.xlsx
 
-\section{Presence}
-If data is not present in the import, though required, \ProgramName uses the default value from OverviewDataUIAndEngine.xls, tab DAM\_input.
+Required data
+Data can be required when importing and/or required when calculating.
+In OverviewDataUIAndEngine.xlsx is described what data is required and when. Example: crosssection and dikering$\_$ are only required when using shapefiles (see column remark).\newline
+If data is required for import and is missing or invalid, the exception handling is dependent of the kind of data, see \autoref{table:ExceptionHandlingReqData}.
+Messages are given in the log window.
 
-\section{Validation}
-In OverviewDataUIAndEngine.xls, tab DAM\_input the required data is listed. If not present, an error must be given.
-In OverviewDataUIAndEngine.xls, tab DAM\_input the optional data is listed. If not present, no error or warning is given.
+\begin{table}[H]
+\begin{tabular}{|p{40mm}|p{\textwidth-40mm-24pt}|} \hline
+\textbf{Parameter} & \textbf{Exception handling} \\ \hline
+location$\_$id in location.csv (or via shape) & All locations with missing location$\_$id are not imported and message is given. \\ \hline
+location$\_$id in scenarios.csv (or via shape) & All scenarios with missing location$\_$id are not imported and message is given. \\ \hline
+surfaceline in location.csv$\_$id & All locations with missing surfaceline$\_$id are not imported and message is given. \\ \hline
+Profielnaam in surfacelines.csv$\_$id & All surfacelines with missing surfaceline$\_$id are not imported and message is given. \\ \hline
+dikering$\_$id via shape & Project is not imported and message is given. \\ \hline
+segment$\_$id in locations.csv or via shape & All locations with missing segment$\_$id are not imported and message is given. \\ \hline
+segment$\_$id in segment.csv & All locations using segments with missing segment$\_$id are not imported and message is given. \\ \hline
+calculation$\_$type in segments.csv & All locations using segments with missing calculation$\_$type are not imported and message is given. \\ \hline
+soilprofile$\_$id in segments.csv & All locations using segments with missing soilprofile$\_$id are not imported and message is given.  \\ \hline
+top$\_$level in soilprofiles.csv& All locations linked (via segment) to soilprofiles with missing top$\_$level are not imported and message is given. \\ \hline
+location$\_$scenario$\_$id & All scenarios with missing location$\_$scenario$\_$id are not imported and message is given. \\ \hline
+characteristic points (required) & All locations with missing required characteristic points are not imported and message is given. \\ \hline
+crosssection (via shape) & All locations with missing cross section are not imported and message is given. \\ \hline
+\end{tabular}
+\caption{Exception handling required data during import}
+\label{table:ExceptionHandlingReqData}
+\end{table}
 
-The data is validated by the used kernels when calculations are started. DAM validates during the import of the data and during editing by user in the User interface.
+In OverviewDataUIAndEngine.xls, tab DAM\_input also the optional data is listed. If these parameters are not present, no error or warning is given. When a default is available, this value is used, otherwise the parameters is NULL.
+If the parameter is required for calculation and the value is NULL and the kernel does not provide a default, an error message is given.
 
 \subsection{Editing characteristic points}\label{sec:ValCharPoints}
 When the characteristic points are edited by the user in the UI, they must be validated by rules in following table. 	Blue text validations are not implemented yet. 
 
+\begin{figure}[H]
+	\centering
+		\includegraphics[width=1\textwidth]{pictures/Figure_CharacteristicPointsInMacroStability.png}
+	\caption{Characteristic points on the surface line}
+	\label{fig:CharPoints}
+\end{figure}
+
+
 \begin{tabular}{|p{35mm}|p{35mm}|p{\textwidth-72pt-105mm}|p{13mm}|p{11mm}|p{11mm}|} \hline
 \textbf{Name EN} & \textbf{Name NL} & \textbf{Symbol} & \textbf{Unit} & \textbf{Min value} & \textbf{Max value} \\ \hline
 \multirow{2}{35mm}{Surface level outside} & \multirow{2}{35mm}{Maaiveld buitenwaarts} & X$_{C}$ & m & - & - \\ \cline{3-6}
@@ -56,8 +90,7 @@
  &  & Z$_{R}$ & m NAP & - & - \\ \hline
 \end{tabular}
 
-
-If an required characteristic point is missing, (validation)message must be given: Characteristic point <Name> is missing.\newline
+If a required characteristic point is missing, (validation)message must be given: Characteristic point <Name> is missing.\newline
 Required characteristic points are: 
 \begin{itemize}
 	\item Surface level outside
@@ -68,14 +101,21 @@
 	\item Surface level inside
 \end{itemize}
 
-If a set of characteristic points is not complete, (validation)message must be given: Set Characteristic points <Name> is not complete.\newline
+If a set of characteristic points is not complete, (validation)message must be given: Set Characteristic points <Name> is not complete. NL: Set karakteristieke <Naam> is niet compleet. \newline
 Sets of characteristic points (Name and points from table) are:
 \begin{itemize}
-	\item TrafficLoad (H and I in table)
-	\item ShoulderOutside (E and F in table)
-	\item ShoulderInside (K and L in table)
-	\item Ditch (N,O,P and Q in table)
+	\item TrafficLoad (H and I in table) NL: Verkeersbelasting
+	\item ShoulderOutside (E and F in table) NL: Buitenberm
+	\item ShoulderInside (K and L in table) NL: Binnenberm
+	\item Ditch (N,O,P and Q in table) NL: Sloot
 \end{itemize}
 
 Note: All sets are optional, but when one of the characteristic points is asigned, the others of the set must also be present.
 
+\section{Validation during editing}
+\ProgramName validates during the import of the data and during editing by user in the User interface. Minimal and maximum values are given in OverviewDataUIAndEngine.xlsx.
+The data is also validated by the used kernels when calculations are started.
+
+\section{Validation for calculation}
+\ProgramName validates during the import of the data and during editing by user in the User interface.
+The data is also validated by the used kernels when calculations are started. Messages are given in the log window.
