Search in sources :

Example 1 with ApiTransfer

use of org.opentripplanner.api.model.ApiTransfer in project OpenTripPlanner by opentripplanner.

the class TransferMapper method mapToApi.

/**
 * Make a transfer from a simpletransfer edge from the graph.
 */
public static ApiTransfer mapToApi(SimpleTransfer domain) {
    if (domain == null) {
        return null;
    }
    ApiTransfer api = new ApiTransfer();
    api.toStopId = FeedScopedIdMapper.mapToApi(domain.to.getId());
    api.distance = domain.getDistanceMeters();
    return api;
}
Also used : ApiTransfer(org.opentripplanner.api.model.ApiTransfer)

Aggregations

ApiTransfer (org.opentripplanner.api.model.ApiTransfer)1