use of org.opentripplanner.api.model.ApiTrip in project OpenTripPlanner by opentripplanner.
the class TripMapper method mapToApi.
public static ApiTrip mapToApi(Trip obj) {
if (obj == null) {
return null;
}
ApiTrip api = new ApiTrip();
api.id = FeedScopedIdMapper.mapToApi(obj.getId());
api.routeId = FeedScopedIdMapper.mapIdToApi(obj.getRoute());
api.serviceId = FeedScopedIdMapper.mapToApi(obj.getServiceId());
api.tripShortName = obj.getTripShortName();
api.tripHeadsign = obj.getTripHeadsign();
api.routeShortName = obj.getRouteShortName();
api.directionId = obj.getGtfsDirectionIdAsString(null);
api.blockId = obj.getBlockId();
api.shapeId = FeedScopedIdMapper.mapToApi(obj.getShapeId());
api.wheelchairAccessible = obj.getWheelchairAccessible();
api.bikesAllowed = BikeAccessMapper.mapToApi(obj.getBikesAllowed());
api.fareId = obj.getFareId();
return api;
}
Aggregations