diff --git a/src/ext/java/org/opentripplanner/ext/restapi/mapping/TripMapper.java b/src/ext/java/org/opentripplanner/ext/restapi/mapping/TripMapper.java index f4894a4a7a3..1f7abd3897a 100644 --- a/src/ext/java/org/opentripplanner/ext/restapi/mapping/TripMapper.java +++ b/src/ext/java/org/opentripplanner/ext/restapi/mapping/TripMapper.java @@ -31,7 +31,6 @@ public static ApiTrip mapToApi(Trip obj) { api.shapeId = FeedScopedIdMapper.mapToApi(obj.getShapeId()); api.wheelchairAccessible = WheelchairAccessibilityMapper.mapToApi(obj.getWheelchairBoarding()); api.bikesAllowed = BikeAccessMapper.mapToApi(obj.getBikesAllowed()); - api.fareId = obj.getGtfsFareId(); return api; } diff --git a/src/main/java/org/opentripplanner/gtfs/mapping/TripMapper.java b/src/main/java/org/opentripplanner/gtfs/mapping/TripMapper.java index a80ae035ed1..d7a4dfd403e 100644 --- a/src/main/java/org/opentripplanner/gtfs/mapping/TripMapper.java +++ b/src/main/java/org/opentripplanner/gtfs/mapping/TripMapper.java @@ -60,7 +60,6 @@ private Trip doMap(org.onebusaway.gtfs.model.Trip rhs) { lhs.withShapeId(AgencyAndIdMapper.mapAgencyAndId(rhs.getShapeId())); lhs.withWheelchairBoarding(WheelchairAccessibilityMapper.map(rhs.getWheelchairAccessible())); lhs.withBikesAllowed(BikeAccessMapper.mapForTrip(rhs)); - lhs.withGtfsFareId(rhs.getFareId()); return lhs.build(); } diff --git a/src/main/java/org/opentripplanner/transit/model/timetable/Trip.java b/src/main/java/org/opentripplanner/transit/model/timetable/Trip.java index 9e6795e5140..5a1e9150e78 100644 --- a/src/main/java/org/opentripplanner/transit/model/timetable/Trip.java +++ b/src/main/java/org/opentripplanner/transit/model/timetable/Trip.java @@ -36,7 +36,6 @@ public final class Trip extends AbstractTransitEntity impleme private final Accessibility wheelchairBoarding; private final String gtfsBlockId; - private final String gtfsFareId; private final String netexInternalPlanningCode; private final TripAlteration netexAlteration; @@ -65,7 +64,6 @@ public final class Trip extends AbstractTransitEntity impleme this.headsign = builder.getHeadsign(); this.shapeId = builder.getShapeId(); this.gtfsBlockId = builder.getGtfsBlockId(); - this.gtfsFareId = builder.getGtfsFareId(); this.netexInternalPlanningCode = builder.getNetexInternalPlanningCode(); } @@ -149,12 +147,6 @@ public String getGtfsBlockId() { return gtfsBlockId; } - /** Custom extension for KCM to specify a fare per-trip */ - @Nullable - public String getGtfsFareId() { - return gtfsFareId; - } - /** * Internal code (non-public identifier) for the journey (e.g. train- or trip number from the * planners' tool). This is kept to ensure compatibility with legacy planning systems. In NeTEx @@ -209,8 +201,7 @@ public boolean sameAs(@Nonnull Trip other) { Objects.equals(this.direction, other.direction) && Objects.equals(this.bikesAllowed, other.bikesAllowed) && Objects.equals(this.wheelchairBoarding, other.wheelchairBoarding) && - Objects.equals(this.netexAlteration, other.netexAlteration) && - Objects.equals(this.gtfsFareId, other.gtfsFareId) + Objects.equals(this.netexAlteration, other.netexAlteration) ); } diff --git a/src/main/java/org/opentripplanner/transit/model/timetable/TripBuilder.java b/src/main/java/org/opentripplanner/transit/model/timetable/TripBuilder.java index fd51b9035c7..063dfe10da2 100644 --- a/src/main/java/org/opentripplanner/transit/model/timetable/TripBuilder.java +++ b/src/main/java/org/opentripplanner/transit/model/timetable/TripBuilder.java @@ -23,7 +23,6 @@ public class TripBuilder extends AbstractEntityBuilder { private BikeAccess bikesAllowed; private Accessibility wheelchairBoarding; private String gtfsBlockId; - private String gtfsFareId; private String netexInternalPlanningCode; private TripAlteration netexAlteration; @@ -47,7 +46,6 @@ public class TripBuilder extends AbstractEntityBuilder { this.bikesAllowed = original.getBikesAllowed(); this.wheelchairBoarding = original.getWheelchairBoarding(); this.netexInternalPlanningCode = original.getNetexInternalPlanningCode(); - this.gtfsFareId = original.getGtfsFareId(); } public Operator getOperator() { @@ -176,15 +174,6 @@ public TripBuilder withNetexAlteration(TripAlteration netexAlteration) { return this; } - public String getGtfsFareId() { - return gtfsFareId; - } - - public TripBuilder withGtfsFareId(String gtfsFareId) { - this.gtfsFareId = gtfsFareId; - return this; - } - @Override protected Trip buildFromValues() { return new Trip(this); diff --git a/src/test/java/org/opentripplanner/gtfs/mapping/TripMapperTest.java b/src/test/java/org/opentripplanner/gtfs/mapping/TripMapperTest.java index 4f0c70f22d2..12c513b28d9 100644 --- a/src/test/java/org/opentripplanner/gtfs/mapping/TripMapperTest.java +++ b/src/test/java/org/opentripplanner/gtfs/mapping/TripMapperTest.java @@ -23,7 +23,6 @@ public class TripMapperTest { private static final int BIKES_ALLOWED = 1; private static final String BLOCK_ID = "Block Id"; private static final int DIRECTION_ID = 1; - private static final String FARE_ID = "Fare Id"; private static final String TRIP_HEADSIGN = "Trip Headsign"; private static final String TRIP_SHORT_NAME = "Trip Short Name"; @@ -46,7 +45,6 @@ public class TripMapperTest { TRIP.setBikesAllowed(BIKES_ALLOWED); TRIP.setBlockId(BLOCK_ID); TRIP.setDirectionId(Integer.toString(DIRECTION_ID)); - TRIP.setFareId(FARE_ID); TRIP.setRoute(data.route); TRIP.setServiceId(AGENCY_AND_ID); TRIP.setShapeId(AGENCY_AND_ID); @@ -69,7 +67,6 @@ public void testMap() throws Exception { assertEquals("A:1", result.getId().toString()); assertEquals(BLOCK_ID, result.getGtfsBlockId()); assertEquals(Direction.INBOUND, result.getDirection()); - assertEquals(FARE_ID, result.getGtfsFareId()); assertNotNull(result.getRoute()); assertEquals("A:1", result.getServiceId().toString()); assertEquals("A:1", result.getShapeId().toString()); @@ -91,7 +88,6 @@ public void testMapWithNulls() throws Exception { assertNotNull(result.getRoute()); assertNull(result.getGtfsBlockId()); - assertNull(result.getGtfsFareId()); assertNull(result.getServiceId()); assertNull(result.getShapeId()); assertNull(result.getHeadsign()); diff --git a/src/test/java/org/opentripplanner/transit/model/timetable/TripTest.java b/src/test/java/org/opentripplanner/transit/model/timetable/TripTest.java index 098c1d0994a..3a3f35643fa 100644 --- a/src/test/java/org/opentripplanner/transit/model/timetable/TripTest.java +++ b/src/test/java/org/opentripplanner/transit/model/timetable/TripTest.java @@ -26,7 +26,6 @@ class TripTest { private static final BikeAccess BIKE_ACCESS = BikeAccess.ALLOWED; private static final TransitMode TRANSIT_MODE = TransitMode.BUS; private static final String BLOCK_ID = "blockId"; - private static final String FARE_ID = "fareId"; private static final TripAlteration TRIP_ALTERATION = TripAlteration.CANCELLATION; private static final String NETEX_SUBMODE_NAME = "submode"; private static final SubMode NETEX_SUBMODE = SubMode.of(NETEX_SUBMODE_NAME); @@ -46,7 +45,6 @@ class TripTest { .withBikesAllowed(BIKE_ACCESS) .withMode(TRANSIT_MODE) .withGtfsBlockId(BLOCK_ID) - .withGtfsFareId(FARE_ID) .withNetexAlteration(TRIP_ALTERATION) .withNetexSubmode(NETEX_SUBMODE_NAME) .withNetexInternalPlanningCode(NETEX_INTERNAL_PLANNING_CODE) @@ -88,7 +86,6 @@ void copy() { assertEquals(BIKE_ACCESS, copy.getBikesAllowed()); assertEquals(TRANSIT_MODE, copy.getMode()); assertEquals(BLOCK_ID, copy.getGtfsBlockId()); - assertEquals(FARE_ID, copy.getGtfsFareId()); assertEquals(TRIP_ALTERATION, copy.getNetexAlteration()); assertEquals(NETEX_SUBMODE, copy.getNetexSubMode()); assertEquals(NETEX_INTERNAL_PLANNING_CODE, copy.getNetexInternalPlanningCode()); @@ -115,7 +112,6 @@ void sameAs() { assertFalse(subject.sameAs(subject.copy().withBikesAllowed(BikeAccess.NOT_ALLOWED).build())); assertFalse(subject.sameAs(subject.copy().withMode(TransitMode.RAIL).build())); assertFalse(subject.sameAs(subject.copy().withGtfsBlockId("X").build())); - assertFalse(subject.sameAs(subject.copy().withGtfsFareId("X").build())); assertFalse( subject.sameAs(subject.copy().withNetexAlteration(TripAlteration.REPLACED).build()) );