mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-15 00:50:31 +00:00
ZVV: Fix splitting of station names.
This commit is contained in:
parent
28dd2c8033
commit
03a3a387af
1 changed files with 7 additions and 4 deletions
|
@ -63,13 +63,16 @@ public class ZvvProvider extends AbstractHafasClientInterfaceProvider {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (final String place : PLACES) {
|
||||||
|
if (name.startsWith(place + " "))
|
||||||
|
return new String[] { place, name.substring(place.length() + 1) };
|
||||||
|
else if (name.startsWith(place + ", "))
|
||||||
|
return new String[] { place, name.substring(place.length() + 2) };
|
||||||
|
}
|
||||||
|
|
||||||
final Matcher m = P_SPLIT_NAME_FIRST_COMMA.matcher(name);
|
final Matcher m = P_SPLIT_NAME_FIRST_COMMA.matcher(name);
|
||||||
if (m.matches())
|
if (m.matches())
|
||||||
return new String[] { m.group(1), m.group(2) };
|
return new String[] { m.group(1), m.group(2) };
|
||||||
|
|
||||||
for (final String place : PLACES)
|
|
||||||
if (name.startsWith(place + " ") || name.startsWith(place + ","))
|
|
||||||
return new String[] { place, name.substring(place.length() + 1) };
|
|
||||||
return super.splitStationName(name);
|
return super.splitStationName(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue