|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--SimpleTable | +--Table | +--ConfigTable
This reads the Config file as a tab-delimited table to define the initial Configi state. Later, these values may be overiden by GetParams or by user interaction via the menu. It reads the MaExplorerConfig.txt table from FILE/URL. This whole file is a tab-delimited file consisting of the following fields: (Parameter, Value, DataType, Comments).
Table to map User Table and Field to MAExplorer Table and Field Config file entries of the form: Parameter= "mapTF" Value= "maeTname,maeFname,usrTname,usrFname" Eg. "GenomicIDdata,Clone_ID,GIPOdata,Clone Id"This table is set up here and invoked immediately after a table is read to remap the names so the MAE names can be used within MAExplorer.
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 MAExplorer Mozilla and Legal files are available on http://maexplorer.sourceforge.net/.
Config
,
Table
Field Summary | |
(package private) boolean |
hasValidData
flag: set if data was read ok |
(package private) int |
idxComments
optional comments |
(package private) int |
idxDataType
i.e "int", "boolean" or "float" |
(package private) int |
idxParameter
parameter string name |
(package private) int |
idxValue
value of parameter |
private java.lang.String[] |
mapMFname
[map 0:nMUmap-1] names of MAE Field |
private java.lang.String[] |
mapMTname
map [0:nMUmap-1] names of MAE Table |
private java.lang.String[] |
mapUFname
map 0:nMUmap-1] names of User Field |
private java.lang.String[] |
mapUTname
map [0:nMUmap-1] names of User Table |
private static int |
MAX_MU_MAP
max # of (maeTable, maeField) to (userTable, userField) map entries |
(package private) int |
nMUmap
# of map entries |
Fields inherited from class Table |
bufSize, fileOKflag, fio, mae |
Fields inherited from class SimpleTable |
fileName, msg, tCols, tData, tFields, title, tRows |
Constructor Summary | |
(package private) |
ConfigTable(MAExplorer mae,
java.lang.String fileName)
ConfigTable() - constructor to read the configuration table file. |
Method Summary | |
(package private) java.lang.String[] |
getConfigRowByRowIdx(int tableRow)
getConfigRowByRowIdx() - get row of Config data table Row |
(package private) java.lang.String |
getConfigRowFieldByName(int tableRow,
java.lang.String fieldName)
getConfigRowFieldByName() - get row field data by array coords |
(package private) java.lang.String |
getConfigRowFieldByRowFieldIdxes(int rowIdx,
int fieldIdx)
getConfigRowFieldByRowFieldIdxses() - get row field by row and field indices |
(package private) java.lang.String |
getConfigRowFieldByRowNameIdx(int idx,
java.lang.String fieldName)
getConfigRowFieldByRowIdxName() - get row field by row index and name |
(package private) java.lang.String |
getNthValueByName(java.lang.String name,
int n)
getNthValueByName() - get n'th Configuration table Value by Name |
(package private) java.lang.String[] |
getTableRowByParameter(java.lang.String param)
getTableRowByParameter() - get row of Configuration table data by Parameter |
(package private) java.lang.String |
getValueByName(java.lang.String name)
getValueByName() - get Configuration table Value by Name |
(package private) java.lang.String |
mapUsrFieldToMaeField(java.lang.String usrTbl,
java.lang.String usrField)
mapUsrFieldToMaeField() - map user (Tbl,Field) name to MAE Field name |
(package private) void |
setupFieldIndexes()
setupFieldIndexes() - setup indexes for commonly found fields. |
private void |
setupTableFieldNameMap()
setupTableFieldNameMap() - map user to MAE field names |
Methods inherited from class Table |
copyTable, createFileTable, getArrayOfTabDelimitedTokens, getData, getTableRowsSubset, getTableRowsSubset, insertTblInULHCtable, lookupFieldIdxAndRemapFieldName, makeTabDelimReport, readTable, storeDataBufParser |
Methods inherited from class SimpleTable |
freeTable, getTableRowFieldByRowIdx, getTableRowFieldIdxByRowIdx, lookupFieldIdx, setFieldData, setRowData, trimWhitespace |
Methods inherited from class java.lang.Object |
|
Field Detail |
int idxParameter
int idxValue
int idxDataType
int idxComments
private static final int MAX_MU_MAP
private java.lang.String[] mapMTname
private java.lang.String[] mapMFname
private java.lang.String[] mapUTname
private java.lang.String[] mapUFname
int nMUmap
boolean hasValidData
Constructor Detail |
ConfigTable(MAExplorer mae, java.lang.String fileName)
mae
- is the MAExplorer instancefileName
- is the full path filename for configuation filesetupFieldIndexes()
,
setupTableFieldNameMap()
Method Detail |
void setupFieldIndexes()
SimpleTable.lookupFieldIdx(java.lang.String)
private void setupTableFieldNameMap()
Parameter= "mapTF" Value= "maeTname,maeFname,usrTname,usrFname"
Util.cvs2Array(java.lang.String, int, java.lang.String)
,
getNthValueByName(java.lang.String, int)
java.lang.String mapUsrFieldToMaeField(java.lang.String usrTbl, java.lang.String usrField)
usrTbl
- is the user's name for the tableusrField
- is the user's name for the fieldjava.lang.String[] getConfigRowByRowIdx(int tableRow)
tableRow
- to get datajava.lang.String getConfigRowFieldByName(int tableRow, java.lang.String fieldName)
tableRow
- to get datafieldName
- to get dataSimpleTable.lookupFieldIdx(java.lang.String)
java.lang.String getConfigRowFieldByRowNameIdx(int idx, java.lang.String fieldName)
idx
- is row index to get datafieldName
- to get dataSimpleTable.getTableRowFieldByRowIdx(int, java.lang.String)
java.lang.String getConfigRowFieldByRowFieldIdxes(int rowIdx, int fieldIdx)
rowIdx
- is row index to get datafieldIdx
- is field index to get datajava.lang.String[] getTableRowByParameter(java.lang.String param)
param
- to use to search DBjava.lang.String getValueByName(java.lang.String name)
name
- of parameter to get datajava.lang.String getNthValueByName(java.lang.String name, int n)
name
- of parameter to get datan
- is the n'th instance of the name to getgetValueByName(java.lang.String)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |