mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-07 14:58: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
|
||||
destinationId = 0;
|
||||
|
||||
final Line prodLine = parseLineAndType(prod);
|
||||
final Line line;
|
||||
if (classStr != null)
|
||||
{
|
||||
final char classChar = intToProduct(Integer.parseInt(classStr));
|
||||
final Matcher m = P_NORMALIZE_LINE.matcher(prod);
|
||||
final String lineStr;
|
||||
if (m.matches())
|
||||
lineStr = classChar + m.group(1) + m.group(2);
|
||||
else
|
||||
lineStr = classChar + prod;
|
||||
line = new Line(null, lineStr, lineStr != null ? lineStyle(lineStr) : null);
|
||||
if (classChar == 0)
|
||||
throw new IllegalArgumentException();
|
||||
// could check for type consistency here
|
||||
final String lineStr = classChar + prodLine.label.substring(1);
|
||||
line = new Line(null, lineStr, lineStyle(lineStr));
|
||||
}
|
||||
else
|
||||
{
|
||||
line = normalizeLine(prod);
|
||||
line = prodLine;
|
||||
}
|
||||
|
||||
final int[] capacity;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue