-
Notifications
You must be signed in to change notification settings - Fork 1.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
Add a matcher API for filters in the transit service used for datedServiceJourneyQuery #5713
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev-2.x #5713 +/- ##
=============================================
+ Coverage 67.81% 69.76% +1.94%
- Complexity 16574 17366 +792
=============================================
Files 1914 1970 +56
Lines 72389 74378 +1989
Branches 7442 7604 +162
=============================================
+ Hits 49090 51887 +2797
+ Misses 20780 19846 -934
- Partials 2519 2645 +126 ☔ View full report in Codecov by Sentry. |
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.
Initial review. Focus on design - which loos good. Look forward to apply this to a more advanced query.
src/main/java/org/opentripplanner/transit/api/request/TripOnServiceDateRequest.java
Outdated
Show resolved
Hide resolved
...n/java/org/opentripplanner/transit/model/filter/transit/TripOnServiceDateMatcherFactory.java
Outdated
Show resolved
Hide resolved
src/main/java/org/opentripplanner/apis/transmodel/model/timetable/DatedServiceJourneyQuery.java
Outdated
Show resolved
Hide resolved
src/main/java/org/opentripplanner/transit/api/request/TripOnServiceDateRequest.java
Outdated
Show resolved
Hide resolved
src/main/java/org/opentripplanner/apis/transmodel/model/timetable/DatedServiceJourneyQuery.java
Outdated
Show resolved
Hide resolved
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.
This looks good to me now. I hope I haven't requested anything that @t2gran will want to change back.
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.
I have read through the main, code I have the test code left.
src/main/java/org/opentripplanner/framework/collection/CollectionUtils.java
Outdated
Show resolved
Hide resolved
src/main/java/org/opentripplanner/framework/collection/CollectionUtils.java
Outdated
Show resolved
Hide resolved
src/main/java/org/opentripplanner/transit/api/request/TripOnServiceDateRequestBuilder.java
Outdated
Show resolved
Hide resolved
src/main/java/org/opentripplanner/transit/model/filter/expr/ContainsMatcher.java
Show resolved
Hide resolved
src/main/java/org/opentripplanner/transit/model/filter/expr/ContainsMatcher.java
Outdated
Show resolved
Hide resolved
src/main/java/org/opentripplanner/transit/model/filter/expr/EqualityMatcher.java
Outdated
Show resolved
Hide resolved
src/main/java/org/opentripplanner/transit/model/filter/expr/EqualityMatcher.java
Outdated
Show resolved
Hide resolved
src/main/java/org/opentripplanner/apis/transmodel/model/timetable/DatedServiceJourneyQuery.java
Outdated
Show resolved
Hide resolved
src/main/java/org/opentripplanner/transit/api/request/TripOnServiceDateRequest.java
Outdated
Show resolved
Hide resolved
src/main/java/org/opentripplanner/transit/api/request/TripOnServiceDateRequestBuilder.java
Outdated
Show resolved
Hide resolved
src/main/java/org/opentripplanner/transit/api/request/TripOnServiceDateRequestBuilder.java
Show resolved
Hide resolved
src/main/java/org/opentripplanner/apis/transmodel/model/timetable/DatedServiceJourneyQuery.java
Show resolved
Hide resolved
src/main/java/org/opentripplanner/apis/transmodel/model/timetable/DatedServiceJourneyQuery.java
Outdated
Show resolved
Hide resolved
src/main/java/org/opentripplanner/apis/transmodel/model/timetable/DatedServiceJourneyQuery.java
Outdated
Show resolved
Hide resolved
… DatedServiceJourneyQuery. This is the first simple implementation of a filter using the unified matcher API.
…and in a logically consistent manner. Also does List.copyOf instead of simple reassignment between TripOnServiceDateRequestBuilder and TripOnServiceDateRequest.
…d removes get prefix from getters.
…estions from code review. Also improves documentation generally.
I think a git rebase went wrong here. |
f361f01
to
153fe56
Compare
Also make use of it in the DatedServiceJourneyQuery
This is the first simple implementation of a filter using the unified matcher API.
Issue
#5630
Unit tests
Added unit tests for each matcher and the new TripOnServiceDateMatcherFactory. Also ensured that the API in local runs behaves as expected.
Documentation
Added JavaDoc.