-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5525 from entur/otp2_cleanup_trip_times_part_B
Cleanup trip times - part B
- Loading branch information
Showing
41 changed files
with
1,560 additions
and
989 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 0 additions & 6 deletions
6
src/ext/java/org/opentripplanner/ext/siri/TripTimesAndStopPattern.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
src/main/java/org/opentripplanner/framework/error/OtpError.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package org.opentripplanner.framework.error; | ||
|
||
import java.util.Locale; | ||
|
||
/** | ||
* A generic representation of an error. The error should have a code used to group the same | ||
* type of errors together. To avoid filling up memory with error strings during graph build | ||
* we store errors in memory "decomposed". The {@link #messageTemplate()} and | ||
* {@link #messageArguments()} is used to construct the message. Use the {@link Locale#ROOT} | ||
* when constructing the message - we only support english with SI formatting. | ||
*/ | ||
public interface OtpError { | ||
/** | ||
* An error code used to identify the error type. This is NOT an enum, but feel free | ||
* to use an inum in the implementation, then use the enum NAME as the code or | ||
* enum TYPE:NAME. Then name should be unique within OTP. | ||
*/ | ||
String errorCode(); | ||
|
||
/** | ||
* The string template used to create a human-readable error message. Use the | ||
* {@link String#format(Locale, String, Object...)} format. | ||
*/ | ||
String messageTemplate(); | ||
|
||
/** | ||
* The arguments to inject into the message. | ||
*/ | ||
Object[] messageArguments(); | ||
|
||
/** | ||
* Construct a message. | ||
*/ | ||
default String message() { | ||
return String.format(Locale.ROOT, messageTemplate(), messageArguments()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.