Changeset View
Changeset View
Standalone View
Standalone View
src/it/reyboz/bustorino/backend/StopsDBInterface.java
Show All 31 Lines | public interface StopsDBInterface { | ||||
* Given a stop ID, get which routes stop there (as strings, there's no sane way to determine their destination\terminus from the database) | * Given a stop ID, get which routes stop there (as strings, there's no sane way to determine their destination\terminus from the database) | ||||
* | * | ||||
* @param stopID stop ID | * @param stopID stop ID | ||||
* @return list of routes or null if none (or database closed) | * @return list of routes or null if none (or database closed) | ||||
*/ | */ | ||||
@Nullable List<String> getRoutesByStop(@NonNull String stopID); | @Nullable List<String> getRoutesByStop(@NonNull String stopID); | ||||
/** | /** | ||||
* Stop ID goes in, stop name comes out. | |||||
* GTT API doesn't return this useful piece of information, so here we go, get it from the database! | |||||
* | |||||
* @param stopID stop ID, in normalized form | |||||
* @return stop name or null if not found (or database closed) | |||||
*/ | |||||
@Nullable String getNameFromID(@NonNull String stopID); | |||||
/** | |||||
* Stop ID goes in, stop location comes out. | * Stop ID goes in, stop location comes out. | ||||
* This is sometimes missing in GTT API, but database contains meaningful locations for nearly every stop... | * This is sometimes missing in GTT API, but database contains meaningful locations for nearly every stop... | ||||
* | * | ||||
* @param stopID stop ID, in normalized form | * @param stopID stop ID, in normalized form | ||||
* @return stop location or null if not found (or database closed) | * @return stop location or null if not found (or database closed) | ||||
*/ | */ | ||||
@Nullable String getLocationFromID(@NonNull String stopID); | @Nullable String getLocationFromID(@NonNull String stopID); | ||||
Show All 10 Lines |
Public contents are in Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) or GNU Free Documentation License (at your option) unless otherwise noted. · Contact / Register