356 lines
14 KiB
HTML
356 lines
14 KiB
HTML
|
<!--NewPage-->
|
||
|
<html>
|
||
|
<head>
|
||
|
<!-- Generated by javadoc on Sat May 10 12:20:47 1997 -->
|
||
|
<a name="_top_"></a>
|
||
|
<title>
|
||
|
Class ParameterDB
|
||
|
</title>
|
||
|
</head>
|
||
|
<body>
|
||
|
<h1>
|
||
|
Class ParameterDB
|
||
|
</h1>
|
||
|
<pre>
|
||
|
<a href="java.lang.Object.html#_top_">java.lang.Object</a>
|
||
|
|
|
||
|
+----ParameterDB
|
||
|
</pre>
|
||
|
<hr>
|
||
|
<dl>
|
||
|
<dt> class <b>ParameterDB</b>
|
||
|
<dt> extends <a href="java.lang.Object.html#_top_">Object</a>
|
||
|
</dl>
|
||
|
This class contains a Properties object that is used to store all
|
||
|
of the parameter names and their corresponding values. It contains
|
||
|
a secondary Property object that is initialized with the default
|
||
|
values of the parameters as described in Chapter 5 of the lil-gp
|
||
|
User's Manual.
|
||
|
More importantly, this class contains all of the methods responsible
|
||
|
for parsing the parameter values for errors before the output file
|
||
|
can be generated.
|
||
|
This class also contains a Vector object that is used to store
|
||
|
errors encountered while parsing the database. Once the parse is
|
||
|
complete, an ErrorFrame is instantiated and the error Vector is
|
||
|
passed in.
|
||
|
<dl>
|
||
|
<dt> <b>See Also:</b>
|
||
|
<dd> <a href="ErrorFrame.html#_top_">ErrorFrame</a>
|
||
|
</dl>
|
||
|
<hr>
|
||
|
<a name="index"></a>
|
||
|
<h2>
|
||
|
<img src="images/variable-index.gif" width=207 height=38 alt="Variable Index">
|
||
|
</h2>
|
||
|
<dl>
|
||
|
<dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o ">
|
||
|
<a href="#endl"><b>endl</b></a>
|
||
|
<dd>
|
||
|
</dl>
|
||
|
<h2>
|
||
|
<img src="images/constructor-index.gif" width=275 height=38 alt="Constructor Index">
|
||
|
</h2>
|
||
|
<dl>
|
||
|
<dt> <img src="images/yellow-ball-small.gif" width=6 height=6 alt=" o ">
|
||
|
<a href="#ParameterDB()"><b>ParameterDB</b></a>()
|
||
|
<dd> The constructor method is responsible for creating a default
|
||
|
Property object and instantiating the main Property object.
|
||
|
</dl>
|
||
|
<h2>
|
||
|
<img src="images/method-index.gif" width=207 height=38 alt="Method Index">
|
||
|
</h2>
|
||
|
<dl>
|
||
|
<dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
|
||
|
<a href="#addToDB(java.lang.String, java.lang.String)"><b>addToDB</b></a>(String, String)
|
||
|
<dd> This method allows external classes to request that
|
||
|
a parameter be added to the database.
|
||
|
<dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
|
||
|
<a href="#delFromDB(java.lang.String)"><b>delFromDB</b></a>(String)
|
||
|
<dd> This method allows external classes to request that
|
||
|
a parameter be deleted from the database.
|
||
|
<dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
|
||
|
<a href="#displayErrors()"><b>displayErrors</b></a>()
|
||
|
<dd> This method is responsible for creating the ErrorFrame.
|
||
|
<dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
|
||
|
<a href="#dump()"><b>dump</b></a>()
|
||
|
<dd> A useful debugging method that dumps the contents of the database
|
||
|
|
||
|
<dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
|
||
|
<a href="#getElements()"><b>getElements</b></a>()
|
||
|
<dd> This method allows external classes to request an
|
||
|
Enumeration of the elements in the parameter database.
|
||
|
<dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
|
||
|
<a href="#getKeys()"><b>getKeys</b></a>()
|
||
|
<dd> This method allows external classes to request an
|
||
|
Enumeration of the keys in the parameter database.
|
||
|
<dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
|
||
|
<a href="#getProp(java.lang.String)"><b>getProp</b></a>(String)
|
||
|
<dd> This method allows external classes to request a
|
||
|
specific parameter in the database.
|
||
|
<dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
|
||
|
<a href="#OLDsave(java.lang.String)"><b>OLDsave</b></a>(String)
|
||
|
<dd> This method is responsible for generating the output file that
|
||
|
will be used as input for lil-gp.
|
||
|
<dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
|
||
|
<a href="#open(java.lang.String)"><b>open</b></a>(String)
|
||
|
<dd> This method is repsonsible for opening an existing parameter file and
|
||
|
reading the contents into a temporary hashtable.
|
||
|
<dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
|
||
|
<a href="#parse()"><b>parse</b></a>()
|
||
|
<dd> This method simply adds informative comments to the error Vector
|
||
|
add calls the appropriate parse methods for each panel.
|
||
|
<dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
|
||
|
<a href="#purgeOldPhases()"><b>purgeOldPhases</b></a>()
|
||
|
<dd> This method will purge all parameters associated with breeding
|
||
|
phases from the database.
|
||
|
<dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
|
||
|
<a href="#purgeOldSubPopExchanges()"><b>purgeOldSubPopExchanges</b></a>()
|
||
|
<dd> This method will purge all of the parameters associated with
|
||
|
exchanges between sub-populations.
|
||
|
<dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
|
||
|
<a href="#purgeOldSubPopParameters()"><b>purgeOldSubPopParameters</b></a>()
|
||
|
<dd> This method purges the parameters associated with multiple
|
||
|
sub-populations, but does not purge the parameters associated
|
||
|
with the actual sub-pop exchanges.
|
||
|
<dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
|
||
|
<a href="#purgeUserDefinedParameters()"><b>purgeUserDefinedParameters</b></a>()
|
||
|
<dd>
|
||
|
<dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
|
||
|
<a href="#save(java.lang.String)"><b>save</b></a>(String)
|
||
|
<dd>
|
||
|
</dl>
|
||
|
<a name="variables"></a>
|
||
|
<h2>
|
||
|
<img src="images/variables.gif" width=153 height=38 alt="Variables">
|
||
|
</h2>
|
||
|
<a name="endl"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a>
|
||
|
<b>endl</b>
|
||
|
<pre>
|
||
|
public static <a href="java.lang.String.html#_top_">String</a> endl
|
||
|
</pre>
|
||
|
<a name="constructors"></a>
|
||
|
<h2>
|
||
|
<img src="images/constructors.gif" width=231 height=38 alt="Constructors">
|
||
|
</h2>
|
||
|
<a name="ParameterDB"></a>
|
||
|
<a name="ParameterDB()"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a>
|
||
|
<b>ParameterDB</b>
|
||
|
<pre>
|
||
|
public ParameterDB()
|
||
|
</pre>
|
||
|
<dl>
|
||
|
<dd> The constructor method is responsible for creating a default
|
||
|
Property object and instantiating the main Property object.
|
||
|
</dl>
|
||
|
<a name="methods"></a>
|
||
|
<h2>
|
||
|
<img src="images/methods.gif" width=151 height=38 alt="Methods">
|
||
|
</h2>
|
||
|
<a name="getKeys()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
|
||
|
<a name="getKeys"><b>getKeys</b></a>
|
||
|
<pre>
|
||
|
public <a href="java.util.Enumeration.html#_top_">Enumeration</a> getKeys()
|
||
|
</pre>
|
||
|
<dl>
|
||
|
<dd> This method allows external classes to request an
|
||
|
Enumeration of the keys in the parameter database.
|
||
|
<dl>
|
||
|
<dt> <b>Returns:</b>
|
||
|
<dd> an Enumeration of the keys
|
||
|
</dl>
|
||
|
</dl>
|
||
|
<a name="getElements()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
|
||
|
<a name="getElements"><b>getElements</b></a>
|
||
|
<pre>
|
||
|
public <a href="java.util.Enumeration.html#_top_">Enumeration</a> getElements()
|
||
|
</pre>
|
||
|
<dl>
|
||
|
<dd> This method allows external classes to request an
|
||
|
Enumeration of the elements in the parameter database.
|
||
|
<dl>
|
||
|
<dt> <b>Returns:</b>
|
||
|
<dd> an Enumeration of the elements
|
||
|
</dl>
|
||
|
</dl>
|
||
|
<a name="getProp(java.lang.String)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
|
||
|
<a name="getProp"><b>getProp</b></a>
|
||
|
<pre>
|
||
|
public <a href="java.lang.String.html#_top_">String</a> getProp(<a href="java.lang.String.html#_top_">String</a> key)
|
||
|
</pre>
|
||
|
<dl>
|
||
|
<dd> This method allows external classes to request a
|
||
|
specific parameter in the database.
|
||
|
<dl>
|
||
|
<dt> <b>Parameters:</b>
|
||
|
<dd> key - String object containing the desired property key
|
||
|
<dt> <b>Returns:</b>
|
||
|
<dd> the value associated with key
|
||
|
</dl>
|
||
|
</dl>
|
||
|
<a name="addToDB(java.lang.String, java.lang.String)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
|
||
|
<a name="addToDB"><b>addToDB</b></a>
|
||
|
<pre>
|
||
|
public void addToDB(<a href="java.lang.String.html#_top_">String</a> name,
|
||
|
<a href="java.lang.String.html#_top_">String</a> value)
|
||
|
</pre>
|
||
|
<dl>
|
||
|
<dd> This method allows external classes to request that
|
||
|
a parameter be added to the database. If the parameter
|
||
|
is already in the database, its old value is replaced with
|
||
|
the specified value.
|
||
|
<dl>
|
||
|
<dt> <b>Parameters:</b>
|
||
|
<dd> name - String object containing the name of the parameter
|
||
|
<dd> value - String object containing the value of the parameter.
|
||
|
</dl>
|
||
|
</dl>
|
||
|
<a name="delFromDB(java.lang.String)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
|
||
|
<a name="delFromDB"><b>delFromDB</b></a>
|
||
|
<pre>
|
||
|
public void delFromDB(<a href="java.lang.String.html#_top_">String</a> name)
|
||
|
</pre>
|
||
|
<dl>
|
||
|
<dd> This method allows external classes to request that
|
||
|
a parameter be deleted from the database.
|
||
|
<dl>
|
||
|
<dt> <b>Parameters:</b>
|
||
|
<dd> name - String object containing the name of the parameter
|
||
|
</dl>
|
||
|
</dl>
|
||
|
<a name="purgeOldPhases()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
|
||
|
<a name="purgeOldPhases"><b>purgeOldPhases</b></a>
|
||
|
<pre>
|
||
|
public void purgeOldPhases()
|
||
|
</pre>
|
||
|
<dl>
|
||
|
<dd> This method will purge all parameters associated with breeding
|
||
|
phases from the database. It is called when the user clicks on
|
||
|
the 'purge' button on the BreedingPanel and before adding new
|
||
|
breed phase parameters when the user clicks the 'accept' button.
|
||
|
</dl>
|
||
|
<a name="purgeOldSubPopExchanges()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
|
||
|
<a name="purgeOldSubPopExchanges"><b>purgeOldSubPopExchanges</b></a>
|
||
|
<pre>
|
||
|
public void purgeOldSubPopExchanges()
|
||
|
</pre>
|
||
|
<dl>
|
||
|
<dd> This method will purge all of the parameters associated with
|
||
|
exchanges between sub-populations. It does not remove the
|
||
|
following parameters:
|
||
|
<ul><li>multiple.sub_pops
|
||
|
<li>multiple.exch_gen
|
||
|
<li>multiple.exchanges</ul>
|
||
|
It is called when the user clicks on the 'purge' button on the
|
||
|
SubPopsPanel and also before new exchanges are added to the
|
||
|
database.
|
||
|
<dl>
|
||
|
<dt> <b>See Also:</b>
|
||
|
<dd> <a href="#purgeOldSubPopParameters">purgeOldSubPopParameters</a>
|
||
|
</dl>
|
||
|
</dl>
|
||
|
<a name="purgeUserDefinedParameters()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
|
||
|
<a name="purgeUserDefinedParameters"><b>purgeUserDefinedParameters</b></a>
|
||
|
<pre>
|
||
|
public void purgeUserDefinedParameters()
|
||
|
</pre>
|
||
|
<a name="purgeOldSubPopParameters()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
|
||
|
<a name="purgeOldSubPopParameters"><b>purgeOldSubPopParameters</b></a>
|
||
|
<pre>
|
||
|
public void purgeOldSubPopParameters()
|
||
|
</pre>
|
||
|
<dl>
|
||
|
<dd> This method purges the parameters associated with multiple
|
||
|
sub-populations, but does not purge the parameters associated
|
||
|
with the actual sub-pop exchanges. It is called when the
|
||
|
user clicks on the 'purge' button and before new sub-pop
|
||
|
parameters are added to the database.
|
||
|
<dl>
|
||
|
<dt> <b>See Also:</b>
|
||
|
<dd> <a href="#purgeOldSubPopExchanges">purgeOldSubPopExchanges</a>
|
||
|
</dl>
|
||
|
</dl>
|
||
|
<a name="OLDsave(java.lang.String)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
|
||
|
<a name="OLDsave"><b>OLDsave</b></a>
|
||
|
<pre>
|
||
|
public void OLDsave(<a href="java.lang.String.html#_top_">String</a> filename) throws <a href="java.io.IOException.html#_top_">IOException</a>
|
||
|
</pre>
|
||
|
<dl>
|
||
|
<dd> This method is responsible for generating the output file that
|
||
|
will be used as input for lil-gp. Before generating the file,
|
||
|
it parses the parameters for errors. If there are no errors,
|
||
|
a FileOutputStream is created and the file is generated. The
|
||
|
parameters are grouped in the file by category and comments
|
||
|
are inserted to help make it readable.
|
||
|
<dl>
|
||
|
<dt> <b>Parameters:</b>
|
||
|
<dd> filename - String object containing the name of the output file
|
||
|
<dt> <b>See Also:</b>
|
||
|
<dd> <a href="#parse">parse</a>
|
||
|
</dl>
|
||
|
</dl>
|
||
|
<a name="save(java.lang.String)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
|
||
|
<a name="save"><b>save</b></a>
|
||
|
<pre>
|
||
|
public void save(<a href="java.lang.String.html#_top_">String</a> filename) throws <a href="java.io.IOException.html#_top_">IOException</a>
|
||
|
</pre>
|
||
|
<a name="open(java.lang.String)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
|
||
|
<a name="open"><b>open</b></a>
|
||
|
<pre>
|
||
|
public void open(<a href="java.lang.String.html#_top_">String</a> filename) throws <a href="java.io.IOException.html#_top_">IOException</a>
|
||
|
</pre>
|
||
|
<dl>
|
||
|
<dd> This method is repsonsible for opening an existing parameter file and
|
||
|
reading the contents into a temporary hashtable. If it encounters any
|
||
|
unexpected errors in the parameter file, it will abort the open process.
|
||
|
That is, it will leave the current settings on all of the panels intact
|
||
|
and show the user where the error occurred. If there are no sytax errors
|
||
|
in the file, then the parameters are run through the <tt>parse()</tt>
|
||
|
method. If there are no errors in the parameter settings, then the
|
||
|
<tt>loadParams()</tt> method is called for each panel.
|
||
|
<dl>
|
||
|
<dt> <b>Parameters:</b>
|
||
|
<dd> filename - the name of the input file
|
||
|
<dt> <b>See Also:</b>
|
||
|
<dd> <a href="BreedFrame.html#loadParams">loadParams</a>, <a href="BreedingPanel.html#loadParams">loadParams</a>, <a href="GeneralPanel.html#loadParams">loadParams</a>, <a href="InitializationPanel.html#loadParams">loadParams</a>, <a href="OutputPanel.html#loadParams">loadParams</a>, <a href="PhasePanel.html#loadParams">loadParams</a>, <a href="SubPopFrame.html#loadParams">loadParams</a>, <a href="SubPopsPanel.html#loadParams">loadParams</a>
|
||
|
</dl>
|
||
|
</dl>
|
||
|
<a name="dump()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
|
||
|
<a name="dump"><b>dump</b></a>
|
||
|
<pre>
|
||
|
public void dump()
|
||
|
</pre>
|
||
|
<dl>
|
||
|
<dd> A useful debugging method that dumps the contents of the database
|
||
|
</dl>
|
||
|
<a name="displayErrors()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
|
||
|
<a name="displayErrors"><b>displayErrors</b></a>
|
||
|
<pre>
|
||
|
public void displayErrors()
|
||
|
</pre>
|
||
|
<dl>
|
||
|
<dd> This method is responsible for creating the ErrorFrame.
|
||
|
<dl>
|
||
|
<dt> <b>See Also:</b>
|
||
|
<dd> <a href="ErrorFrame.html#_top_">ErrorFrame</a>, <a href="#addComment">addComment</a>, <a href="#addWarning">addWarning</a>, <a href="#addError">addError</a>
|
||
|
</dl>
|
||
|
</dl>
|
||
|
<a name="parse()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
|
||
|
<a name="parse"><b>parse</b></a>
|
||
|
<pre>
|
||
|
public boolean parse()
|
||
|
</pre>
|
||
|
<dl>
|
||
|
<dd> This method simply adds informative comments to the error Vector
|
||
|
add calls the appropriate parse methods for each panel. If there
|
||
|
were any errors or warnings encountered while parsing the parameters,
|
||
|
then return false.
|
||
|
<dl>
|
||
|
<dt> <b>Returns:</b>
|
||
|
<dd> true if there were no errors or warnings, else return false
|
||
|
<dt> <b>See Also:</b>
|
||
|
<dd> <a href="#parseGeneralPanel">parseGeneralPanel</a>, <a href="#parseOutputPanel">parseOutputPanel</a>, <a href="#parseLimitsPanel">parseLimitsPanel</a>, <a href="#parseInitPanel">parseInitPanel</a>, <a href="#parseBreedingPanel">parseBreedingPanel</a>, <a href="#parseSubPopsPanel">parseSubPopsPanel</a>
|
||
|
</dl>
|
||
|
</dl>
|
||
|
</body>
|
||
|
</html>
|