Hafas: Declare individual product map for each provider, rather than implementing intToProduct() and setProductBits().

This commit is contained in:
Andreas Schildbach 2015-02-14 21:26:00 +01:00
parent 5048e826dc
commit fb6e71ee2b
27 changed files with 136 additions and 1676 deletions

View file

@ -60,14 +60,13 @@ import de.schildbach.pte.util.ParserUtils;
public class InvgProvider extends AbstractHafasProvider
{
private static final String API_BASE = "http://fpa.invg.de/bin/";
// http://invg.hafas.de/bin/
private static final Product[] PRODUCTS_MAP = { null, null, null, null, null, null, null, null, null, null };
private static final long PARSER_DAY_ROLLOVER_THRESHOLD_MS = 12 * 60 * 60 * 1000;
public InvgProvider()
{
super(NetworkId.INVG, API_BASE + "stboard.exe/dn", API_BASE + "ajax-getstop.exe/dn", API_BASE + "query.exe/dn", 10, Charsets.UTF_8);
super(NetworkId.INVG, API_BASE + "stboard.exe/dn", API_BASE + "ajax-getstop.exe/dn", API_BASE + "query.exe/dn", PRODUCTS_MAP, Charsets.UTF_8);
setStationBoardCanDoEquivs(false);
setStyles(STYLES);
@ -83,12 +82,6 @@ public class InvgProvider extends AbstractHafasProvider
return super.hasCapability(capability);
}
@Override
protected void setProductBits(final StringBuilder productBits, final Product product)
{
throw new UnsupportedOperationException();
}
private static final String[] PLACES = { "Ingolstadt", "München" };
@Override