Class Filer

java.lang.Object
org.gsusers.gsmv.utilities.Filer

public class Filer extends Object
Process reading and writing of control and data files the 'read' command takes the following arguments: - file: name of the file to be read - sModus: a control argument with the following values: 'Control': reads and processes existing control file for 'doOver'. 'Data': reads, strips and stores stripped data file (with previously established format parameters). 'Scan': reads, scans and displays data to establish format parameters and sample sizes (auto-index)
  • Constructor Details

    • Filer

      public Filer(Nest _nest, Preferences _prefs, gsLogger _logger, javafx.stage.Stage _stage)
      constructor
      Parameters:
      _nest - Nest
      _prefs - Preferences
      _logger - pointer to application gsLogger
      _stage - Stage
  • Method Details

    • readFile

      public void readFile(File file)
      reads script file line by line, to be processed by processControlLine
      Parameters:
      file - file pointer
    • showTableNew

      public javafx.scene.Group showTableNew()
      This method displays the experimental scores, as read in from the data file. It allows to exclude index columns from being fed to urGenova. In contrast to all the other display scenes ('groups'), this one is not pure javafx, but it displays the data as html within a webview. It is more efficient than having a factory generate a javafx object for each score.
      Returns:
      HTML formatted text of score data via WebView
    • readDataFileNew

      public void readDataFileNew(File _inFile)
      * Reads and parses datafile, stores possible header in 'headers', stores data in 'sRawData' structure', i.e. an array of arrays String[][] in several passes: Pass 1: counts valid lines and counts lines with Double content Pass 2: creates outer array with appropriate number of lines, then chops lines, creates inner arrays and stores Double numbers Also, initialize summing for means and counting for N's
      Parameters:
      _inFile - score data file
    • writeDataFileNew

      public void writeDataFileNew()
      writes stripped datafile to a special file (~data.txt) in the special Brennan directory (home of urGenova) for running urGenova on.
    • testSignature

      public String testSignature()
      test synthetic data file in signal noise, so synthetic data files can be distinguished from empiric data. Synthetic data show an analytic sig LessThan 10.
      Returns:
      String Signature ~
    • padLeft

      public static String padLeft(String s, int n)
      format utility pads String s to n characters with blanks
      Parameters:
      s - String to be padded
      n - int number of padding blanks
      Returns:
      padded String
    • getUrGenova

      public void getUrGenova()
      reads and parses the output string of urGENOVA
    • getFile

      public File getFile(Boolean bRead, String sTitle)
      getter of File
      Parameters:
      bRead - boolean flag read/write - true/false
      sTitle - String, title to be displayed in FileChooser
      Returns:
      File
    • saveParametersDialog

      public void saveParametersDialog(String sType, String sQuestion)
      opens Alert dialog to solicit location for new script file to be saved to.
      Parameters:
      sType - 'Analysis'/'Synthesis'
      sQuestion - text of question to be displayed
    • writeAnalysisControlFile

      public void writeAnalysisControlFile(File file, Boolean bBrennan)
      writes new analysis control file
      Parameters:
      file - pointer to File
      bBrennan - flag to limit output to urGENOVA conformity
    • writeSynthesisControlFile

      public void writeSynthesisControlFile(File fOutput)
      writes new synthesis control file
      Parameters:
      fOutput - pointer to File
    • getRawData

      public String[][] getRawData()
      returns raw data that has been read in previously for use in replication analysis.
      Returns:
      sRawData 2 dimensional array of strings