Search in sources :

Example 1 with ApiStop

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

the class StopMapper method mapToApi.

public static ApiStop mapToApi(Stop domain, boolean extended) {
    if (domain == null) {
        return null;
    }
    ApiStop api = new ApiStop();
    api.id = FeedScopedIdMapper.mapToApi(domain.getId());
    api.lat = domain.getLat();
    api.lon = domain.getLon();
    api.code = domain.getCode();
    api.name = domain.getName();
    if (extended) {
        api.desc = domain.getDescription();
        api.zoneId = domain.getFirstZoneAsString();
        api.url = domain.getUrl();
        api.locationType = 0;
        api.stationId = FeedScopedIdMapper.mapIdToApi(domain.getParentStation());
        api.parentStation = mapToParentStationOldId(domain);
        // api.stopTimezone = stop.getTimezone();
        api.wheelchairBoarding = WheelchairBoardingMapper.mapToApi(domain.getWheelchairBoarding());
    // api.direction = stop.getDirection();
    }
    return api;
}
Also used : ApiStop(org.opentripplanner.api.model.ApiStop)

Aggregations

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