mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-19 00:39:58 +00:00
parse 'unresolvable address'
git-svn-id: https://public-transport-enabler.googlecode.com/svn/trunk@350 0924bc21-9374-b0fa-ee44-9ff1593b38f0
This commit is contained in:
parent
5e82b7ccf8
commit
0a148cef5c
4 changed files with 15 additions and 8 deletions
|
@ -157,7 +157,8 @@ public class RmvProvider extends AbstractHafasProvider
|
|||
private static final Pattern P_ADDRESSES = Pattern.compile(
|
||||
"<span class=\"tplight\">.*?<a href=\"http://www.rmv.de/auskunft/bin/jp/query.exe/dox.*?\">\\s*(.*?)\\s*</a>.*?</span>", Pattern.DOTALL);
|
||||
private static final Pattern P_CHECK_CONNECTIONS_ERROR = Pattern.compile(
|
||||
"(mehrfach vorhanden oder identisch)|(keine Verbindung gefunden werden)|(derzeit nur Auskünfte vom)", Pattern.CASE_INSENSITIVE);
|
||||
"(mehrfach vorhanden oder identisch)|(keine geeigneten Haltestellen)|(keine Verbindung gefunden)|(derzeit nur Auskünfte vom)",
|
||||
Pattern.CASE_INSENSITIVE);
|
||||
|
||||
@Override
|
||||
public QueryConnectionsResult queryConnections(final Location from, final Location via, final Location to, final Date date, final boolean dep,
|
||||
|
@ -172,8 +173,10 @@ public class RmvProvider extends AbstractHafasProvider
|
|||
if (mError.group(1) != null)
|
||||
return QueryConnectionsResult.TOO_CLOSE;
|
||||
if (mError.group(2) != null)
|
||||
return QueryConnectionsResult.NO_CONNECTIONS;
|
||||
return QueryConnectionsResult.UNRESOLVABLE_ADDRESS;
|
||||
if (mError.group(3) != null)
|
||||
return QueryConnectionsResult.NO_CONNECTIONS;
|
||||
if (mError.group(4) != null)
|
||||
return QueryConnectionsResult.INVALID_DATE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue