Package outputProviders.logGenerator
Class LogCSVFileHandler
java.lang.Object
outputProviders.logGenerator.LogCSVFileHandler
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringCSVReplacement(String unformattedString) Replaces all comma's and line breaks in a string with empty strings.static voidModifies the "Map File Path" columns in the CSV file to reflect the previous run attempt.parseCSVLine(String line) Parses a line of CSV data and splits it into a list of values.
-
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
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
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
-