Search in sources :

Example 1 with TripV2Bean

use of org.onebusaway.api.model.transit.TripV2Bean in project onebusaway-application-modules by camsys.

the class TripAction method show.

public DefaultHttpHeaders show() throws ServiceException {
    if (!isVersion(V2))
        return setUnknownVersionResponse();
    if (hasErrors())
        return setValidationErrorsResponse();
    TripBean trip = _service.getTrip(_id);
    if (trip == null)
        return setResourceNotFoundResponse();
    BeanFactoryV2 factory = getBeanFactoryV2();
    EntryWithReferencesBean<TripV2Bean> response = factory.getResponse(trip);
    return setOkResponse(response);
}
Also used : TripV2Bean(org.onebusaway.api.model.transit.TripV2Bean) TripBean(org.onebusaway.transit_data.model.trips.TripBean) BeanFactoryV2(org.onebusaway.api.model.transit.BeanFactoryV2)

Aggregations

BeanFactoryV2 (org.onebusaway.api.model.transit.BeanFactoryV2)1 TripV2Bean (org.onebusaway.api.model.transit.TripV2Bean)1 TripBean (org.onebusaway.transit_data.model.trips.TripBean)1