mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-13 08:10:46 +00:00
Use mobile trip endpoint for Baden-Württemberg, Constance & Basel. The standard endpoint doesn't serve intermediate stops.
This commit is contained in:
parent
98fa450220
commit
b031cfd2a8
1 changed files with 27 additions and 3 deletions
|
@ -17,23 +17,34 @@
|
||||||
|
|
||||||
package de.schildbach.pte;
|
package de.schildbach.pte;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
|
import de.schildbach.pte.dto.Location;
|
||||||
|
import de.schildbach.pte.dto.Product;
|
||||||
|
import de.schildbach.pte.dto.QueryTripsContext;
|
||||||
|
import de.schildbach.pte.dto.QueryTripsResult;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Andreas Schildbach
|
* @author Andreas Schildbach
|
||||||
*/
|
*/
|
||||||
public class NvbwProvider extends AbstractEfaProvider
|
public class NvbwProvider extends AbstractEfaProvider
|
||||||
{
|
{
|
||||||
public static final NetworkId NETWORK_ID = NetworkId.NVBW;
|
public static final NetworkId NETWORK_ID = NetworkId.NVBW;
|
||||||
private final static String API_BASE = "http://www.efa-bw.de/nvbw/";
|
private final static String API_BASE = "http://www.efa-bw.de/nvbw/"; // no intermeditate stops
|
||||||
|
private final static String API_BASE_MOBILE = "http://www.efa-bw.de/android/";
|
||||||
|
|
||||||
// http://www.efa-bw.de/android/
|
|
||||||
// http://efa2.naldo.de/naldo/
|
// http://efa2.naldo.de/naldo/
|
||||||
|
|
||||||
public NvbwProvider()
|
public NvbwProvider()
|
||||||
{
|
{
|
||||||
super(API_BASE);
|
super(API_BASE + DEFAULT_DEPARTURE_MONITOR_ENDPOINT, API_BASE_MOBILE + DEFAULT_TRIP_ENDPOINT, API_BASE + DEFAULT_STOPFINDER_ENDPOINT,
|
||||||
|
API_BASE + DEFAULT_COORD_ENDPOINT);
|
||||||
|
|
||||||
setIncludeRegionId(false);
|
setIncludeRegionId(false);
|
||||||
setUseRouteIndexAsTripId(false);
|
setUseRouteIndexAsTripId(false);
|
||||||
|
setNumTripsRequested(12);
|
||||||
}
|
}
|
||||||
|
|
||||||
public NetworkId id()
|
public NetworkId id()
|
||||||
|
@ -77,4 +88,17 @@ public class NvbwProvider extends AbstractEfaProvider
|
||||||
|
|
||||||
return super.parseLine(mot, symbol, name, longName, trainType, trainNum, trainName);
|
return super.parseLine(mot, symbol, name, longName, trainType, trainNum, trainName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public QueryTripsResult queryTrips(final Location from, final Location via, final Location to, final Date date, final boolean dep,
|
||||||
|
final Set<Product> products, final WalkSpeed walkSpeed, final Accessibility accessibility, final Set<Option> options) throws IOException
|
||||||
|
{
|
||||||
|
return queryTripsMobile(from, via, to, date, dep, products, walkSpeed, accessibility, options);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public QueryTripsResult queryMoreTrips(final QueryTripsContext contextObj, final boolean later) throws IOException
|
||||||
|
{
|
||||||
|
return queryMoreTripsMobile(contextObj, later);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue