diff --git a/onebusaway-gtfs-hibernate/src/main/resources/org/onebusaway/gtfs/model/GtfsMapping.hibernate.xml b/onebusaway-gtfs-hibernate/src/main/resources/org/onebusaway/gtfs/model/GtfsMapping.hibernate.xml
index 5ad73ca66..d526058c5 100644
--- a/onebusaway-gtfs-hibernate/src/main/resources/org/onebusaway/gtfs/model/GtfsMapping.hibernate.xml
+++ b/onebusaway-gtfs-hibernate/src/main/resources/org/onebusaway/gtfs/model/GtfsMapping.hibernate.xml
@@ -312,7 +312,6 @@
-
diff --git a/onebusaway-gtfs-hibernate/src/test/java/org/onebusaway/gtfs/impl/GtfsMappingTest.java b/onebusaway-gtfs-hibernate/src/test/java/org/onebusaway/gtfs/impl/GtfsMappingTest.java
index 4ae4443bf..4f87d7d70 100644
--- a/onebusaway-gtfs-hibernate/src/test/java/org/onebusaway/gtfs/impl/GtfsMappingTest.java
+++ b/onebusaway-gtfs-hibernate/src/test/java/org/onebusaway/gtfs/impl/GtfsMappingTest.java
@@ -44,7 +44,7 @@ public class GtfsMappingTest {
private static GtfsReader _reader;
@BeforeEach
- public void setup() throws IOException {
+ public void setup() {
Configuration config = new Configuration();
config = config.configure("org/onebusaway/gtfs/hibernate-configuration.xml");
diff --git a/onebusaway-gtfs-hibernate/src/test/java/org/onebusaway/gtfs/impl/HibernateGtfsRelationalDaoImplCaltrainTest.java b/onebusaway-gtfs-hibernate/src/test/java/org/onebusaway/gtfs/impl/HibernateGtfsRelationalDaoImplCaltrainTest.java
index 7ef7313fb..1e6cfa937 100644
--- a/onebusaway-gtfs-hibernate/src/test/java/org/onebusaway/gtfs/impl/HibernateGtfsRelationalDaoImplCaltrainTest.java
+++ b/onebusaway-gtfs-hibernate/src/test/java/org/onebusaway/gtfs/impl/HibernateGtfsRelationalDaoImplCaltrainTest.java
@@ -226,7 +226,6 @@ public void testGetTripById() {
assertNull(trip.getBlockId());
assertEquals("0", trip.getDirectionId());
assertEquals(route, trip.getRoute());
- assertNull(trip.getRouteShortName());
assertEquals(aid("WD01272009"), trip.getServiceId());
assertEquals(aid("cal_sj_sf"), trip.getShapeId());
assertEquals("101", trip.getTripShortName());
diff --git a/onebusaway-gtfs-transformer/src/main/java/org/onebusaway/gtfs_transformer/impl/UpdateTripHeadsignByDestinationStrategy.java b/onebusaway-gtfs-transformer/src/main/java/org/onebusaway/gtfs_transformer/impl/UpdateTripHeadsignByDestinationStrategy.java
index dae2df5b5..78ad76aa6 100644
--- a/onebusaway-gtfs-transformer/src/main/java/org/onebusaway/gtfs_transformer/impl/UpdateTripHeadsignByDestinationStrategy.java
+++ b/onebusaway-gtfs-transformer/src/main/java/org/onebusaway/gtfs_transformer/impl/UpdateTripHeadsignByDestinationStrategy.java
@@ -50,23 +50,8 @@ public void run(TransformContext context, GtfsMutableRelationalDao dao) {
trip.setTripHeadsign(tripHeadSign);
update++;
}
- else {
- fallbackSetHeadsign(trip);
- fallback++;
- }
- }
- else {
- fallbackSetHeadsign(trip);
- fallback++;
}
}
_log.info("trip headsign update:{} fallback: {}", update, fallback);
}
-
- private void fallbackSetHeadsign (Trip trip) {
- if (trip.getTripHeadsign() == null) {
- trip.setTripHeadsign(trip.getRouteShortName());
-
- }
- }
}
diff --git a/onebusaway-gtfs-transformer/src/main/java/org/onebusaway/gtfs_transformer/impl/UpdateTripHeadsignByReference.java b/onebusaway-gtfs-transformer/src/main/java/org/onebusaway/gtfs_transformer/impl/UpdateTripHeadsignByReference.java
index d963989ca..9a14aaaa6 100644
--- a/onebusaway-gtfs-transformer/src/main/java/org/onebusaway/gtfs_transformer/impl/UpdateTripHeadsignByReference.java
+++ b/onebusaway-gtfs-transformer/src/main/java/org/onebusaway/gtfs_transformer/impl/UpdateTripHeadsignByReference.java
@@ -44,7 +44,6 @@ public String getName() {
public void run(TransformContext context, GtfsMutableRelationalDao dao) {
GtfsMutableRelationalDao reference = (GtfsMutableRelationalDao) context.getReferenceReader().getEntityStore();
- String agency = reference.getAllTrips().iterator().next().getId().getAgencyId();
ArrayList missingStops = new ArrayList<>();
for (Trip trip : dao.getAllTrips()) {
@@ -74,14 +73,11 @@ public void run(TransformContext context, GtfsMutableRelationalDao dao) {
}
else {
_log.error("No stoptimes for trip {} mta id", trip.toString(), trip.getMtaTripId());
- if (trip.getTripHeadsign() == null && trip.getRouteShortName() == null) {
+ if (trip.getTripHeadsign() == null) {
//if trip has no headsign, no stoptimes and no shortname, remove it
_log.error("Removing trip {}", trip.getId());
dao.removeEntity(trip);
}
- else {
- genericSetHeadsign(trip);
- }
}
}
}
@@ -91,16 +87,6 @@ private void fallbackSetHeadsign (Trip trip, Stop stop) {
trip.setTripHeadsign(stop.getName());
//_log.info("Setting headsign {} on {}", stop.getName(), trip.toString());
}
- else {
- genericSetHeadsign(trip);
- }
- }
-
- private void genericSetHeadsign (Trip trip) {
- if (trip.getRouteShortName() != null) {
- trip.setTripHeadsign(trip.getRouteShortName());
- //_log.info("Setting headsign {} on {}", trip.getRouteShortName(), trip.toString());
- }
}
@CsvField(ignore = true)
diff --git a/onebusaway-gtfs-transformer/src/main/java/org/onebusaway/gtfs_transformer/impl/UpdateTripHeadsignExcludeNonreference.java b/onebusaway-gtfs-transformer/src/main/java/org/onebusaway/gtfs_transformer/impl/UpdateTripHeadsignExcludeNonreference.java
index 190f40961..2746a4300 100644
--- a/onebusaway-gtfs-transformer/src/main/java/org/onebusaway/gtfs_transformer/impl/UpdateTripHeadsignExcludeNonreference.java
+++ b/onebusaway-gtfs-transformer/src/main/java/org/onebusaway/gtfs_transformer/impl/UpdateTripHeadsignExcludeNonreference.java
@@ -62,10 +62,6 @@ public void run(TransformContext context, GtfsMutableRelationalDao dao) {
trip.setTripHeadsign(tripHeadSign);
update++;
}
- else {
- fallbackSetHeadsign(trip);
- fallback++;
- }
}
else {
noChange++;
@@ -74,20 +70,10 @@ public void run(TransformContext context, GtfsMutableRelationalDao dao) {
}
}
}
- else {
- fallbackSetHeadsign(trip);
- fallback++;
- }
}
_log.info("trip headsign update:{} fallback: {} no change: {} shuttle: {}", update, fallback, noChange, shuttle);
}
- private void fallbackSetHeadsign (Trip trip) {
- if (trip.getTripHeadsign() == null) {
- trip.setTripHeadsign(trip.getRouteShortName());
- }
- }
-
@CsvField(ignore = true)
private String _referenceAgencyId = null;
private String getReferenceAgencyId(GtfsMutableRelationalDao dao) {
diff --git a/onebusaway-gtfs-transformer/src/main/java/org/onebusaway/gtfs_transformer/impl/UpdateTripHeadsignIfNull.java b/onebusaway-gtfs-transformer/src/main/java/org/onebusaway/gtfs_transformer/impl/UpdateTripHeadsignIfNull.java
index b8248a1d6..d242ebc37 100644
--- a/onebusaway-gtfs-transformer/src/main/java/org/onebusaway/gtfs_transformer/impl/UpdateTripHeadsignIfNull.java
+++ b/onebusaway-gtfs-transformer/src/main/java/org/onebusaway/gtfs_transformer/impl/UpdateTripHeadsignIfNull.java
@@ -44,21 +44,9 @@ public void run(TransformContext context, GtfsMutableRelationalDao dao) {
if (tripHeadSign != null) {
trip.setTripHeadsign(tripHeadSign);
}
- else {
- fallbackSetHeadsign(trip);
- }
- }
- else {
- fallbackSetHeadsign(trip);
}
}
}
}
- private void fallbackSetHeadsign (Trip trip) {
- if (trip.getTripHeadsign() == null) {
- trip.setTripHeadsign(trip.getRouteShortName());
- _log.info("Setting headsign to route short name: ", trip.getRouteShortName());
- }
- }
}
diff --git a/onebusaway-gtfs-transformer/src/main/java/org/onebusaway/gtfs_transformer/impl/UpdateTripHeadsignRailRoadConvention.java b/onebusaway-gtfs-transformer/src/main/java/org/onebusaway/gtfs_transformer/impl/UpdateTripHeadsignRailRoadConvention.java
index e6cc10b58..663ac0eef 100644
--- a/onebusaway-gtfs-transformer/src/main/java/org/onebusaway/gtfs_transformer/impl/UpdateTripHeadsignRailRoadConvention.java
+++ b/onebusaway-gtfs-transformer/src/main/java/org/onebusaway/gtfs_transformer/impl/UpdateTripHeadsignRailRoadConvention.java
@@ -48,7 +48,7 @@ public void run(TransformContext context, GtfsMutableRelationalDao dao) {
List stopTimes = dao.getStopTimesForTrip(trip);
if (stopTimes != null && stopTimes.size() > 0) {
- String existingTripHeadsign = (trip.getTripHeadsign() != null) ? trip.getTripHeadsign() : trip.getRouteShortName();
+ String existingTripHeadsign = (trip.getTripHeadsign() != null) ? trip.getTripHeadsign() : "trip route short name";
Calendar calendar = Calendar.getInstance();
calendar.setTimeInMillis(stopTimes.get(0).getDepartureTime() * 1000);
diff --git a/onebusaway-gtfs-transformer/src/main/java/org/onebusaway/gtfs_transformer/updates/DeduplicateTripsStrategy.java b/onebusaway-gtfs-transformer/src/main/java/org/onebusaway/gtfs_transformer/updates/DeduplicateTripsStrategy.java
index 1dc83b6fe..6df0c436d 100644
--- a/onebusaway-gtfs-transformer/src/main/java/org/onebusaway/gtfs_transformer/updates/DeduplicateTripsStrategy.java
+++ b/onebusaway-gtfs-transformer/src/main/java/org/onebusaway/gtfs_transformer/updates/DeduplicateTripsStrategy.java
@@ -115,8 +115,6 @@ private String areTripsEquivalent(Trip tripA, Trip tripB) {
return "directionId";
if (!equals(tripA.getRoute(), tripB.getRoute()))
return "route";
- if (!equals(tripA.getRouteShortName(), tripB.getRouteShortName()))
- return "routeShortName";
if (!equals(tripA.getShapeId(), tripB.getShapeId()))
return "shapeId";
if (!equals(tripA.getTripHeadsign(), tripB.getTripHeadsign()))
diff --git a/onebusaway-gtfs-transformer/src/main/java/org/onebusaway/gtfs_transformer/updates/LocalVsExpressUpdateStrategy.java b/onebusaway-gtfs-transformer/src/main/java/org/onebusaway/gtfs_transformer/updates/LocalVsExpressUpdateStrategy.java
index 087fdcb8f..d23c127a4 100644
--- a/onebusaway-gtfs-transformer/src/main/java/org/onebusaway/gtfs_transformer/updates/LocalVsExpressUpdateStrategy.java
+++ b/onebusaway-gtfs-transformer/src/main/java/org/onebusaway/gtfs_transformer/updates/LocalVsExpressUpdateStrategy.java
@@ -71,7 +71,6 @@ public void run(TransformContext context, GtfsMutableRelationalDao dao) {
boolean isExpress = trip.getTripShortName().equals("EXPRESS");
if (isExpress) {
_log.info("route(" + route.getShortName() + ") gets an E for trip " + trip.getId());
- trip.setRouteShortName(trip.getRoute().getShortName() + "E");
if (addLocalVsExpressToTripName) {
String tripHeadsign = trip.getTripHeadsign();
if (tripHeadsign != null)
diff --git a/onebusaway-gtfs/src/main/java/org/onebusaway/gtfs/model/Trip.java b/onebusaway-gtfs/src/main/java/org/onebusaway/gtfs/model/Trip.java
index 8881dd26c..439a8e69f 100644
--- a/onebusaway-gtfs/src/main/java/org/onebusaway/gtfs/model/Trip.java
+++ b/onebusaway-gtfs/src/main/java/org/onebusaway/gtfs/model/Trip.java
@@ -42,9 +42,6 @@ public final class Trip extends IdentityBean {
@CsvField(optional = true)
private String tripHeadsign;
- @CsvField(optional = true)
- private String routeShortName;
-
@CsvField(optional = true)
private String directionId;
@@ -57,27 +54,6 @@ public final class Trip extends IdentityBean {
@CsvField(optional = true, defaultValue = "0")
private int wheelchairAccessible = 0;
- @CsvField(optional = true)
- private String drtMaxTravelTime;
-
- @CsvField(optional = true)
- private String drtAvgTravelTime;
-
- @CsvField(optional = true, defaultValue = "-1")
- private double drtAdvanceBookMin;
-
- @CsvField(optional = true)
- private String drtPickupMessage;
-
- @CsvField(optional = true)
- private String drtDropOffMessage;
-
- @CsvField(optional = true)
- private String continuousPickupMessage;
-
- @CsvField(optional = true)
- private String continuousDropOffMessage;
-
@Experimental(proposedBy = "https://github.com/MobilityData/gtfs-flex/pull/79")
@CsvField(optional = true)
private Double meanDurationFactor;
@@ -147,18 +123,10 @@ public Trip(Trip obj) {
this.serviceId = obj.serviceId;
this.tripShortName = obj.tripShortName;
this.tripHeadsign = obj.tripHeadsign;
- this.routeShortName = obj.routeShortName;
this.directionId = obj.directionId;
this.blockId = obj.blockId;
this.shapeId = obj.shapeId;
this.wheelchairAccessible = obj.wheelchairAccessible;
- this.drtMaxTravelTime = obj.drtMaxTravelTime;
- this.drtAvgTravelTime = obj.drtAvgTravelTime;
- this.drtAdvanceBookMin = obj.drtAdvanceBookMin;
- this.drtPickupMessage = obj.drtPickupMessage;
- this.drtDropOffMessage = obj.drtDropOffMessage;
- this.continuousPickupMessage = obj.continuousPickupMessage;
- this.continuousDropOffMessage = obj.continuousDropOffMessage;
this.meanDurationFactor = obj.meanDurationFactor;
this.meanDurationOffset = obj.meanDurationOffset;
this.safeDurationFactor = obj.safeDurationFactor;
@@ -213,14 +181,6 @@ public void setTripHeadsign(String tripHeadsign) {
this.tripHeadsign = tripHeadsign;
}
- public String getRouteShortName() {
- return routeShortName;
- }
-
- public void setRouteShortName(String routeShortName) {
- this.routeShortName = routeShortName;
- }
-
public String getDirectionId() {
return directionId;
}
@@ -253,62 +213,6 @@ public int getWheelchairAccessible() {
return wheelchairAccessible;
}
- public String getDrtMaxTravelTime() {
- return drtMaxTravelTime;
- }
-
- public void setDrtMaxTravelTime(String drtMaxTravelTime) {
- this.drtMaxTravelTime = drtMaxTravelTime;
- }
-
- public String getDrtAvgTravelTime() {
- return drtAvgTravelTime;
- }
-
- public void setDrtAvgTravelTime(String drtAvgTravelTime) {
- this.drtAvgTravelTime = drtAvgTravelTime;
- }
-
- public double getDrtAdvanceBookMin() {
- return drtAdvanceBookMin;
- }
-
- public void setDrtAdvanceBookMin(double drtAdvanceBookMin) {
- this.drtAdvanceBookMin = drtAdvanceBookMin;
- }
-
- public String getDrtPickupMessage() {
- return drtPickupMessage;
- }
-
- public void setDrtPickupMessage(String drtPickupMessage) {
- this.drtPickupMessage = drtPickupMessage;
- }
-
- public String getDrtDropOffMessage() {
- return drtDropOffMessage;
- }
-
- public void setDrtDropOffMessage(String drtDropOffMessage) {
- this.drtDropOffMessage = drtDropOffMessage;
- }
-
- public String getContinuousPickupMessage() {
- return continuousPickupMessage;
- }
-
- public void setContinuousPickupMessage(String continuousPickupMessage) {
- this.continuousPickupMessage = continuousPickupMessage;
- }
-
- public String getContinuousDropOffMessage() {
- return continuousDropOffMessage;
- }
-
- public void setContinuousDropOffMessage(String continuousDropOffMessage) {
- this.continuousDropOffMessage = continuousDropOffMessage;
- }
-
public Double getMeanDurationFactor() {
return meanDurationFactor;
}
diff --git a/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/serialization/GtfsReaderTest.java b/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/serialization/GtfsReaderTest.java
index 0ba05c737..b43b6c78e 100644
--- a/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/serialization/GtfsReaderTest.java
+++ b/onebusaway-gtfs/src/test/java/org/onebusaway/gtfs/serialization/GtfsReaderTest.java
@@ -207,7 +207,6 @@ public void testAllFields() throws IOException {
assertEquals("1", trip.getDirectionId());
assertEquals("B1", trip.getBlockId());
assertEquals(new AgencyAndId("1", "SHP1"), trip.getShapeId());
- assertEquals("10X", trip.getRouteShortName());
assertEquals(1, trip.getTripBikesAllowed());
assertEquals(2, trip.getBikesAllowed());
assertEquals(1, trip.getCarsAllowed());