public class ShareBikeRentalDataSource extends GenericJsonBikeRentalDataSource
| Constructor and Description |
|---|
ShareBikeRentalDataSource() |
| Modifier and Type | Method and Description |
|---|---|
BikeRentalStation |
makeStation(com.fasterxml.jackson.databind.JsonNode rentalStationNode)
ShareBike format http://www.sharebike.com/
URL for configuration:
http://map.webservice.sharebike.com:8888/json/MapService/LiveStationData?
APIKey=
|
void |
setUrl(String url) |
static Map<String,List<String>> |
splitQuery(URL url) |
configure, getStations, getUrl, toString, updatepublic ShareBikeRentalDataSource()
throws UnsupportedEncodingException,
MalformedURLException
public BikeRentalStation makeStation(com.fasterxml.jackson.databind.JsonNode rentalStationNode)
{
"version": "1.1",
"result": {
"LastUpdated": "2016-01-18T13:55:25.610",
"LastUpdatedUTC": "2016-01-18T12:55:25.610",
"LiveStationData": [
{
"Address": "[Offline] storgata",
"AvailableBikeCount": "0",
"AvailableSlotCount": "0",
"LastContact": "",
"LastContactSeconds": "0",
"LastContactUTC": "1899-12-30T00:00:00",
"Latitude": "59.92758",
"Longitude": "10.71004",
"MinAvailableBikes": "0",
"MinAvailableSlots": "0",
"Online": false,
"SlotCount": "0",
"StationID": 1,
"StationName": "storgata"
},
....
makeStation in class GenericJsonBikeRentalDataSourcepublic static Map<String,List<String>> splitQuery(URL url) throws UnsupportedEncodingException
UnsupportedEncodingExceptionpublic void setUrl(String url)
setUrl in class GenericJsonBikeRentalDataSourceCopyright © 2018. All rights reserved.