Skip to content

Commit ce68dc6

Browse files
author
Landon Reed
authored
Merge pull request #152 from conveyal/validation-result-renaming
Rename variable to avoid confusion
2 parents abbd53b + 7a372a6 commit ce68dc6

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

src/main/java/com/conveyal/gtfs/validator/ServiceValidator.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,9 @@ select durations.service_id, duration_seconds, days_active from (
185185
if (date.isAfter(lastDate)) lastDate = date;
186186
}
187187
// Copy some useful information into the ValidationResult object to return to the caller.
188+
// These variables are actually not directly tied to data in the calendar_dates.txt file. Instead, they
189+
// represent the first and last date respectively of any entry in the calendar.txt and calendar_dates.txt
190+
// files.
188191
validationResult.firstCalendarDate = firstDate;
189192
validationResult.lastCalendarDate = lastDate;
190193
// Is this any different? firstDate.until(lastDate, ChronoUnit.DAYS);

src/main/java/com/conveyal/gtfs/validator/ValidationResult.java

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
package com.conveyal.gtfs.validator;
22

3-
import java.awt.geom.Rectangle2D;
4-
import java.io.Serializable;
5-
import com.conveyal.gtfs.model.Pattern;
6-
import com.fasterxml.jackson.annotation.JsonIgnore;
73
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
84

5+
import java.awt.geom.Rectangle2D;
6+
import java.io.Serializable;
97
import java.time.LocalDate;
10-
import java.util.List;
118

129
/**
1310
* An instance of this class is returned by the validator.
@@ -26,8 +23,15 @@ public class ValidationResult implements Serializable {
2623
public int errorCount;
2724
public LocalDate declaredStartDate;
2825
public LocalDate declaredEndDate;
26+
27+
/**
28+
* the actual first and last date of service which is calculated in {@link ServiceValidator#complete}
29+
* These variables are actually not directly tied to data in the calendar_dates.txt file. Instead, they represent
30+
* the first and last date respectively of any entry in the calendar.txt and calendar_dates.txt files.
31+
*/
2932
public LocalDate firstCalendarDate;
3033
public LocalDate lastCalendarDate;
34+
3135
public int[] dailyBusSeconds;
3236
public int[] dailyTramSeconds;
3337
public int[] dailyMetroSeconds;

0 commit comments

Comments
 (0)