|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.ObjectSwitches
public class Switches
File Switches class used to parse the switches from the command line args passed as argsV[]. The parsed switches are stored in the Globals variables through the main class HTMLtools cvt instance. Until we [REFACTOR] the JTV (Java TreeView) converter to a separate application, the variables reside here.
List of Methods parseSwitches() - parse the command line args and set Global variables. getCleanArgList() - Remove # prefaced and "" lines and resize argsV. parseGBSswitches() - parse curSW switch to see if it is a GBS option. parseTIswitches() - parse curSW switch to see if it is a TI option parseJTVswitches() - parse JTV command line args and set Global variables. createHeaderNameMapTable() - create header name map table and lists, flags.
This code is available at the HTMLtools project on SourceForge at http://htmltools.sourceforge.org/ under the "Common Public License Version 1.0" http://www.opensource.org/licenses/cpl1.0.php.
It was derived and refactored from the open source MAExplorer (http://maexplorer.sourceforge.org/), and Open2Dprot (http://Open2Dprot.sourceforge.net/) Table modules.
$Date: 2009/11/14 11:45:56 $ $Revision: 1.36 $
Copyright 2008, 2009 by Peter Lemkin
E-Mail: lemkin@users.sourceforge.net
http://lemkingroup.com/
| Field Summary | |
|---|---|
HTMLtools |
cvt
|
FileTable |
fio
Global fileTable instance |
| Constructor Summary | |
|---|---|
Switches(HTMLtools cvt)
Switches() - Constructor. |
|
| Method Summary | |
|---|---|
private boolean |
createHeaderNameMapTable(java.lang.String mapNameFile,
int fromHdrNbr,
int toHdrNbr)
createHeaderNameMapTable() - create header name map table and lists, flags. |
private boolean |
createHeaderNameMapTable(java.lang.String mapNameFile,
java.lang.String fromHdrName,
java.lang.String toHdrName)
createHeaderNameMapTable() - create header name map table and lists, flags. |
private boolean |
createHeaderNameMapTable(java.lang.String mapNameFile,
java.lang.String fromHdrName,
java.lang.String toHdrName,
int fromHdrNbr,
int toHdrNbr,
boolean useL2Sflag)
createHeaderNameMapTable() - create header name map table and lists, flags. |
java.lang.String[] |
getCleanArgList(java.lang.String[] argsV)
getCleanArgList() - Remove # prefaced comments and "" lines and make argsV the exact size. |
private int |
parseGBSswitches(java.lang.String curSW)
parseGBSswitches() - parse curSW switch to see if it is a GBS option where GSB is GenBatchScripts. |
private int |
parseJTVswitches(java.lang.String curSW)
parseJTVswitches() - parse curSW switch to see if it is a JTV option. |
boolean |
parseSwitches(java.lang.String[] argsV)
parseSwitches() - parse the arg list and set global switches and variables. |
private int |
parseTIswitches(java.lang.String curSW)
parseTIswitches() - parse curSW switch to see if it is a TI option where TI is Tests-Intersections command. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public HTMLtools cvt
public FileTable fio
| Constructor Detail |
|---|
public Switches(HTMLtools cvt)
| Method Detail |
|---|
public boolean parseSwitches(java.lang.String[] argsV)
HelpMsgs#COMMAND_MSG documentation.
See documentation in HelpMsgs.java for details.
Note: the switches are case sensitive.
argsV - is list of command line switches
FileIO.readFileAsString(java.lang.String),
UtilCM.cvs2Array(java.lang.String, java.lang.String),
UtilCM.cvs2i(java.lang.String),
UtilCM.cvs2f(java.lang.String),
UtilCM.setLogMsgs(boolean),
UtilCM.getLogMsgs(),
UtilCM#logMsgs,
FileTable#readFileAsTable,
FileTable.setHasTableHeaderFlag(boolean),
FileTable.setRmvTrailingBlankLinesFlag(boolean),
FileTable.setRmvTrailingEmptyColumnsFlag(boolean)public java.lang.String[] getCleanArgList(java.lang.String[] argsV)
argsV - - the command line or batch arg list
private int parseGBSswitches(java.lang.String curSW)
curSW - - switch to parse for GBS options.
private int parseTIswitches(java.lang.String curSW)
curSW - - switch to parse for GBS options.
private int parseJTVswitches(java.lang.String curSW)
curSW - - switch to parse for JTV options.
private boolean createHeaderNameMapTable(java.lang.String mapNameFile,
int fromHdrNbr,
int toHdrNbr)
mapNameFile - is mapping table containing required fieldsfromHdrNbr - contains the 'from' header columntoHdrNbr - contains the 'to' header column
private boolean createHeaderNameMapTable(java.lang.String mapNameFile,
java.lang.String fromHdrName,
java.lang.String toHdrName)
mapNameFile - is mapping table containing required fieldsfromHdrName - contains the 'from' header column nametoHdrName - contains the 'to' header column name
private boolean createHeaderNameMapTable(java.lang.String mapNameFile,
java.lang.String fromHdrName,
java.lang.String toHdrName,
int fromHdrNbr,
int toHdrNbr,
boolean useL2Sflag)
mapNameFile - is mapping table relative file containing mapping fieldsfromHdrName - contains from name headertoHdrName - contains the to name headerfromHdrNbr - contains the 'from' header column if useL2SflagtoHdrNbr - contains the 'to' header column useL2SflaguseL2Sflag - - set to true if default fromHdrName as column 1.
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||