-
Notifications
You must be signed in to change notification settings - Fork 53
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
Merge (current/future) feed versions for MTC #186
Changes from 7 commits
fa9ec49
8f8f6c4
9e76476
cf7208c
b6d1058
2fc62d1
1e7014b
c4109c4
f84dd4c
adb9b0d
bc0b450
10c253f
fb3a2d8
72c57f6
6b06107
c3b9c9e
b0f0260
97e742f
9860110
d94f40e
126f61d
d2276a2
6d9db08
bcc5cbb
04c9c47
7f69f67
a590fc3
f81ba52
b9e95a0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package com.conveyal.datatools.manager.gtfsplus; | ||
|
||
import com.conveyal.gtfs.model.Entity; | ||
|
||
import java.sql.PreparedStatement; | ||
import java.sql.SQLException; | ||
|
||
public class CalendarAttribute extends Entity { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Needs javadoc There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same as above comment: I'm not really sure what I would say for each of these tables. We don't really have javadoc for these entities on the GTFS side of things, so I wonder why we would need it here. |
||
|
||
private static final long serialVersionUID = 1L; | ||
|
||
public String service_id; | ||
public String service_description; | ||
|
||
// TODO | ||
@Override | ||
public void setStatementParameters(PreparedStatement statement, boolean setDefaultId) throws SQLException { | ||
landonreed marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package com.conveyal.datatools.manager.gtfsplus; | ||
|
||
import com.conveyal.gtfs.model.Entity; | ||
|
||
import java.sql.PreparedStatement; | ||
import java.sql.SQLException; | ||
|
||
public class Direction extends Entity { | ||
landonreed marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
private static final long serialVersionUID = 1L; | ||
|
||
public String route_id; | ||
public int direction_id; | ||
public String direction; | ||
|
||
|
||
// TODO | ||
@Override | ||
public void setStatementParameters(PreparedStatement statement, boolean setDefaultId) throws SQLException { | ||
|
||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package com.conveyal.datatools.manager.gtfsplus; | ||
|
||
import com.conveyal.gtfs.model.Entity; | ||
|
||
import java.sql.PreparedStatement; | ||
import java.sql.SQLException; | ||
import java.time.LocalDate; | ||
|
||
public class FareRiderCategory extends Entity { | ||
landonreed marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
private static final long serialVersionUID = 1L; | ||
|
||
public String fare_id; | ||
public int rider_category_id; | ||
public double price; | ||
public LocalDate expiration_date; | ||
public LocalDate commencement_date; | ||
|
||
// TODO | ||
@Override | ||
public void setStatementParameters(PreparedStatement statement, boolean setDefaultId) throws SQLException { | ||
|
||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package com.conveyal.datatools.manager.gtfsplus; | ||
|
||
import com.conveyal.gtfs.model.Entity; | ||
|
||
import java.sql.PreparedStatement; | ||
import java.sql.SQLException; | ||
|
||
public class FareZoneAttribute extends Entity { | ||
landonreed marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
private static final long serialVersionUID = 1L; | ||
|
||
public String zone_id; | ||
public String zone_name; | ||
|
||
// TODO | ||
@Override | ||
public void setStatementParameters(PreparedStatement statement, boolean setDefaultId) throws SQLException { | ||
|
||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
package com.conveyal.datatools.manager.gtfsplus; | ||
|
||
import com.conveyal.gtfs.loader.DateField; | ||
import com.conveyal.gtfs.loader.DoubleField; | ||
import com.conveyal.gtfs.loader.IntegerField; | ||
import com.conveyal.gtfs.loader.ShortField; | ||
import com.conveyal.gtfs.loader.StringField; | ||
import com.conveyal.gtfs.loader.Table; | ||
|
||
import static com.conveyal.gtfs.loader.Requirement.OPTIONAL; | ||
import static com.conveyal.gtfs.loader.Requirement.PROPRIETARY; | ||
import static com.conveyal.gtfs.loader.Requirement.REQUIRED; | ||
|
||
public class GtfsPlusTable { | ||
landonreed marked this conversation as resolved.
Show resolved
Hide resolved
|
||
public static final Table REALTIME_ROUTES = new Table("realtime_routes", RealtimeRoute.class, PROPRIETARY, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Each of these tables should probably have javadocs as well There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not really sure what I would say for each of these tables. We don't really have javadoc for these entities on the GTFS side of things, so I wonder why we would need it here. |
||
new StringField("route_id", REQUIRED).isReferenceTo(Table.ROUTES), | ||
new ShortField("realtime_enabled", REQUIRED, 1), | ||
new StringField("realtime_routename", REQUIRED), | ||
new StringField("realtime_routecode", REQUIRED) | ||
); | ||
|
||
public static final Table REALTIME_STOPS = new Table("realtime_stops", RealtimeStop.class, PROPRIETARY, | ||
new StringField("trip_id", REQUIRED).isReferenceTo(Table.TRIPS), | ||
new StringField("stop_id", REQUIRED).isReferenceTo(Table.STOPS), | ||
new StringField("realtime_stop_id", REQUIRED) | ||
).keyFieldIsNotUnique(); | ||
|
||
public static final Table DIRECTIONS = new Table("directions", Direction.class, PROPRIETARY, | ||
new StringField("route_id", REQUIRED).isReferenceTo(Table.ROUTES), | ||
new ShortField("direction_id", REQUIRED, 1), | ||
new StringField("direction", REQUIRED) | ||
).keyFieldIsNotUnique(); | ||
|
||
public static final Table REALTIME_TRIPS = new Table("realtime_trips", RealtimeTrip.class, PROPRIETARY, | ||
new StringField("trip_id", REQUIRED).isReferenceTo(Table.TRIPS), | ||
new StringField("realtime_trip_id", REQUIRED) | ||
); | ||
|
||
public static final Table STOP_ATTRIBUTES = new Table("stop_attributes", StopAttribute.class, PROPRIETARY, | ||
new StringField("stop_id", REQUIRED).isReferenceTo(Table.STOPS), | ||
new ShortField("accessibility_id", REQUIRED, 8), | ||
new StringField("cardinal_direction", OPTIONAL), | ||
new StringField("relative_position", OPTIONAL), | ||
new StringField("stop_city", REQUIRED) | ||
); | ||
|
||
public static final Table TIMEPOINTS = new Table("timepoints", TimePoint.class, PROPRIETARY, | ||
new StringField("trip_id", REQUIRED).isReferenceTo(Table.TRIPS), | ||
new StringField("stop_id", REQUIRED).isReferenceTo(Table.STOPS) | ||
).keyFieldIsNotUnique(); | ||
|
||
public static final Table RIDER_CATEGORIES = new Table("rider_categories", RiderCategory.class, PROPRIETARY, | ||
new IntegerField("rider_category_id", REQUIRED, 1, 25), | ||
new StringField("rider_category_description", REQUIRED) | ||
); | ||
|
||
public static final Table FARE_RIDER_CATEGORIES = new Table("fare_rider_categories", FareRiderCategory.class, PROPRIETARY, | ||
new StringField("fare_id", REQUIRED), | ||
new IntegerField("rider_category_id", REQUIRED, 2, 25).isReferenceTo(RIDER_CATEGORIES), | ||
new DoubleField("price", REQUIRED, 0, Double.MAX_VALUE, 2), | ||
new DateField("expiration_date", OPTIONAL), | ||
new DateField("commencement_date", OPTIONAL) | ||
).keyFieldIsNotUnique(); | ||
|
||
public static final Table CALENDAR_ATTRIBUTES = new Table("calendar_attributes", CalendarAttribute.class, PROPRIETARY, | ||
new StringField("service_id", REQUIRED).isReferenceTo(Table.CALENDAR), | ||
new StringField("service_description", REQUIRED) | ||
); | ||
|
||
public static final Table FAREZONE_ATTRIBUTES = new Table("farezone_attributes", FareZoneAttribute.class, PROPRIETARY, | ||
new StringField("zone_id", REQUIRED), | ||
new StringField("zone_name", REQUIRED) | ||
); | ||
|
||
public static final Table[] tables = new Table[] { | ||
REALTIME_ROUTES, | ||
REALTIME_STOPS, | ||
REALTIME_TRIPS, | ||
DIRECTIONS, | ||
STOP_ATTRIBUTES, | ||
TIMEPOINTS, | ||
RIDER_CATEGORIES, | ||
FARE_RIDER_CATEGORIES, | ||
CALENDAR_ATTRIBUTES, | ||
FAREZONE_ATTRIBUTES | ||
}; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package com.conveyal.datatools.manager.gtfsplus; | ||
|
||
import com.conveyal.gtfs.model.Entity; | ||
|
||
import java.sql.PreparedStatement; | ||
import java.sql.SQLException; | ||
|
||
public class RealtimeRoute extends Entity { | ||
landonreed marked this conversation as resolved.
Show resolved
Hide resolved
|
||
private static final long serialVersionUID = 1L; | ||
|
||
public String route_id; | ||
public int realtime_enabled; | ||
public String realtime_routename; | ||
public String realtime_routecode; | ||
|
||
// TODO | ||
@Override | ||
public void setStatementParameters(PreparedStatement statement, boolean setDefaultId) throws SQLException { | ||
|
||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package com.conveyal.datatools.manager.gtfsplus; | ||
|
||
import com.conveyal.gtfs.model.Entity; | ||
|
||
import java.sql.PreparedStatement; | ||
import java.sql.SQLException; | ||
|
||
public class RealtimeStop extends Entity { | ||
landonreed marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
private static final long serialVersionUID = 1L; | ||
|
||
public String trip_id; | ||
public String stop_id; | ||
public String realtime_stop_id; | ||
|
||
// TODO | ||
@Override | ||
public void setStatementParameters(PreparedStatement statement, boolean setDefaultId) throws SQLException { | ||
|
||
} | ||
} |
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.
Please populate the IllegalArgumentException with a string error.
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.
Hmm, I see that it's caught down below. Maybe it'd be good to specify that the REGIONAL type is not allowed for this endpoint.