Class UserState

java.lang.Object
  |
  +--UserState

class UserState
extends java.lang.Object

The UserState class is used to read and write the user state. It also performs other functions including login validation for specific projects, read and write GeneBitSets (.cbs) and Condition lists (.hpl) in the State/ directory. directory.

This work was produced by Peter Lemkin of the National Cancer Institute, an agency of the United States Government. As a work of the United States Governzipipent there is no associated copyright. It is offered as open source software under the Mozilla Public License (version 1.1) subject to the limitations noted in the accompanying LEGAL file. This notice must be included with the code. The MAExplorer Mozilla and Legal files are available on http://maexplorer.sourceforge.net/.

Version:
$Date: 2003/07/21 19:40:15 $ $Revision: 1.50 $
Author:
P. Lemkin (NCI), G. Thornwall (SAIC), NCI-Frederick, Frederick, MD
See Also:
MAExplorer Home

Field Summary
private  java.awt.Frame dialogFrame
          for pLdq login dialog popup
private  FileIO fio
          link to global instance of FileIO
private  int idxName
          indices for values in startup DB table
private  int idxValue
          indices for values in startup DB table
private  MAExplorer mae
          link to global instance of MAExplorer
private  Table msuTbl
          application startup database table
private  int parseDelimChar
          current delim of "name(delim)value" pair
private  java.lang.String parseName
          current name of "name=value" pair
private  java.lang.String parseValue
          current value of "name=value" pair
(package private)  PopupLoginDialogQuery pLdq
          holds popup Login dialog query
(package private)  java.lang.String uName
          user name from dialog handler
(package private) static java.lang.String US_VERSION
          User Set version # for file format compatibility
 
Constructor Summary
(package private) UserState(MAExplorer mae, java.lang.String userStateName)
          UserState() - constructor
 
Method Summary
(package private)  java.lang.String check_dbID()
          check_dbID() - get or create Unique Database ID ("DIDxxxxxx").
(package private)  boolean checkAndMakeMAEdirTree(java.lang.String maePrjDir)
          checkAndMakeMAEdirTree()- check for MAE prject directory tree.
(package private)  java.lang.String createMAEstartupFileStr(boolean saveAllsamplesFlag)
          createMAEstartupFileStr() - create .mae startup DB File string.
(package private)  boolean doLogin(java.lang.String projectName, boolean doValidateChkFlag)
          doLogin() - get user login,password and do validation if requested
(package private)  float getFloatValFromLine(java.lang.String key, java.util.StringTokenizer parser)
          getFloatValFromLine() - get next line and parse value for key 'name='.
(package private)  int getIntValFromLine(java.lang.String key, java.util.StringTokenizer parser)
          getIntValFromLine() - get next line and parse value for key 'name='.
(package private)  long getLongValFromLine(java.lang.String key, java.util.StringTokenizer parser)
          getLongValFromLine() - get next line and parse value for key 'name='.
(package private)  java.lang.String getMAEstartupValue(java.lang.String name)
          getMAEstartupValue() - get value from MAE startup file DB
(package private)  int getNextInt(java.util.StringTokenizer parser)
          getNextInt() - parse next int from StringTokenizer the integers are separated by ',' or '\n'.
(package private)  boolean getNextStrNameValFromLine(java.util.StringTokenizer parser)
          getNextStrNameValFromLine() - get next line and parse 'name=value\n'.
(package private)  java.lang.String getStrValFromLine(java.lang.String key)
          getStrValFromLine() - parse value for key 'name=value\n'.
(package private)  java.lang.String getStrValFromLine(java.lang.String key, java.util.StringTokenizer parser)
          getStrValFromLine() - get line and parse value for key 'name=value\n'.
(package private)  boolean openOtherUserState(java.lang.String otherUserName, java.lang.String userStateName)
          openOtherUserState() - open other user's named user state [FUTURE]
(package private)  boolean openState(java.lang.String userStateName)
          openState() - open named user state
(package private)  boolean readMAEstartupFile(java.lang.String maeDirName, java.lang.String maeStartupFile)
          readMAEstartupFile() - read the .mae startup database File.
(package private)  boolean readStateFile(java.lang.String userName, java.lang.String password, java.lang.String stateName)
          readStateFile() - read the protected user State File [FUTURE] see writeStateFile() to see what have to read.
(package private)  int readUserGeneSet(java.lang.String cbsFileName, java.lang.String optMAEpath)
          readUserGeneSet() - read user gene bit set by file name and save it as a named gene set.
(package private) static boolean readUserGeneSetUPW(java.lang.String uN, java.lang.String uPW, int userCBSnbr)
          readUserGeneSetUPW() - read user gene bit set by set number [FUTURE]
(package private)  int readUserHPlist(java.lang.String hplFileName, java.lang.String optMAEpath)
          readUserHPlist() - read user sample HP list by file name and save it as a named HP list.
(package private)  int readUserOCLlist(java.lang.String oclFileName, java.lang.String optMAEpath)
          readUserOCLlist() - read user OCL list by file name and save it as a named OCL list.
(package private)  int resizeLAXfileData()
          resizeLAXfileData() - resize MAExplroer.lax file data for MAExplorer.
(package private)  int restoreCondLists()
          restoreCondLists() - read user HP condition lists from stand-alone file.
(package private)  int restoreGeneSets()
          restoreGeneSets() - read user gene bit sets from stand-alone file.
(package private) static boolean restoreUserGeneSet(int userCBSnbr)
          restoreUserGeneSet() - restore user gene bit set by set number [FUTURE]
(package private) static boolean restoreUserGeneSetUPW(java.lang.String userName, java.lang.String password, int userCBSnbr)
          restoreUserGeneSetUPW() - restore user gene bit set by set nbr [FUTURE]
(package private)  boolean saveNamedHPlist(Condition cond, int curCond)
          saveNamedHPlist() - save the named sample HP list (i.e.
(package private)  boolean saveNamedOCLlist(int oclNbr)
          saveNamedOCLlist() - save the named OCL list (i.e.
(package private)  boolean saveStateFile(java.lang.String loginName, java.lang.String password, java.lang.String stateName)
          saveStateFile() - save the user state in a file.
(package private)  boolean saveUserGeneSet(int userCBSnbr)
          saveUserGeneSet() - save user gene bit set by set number.
(package private)  boolean saveUserGeneSetUPW(java.lang.String uN, java.lang.String uPW, int userCBSnbr)
          saveUserGeneSetUPW() - save user gene bit set by set number [FUTURE]
(package private)  void setName(java.lang.String userStateName)
          setName() - set UserState name
(package private)  boolean shareUserState(java.lang.String otherUserName, java.lang.String userStateName, java.lang.String opr)
          shareUserState() - share/unshare user state with other user [FUTURE]
(package private)  boolean updateAllPluginsJarFiles()
          updateAllPluginsJarFiles() - update all MAEPlugins from server in the /Plugins directory This prompts for the user to verify they want to update all plugins jar files.
(package private)  boolean updateMAEprojectDB(java.lang.String maeProj, java.lang.String maeStartupDir, java.lang.String maeStartupFile, java.lang.String maeWebAddr)
          updateMAEprojectDB() - update 'install-dir'/maeProjects.txt DB file.
(package private)  boolean updateMAERlibrFiles()
          updateMAERlibrFiles() - download MAExplorer/lib/MAERlibr/* files into MAExplorer program install area.
 boolean updateMAERlibrFilesViaZip()
          updateMAERlibrFilesViaZip() - Download and install library files via MAERlibr.zip file.
(package private)  boolean updateMAExplorerJarFile()
          updateMAExplorerJarFile() - update MAExplorer.jar into program install area.
(package private)  boolean updateRmethodsFiles()
          updateRmethodsFiles() - download MAExplorer/{R/,RLO/,lib/MAERlibr/} methods files into MAExplorer program install area.
(package private)  boolean validateLoginAtServer(java.lang.String uN, java.lang.String uPW, java.lang.String uPrj)
          validateLoginAtServer() - validate login at MAE web server.
(package private)  boolean validateUserProject(java.lang.String userName, java.lang.String userPasswd, java.lang.String prjName)
          validateUserProject() - validate this HybSample login for this project.
(package private)  boolean writeMAEstartupFile(java.lang.String maeDirName, java.lang.String maeStartupFile, boolean saveAllsamplesFlag)
          writeMAEstartupFile() - write the .mae startup DB File.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

US_VERSION

static final java.lang.String US_VERSION
User Set version # for file format compatibility

mae

private MAExplorer mae
link to global instance of MAExplorer

fio

private FileIO fio
link to global instance of FileIO

uName

java.lang.String uName
user name from dialog handler

parseName

private java.lang.String parseName
current name of "name=value" pair

parseValue

private java.lang.String parseValue
current value of "name=value" pair

parseDelimChar

private int parseDelimChar
current delim of "name(delim)value" pair

msuTbl

private Table msuTbl
application startup database table

idxName

private int idxName
indices for values in startup DB table

idxValue

private int idxValue
indices for values in startup DB table

dialogFrame

private java.awt.Frame dialogFrame
for pLdq login dialog popup

pLdq

PopupLoginDialogQuery pLdq
holds popup Login dialog query
Constructor Detail

UserState

UserState(MAExplorer mae,
          java.lang.String userStateName)
UserState() - constructor
Parameters:
mae - is MAExplorer instance
userStateName - is the user state name
Method Detail

check_dbID

java.lang.String check_dbID()
check_dbID() - get or create Unique Database ID ("DIDxxxxxx"). It is used as prefix for State/ files. If it does not exist, then create it when save the database. The param is "dbID".

setName

void setName(java.lang.String userStateName)
setName() - set UserState name
Parameters:
userStateName - is the user state name

doLogin

boolean doLogin(java.lang.String projectName,
                boolean doValidateChkFlag)
doLogin() - get user login,password and do validation if requested
Parameters:
projectName - is the MAExplorer project database name
doValidateChkFlag - do a validation check.
See Also:
PopupLoginDialogQuery, PopupLoginDialogQuery.dialogQuery(java.lang.String, java.lang.String), Util.popupAlertMsg(java.lang.String, java.lang.String, int, int), Util.showMsg(java.lang.String), validateLoginAtServer(java.lang.String, java.lang.String, java.lang.String)

validateLoginAtServer

boolean validateLoginAtServer(java.lang.String uN,
                              java.lang.String uPW,
                              java.lang.String uPrj)
validateLoginAtServer() - validate login at MAE web server. If this is on the web, validate login at server.
Parameters:
uN - is the login Name
uPW - is the user password
uPrj - is the project name
Returns:
true if login is valid
See Also:
FileIO.logMsgln(java.lang.String), FileIO.readData(java.lang.String, java.lang.String), Util.showMsg(java.lang.String)

validateUserProject

boolean validateUserProject(java.lang.String userName,
                            java.lang.String userPasswd,
                            java.lang.String prjName)
validateUserProject() - validate this HybSample login for this project. If the user had already logged in and the project is the mae.validPrj[0:mae.nValidPrj-1] list, then don't check since already logged in. Otherwise, get the (uN,uPW) from popup dialog and then check with the server to see if the (uN,uPW,uPrj) is in the password file.

If the login is OK, then it has the side effect of setting

   mae.curProjName= projectName;
   mae.isLoggedInFlag= true;
 Also push projectName into the list of projects.
   mae.validProjects[mae.nValidProjects++]
Parameters:
userName - is the user name
userPasswd - is the user password
prjName - is the project name
Returns:
true if login is OK.
See Also:
doLogin(java.lang.String, boolean), validateLoginAtServer(java.lang.String, java.lang.String, java.lang.String)

openState

boolean openState(java.lang.String userStateName)
openState() - open named user state
Parameters:
userStateName - is the name of their state to access

openOtherUserState

boolean openOtherUserState(java.lang.String otherUserName,
                           java.lang.String userStateName)
openOtherUserState() - open other user's named user state [FUTURE]
Parameters:
otherUserName - is the other use name to access
userStateName - is the name of their state to access
Returns:
true if succeed in switching the state.

shareUserState

boolean shareUserState(java.lang.String otherUserName,
                       java.lang.String userStateName,
                       java.lang.String opr)
shareUserState() - share/unshare user state with other user [FUTURE]
Parameters:
otherUserName - is the other use name to access
userStateName - is the name of their state to access
opr - is the operation to perform "share" or "unshare"
Returns:
true if succeed in switching the state.

saveUserGeneSetUPW

boolean saveUserGeneSetUPW(java.lang.String uN,
                           java.lang.String uPW,
                           int userCBSnbr)
saveUserGeneSetUPW() - save user gene bit set by set number [FUTURE]
Parameters:
uN - is the login Name
uPW - is the user password
userCBSnbr - is the bit set number
See Also:
FileIO.writeData(java.lang.String, java.lang.String, java.lang.String), Util.showMsg(java.lang.String)

readUserGeneSetUPW

static boolean readUserGeneSetUPW(java.lang.String uN,
                                  java.lang.String uPW,
                                  int userCBSnbr)
readUserGeneSetUPW() - read user gene bit set by set number [FUTURE]
Parameters:
uN - is the login Name
uPW - is the user password
userCBSnbr - is the bit set number

saveUserGeneSet

boolean saveUserGeneSet(int userCBSnbr)
saveUserGeneSet() - save user gene bit set by set number. Make list of what is required to be saved to restore the gene set when it is read back... It saves it in a .cbs file with the prefix being the gene set name but with spaces changed to '_'
Parameters:
userCBSnbr - is the bit set number
See Also:
FileIO.writeData(java.lang.String, java.lang.String, java.lang.String), Util.showMsg(java.lang.String), Util.cvtSpacesToUnderscores(java.lang.String), Util.dateStr()

readUserGeneSet

int readUserGeneSet(java.lang.String cbsFileName,
                    java.lang.String optMAEpath)
readUserGeneSet() - read user gene bit set by file name and save it as a named gene set. If the gene set exists already, wipe out the old one. Note: the gene sets are kept in the State/ subdirectory. If optMAEpath is "@FULL-PATH", then cbsFileName is full path.
Parameters:
cbsFileName - file name for gene bit set
optMAEpath - is the optional path to the State/ directory
Returns:
the userCBSnbr else -1 if failed.
See Also:
FileIO.readData(java.lang.String, java.lang.String), GeneBitSet.findCountAndhighMID(GeneList), GeneBitSet.lookupOrMakeNewGeneBitSet(java.lang.String, GeneBitSet), Util.showMsg(java.lang.String), getIntValFromLine(java.lang.String, java.util.StringTokenizer), getLongValFromLine(java.lang.String, java.util.StringTokenizer), getNextStrNameValFromLine(java.util.StringTokenizer), getStrValFromLine(java.lang.String, java.util.StringTokenizer)

saveNamedHPlist

boolean saveNamedHPlist(Condition cond,
                        int curCond)
saveNamedHPlist() - save the named sample HP list (i.e. condition) as a .hpl file. A named sample HP list is a Condition instance and is kept in the list of conditions. It saves it in a State/*.hpl file with the prefix being the gene set condition name but with spaces changed to '_'
Parameters:
cond - is the Condition list of samples to save
Returns:
true if succeed
See Also:
FileIO.writeData(java.lang.String, java.lang.String, java.lang.String), Util.cvtSpacesToUnderscores(java.lang.String), Util.dateStr(), Util.showMsg(java.lang.String)

readUserHPlist

int readUserHPlist(java.lang.String hplFileName,
                   java.lang.String optMAEpath)
readUserHPlist() - read user sample HP list by file name and save it as a named HP list. A named sample HP list is a Condition instance and is kept in the list of conditions. It reads it in a State/*.hpl file with the prefix being the gene set condition name but with spaces changed to '_' If the named sample HP list exists already, wipe out the old one. Note: the HP list files are kept in the State/ subdirectory. If optMAEpath is "@FULL-PATH", then hplFileName is full path.
Parameters:
hplFileName - file name for HP sample list
optMAEpath - is the optional path to the State/ directory
Returns:
the hpListNbr else -1 if failed.
See Also:
Condition, FileIO.readData(java.lang.String, java.lang.String), Util.showMsg(java.lang.String), getIntValFromLine(java.lang.String, java.util.StringTokenizer), getNextStrNameValFromLine(java.util.StringTokenizer), getStrValFromLine(java.lang.String, java.util.StringTokenizer)

saveNamedOCLlist

boolean saveNamedOCLlist(int oclNbr)
saveNamedOCLlist() - save the named OCL list (i.e. ordered condition list) as a .ocl file.
Parameters:
oclNbr - is the Ordered Condition list to save
Returns:
true if succeed
See Also:
FileIO.writeData(java.lang.String, java.lang.String, java.lang.String), Util.cvtSpacesToUnderscores(java.lang.String), Util.dateStr(), Util.showMsg(java.lang.String)

readUserOCLlist

int readUserOCLlist(java.lang.String oclFileName,
                    java.lang.String optMAEpath)
readUserOCLlist() - read user OCL list by file name and save it as a named OCL list. A named OCL list is an Ordered condition instance and contains a list of conditions. It reads it in a State/*.ocl file with the prefix being the OCL name but with spaces changed to '_'
Parameters:
oclFileName - file name for OCL file
optMAEpath - is the optional path to the State/ directory
Returns:
the oclListNbr else -1 if failed.
See Also:
Condition, FileIO.readData(java.lang.String, java.lang.String), Util.showMsg(java.lang.String), getIntValFromLine(java.lang.String, java.util.StringTokenizer), getNextStrNameValFromLine(java.util.StringTokenizer), getStrValFromLine(java.lang.String, java.util.StringTokenizer)

restoreGeneSets

int restoreGeneSets()
restoreGeneSets() - read user gene bit sets from stand-alone file. If the data exists, then overide the Gene Class subsets set up by default by the GeneClass constructor. If the gene set exists already, wipe out the old one. Note: the gene sets are kept in the State/ subdirectory.
Returns:
number of sets restored.
See Also:
getMAEstartupValue(java.lang.String), readUserGeneSet(java.lang.String, java.lang.String)

restoreCondLists

int restoreCondLists()
restoreCondLists() - read user HP condition lists from stand-alone file. If the data exists, then overide the named HP lists set up by default by the init(). If the list exists already, wipe out the old one. Note: the HP list files are kept in the State/ subdirectory.
Returns:
number of lists restored.
See Also:
getMAEstartupValue(java.lang.String), readUserHPlist(java.lang.String, java.lang.String)

saveStateFile

boolean saveStateFile(java.lang.String loginName,
                      java.lang.String password,
                      java.lang.String stateName)
saveStateFile() - save the user state in a file. [FUTURE]
Parameters:
loginName - is the login Name
password - is the user password
stateName - is the state name
Returns:
true if login is valid
See Also:
FileIO.writeData(java.lang.String, java.lang.String, java.lang.String), Util.showMsg(java.lang.String), saveUserGeneSetUPW(java.lang.String, java.lang.String, int)

getNextStrNameValFromLine

boolean getNextStrNameValFromLine(java.util.StringTokenizer parser)
getNextStrNameValFromLine() - get next line and parse 'name=value\n'. Return false if EOF. If fail, return null. The (parseName, parseValue, parseDelimChar) is saved in the global instance.
Parameters:
parser - is the string tokenizer
Returns:
true succeed

getStrValFromLine

java.lang.String getStrValFromLine(java.lang.String key,
                                   java.util.StringTokenizer parser)
getStrValFromLine() - get line and parse value for key 'name=value\n'. If parser is not null, get data from parser else use global values for next (parseName,parseValue) data. The (parseName, parseValue, parseDelimChar) is saved in the global instance so it can be reparsed if need be.
Parameters:
key - is the key to use
parser - is the string tokenizer
Returns:
parseValue. If fail, return null.
See Also:
getNextStrNameValFromLine(java.util.StringTokenizer)

getStrValFromLine

java.lang.String getStrValFromLine(java.lang.String key)
getStrValFromLine() - parse value for key 'name=value\n'. Use global values for next (parseName,parseValue) data. The (parseName, parseValue, parseDelimChar) was saved in the global instance so it can be reparsed if need be.
Parameters:
key - is the key to use
Returns:
parseValue. If fail, return null.

getIntValFromLine

int getIntValFromLine(java.lang.String key,
                      java.util.StringTokenizer parser)
getIntValFromLine() - get next line and parse value for key 'name='.
Parameters:
key - is the key to use
parser - is the string tokenizer
Returns:
int value, else 0.
See Also:
getStrValFromLine(java.lang.String, java.util.StringTokenizer)

getLongValFromLine

long getLongValFromLine(java.lang.String key,
                        java.util.StringTokenizer parser)
getLongValFromLine() - get next line and parse value for key 'name='.
Parameters:
key - is the key to use
parser - is the string tokenizer
Returns:
long value, else 0.
See Also:
getStrValFromLine(java.lang.String, java.util.StringTokenizer)

getFloatValFromLine

float getFloatValFromLine(java.lang.String key,
                          java.util.StringTokenizer parser)
getFloatValFromLine() - get next line and parse value for key 'name='.
Parameters:
key - is the key to use
parser - is the string tokenizer
Returns:
float value.
See Also:
getStrValFromLine(java.lang.String, java.util.StringTokenizer)

getNextInt

int getNextInt(java.util.StringTokenizer parser)
getNextInt() - parse next int from StringTokenizer the integers are separated by ',' or '\n'. Return int.

restoreUserGeneSetUPW

static boolean restoreUserGeneSetUPW(java.lang.String userName,
                                     java.lang.String password,
                                     int userCBSnbr)
restoreUserGeneSetUPW() - restore user gene bit set by set nbr [FUTURE]
Parameters:
loginName - is the login Name
password - is the user password
userCBSnbr - is the gene bit set name
Returns:
true if succeed

restoreUserGeneSet

static boolean restoreUserGeneSet(int userCBSnbr)
restoreUserGeneSet() - restore user gene bit set by set number [FUTURE]
Parameters:
userCBSnbr - is the gene bit set name
Returns:
true if succeed

readStateFile

boolean readStateFile(java.lang.String userName,
                      java.lang.String password,
                      java.lang.String stateName)
readStateFile() - read the protected user State File [FUTURE] see writeStateFile() to see what have to read.
Parameters:
loginName - is the login Name
password - is the user password
stateName - is the state name
Returns:
true if succeed
See Also:
FileIO.readData(java.lang.String, java.lang.String), Util.showMsg(java.lang.String), getIntValFromLine(java.lang.String, java.util.StringTokenizer), getStrValFromLine(java.lang.String, java.util.StringTokenizer), restoreUserGeneSetUPW(java.lang.String, java.lang.String, int)

getMAEstartupValue

java.lang.String getMAEstartupValue(java.lang.String name)
getMAEstartupValue() - get value from MAE startup file DB
Parameters:
name - is name of the value to lookup
Returns:
true if succeed

readMAEstartupFile

boolean readMAEstartupFile(java.lang.String maeDirName,
                           java.lang.String maeStartupFile)
readMAEstartupFile() - read the .mae startup database File. Keep the table while do startup parsing. Could delete it later.
Parameters:
maeDirName - is the project directory
maeStartupFile - is .mae startup file
Returns:
true if successful.

createMAEstartupFileStr

java.lang.String createMAEstartupFileStr(boolean saveAllsamplesFlag)
createMAEstartupFileStr() - create .mae startup DB File string. If projects are enabled, then also update the maeProjects.txt current project status file. It saves the current HP-X, HP-Y sets and HP-E lists as well as loading all samples even in they are not in any of those lists.
Parameters:
saveAllsamplesFlag - save all samples, else just save the samples in the HP-X, HP-Y 'sets' and HP-E 'list'
Returns:
true if successful.
See Also:
Util.cvtSpacesToUnderscores(java.lang.String)

writeMAEstartupFile

boolean writeMAEstartupFile(java.lang.String maeDirName,
                            java.lang.String maeStartupFile,
                            boolean saveAllsamplesFlag)
writeMAEstartupFile() - write the .mae startup DB File. If projects are enabled, then also update the maeProjects.txt current project status file.
Parameters:
maeDirName - is the project directory that contains MAE/ subdirectory
maeStartupFile - is .mae startup file name
saveAllsamplesFlag - save all samples, else just save the samples in the HP-X, HP-Y 'sets' and HP-E 'list'
Returns:
true if successful.
See Also:
FileIO.writeFileToDisk(java.lang.String, java.lang.String), Util.cvtSpacesToUnderscores(java.lang.String), Util.showMsg(java.lang.String), checkAndMakeMAEdirTree(java.lang.String), createMAEstartupFileStr(boolean), saveNamedHPlist(Condition, int), saveUserGeneSet(int), updateMAEprojectDB(java.lang.String, java.lang.String, java.lang.String, java.lang.String)

checkAndMakeMAEdirTree

boolean checkAndMakeMAEdirTree(java.lang.String maePrjDir)
checkAndMakeMAEdirTree()- check for MAE prject directory tree. This contains the following subdirectories:
    Cache  - (opt)
    Config - configuration .txt files
    Images - (opt) images keyed to XY data in .quant files
    MAE    - startup .mae files and SaveAs DB files
    Quant  - quantified spot data files, one per sample .quant files
    Report - (opt) saved text files .txt and  plot files.gif
    State  - (opt) saves the named Gene Sets and named HP sample lists
If not found, then create the MAE project directory tree.
Parameters:
maePrjDir - is the project directory path
Returns:
true if successful.

updateMAEprojectDB

boolean updateMAEprojectDB(java.lang.String maeProj,
                           java.lang.String maeStartupDir,
                           java.lang.String maeStartupFile,
                           java.lang.String maeWebAddr)
updateMAEprojectDB() - update 'install-dir'/maeProjects.txt DB file. This may only be called from stand-alone mode.
Parameters:
maeProj - is project name
maeStartupDir - is startup diredtory
maeStartupFile - is .mae startup file
maeWebAddr - is Web address if using an Web database
Returns:
true if successful.
See Also:
FileIO.writeFileToDisk(java.lang.String, java.lang.String), SimpleTable, Table, Table.copyTable(SimpleTable), Table.makeTabDelimReport(java.lang.String), Util.showMsg3(java.lang.String), checkAndMakeMAEdirTree(java.lang.String)

updateMAExplorerJarFile

final boolean updateMAExplorerJarFile()
updateMAExplorerJarFile() - update MAExplorer.jar into program install area.
 [1] Define directory for MAExplorer.jar path and other file and URL names.
 [2] Backup the old MAExplorer.jar as MAExplorer.jar.bkup
 [3] Open the url: from maeJarURL. This is hardwired to be
         "http://maexplorer.sourceforge.net/MAExplorer/MAExplorer.jar" 
     and read the file from the Web into local file "MAExplorer.jar.tmp"
 [4] Move the "MAExplorer.jar.tmp" file into "MAExplorer.jar" in the program directory

 Since changing the MAExplorer.jar file is a potential security risk, 
 we make this procedure final and hardwire the maeJarURL! 
Returns:
true if succeed
See Also:
FileIO.copyFile(java.lang.String, java.lang.String, java.lang.String, int), FileIO.deleteLocalFile(java.lang.String)

updateAllPluginsJarFiles

boolean updateAllPluginsJarFiles()
updateAllPluginsJarFiles() - update all MAEPlugins from server in the /Plugins directory This prompts for the user to verify they want to update all plugins jar files.
 1. Reads the directory of .jar file names in maexplorer.sourceforge.net/MAEPlugins/jar/
 2. Copies all of these files into INSTALLATION_DIR/tmp
 3. Copies INSTALLATION_DIR/tmp to INSTALLATION_DIR/Plugins
Returns:
true if succeed, false if any part of this fails
See Also:
FileIO.copyFile(java.lang.String, java.lang.String, java.lang.String, int), FileIO.deleteLocalFile(java.lang.String), FileIO.readBytesFromURL(java.lang.String, java.lang.String)

updateRmethodsFiles

boolean updateRmethodsFiles()
updateRmethodsFiles() - download MAExplorer/{R/,RLO/,lib/MAERlibr/} methods files into MAExplorer program install area. This prompts for the user to verify they want to update all RLOmethods files.
 1. Reads the directories of RLO (.rlo,.R)  file names in
   maexplorer.sourceforge.net/MAExplorer/RLOmethods.txt
 1.1 Builds list of .R files Rlist and .rlo files RLOlist to use
   in doing the downloads.
 2. Copies all of these files into INSTALLATION_DIR/tmp
 3. Copies INSTALLATION_DIR/tmp/*.R to INSTALLATION_DIR/MAExplorer/R/
 4. Copies INSTALLATION_DIR/tmp/*.rlo to INSTALLATION_DIR/MAExplorer/RLO/
Returns:
true if succeed, false if any part of this fails
See Also:
FileIO.copyFile(java.lang.String, java.lang.String, java.lang.String, int), FileIO.deleteLocalFile(java.lang.String), FileIO.readBytesFromURL(java.lang.String, java.lang.String)

updateMAERlibrFiles

boolean updateMAERlibrFiles()
updateMAERlibrFiles() - download MAExplorer/lib/MAERlibr/* files into MAExplorer program install area. [TODO] needs to be finished and debugged...
The server file MAERlibrTocURL contains a relative directory tree of lib/MAERlibr/ created by doing a Unix
   "ls -1R lib/ > ../MAERlibrToc.txt"
 1. Reads the list of files to download from
   maexplorer.sourceforge.net/MAExplorer/MAERlibrToc.txt
 2. Copies all of these files into INSTALLATION_DIR/tmp
 3. Copies INSTALLATION_DIR/tmp/* to INSTALLATION_DIR/MAExplorer/lib/MAERlibr/
Returns:
true if succeed, false if any part of this fails
See Also:
FileIO.copyFile(java.lang.String, java.lang.String, java.lang.String, int), FileIO.deleteLocalFile(java.lang.String), FileIO.readBytesFromURL(java.lang.String, java.lang.String)

updateMAERlibrFilesViaZip

public boolean updateMAERlibrFilesViaZip()
updateMAERlibrFilesViaZip() - Download and install library files via MAERlibr.zip file.
 1. Rename and move old dir tree from program area to tmp dir
 2. Download MAERlibr.zip file from the URL into MAExplorer tmp area.
 3. Extract zip file from tmp to the MAExplorer program directory
Returns:
true if succeed, false if any part of this fails
See Also:
FileIO.extractZipFiles(java.lang.String, java.lang.String), FileIO.readBytesFromURL(java.lang.String, java.lang.String), Util.popupAlertMsg(java.lang.String, java.lang.String, int, int)

resizeLAXfileData

int resizeLAXfileData()
resizeLAXfileData() - resize MAExplroer.lax file data for MAExplorer. This file is read by the InstallAnywhere runtime when you start MAExplorer and is used to set the initial heap and stack process size. The LAX file (e.g., C:/ProgramFiles/MAExplorer/MAExplorer.lax) specifies the startup sizes for both the heap and stack. It determines the current size, asks the user for a new size then creates a new file if it succeeds in the Q and A. The memory size specified must be > 128Mbytes and less than the swap space. However, it is not clear how to get access to that value across all systems.
Returns:
-1 if fail, else the new memory size