mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-08 00:08:49 +00:00
xml departures always contain line#type
git-svn-id: https://public-transport-enabler.googlecode.com/svn/trunk@902 0924bc21-9374-b0fa-ee44-9ff1593b38f0
This commit is contained in:
parent
51962ad1bb
commit
a70b7a6fe5
1 changed files with 7 additions and 8 deletions
|
@ -626,21 +626,20 @@ public abstract class AbstractHafasProvider extends AbstractNetworkProvider
|
||||||
else
|
else
|
||||||
destinationId = 0;
|
destinationId = 0;
|
||||||
|
|
||||||
|
final Line prodLine = parseLineAndType(prod);
|
||||||
final Line line;
|
final Line line;
|
||||||
if (classStr != null)
|
if (classStr != null)
|
||||||
{
|
{
|
||||||
final char classChar = intToProduct(Integer.parseInt(classStr));
|
final char classChar = intToProduct(Integer.parseInt(classStr));
|
||||||
final Matcher m = P_NORMALIZE_LINE.matcher(prod);
|
if (classChar == 0)
|
||||||
final String lineStr;
|
throw new IllegalArgumentException();
|
||||||
if (m.matches())
|
// could check for type consistency here
|
||||||
lineStr = classChar + m.group(1) + m.group(2);
|
final String lineStr = classChar + prodLine.label.substring(1);
|
||||||
else
|
line = new Line(null, lineStr, lineStyle(lineStr));
|
||||||
lineStr = classChar + prod;
|
|
||||||
line = new Line(null, lineStr, lineStr != null ? lineStyle(lineStr) : null);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
line = normalizeLine(prod);
|
line = prodLine;
|
||||||
}
|
}
|
||||||
|
|
||||||
final int[] capacity;
|
final int[] capacity;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue