|
||||||||||
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()
|
CSVFormat |
getFormat()
|
File |
getInputFilename()
|
String[] |
getInputHeadings()
|
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 |
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 int getColumnCount()
public File getInputFilename()
public CSVFormat getFormat()
public String[] getInputHeadings()
public int getPrecision()
public int getRecordCount()
public StatusReportable getReport()
public int getReportInterval()
public boolean isAnalyzed()
public boolean isExpectInputHeaders()
public boolean isProduceOutputHeaders()
public void performBasicCounts()
public PrintWriter prepareOutputFile(File outputFile)
outputFile
- The name of the output file.
public void readHeaders(ReadCSV csv)
csv
- The CSV file to read from.public void reportDone(boolean isAnalyzing)
isAnalyzing
- True if we are analyzing.public void reportDone(String task)
task
- The message.public void requestStop()
requestStop
in interface QuantTask
public void resetStatus()
public void setAnalyzed(boolean theAnalyzed)
theAnalyzed
- True, if the file has been analyzed.public void setColumnCount(int theColumnCount)
theColumnCount
- The new column count.public void setExpectInputHeaders(boolean theExpectInputHeaders)
theExpectInputHeaders
- Are input headers expected?public void setInputFilename(File theInputFilename)
theInputFilename
- The input filename.public void setInputFormat(CSVFormat theInputFormat)
theInputFormat
- The new inputFormat format.public void setInputHeadings(String[] theInputHeadings)
theInputHeadings
- The new input headings.public void setPrecision(int thePrecision)
thePrecision
- The precision to use.public void setProduceOutputHeaders(boolean theProduceOutputHeaders)
theProduceOutputHeaders
- the produceOutputHeaders to setpublic void setRecordCount(int v)
v
- The record count.public void setReport(StatusReportable theReport)
theReport
- The status reporting object.public void setReportInterval(int theReportInterval)
theReportInterval
- The new reporting interval.public boolean shouldStop()
shouldStop
in interface QuantTask
public String toString()
toString
in class Object
public void updateStatus(boolean isAnalyzing)
isAnalyzing
- True if we are in the process of analyzing.public void updateStatus(String task)
task
- The string to report.public void validateAnalyzed()
public void writeRow(PrintWriter tw, LoadedRow row)
tw
- The output stream.row
- The row to write out.public AnalystScript getScript()
public 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 |