Skip to content

Commit b12e942

Browse files
committed
doc: Add design doc and more TODOs
1 parent 588708c commit b12e942

File tree

13 files changed

+159
-67
lines changed

13 files changed

+159
-67
lines changed
23.5 KB
Loading

src/main/java/org/opentripplanner/transit/model/api/TransitRoutingRequest.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44
import org.opentripplanner.routing.algorithm.raptoradapter.transit.cost.GeneralizedCostParameters;
55
import org.opentripplanner.transit.model.trip.TripOnDate;
66

7+
8+
/**
9+
* TODO RTM - This has nothing to do with the transit model, move somewhere else
10+
*/
711
public record TransitRoutingRequest(
812
RaptorRequest<TripOnDate> raptorRequest,
913
GeneralizedCostParameters generalizedCostParams,

src/main/java/org/opentripplanner/transit/model/basic/EntityNotFoundException.java

Lines changed: 0 additions & 13 deletions
This file was deleted.

src/main/java/org/opentripplanner/transit/model/basic/LocalizedMoney.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
import java.util.Locale;
44
import org.opentripplanner.framework.i18n.I18NString;
55

6+
/**
7+
* TODO RTM - This has nothing to do with the transit model, move somewhere else
8+
* - No entity in the model have a reference to this.
9+
*/
610
public record LocalizedMoney(Money money) implements I18NString {
711
@Override
812
public String toString(Locale locale) {

src/main/java/org/opentripplanner/transit/model/basic/Money.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
import java.util.Locale;
66

77
/**
8+
* TODO RTM - This has nothing to do with the transit model, move somewhere else
9+
* - No entity in the model have a reference to this.
10+
*
811
* @param currency The currency of the money.
912
* @param cents The actual currency value in decimal fixed-point, with the default number of
1013
* fraction digits from currency after the decimal point.

src/main/java/org/opentripplanner/transit/model/calendar/OperatingDay.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,11 @@ public ZonedDateTime startTime() {
3535
return startTime;
3636
}
3737

38+
39+
public ZonedDateTime toTime(int time) {
40+
return startTime.plusSeconds(time);
41+
}
42+
3843
public int lengthSeconds() {
3944
return lengthSeconds;
4045
}

src/main/java/org/opentripplanner/transit/model/calendar/PatternForDay.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ public class PatternForDay {
99
private final RoutingTripPattern pattern;
1010
private final Timetable timetable;
1111

12+
// TODO RTM - Add next/prev
13+
1214
public PatternForDay(OperatingDay day, RoutingTripPattern pattern, Timetable timetable) {
1315
this.day = day;
1416
this.pattern = pattern;
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
package org.opentripplanner.transit.model.calendar;
22

33
// TODO RTM : For a given day, keep a reference to all patterns stating on that day
4-
public class PatternsForDay {}
4+
public class PatternsForDay {
5+
6+
7+
8+
}

src/main/java/org/opentripplanner/transit/model/framework/Deduplicator.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@
1717
import org.opentripplanner.framework.tostring.ToStringBuilder;
1818

1919
/**
20+
* TODO RTM - This class should be split in a generic on (o.o.framework) and a transit
21+
* - specific one witch delagate the to generic one(single instance needed).
22+
*
2023
* Does the same thing as String.intern, but for several different types. Java's String.intern uses
2124
* perm gen space and is broken anyway.
2225
*/

src/main/java/org/opentripplanner/transit/model/framework/FeedScopedId.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@
1111
import javax.annotation.Nonnull;
1212
import javax.annotation.Nullable;
1313

14+
/**
15+
* TODO RTM - This is used in the street mdel as well, so we should move it to
16+
* - 'o.o.framework.entity'
17+
*/
1418
public final class FeedScopedId implements Serializable, Comparable<FeedScopedId> {
1519

1620
/**

0 commit comments

Comments
 (0)