Class LogCSVFileHandler

java.lang.Object
outputProviders.logGenerator.LogCSVFileHandler

public class LogCSVFileHandler extends Object
Class to handle operations done on the CSV files, such as modifying paths in CSV log files, parsing CSV lines, counting lines of a CSV file and formatting a string for writing in a CSV file.
  • Constructor Details

    • LogCSVFileHandler

      public LogCSVFileHandler()
  • Method Details

    • modifyMapFilePathColumn

      public static void modifyMapFilePathColumn()
      Modifies the "Map File Path" columns in the CSV file to reflect the previous run attempt. Precondition: not called in a first run attempt
    • parseCSVLine

      public static List<String> parseCSVLine(String line)
      Parses a line of CSV data and splits it into a list of values. Handles values enclosed in double quotes and respects the CSV comma delimiter.
      Parameters:
      line - the line of CSV data to parse
      Returns:
      a list of values extracted from the CSV line
    • CSVReplacement

      public static String CSVReplacement(String unformattedString)
      Replaces all comma's and line breaks in a string with empty strings.
      Parameters:
      unformattedString - string to be formatted
      Returns:
      formatted string with no commas or line breaks