Search in sources :

Example 1 with PttRoute

use of org.onebusaway.admin.service.bundle.hastus.xml.PttRoute in project onebusaway-application-modules by camsys.

the class HastusGtfsFactory method getRoute.

private Route getRoute(PublicTimeTable timetable, PttPlaceInfo placeInfo, PttTrip pttTrip) {
    AgencyAndId routeId = id(pttTrip.getRouteId());
    Route route = _dao.getRouteForId(routeId);
    if (route == null) {
        PttRoute pttRoute = getRouteForId(timetable, pttTrip.getRouteId());
        route = new Route();
        route.setAgency(_agency);
        route.setId(routeId);
        route.setShortName(pttRoute.getId());
        route.setLongName(pttRoute.getDescription());
        route.setType(3);
        _dao.saveEntity(route);
    }
    return route;
}
Also used : PttRoute(org.onebusaway.admin.service.bundle.hastus.xml.PttRoute) AgencyAndId(org.onebusaway.gtfs.model.AgencyAndId) Route(org.onebusaway.gtfs.model.Route) PttRoute(org.onebusaway.admin.service.bundle.hastus.xml.PttRoute)

Aggregations

PttRoute (org.onebusaway.admin.service.bundle.hastus.xml.PttRoute)1 AgencyAndId (org.onebusaway.gtfs.model.AgencyAndId)1 Route (org.onebusaway.gtfs.model.Route)1