Search in sources :

Example 1 with ApiRouteShort

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

the class RouteMapper method mapToApiShort.

public static ApiRouteShort mapToApiShort(Route domain) {
    if (domain == null) {
        return null;
    }
    ApiRouteShort api = new ApiRouteShort();
    api.id = FeedScopedIdMapper.mapToApi(domain.getId());
    api.shortName = domain.getShortName();
    api.longName = domain.getLongName();
    api.mode = TraverseModeMapper.mapToApi(domain.getMode());
    api.color = domain.getColor();
    api.agencyName = domain.getAgency().getName();
    return api;
}
Also used : ApiRouteShort(org.opentripplanner.api.model.ApiRouteShort)

Aggregations

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