|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.encog.app.analyst.csv.basic.BasicFile
public class BasicFile
Many of the Encog quant CSV processors are based upon this class. This class is not useful on its own. However, it does form the foundation for most Encog CSV file processing.
| Field Summary | |
|---|---|
static int |
REPORT_INTERVAL
The default report interval. |
| Constructor Summary | |
|---|---|
BasicFile()
Construct the object, and set the defaults. |
|
| Method Summary | |
|---|---|
static void |
appendSeparator(StringBuilder line,
CSVFormat format)
Append a separator. |
int |
getColumnCount()
|
File |
getInputFilename()
|
CSVFormat |
getInputFormat()
|
String[] |
getInputHeadings()
|
CSVFormat |
getOutputFormat()
|
int |
getPrecision()
|
int |
getRecordCount()
|
StatusReportable |
getReport()
|
int |
getReportInterval()
|
AnalystScript |
getScript()
|
boolean |
isAnalyzed()
|
boolean |
isExpectInputHeaders()
|
boolean |
isProduceOutputHeaders()
|
void |
performBasicCounts()
Perform a basic analyze of the file. |
PrintWriter |
prepareOutputFile(File outputFile)
Prepare the output file, write headers if needed. |
void |
readHeaders(ReadCSV csv)
Read the headers from a CSV file. |
void |
reportDone(boolean isAnalyzing)
Report that we are done. |
void |
reportDone(String task)
Report that we are done. |
void |
requestStop()
Request a stop. |
void |
resetStatus()
Reset the reporting stats. |
void |
setAnalyzed(boolean theAnalyzed)
Set to true, if the file has been analyzed. |
void |
setColumnCount(int theColumnCount)
Set the column count. |
void |
setExpectInputHeaders(boolean theExpectInputHeaders)
Set the flag to determine if we are expecting input headers. |
void |
setInputFilename(File theInputFilename)
Set the input filename. |
void |
setInputFormat(CSVFormat theInputFormat)
Set the input format. |
void |
setInputHeadings(String[] theInputHeadings)
Set the input headings. |
void |
setOutputFormat(CSVFormat theOutputFormat)
|
void |
setPrecision(int thePrecision)
Set the precision to use. |
void |
setProduceOutputHeaders(boolean theProduceOutputHeaders)
|
void |
setRecordCount(int v)
Set the record count. |
void |
setReport(StatusReportable theReport)
Set the status reporting object. |
void |
setReportInterval(int theReportInterval)
Set the reporting interval. |
void |
setScript(AnalystScript theScript)
|
boolean |
shouldStop()
|
String |
toString()
|
void |
updateStatus(boolean isAnalyzing)
Update the status. |
void |
updateStatus(String task)
Report the current status. |
void |
validateAnalyzed()
Validate that the file has been analyzed. |
void |
writeRow(PrintWriter tw,
LoadedRow row)
Write a row to the output file. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int REPORT_INTERVAL
| Constructor Detail |
|---|
public BasicFile()
| Method Detail |
|---|
public static void appendSeparator(StringBuilder line,
CSVFormat format)
line - The line to append to.format - The format to use.public final int getColumnCount()
public final File getInputFilename()
public final CSVFormat getInputFormat()
public final String[] getInputHeadings()
public final CSVFormat getOutputFormat()
public final int getPrecision()
public final int getRecordCount()
public final StatusReportable getReport()
public final int getReportInterval()
public final boolean isAnalyzed()
public final boolean isExpectInputHeaders()
public final boolean isProduceOutputHeaders()
public final void performBasicCounts()
public final PrintWriter prepareOutputFile(File outputFile)
outputFile - The name of the output file.
public final void readHeaders(ReadCSV csv)
csv - The CSV file to read from.public final void reportDone(boolean isAnalyzing)
isAnalyzing - True if we are analyzing.public final void reportDone(String task)
task - The message.public final void requestStop()
requestStop in interface QuantTaskpublic final void resetStatus()
public final void setAnalyzed(boolean theAnalyzed)
theAnalyzed - True, if the file has been analyzed.public final void setColumnCount(int theColumnCount)
theColumnCount - The new column count.public final void setExpectInputHeaders(boolean theExpectInputHeaders)
theExpectInputHeaders - Are input headers expected?public final void setInputFilename(File theInputFilename)
theInputFilename - The input filename.public final void setInputFormat(CSVFormat theInputFormat)
theInputFormat - The new inputFormat format.public final void setInputHeadings(String[] theInputHeadings)
theInputHeadings - The new input headings.public final void setOutputFormat(CSVFormat theOutputFormat)
theOutputFormat - the outputFormat to setpublic final void setPrecision(int thePrecision)
thePrecision - The precision to use.public final void setProduceOutputHeaders(boolean theProduceOutputHeaders)
theProduceOutputHeaders - the produceOutputHeaders to setpublic final void setRecordCount(int v)
v - The record count.public final void setReport(StatusReportable theReport)
theReport - The status reporting object.public final void setReportInterval(int theReportInterval)
theReportInterval - The new reporting interval.public final boolean shouldStop()
shouldStop in interface QuantTaskpublic final String toString()
toString in class Objectpublic final void updateStatus(boolean isAnalyzing)
isAnalyzing - True if we are in the process of analyzing.public final void updateStatus(String task)
task - The string to report.public final void validateAnalyzed()
public final void writeRow(PrintWriter tw,
LoadedRow row)
tw - The output stream.row - The row to write out.public final AnalystScript getScript()
public final void setScript(AnalystScript theScript)
theScript - the script to set
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||