Class CSVExporter

java.lang.Object
at.htl.timetableGenerator.output.CSVExporter

public class CSVExporter extends Object
This class provides methods to export timetables to CSV files. It can export multiple timetables to a single file or each timetable to a separate file.
  • Constructor Details

    • CSVExporter

      public CSVExporter()
  • Method Details

    • exportTimetableToFile

      public static void exportTimetableToFile(Timetable timetable, @NotNull @NotNull String path)
      Exports a single timetable to a CSV file.
      Parameters:
      timetable - the timetable to export
      path - the path of the CSV file
    • exportTimetablesToSingleFile

      public static void exportTimetablesToSingleFile(@NotNull @NotNull Map<String,Timetable> timetables, @NotNull @NotNull String stringPath)
      Exports multiple timetables to a single CSV file.
      Parameters:
      timetables - the map of timetable names to timetables
      stringPath - the path of the CSV file
      Throws:
      ExportException - if there is an error exporting.
    • exportTimetablesToMultipleFiles

      public static void exportTimetablesToMultipleFiles(@NotNull @NotNull Map<String,Timetable> timetables, @NotNull @NotNull String directory)
      Exports multiple timetables to separate CSV files.
      Parameters:
      timetables - the map of timetable names to timetables
      directory - the directory to save the CSV files
      Throws:
      ExportException - if there is an error exporting.