fixed LF in arrival

git-svn-id: https://public-transport-enabler.googlecode.com/svn/trunk@104 0924bc21-9374-b0fa-ee44-9ff1593b38f0
This commit is contained in:
andreas.schildbach 2010-08-25 09:05:37 +00:00
parent 672f13519f
commit c80b71743d
2 changed files with 12 additions and 2 deletions

View file

@ -193,7 +193,7 @@ public class OebbProvider implements NetworkProvider
private static final Pattern P_CONNECTION_DETAILS_FINE = Pattern.compile(".*?" //
+ "<td headers=\"hafasDTL\\d+_Stop\".*?>\n" //
+ "(?:<a href=\"http://fahrplan\\.oebb\\.at/bin/stboard\\.exe/dn.*?input=.*?%23(\\d+)&.*?>)?" // departureId
+ "([^<]*?)<.*?" // departure
+ "([^\n<]*).*?" // departure
+ "<td headers=\"hafasDTL\\d+_Date\".*?>\n(?:(\\d{2}\\.\\d{2}\\.\\d{2})|&nbsp;)\n</td>.*?" // departureDate
+ "<td headers=\"hafasDTL\\d+_TimeDep\".*?>(?:(\\d{2}:\\d{2})|&nbsp;)</td>.*?" // departureTime
+ "<td headers=\"hafasDTL\\d+_Platform\".*?>\\s*(?:&nbsp;|(.*?))\\s*</td>.*?" // departurePosition
@ -201,7 +201,7 @@ public class OebbProvider implements NetworkProvider
+ "(?:<a href=\"http://fahrplan\\.oebb\\.at/bin/traininfo\\.exe/dn.*?>(.*?)</a>.*?)?" // line
+ "<td headers=\"hafasDTL\\d+_Stop\".*?>\n" //
+ "(?:<a href=\"http://fahrplan\\.oebb\\.at/bin/stboard\\.exe/dn.*?input=.*?%23(\\d+)&.*?>)?" // arrivalId
+ "([^<]*?)<.*?" // arrival
+ "([^\n<]*).*?" // arrival
+ "<td headers=\"hafasDTL\\d+_Date\".*?>\n(?:(\\d{2}\\.\\d{2}\\.\\d{2})|&nbsp;)\n</td>.*?" // arrivalDate
+ "<td headers=\"hafasDTL\\d+_TimeDep\".*?>(?:(\\d{2}:\\d{2})|&nbsp;)</td>.*?" // arrivalTime
+ "<td headers=\"hafasDTL\\d+_Platform\".*?>\\s*(?:&nbsp;|(.*?))\\s*</td>.*?" // arrivalPosition

View file

@ -61,4 +61,14 @@ public class OebbProviderLiveTest
final QueryConnectionsResult moreResult = provider.queryMoreConnections(result.linkLater);
System.out.println(moreResult);
}
@Test
public void connectionWithFootway2() throws Exception
{
final QueryConnectionsResult result = provider.queryConnections(LocationType.ANY, "Wien, Krottenbachstraße 110!", null, null,
LocationType.ANY, "Wien, Meidlinger Hauptstraße 1!", new Date(), true);
System.out.println(result);
final QueryConnectionsResult moreResult = provider.queryMoreConnections(result.linkLater);
System.out.println(moreResult);
}
}