mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-16 09:29:49 +00:00
handle API change of Norway departures
This commit is contained in:
parent
5a8d2444af
commit
f77d70b8db
1 changed files with 23 additions and 7 deletions
|
@ -20,7 +20,6 @@ package de.schildbach.pte;
|
|||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
import de.schildbach.pte.dto.Line;
|
||||
import de.schildbach.pte.dto.Location;
|
||||
import de.schildbach.pte.dto.LocationType;
|
||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||
|
@ -54,6 +53,29 @@ public class NriProvider extends AbstractHafasProvider
|
|||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected char intToProduct(final int value)
|
||||
{
|
||||
if (value == 1) // Air
|
||||
return 'I';
|
||||
if (value == 2)
|
||||
return 'R';
|
||||
if (value == 4)
|
||||
return 'B';
|
||||
if (value == 8)
|
||||
return 'T';
|
||||
if (value == 16)
|
||||
return 'U';
|
||||
if (value == 32)
|
||||
return 'F';
|
||||
if (value == 64)
|
||||
return 'F';
|
||||
if (value == 128)
|
||||
return 'F';
|
||||
|
||||
throw new IllegalArgumentException("cannot handle: " + value);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void setProductBits(final StringBuilder productBits, final char product)
|
||||
{
|
||||
|
@ -164,12 +186,6 @@ public class NriProvider extends AbstractHafasProvider
|
|||
return jsonGetStops(uri);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Line parseLineAndType(final String line)
|
||||
{
|
||||
return parseLineWithoutType(line);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected char normalizeType(final String type)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue