mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-14 00:30:31 +00:00
Use common method for querying departures (Hafas).
This commit is contained in:
parent
f1d0f26de0
commit
fc91b8c7cb
26 changed files with 13 additions and 180 deletions
|
@ -415,6 +415,14 @@ public abstract class AbstractHafasProvider extends AbstractNetworkProvider
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public QueryDeparturesResult queryDepartures(final String stationId, final int maxDepartures, final boolean equivs) throws IOException
|
||||||
|
{
|
||||||
|
final StringBuilder uri = new StringBuilder(stationBoardEndpoint);
|
||||||
|
uri.append(xmlQueryDeparturesParameters(stationId));
|
||||||
|
|
||||||
|
return xmlQueryDepartures(uri.toString(), stationId);
|
||||||
|
}
|
||||||
|
|
||||||
protected StringBuilder xmlQueryDeparturesParameters(final String stationId)
|
protected StringBuilder xmlQueryDeparturesParameters(final String stationId)
|
||||||
{
|
{
|
||||||
final StringBuilder parameters = new StringBuilder();
|
final StringBuilder parameters = new StringBuilder();
|
||||||
|
|
|
@ -26,7 +26,6 @@ import de.schildbach.pte.dto.Location;
|
||||||
import de.schildbach.pte.dto.LocationType;
|
import de.schildbach.pte.dto.LocationType;
|
||||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||||
import de.schildbach.pte.dto.Product;
|
import de.schildbach.pte.dto.Product;
|
||||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Andreas Schildbach
|
* @author Andreas Schildbach
|
||||||
|
@ -151,14 +150,6 @@ public final class BahnProvider extends AbstractHafasProvider
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public QueryDeparturesResult queryDepartures(final String stationId, final int maxDepartures, final boolean equivs) throws IOException
|
|
||||||
{
|
|
||||||
final StringBuilder uri = new StringBuilder(stationBoardEndpoint);
|
|
||||||
uri.append(xmlQueryDeparturesParameters(stationId));
|
|
||||||
|
|
||||||
return xmlQueryDepartures(uri.toString(), stationId);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Collection<Product> defaultProducts()
|
public Collection<Product> defaultProducts()
|
||||||
{
|
{
|
||||||
|
|
|
@ -314,6 +314,7 @@ public final class BvgProvider extends AbstractHafasProvider
|
||||||
private static final Pattern P_DEPARTURES_LIVE_ERRORS = Pattern.compile("(Haltestelle:)|(Wartungsgründen|nur eingeschränkt)",
|
private static final Pattern P_DEPARTURES_LIVE_ERRORS = Pattern.compile("(Haltestelle:)|(Wartungsgründen|nur eingeschränkt)",
|
||||||
Pattern.CASE_INSENSITIVE);
|
Pattern.CASE_INSENSITIVE);
|
||||||
|
|
||||||
|
@Override
|
||||||
public QueryDeparturesResult queryDepartures(final String stationId, final int maxDepartures, final boolean equivs) throws IOException
|
public QueryDeparturesResult queryDepartures(final String stationId, final int maxDepartures, final boolean equivs) throws IOException
|
||||||
{
|
{
|
||||||
final ResultHeader header = new ResultHeader(SERVER_PRODUCT);
|
final ResultHeader header = new ResultHeader(SERVER_PRODUCT);
|
||||||
|
|
|
@ -24,7 +24,6 @@ import de.schildbach.pte.dto.Location;
|
||||||
import de.schildbach.pte.dto.LocationType;
|
import de.schildbach.pte.dto.LocationType;
|
||||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||||
import de.schildbach.pte.dto.Product;
|
import de.schildbach.pte.dto.Product;
|
||||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Andreas Schildbach
|
* @author Andreas Schildbach
|
||||||
|
@ -154,14 +153,6 @@ public class DsbProvider extends AbstractHafasProvider
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public QueryDeparturesResult queryDepartures(final String stationId, final int maxDepartures, final boolean equivs) throws IOException
|
|
||||||
{
|
|
||||||
final StringBuilder uri = new StringBuilder(stationBoardEndpoint);
|
|
||||||
uri.append(xmlQueryDeparturesParameters(stationId));
|
|
||||||
|
|
||||||
return xmlQueryDepartures(uri.toString(), stationId);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Collection<Product> defaultProducts()
|
public Collection<Product> defaultProducts()
|
||||||
{
|
{
|
||||||
|
|
|
@ -29,7 +29,6 @@ import de.schildbach.pte.dto.Location;
|
||||||
import de.schildbach.pte.dto.LocationType;
|
import de.schildbach.pte.dto.LocationType;
|
||||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||||
import de.schildbach.pte.dto.Product;
|
import de.schildbach.pte.dto.Product;
|
||||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
|
||||||
import de.schildbach.pte.dto.QueryTripsContext;
|
import de.schildbach.pte.dto.QueryTripsContext;
|
||||||
import de.schildbach.pte.dto.QueryTripsResult;
|
import de.schildbach.pte.dto.QueryTripsResult;
|
||||||
|
|
||||||
|
@ -121,14 +120,6 @@ public class EireannProvider extends AbstractHafasProvider
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public QueryDeparturesResult queryDepartures(final String stationId, final int maxDepartures, final boolean equivs) throws IOException
|
|
||||||
{
|
|
||||||
final StringBuilder uri = new StringBuilder(stationBoardEndpoint);
|
|
||||||
uri.append(xmlQueryDeparturesParameters(stationId));
|
|
||||||
|
|
||||||
return xmlQueryDepartures(uri.toString(), stationId);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void appendCustomTripsQueryBinaryUri(final StringBuilder uri)
|
protected void appendCustomTripsQueryBinaryUri(final StringBuilder uri)
|
||||||
{
|
{
|
||||||
|
|
|
@ -162,6 +162,7 @@ public class InvgProvider extends AbstractHafasProvider
|
||||||
+ "(?:<td class=\"center sepline top\">\n(" + ParserUtils.P_PLATFORM + ").*?)?" // position
|
+ "(?:<td class=\"center sepline top\">\n(" + ParserUtils.P_PLATFORM + ").*?)?" // position
|
||||||
, Pattern.DOTALL);
|
, Pattern.DOTALL);
|
||||||
|
|
||||||
|
@Override
|
||||||
public QueryDeparturesResult queryDepartures(final String stationId, final int maxDepartures, final boolean equivs) throws IOException
|
public QueryDeparturesResult queryDepartures(final String stationId, final int maxDepartures, final boolean equivs) throws IOException
|
||||||
{
|
{
|
||||||
final ResultHeader header = new ResultHeader(SERVER_PRODUCT);
|
final ResultHeader header = new ResultHeader(SERVER_PRODUCT);
|
||||||
|
|
|
@ -26,7 +26,6 @@ import de.schildbach.pte.dto.Location;
|
||||||
import de.schildbach.pte.dto.LocationType;
|
import de.schildbach.pte.dto.LocationType;
|
||||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||||
import de.schildbach.pte.dto.Product;
|
import de.schildbach.pte.dto.Product;
|
||||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Jesuralem? JET = Jerusalem Eternal Tours?
|
* Jesuralem? JET = Jerusalem Eternal Tours?
|
||||||
|
@ -130,14 +129,6 @@ public class JetProvider extends AbstractHafasProvider
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public QueryDeparturesResult queryDepartures(final String stationId, final int maxDepartures, final boolean equivs) throws IOException
|
|
||||||
{
|
|
||||||
final StringBuilder uri = new StringBuilder(stationBoardEndpoint);
|
|
||||||
uri.append(xmlQueryDeparturesParameters(stationId));
|
|
||||||
|
|
||||||
return xmlQueryDepartures(uri.toString(), stationId);
|
|
||||||
}
|
|
||||||
|
|
||||||
private static final Pattern P_NORMALIZE_BUS = Pattern.compile("([א]?\\d{1,3})#");
|
private static final Pattern P_NORMALIZE_BUS = Pattern.compile("([א]?\\d{1,3})#");
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -23,7 +23,6 @@ import de.schildbach.pte.dto.Location;
|
||||||
import de.schildbach.pte.dto.LocationType;
|
import de.schildbach.pte.dto.LocationType;
|
||||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||||
import de.schildbach.pte.dto.Product;
|
import de.schildbach.pte.dto.Product;
|
||||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Andreas Schildbach
|
* @author Andreas Schildbach
|
||||||
|
@ -160,14 +159,6 @@ public class LuProvider extends AbstractHafasProvider
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public QueryDeparturesResult queryDepartures(final String stationId, final int maxDepartures, final boolean equivs) throws IOException
|
|
||||||
{
|
|
||||||
final StringBuilder uri = new StringBuilder(stationBoardEndpoint);
|
|
||||||
uri.append(xmlQueryDeparturesParameters(stationId));
|
|
||||||
|
|
||||||
return xmlQueryDepartures(uri.toString(), stationId);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected char normalizeType(final String type)
|
protected char normalizeType(final String type)
|
||||||
{
|
{
|
||||||
|
|
|
@ -23,7 +23,6 @@ import de.schildbach.pte.dto.Location;
|
||||||
import de.schildbach.pte.dto.LocationType;
|
import de.schildbach.pte.dto.LocationType;
|
||||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||||
import de.schildbach.pte.dto.Product;
|
import de.schildbach.pte.dto.Product;
|
||||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
|
||||||
import de.schildbach.pte.util.StringReplaceReader;
|
import de.schildbach.pte.util.StringReplaceReader;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -151,14 +150,6 @@ public class NasaProvider extends AbstractHafasProvider
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public QueryDeparturesResult queryDepartures(final String stationId, final int maxDepartures, final boolean equivs) throws IOException
|
|
||||||
{
|
|
||||||
final StringBuilder uri = new StringBuilder(stationBoardEndpoint);
|
|
||||||
uri.append(xmlQueryDeparturesParameters(stationId));
|
|
||||||
|
|
||||||
return xmlQueryDepartures(uri.toString(), stationId);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void addCustomReplaces(final StringReplaceReader reader)
|
protected void addCustomReplaces(final StringReplaceReader reader)
|
||||||
{
|
{
|
||||||
|
|
|
@ -26,7 +26,6 @@ import de.schildbach.pte.dto.Location;
|
||||||
import de.schildbach.pte.dto.LocationType;
|
import de.schildbach.pte.dto.LocationType;
|
||||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||||
import de.schildbach.pte.dto.Product;
|
import de.schildbach.pte.dto.Product;
|
||||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
|
||||||
import de.schildbach.pte.dto.QueryTripsContext;
|
import de.schildbach.pte.dto.QueryTripsContext;
|
||||||
import de.schildbach.pte.dto.QueryTripsResult;
|
import de.schildbach.pte.dto.QueryTripsResult;
|
||||||
|
|
||||||
|
@ -156,14 +155,6 @@ public class NriProvider extends AbstractHafasProvider
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public QueryDeparturesResult queryDepartures(final String stationId, final int maxDepartures, final boolean equivs) throws IOException
|
|
||||||
{
|
|
||||||
final StringBuilder uri = new StringBuilder(stationBoardEndpoint);
|
|
||||||
uri.append(xmlQueryDeparturesParameters(stationId));
|
|
||||||
|
|
||||||
return xmlQueryDepartures(uri.toString(), stationId);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Collection<Product> defaultProducts()
|
public Collection<Product> defaultProducts()
|
||||||
{
|
{
|
||||||
|
|
|
@ -131,6 +131,7 @@ public class NsProvider extends AbstractHafasProvider
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public QueryDeparturesResult queryDepartures(final String stationId, final int maxDepartures, final boolean equivs) throws IOException
|
public QueryDeparturesResult queryDepartures(final String stationId, final int maxDepartures, final boolean equivs) throws IOException
|
||||||
{
|
{
|
||||||
throw new UnsupportedOperationException();
|
throw new UnsupportedOperationException();
|
||||||
|
|
|
@ -23,7 +23,6 @@ import de.schildbach.pte.dto.Location;
|
||||||
import de.schildbach.pte.dto.LocationType;
|
import de.schildbach.pte.dto.LocationType;
|
||||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||||
import de.schildbach.pte.dto.Product;
|
import de.schildbach.pte.dto.Product;
|
||||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
|
||||||
import de.schildbach.pte.util.StringReplaceReader;
|
import de.schildbach.pte.util.StringReplaceReader;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -173,14 +172,6 @@ public class NvvProvider extends AbstractHafasProvider
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public QueryDeparturesResult queryDepartures(final String stationId, final int maxDepartures, final boolean equivs) throws IOException
|
|
||||||
{
|
|
||||||
final StringBuilder uri = new StringBuilder(stationBoardEndpoint);
|
|
||||||
uri.append(xmlQueryDeparturesParameters(stationId));
|
|
||||||
|
|
||||||
return xmlQueryDepartures(uri.toString(), stationId);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void addCustomReplaces(final StringReplaceReader reader)
|
protected void addCustomReplaces(final StringReplaceReader reader)
|
||||||
{
|
{
|
||||||
|
|
|
@ -24,7 +24,6 @@ import de.schildbach.pte.dto.Location;
|
||||||
import de.schildbach.pte.dto.LocationType;
|
import de.schildbach.pte.dto.LocationType;
|
||||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||||
import de.schildbach.pte.dto.Product;
|
import de.schildbach.pte.dto.Product;
|
||||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Andreas Schildbach
|
* @author Andreas Schildbach
|
||||||
|
@ -163,14 +162,6 @@ public class OebbProvider extends AbstractHafasProvider
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public QueryDeparturesResult queryDepartures(final String stationId, final int maxDepartures, final boolean equivs) throws IOException
|
|
||||||
{
|
|
||||||
final StringBuilder uri = new StringBuilder(stationBoardEndpoint);
|
|
||||||
uri.append(xmlQueryDeparturesParameters(stationId));
|
|
||||||
|
|
||||||
return xmlQueryDepartures(uri.toString(), stationId);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Collection<Product> defaultProducts()
|
public Collection<Product> defaultProducts()
|
||||||
{
|
{
|
||||||
|
|
|
@ -24,7 +24,6 @@ import de.schildbach.pte.dto.Location;
|
||||||
import de.schildbach.pte.dto.LocationType;
|
import de.schildbach.pte.dto.LocationType;
|
||||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||||
import de.schildbach.pte.dto.Product;
|
import de.schildbach.pte.dto.Product;
|
||||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
|
||||||
import de.schildbach.pte.util.StringReplaceReader;
|
import de.schildbach.pte.util.StringReplaceReader;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -153,14 +152,6 @@ public class PlProvider extends AbstractHafasProvider
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public QueryDeparturesResult queryDepartures(final String stationId, final int maxDepartures, final boolean equivs) throws IOException
|
|
||||||
{
|
|
||||||
final StringBuilder uri = new StringBuilder(stationBoardEndpoint);
|
|
||||||
uri.append(xmlQueryDeparturesParameters(stationId));
|
|
||||||
|
|
||||||
return xmlQueryDepartures(uri.toString(), stationId);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void addCustomReplaces(final StringReplaceReader reader)
|
protected void addCustomReplaces(final StringReplaceReader reader)
|
||||||
{
|
{
|
||||||
|
|
|
@ -24,7 +24,6 @@ import de.schildbach.pte.dto.Location;
|
||||||
import de.schildbach.pte.dto.LocationType;
|
import de.schildbach.pte.dto.LocationType;
|
||||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||||
import de.schildbach.pte.dto.Product;
|
import de.schildbach.pte.dto.Product;
|
||||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Andreas Schildbach
|
* @author Andreas Schildbach
|
||||||
|
@ -121,14 +120,6 @@ public class RtProvider extends AbstractHafasProvider
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public QueryDeparturesResult queryDepartures(final String stationId, final int maxDepartures, final boolean equivs) throws IOException
|
|
||||||
{
|
|
||||||
final StringBuilder uri = new StringBuilder(stationBoardEndpoint);
|
|
||||||
uri.append(xmlQueryDeparturesParameters(stationId));
|
|
||||||
|
|
||||||
return xmlQueryDepartures(uri.toString(), stationId);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Collection<Product> defaultProducts()
|
public Collection<Product> defaultProducts()
|
||||||
{
|
{
|
||||||
|
|
|
@ -24,7 +24,6 @@ import de.schildbach.pte.dto.Location;
|
||||||
import de.schildbach.pte.dto.LocationType;
|
import de.schildbach.pte.dto.LocationType;
|
||||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||||
import de.schildbach.pte.dto.Product;
|
import de.schildbach.pte.dto.Product;
|
||||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Andreas Schildbach
|
* @author Andreas Schildbach
|
||||||
|
@ -142,14 +141,6 @@ public class SbbProvider extends AbstractHafasProvider
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public QueryDeparturesResult queryDepartures(final String stationId, final int maxDepartures, final boolean equivs) throws IOException
|
|
||||||
{
|
|
||||||
final StringBuilder uri = new StringBuilder(stationBoardEndpoint);
|
|
||||||
uri.append(xmlQueryDeparturesParameters(stationId));
|
|
||||||
|
|
||||||
return xmlQueryDepartures(uri.toString(), stationId);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Collection<Product> defaultProducts()
|
public Collection<Product> defaultProducts()
|
||||||
{
|
{
|
||||||
|
|
|
@ -27,7 +27,6 @@ import de.schildbach.pte.dto.Location;
|
||||||
import de.schildbach.pte.dto.LocationType;
|
import de.schildbach.pte.dto.LocationType;
|
||||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||||
import de.schildbach.pte.dto.Product;
|
import de.schildbach.pte.dto.Product;
|
||||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Andreas Schildbach
|
* @author Andreas Schildbach
|
||||||
|
@ -171,14 +170,6 @@ public class SeProvider extends AbstractHafasProvider
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public QueryDeparturesResult queryDepartures(final String stationId, final int maxDepartures, final boolean equivs) throws IOException
|
|
||||||
{
|
|
||||||
final StringBuilder uri = new StringBuilder(stationBoardEndpoint);
|
|
||||||
uri.append(xmlQueryDeparturesParameters(stationId));
|
|
||||||
|
|
||||||
return xmlQueryDepartures(uri.toString(), stationId);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Collection<Product> defaultProducts()
|
public Collection<Product> defaultProducts()
|
||||||
{
|
{
|
||||||
|
|
|
@ -183,6 +183,7 @@ public class SeptaProvider extends AbstractHafasProvider
|
||||||
+ "(?:<td class=\"center sepline top\">\n(" + ParserUtils.P_PLATFORM + ").*?)?" // position
|
+ "(?:<td class=\"center sepline top\">\n(" + ParserUtils.P_PLATFORM + ").*?)?" // position
|
||||||
, Pattern.DOTALL);
|
, Pattern.DOTALL);
|
||||||
|
|
||||||
|
@Override
|
||||||
public QueryDeparturesResult queryDepartures(final String stationId, final int maxDepartures, final boolean equivs) throws IOException
|
public QueryDeparturesResult queryDepartures(final String stationId, final int maxDepartures, final boolean equivs) throws IOException
|
||||||
{
|
{
|
||||||
final ResultHeader header = new ResultHeader(SERVER_PRODUCT);
|
final ResultHeader header = new ResultHeader(SERVER_PRODUCT);
|
||||||
|
|
|
@ -207,6 +207,7 @@ public class ShProvider extends AbstractHafasProvider
|
||||||
+ "(?:<td class=\"center sepline top\">\n(" + ParserUtils.P_PLATFORM + ").*?)?" // position
|
+ "(?:<td class=\"center sepline top\">\n(" + ParserUtils.P_PLATFORM + ").*?)?" // position
|
||||||
, Pattern.DOTALL);
|
, Pattern.DOTALL);
|
||||||
|
|
||||||
|
@Override
|
||||||
public QueryDeparturesResult queryDepartures(final String stationId, final int maxDepartures, final boolean equivs) throws IOException
|
public QueryDeparturesResult queryDepartures(final String stationId, final int maxDepartures, final boolean equivs) throws IOException
|
||||||
{
|
{
|
||||||
final ResultHeader header = new ResultHeader(SERVER_PRODUCT);
|
final ResultHeader header = new ResultHeader(SERVER_PRODUCT);
|
||||||
|
|
|
@ -24,7 +24,6 @@ import de.schildbach.pte.dto.Location;
|
||||||
import de.schildbach.pte.dto.LocationType;
|
import de.schildbach.pte.dto.LocationType;
|
||||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||||
import de.schildbach.pte.dto.Product;
|
import de.schildbach.pte.dto.Product;
|
||||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Andreas Schildbach
|
* @author Andreas Schildbach
|
||||||
|
@ -147,14 +146,6 @@ public class SncbProvider extends AbstractHafasProvider
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public QueryDeparturesResult queryDepartures(final String stationId, final int maxDepartures, final boolean equivs) throws IOException
|
|
||||||
{
|
|
||||||
final StringBuilder uri = new StringBuilder(stationBoardEndpoint);
|
|
||||||
uri.append(xmlQueryDeparturesParameters(stationId));
|
|
||||||
|
|
||||||
return xmlQueryDepartures(uri.toString(), stationId);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Collection<Product> defaultProducts()
|
public Collection<Product> defaultProducts()
|
||||||
{
|
{
|
||||||
|
|
|
@ -28,7 +28,6 @@ import de.schildbach.pte.dto.Location;
|
||||||
import de.schildbach.pte.dto.LocationType;
|
import de.schildbach.pte.dto.LocationType;
|
||||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||||
import de.schildbach.pte.dto.Product;
|
import de.schildbach.pte.dto.Product;
|
||||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
|
||||||
import de.schildbach.pte.dto.Style;
|
import de.schildbach.pte.dto.Style;
|
||||||
import de.schildbach.pte.dto.Style.Shape;
|
import de.schildbach.pte.dto.Style.Shape;
|
||||||
|
|
||||||
|
@ -159,14 +158,6 @@ public class StockholmProvider extends AbstractHafasProvider
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public QueryDeparturesResult queryDepartures(final String stationId, final int maxDepartures, final boolean equivs) throws IOException
|
|
||||||
{
|
|
||||||
final StringBuilder uri = new StringBuilder(stationBoardEndpoint);
|
|
||||||
uri.append(xmlQueryDeparturesParameters(stationId));
|
|
||||||
|
|
||||||
return xmlQueryDepartures(uri.toString(), stationId);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void appendCustomTripsQueryBinaryUri(final StringBuilder uri)
|
protected void appendCustomTripsQueryBinaryUri(final StringBuilder uri)
|
||||||
{
|
{
|
||||||
|
|
|
@ -29,7 +29,6 @@ import de.schildbach.pte.dto.Location;
|
||||||
import de.schildbach.pte.dto.LocationType;
|
import de.schildbach.pte.dto.LocationType;
|
||||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||||
import de.schildbach.pte.dto.Product;
|
import de.schildbach.pte.dto.Product;
|
||||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Andreas Schildbach
|
* @author Andreas Schildbach
|
||||||
|
@ -169,14 +168,6 @@ public class VbbProvider extends AbstractHafasProvider
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public QueryDeparturesResult queryDepartures(final String stationId, final int maxDepartures, final boolean equivs) throws IOException
|
|
||||||
{
|
|
||||||
final StringBuilder uri = new StringBuilder(stationBoardEndpoint);
|
|
||||||
uri.append(xmlQueryDeparturesParameters(stationId));
|
|
||||||
|
|
||||||
return xmlQueryDepartures(uri.toString(), stationId);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Collection<Product> defaultProducts()
|
public Collection<Product> defaultProducts()
|
||||||
{
|
{
|
||||||
|
|
|
@ -23,7 +23,6 @@ import de.schildbach.pte.dto.Location;
|
||||||
import de.schildbach.pte.dto.LocationType;
|
import de.schildbach.pte.dto.LocationType;
|
||||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||||
import de.schildbach.pte.dto.Product;
|
import de.schildbach.pte.dto.Product;
|
||||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Andreas Schildbach
|
* @author Andreas Schildbach
|
||||||
|
@ -135,14 +134,6 @@ public class VbnProvider extends AbstractHafasProvider
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public QueryDeparturesResult queryDepartures(final String stationId, final int maxDepartures, final boolean equivs) throws IOException
|
|
||||||
{
|
|
||||||
final StringBuilder uri = new StringBuilder(stationBoardEndpoint);
|
|
||||||
uri.append(xmlQueryDeparturesParameters(stationId));
|
|
||||||
|
|
||||||
return xmlQueryDepartures(uri.toString(), stationId);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected char normalizeType(final String type)
|
protected char normalizeType(final String type)
|
||||||
{
|
{
|
||||||
|
|
|
@ -23,7 +23,6 @@ import de.schildbach.pte.dto.Location;
|
||||||
import de.schildbach.pte.dto.LocationType;
|
import de.schildbach.pte.dto.LocationType;
|
||||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||||
import de.schildbach.pte.dto.Product;
|
import de.schildbach.pte.dto.Product;
|
||||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Andreas Schildbach
|
* @author Andreas Schildbach
|
||||||
|
@ -137,12 +136,4 @@ public class VgsProvider extends AbstractHafasProvider
|
||||||
throw new IllegalArgumentException("cannot handle: " + location);
|
throw new IllegalArgumentException("cannot handle: " + location);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public QueryDeparturesResult queryDepartures(final String stationId, final int maxDepartures, final boolean equivs) throws IOException
|
|
||||||
{
|
|
||||||
final StringBuilder uri = new StringBuilder(stationBoardEndpoint);
|
|
||||||
uri.append(xmlQueryDeparturesParameters(stationId));
|
|
||||||
|
|
||||||
return xmlQueryDepartures(uri.toString(), stationId);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,7 +23,6 @@ import de.schildbach.pte.dto.Location;
|
||||||
import de.schildbach.pte.dto.LocationType;
|
import de.schildbach.pte.dto.LocationType;
|
||||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||||
import de.schildbach.pte.dto.Product;
|
import de.schildbach.pte.dto.Product;
|
||||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Andreas Schildbach
|
* @author Andreas Schildbach
|
||||||
|
@ -156,14 +155,6 @@ public class VsnProvider extends AbstractHafasProvider
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public QueryDeparturesResult queryDepartures(final String stationId, final int maxDepartures, final boolean equivs) throws IOException
|
|
||||||
{
|
|
||||||
final StringBuilder uri = new StringBuilder(stationBoardEndpoint);
|
|
||||||
uri.append(xmlQueryDeparturesParameters(stationId));
|
|
||||||
|
|
||||||
return xmlQueryDepartures(uri.toString(), stationId);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected char normalizeType(final String type)
|
protected char normalizeType(final String type)
|
||||||
{
|
{
|
||||||
|
|
|
@ -27,7 +27,6 @@ import de.schildbach.pte.dto.Location;
|
||||||
import de.schildbach.pte.dto.LocationType;
|
import de.schildbach.pte.dto.LocationType;
|
||||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||||
import de.schildbach.pte.dto.Product;
|
import de.schildbach.pte.dto.Product;
|
||||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
|
||||||
import de.schildbach.pte.dto.Style;
|
import de.schildbach.pte.dto.Style;
|
||||||
import de.schildbach.pte.dto.Style.Shape;
|
import de.schildbach.pte.dto.Style.Shape;
|
||||||
|
|
||||||
|
@ -183,14 +182,6 @@ public class ZvvProvider extends AbstractHafasProvider
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public QueryDeparturesResult queryDepartures(final String stationId, final int maxDepartures, final boolean equivs) throws IOException
|
|
||||||
{
|
|
||||||
final StringBuilder uri = new StringBuilder(stationBoardEndpoint);
|
|
||||||
uri.append(xmlQueryDeparturesParameters(stationId));
|
|
||||||
|
|
||||||
return xmlQueryDepartures(uri.toString(), stationId);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Line parseLineAndType(final String lineAndType)
|
protected Line parseLineAndType(final String lineAndType)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue