mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-07 22:58:49 +00:00
line with just numbers
git-svn-id: https://public-transport-enabler.googlecode.com/svn/trunk@830 0924bc21-9374-b0fa-ee44-9ff1593b38f0
This commit is contained in:
parent
40b46a4c14
commit
e29c0eb649
1 changed files with 13 additions and 0 deletions
|
@ -19,7 +19,9 @@ package de.schildbach.pte;
|
|||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import de.schildbach.pte.dto.Line;
|
||||
import de.schildbach.pte.dto.Location;
|
||||
import de.schildbach.pte.dto.LocationType;
|
||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||
|
@ -142,6 +144,17 @@ public class NasaProvider extends AbstractHafasProvider
|
|||
return xmlMLcReq(constraint);
|
||||
}
|
||||
|
||||
private static final Pattern P_LINE_NUMBER = Pattern.compile("\\d{4,}");
|
||||
|
||||
@Override
|
||||
protected Line normalizeLine(final String line)
|
||||
{
|
||||
if (P_LINE_NUMBER.matcher(line).matches())
|
||||
return newLine('?' + line);
|
||||
|
||||
return super.normalizeLine(line);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected char normalizeType(String type)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue