-
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 remote-tracking branch 'upstream/dev-2.x' into upgrade-protobuf
- Loading branch information
Showing
63 changed files
with
2,562 additions
and
1,332 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
39 changes: 39 additions & 0 deletions
39
.../org/opentripplanner/standalone/config/routerconfig/updaters/SiriETLiteUpdaterConfig.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,39 @@ | ||
package org.opentripplanner.standalone.config.routerconfig.updaters; | ||
|
||
import static org.opentripplanner.standalone.config.framework.json.OtpVersion.V2_7; | ||
|
||
import java.time.Duration; | ||
import org.opentripplanner.standalone.config.framework.json.NodeAdapter; | ||
import org.opentripplanner.updater.siri.updater.lite.SiriETLiteUpdaterParameters; | ||
|
||
public class SiriETLiteUpdaterConfig { | ||
|
||
public static SiriETLiteUpdaterParameters create(String configRef, NodeAdapter c) { | ||
return new SiriETLiteUpdaterParameters( | ||
configRef, | ||
c.of("feedId").since(V2_7).summary("The ID of the feed to apply the updates to.").asString(), | ||
c | ||
.of("url") | ||
.since(V2_7) | ||
.summary("The URL to send the HTTP requests to.") | ||
.description(SiriSXUpdaterConfig.URL_DESCRIPTION) | ||
.asUri(), | ||
c | ||
.of("frequency") | ||
.since(V2_7) | ||
.summary("How often the updates should be retrieved.") | ||
.asDuration(Duration.ofMinutes(1)), | ||
c | ||
.of("timeout") | ||
.since(V2_7) | ||
.summary("The HTTP timeout to download the updates.") | ||
.asDuration(Duration.ofSeconds(15)), | ||
c | ||
.of("fuzzyTripMatching") | ||
.since(V2_7) | ||
.summary("If the fuzzy trip matcher should be used to match trips.") | ||
.asBoolean(false), | ||
HttpHeadersConfig.headers(c, V2_7) | ||
); | ||
} | ||
} |
46 changes: 46 additions & 0 deletions
46
.../org/opentripplanner/standalone/config/routerconfig/updaters/SiriSXLiteUpdaterConfig.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,46 @@ | ||
package org.opentripplanner.standalone.config.routerconfig.updaters; | ||
|
||
import static org.opentripplanner.standalone.config.framework.json.OtpVersion.V2_0; | ||
import static org.opentripplanner.standalone.config.framework.json.OtpVersion.V2_7; | ||
|
||
import java.time.Duration; | ||
import org.opentripplanner.standalone.config.framework.json.NodeAdapter; | ||
import org.opentripplanner.updater.siri.updater.lite.SiriSXLiteUpdaterParameters; | ||
|
||
public class SiriSXLiteUpdaterConfig { | ||
|
||
public static SiriSXLiteUpdaterParameters create(String configRef, NodeAdapter c) { | ||
return new SiriSXLiteUpdaterParameters( | ||
configRef, | ||
c.of("feedId").since(V2_7).summary("The ID of the feed to apply the updates to.").asString(), | ||
c | ||
.of("url") | ||
.since(V2_7) | ||
.summary("The URL to send the HTTP requests to.") | ||
.description(SiriSXUpdaterConfig.URL_DESCRIPTION) | ||
.asUri(), | ||
c | ||
.of("frequency") | ||
.since(V2_7) | ||
.summary("How often the updates should be retrieved.") | ||
.asDuration(Duration.ofMinutes(1)), | ||
c | ||
.of("timeout") | ||
.since(V2_7) | ||
.summary("The HTTP timeout to download the updates.") | ||
.asDuration(Duration.ofSeconds(15)), | ||
c | ||
.of("earlyStart") | ||
.since(V2_0) | ||
.summary("This value is subtracted from the actual validity defined in the message.") | ||
.description( | ||
""" | ||
Normally the planned departure time is used, so setting this to 10s will cause the | ||
SX-message to be included in trip-results 10 seconds before the the planned departure | ||
time.""" | ||
) | ||
.asDuration(Duration.ZERO), | ||
HttpHeadersConfig.headers(c, V2_7) | ||
); | ||
} | ||
} |
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
Oops, something went wrong.