mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-06 15:18:49 +00:00
removed duplicated nearby stations code
git-svn-id: https://public-transport-enabler.googlecode.com/svn/trunk@887 0924bc21-9374-b0fa-ee44-9ff1593b38f0
This commit is contained in:
parent
ed9266c9f0
commit
473464fa11
45 changed files with 22 additions and 423 deletions
|
@ -290,6 +290,8 @@ public abstract class AbstractEfaProvider extends AbstractNetworkProvider
|
|||
uri.append("&inclFilter=1&radius_1=").append(maxDistance != 0 ? maxDistance : 1320);
|
||||
uri.append("&type_1=STOP"); // ENTRANCE, BUS_POINT, POI_POINT
|
||||
|
||||
// System.out.println(uri);
|
||||
|
||||
InputStream is = null;
|
||||
try
|
||||
{
|
||||
|
@ -464,8 +466,6 @@ public abstract class AbstractEfaProvider extends AbstractNetworkProvider
|
|||
return new Location(LocationType.STATION, id, lat, lon, place, name);
|
||||
}
|
||||
|
||||
protected abstract String nearbyStationUri(int stationId);
|
||||
|
||||
public NearbyStationsResult queryNearbyStations(final Location location, final int maxDistance, final int maxStations) throws IOException
|
||||
{
|
||||
if (location.hasLocation())
|
||||
|
@ -477,12 +477,28 @@ public abstract class AbstractEfaProvider extends AbstractNetworkProvider
|
|||
if (!location.hasId())
|
||||
throw new IllegalArgumentException("at least one of stationId or lat/lon must be given");
|
||||
|
||||
final String uri = nearbyStationUri(location.id);
|
||||
return nearbyStationsRequest(location.id, maxStations);
|
||||
}
|
||||
|
||||
private NearbyStationsResult nearbyStationsRequest(final int stationId, final int maxStations) throws IOException
|
||||
{
|
||||
final StringBuilder uri = new StringBuilder(apiBase);
|
||||
uri.append(departureMonitorEndpoint);
|
||||
appendCommonRequestParams(uri, "XML");
|
||||
uri.append("&type_dm=stop&name_dm=").append(stationId);
|
||||
uri.append("&itOptionsActive=1");
|
||||
uri.append("&ptOptionsActive=1");
|
||||
uri.append("&useProxFootSearch=1");
|
||||
uri.append("&mergeDep=1");
|
||||
uri.append("&useAllStops=1");
|
||||
uri.append("&mode=direct");
|
||||
|
||||
// System.out.println(uri);
|
||||
|
||||
InputStream is = null;
|
||||
try
|
||||
{
|
||||
is = ParserUtils.scrapeInputStream(uri);
|
||||
is = ParserUtils.scrapeInputStream(uri.toString());
|
||||
|
||||
final XmlPullParser pp = parserFactory.newPullParser();
|
||||
pp.setInput(is, null);
|
||||
|
|
|
@ -50,16 +50,6 @@ public class AtcProvider extends AbstractEfaProvider
|
|||
return false;
|
||||
}
|
||||
|
||||
private static final String NEARBY_STATION_URI = API_BASE
|
||||
+ "XSLT_DM_REQUEST"
|
||||
+ "?outputFormat=XML&coordOutputFormat=WGS84&type_dm=stop&name_dm=%s&itOptionsActive=1&ptOptionsActive=1&useProxFootSearch=1&mergeDep=1&useAllStops=1&mode=direct";
|
||||
|
||||
@Override
|
||||
protected String nearbyStationUri(final int stationId)
|
||||
{
|
||||
return String.format(NEARBY_STATION_URI, stationId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Location> autocompleteStations(final CharSequence constraint) throws IOException
|
||||
{
|
||||
|
|
|
@ -51,16 +51,6 @@ public class AvvProvider extends AbstractEfaProvider
|
|||
return false;
|
||||
}
|
||||
|
||||
private static final String NEARBY_STATION_URI = API_BASE
|
||||
+ "XSLT_DM_REQUEST"
|
||||
+ "?outputFormat=XML&coordOutputFormat=WGS84&type_dm=stop&name_dm=%s&itOptionsActive=1&ptOptionsActive=1&useProxFootSearch=1&mergeDep=1&useAllStops=1&mode=direct";
|
||||
|
||||
@Override
|
||||
protected String nearbyStationUri(final int stationId)
|
||||
{
|
||||
return String.format(NEARBY_STATION_URI, stationId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Location> autocompleteStations(final CharSequence constraint) throws IOException
|
||||
{
|
||||
|
|
|
@ -50,16 +50,6 @@ public class BayernProvider extends AbstractEfaProvider
|
|||
return false;
|
||||
}
|
||||
|
||||
private static final String NEARBY_STATION_URI = API_BASE
|
||||
+ "XSLT_DM_REQUEST"
|
||||
+ "?outputFormat=XML&coordOutputFormat=WGS84&type_dm=stop&name_dm=%s&itOptionsActive=1&ptOptionsActive=1&useProxFootSearch=1&mergeDep=1&useAllStops=1&mode=direct";
|
||||
|
||||
@Override
|
||||
protected String nearbyStationUri(final int stationId)
|
||||
{
|
||||
return String.format(NEARBY_STATION_URI, stationId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Location> autocompleteStations(final CharSequence constraint) throws IOException
|
||||
{
|
||||
|
|
|
@ -50,16 +50,6 @@ public class BsagProvider extends AbstractEfaProvider
|
|||
return false;
|
||||
}
|
||||
|
||||
private static final String NEARBY_STATION_URI = API_BASE
|
||||
+ "XSLT_DM_REQUEST"
|
||||
+ "?outputFormat=XML&coordOutputFormat=WGS84&type_dm=stop&name_dm=%s&itOptionsActive=1&ptOptionsActive=1&useProxFootSearch=1&mergeDep=1&useAllStops=1&mode=direct";
|
||||
|
||||
@Override
|
||||
protected String nearbyStationUri(final int stationId)
|
||||
{
|
||||
return String.format(NEARBY_STATION_URI, stationId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Location> autocompleteStations(final CharSequence constraint) throws IOException
|
||||
{
|
||||
|
|
|
@ -51,16 +51,6 @@ public class BsvagProvider extends AbstractEfaProvider
|
|||
return false;
|
||||
}
|
||||
|
||||
private static final String NEARBY_STATION_URI = API_BASE
|
||||
+ "XSLT_DM_REQUEST"
|
||||
+ "?outputFormat=XML&coordOutputFormat=WGS84&type_dm=stop&name_dm=%s&itOptionsActive=1&ptOptionsActive=1&useProxFootSearch=1&mergeDep=1&useAllStops=1&mode=direct";
|
||||
|
||||
@Override
|
||||
protected String nearbyStationUri(final int stationId)
|
||||
{
|
||||
return String.format(NEARBY_STATION_URI, stationId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Location> autocompleteStations(final CharSequence constraint) throws IOException
|
||||
{
|
||||
|
|
|
@ -51,16 +51,6 @@ public class BvbProvider extends AbstractEfaProvider
|
|||
return false;
|
||||
}
|
||||
|
||||
private static final String NEARBY_STATION_URI = API_BASE
|
||||
+ "XSLT_DM_REQUEST"
|
||||
+ "?outputFormat=XML&coordOutputFormat=WGS84&type_dm=stop&name_dm=%s&itOptionsActive=1&ptOptionsActive=1&useProxFootSearch=1&mergeDep=1&useAllStops=1&mode=direct";
|
||||
|
||||
@Override
|
||||
protected String nearbyStationUri(final int stationId)
|
||||
{
|
||||
return String.format(NEARBY_STATION_URI, stationId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Location> autocompleteStations(final CharSequence constraint) throws IOException
|
||||
{
|
||||
|
|
|
@ -51,16 +51,6 @@ public class DingProvider extends AbstractEfaProvider
|
|||
return false;
|
||||
}
|
||||
|
||||
private static final String NEARBY_STATION_URI = API_BASE
|
||||
+ "XSLT_DM_REQUEST"
|
||||
+ "?outputFormat=XML&coordOutputFormat=WGS84&type_dm=stop&name_dm=%s&itOptionsActive=1&ptOptionsActive=1&useProxFootSearch=1&mergeDep=1&useAllStops=1&mode=direct";
|
||||
|
||||
@Override
|
||||
protected String nearbyStationUri(final int stationId)
|
||||
{
|
||||
return String.format(NEARBY_STATION_URI, stationId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Location> autocompleteStations(final CharSequence constraint) throws IOException
|
||||
{
|
||||
|
|
|
@ -58,16 +58,6 @@ public class DubProvider extends AbstractEfaProvider
|
|||
return false;
|
||||
}
|
||||
|
||||
private static final String NEARBY_STATION_URI = API_BASE
|
||||
+ "XSLT_DM_REQUEST"
|
||||
+ "?outputFormat=XML&coordOutputFormat=WGS84&type_dm=stop&name_dm=%s&itOptionsActive=1&ptOptionsActive=1&useProxFootSearch=1&mergeDep=1&useAllStops=1&mode=direct";
|
||||
|
||||
@Override
|
||||
protected String nearbyStationUri(final int stationId)
|
||||
{
|
||||
return String.format(NEARBY_STATION_URI, stationId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Location> autocompleteStations(final CharSequence constraint) throws IOException
|
||||
{
|
||||
|
|
|
@ -54,15 +54,6 @@ public class GvhProvider extends AbstractEfaProvider
|
|||
return false;
|
||||
}
|
||||
|
||||
private static final String NEARBY_STATION_URI = API_BASE
|
||||
+ "XSLT_DM_REQUEST?outputFormat=XML&coordOutputFormat=WGS84&type_dm=stop&name_dm=%s&itOptionsActive=1&ptOptionsActive=1&useProxFootSearch=1&mergeDep=1&useAllStops=1&mode=direct";
|
||||
|
||||
@Override
|
||||
protected String nearbyStationUri(final int stationId)
|
||||
{
|
||||
return String.format(NEARBY_STATION_URI, stationId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Location> autocompleteStations(final CharSequence constraint) throws IOException
|
||||
{
|
||||
|
|
|
@ -51,16 +51,6 @@ public class IvbProvider extends AbstractEfaProvider
|
|||
return false;
|
||||
}
|
||||
|
||||
private static final String NEARBY_STATION_URI = API_BASE
|
||||
+ "XSLT_DM_REQUEST"
|
||||
+ "?outputFormat=XML&coordOutputFormat=WGS84&type_dm=stop&name_dm=%s&itOptionsActive=1&ptOptionsActive=1&useProxFootSearch=1&mergeDep=1&useAllStops=1&mode=direct";
|
||||
|
||||
@Override
|
||||
protected String nearbyStationUri(final int stationId)
|
||||
{
|
||||
return String.format(NEARBY_STATION_URI, stationId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Location> autocompleteStations(final CharSequence constraint) throws IOException
|
||||
{
|
||||
|
|
|
@ -59,16 +59,6 @@ public class KvvProvider extends AbstractEfaProvider
|
|||
return false;
|
||||
}
|
||||
|
||||
private static final String NEARBY_STATION_URI = API_BASE
|
||||
+ "XSLT_DM_REQUEST"
|
||||
+ "?outputFormat=XML&coordOutputFormat=WGS84&type_dm=stop&name_dm=%s&itOptionsActive=1&ptOptionsActive=1&useProxFootSearch=1&mergeDep=1&useAllStops=1&mode=direct";
|
||||
|
||||
@Override
|
||||
protected String nearbyStationUri(final int stationId)
|
||||
{
|
||||
return String.format(NEARBY_STATION_URI, stationId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Location> autocompleteStations(final CharSequence constraint) throws IOException
|
||||
{
|
||||
|
|
|
@ -51,16 +51,6 @@ public class LinzProvider extends AbstractEfaProvider
|
|||
return false;
|
||||
}
|
||||
|
||||
private static final String NEARBY_STATION_URI = API_BASE
|
||||
+ "XSLT_DM_REQUEST"
|
||||
+ "?outputFormat=XML&mode=direct&coordOutputFormat=WGS84&mergeDep=1&useAllStops=1&type_dm=stop&name_dm=%s&itOptionsActive=1&ptOptionsActive=1&useProxFootSearch=1&excludedMeans=checkbox";
|
||||
|
||||
@Override
|
||||
protected String nearbyStationUri(final int stationId)
|
||||
{
|
||||
return String.format(NEARBY_STATION_URI, stationId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Location> autocompleteStations(final CharSequence constraint) throws IOException
|
||||
{
|
||||
|
|
|
@ -51,16 +51,6 @@ public class MariborProvider extends AbstractEfaProvider
|
|||
return false;
|
||||
}
|
||||
|
||||
private static final String NEARBY_STATION_URI = API_BASE
|
||||
+ "XSLT_DM_REQUEST"
|
||||
+ "?outputFormat=XML&coordOutputFormat=WGS84&type_dm=stop&name_dm=%s&itOptionsActive=1&ptOptionsActive=1&useProxFootSearch=1&mergeDep=1&useAllStops=1&mode=direct";
|
||||
|
||||
@Override
|
||||
protected String nearbyStationUri(final int stationId)
|
||||
{
|
||||
return String.format(NEARBY_STATION_URI, stationId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Location> autocompleteStations(final CharSequence constraint) throws IOException
|
||||
{
|
||||
|
|
|
@ -60,16 +60,6 @@ public class MetProvider extends AbstractEfaProvider
|
|||
return false;
|
||||
}
|
||||
|
||||
private static final String NEARBY_STATION_URI = API_BASE
|
||||
+ "XSLT_DM_REQUEST"
|
||||
+ "?outputFormat=XML&coordOutputFormat=WGS84&type_dm=stop&name_dm=%s&itOptionsActive=1&ptOptionsActive=1&useProxFootSearch=1&mergeDep=1&useAllStops=1&mode=direct";
|
||||
|
||||
@Override
|
||||
protected String nearbyStationUri(final int stationId)
|
||||
{
|
||||
return String.format(NEARBY_STATION_URI, stationId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Location> autocompleteStations(final CharSequence constraint) throws IOException
|
||||
{
|
||||
|
|
|
@ -50,16 +50,6 @@ public class MvgProvider extends AbstractEfaProvider
|
|||
return false;
|
||||
}
|
||||
|
||||
private static final String NEARBY_STATION_URI = API_BASE
|
||||
+ "XSLT_DM_REQUEST"
|
||||
+ "?outputFormat=XML&coordOutputFormat=WGS84&type_dm=stop&name_dm=%s&itOptionsActive=1&ptOptionsActive=1&useProxFootSearch=1&mergeDep=1&useAllStops=1&mode=direct&deleteAssignedStop=0";
|
||||
|
||||
@Override
|
||||
protected String nearbyStationUri(final int stationId)
|
||||
{
|
||||
return String.format(NEARBY_STATION_URI, stationId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Location> autocompleteStations(final CharSequence constraint) throws IOException
|
||||
{
|
||||
|
|
|
@ -55,16 +55,6 @@ public class MvvProvider extends AbstractEfaProvider
|
|||
return false;
|
||||
}
|
||||
|
||||
private static final String NEARBY_STATION_URI = API_BASE
|
||||
+ "XSLT_DM_REQUEST"
|
||||
+ "?outputFormat=XML&coordOutputFormat=WGS84&type_dm=stop&name_dm=%s&itOptionsActive=1&ptOptionsActive=1&useProxFootSearch=1&mergeDep=1&useAllStops=1&mode=direct";
|
||||
|
||||
@Override
|
||||
protected String nearbyStationUri(final int stationId)
|
||||
{
|
||||
return String.format(NEARBY_STATION_URI, stationId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Location> autocompleteStations(final CharSequence constraint) throws IOException
|
||||
{
|
||||
|
|
|
@ -51,16 +51,6 @@ public class NaldoProvider extends AbstractEfaProvider
|
|||
return false;
|
||||
}
|
||||
|
||||
private static final String NEARBY_STATION_URI = API_BASE
|
||||
+ "XSLT_DM_REQUEST"
|
||||
+ "?outputFormat=XML&coordOutputFormat=WGS84&type_dm=stop&name_dm=%s&itOptionsActive=1&ptOptionsActive=1&useProxFootSearch=1&mergeDep=1&useAllStops=1&mode=direct";
|
||||
|
||||
@Override
|
||||
protected String nearbyStationUri(final int stationId)
|
||||
{
|
||||
return String.format(NEARBY_STATION_URI, stationId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Location> autocompleteStations(final CharSequence constraint) throws IOException
|
||||
{
|
||||
|
|
|
@ -50,16 +50,6 @@ public class NphProvider extends AbstractEfaProvider
|
|||
return false;
|
||||
}
|
||||
|
||||
private static final String NEARBY_STATION_URI = API_BASE
|
||||
+ "XSLT_DM_REQUEST"
|
||||
+ "?outputFormat=XML&coordOutputFormat=WGS84&type_dm=stop&name_dm=%s&itOptionsActive=1&ptOptionsActive=1&useProxFootSearch=1&mergeDep=1&useAllStops=1&mode=direct&deleteAssignedStop=0";
|
||||
|
||||
@Override
|
||||
protected String nearbyStationUri(final int stationId)
|
||||
{
|
||||
return String.format(NEARBY_STATION_URI, stationId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Location> autocompleteStations(final CharSequence constraint) throws IOException
|
||||
{
|
||||
|
|
|
@ -50,16 +50,6 @@ public class NvbwProvider extends AbstractEfaProvider
|
|||
return false;
|
||||
}
|
||||
|
||||
private static final String NEARBY_STATION_URI = API_BASE
|
||||
+ "XSLT_DM_REQUEST"
|
||||
+ "?outputFormat=XML&coordOutputFormat=WGS84&type_dm=stop&name_dm=%s&itOptionsActive=1&ptOptionsActive=1&useProxFootSearch=1&mergeDep=1&useAllStops=1&mode=direct";
|
||||
|
||||
@Override
|
||||
protected String nearbyStationUri(final int stationId)
|
||||
{
|
||||
return String.format(NEARBY_STATION_URI, stationId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Location> autocompleteStations(final CharSequence constraint) throws IOException
|
||||
{
|
||||
|
|
|
@ -60,16 +60,6 @@ public class SfProvider extends AbstractEfaProvider
|
|||
return false;
|
||||
}
|
||||
|
||||
private static final String NEARBY_STATION_URI = API_BASE
|
||||
+ "XSLT_DM_REQUEST"
|
||||
+ "?outputFormat=XML&coordOutputFormat=WGS84&type_dm=stop&name_dm=%s&itOptionsActive=1&ptOptionsActive=1&useProxFootSearch=1&mergeDep=1&useAllStops=1&mode=direct";
|
||||
|
||||
@Override
|
||||
protected String nearbyStationUri(final int stationId)
|
||||
{
|
||||
return String.format(NEARBY_STATION_URI, stationId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Location> autocompleteStations(final CharSequence constraint) throws IOException
|
||||
{
|
||||
|
|
|
@ -51,16 +51,6 @@ public class StvProvider extends AbstractEfaProvider
|
|||
return false;
|
||||
}
|
||||
|
||||
private static final String NEARBY_STATION_URI = API_BASE
|
||||
+ "XSLT_DM_REQUEST"
|
||||
+ "?outputFormat=XML&coordOutputFormat=WGS84&type_dm=stop&name_dm=%s&itOptionsActive=1&ptOptionsActive=1&useProxFootSearch=1&mergeDep=1&useAllStops=1&mode=direct";
|
||||
|
||||
@Override
|
||||
protected String nearbyStationUri(final int stationId)
|
||||
{
|
||||
return String.format(NEARBY_STATION_URI, stationId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Location> autocompleteStations(final CharSequence constraint) throws IOException
|
||||
{
|
||||
|
|
|
@ -51,16 +51,6 @@ public class SvvProvider extends AbstractEfaProvider
|
|||
return false;
|
||||
}
|
||||
|
||||
private static final String NEARBY_STATION_URI = API_BASE
|
||||
+ "XSLT_DM_REQUEST"
|
||||
+ "?outputFormat=XML&coordOutputFormat=WGS84&type_dm=stop&name_dm=%s&itOptionsActive=1&ptOptionsActive=1&useProxFootSearch=1&mergeDep=1&useAllStops=1&mode=direct";
|
||||
|
||||
@Override
|
||||
protected String nearbyStationUri(final int stationId)
|
||||
{
|
||||
return String.format(NEARBY_STATION_URI, stationId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Location> autocompleteStations(final CharSequence constraint) throws IOException
|
||||
{
|
||||
|
|
|
@ -62,14 +62,4 @@ public class SydneyProvider extends AbstractEfaProvider
|
|||
{
|
||||
return jsonStopfinderRequest(new Location(LocationType.ANY, 0, null, constraint.toString()));
|
||||
}
|
||||
|
||||
private static final String NEARBY_STATION_URI = API_BASE
|
||||
+ "XSLT_DM_REQUEST"
|
||||
+ "?outputFormat=XML&coordOutputFormat=WGS84&type_dm=stop&name_dm=%s&itOptionsActive=1&ptOptionsActive=1&useProxFootSearch=1&mergeDep=1&useAllStops=1&mode=direct";
|
||||
|
||||
@Override
|
||||
protected String nearbyStationUri(final int stationId)
|
||||
{
|
||||
return String.format(NEARBY_STATION_URI, stationId);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -61,15 +61,6 @@ public class TflProvider extends AbstractEfaProvider
|
|||
return false;
|
||||
}
|
||||
|
||||
private static final String NEARBY_STATION_URI = API_BASE
|
||||
+ "XSLT_DM_REQUEST?outputFormat=XML&coordOutputFormat=WGS84&type_dm=stop&name_dm=%s&itOptionsActive=1&ptOptionsActive=1&useProxFootSearch=1&mergeDep=1&useAllStops=1&mode=direct";
|
||||
|
||||
@Override
|
||||
protected String nearbyStationUri(final int stationId)
|
||||
{
|
||||
return String.format(NEARBY_STATION_URI, stationId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Location> autocompleteStations(final CharSequence constraint) throws IOException
|
||||
{
|
||||
|
|
|
@ -58,16 +58,6 @@ public class TleaProvider extends AbstractEfaProvider
|
|||
return false;
|
||||
}
|
||||
|
||||
private static final String NEARBY_STATION_URI = API_BASE
|
||||
+ "XSLT_DM_REQUEST"
|
||||
+ "?outputFormat=XML&coordOutputFormat=WGS84&type_dm=stop&name_dm=%s&itOptionsActive=1&ptOptionsActive=1&useProxFootSearch=1&mergeDep=1&useAllStops=1&mode=direct";
|
||||
|
||||
@Override
|
||||
protected String nearbyStationUri(final int stationId)
|
||||
{
|
||||
return String.format(NEARBY_STATION_URI, stationId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Location> autocompleteStations(final CharSequence constraint) throws IOException
|
||||
{
|
||||
|
|
|
@ -58,16 +58,6 @@ public class TlemProvider extends AbstractEfaProvider
|
|||
return false;
|
||||
}
|
||||
|
||||
private static final String NEARBY_STATION_URI = API_BASE
|
||||
+ "XSLT_DM_REQUEST"
|
||||
+ "?outputFormat=XML&coordOutputFormat=WGS84&type_dm=stop&name_dm=%s&itOptionsActive=1&ptOptionsActive=1&useProxFootSearch=1&mergeDep=1&useAllStops=1&mode=direct";
|
||||
|
||||
@Override
|
||||
protected String nearbyStationUri(final int stationId)
|
||||
{
|
||||
return String.format(NEARBY_STATION_URI, stationId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Location> autocompleteStations(final CharSequence constraint) throws IOException
|
||||
{
|
||||
|
|
|
@ -58,16 +58,6 @@ public class TlseProvider extends AbstractEfaProvider
|
|||
return false;
|
||||
}
|
||||
|
||||
private static final String NEARBY_STATION_URI = API_BASE
|
||||
+ "XSLT_DM_REQUEST"
|
||||
+ "?outputFormat=XML&coordOutputFormat=WGS84&type_dm=stop&name_dm=%s&itOptionsActive=1&ptOptionsActive=1&useProxFootSearch=1&mergeDep=1&useAllStops=1&mode=direct";
|
||||
|
||||
@Override
|
||||
protected String nearbyStationUri(final int stationId)
|
||||
{
|
||||
return String.format(NEARBY_STATION_URI, stationId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Location> autocompleteStations(final CharSequence constraint) throws IOException
|
||||
{
|
||||
|
|
|
@ -57,16 +57,6 @@ public class TlswProvider extends AbstractEfaProvider
|
|||
return false;
|
||||
}
|
||||
|
||||
private static final String NEARBY_STATION_URI = API_BASE
|
||||
+ "XSLT_DM_REQUEST"
|
||||
+ "?outputFormat=XML&coordOutputFormat=WGS84&name_dm=%s&type_dm=stop&itOptionsActive=1&ptOptionsActive=1&useProxFootSearch=1&mergeDep=1&useAllStops=1&mode=direct";
|
||||
|
||||
@Override
|
||||
protected String nearbyStationUri(final int stationId)
|
||||
{
|
||||
return String.format(NEARBY_STATION_URI, stationId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Location> autocompleteStations(final CharSequence constraint) throws IOException
|
||||
{
|
||||
|
|
|
@ -50,16 +50,6 @@ public class VagfrProvider extends AbstractEfaProvider
|
|||
return false;
|
||||
}
|
||||
|
||||
private static final String NEARBY_STATION_URI = API_BASE
|
||||
+ "XSLT_DM_REQUEST"
|
||||
+ "?outputFormat=XML&coordOutputFormat=WGS84&type_dm=stop&name_dm=%s&itOptionsActive=1&ptOptionsActive=1&useProxFootSearch=1&mergeDep=1&useAllStops=1&mode=direct";
|
||||
|
||||
@Override
|
||||
protected String nearbyStationUri(final int stationId)
|
||||
{
|
||||
return String.format(NEARBY_STATION_URI, stationId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Location> autocompleteStations(final CharSequence constraint) throws IOException
|
||||
{
|
||||
|
|
|
@ -50,16 +50,6 @@ public class VblProvider extends AbstractEfaProvider
|
|||
return false;
|
||||
}
|
||||
|
||||
private static final String NEARBY_STATION_URI = API_BASE
|
||||
+ "XSLT_DM_REQUEST"
|
||||
+ "?outputFormat=XML&coordOutputFormat=WGS84&type_dm=stop&name_dm=%s&itOptionsActive=1&ptOptionsActive=1&useProxFootSearch=1&mergeDep=1&useAllStops=1&mode=direct";
|
||||
|
||||
@Override
|
||||
protected String nearbyStationUri(final int stationId)
|
||||
{
|
||||
return String.format(NEARBY_STATION_URI, stationId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Location> autocompleteStations(final CharSequence constraint) throws IOException
|
||||
{
|
||||
|
|
|
@ -54,15 +54,6 @@ public class VgnProvider extends AbstractEfaProvider
|
|||
return false;
|
||||
}
|
||||
|
||||
private static final String NEARBY_STATION_URI = DEPARTURE_MONITOR_ENDPOINT
|
||||
+ "?outputFormat=XML&coordOutputFormat=WGS84&type_dm=stop&name_dm=%s&itOptionsActive=1&ptOptionsActive=1&useProxFootSearch=1&mergeDep=1&useAllStops=1&mode=direct";
|
||||
|
||||
@Override
|
||||
protected String nearbyStationUri(final int stationId)
|
||||
{
|
||||
return String.format(apiBase + NEARBY_STATION_URI, stationId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Location> autocompleteStations(final CharSequence constraint) throws IOException
|
||||
{
|
||||
|
|
|
@ -52,16 +52,6 @@ public class VmobilProvider extends AbstractEfaProvider
|
|||
return false;
|
||||
}
|
||||
|
||||
private static final String NEARBY_STATION_URI = API_BASE
|
||||
+ "XSLT_DM_REQUEST"
|
||||
+ "?outputFormat=XML&coordOutputFormat=WGS84&type_dm=stop&name_dm=%s&itOptionsActive=1&ptOptionsActive=1&useProxFootSearch=1&mergeDep=1&useAllStops=1&mode=direct";
|
||||
|
||||
@Override
|
||||
protected String nearbyStationUri(final int stationId)
|
||||
{
|
||||
return String.format(NEARBY_STATION_URI, stationId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Location> autocompleteStations(final CharSequence constraint) throws IOException
|
||||
{
|
||||
|
|
|
@ -51,16 +51,6 @@ public class VmsProvider extends AbstractEfaProvider
|
|||
return false;
|
||||
}
|
||||
|
||||
private static final String NEARBY_STATION_URI = API_BASE
|
||||
+ "XSLT_DM_REQUEST"
|
||||
+ "?outputFormat=XML&coordOutputFormat=WGS84&type_dm=stop&name_dm=%s&itOptionsActive=1&ptOptionsActive=1&useProxFootSearch=1&mergeDep=1&useAllStops=1&mode=direct&deleteAssignedStop=0";
|
||||
|
||||
@Override
|
||||
protected String nearbyStationUri(final int stationId)
|
||||
{
|
||||
return String.format(NEARBY_STATION_URI, stationId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Location> autocompleteStations(final CharSequence constraint) throws IOException
|
||||
{
|
||||
|
|
|
@ -51,16 +51,6 @@ public class VmvProvider extends AbstractEfaProvider
|
|||
return false;
|
||||
}
|
||||
|
||||
private static final String NEARBY_STATION_URI = API_BASE
|
||||
+ "XSLT_DM_REQUEST"
|
||||
+ "?outputFormat=XML&coordOutputFormat=WGS84&type_dm=stop&name_dm=%s&itOptionsActive=1&ptOptionsActive=1&useProxFootSearch=1&mergeDep=1&useAllStops=1&mode=direct&deleteAssignedStop=0";
|
||||
|
||||
@Override
|
||||
protected String nearbyStationUri(final int stationId)
|
||||
{
|
||||
return String.format(NEARBY_STATION_URI, stationId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Location> autocompleteStations(final CharSequence constraint) throws IOException
|
||||
{
|
||||
|
|
|
@ -51,16 +51,6 @@ public class VorProvider extends AbstractEfaProvider
|
|||
return false;
|
||||
}
|
||||
|
||||
private static final String NEARBY_STATION_URI = API_BASE
|
||||
+ "XSLT_DM_REQUEST"
|
||||
+ "?outputFormat=XML&coordOutputFormat=WGS84&type_dm=stop&name_dm=%s&itOptionsActive=1&ptOptionsActive=1&useProxFootSearch=1&mergeDep=1&useAllStops=1&mode=direct";
|
||||
|
||||
@Override
|
||||
protected String nearbyStationUri(final int stationId)
|
||||
{
|
||||
return String.format(NEARBY_STATION_URI, stationId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Location> autocompleteStations(final CharSequence constraint) throws IOException
|
||||
{
|
||||
|
|
|
@ -51,16 +51,6 @@ public class VrnProvider extends AbstractEfaProvider
|
|||
return false;
|
||||
}
|
||||
|
||||
private static final String NEARBY_STATION_URI = API_BASE
|
||||
+ "XSLT_DM_REQUEST"
|
||||
+ "?outputFormat=XML&coordOutputFormat=WGS84&type_dm=stop&name_dm=%s&itOptionsActive=1&ptOptionsActive=1&useProxFootSearch=1&mergeDep=1&useAllStops=1&mode=direct&deleteAssignedStop=0";
|
||||
|
||||
@Override
|
||||
protected String nearbyStationUri(final int stationId)
|
||||
{
|
||||
return String.format(NEARBY_STATION_URI, stationId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Location> autocompleteStations(final CharSequence constraint) throws IOException
|
||||
{
|
||||
|
|
|
@ -54,16 +54,6 @@ public class VrrProvider extends AbstractEfaProvider
|
|||
return false;
|
||||
}
|
||||
|
||||
private static final String NEARBY_STATION_URI = API_BASE
|
||||
+ "XSLT_DM_REQUEST"
|
||||
+ "?outputFormat=XML&coordOutputFormat=WGS84&type_dm=stop&name_dm=%s&itOptionsActive=1&ptOptionsActive=1&useProxFootSearch=1&mergeDep=1&useAllStops=1&mode=direct&deleteAssignedStop=0";
|
||||
|
||||
@Override
|
||||
protected String nearbyStationUri(final int stationId)
|
||||
{
|
||||
return String.format(NEARBY_STATION_URI, stationId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Location> autocompleteStations(final CharSequence constraint) throws IOException
|
||||
{
|
||||
|
|
|
@ -50,16 +50,6 @@ public class VrtProvider extends AbstractEfaProvider
|
|||
return false;
|
||||
}
|
||||
|
||||
private static final String NEARBY_STATION_URI = API_BASE
|
||||
+ "XSLT_DM_REQUEST"
|
||||
+ "?outputFormat=XML&coordOutputFormat=WGS84&type_dm=stop&name_dm=%s&itOptionsActive=1&ptOptionsActive=1&useProxFootSearch=1&mergeDep=1&useAllStops=1&mode=direct";
|
||||
|
||||
@Override
|
||||
protected String nearbyStationUri(final int stationId)
|
||||
{
|
||||
return String.format(NEARBY_STATION_URI, stationId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Location> autocompleteStations(final CharSequence constraint) throws IOException
|
||||
{
|
||||
|
|
|
@ -50,16 +50,6 @@ public class VvmProvider extends AbstractEfaProvider
|
|||
return false;
|
||||
}
|
||||
|
||||
private static final String NEARBY_STATION_URI = API_BASE
|
||||
+ "XSLT_DM_REQUEST"
|
||||
+ "?outputFormat=XML&coordOutputFormat=WGS84&type_dm=stop&name_dm=%s&itOptionsActive=1&ptOptionsActive=1&useProxFootSearch=1&mergeDep=1&useAllStops=1&mode=direct";
|
||||
|
||||
@Override
|
||||
protected String nearbyStationUri(final int stationId)
|
||||
{
|
||||
return String.format(NEARBY_STATION_URI, stationId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Location> autocompleteStations(final CharSequence constraint) throws IOException
|
||||
{
|
||||
|
|
|
@ -56,16 +56,6 @@ public class VvoProvider extends AbstractEfaProvider
|
|||
return false;
|
||||
}
|
||||
|
||||
private static final String NEARBY_STATION_URI = API_BASE
|
||||
+ "XSLT_DM_REQUEST"
|
||||
+ "?outputFormat=XML&coordOutputFormat=WGS84&type_dm=stop&name_dm=%s&itOptionsActive=1&ptOptionsActive=1&useProxFootSearch=1&mergeDep=1&useAllStops=1&mode=direct";
|
||||
|
||||
@Override
|
||||
protected String nearbyStationUri(final int stationId)
|
||||
{
|
||||
return String.format(NEARBY_STATION_URI, stationId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Location> autocompleteStations(final CharSequence constraint) throws IOException
|
||||
{
|
||||
|
|
|
@ -57,16 +57,6 @@ public class VvsProvider extends AbstractEfaProvider
|
|||
return false;
|
||||
}
|
||||
|
||||
private static final String NEARBY_STATION_URI = API_BASE
|
||||
+ "XSLT_DM_REQUEST"
|
||||
+ "?outputFormat=XML&coordOutputFormat=WGS84&type_dm=stop&name_dm=%s&itOptionsActive=1&ptOptionsActive=1&useProxFootSearch=1&mergeDep=1&useAllStops=1&mode=direct&deleteAssignedStop=0";
|
||||
|
||||
@Override
|
||||
protected String nearbyStationUri(final int stationId)
|
||||
{
|
||||
return String.format(NEARBY_STATION_URI, stationId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Location> autocompleteStations(final CharSequence constraint) throws IOException
|
||||
{
|
||||
|
|
|
@ -50,16 +50,6 @@ public class VvtProvider extends AbstractEfaProvider
|
|||
return false;
|
||||
}
|
||||
|
||||
private static final String NEARBY_STATION_URI = API_BASE
|
||||
+ "XSLT_DM_REQUEST"
|
||||
+ "?outputFormat=XML&coordOutputFormat=WGS84&type_dm=stop&name_dm=%s&itOptionsActive=1&ptOptionsActive=1&useProxFootSearch=1&mergeDep=1&useAllStops=1&mode=direct";
|
||||
|
||||
@Override
|
||||
protected String nearbyStationUri(final int stationId)
|
||||
{
|
||||
return String.format(NEARBY_STATION_URI, stationId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Location> autocompleteStations(final CharSequence constraint) throws IOException
|
||||
{
|
||||
|
|
|
@ -42,7 +42,7 @@ public class MvgProviderLiveTest
|
|||
@Test
|
||||
public void nearbyStations() throws Exception
|
||||
{
|
||||
final NearbyStationsResult result = provider.queryNearbyStations(new Location(LocationType.STATION, 3), 0, 0);
|
||||
final NearbyStationsResult result = provider.queryNearbyStations(new Location(LocationType.STATION, 24200006), 0, 0);
|
||||
|
||||
System.out.println(result.stations.size() + " " + result.stations);
|
||||
}
|
||||
|
|
|
@ -42,7 +42,7 @@ public class VmvProviderLiveTest
|
|||
@Test
|
||||
public void nearbyStations() throws Exception
|
||||
{
|
||||
final NearbyStationsResult result = provider.queryNearbyStations(new Location(LocationType.STATION, 80001834), 0, 0);
|
||||
final NearbyStationsResult result = provider.queryNearbyStations(new Location(LocationType.STATION, 44402031), 0, 0);
|
||||
|
||||
System.out.println(result.stations.size() + " " + result.stations);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue