public class TabToColumnInfoMode extends AbstractGobyMode
| Constructor and Description |
|---|
TabToColumnInfoMode() |
| Modifier and Type | Method and Description |
|---|---|
void |
addInputFile(File inputFile)
Add an input file.
|
void |
addInputFilename(String inputFilename)
Add an input filename.
|
void |
clearInputFilenames()
Clear the input files list.
|
AbstractCommandLineMode |
configure(String[] args)
Configure.
|
void |
execute()
Gather column info for provided input files.
|
Map<String,ColumnType> |
getDetailsAtIndex(int index)
Get a specific column details based on the order of the input filenames given.
|
Map<String,Map<String,ColumnType>> |
getFilenameToDetailsMap()
Get the map of filenames -> (columnName -> columnType map).
|
String |
getModeDescription()
Mode description.
|
String |
getModeName()
Mode name.
|
int |
getNumberOfLinesToProcess()
Get the number of input lines to read or set to <= 0 to read the entire file.
|
boolean |
isCreateCache()
Get if createCache mode is enabled.
|
boolean |
isDisplay()
Output the results to stdout.
|
boolean |
isReadFromCache()
If true, the [filename].colinfo file already exists, if this is true it will be used.
|
boolean |
isVerbose()
Verbose.
|
void |
processOneFile(String filename)
Process one file
|
void |
setCreateCache(boolean createCache)
Set if createCache mode is enabled.
|
void |
setDisplay(boolean display)
Output the results to stdout.
|
void |
setInputFilenames(String[] inputFilenames)
Set the input filenames.
|
void |
setInputFiles(File[] inputFiles)
Set the input filenames.
|
void |
setNumberOfLinesToProcess(int numberOfLinesToProcess)
Set the number of input lines to read or set to <= 0 to read the entire file.
|
void |
setReadFromCache(boolean readFromCache)
If true, the [filename].colinfo file already exists, if this is true it will be used.
|
void |
setVerbose(boolean verbose)
Verbose.
|
ColumnType |
typeFromValue(String value)
Check the type of value, is it an Integer, Float, or a String.
|
getJarFilename, getShortModeName, loadJsapFromResource, loadJsapFromResource, parseJsap, parseJsapArguments, parseJsapArguments, printDynamicHelpOptions, printUsage, printUsageAsHtmlTable, printUsageAsWikiTable, setJarFilenamepublic String getModeName()
getModeName in class AbstractCommandLineModepublic String getModeDescription()
getModeDescription in class AbstractCommandLineModepublic AbstractCommandLineMode configure(String[] args) throws IOException, com.martiansoftware.jsap.JSAPException
configure in class AbstractCommandLineModeargs - command line argumentsIOException - error parsingcom.martiansoftware.jsap.JSAPException - error parsingpublic void addInputFilename(String inputFilename)
inputFilename - the input filename to add.public void addInputFile(File inputFile)
inputFile - the input file to add.public void clearInputFilenames()
public void setInputFilenames(String[] inputFilenames)
inputFilenames - the input filenamepublic void setInputFiles(File[] inputFiles)
inputFiles - the input filenamepublic boolean isCreateCache()
public void setCreateCache(boolean createCache)
createCache - the new value of createCachepublic boolean isDisplay()
public void setDisplay(boolean display)
display - new value for displaypublic int getNumberOfLinesToProcess()
public void setNumberOfLinesToProcess(int numberOfLinesToProcess)
numberOfLinesToProcess - the new value of numberOfLinesToProcesspublic boolean isReadFromCache()
public void setReadFromCache(boolean readFromCache)
readFromCache - if readFromCache is enabled.public boolean isVerbose()
public void setVerbose(boolean verbose)
verbose - new verbose valuepublic Map<String,Map<String,ColumnType>> getFilenameToDetailsMap()
public Map<String,ColumnType> getDetailsAtIndex(int index) throws IndexOutOfBoundsException
index - the index of results to retrieveIndexOutOfBoundsException - if index provided is too largepublic void execute()
throws IOException
execute in class AbstractCommandLineModeIOExceptionpublic void processOneFile(String filename) throws IOException
filename - the filename to processIOException - an error processing the file.public ColumnType typeFromValue(String value)
value - the value to checkCopyright © 2018 Campagne Laboratory. All rights reserved.