|
3 | 3 | import com.conveyal.gtfs.validator.model.Priority;
|
4 | 4 |
|
5 | 5 | public enum NewGTFSErrorType {
|
6 |
| - |
| 6 | + // Standard errors. |
| 7 | + BOOLEAN_FORMAT(Priority.MEDIUM, "A GTFS boolean field must contain the value 1 or 0."), |
| 8 | + COLOR_FORMAT(Priority.MEDIUM, "A color should be specified with six-characters (three two-digit hexadecimal numbers)."), |
| 9 | + COLUMN_NAME_UNSAFE(Priority.HIGH, "Column header contains characters not safe in SQL, it was renamed."), |
| 10 | + CURRENCY_UNKNOWN(Priority.MEDIUM, "The currency code was not recognized."), |
7 | 11 | DATE_FORMAT(Priority.MEDIUM, "Date format should be YYYYMMDD."),
|
8 |
| - DATE_RANGE(Priority.MEDIUM, "Date should is extremely far in the future or past."), |
9 | 12 | DATE_NO_SERVICE(Priority.MEDIUM, "No service_ids were active on a date within the range of dates with defined service."),
|
10 |
| - TIME_FORMAT(Priority.MEDIUM, "Time format should be HH:MM:SS."), |
11 |
| - URL_FORMAT(Priority.MEDIUM, "URL format should be <scheme>://<authority><path>?<query>#<fragment>"), |
12 |
| - LANGUAGE_FORMAT(Priority.LOW, "Language should be specified with a valid BCP47 tag."), |
13 |
| - ILLEGAL_FIELD_VALUE(Priority.MEDIUM, "Fields may not contain tabs, carriage returns or new lines."), |
14 |
| - INTEGER_FORMAT(Priority.MEDIUM, "Incorrect integer format."), |
15 |
| - FARE_TRANSFER_MISMATCH(Priority.MEDIUM, "A fare that does not permit transfers has a non-zero transfer duration."), |
16 |
| - FREQUENCY_PERIOD_OVERLAP(Priority.MEDIUM, "A frequency for a trip overlaps with another frequency defined for the same trip."), |
17 |
| - FLOATING_FORMAT(Priority.MEDIUM, "Incorrect floating point number format."), |
18 |
| - COLUMN_NAME_UNSAFE(Priority.HIGH, "Column header contains characters not safe in SQL, it was renamed."), |
19 |
| - NUMBER_PARSING(Priority.MEDIUM, "Unable to parse number from value."), |
20 |
| - NUMBER_NEGATIVE(Priority.MEDIUM, "Number was expected to be non-negative."), |
21 |
| - NUMBER_TOO_SMALL(Priority.MEDIUM, "Number was below the allowed range."), |
22 |
| - NUMBER_TOO_LARGE(Priority.MEDIUM, "Number was above the allowed range."), |
| 13 | + DATE_RANGE(Priority.MEDIUM, "Date should is extremely far in the future or past."), |
| 14 | + DEPARTURE_BEFORE_ARRIVAL(Priority.MEDIUM, "The vehicle departs from this stop before it arrives."), |
| 15 | + DUPLICATE_HEADER(Priority.MEDIUM, "More than one column in a table had the same name in the header row."), |
23 | 16 | DUPLICATE_ID(Priority.MEDIUM, "More than one entity in a table had the same ID."),
|
24 |
| - DUPLICATE_TRIP(Priority.MEDIUM, "More than one trip had an identical schedule and stops."), |
25 | 17 | DUPLICATE_STOP(Priority.MEDIUM, "More than one stop was located in exactly the same place."),
|
26 |
| - DUPLICATE_HEADER(Priority.MEDIUM, "More than one column in a table had the same name in the header row."), |
27 |
| - MISSING_TABLE(Priority.MEDIUM, "This table is required by the GTFS specification but is missing."), |
| 18 | + DUPLICATE_TRIP(Priority.MEDIUM, "More than one trip had an identical schedule and stops."), |
| 19 | + FARE_TRANSFER_MISMATCH(Priority.MEDIUM, "A fare that does not permit transfers has a non-zero transfer duration."), |
| 20 | + FEED_TRAVEL_TIMES_ROUNDED(Priority.LOW, "All travel times in the feed are rounded to the minute, which may cause unexpected results in routing applications where travel times are zero."), |
| 21 | + FLOATING_FORMAT(Priority.MEDIUM, "Incorrect floating point number format."), |
| 22 | + FREQUENCY_PERIOD_OVERLAP(Priority.MEDIUM, "A frequency for a trip overlaps with another frequency defined for the same trip."), |
| 23 | + ILLEGAL_FIELD_VALUE(Priority.MEDIUM, "Fields may not contain tabs, carriage returns or new lines."), |
| 24 | + INTEGER_FORMAT(Priority.MEDIUM, "Incorrect integer format."), |
| 25 | + LANGUAGE_FORMAT(Priority.LOW, "Language should be specified with a valid BCP47 tag."), |
| 26 | + MISSING_ARRIVAL_OR_DEPARTURE(Priority.MEDIUM, "First and last stop times are required to have both an arrival and departure time."), |
28 | 27 | MISSING_COLUMN(Priority.MEDIUM, "A required column was missing from a table."),
|
29 |
| - MISSING_SHAPE(Priority.MEDIUM, "???"), |
30 | 28 | MISSING_FIELD(Priority.MEDIUM, "A required field was missing or empty in a particular row."),
|
| 29 | + MISSING_SHAPE(Priority.MEDIUM, "???"), |
| 30 | + MISSING_TABLE(Priority.MEDIUM, "This table is required by the GTFS specification but is missing."), |
31 | 31 | MULTIPLE_SHAPES_FOR_PATTERN(Priority.MEDIUM, "Multiple shapes found for a single unique sequence of stops (i.e, trip pattern)."),
|
32 |
| - WRONG_NUMBER_OF_FIELDS(Priority.MEDIUM, "A row did not have the same number of fields as there are headers in its table."), |
33 | 32 | NO_SERVICE(Priority.HIGH, "There is no service defined on any day in this feed."),
|
| 33 | + NUMBER_NEGATIVE(Priority.MEDIUM, "Number was expected to be non-negative."), |
| 34 | + NUMBER_PARSING(Priority.MEDIUM, "Unable to parse number from value."), |
| 35 | + NUMBER_TOO_LARGE(Priority.MEDIUM, "Number was above the allowed range."), |
| 36 | + NUMBER_TOO_SMALL(Priority.MEDIUM, "Number was below the allowed range."), |
34 | 37 | OVERLAPPING_TRIP(Priority.MEDIUM, "Blocks?"),
|
35 |
| - SHAPE_REVERSED(Priority.MEDIUM, "A shape appears to be intended for vehicles running the opposite direction on the route."), |
36 |
| - SHAPE_MISSING_COORDINATE(Priority.MEDIUM, "???"), |
37 |
| - TABLE_IN_SUBDIRECTORY(Priority.HIGH, "Rather than being at the root of the zip file, a table was nested in a subdirectory."), |
38 |
| - TABLE_MISSING_COLUMN_HEADERS(Priority.HIGH, "Table is missing column headers."), |
39 |
| - TABLE_TOO_LONG(Priority.MEDIUM, "Table is too long to record line numbers with a 32-bit integer, overflow will occur."), |
40 |
| - TIME_ZONE_FORMAT(Priority.MEDIUM, "Time zone format should match value from the Time Zone Database https://en.wikipedia.org/wiki/List_of_tz_database_time_zones."), |
| 38 | + REFERENTIAL_INTEGRITY(Priority.HIGH, "This line references an ID that does not exist in the target table."), |
41 | 39 | REQUIRED_TABLE_EMPTY(Priority.MEDIUM, "This table is required by the GTFS specification but is empty."),
|
42 |
| - FEED_TRAVEL_TIMES_ROUNDED(Priority.LOW, "All travel times in the feed are rounded to the minute, which may cause unexpected results in routing applications where travel times are zero."), |
43 | 40 | ROUTE_DESCRIPTION_SAME_AS_NAME(Priority.LOW, "The description of a route is identical to its name, so does not add any information."),
|
44 | 41 | ROUTE_LONG_NAME_CONTAINS_SHORT_NAME(Priority.LOW, "The long name of a route should complement the short name, not include it."),
|
45 | 42 | ROUTE_SHORT_AND_LONG_NAME_MISSING(Priority.MEDIUM, "A route has neither a long nor a short name."),
|
46 | 43 | ROUTE_SHORT_NAME_TOO_LONG(Priority.MEDIUM, "The short name of a route is too long for display in standard GTFS consumer applications."),
|
| 44 | + ROUTE_UNUSED(Priority.HIGH, "This route is defined but has no trips."), |
47 | 45 | SERVICE_NEVER_ACTIVE(Priority.MEDIUM, "A service code was defined, but is never active on any date."),
|
48 | 46 | SERVICE_UNUSED(Priority.MEDIUM, "A service code was defined, but is never referenced by any trips."),
|
49 | 47 | SHAPE_DIST_TRAVELED_NOT_INCREASING(Priority.MEDIUM, "Shape distance traveled must increase with stop times."),
|
| 48 | + SHAPE_MISSING_COORDINATE(Priority.MEDIUM, "???"), |
| 49 | + SHAPE_REVERSED(Priority.MEDIUM, "A shape appears to be intended for vehicles running the opposite direction on the route."), |
50 | 50 | STOP_DESCRIPTION_SAME_AS_NAME(Priority.LOW, "The description of a stop is identical to its name, so does not add any information."),
|
| 51 | + STOP_GEOGRAPHIC_OUTLIER(Priority.HIGH, "This stop is located very far from the middle 90% of stops in this feed."), |
51 | 52 | STOP_LOW_POPULATION_DENSITY(Priority.HIGH, "A stop is located in a geographic area with very low human population density."),
|
52 | 53 | STOP_NAME_MISSING(Priority.MEDIUM, "A stop does not have a name."),
|
53 |
| - STOP_GEOGRAPHIC_OUTLIER(Priority.HIGH, "This stop is located very far from the middle 90% of stops in this feed."), |
54 | 54 | STOP_TIME_UNUSED(Priority.LOW, "This stop time allows neither pickup nor drop off and is not a timepoint, so it serves no purpose and should be removed from trip."),
|
55 | 55 | STOP_UNUSED(Priority.MEDIUM, "This stop is not referenced by any trips."),
|
| 56 | + TABLE_IN_SUBDIRECTORY(Priority.HIGH, "Rather than being at the root of the zip file, a table was nested in a subdirectory."), |
| 57 | + TABLE_MISSING_COLUMN_HEADERS(Priority.HIGH, "Table is missing column headers."), |
| 58 | + TABLE_TOO_LONG(Priority.MEDIUM, "Table is too long to record line numbers with a 32-bit integer, overflow will occur."), |
| 59 | + TIME_FORMAT(Priority.MEDIUM, "Time format should be HH:MM:SS."), |
| 60 | + TIME_ZONE_FORMAT(Priority.MEDIUM, "Time zone format should match value from the Time Zone Database https://en.wikipedia.org/wiki/List_of_tz_database_time_zones."), |
56 | 61 | TIMEPOINT_MISSING_TIMES(Priority.MEDIUM, "This stop time is marked as a timepoint, but is missing both arrival and departure times."),
|
| 62 | + TRAVEL_DISTANCE_ZERO(Priority.MEDIUM, "The vehicle does not cover any distance between the last stop and this one."), |
| 63 | + TRAVEL_TIME_NEGATIVE(Priority.HIGH, "The vehicle arrives at this stop before it departs from the previous one."), |
| 64 | + TRAVEL_TIME_ZERO(Priority.HIGH, "The vehicle arrives at this stop at the same time it departs from the previous stop."), |
| 65 | + TRAVEL_TOO_FAST(Priority.MEDIUM, "The vehicle travels extremely fast to reach this stop from the previous one."), |
| 66 | + TRAVEL_TOO_SLOW(Priority.MEDIUM, "The vehicle is traveling very slowly to reach this stop from the previous one."), |
57 | 67 | TRIP_EMPTY(Priority.HIGH, "This trip is defined but has no stop times."),
|
58 | 68 | TRIP_HEADSIGN_CONTAINS_ROUTE_NAME(Priority.LOW, "A trip headsign contains the route name, but should only contain information to distinguish it from other trips for the route."),
|
59 | 69 | TRIP_HEADSIGN_SHOULD_DESCRIBE_DESTINATION_OR_WAYPOINTS(Priority.LOW, "A trip headsign begins with 'to' or 'towards', but should begin with destination or direction and optionally include waypoints with 'via'"),
|
60 | 70 | TRIP_NEVER_ACTIVE(Priority.MEDIUM, "A trip is defined, but its service is never running on any date."),
|
61 |
| - ROUTE_UNUSED(Priority.HIGH, "This route is defined but has no trips."), |
62 |
| - TRAVEL_DISTANCE_ZERO(Priority.MEDIUM, "The vehicle does not cover any distance between the last stop and this one."), |
63 |
| - TRAVEL_TIME_NEGATIVE(Priority.HIGH, "The vehicle arrives at this stop before it departs from the previous one."), |
64 |
| - TRAVEL_TIME_ZERO(Priority.HIGH, "The vehicle arrives at this stop at the same time it departs from the previous stop."), |
65 |
| - MISSING_ARRIVAL_OR_DEPARTURE(Priority.MEDIUM, "First and last stop times are required to have both an arrival and departure time."), |
66 |
| - TRIP_TOO_FEW_STOP_TIMES(Priority.MEDIUM, "A trip must have at least two stop times to represent travel."), |
67 | 71 | TRIP_OVERLAP_IN_BLOCK(Priority.MEDIUM, "A trip overlaps another trip and shares the same block_id."),
|
68 |
| - TRAVEL_TOO_SLOW(Priority.MEDIUM, "The vehicle is traveling very slowly to reach this stop from the previous one."), |
69 |
| - TRAVEL_TOO_FAST(Priority.MEDIUM, "The vehicle travels extremely fast to reach this stop from the previous one."), |
| 72 | + TRIP_TOO_FEW_STOP_TIMES(Priority.MEDIUM, "A trip must have at least two stop times to represent travel."), |
| 73 | + URL_FORMAT(Priority.MEDIUM, "URL format should be <scheme>://<authority><path>?<query>#<fragment>"), |
70 | 74 | VALIDATOR_FAILED(Priority.HIGH, "The specified validation stage failed due to an error encountered during loading. This is likely due to an error encountered during loading (e.g., a date or number field is formatted incorrectly.)."),
|
71 |
| - DEPARTURE_BEFORE_ARRIVAL(Priority.MEDIUM, "The vehicle departs from this stop before it arrives."), |
72 |
| - REFERENTIAL_INTEGRITY(Priority.HIGH, "This line references an ID that does not exist in the target table."), |
73 |
| - BOOLEAN_FORMAT(Priority.MEDIUM, "A GTFS boolean field must contain the value 1 or 0."), |
74 |
| - COLOR_FORMAT(Priority.MEDIUM, "A color should be specified with six-characters (three two-digit hexadecimal numbers)."), |
75 |
| - CURRENCY_UNKNOWN(Priority.MEDIUM, "The currency code was not recognized."), |
| 75 | + WRONG_NUMBER_OF_FIELDS(Priority.MEDIUM, "A row did not have the same number of fields as there are headers in its table."), |
| 76 | + |
| 77 | + // MTC-specific errors. |
| 78 | + FIELD_VALUE_TOO_LONG(Priority.MEDIUM, "Field value has too many characters."), |
| 79 | + |
| 80 | + // Unknown errors. |
76 | 81 | OTHER(Priority.LOW, "Other errors.");
|
77 | 82 |
|
78 | 83 | public final Priority priority;
|
|
0 commit comments