O2Plib.db.CSD
Class CSD

java.lang.Object
  extended by O2Plib.db.CSD.CSDglb
      extended by O2Plib.db.CSD.CSD

public class CSD
extends CSDglb

Class CSD supports a Composite Samples Database data structure for Open2Dprot programs. It contains data for a single DB.

 ********************************************************************
 ****** NOT RELEASED - work in progress - THIS WILL CHANGE!!!!  *****
 1. There are more fields and objects that will be added
    from refactored MAExplorer, Flicker, GELLAB-II, and other
    analysis methods to make invoking analysis methods and R easier.
 2. JDBC related classed will be added.
 3. After the initial brain-dump, need to GGGR this design. Remove
    old-paradigm code/objects; orient it towards use with XML and
    RDBMS databases.
 4. Add classes:
 ********************************************************************
This file is derived from Open2Dprot, MAExplorer, and GELLAB-II C code

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

Version:
$Date: 2005/12/09 15:04:26 $ $Revision: 1.13 $
Author:
P. Lemkin, NCI-Frederick, Frederick, MD, 21702

Field Summary
static java.lang.String VERSION
          Version for this module
 
Fields inherited from class O2Plib.db.CSD.CSDglb
allSetSamples, AP, batchDir, BF_IS_LMS_SPOT, BF_ISVALIDSPOT, cacheDir, cdbIsOpenFlag, condListDB, CONSOLE_FLAG, CP, CSD_DBTYPE_CACHE, CSD_DBTYPE_RDBMS, CSD_DBTYPE_TAB_DELIM, CSD_DBTYPE_UNKNOWN, CSD_DBTYPE_XML, csdAcc, csdCache, csdCacheFile, csdDatabaseFile, csdFormatMode, csdIO, csdLMS, csdName, csdRdbmsFile, csdSizes, csdTabDelimFile, csdTotals, CSDversion, csdXMLfile, dataFiltersListDB, dateCreation, dateLastSession, dbRsample, dbSample, dbSamplesListDB, dbSPFlistsDB, dBugLMsetNbr, dBugPspotNbr, dBugRspotNbr, dBugSampleNbr, EP, epSetSamples, exprListsDB, GS, LM, MAX_NODE_SAFTY_FACTOR, mrl, nbrTimesInitialized, nCondListDB, nDataFiltersDB, needToSaveCSDdataFlag, NEVER, nExprListsDB, nOclDB, nodeSaftyFactor, normListDB, nRmapsDB, nRspotListsDB, nSamplesDB, nSPFfilesUsedDB, nSPFlistsDB, oclListDB, oclNameDB, PP, ppxDir, projDir, rdbmsDir, rMapsListDB, RSAMPLE, rspotListsDB, SAMPLE, sampleNamesDB, sampleNamesUsedDB, SP, tmpDir, US, useInternalDTDflag, wrkAnotation, wrkCalib, wrkERspot, wrkExpr, wrkSetSamples, xmlDir, xSetSamples, ySetSamples
 
Constructor Summary
CSD()
          CSD() - Constructor for new CSD.
CSD(java.lang.String csdName, java.lang.String csdDatabaseFile, java.lang.String projDir, int csdFormatMode)
          CSD() - Constructor for new CSD.
 
Method Summary
 boolean clearCSD()
          clearCSD() - clear the CSD [TODO]
 void init()
          init() - setup the related sub class object instances
 boolean openCSDdbFile()
          openCSDdbFile() - Open the CSD RDBMS, XML or cache file Don't open if it is already opened.
 boolean removeSPFandSSFSpotListsCSD()
          removeSPFandSSFSpotListsCSD() - remove the non-Rsample spotlist[] and spotPairList[] .
 boolean renameCSD(java.lang.String newCSDname)
          renameCSD() - rename the CSD [TODO]
 boolean rightSize()
          rightSize() - "Right-size" all CSD lists if required.
 boolean saveCSD()
          saveCSD() - save the CSD [TODO]
 boolean setCSDnameProj(java.lang.String aCsdName, java.lang.String aCsdDatabaseFile, java.lang.String aProjDir, int aCsdFormatMode)
          setCSDnameProj() - change the current CSD name and project directory
 void setDbPairSamples(DbPairSamples[] aDbSPFlistsDB)
          setDbPairSamples() - set the dbSPFlist of pair-samples for the CSD.
 void setDbSampleList(DbSample[] aDbSamplesListDB)
          setDbSamples() - set the list of samples for the CSD.
 void setDbSampleList(DbSample[] aDbSamplesListDB, java.lang.String[] aSampleNamesDB)
          setDbSamples() - set the list of samples for the CSD.
 void setDbSamples(DbSample aDbRsample, DbSample aDbSample)
          setDbSamples() - set the dbRsample and dbSample objects for this spot.
 void setLMsetDebugging(int dBugLMsetNumber)
          setLMsetDebugging() - set the debug LMset number for the CSD.
 void setPspotDebugging(int dBugPspotNumber)
          setPspotDebugging() - set the debug Pspot number for the CSD.
 void setRspotDebugging(int dBugRspotNumber)
          setRspotDebugging() - set the debug Rspot number for the CSD.
 void setSampleDebugging(int dBugSampleNumber)
          setSampleDebugging() - set the debug Sample number for the CSD.
 void setUseInternalDTDflag(boolean aUseInternalDTDflag)
          setUseInternalDTDflag() - set the use internal DTD flag.
 java.lang.String toXML()
          toXML() - convert database to XML string
 
Methods inherited from class O2Plib.db.CSD.CSDglb
initGlb
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VERSION

public static final java.lang.String VERSION
Version for this module

See Also:
Constant Field Values
Constructor Detail

CSD

public CSD()
CSD() - Constructor for new CSD.


CSD

public CSD(java.lang.String csdName,
           java.lang.String csdDatabaseFile,
           java.lang.String projDir,
           int csdFormatMode)
CSD() - Constructor for new CSD.

Parameters:
csdName - is the base name of the CSD database
csdDatabaseFile - is the name of the CSD database with a full path and file extension.
projDir - is the project directory for the file
csdFormatMode - is CSD_XML, CSD_CACHE, or CSD_RDBMS
Method Detail

init

public void init()
init() - setup the related sub class object instances


clearCSD

public boolean clearCSD()
clearCSD() - clear the CSD [TODO]

Returns:
true if succeed

saveCSD

public boolean saveCSD()
saveCSD() - save the CSD [TODO]

Returns:
true if succeed

renameCSD

public boolean renameCSD(java.lang.String newCSDname)
renameCSD() - rename the CSD [TODO]

Parameters:
newCSDname - is new name for current CSD database
Returns:
true if succeed

setCSDnameProj

public boolean setCSDnameProj(java.lang.String aCsdName,
                              java.lang.String aCsdDatabaseFile,
                              java.lang.String aProjDir,
                              int aCsdFormatMode)
setCSDnameProj() - change the current CSD name and project directory

Parameters:
aCsdName - is the base name of the CSD database
aCsdDatabaseFile - is the name of the CSD database with a full path and file extension.
aProjDir - is the project directory for the file
aCsdFormatMode - is CSD_DBTYPE_XML, CSD_DBTYPE_CACHE, or CSD_DBTYPE_RDBMS
Returns:
true if succeed

setUseInternalDTDflag

public void setUseInternalDTDflag(boolean aUseInternalDTDflag)
setUseInternalDTDflag() - set the use internal DTD flag. This is used to decide if add internal "Open2Dprot-CSD.dtd" file in CSD XML output file.

Parameters:
useInternalDTDflag - status to set

openCSDdbFile

public boolean openCSDdbFile()
openCSDdbFile() - Open the CSD RDBMS, XML or cache file Don't open if it is already opened.

Returns:
true if succeed

setDbSamples

public void setDbSamples(DbSample aDbRsample,
                         DbSample aDbSample)
setDbSamples() - set the dbRsample and dbSample objects for this spot.

Parameters:
dbRsample - is sample for pairing with this spot
dbSample - for this spot

setDbPairSamples

public void setDbPairSamples(DbPairSamples[] aDbSPFlistsDB)
setDbPairSamples() - set the dbSPFlist of pair-samples for the CSD.

Parameters:
dbSPFlists - is the list of DbSamples if not null.

setDbSampleList

public void setDbSampleList(DbSample[] aDbSamplesListDB,
                            java.lang.String[] aSampleNamesDB)
setDbSamples() - set the list of samples for the CSD.

Parameters:
dbSamplesList - is the list of DbSamples if not null.
sampleNames - is the list of sample string names if not null

setDbSampleList

public void setDbSampleList(DbSample[] aDbSamplesListDB)
setDbSamples() - set the list of samples for the CSD. Create the sampleName[0:nSamples-1] list from the sample list.

Parameters:
dbSamplesListDB - is the list of DbSamples if not null.

setLMsetDebugging

public void setLMsetDebugging(int dBugLMsetNumber)
setLMsetDebugging() - set the debug LMset number for the CSD. A value of -1 means no debugging.

Parameters:
dBugLMsetNumber - is the debug LMset number

setRspotDebugging

public void setRspotDebugging(int dBugRspotNumber)
setRspotDebugging() - set the debug Rspot number for the CSD. A value of -1 means no debugging.

Parameters:
dBugRspotNumber - is the debug spot number

setPspotDebugging

public void setPspotDebugging(int dBugPspotNumber)
setPspotDebugging() - set the debug Pspot number for the CSD. A value of -1 means no debugging.

Parameters:
dBugPspotNumber - is the debug spot number

setSampleDebugging

public void setSampleDebugging(int dBugSampleNumber)
setSampleDebugging() - set the debug Sample number for the CSD. A value of -1 means no debugging.

Parameters:
dBugSampleNumber - is the debug spot number

rightSize

public boolean rightSize()
rightSize() - "Right-size" all CSD lists if required.

Returns:
true if succeed

removeSPFandSSFSpotListsCSD

public boolean removeSPFandSSFSpotListsCSD()
removeSPFandSSFSpotListsCSD() - remove the non-Rsample spotlist[] and spotPairList[] .

Returns:
true if succeed

toXML

public java.lang.String toXML()
toXML() - convert database to XML string

Returns:
XML string if succeed, else null