public class TabToColumnInfoModeCore extends Object
| Modifier and Type | Field and Description |
|---|---|
boolean |
createCache
Set to true if you don't want to output any data, just process the file and leave
the results in data structures in the object, good for API calls to this class
or testing.
|
boolean |
display
Output the results to stdout.
|
int |
numberOfLinesToProcess
The number of input lines to read or set to a value less than or equal to 0 to read the entire file.
|
boolean |
readFromCache
If the .colinfo file already exists, if this is true it will be used.
|
boolean |
verbose
Verbose.
|
| Constructor and Description |
|---|
TabToColumnInfoModeCore() |
| 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.
|
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).
|
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 |
setApiMode(boolean apiMode) |
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.
|
public int numberOfLinesToProcess
public boolean createCache
public boolean readFromCache
public boolean display
public boolean verbose
public void setApiMode(boolean apiMode)
public 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
IOExceptionpublic 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.