org.onebusaway.transit_data_federation.impl
Class StopSearchServiceImpl

java.lang.Object
  extended by org.onebusaway.transit_data_federation.impl.StopSearchServiceImpl
All Implemented Interfaces:
StopSearchService

@Component
public class StopSearchServiceImpl
extends Object
implements StopSearchService


Constructor Summary
StopSearchServiceImpl()
           
 
Method Summary
 void initialize()
           
 SearchResult<org.onebusaway.gtfs.model.AgencyAndId> searchForStopsByCode(String id, int maxResultCount, double minScoreToKeep)
          Search for stop ids by stop code (see Stop.getCode()).
 SearchResult<org.onebusaway.gtfs.model.AgencyAndId> searchForStopsByName(String name, int maxResultCount, double minScoreToKeep)
          Search for stop ids by stop name (see Stop.getName())
 void setBundle(FederatedTransitDataBundle bundle)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StopSearchServiceImpl

public StopSearchServiceImpl()
Method Detail

setBundle

public void setBundle(FederatedTransitDataBundle bundle)

initialize

@PostConstruct
@Refreshable(dependsOn="stopSearchData")
public void initialize()
                throws IOException
Throws:
IOException

searchForStopsByCode

public SearchResult<org.onebusaway.gtfs.model.AgencyAndId> searchForStopsByCode(String id,
                                                                                int maxResultCount,
                                                                                double minScoreToKeep)
                                                                         throws IOException,
                                                                                org.apache.lucene.queryParser.ParseException
Description copied from interface: StopSearchService
Search for stop ids by stop code (see Stop.getCode()). Typically default to a search against Stop.getId() if no code is specified for a stop.

Specified by:
searchForStopsByCode in interface StopSearchService
Parameters:
id - the stop code query
maxResultCount - maximum number of results to return
minScoreToKeep - implementation-specific score cutoff for search results
Returns:
a search result for matching stop ids
Throws:
IOException
org.apache.lucene.queryParser.ParseException

searchForStopsByName

public SearchResult<org.onebusaway.gtfs.model.AgencyAndId> searchForStopsByName(String name,
                                                                                int maxResultCount,
                                                                                double minScoreToKeep)
                                                                         throws IOException,
                                                                                org.apache.lucene.queryParser.ParseException
Description copied from interface: StopSearchService
Search for stop ids by stop name (see Stop.getName())

Specified by:
searchForStopsByName in interface StopSearchService
maxResultCount - maximum number of results to return
minScoreToKeep - implementation-specific score cutoff for search results
Returns:
a search result for matching stop ids
Throws:
IOException
org.apache.lucene.queryParser.ParseException


Copyright © 2012 OneBusAway. All Rights Reserved.