Package org.onebusaway.transit_data.model

Examples of org.onebusaway.transit_data.model.SearchQueryBean


    if (hasErrors())
      return setValidationErrorsResponse();

    CoordinateBounds bounds = getSearchBounds();

    SearchQueryBean searchQuery = new SearchQueryBean();
    searchQuery.setBounds(bounds);
    searchQuery.setMaxCount(maxCount);
    searchQuery.setType(EQueryType.BOUNDS);
    if (_query != null) {
      searchQuery.setQuery(_query);
      searchQuery.setType(EQueryType.BOUNDS_OR_CLOSEST);
    }

    try {
      StopsBean result = _service.getStops(searchQuery);
      return transformResult(result);
View Full Code Here


      return "query-default-search-location";
    }

    _stopQuery = tokens[0];

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

    StopsBean results = _transitDataService.getStops(searchQuery);

    _stops = results.getStops();
View Full Code Here

    if (hasErrors())
      return setValidationErrorsResponse();

    CoordinateBounds bounds = getSearchBounds();

    SearchQueryBean routesQuery = new SearchQueryBean();

    if (_query != null)
      routesQuery.setQuery(_query);

    routesQuery.setBounds(bounds);
    routesQuery.setMaxCount(maxCount);
    routesQuery.setType(EQueryType.BOUNDS_OR_CLOSEST);

    try {
      RoutesBean result = _service.getRoutes(routesQuery);
      return transformResult(result);
    } catch (OutOfServiceAreaServiceException ex) {
View Full Code Here

      return NEEDS_DEFAULT_SEARCH_LOCATION;

    if (_stopCode == null || _stopCode.length() == 0)
      return INPUT;

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

    StopsBean stopsBean = _transitDataService.getStops(searchQuery);

    _stops = stopsBean.getStops();
View Full Code Here

      return NEEDS_DEFAULT_SEARCH_LOCATION;
   
    if( _routeName == null || _routeName.length() == 0)
      return INPUT;

    SearchQueryBean routesQuery = new SearchQueryBean();
    routesQuery.setBounds(bounds);
    routesQuery.setMaxCount(10);
    routesQuery.setQuery(_routeName);
    routesQuery.setType(EQueryType.BOUNDS_OR_CLOSEST);
   
    RoutesBean routesBean = _transitDataService.getRoutes(routesQuery);
    List<RouteBean> routes = routesBean.getRoutes();
   
    logUserInteraction("route", _routeName);
View Full Code Here

    switchToMapView();

    CoordinateBounds bounds = getSearchBounds(20 * 1000);

    SearchQueryBean query = new SearchQueryBean();
    query.setQuery(route);
    query.setMaxCount(10);
    query.setBounds(bounds);
    query.setType(EQueryType.BOUNDS_OR_CLOSEST);

    _service.getRoutes(query, new RoutesHandler());
  }
View Full Code Here

    if (bounds == null) {
      pushNextAction("routes", "query", _query);
      return "query-default-search-location";
    }

    SearchQueryBean query = new SearchQueryBean();
    query.setBounds(bounds);
    query.setMaxCount(5);
    query.setQuery(_query);
    query.setType(EQueryType.BOUNDS_OR_CLOSEST);
    RoutesBean routesResult = _transitDataService.getRoutes(query);

    _routes = routesResult.getRoutes();

    if (_routes.size() == 0) {
View Full Code Here

    if (bounds == null) {
      pushNextAction("stops", "code", _code);
      return "query-default-search-location";
    }
   
    SearchQueryBean searchQuery = new SearchQueryBean();
    searchQuery.setBounds(bounds);
    searchQuery.setMaxCount(5);
    searchQuery.setType(EQueryType.BOUNDS_OR_CLOSEST);
    searchQuery.setQuery(_code);
   
    StopsBean stopsResult = _transitDataService.getStops(searchQuery);

    _stops = stopsResult.getStops();
View Full Code Here

    if (cache != null) {
      handleRegion(region, cache);
      return;
    }

    SearchQueryBean query = new SearchQueryBean();

    query.setBounds(region);
    query.setMaxCount(MAX_STOP_COUNT_PER_REGION);
    query.setType(EQueryType.BOUNDS);
    _webappService.getStops(query, new StopHandler(regionOp));
  }
View Full Code Here

    }
   
    CoordinateBounds bounds = SphericalGeometryLibrary.bounds(
        center.getLatitude(), center.getLongitude(), 20000);

    SearchQueryBean query = new SearchQueryBean();
    query.setBounds(bounds);
    query.setMaxCount(10);
    query.setQuery(_query);

    CombinedSearchService search = new CombinedSearchServiceImpl();
    search.search(query, 5000, this);
  }
View Full Code Here

TOP

Related Classes of org.onebusaway.transit_data.model.SearchQueryBean

Copyright © 2018 www.massapicom. 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.