-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement SIRI Lite #6284
Open
leonardehrenfried
wants to merge
25
commits into
opentripplanner:dev-2.x
Choose a base branch
from
leonardehrenfried:siri-light
base: dev-2.x
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Implement SIRI Lite #6284
Changes from all commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
901f96a
Add SIRI light
leonardehrenfried 1b824ac
Update logger name
leonardehrenfried 9eed5be
Improve documentation
leonardehrenfried 96b8f1e
Update docs
leonardehrenfried 8fdebbb
Make spelling of SIRI consistent across docs
leonardehrenfried af138ab
Add metrics to SIRI light
leonardehrenfried 240c70e
Add SIRI SX
leonardehrenfried 24bcf97
Add documentation about SIRI SX
leonardehrenfried 464ca30
Move config interfaces into updaters
leonardehrenfried 0124153
Small cleanup of the SIRI code
leonardehrenfried 30e12f9
Add test and example
leonardehrenfried 6703d62
Skip updater in main docs
leonardehrenfried 86a447f
Change spelling from 'Light' to 'Lite'
leonardehrenfried f7e30ec
Change package name
leonardehrenfried ee0e79d
More spelling correction
leonardehrenfried be21d1a
Fix spelling of 'Lite'
leonardehrenfried 6e17055
Update application/src/main/java/org/opentripplanner/updater/siri/upd…
leonardehrenfried 4974223
Update application/src/main/java/org/opentripplanner/updater/siri/upd…
leonardehrenfried ed76a4d
Don't use getClass()
leonardehrenfried 3b06b85
Use shorter name for parameters
leonardehrenfried 71fae3d
Use shorter name for SIRI-SX
leonardehrenfried 790bdc6
Build SIRI loader in factory, inject into source
leonardehrenfried ebcaca2
Merge remote-tracking branch 'upstream/dev-2.x' into siri-light
leonardehrenfried ec9e724
Fix spelling of SIRI-ET
leonardehrenfried defdf5f
Introduce factory
leonardehrenfried File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
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.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this unused, or is it the SIRI namespace?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was a reference to the actual id of the feed and unused.