Class StopSearchServiceImpl
- java.lang.Object
-
- org.onebusaway.transit_data_federation.impl.StopSearchServiceImpl
-
- All Implemented Interfaces:
StopSearchService
@Component public class StopSearchServiceImpl extends Object implements StopSearchService
-
-
Constructor Summary
Constructors Constructor Description StopSearchServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
initialize()
SearchResult<org.onebusaway.gtfs.model.AgencyAndId>
searchForStopsByCode(String id, int maxResultCount, double minScoreToKeep)
Search for stop ids by stop code (seeStop.getCode()
).SearchResult<org.onebusaway.gtfs.model.AgencyAndId>
searchForStopsByName(String name, int maxResultCount, double minScoreToKeep)
Search for stop ids by stop name (seeStop.getName()
)void
setBundle(FederatedTransitDataBundle bundle)
-
-
-
Method Detail
-
setBundle
@Autowired 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.classic.ParseException
Description copied from interface:StopSearchService
Search for stop ids by stop code (seeStop.getCode()
). Typically default to a search againstStop.getId()
if no code is specified for a stop.- Specified by:
searchForStopsByCode
in interfaceStopSearchService
- Parameters:
id
- the stop code querymaxResultCount
- maximum number of results to returnminScoreToKeep
- implementation-specific score cutoff for search results- Returns:
- a search result for matching stop ids
- Throws:
IOException
org.apache.lucene.queryparser.classic.ParseException
-
searchForStopsByName
public SearchResult<org.onebusaway.gtfs.model.AgencyAndId> searchForStopsByName(String name, int maxResultCount, double minScoreToKeep) throws IOException, org.apache.lucene.queryparser.classic.ParseException
Description copied from interface:StopSearchService
Search for stop ids by stop name (seeStop.getName()
)- Specified by:
searchForStopsByName
in interfaceStopSearchService
- Parameters:
name
- the stop code querymaxResultCount
- maximum number of results to returnminScoreToKeep
- implementation-specific score cutoff for search results- Returns:
- a search result for matching stop ids
- Throws:
IOException
org.apache.lucene.queryparser.classic.ParseException
-
-