Documentation of 'org.encog.app.analyst.csv.basic.BasicFile' Java class
BasicFile
org.encog.app.analyst.csv.basic

Class BasicFile

    • Field Detail

      • REPORT_INTERVAL

        public static final int REPORT_INTERVAL
        The default report interval.
        See Also:
        Constant Field Values
    • Constructor Detail

      • BasicFile

        public BasicFile()
        Construct the object, and set the defaults.
    • Method Detail

      • appendSeparator

        public static void appendSeparator(java.lang.StringBuilder line,
                                           CSVFormat format)
        Append a separator. The separator will only be appended if the line is not empty. This is used to build comma(or other) separated lists.
        Parameters:
        line - The line to append to.
        format - The format to use.
      • getColumnCount

        public int getColumnCount()
        Returns:
        The column count.
      • getInputFilename

        public java.io.File getInputFilename()
        Returns:
        The input filename.
      • getFormat

        public CSVFormat getFormat()
        Returns:
        THe input format.
      • getInputHeadings

        public java.lang.String[] getInputHeadings()
        Returns:
        The input headings.
      • getPrecision

        public int getPrecision()
        Returns:
        The precision to use.
      • getRecordCount

        public int getRecordCount()
        Returns:
        Get the record count. File must have been analyzed first to read the record count.
      • getReport

        public StatusReportable getReport()
        Returns:
        The status reporting object.
      • getReportInterval

        public int getReportInterval()
        Returns:
        The reporting interval, an update will be sent for every block of rows that matches the size of this property.
      • isAnalyzed

        public boolean isAnalyzed()
        Returns:
        Has the file been analyzed.
      • isExpectInputHeaders

        public boolean isExpectInputHeaders()
        Returns:
        True if we are expecting input headers.
      • isProduceOutputHeaders

        public boolean isProduceOutputHeaders()
        Returns:
        the produceOutputHeaders
      • performBasicCounts

        public void performBasicCounts()
        Perform a basic analyze of the file. This method is used mostly internally.
      • prepareOutputFile

        public java.io.PrintWriter prepareOutputFile(java.io.File outputFile)
        Prepare the output file, write headers if needed.
        Parameters:
        outputFile - The name of the output file.
        Returns:
        The output stream for the text file.
      • readHeaders

        public void readHeaders(ReadCSV csv)
        Read the headers from a CSV file. Used mostly internally.
        Parameters:
        csv - The CSV file to read from.
      • reportDone

        public void reportDone(boolean isAnalyzing)
        Report that we are done. Used internally.
        Parameters:
        isAnalyzing - True if we are analyzing.
      • reportDone

        public void reportDone(java.lang.String task)
        Report that we are done. Used internally.
        Parameters:
        task - The message.
      • requestStop

        public void requestStop()
        Request a stop.
        Specified by:
        requestStop in interface QuantTask
      • resetStatus

        public void resetStatus()
        Reset the reporting stats. Used internally.
      • setAnalyzed

        public void setAnalyzed(boolean theAnalyzed)
        Set to true, if the file has been analyzed.
        Parameters:
        theAnalyzed - True, if the file has been analyzed.
      • setColumnCount

        public void setColumnCount(int theColumnCount)
        Set the column count.
        Parameters:
        theColumnCount - The new column count.
      • setExpectInputHeaders

        public void setExpectInputHeaders(boolean theExpectInputHeaders)
        Set the flag to determine if we are expecting input headers.
        Parameters:
        theExpectInputHeaders - Are input headers expected?
      • setInputFilename

        public void setInputFilename(java.io.File theInputFilename)
        Set the input filename.
        Parameters:
        theInputFilename - The input filename.
      • setInputFormat

        public void setInputFormat(CSVFormat theInputFormat)
        Set the input format.
        Parameters:
        theInputFormat - The new inputFormat format.
      • setInputHeadings

        public void setInputHeadings(java.lang.String[] theInputHeadings)
        Set the input headings.
        Parameters:
        theInputHeadings - The new input headings.
      • setPrecision

        public void setPrecision(int thePrecision)
        Set the precision to use.
        Parameters:
        thePrecision - The precision to use.
      • setProduceOutputHeaders

        public void setProduceOutputHeaders(boolean theProduceOutputHeaders)
        Parameters:
        theProduceOutputHeaders - the produceOutputHeaders to set
      • setRecordCount

        public void setRecordCount(int v)
        Set the record count.
        Parameters:
        v - The record count.
      • setReport

        public void setReport(StatusReportable theReport)
        Set the status reporting object.
        Parameters:
        theReport - The status reporting object.
      • setReportInterval

        public void setReportInterval(int theReportInterval)
        Set the reporting interval.
        Parameters:
        theReportInterval - The new reporting interval.
      • shouldStop

        public boolean shouldStop()
        Specified by:
        shouldStop in interface QuantTask
        Returns:
        Should we stop?
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • updateStatus

        public void updateStatus(boolean isAnalyzing)
        Update the status. Used internally.
        Parameters:
        isAnalyzing - True if we are in the process of analyzing.
      • updateStatus

        public void updateStatus(java.lang.String task)
        Report the current status.
        Parameters:
        task - The string to report.
      • validateAnalyzed

        public void validateAnalyzed()
        Validate that the file has been analyzed. Throw an error, if it has not.
      • writeRow

        public void writeRow(java.io.PrintWriter tw,
                             LoadedRow row)
        Write a row to the output file.
        Parameters:
        tw - The output stream.
        row - The row to write out.
      • getScript

        public AnalystScript getScript()
        Returns:
        the script
      • setScript

        public void setScript(AnalystScript theScript)
        Parameters:
        theScript - the script to set

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.