public abstract class GenericJsonBikeRentalDataSource extends Object implements BikeRentalDataSource, JsonConfigurable
BikeRentalDataSource
Constructor and Description |
---|
GenericJsonBikeRentalDataSource()
Construct superclass where rental list is on the top level of JSON code
|
GenericJsonBikeRentalDataSource(String jsonPath)
Construct superclass
|
GenericJsonBikeRentalDataSource(String jsonPath,
String apiKeyValue)
Construct superclass
|
Modifier and Type | Method and Description |
---|---|
void |
configure(Graph graph,
com.fasterxml.jackson.databind.JsonNode jsonNode)
Note that the JSON being passed in here is for configuration of the OTP component, it's completely separate
from the JSON coming in from the update source.
|
List<BikeRentalStation> |
getStations() |
String |
getUrl() |
abstract BikeRentalStation |
makeStation(com.fasterxml.jackson.databind.JsonNode rentalStationNode) |
void |
setUrl(String url) |
String |
toString() |
boolean |
update()
Update the data from the source;
returns true if there might have been changes
|
public GenericJsonBikeRentalDataSource(String jsonPath)
JSON
- path to get from enclosing elements to nested rental list.
Separate path levels with '/' For example "d/list"public GenericJsonBikeRentalDataSource(String jsonPath, String apiKeyValue)
JSON
- path to get from enclosing elements to nested rental list.
Separate path levels with '/' For example "d/list"Api
- key, when used by bike rental typepublic GenericJsonBikeRentalDataSource()
public boolean update()
BikeRentalDataSource
update
in interface BikeRentalDataSource
public List<BikeRentalStation> getStations()
getStations
in interface BikeRentalDataSource
public String getUrl()
public void setUrl(String url)
public abstract BikeRentalStation makeStation(com.fasterxml.jackson.databind.JsonNode rentalStationNode)
public void configure(Graph graph, com.fasterxml.jackson.databind.JsonNode jsonNode)
configure
in interface JsonConfigurable
Copyright © 2016. All rights reserved.