\section{The Data Source Repository}
\label{sec:DSR}

The primary function of the DSR interface is to provide a uniform method to
create connections to data sources.  Most importantly, we expect that it
will be used for creating connections to the MDR and STR when the AutoMed
tool is started.  To do so, the DSR interface reads in a configuration file
which contains data source definitions.  A data source definition contains
values for a number of \textbf{directives}.  A directive is a line that
starts with a keyword.  A \textbf{property} (a directive that does not start
with a keywoard) can also be included for specific purposes.  The data
source for which the property is defined must itself provide support for
using the directive.  The keyword directives are summarized in
Table~\ref{table:dsr_keywords}.

\begin{stdtable}{Keyword directives in a data source definition}
{table:dsr_keywords}

\begin{tabular}{llll}
\multicolumn{4}{>{\columncolor{header}}c}{Keyword directives} \\[0.3cm]
\rowcolor{header}
Keyword & Argument Type & Description & Type \\
\textbf{DataSource}
& \texttt{String}
& The name of the data source for
& Required \\
 & & which all directives up to the & \\
 & & next DataSource apply & \\
\rowcolor{evenrow}
\textbf{ConnectionType}
& \texttt{String}
& Currently only type JDBC is
& Required \\
\rowcolor{evenrow}
 & & supported & \\
\textbf{JdbcURL}
& \texttt{String}
& The JDBC URL used to connect
& Required \\
 & & to the data source & \\
\rowcolor{evenrow}
\textbf{JdbcDriver}
& \texttt{String}
& The fully qualified name of the
& Required \\
\rowcolor{evenrow}
 & & JDBC driver class needed to & \\
\rowcolor{evenrow}
 & & connect to the data source & \\
\textbf{Username}
& \texttt{String}
& Username needed to connect to
& Optional \\
 & & data source & \\
\rowcolor{evenrow}
\textbf{Password}
& \texttt{String}
& Password needed to connect to
& Optional \\
\rowcolor{evenrow}
 & & data source & \\
\end{tabular}

\end{stdtable}

The DSR interface contains the necessary methods for creating objects
of the Java type \texttt{java.sql.Connection} according to the information
supplied by the configuration file.
