mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-19 16:59:51 +00:00
Migrate from using char as a product type to Product enum. Line labels are really just the label and can be null.
This commit is contained in:
parent
7cb4e8fb06
commit
883015177e
52 changed files with 1216 additions and 1238 deletions
|
@ -17,6 +17,9 @@
|
|||
|
||||
package de.schildbach.pte;
|
||||
|
||||
import de.schildbach.pte.dto.Line;
|
||||
import de.schildbach.pte.dto.Product;
|
||||
|
||||
/**
|
||||
* @author Andreas Schildbach
|
||||
*/
|
||||
|
@ -38,15 +41,15 @@ public class VrnProvider extends AbstractEfaProvider
|
|||
}
|
||||
|
||||
@Override
|
||||
protected String parseLine(final String mot, final String symbol, final String name, final String longName, final String trainType,
|
||||
final String trainNum, final String trainName)
|
||||
protected Line parseLine(final String id, final String mot, final String symbol, final String name, final String longName,
|
||||
final String trainType, final String trainNum, final String trainName)
|
||||
{
|
||||
if ("0".equals(mot))
|
||||
{
|
||||
if ("InterRegio".equals(longName) && symbol == null)
|
||||
return "RIR";
|
||||
return new Line(id, Product.REGIONAL_TRAIN, "IR");
|
||||
}
|
||||
|
||||
return super.parseLine(mot, symbol, name, longName, trainType, trainNum, trainName);
|
||||
return super.parseLine(id, mot, symbol, name, longName, trainType, trainNum, trainName);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue