mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-19 00:39:58 +00:00
Location now has constructor without geo coordinates
git-svn-id: https://public-transport-enabler.googlecode.com/svn/trunk@417 0924bc21-9374-b0fa-ee44-9ff1593b38f0
This commit is contained in:
parent
a26e762a6b
commit
e2b9bc96a9
23 changed files with 114 additions and 98 deletions
|
@ -43,6 +43,9 @@ import de.schildbach.pte.dto.QueryDeparturesResult.Status;
|
|||
import de.schildbach.pte.exception.SessionExpiredException;
|
||||
import de.schildbach.pte.util.ParserUtils;
|
||||
|
||||
/**
|
||||
* @author Andreas Schildbach
|
||||
*/
|
||||
public class OebbProvider extends AbstractHafasProvider
|
||||
{
|
||||
public static final NetworkId NETWORK_ID = NetworkId.OEBB;
|
||||
|
@ -250,7 +253,7 @@ public class OebbProvider extends AbstractHafasProvider
|
|||
{
|
||||
final String address = ParserUtils.resolveEntities(mAddresses.group(1)).trim();
|
||||
if (!addresses.contains(address))
|
||||
addresses.add(new Location(LocationType.ANY, 0, 0, 0, address + "!"));
|
||||
addresses.add(new Location(LocationType.ANY, 0, address + "!"));
|
||||
}
|
||||
|
||||
if (type.equals("REQ0JourneyStopsS0K"))
|
||||
|
@ -351,8 +354,8 @@ public class OebbProvider extends AbstractHafasProvider
|
|||
final Matcher mHead = P_CONNECTIONS_HEAD.matcher(page);
|
||||
if (mHead.matches())
|
||||
{
|
||||
final Location from = new Location(LocationType.ANY, 0, 0, 0, ParserUtils.resolveEntities(mHead.group(1)));
|
||||
final Location to = new Location(LocationType.ANY, 0, 0, 0, ParserUtils.resolveEntities(mHead.group(2)));
|
||||
final Location from = new Location(LocationType.ANY, 0, ParserUtils.resolveEntities(mHead.group(1)));
|
||||
final Location to = new Location(LocationType.ANY, 0, ParserUtils.resolveEntities(mHead.group(2)));
|
||||
final Date currentDate = ParserUtils.parseDate(mHead.group(3));
|
||||
final String linkEarlier = mHead.group(4) != null ? ParserUtils.resolveEntities(mHead.group(4)) : null;
|
||||
final String linkLater = mHead.group(5) != null ? ParserUtils.resolveEntities(mHead.group(5)) : null;
|
||||
|
@ -540,7 +543,7 @@ public class OebbProvider extends AbstractHafasProvider
|
|||
}
|
||||
}
|
||||
|
||||
return new QueryDeparturesResult(new Location(LocationType.STATION, locationId, 0, 0, location), departures, null);
|
||||
return new QueryDeparturesResult(new Location(LocationType.STATION, locationId, location), departures, null);
|
||||
}
|
||||
catch (final JSONException x)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue