mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-19 08:49:58 +00:00
fixed parsing connections for Switzerland, ambiguous still missing
git-svn-id: https://public-transport-enabler.googlecode.com/svn/trunk@293 0924bc21-9374-b0fa-ee44-9ff1593b38f0
This commit is contained in:
parent
8a6b2a9ae3
commit
0a773096f0
8 changed files with 179 additions and 414 deletions
|
@ -214,6 +214,17 @@ public abstract class AbstractHafasProvider implements NetworkProvider
|
|||
return 0;
|
||||
}
|
||||
|
||||
private static final Pattern P_CONNECTION_ID = Pattern.compile("co=(C\\d+-\\d+)&");
|
||||
|
||||
protected static String extractConnectionId(final String link)
|
||||
{
|
||||
final Matcher m = P_CONNECTION_ID.matcher(link);
|
||||
if (m.find())
|
||||
return m.group(1);
|
||||
else
|
||||
throw new IllegalArgumentException("cannot extract id from " + link);
|
||||
}
|
||||
|
||||
private static final Map<Character, int[]> LINES = new HashMap<Character, int[]>();
|
||||
|
||||
static
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue