use of org.opentripplanner.api.model.ApiTripShort in project OpenTripPlanner by opentripplanner.
the class TripMapper method mapToApiShort.
public static ApiTripShort mapToApiShort(Trip domain) {
if (domain == null) {
return null;
}
ApiTripShort api = new ApiTripShort();
api.id = FeedScopedIdMapper.mapToApi(domain.getId());
api.tripHeadsign = domain.getTripHeadsign();
api.serviceId = FeedScopedIdMapper.mapToApi(domain.getServiceId());
FeedScopedId shape = domain.getShapeId();
// TODO OTP2 - All ids should be fully qualified including feed scope id.
api.shapeId = shape == null ? null : shape.getId();
api.direction = domain.getDirection().gtfsCode;
return api;
}
Aggregations