Package jmri.jmrit.timetable
Class TimeTableCsvExport
- java.lang.Object
- 
- jmri.jmrit.timetable.TimeTableCsvExport
 
- 
 public class TimeTableCsvExport extends java.lang.Object Export a timetable in CSV format for import into a speadsheet.CSV Content: Line 1 - Layout name, segment name and schedule name. Line 2 - Train names sorted by name and grouped by down or up direction. Line 3-n - Station row with the arrive and depart times for each train. - Since:
- 4.15.3
 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description (package private) static classTimeTableCsvExport.TrainEntry
 - 
Field SummaryFields Modifier and Type Field Description (package private) java.io.BufferedWriterbufferedWriter(package private) CSVPrintercsvFile(package private) java.util.List<TimeTableCsvExport.TrainEntry>downTrains(package private) booleanerrorOccurred(package private) java.io.FileWriterfileWriter(package private) java.lang.String[]stopRow(package private) TimeTableDataManagertdm(package private) inttrainIndex(package private) java.util.HashMap<java.lang.Integer,TimeTableCsvExport.TrainEntry>trainMap(package private) java.util.List<TimeTableCsvExport.TrainEntry>upTrains
 - 
Constructor SummaryConstructors Constructor Description TimeTableCsvExport()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanexportCsv(java.io.File file, int layoutId, int segmentId, int scheduleId)Create a CSV file that can be imported into a spreadsheet to create a timetable.(package private) java.lang.StringformatTime(int t)
 
- 
- 
- 
Field Detail- 
errorOccurredboolean errorOccurred 
 - 
fileWriterjava.io.FileWriter fileWriter 
 - 
bufferedWriterjava.io.BufferedWriter bufferedWriter 
 - 
csvFileCSVPrinter csvFile 
 - 
trainMapjava.util.HashMap<java.lang.Integer,TimeTableCsvExport.TrainEntry> trainMap 
 - 
trainIndexint trainIndex 
 - 
downTrainsjava.util.List<TimeTableCsvExport.TrainEntry> downTrains 
 - 
upTrainsjava.util.List<TimeTableCsvExport.TrainEntry> upTrains 
 - 
stopRowjava.lang.String[] stopRow 
 
- 
 - 
Constructor Detail- 
TimeTableCsvExportpublic TimeTableCsvExport() 
 
- 
 - 
Method Detail- 
exportCsvpublic boolean exportCsv(java.io.File file, int layoutId, int segmentId, int scheduleId) throws java.io.IOException Create a CSV file that can be imported into a spreadsheet to create a timetable.- Parameters:
- file- The file to be created.
- layoutId- The selected layout.
- segmentId- The selected segment.
- scheduleId- The selected schedule.
- Returns:
- true if an error occured.
- Throws:
- java.io.IOException- if unable to export the CSV file.
 
 - 
formatTimejava.lang.String formatTime(int t) 
 
- 
 
-