Examples of StopsBean


Examples of org.onebusaway.transit_data.model.StopsBean

      searchQuery.setQuery(_query);
      searchQuery.setType(EQueryType.BOUNDS_OR_CLOSEST);
    }

    try {
      StopsBean result = _service.getStops(searchQuery);
      return transformResult(result);
    } catch (OutOfServiceAreaServiceException ex) {
      return transformOutOfRangeResult();
    }
  }
View Full Code Here

Examples of org.onebusaway.transit_data.model.StopsBean

    }
  }

  private DefaultHttpHeaders transformOutOfRangeResult() {
    if (isVersion(V1)) {
      return setOkResponse(new StopsBean());
    } else if (isVersion(V2)) {
      BeanFactoryV2 factory = getBeanFactoryV2();
      return setOkResponse(factory.getEmptyList(StopV2Bean.class, true));
    } else {
      return setUnknownVersionResponse();
View Full Code Here

Examples of org.onebusaway.transit_data.model.StopsBean

  private StopsBean constructResult(List<StopBean> stopBeans,
      boolean limitExceeded) {

    Collections.sort(stopBeans, new StopBeanIdComparator());

    StopsBean result = new StopsBean();
    result.setStops(stopBeans);
    result.setLimitExceeded(limitExceeded);
    return result;
  }
View Full Code Here

Examples of org.onebusaway.transit_data.model.StopsBean

    searchQuery.setBounds(serviceArea);
    searchQuery.setMaxCount(5);
    searchQuery.setType(EQueryType.BOUNDS_OR_CLOSEST);
    searchQuery.setQuery(_stopQuery);

    StopsBean results = _transitDataService.getStops(searchQuery);

    _stops = results.getStops();

    logUserInteraction("stopQuery", _stopQuery);

    int stopIndex = 0;
View Full Code Here

Examples of org.onebusaway.transit_data.model.StopsBean

    searchQuery.setBounds(bounds);
    searchQuery.setMaxCount(5);
    searchQuery.setType(EQueryType.BOUNDS_OR_CLOSEST);
    searchQuery.setQuery(_stopCode);

    StopsBean stopsBean = _transitDataService.getStops(searchQuery);

    _stops = stopsBean.getStops();

    logUserInteraction("query", _stopCode);

    if (_stops.size() == 0) {
      return "noStopsFound";
View Full Code Here

Examples of org.onebusaway.transit_data.model.StopsBean

    @Override
    public Object answer(InvocationOnMock invocation) throws Throwable {
      Object[] arguments = invocation.getArguments();
      CoordinateBounds bounds = (CoordinateBounds) arguments[0];
      AsyncCallback<StopsBean> callback = (AsyncCallback<StopsBean>) arguments[2];
      StopsBean stopsBean = new StopsBean();
      stopsBean.setLimitExceeded(false);
      callback.onSuccess(stopsBean);
      return null;
    }
View Full Code Here

Examples of org.onebusaway.transit_data.model.StopsBean

    searchQuery.setBounds(bounds);
    searchQuery.setMaxCount(5);
    searchQuery.setType(EQueryType.BOUNDS_OR_CLOSEST);
    searchQuery.setQuery(_code);
   
    StopsBean stopsResult = _transitDataService.getStops(searchQuery);

    _stops = stopsResult.getStops();

    if (_stops.size() == 0) {
      return "noStopsFound";
    } else if (_stops.size() > 1) {
      return "multipleStopsFound";
View Full Code Here

Examples of org.onebusaway.transit_data.model.StopsBean

  @Override
  public RoutesAndStopsBean getRoutesAndStops(SearchQueryBean query)
      throws ServiceException {
    RoutesBean routes = _transitDataService.getRoutes(query);
    StopsBean stops = _transitDataService.getStops(query);
    return new RoutesAndStopsBean(routes, stops);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.