mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-20 17:29:51 +00:00
separate Nacht-S-Bahn from S-Bahn
git-svn-id: https://public-transport-enabler.googlecode.com/svn/trunk@359 0924bc21-9374-b0fa-ee44-9ff1593b38f0
This commit is contained in:
parent
f50dbbe78d
commit
caf4ea9c87
1 changed files with 4 additions and 1 deletions
|
@ -583,7 +583,8 @@ public abstract class AbstractHafasProvider implements NetworkProvider
|
|||
throw new IllegalArgumentException(location.type.toString());
|
||||
}
|
||||
|
||||
private static final Pattern P_LINE_S = Pattern.compile("SN?\\d+");
|
||||
private static final Pattern P_LINE_S = Pattern.compile("S\\d+");
|
||||
private static final Pattern P_LINE_SN = Pattern.compile("SN\\d*");
|
||||
|
||||
private final String _normalizeLine(final String type, final String name, final String longCategory)
|
||||
{
|
||||
|
@ -648,6 +649,8 @@ public abstract class AbstractHafasProvider implements NetworkProvider
|
|||
return "S" + normalizedName;
|
||||
if (P_LINE_S.matcher(normalizedType).matches()) // diverse S-Bahnen
|
||||
return "S" + normalizedType;
|
||||
if (P_LINE_SN.matcher(normalizedType).matches()) // Nacht-S-Bahn
|
||||
return "S" + normalizedType;
|
||||
|
||||
if ("Met".equals(normalizedType)) // Metro
|
||||
return "U" + normalizedName;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue