fixed parsing of ids of footway destinations

git-svn-id: https://public-transport-enabler.googlecode.com/svn/trunk@45 0924bc21-9374-b0fa-ee44-9ff1593b38f0
This commit is contained in:
andreas.schildbach 2010-08-06 21:53:41 +00:00
parent 83c130696b
commit b8e80f3635

View file

@ -300,7 +300,8 @@ public final class VbbProvider implements NetworkProvider
+ "|" // + "|" //
+ "(\\d+) Min\\.[\n\\s]?" // footway + "(\\d+) Min\\.[\n\\s]?" // footway
+ "Fussweg\n?" // + "Fussweg\n?" //
+ ".*?(?:<strong>(.*?)</strong>|<a href=\".*?\">(\\w.*?)</a>).*?" // arrival + ".*?(?:<a href=\"/Fahrinfo.*?input=(\\d+)\">\n?" // arrivalId
+ "<strong>(.*?)</strong>|<a href=\"/Stadtplan.*?\">(\\w.*?)</a>).*?" // arrival
+ ").*?", Pattern.DOTALL); + ").*?", Pattern.DOTALL);
public GetConnectionDetailsResult getConnectionDetails(final String uri) throws IOException public GetConnectionDetailsResult getConnectionDetails(final String uri) throws IOException
@ -379,7 +380,9 @@ public final class VbbProvider implements NetworkProvider
} }
else else
{ {
final String arrival = ParserUtils.resolveEntities(selectNotNull(mDetFine.group(12), mDetFine.group(13))); final int arrivalId = Integer.parseInt(mDetFine.group(12));
final String arrival = ParserUtils.resolveEntities(selectNotNull(mDetFine.group(13), mDetFine.group(14)));
if (parts.size() > 0 && parts.get(parts.size() - 1) instanceof Connection.Footway) if (parts.size() > 0 && parts.get(parts.size() - 1) instanceof Connection.Footway)
{ {
@ -392,6 +395,7 @@ public final class VbbProvider implements NetworkProvider
} }
lastArrival = arrival; lastArrival = arrival;
lastArrivalId = arrivalId;
} }
} }
else else