-
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 #4667 from mfdz/gtfs-rt-extension
GTFS-RT extension to add completely new routes
- Loading branch information
Showing
33 changed files
with
1,276 additions
and
726 deletions.
There are no files selected for viewing
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
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
42 changes: 42 additions & 0 deletions
42
src/main/java/org/opentripplanner/model/UpdateSuccess.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,42 @@ | ||
package org.opentripplanner.model; | ||
|
||
import java.util.Arrays; | ||
import java.util.Collection; | ||
import java.util.List; | ||
import org.opentripplanner.framework.collection.ListUtils; | ||
|
||
/** | ||
* The result of a successful application of a realtime update, for example for trips or | ||
* vehicle positions. Its only extra information is a collection of possible warnings that | ||
* ought to be looked at but didn't prevent the application of the update. | ||
*/ | ||
public record UpdateSuccess(List<WarningType> warnings) { | ||
/** | ||
* Create an instance with no warnings. | ||
*/ | ||
public static UpdateSuccess noWarnings() { | ||
return new UpdateSuccess(List.of()); | ||
} | ||
/** | ||
* Create an instance with the provided warnings. | ||
*/ | ||
public static UpdateSuccess ofWarnings(WarningType... warnings) { | ||
return new UpdateSuccess(Arrays.asList(warnings)); | ||
} | ||
|
||
/** | ||
* Return a copy of the instance with the provided warnings added. | ||
*/ | ||
public UpdateSuccess addWarnings(Collection<WarningType> addedWarnings) { | ||
return new UpdateSuccess(ListUtils.combine(this.warnings, addedWarnings)); | ||
} | ||
|
||
public enum WarningType { | ||
/** | ||
* An added trip contained references to stops that are not in the static data. These | ||
* stops have been removed. | ||
*/ | ||
UNKNOWN_STOPS_REMOVED_FROM_ADDED_TRIP, | ||
NOT_MONITORED, | ||
} | ||
} |
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.