Class MJAReval

java.lang.Object
  |
  +--MJAbase
        |
        +--MJAReval

public class MJAReval
extends MJAbase

MAExplorer Open Java API class to access the MJAReval R package. R is an extensible language and envirnment for statistical computing and graphics. R is Open Source (GNU public license) and is available for download at www.r-project.org.

This class's methods contain a command interpreter, and support methods and data structures to enable you to execute R program .R scripts using client data.

In this MJAReval API, the "client" is MAExplorer, the "RLORlibr" (R library package) for MAExplorer is "MAERlibr".

It is intended to be used when writing MAEPlugins that need to access the R program to execute .R scripts with client data. This may generate reports and plots (PDF, JPG, PNG, Postscript). Some of these reports may be used to pass the R results back into the client state (Gene Sets, Filter gene sets, Normalization gene sets, Condition Lists, OCL, etc.).

This class evaluates R scripts with data supplied from client via the MJA API. Each R analysis is defined by a R LayOut (RLO). Each RLO is saved in an internal RLO database managed by the mjaReval MJA class. (see class variable definitions and addRLO() method for details on the RLO). The RLOs specify the evaluation environment for the .R script when evaluated by R. The R program is then run as a separate process using a System.exec()

When executed, an R script is allowed to generate multiple output files that may include the following formats: text, tab-delimited text, PDF, JPG, etc. There may be also multiple data input files requested by the R script. These are generated by mjaReval class methods as specified by the RLO DB entry.

Note: during R execution, all files are read and written from the {project}/Temp directory, the R current working directory. They may be copied to or from this directory from or to other directories as required.

 1. data is exported from client to tab-delimited data input files 
   {Project}/Temp/. These will then be read by R when your script is 
   evaluated.
 2. The output of R is saved to any number of files into {project}/Temp
    and then moved to {Project}/Report/ where they may then be displayed 
    or read by client if required.
 3. The .R scripts are shared with all instances of client
    and are kept in {client installation}/R/
 4. The .rlo files are shared by all instances of client and are kept
    in {client installation}/RLO/ directory.
 5. The startup script is generated by an mjaReval method and placed in
    the {project}/Temp directory where it will be used by a System.exec()
    call.
List of methods available to Plugin-writers
 createNewRLOdatabase() - constructor for initial database allocation

 setUseSPLUSelseRengineFlag() - specify if use R or S-PLUS statistics engine
 setRdataTypeDB() - set the export-types (name,type) database.
 setOfileTypeDB() - set the R output file-types (name,type) database.
 setR2ClientActionDB() - set the R to client Actions (name,type) database.
 setProcessBitsDB() - set the Export/Import ProcessBits (name,type) DB.

 lookupRdataTypeDBmenu() - lookup export-types menu entry by name.
 lookupRdataTypeDBmenu() - lookup export-types menu entry by value.
 lookupRdataTypeDBvalue() - lookup export-types value by name.
 lookupOfileTypeDBmenu() - lookup R output file type menu entry by name.
 lookupOfileTypeDBmenu() - lookup R output file type menu entry by value.
 lookupOfileTypeDBvalue() - lookup R output file type value by name.
 lookupR2ClientActionDBMenu() - lookup R to client Action menu by name
 lookupR2ClientActionDBMenu() - lookup R to client Action menu by value
 lookupProcessBitsDBmenu() - lookup Export/Import ProcessBits menu by value
 lookupR2ClientActionDBvalue() - lookup R to client Action value by name

 getRdataTypeDBnames() - get the R input file type names
 getRdataTypeDBmenus() - get the R input file type menus
 getRdataTypeDBtypes() - get the R input file type values
 getOfileTypeDBnames() - get the R output file type names 
 getOfileTypeDBmenus() - get the R output file type menus 
 getOfileTypeDBtypes() - get the R output file type values
 getR2ClientActionDBnames() - get the R to client Actions DB names
 getR2ClientActionDBmenus() - get the R to client Actions DB menus
 getR2ClientActionDBtypes() - get the R to client Actions DB type values
 getProcessBitsDBnames() - get Export/Import ProcessBitsDB names
 getProcessBitsDBmenus() - get Export/Import ProcessBitsDB menu entries
 getProcessBitsDBvalues() - get Export/Import ProcessBitsDB bit values

 setRLOreportLoggingFlag() - set RLO Report logging flag for creating subdir 
 setDbugFlag() set debugging flag to print to stdout if required
 getNbrAnalyses() - get the number of analyses in the RLO DB
 getListofRLOscriptNames() - get list of all R script names
 getListofRLOmenuNames() - get list of all menu names
 newRLO() - create new empty R LayOut (RLO) instance to the RLO database.
 addRLO() - add new R LayOut (RLO) instance to the database
 setRLO() - set R LayOut (RLO) instance to the RLO database.
 rmvRLO() - remove the RLO from the analyses database
 clearRLOdb() - clear list of R LayOuts analyses in the database

 getRLOidByRscriptName() - get current RLO analysis method id by RscriptName
 getCurrentRLOid() - get current RLO analysis id
 setCurrentRLO() - set current RLO analysis by id
 getCurrentRLOmenuName() - get current RLO analysis menu string name
 getCurrentRLORscriptName() - get current RLO analysis .R script file name

 getInputDataFileNames() - get current RLO list of input data file names
 getInputDataTypes() - get current RLO list of input data file types

 getOutputDataFileNames() - get current RLO list of output data file names
 getOutputDataTypes() - get current RLO list of output data file types

 getSetR2ClientFileNames() - get current RLO list of R2Client data file names
 getSetR2ClientObjNames() - get current RLO list of R2Client object names
 getSetR2ClientObjTypes() - get current RLO list of R2Client object types  

 setInputFilesData() - set current RLO list of input data (fileName,dataType)
 setOutputFilesData() - set current RLO list of output data (fileName,dataType)
 setR2ClientFilesData() - set cur. RLO list of R2Client (file, obj, type) data

 getAllProcessBits() - get Process Bits using R_PB_xxxx bits for current RLO
 setAllProcessBits() - set Process Bits using R_PB_xxxx bits for current RLO
 isProcessBit() - test Process Bits for current RLO
 clearProcessBit() - clear specific Process Bit(s) for current RLO
 setProcessBit() - set specific Process Bit(s) for current RLO

 getAllGenRbits() - get GenR Bits using R_GENR_xxxx bits for current RLO
 setAllGenRbits() - set GenR Bits using R_GENR_xxxx bits for current RLO
 isGenRbit() - test GenR Bits for current RLO
 clearGenRbit() - clear specific GenR Bit(s) for current RLO
 setGenRbit() - set specific GenR Bit(s) for current RLO

 getRLOoutFile() - get the nth Output Data file by out file type
 getRLOinputFile() - get the nth Input Data file by input file type

 getRstartupOptions() - get R command line startup options
 setRstartupOptions() - set R command line startup options

 getRLOstring() - get prettyprint string for the current RLO

 setupAllBasePaths() - generate all base paths of directories
 simpleLookupRprogramPath() - lookup RbinBasePath by analyzing OS env vars & OS name.
 runRscriptWithR() - compute report string by running R script through R. 

 getReportBasePath() - get current path of Client Report/ directory 
 getRscriptBasePath() - get current path of client R/ directory
 getRLObasePath() - get current path of /RLO/  
 getTempBasePath() - get current path of client Temp/ directory   
 getRLORlibrBasePath() - get current base path of client RLORlibr/ directory  

 getStartupRscriptFileName() - get name of batch R startup script file to exec() 
 getInputRscriptFileName() - get name of .R input script file after eval
 getFullRunRfilePath() - full path of batch R startup script file after eval
 getFullRscriptInputPath() - full path of R input script file after eval
 getFullRoutputFilePath() - get full path of R output file after eval
 getRreportStr() - get last R report after doing eval of .R script

 readPermanentRLOdatabase() - read RLO entries from the permanent
 writePermanentRLOdatabase() - write RLO entries to the permanent
 readRLOfile() - read RLO by .rlo file name into a new RLO (rloID).
 writeRLOfile() - write RLO by .rlo file name for the specified RLO (rloID).

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 Government 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 client Mozilla and Legal files are available on http://maexplorer.sourceforge.net/.

Version:
$Date: 2003/06/23 19:34:47 $ $Revision: 1.43 $
Author:
P. Lemkin (NCI), G. Thornwall (SAIC), NCI-Frederick, Frederick, MD
See Also:
MAExplorer Home

Fields inherited from class MJAbase
COMPARE_ALL, COMPARE_ANY, COMPARE_AT_LEAST, COMPARE_AT_MOST, COMPARE_PRODUCT, COMPARE_SUM, DATA_F1TOT, DATA_F2TOT, DATA_MEAN_F1F2TOT, DATA_RATIO_F1F2TOT, DRAW_BIN, DRAW_BOX, DRAW_CIRCLE, DRAW_PLUS, EDIT_ADD, EDIT_NOP, EDIT_RMV, GENE_ATCC_ID, GENE_BAD_DATA, GENE_BAD_LOCAL_SPOT_BKGRD, GENE_BAD_MID, GENE_BAD_SPOT, GENE_BAD_SPOT_GEOMETRY, GENE_DUP_SPOT, GENE_GOOD_MID, GENE_IMAGE_ID, GENE_IS_CUR_GENE, GENE_IS_EGL_GENE, GENE_IS_FILTERED, GENE_IS_KMEANS, GENE_IS_NOT_FILTERED, GENE_LOW_SPOT_REF_SIGNAL, GENE_MARGINAL_SPOT, GENE_USE_GBID_FOR_CLONEID, HIER_CLUST_NEXT_MIN_LNKG, HIER_CLUST_PGMA_LNKG, HIER_CLUST_PGMC_LNKG, MARKER_CIRCLE, MARKER_CURRENT, MARKER_GENES, MARKER_KMEANS_CLUSTER, MARKER_NONE, MARKER_PLUS, MARKER_SQUARE, MASTER_CLONE_ID, MASTER_DBEST3, MASTER_DBEST5, MASTER_GENBANK, MASTER_GENBANK3, MASTER_GENBANK5, MASTER_GENE_NAME, MASTER_GENERIC_ID, MASTER_LOCUSLINK, MASTER_SWISS_PROT, MASTER_UG_ID, MASTER_UG_NAME, MAX_COLORS, PLOT_CLUSTER_GENES, PLOT_CLUSTER_HIER, PLOT_CLUSTER_HYBSAMPLES, PLOT_CLUSTERGRAM, PLOT_EXPR_PROFILE, PLOT_F1_F2_INTENS, PLOT_F1_F2_MVSA, PLOT_HIST_F1F2_RATIO, PLOT_HIST_HP_XY_RATIO, PLOT_HIST_HP_XY_SETS_RATIO, PLOT_HP_XY_INTENS, PLOT_INTENS_HIST, PLOT_KMEANS_CLUSTERGRAM, PLOT_PSEUDO_F1F2_IMG, PLOT_PSEUDO_F1F2_RYG_IMG, PLOT_PSEUDO_HP_XY_IMG, PLOT_PSEUDO_HP_XY_RYG_IMG, PLOT_PSEUDOIMG, PRPROP_CUR_GENE, PRPROP_FILTER, PRPROP_LABEL, PRPROP_SLIDER, PRPROP_TIMEOUT, PRPROP_UNIQUE, QUALTYPE_ALPHA, QUALTYPE_PROP_CODE, QUALTYPE_THR, RANGE_INSIDE, RANGE_OUTSIDE, RPT_FMT_DYN, RPT_FMT_TAB_DELIM, RPT_NONE, RPT_TBL_ALL_GENES_CLUSTER, RPT_TBL_CALIB_DNA_STAT, RPT_TBL_CUR_GENE_CLUSTER, RPT_TBL_EDITED_GENE_LIST, RPT_TBL_EXPR_PROFILE, RPT_TBL_FILTERED_GENES, RPT_TBL_GENE_CLASS, RPT_TBL_HIER_CLUSTER, RPT_TBL_HIGH_F1F2, RPT_TBL_HIGH_RATIO, RPT_TBL_HP_DB_INFO, RPT_TBL_HP_HP_CORR, RPT_TBL_HP_MN_VAR_STAT, RPT_TBL_HP_XY_SET_STAT, RPT_TBL_KMEANS_CLUSTER, RPT_TBL_LOW_F1F2, RPT_TBL_LOW_RATIO, RPT_TBL_MAE_PRJ_DB, RPT_TBL_MN_KMEANS_CLUSTER, RPT_TBL_NAMED_GENES, RPT_TBL_NORMALIZATION_GENE_LIST, RPT_TBL_OCL_STAT, RPT_TBL_SAMPLES_DB_INFO, RPT_TBL_SAMPLES_WEB_LINKS, SS_MODE_ELIST, SS_MODE_MS, SS_MODE_XANDY_SETS, SS_MODE_XORY_SETS, SS_MODE_XSET, SS_MODE_XY, SS_MODE_YSET
 
Constructor Summary
MJAReval()
          MJAReval() - constructor for client interface to the R program to access client data in a uniform interface.
 
Method Summary
 int addRLO(java.lang.String menuName, java.lang.String menuStubName, java.lang.String RscriptName, java.lang.String[] inputDataFileNames, int[] inputDataTypes, int processBits, int genRbits, java.lang.String[] outputDataFileNames, int[] outputDataTypes, java.lang.String[] setR2ClientFileNames, java.lang.String[] setR2ClientObjNames, int[] setR2ClientObjTypes, java.lang.String scriptSpecificRoptions)
          addRLO() - add new R LayOut (RLO) instance to the RLO database.
 void clearGenRbit(int bit)
          clearGenRbit() - clear specific GenR Bit(s) for current RLO.
 void clearProcessBit(int bit)
          clearProcessBit() - clear specific Process Bit(s) for current RLO.
 void clearRLOdb()
          clearRLOdb() - clear list of R LayOuts analyses in the database
 int getAllGenRbits()
          getAllGenRbits() - get GenR Bits using R_GENR_xxxx bits for current RLO.
 int getAllProcessBits()
           
 int getCurrentRLOid()
          getCurrentRLOid() - get the current RLO analysis method id
 java.lang.String getCurrentRLOmenuName()
          getCurrentRLOmenuName() - get the current RLO analysis menu string name
 java.lang.String getCurrentRLOmenuStubName()
          getCurrentRLOmenuStubName() - get the current RLO analysis menu stub string name
 java.lang.String getCurrentRLORscriptName()
          getCurrentRLORscriptName() - get current RLO analysis .R script file name
 java.lang.String getFullRoutputFilePath()
          getFullRoutputFilePath() - get full path of R output file after file setup
 java.lang.String getFullRscriptInputPath()
          getFullRscriptInputPath() - full path of R input script file after file setup
 java.lang.String getFullRunRfilePath()
          getFullRunRfilePath() - full path of batch R startup script file after file setup
 java.lang.String[] getInputDataFileNames()
          getInputDataFileNames() - get current RLO list of input data file names
 int[] getInputDataTypes()
          getInputDataTypes() - get current RLO list of input data file types
 java.lang.String getInputRscriptFileName()
          getInputRscriptFileName() - get current name of .R input script file
 java.lang.String[] getListofRLOmenuNames()
          getListofRLOmenuNames() - get list of all menuNames
 java.lang.String[] getListofRLOscriptNames()
          getListofRLOscriptNames() - get list of all R script names
 int getNbrAnalyses()
          getNbrAnalyses() - get the number of analyses in the RLO DB
 java.lang.String[] getOfileTypeDBmenus()
          getOfileTypeDBmenus() - get the R output file type menus
 java.lang.String[] getOfileTypeDBnames()
          getOfileTypeDBnames() - get the R output file type names
 int[] getOfileTypeDBtypes()
          getOfileTypeDBtypes() - get the R output file type values
 java.lang.String[] getOutputDataFileNames()
          getOutputDataFileNames() - get current RLO list of output data file names.
 int[] getOutputDataTypes()
          getOutputDataTypes() - get current RLO list of output data file types
 java.lang.String[] getProcessBitsDBmenus()
          getProcessBitsDBmenus() - get Export/Import ProcessBits DB menus
 java.lang.String[] getProcessBitsDBnames()
          getProcessBitsDBnames() - get Export/Import ProcessBits DB names
 int[] getProcessBitsDBvalues()
          getProcessBitsDBvalues() - get Export/Import ProcessBits DB values
 java.lang.String[] getR2ClientActionDBmenus()
          getR2ClientActionDBmenus() - get R to client Actions DB menus
 java.lang.String[] getR2ClientActionDBnames()
          getR2ClientActionDBnames() - get R to client Actions DB names
 int[] getR2ClientActionDBtypes()
          getR2ClientActionDBtypes() - get R to client Actions DB type values
 java.lang.String[] getRdataTypeDBmenus()
          getRdataTypeDBmenus() - get the R input file type menus
 java.lang.String[] getRdataTypeDBnames()
          getRdataTypeDBnames() - get the R input file type names
 int[] getRdataTypeDBtypes()
          getRdataTypeDBtypes() - get the R input file type values
 java.lang.String getReportBasePath()
          getReportBasePath() - get current path of client /Report/
 java.lang.String getRLObasePath()
          getRLObasePath() - get current path of /RLO/
 int getRLOidByRscriptName(java.lang.String RscriptName)
          getRLOidByRscriptName() - get the current RLO analysis method id by RscriptName
 java.lang.String getRLOinputFile(int lookForFileType, int nth)
          getRLOinputFile() get the nth Input Data file by input file type.
 java.lang.String getRLOoutFile(int lookForFileType, int nth)
          getRLOoutFile() get the nth Output Data file by out file type.
 java.lang.String getRLORlibrBasePath()
          getRLORlibrBasePath() - get current base path of client RLORibr/ directory lives in "{installation directory}/".
 java.lang.String getRLOstring(java.lang.String optGenRbitsStr)
          getRLOstring() - get prettyprint string for the current RLO
 java.lang.String getRreportStr()
          getRreportStr() - get R report after doing eval of .R script after file setup
 java.lang.String getRscriptBasePath()
          getRscriptBasePath() - get current path of /R/
 java.lang.String getRstartupOptions()
          getRstartupOptions() - get R command line startup options
 void getRstartupOptions(java.lang.String str)
          setRstartupOptions() - set R command line startup options
 java.lang.String[] getSetR2ClientFileNames()
          getSetR2ClientFileNames() - get current RLO list of R2Client data file names.
 java.lang.String[] getSetR2ClientObjNames()
          getSetR2ClientObjNames() - get current RLO list of R2Client object names
 int[] getSetR2ClientObjTypes()
          getSetR2ClientObjTypes() - get current RLO list of R2Client object types
 java.lang.String getStartupRscriptFileName()
          getStartupRscriptFileName() - get name of batch R startup script file to exec() by the OS after file setup
 java.lang.String getTempBasePath()
          getTempBasePath() - get current path of client /Temp/
 boolean isGenRbit(int bit)
          isGenRbit() - test GenR Bits for current RLO.
 boolean isProcessBit(int bit)
          isProcessBit() - test Process Bits for current RLO.
 java.lang.String lookupOfileTypeDBmenu(int val)
          lookupOfileTypeDBmenu() - lookup R output file type menu entry by value.
 java.lang.String lookupOfileTypeDBmenu(java.lang.String name)
          lookupOfileTypeDBmenu() - lookup R output file type menu entry by name.
 int lookupOfileTypeDBvalue(java.lang.String name)
          lookupOfileTypeDBvalue() - lookup R output file type value by name.
 java.lang.String lookupProcessBitsDBmenu(int i, int val)
          lookupProcessBitsDBmenu() - lookup Export/Import ProcessBits menu by value
 int lookupProcessBitsDBvalue(java.lang.String name)
          lookupProcessBitsDBvalue() - lookup Export/Import ProcessBits value by name
 java.lang.String lookupR2ClientActionDBMenu(int val)
          lookupR2ClientActionDBMenu() - lookup R to client Action menu by value
 java.lang.String lookupR2ClientActionDBMenu(java.lang.String name)
          lookupR2ClientActionDBMenu() - lookup R to client Action menu by name
 int lookupR2ClientActionDBvalue(java.lang.String name)
          lookupR2ClientActionDBvalue() - lookup R to client Action value by name
 java.lang.String lookupRdataTypeDBmenu(int val)
          lookupRdataTypeDBmenu() - lookup export-types menu entry by value.
 java.lang.String lookupRdataTypeDBmenu(java.lang.String name)
          lookupRdataTypeDBmenu() - lookup export-types menu entry by name.
 int lookupRdataTypeDBvalue(java.lang.String name)
          lookupRdataTypeDBvalue() - lookup export-types value by name.
 int newRLO()
          newRLO() - create new empty R LayOut (RLO) instance to the RLO database
 boolean readPermanentRLOdatabase(boolean loadDemoRLOsFlag)
          readPermanentRLOdatabase() - read RLO entries from the permanent /RLO/ database.
 int readRLOfile(java.lang.String rloFileName, boolean loadDemoRLOsFlag)
          readRLOfile() - read RLO by .rlo file name into a new RLO (rloID).
 boolean rmvRLO(int rloIdToRemove)
          rmvRLO() - remove the RLO from the analyses database
 java.lang.String runRscriptWithR()
          runRscriptWithR() - compute report string by running R script through the R program.
 void setAllGenRbits(int bits)
          setAllGenRbits() - set GenR Bits using R_GENR_xxxx bits for current RLO.
 void setAllProcessBits(int bits)
          setAllProcessBits() - set Process Bits bits for current RLO.
 void setCurrentRLO(int analysisNbr)
          setCurrentRLO() - set the current RLO analysis method by id
 void setDbugFlag(boolean flag)
          setDbugFlag() set debugging flag to print to stdout if required
 void setGenRbit(int bit)
          setGenRbit() - set specific GenR Bit(s) for current RLO.
 boolean setInputFilesData(java.lang.String[] fileNames, int[] dataTypes)
          setInputFilesData() - set current RLO list of input data (fileName,dataType)
 void setOfileTypeDB(java.lang.String[] names, java.lang.String[] menus, int[] values)
          setOfileTypeDB() - set R output file-types (name,menu,type) database.
 boolean setOutputFilesData(java.lang.String[] fileNames, int[] dataTypes)
          setOutputFilesData() - set current RLO list of output data (fileName,dataType)
 void setProcessBit(int bit)
          setProcessBit() - set specific Process Bit(s) for current RLO.
 void setProcessBitsDB(java.lang.String[] names, java.lang.String[] menus, int[] values)
          setProcessBitsDB() - set the Export/Import ProcessBits (name,menu,type) database.
 void setR2ClientActionDB(java.lang.String[] names, java.lang.String[] menus, int[] values)
          setR2ClientActionDB() - set R to client Actions (name,menu,type) DB.
 boolean setR2ClientActionsData(java.lang.String[] fileNames, java.lang.String[] objNames, int[] objTypes)
          setR2ClientActionsData() - set cur.
 void setRdataTypeDB(java.lang.String[] names, java.lang.String[] menus, int[] values)
          setRdataTypeDB() - set the export-types (name,menu,type) database.
 boolean setRLO(int rloID, java.lang.String menuName, java.lang.String menuStubName, java.lang.String RscriptName, java.lang.String[] inputDataFileNames, int[] inputDataTypes, int processBits, int genRbits, java.lang.String[] outputDataFileNames, int[] outputDataTypes, java.lang.String[] setR2ClientFileNames, java.lang.String[] setR2ClientObjNames, int[] setR2ClientObjTypes, java.lang.String scriptSpecificRoptions)
          setRLO() - set R LayOut (RLO) instance to the RLO database.
 void setRLOreportLoggingFlag(boolean flag)
          setRLOreportLoggingFlag() - set RLO Report logging flag for creating subdirectory in {project}/Report/{RLOname}-yymmdd.hhmmss/ to store the RLO output files copied to Report/
 boolean setupAllBasePaths(java.lang.String clientPrjPath)
          setupAllBasePaths() - generate all base paths of directories
 void setUseSPLUSelseRengineFlag(boolean useSplusFlag)
          setUseSPLUSelseRengineFlag() - specify if use R or S-PLUS statistics engine
 boolean writePermanentRLOdatabase()
          writePermanentRLOdatabase() - write RLO entries to the permanent /RLO/ database.
 boolean writeRLOfile(java.lang.String rloBasePath, int rloID)
          writeRLOfile() - write RLO by .rlo file name for the specified RLO (rloID).
 
Methods inherited from class MJAbase
cvtHashtable2SimpleTable, cvtTable2Hashtable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MJAReval

public MJAReval()
MJAReval() - constructor for client interface to the R program to access client data in a uniform interface. This Class lets us access the underlying client data structures in a uniform way that hides the complexity. It is designed to be used with client Plugins.
Method Detail

setUseSPLUSelseRengineFlag

public final void setUseSPLUSelseRengineFlag(boolean useSplusFlag)
setUseSPLUSelseRengineFlag() - specify if use R or S-PLUS statistics engine
Parameters:
useSplusFlag - will use S-PLUS if true, else defaults to R

setRdataTypeDB

public final void setRdataTypeDB(java.lang.String[] names,
                                 java.lang.String[] menus,
                                 int[] values)
setRdataTypeDB() - set the export-types (name,menu,type) database. These files are output by the client and read by R.
Parameters:
names - is list of file names output by client and read by R
menus - is list of menu entries
values - is list of corresponding values

setOfileTypeDB

public final void setOfileTypeDB(java.lang.String[] names,
                                 java.lang.String[] menus,
                                 int[] values)
setOfileTypeDB() - set R output file-types (name,menu,type) database. These files are output by R.
Parameters:
names - is list of file names output by R
menus - is list of menu entries
values - is list of corresponding values

setR2ClientActionDB

public final void setR2ClientActionDB(java.lang.String[] names,
                                      java.lang.String[] menus,
                                      int[] values)
setR2ClientActionDB() - set R to client Actions (name,menu,type) DB.
Parameters:
names - is list of names of actions
menus - is list of menu entries
values - is list of corresponding type values

setProcessBitsDB

public final void setProcessBitsDB(java.lang.String[] names,
                                   java.lang.String[] menus,
                                   int[] values)
setProcessBitsDB() - set the Export/Import ProcessBits (name,menu,type) database.
Parameters:
names - is list of names
menus - is list of menu entries
values - is list of corresponding values

lookupRdataTypeDBmenu

public final java.lang.String lookupRdataTypeDBmenu(java.lang.String name)
lookupRdataTypeDBmenu() - lookup export-types menu entry by name.
Parameters:
name - is the file name to lookup
Returns:
menu else null if not found

lookupRdataTypeDBmenu

public final java.lang.String lookupRdataTypeDBmenu(int val)
lookupRdataTypeDBmenu() - lookup export-types menu entry by value.
Parameters:
value - is the file name to lookup
Returns:
menu else null if not found

lookupRdataTypeDBvalue

public final int lookupRdataTypeDBvalue(java.lang.String name)
lookupRdataTypeDBvalue() - lookup export-types value by name.
Parameters:
name - is the file name to lookup
Returns:
value else 0 if not found

lookupOfileTypeDBmenu

public final java.lang.String lookupOfileTypeDBmenu(java.lang.String name)
lookupOfileTypeDBmenu() - lookup R output file type menu entry by name.
Parameters:
name - is the file name to lookup
Returns:
menu else null if not found

lookupOfileTypeDBmenu

public final java.lang.String lookupOfileTypeDBmenu(int val)
lookupOfileTypeDBmenu() - lookup R output file type menu entry by value.
Parameters:
val - is the file name to val
Returns:
menu else null if not found

lookupOfileTypeDBvalue

public final int lookupOfileTypeDBvalue(java.lang.String name)
lookupOfileTypeDBvalue() - lookup R output file type value by name.
Parameters:
name - is the file name to lookup
Returns:
value else 0 if not found

lookupR2ClientActionDBMenu

public final java.lang.String lookupR2ClientActionDBMenu(java.lang.String name)
lookupR2ClientActionDBMenu() - lookup R to client Action menu by name
Parameters:
name - is the name of entry
Returns:
menu else null if not found

lookupR2ClientActionDBMenu

public final java.lang.String lookupR2ClientActionDBMenu(int val)
lookupR2ClientActionDBMenu() - lookup R to client Action menu by value
Parameters:
value - is of the action
Returns:
menu else null if not found

lookupProcessBitsDBmenu

public final java.lang.String lookupProcessBitsDBmenu(int i,
                                                      int val)
lookupProcessBitsDBmenu() - lookup Export/Import ProcessBits menu by value
Parameters:
i - is ith process bit
value - is of the process bit
Returns:
menu else null if not found

lookupR2ClientActionDBvalue

public final int lookupR2ClientActionDBvalue(java.lang.String name)
lookupR2ClientActionDBvalue() - lookup R to client Action value by name
Parameters:
name - is the name of entry
Returns:
menu else 0 if not found

lookupProcessBitsDBvalue

public final int lookupProcessBitsDBvalue(java.lang.String name)
lookupProcessBitsDBvalue() - lookup Export/Import ProcessBits value by name
Parameters:
name - is the name to lookup
Returns:
value if found, 0 if not found.

getRdataTypeDBnames

public final java.lang.String[] getRdataTypeDBnames()
getRdataTypeDBnames() - get the R input file type names
Returns:
list of file names

getRdataTypeDBmenus

public final java.lang.String[] getRdataTypeDBmenus()
getRdataTypeDBmenus() - get the R input file type menus
Returns:
list of menus

getRdataTypeDBtypes

public final int[] getRdataTypeDBtypes()
getRdataTypeDBtypes() - get the R input file type values
Returns:
list of values

getOfileTypeDBnames

public final java.lang.String[] getOfileTypeDBnames()
getOfileTypeDBnames() - get the R output file type names
Returns:
list of file names

getOfileTypeDBmenus

public final java.lang.String[] getOfileTypeDBmenus()
getOfileTypeDBmenus() - get the R output file type menus
Returns:
list of menus

getOfileTypeDBtypes

public final int[] getOfileTypeDBtypes()
getOfileTypeDBtypes() - get the R output file type values
Returns:
list of values

getR2ClientActionDBnames

public final java.lang.String[] getR2ClientActionDBnames()
getR2ClientActionDBnames() - get R to client Actions DB names
Returns:
list of names

getR2ClientActionDBmenus

public final java.lang.String[] getR2ClientActionDBmenus()
getR2ClientActionDBmenus() - get R to client Actions DB menus
Returns:
list of menus

getR2ClientActionDBtypes

public final int[] getR2ClientActionDBtypes()
getR2ClientActionDBtypes() - get R to client Actions DB type values
Returns:
list of values

getProcessBitsDBnames

public final java.lang.String[] getProcessBitsDBnames()
getProcessBitsDBnames() - get Export/Import ProcessBits DB names
Returns:
list of names

getProcessBitsDBmenus

public final java.lang.String[] getProcessBitsDBmenus()
getProcessBitsDBmenus() - get Export/Import ProcessBits DB menus
Returns:
list of menu entries

getProcessBitsDBvalues

public final int[] getProcessBitsDBvalues()
getProcessBitsDBvalues() - get Export/Import ProcessBits DB values
Returns:
list of values

setRLOreportLoggingFlag

public final void setRLOreportLoggingFlag(boolean flag)
setRLOreportLoggingFlag() - set RLO Report logging flag for creating subdirectory in {project}/Report/{RLOname}-yymmdd.hhmmss/ to store the RLO output files copied to Report/

setDbugFlag

public final void setDbugFlag(boolean flag)
setDbugFlag() set debugging flag to print to stdout if required

getNbrAnalyses

public final int getNbrAnalyses()
getNbrAnalyses() - get the number of analyses in the RLO DB
Returns:
# of analyses in the RLO DB

getListofRLOscriptNames

public final java.lang.String[] getListofRLOscriptNames()
getListofRLOscriptNames() - get list of all R script names
Returns:
list of RLO Rscript names

getListofRLOmenuNames

public final java.lang.String[] getListofRLOmenuNames()
getListofRLOmenuNames() - get list of all menuNames
Returns:
list of RLO menu names

newRLO

public final int newRLO()
newRLO() - create new empty R LayOut (RLO) instance to the RLO database
Returns:
the id number

addRLO

public final int addRLO(java.lang.String menuName,
                        java.lang.String menuStubName,
                        java.lang.String RscriptName,
                        java.lang.String[] inputDataFileNames,
                        int[] inputDataTypes,
                        int processBits,
                        int genRbits,
                        java.lang.String[] outputDataFileNames,
                        int[] outputDataTypes,
                        java.lang.String[] setR2ClientFileNames,
                        java.lang.String[] setR2ClientObjNames,
                        int[] setR2ClientObjTypes,
                        java.lang.String scriptSpecificRoptions)
addRLO() - add new R LayOut (RLO) instance to the RLO database. The RLO is a meta-language for specifying the processing interaction between R and client.

E.g., the following is an example that exports various types (4) of client data, generates 4 types of output files, and sets the client state from 2 of those files.

 String inFiles[]= { "R-InputFile-XY-classNames.txt",
                     "R-InputFile-X-sample-names.txt",
                     "R-InputFile-Y-sample-names.txt",
                     "R-InputFile-XY-sets-expr.txt" };
 int inTypes[]= { R_DATA_TYPE_XY_CLASSNAMES,
                  R_DATA_TYPE_HP_X_SET_SAMPLENAMES,
                  R_DATA_TYPE_HP_Y_SET_SAMPLENAMES,
                  R_DATA_TYPE_HP_XY_SETS };
 int processBits= (R_PB_USE_FILTER | R_PB_SAMPLES_HDR); 
 int genRbits= (R_GENR_HIST | R_GENR_LOWESS | R_GENR_PLOT);    
 String outFiles[]= { "R-Stdout.txt", "R-OutputFile.pdf", 
                      "R-GeneSet.txt", "R-ConditionList.txt",
                      "R-LowessTbl.txt"};
 int outTypes[]= { R_FILE_TYPE_STDOUT, R_FILE_TYPE_PDF,
                   R_FILE_TYPE_TAB_DELIM_TBL,
                   R_FILE_TYPE_TAB_DELIM_TBL,
                   R_FILE_TYPE_TAB_DELIM_TBL}; 
 String setR2ClientFiles[]= { "R-GeneSet.txt", "R-ConditionList.txt"};
 String setR2ClientObjs[]= { "Clustered-Genes", "Similar-Samples" };
 int setR2ClientType[]= { R_SET_R2Client_GENE_SET, 
                          R_SET_R2Client_CONDITION_LIST };
 String scriptSpecificRoptions= "--vsize=20M";

  addRLO( "Analyze HP-XY 'set' expression data", "Plugins:RLOmethods",
          "clientAnalyzeXYsets.R",
          inFiles, inTypes, 
          processBits, genRbits, 
          outFiles, outTypes,
          setR2ClientFiles, setR2ClientObjs, setR2ClientType,
          scriptSpecificRoptions );
Parameters:
menuName - text description of the RLO entry
menuStubName - used by client to put RLO menu entry in a particular menu.
RscriptName - is the name of the .R file
inputDataFileNames - opt. list of R input data file names
inputDataTypes - corresponding list of R input data file types
processBits - used during eval
genRbits - set during edit by R script GUI
outputDataFileNames - opt. list of R output data file names
outputDataTypes - corresponding list of R output data file types
setR2ClientFileNames - opt. list of file names to set R output data to client state objects
setR2ClientObjNames - opt. list of client object names to set R output data to client state objects
setR2ClientObjType - opt. list of client object types to set R output data to client state objects
scriptSpecificRoptions -  
Returns:
the id number

setRLO

public final boolean setRLO(int rloID,
                            java.lang.String menuName,
                            java.lang.String menuStubName,
                            java.lang.String RscriptName,
                            java.lang.String[] inputDataFileNames,
                            int[] inputDataTypes,
                            int processBits,
                            int genRbits,
                            java.lang.String[] outputDataFileNames,
                            int[] outputDataTypes,
                            java.lang.String[] setR2ClientFileNames,
                            java.lang.String[] setR2ClientObjNames,
                            int[] setR2ClientObjTypes,
                            java.lang.String scriptSpecificRoptions)
setRLO() - set R LayOut (RLO) instance to the RLO database. The RLO is a meta-language for specifying the processing interaction between R and client.

E.g., the following is an example that exports various types (4) of client data, generates 4 types of output files, and sets the client state from 2 of those files.

 int rloID= 10;
 String inFiles[]= { "R-InputFile-XY-classNames.txt",
                     "R-InputFile-X-sample-names.txt",
                     "R-InputFile-Y-sample-names.txt",
                     "R-InputFile-XY-sets-expr.txt" };
 int inTypes[]= { R_DATA_TYPE_XY_CLASSNAMES,
                  R_DATA_TYPE_HP_X_SET_SAMPLENAMES,
                  R_DATA_TYPE_HP_Y_SET_SAMPLENAMES,
                  R_DATA_TYPE_HP_XY_SETS };
 int processBits= (R_PB_USE_FILTER | R_PB_SAMPLES_HDR);
 int genRbits= (R_GENR_HIST | R_GENR_LOWESS | R_GENR_PLOT);
 String outFiles[]= { "R-Stdout.txt", "R-OutputFile.pdf",
                      "R-GeneSet.txt", "R-ConditionList.txt",
                      "R-LowessTbl.txt"};
 int outTypes[]= { R_FILE_TYPE_STDOUT, R_FILE_TYPE_PDF,
                   R_FILE_TYPE_TAB_DELIM_TBL,
                   R_FILE_TYPE_TAB_DELIM_TBL,
                   R_FILE_TYPE_TAB_DELIM_TBL};
 String setR2ClientFiles[]= { "R-GeneSet.txt", "R-ConditionList.txt" };
 String setR2ClientObjs[]= { "Clustered-Genes", "Similar-Samples" };
 int setR2ClientType[]= { R_SET_R2Client_GENE_SET, 
                          R_SET_R2Client_CONDITION_LIST };
 String scriptSpecificRoptions= "--vsize=20M";

   setRLO(rloID,
          "Analyze HP-XY 'set' expression data", "Plugins:RLOmethods",
          "clientAnalyzeXYsets.R",
          inFiles, inTypes,
          processBits, genRbits,
          outFiles, outTypes,
          setR2ClientFiles, setR2ClientObjs, setR2ClientType,
          scriptSpecificRoptions );
Parameters:
rloID - is the RLO to assign new data
menuName - text description of the RLO entry
menuStubName - used by client to put RLO menu entry in a particular menu.
RscriptName - is the name of the .R file
inputDataFileNames - opt. list of R input data file names
inputDataTypes - corresponding list of R input data file types
processBits - used during eval
genRbits - used during edit by R script GUI
outputDataFileNames - opt. list of R output data file names
outputDataTypes - corresponding list of R output data file types
setR2ClientFileNames - opt. list of file names to set R output data to client state objects
setR2ClientObjNames - opt. list of client object names to set R output data to client state objects
setR2ClientObjType - opt. list of client object types to set R output data to client state objects
scriptSpecificRoptions -  
Returns:
true if succeed

rmvRLO

public final boolean rmvRLO(int rloIdToRemove)
rmvRLO() - remove the RLO from the analyses database
Parameters:
rloIdToRemove - to remove
Returns:
true if removed

clearRLOdb

public final void clearRLOdb()
clearRLOdb() - clear list of R LayOuts analyses in the database

getRLOidByRscriptName

public final int getRLOidByRscriptName(java.lang.String RscriptName)
getRLOidByRscriptName() - get the current RLO analysis method id by RscriptName
Parameters:
RscriptName - to lookup in the database
Returns:
current RLO object id, -1 if not found

getCurrentRLOid

public final int getCurrentRLOid()
getCurrentRLOid() - get the current RLO analysis method id
Returns:
current RLO object id

setCurrentRLO

public final void setCurrentRLO(int analysisNbr)
setCurrentRLO() - set the current RLO analysis method by id
Parameters:
analysisNbr - to set as the current analysis method

getCurrentRLOmenuName

public final java.lang.String getCurrentRLOmenuName()
getCurrentRLOmenuName() - get the current RLO analysis menu string name
Returns:
current RLO analysis menu string name

getCurrentRLOmenuStubName

public final java.lang.String getCurrentRLOmenuStubName()
getCurrentRLOmenuStubName() - get the current RLO analysis menu stub string name
Returns:
current RLO analysis menu stub string name

getCurrentRLORscriptName

public final java.lang.String getCurrentRLORscriptName()
getCurrentRLORscriptName() - get current RLO analysis .R script file name
Returns:
current RLO analysis .R script file name

getInputDataFileNames

public final java.lang.String[] getInputDataFileNames()
getInputDataFileNames() - get current RLO list of input data file names
Returns:
current RLO list of output data file names

getInputDataTypes

public final int[] getInputDataTypes()
getInputDataTypes() - get current RLO list of input data file types
Returns:
current RLO list of input data file types

getOutputDataFileNames

public final java.lang.String[] getOutputDataFileNames()
getOutputDataFileNames() - get current RLO list of output data file names.
Returns:
current RLO list of output data file names

getOutputDataTypes

public final int[] getOutputDataTypes()
getOutputDataTypes() - get current RLO list of output data file types
Returns:
current RLO list of output data file types

getSetR2ClientFileNames

public final java.lang.String[] getSetR2ClientFileNames()
getSetR2ClientFileNames() - get current RLO list of R2Client data file names. Note the data file is also specified in the output file names.
Returns:
current RLO list of R2Client data file names

getSetR2ClientObjNames

public final java.lang.String[] getSetR2ClientObjNames()
getSetR2ClientObjNames() - get current RLO list of R2Client object names
Returns:
current RLO list of R2Client object names

getSetR2ClientObjTypes

public final int[] getSetR2ClientObjTypes()
getSetR2ClientObjTypes() - get current RLO list of R2Client object types
Returns:
current RLO list of R2Client object types

setInputFilesData

public final boolean setInputFilesData(java.lang.String[] fileNames,
                                       int[] dataTypes)
setInputFilesData() - set current RLO list of input data (fileName,dataType)
Parameters:
fileNames - - list of input files names
dataTypes - - list of input files data types
Returns:
true if succeed

setOutputFilesData

public final boolean setOutputFilesData(java.lang.String[] fileNames,
                                        int[] dataTypes)
setOutputFilesData() - set current RLO list of output data (fileName,dataType)
Parameters:
fileNames - - list of input files names
dataTypes - - list of input files data types
Returns:
true if succeed

setR2ClientActionsData

public final boolean setR2ClientActionsData(java.lang.String[] fileNames,
                                            java.lang.String[] objNames,
                                            int[] objTypes)
setR2ClientActionsData() - set cur. RLO list of R2Client (file,obj,type) Actions data.
Parameters:
fileNames - - list of R2Client file names
objNames - - list of R2Client object names
objTypes - - list of R2Client object types
Returns:
true if succeed

getAllProcessBits

public final int getAllProcessBits()

setAllProcessBits

public final void setAllProcessBits(int bits)
setAllProcessBits() - set Process Bits bits for current RLO.
Parameters:
bits - to use in set in RLO process bits pattern

isProcessBit

public final boolean isProcessBit(int bit)
isProcessBit() - test Process Bits for current RLO.
Parameters:
bit - to test in RLO process bits pattern
Returns:
true it specified bit is set in the process bits

clearProcessBit

public final void clearProcessBit(int bit)
clearProcessBit() - clear specific Process Bit(s) for current RLO.
Parameters:
bit - to clear in RLO process bits pattern
Returns:
true it specified bit is set in the process bits

setProcessBit

public final void setProcessBit(int bit)
setProcessBit() - set specific Process Bit(s) for current RLO.
Parameters:
bit - to clear in RLO process bits pattern
Returns:
true it specified bit is set in the process bits

getAllGenRbits

public final int getAllGenRbits()
getAllGenRbits() - get GenR Bits using R_GENR_xxxx bits for current RLO.
Returns:
RLO GenR Bits

setAllGenRbits

public final void setAllGenRbits(int bits)
setAllGenRbits() - set GenR Bits using R_GENR_xxxx bits for current RLO.
Parameters:
bits - to use in set in RLO GenR Bits pattern

isGenRbit

public final boolean isGenRbit(int bit)
isGenRbit() - test GenR Bits for current RLO.
Parameters:
bit - to test in RLO GenR Bits pattern
Returns:
true it specified bit is set in the GenR Bits

clearGenRbit

public final void clearGenRbit(int bit)
clearGenRbit() - clear specific GenR Bit(s) for current RLO.
Parameters:
bit - to clear in RLO GenR Bits pattern
Returns:
true it specified bit is set in the GenR Bits

setGenRbit

public final void setGenRbit(int bit)
setGenRbit() - set specific GenR Bit(s) for current RLO.
Parameters:
bit - to clear in RLO GenR Bits pattern
Returns:
true it specified bit is set in the GenR Bits

getRLOoutFile

public final java.lang.String getRLOoutFile(int lookForFileType,
                                            int nth)
getRLOoutFile() get the nth Output Data file by out file type. Search outputDataTypes[] entries in the current RLO analysis instance.
Parameters:
lookForFileType - is one of R_FILE_TYPE_xxxx values
nth - is the nth instance to return (counting from 1 - not 0!)
Returns:
file name if found, else null if failed.

getRLOinputFile

public final java.lang.String getRLOinputFile(int lookForFileType,
                                              int nth)
getRLOinputFile() get the nth Input Data file by input file type. Search inputDataTypes[] entries in the current RLO analysis instance.
Parameters:
lookForFileType - is one of R_FILE_TYPE_xxxx values
nth - is the nth instance to return (counting from 1 - not 0!)
Returns:
file name if found, else null if failed.

getRstartupOptions

public final java.lang.String getRstartupOptions()
getRstartupOptions() - get R command line startup options
Returns:
startup option string

getRstartupOptions

public final void getRstartupOptions(java.lang.String str)
setRstartupOptions() - set R command line startup options
Parameters:
str - startup option string

getRLOstring

public final java.lang.String getRLOstring(java.lang.String optGenRbitsStr)
getRLOstring() - get prettyprint string for the current RLO
Parameters:
optGenRbitsStr - optional genRbits representation computed elsewhere.
Returns:
prettyprint string for the current RLO

setupAllBasePaths

public final boolean setupAllBasePaths(java.lang.String clientPrjPath)
setupAllBasePaths() - generate all base paths of directories
 1. RbinBasePath is the executable bin directory for 
    running R in ,
 2. reportBasePath for saving reports in {project}/Report/, 
 3. RscriptBasePath is the {client installation}/R/
    for .R scripts, 
 4. tempBasePath is the {project}/Temp/ directory used for 
    R data input,
 5. clientRlibrBasePath is  "/lib"
    dir where R project {RLORlibr}/ directory lives   
Parameters:
clientPrjPath - is the client project base path. If this is null, then it uses the current client project path.
Returns:
true if succeed
See Also:
#setupRbinPath

runRscriptWithR

public final java.lang.String runRscriptWithR()
runRscriptWithR() - compute report string by running R script through the R program. We eval the script after prepping required data into Temp/ for the curAnalysis by exec'ing an R process. After it completes, we read the output files from Report/ required by the analyses[curAnalysis] specification.
Returns:
results of running R script

getReportBasePath

public final java.lang.String getReportBasePath()
getReportBasePath() - get current path of client /Report/
Returns:
path

getRscriptBasePath

public final java.lang.String getRscriptBasePath()
getRscriptBasePath() - get current path of /R/
Returns:
path

getRLObasePath

public final java.lang.String getRLObasePath()
getRLObasePath() - get current path of /RLO/
Returns:
path

getTempBasePath

public final java.lang.String getTempBasePath()
getTempBasePath() - get current path of client /Temp/
Returns:
path

getRLORlibrBasePath

public final java.lang.String getRLORlibrBasePath()
getRLORlibrBasePath() - get current base path of client RLORibr/ directory lives in "{installation directory}/".
Returns:
path

getStartupRscriptFileName

public final java.lang.String getStartupRscriptFileName()
getStartupRscriptFileName() - get name of batch R startup script file to exec() by the OS after file setup
Returns:
script file name

getInputRscriptFileName

public final java.lang.String getInputRscriptFileName()
getInputRscriptFileName() - get current name of .R input script file

getFullRunRfilePath

public final java.lang.String getFullRunRfilePath()
getFullRunRfilePath() - full path of batch R startup script file after file setup

getFullRscriptInputPath

public final java.lang.String getFullRscriptInputPath()
getFullRscriptInputPath() - full path of R input script file after file setup
Returns:
path

getFullRoutputFilePath

public final java.lang.String getFullRoutputFilePath()
getFullRoutputFilePath() - get full path of R output file after file setup
Returns:
path

getRreportStr

public final java.lang.String getRreportStr()
getRreportStr() - get R report after doing eval of .R script after file setup
Returns:
path

readPermanentRLOdatabase

public final boolean readPermanentRLOdatabase(boolean loadDemoRLOsFlag)
readPermanentRLOdatabase() - read RLO entries from the permanent /RLO/ database.
Parameters:
loadDemoRLOsFlag - to not read demo databases
Returns:
true if succeed

writePermanentRLOdatabase

public final boolean writePermanentRLOdatabase()
writePermanentRLOdatabase() - write RLO entries to the permanent /RLO/ database. Note: it does NOT write demo databases with genRbit R_GENR_DEMO set. i.e., the genRbit word is 0.
Returns:
true if succeed

readRLOfile

public final int readRLOfile(java.lang.String rloFileName,
                             boolean loadDemoRLOsFlag)
readRLOfile() - read RLO by .rlo file name into a new RLO (rloID). The file resides in {Client installation}/RLO/*.rlo file
Parameters:
rloFileName - full path file name for .rlo file
loadDemoRLOsFlag - if want to force loading the Demo RLO
Returns:
the new RLO id generated by doing an addRLO(), else -1 if failed

writeRLOfile

public final boolean writeRLOfile(java.lang.String rloBasePath,
                                  int rloID)
writeRLOfile() - write RLO by .rlo file name for the specified RLO (rloID). The file resides in the {Client installation}/RLO/{rScriptName}.rlo file
Parameters:
rloBasePath - is the base path of the RLO/ directory
rloID - to save as .rlo file
Returns:
true if succeed