mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-16 09:29:49 +00:00
Hafas: Improve on splitting place and name for lots of networks.
This commit is contained in:
parent
b596ba6f3a
commit
540535b7d5
24 changed files with 372 additions and 134 deletions
|
@ -26,7 +26,6 @@ import java.io.InputStreamReader;
|
|||
import java.io.Reader;
|
||||
import java.nio.charset.Charset;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Calendar;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
|
@ -247,15 +246,17 @@ public abstract class AbstractHafasProvider extends AbstractNetworkProvider
|
|||
|
||||
protected abstract void setProductBits(StringBuilder productBits, Product product);
|
||||
|
||||
private static final Pattern P_SPLIT_ADDRESS = Pattern.compile("(\\d{4,5}\\s+[^,]+),\\s+(.*)");
|
||||
protected static final Pattern P_SPLIT_NAME_FIRST_COMMA = Pattern.compile("([^,]*), (.*)");
|
||||
protected static final Pattern P_SPLIT_NAME_LAST_COMMA = Pattern.compile("(.*), ([^,]*)");
|
||||
|
||||
protected String[] splitPlaceAndName(final String name)
|
||||
protected String[] splitStationName(final String name)
|
||||
{
|
||||
final Matcher matcher = P_SPLIT_ADDRESS.matcher(name);
|
||||
if (matcher.matches())
|
||||
return new String[] { matcher.group(1), matcher.group(2) };
|
||||
else
|
||||
return new String[] { null, name };
|
||||
return new String[] { null, name };
|
||||
}
|
||||
|
||||
protected String[] splitAddress(final String address)
|
||||
{
|
||||
return new String[] { null, address };
|
||||
}
|
||||
|
||||
private final String wrapReqC(final CharSequence request, final Charset encoding)
|
||||
|
@ -276,7 +277,7 @@ public abstract class AbstractHafasProvider extends AbstractNetworkProvider
|
|||
final int x = Integer.parseInt(pp.getAttributeValue(null, "x"));
|
||||
final int y = Integer.parseInt(pp.getAttributeValue(null, "y"));
|
||||
|
||||
final String[] placeAndName = splitPlaceAndName(name);
|
||||
final String[] placeAndName = splitStationName(name);
|
||||
return new Location(LocationType.STATION, id, y, x, placeAndName[0], placeAndName[1]);
|
||||
}
|
||||
throw new IllegalStateException("cannot handle: " + type);
|
||||
|
@ -308,20 +309,22 @@ public abstract class AbstractHafasProvider extends AbstractNetworkProvider
|
|||
final int x = Integer.parseInt(pp.getAttributeValue(null, "x"));
|
||||
final int y = Integer.parseInt(pp.getAttributeValue(null, "y"));
|
||||
|
||||
final String[] placeAndName = splitPlaceAndName(name);
|
||||
final String[] placeAndName = splitAddress(name);
|
||||
return new Location(LocationType.ADDRESS, null, y, x, placeAndName[0], placeAndName[1]);
|
||||
}
|
||||
throw new IllegalStateException("cannot handle: " + type);
|
||||
}
|
||||
|
||||
private static final Location parseReqLoc(final XmlPullParser pp)
|
||||
private final Location parseReqLoc(final XmlPullParser pp)
|
||||
{
|
||||
final String type = pp.getName();
|
||||
if ("ReqLoc".equals(type))
|
||||
{
|
||||
XmlPullUtil.requireAttr(pp, "type", "ADR");
|
||||
final String name = pp.getAttributeValue(null, "output").trim();
|
||||
return new Location(LocationType.ADDRESS, null, null, name);
|
||||
|
||||
final String[] placeAndName = splitAddress(name);
|
||||
return new Location(LocationType.ADDRESS, null, placeAndName[0], placeAndName[1]);
|
||||
}
|
||||
throw new IllegalStateException("cannot handle: " + type);
|
||||
}
|
||||
|
@ -396,12 +399,12 @@ public abstract class AbstractHafasProvider extends AbstractNetworkProvider
|
|||
|
||||
if (type == 1) // station
|
||||
{
|
||||
final String[] placeAndName = splitPlaceAndName(value);
|
||||
final String[] placeAndName = splitStationName(value);
|
||||
location = new Location(LocationType.STATION, localId, lat, lon, placeAndName[0], placeAndName[1]);
|
||||
}
|
||||
else if (type == 2) // address
|
||||
{
|
||||
final String[] placeAndName = splitPlaceAndName(value);
|
||||
final String[] placeAndName = splitAddress(value);
|
||||
location = new Location(LocationType.ADDRESS, null, lat, lon, placeAndName[0], placeAndName[1]);
|
||||
}
|
||||
else if (type == 4) // poi
|
||||
|
@ -410,7 +413,8 @@ public abstract class AbstractHafasProvider extends AbstractNetworkProvider
|
|||
}
|
||||
else if (type == 128) // crossing
|
||||
{
|
||||
location = new Location(LocationType.ADDRESS, localId, lat, lon, null, value);
|
||||
final String[] placeAndName = splitAddress(value);
|
||||
location = new Location(LocationType.ADDRESS, localId, lat, lon, placeAndName[0], placeAndName[1]);
|
||||
}
|
||||
else if (type == 87)
|
||||
{
|
||||
|
@ -552,7 +556,7 @@ public abstract class AbstractHafasProvider extends AbstractNetworkProvider
|
|||
|
||||
final String name = XmlPullUtil.attr(pp, "name");
|
||||
if (name != null)
|
||||
stationPlaceAndName = splitPlaceAndName(name.trim());
|
||||
stationPlaceAndName = splitStationName(name.trim());
|
||||
}
|
||||
XmlPullUtil.requireSkip(pp, "St");
|
||||
}
|
||||
|
@ -624,23 +628,24 @@ public abstract class AbstractHafasProvider extends AbstractNetworkProvider
|
|||
|
||||
final Position position = platform != null ? new Position("Gl. " + ParserUtils.resolveEntities(platform)) : null;
|
||||
|
||||
final String[] destinationPlaceAndName;
|
||||
final String destinationName;
|
||||
if (dir != null)
|
||||
destinationPlaceAndName = splitPlaceAndName(dir.trim());
|
||||
destinationName = dir.trim();
|
||||
else if (targetLoc != null)
|
||||
destinationPlaceAndName = splitPlaceAndName(targetLoc.trim());
|
||||
destinationName = targetLoc.trim();
|
||||
else
|
||||
destinationPlaceAndName = null;
|
||||
destinationName = null;
|
||||
|
||||
final String destinationId;
|
||||
final Location destination;
|
||||
if (dirnr != null)
|
||||
destinationId = dirnr;
|
||||
{
|
||||
final String[] destinationPlaceAndName = splitStationName(destinationName);
|
||||
destination = new Location(LocationType.STATION, dirnr, destinationPlaceAndName[0], destinationPlaceAndName[1]);
|
||||
}
|
||||
else
|
||||
destinationId = null;
|
||||
|
||||
final Location destination = new Location(destinationId != null ? LocationType.STATION : LocationType.ANY, destinationId,
|
||||
destinationPlaceAndName != null ? destinationPlaceAndName[0] : null,
|
||||
destinationPlaceAndName != null ? destinationPlaceAndName[1] : null);
|
||||
{
|
||||
destination = new Location(LocationType.ANY, null, null, destinationName);
|
||||
}
|
||||
|
||||
final Line prodLine = parseLineAndType(prod);
|
||||
final Line line;
|
||||
|
@ -695,7 +700,7 @@ public abstract class AbstractHafasProvider extends AbstractNetworkProvider
|
|||
}
|
||||
else
|
||||
{
|
||||
final String[] depPlaceAndName = splitPlaceAndName(depStation);
|
||||
final String[] depPlaceAndName = splitStationName(depStation);
|
||||
location = new Location(LocationType.STATION, null, depPlaceAndName[0], depPlaceAndName[1]);
|
||||
}
|
||||
|
||||
|
@ -1076,7 +1081,7 @@ public abstract class AbstractHafasProvider extends AbstractNetworkProvider
|
|||
}
|
||||
else if ("DIRECTION".equals(attrName))
|
||||
{
|
||||
final String[] destinationPlaceAndName = splitPlaceAndName(attributeVariants.get("NORMAL"));
|
||||
final String[] destinationPlaceAndName = splitStationName(attributeVariants.get("NORMAL"));
|
||||
destination = new Location(LocationType.ANY, null, destinationPlaceAndName[0], destinationPlaceAndName[1]);
|
||||
}
|
||||
}
|
||||
|
@ -1980,7 +1985,7 @@ public abstract class AbstractHafasProvider extends AbstractNetworkProvider
|
|||
final Location direction;
|
||||
if (directionStr != null)
|
||||
{
|
||||
final String[] directionPlaceAndName = splitPlaceAndName(directionStr);
|
||||
final String[] directionPlaceAndName = splitStationName(directionStr);
|
||||
direction = new Location(LocationType.ANY, null, directionPlaceAndName[0], directionPlaceAndName[1]);
|
||||
}
|
||||
else
|
||||
|
@ -2076,22 +2081,30 @@ public abstract class AbstractHafasProvider extends AbstractNetworkProvider
|
|||
|
||||
private Location location(final LittleEndianDataInputStream is, final StringTable strings) throws IOException
|
||||
{
|
||||
final String[] placeAndName = splitPlaceAndName(strings.read(is));
|
||||
final String name = strings.read(is);
|
||||
is.readShort();
|
||||
final int type = is.readShortReverse();
|
||||
final LocationType locationType;
|
||||
if (type == 1)
|
||||
locationType = LocationType.STATION;
|
||||
else if (type == 2)
|
||||
locationType = LocationType.ADDRESS;
|
||||
else if (type == 3)
|
||||
locationType = LocationType.POI;
|
||||
else
|
||||
throw new IllegalStateException("unknown type: " + type + " " + Arrays.toString(placeAndName));
|
||||
final int lon = is.readIntReverse();
|
||||
final int lat = is.readIntReverse();
|
||||
|
||||
return new Location(locationType, null, lat, lon, placeAndName[0], placeAndName[1]);
|
||||
if (type == 1)
|
||||
{
|
||||
final String[] placeAndName = splitStationName(name);
|
||||
return new Location(LocationType.STATION, null, lat, lon, placeAndName[0], placeAndName[1]);
|
||||
}
|
||||
else if (type == 2)
|
||||
{
|
||||
final String[] placeAndName = splitAddress(name);
|
||||
return new Location(LocationType.ADDRESS, null, lat, lon, placeAndName[0], placeAndName[1]);
|
||||
}
|
||||
else if (type == 3)
|
||||
{
|
||||
return new Location(LocationType.POI, null, lat, lon, null, name);
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new IllegalStateException("unknown type: " + type + " " + name);
|
||||
}
|
||||
}
|
||||
|
||||
private long date(final LittleEndianDataInputStream is) throws IOException
|
||||
|
@ -2244,7 +2257,7 @@ public abstract class AbstractHafasProvider extends AbstractNetworkProvider
|
|||
|
||||
try
|
||||
{
|
||||
final String[] placeAndName = splitPlaceAndName(strings.read(stationInputStream));
|
||||
final String[] placeAndName = splitStationName(strings.read(stationInputStream));
|
||||
final int id = stationInputStream.readIntReverse();
|
||||
final int lon = stationInputStream.readIntReverse();
|
||||
final int lat = stationInputStream.readIntReverse();
|
||||
|
@ -2357,7 +2370,7 @@ public abstract class AbstractHafasProvider extends AbstractNetworkProvider
|
|||
parsedLat = 0;
|
||||
}
|
||||
|
||||
final String[] placeAndName = splitPlaceAndName(parsedName);
|
||||
final String[] placeAndName = splitStationName(parsedName);
|
||||
stations.add(new Location(LocationType.STATION, parsedId, parsedLat, parsedLon, placeAndName[0], placeAndName[1]));
|
||||
}
|
||||
else
|
||||
|
@ -2406,7 +2419,7 @@ public abstract class AbstractHafasProvider extends AbstractNetworkProvider
|
|||
|
||||
if (stopWeight != 0)
|
||||
{
|
||||
final String[] placeAndName = splitPlaceAndName(name);
|
||||
final String[] placeAndName = splitStationName(name);
|
||||
stations.add(new Location(LocationType.STATION, id, lat, lon, placeAndName[0], placeAndName[1]));
|
||||
}
|
||||
}
|
||||
|
@ -2474,7 +2487,7 @@ public abstract class AbstractHafasProvider extends AbstractNetworkProvider
|
|||
parsedLat = Integer.parseInt(mFineCoords.group(2));
|
||||
}
|
||||
|
||||
final String[] placeAndName = splitPlaceAndName(parsedName);
|
||||
final String[] placeAndName = splitStationName(parsedName);
|
||||
stations.add(new Location(LocationType.STATION, parsedId, parsedLat, parsedLon, placeAndName[0], placeAndName[1]));
|
||||
}
|
||||
else
|
||||
|
|
|
@ -124,6 +124,28 @@ public final class BahnProvider extends AbstractHafasProvider
|
|||
return Product.ALL;
|
||||
}
|
||||
|
||||
private static final Pattern P_SPLIT_NAME_ONE_COMMA = Pattern.compile("([^,]*), ([^,]*)");
|
||||
|
||||
@Override
|
||||
protected String[] splitStationName(final String name)
|
||||
{
|
||||
final Matcher mComma = P_SPLIT_NAME_ONE_COMMA.matcher(name);
|
||||
if (mComma.matches())
|
||||
return new String[] { mComma.group(2), mComma.group(1) };
|
||||
|
||||
return super.splitStationName(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String[] splitAddress(final String address)
|
||||
{
|
||||
final Matcher mComma = P_SPLIT_NAME_FIRST_COMMA.matcher(address);
|
||||
if (mComma.matches())
|
||||
return new String[] { mComma.group(1), mComma.group(2) };
|
||||
|
||||
return super.splitStationName(address);
|
||||
}
|
||||
|
||||
private static final Pattern P_NORMALIZE_LINE_NAME_TRAM = Pattern.compile("str\\s+(.*)", Pattern.CASE_INSENSITIVE);
|
||||
|
||||
@Override
|
||||
|
|
|
@ -120,10 +120,9 @@ public final class BvgProvider extends AbstractHafasProvider
|
|||
}
|
||||
|
||||
private static final Pattern P_SPLIT_NAME_PAREN = Pattern.compile("(.*?) +\\((.{4,}?)\\)(?: +\\((U|S|S\\+U)\\))?");
|
||||
private static final Pattern P_SPLIT_NAME_COMMA = Pattern.compile("([^,]*), ([^,]*)");
|
||||
|
||||
@Override
|
||||
protected String[] splitPlaceAndName(final String name)
|
||||
protected String[] splitStationName(final String name)
|
||||
{
|
||||
final Matcher mParen = P_SPLIT_NAME_PAREN.matcher(name);
|
||||
if (mParen.matches())
|
||||
|
@ -132,11 +131,21 @@ public final class BvgProvider extends AbstractHafasProvider
|
|||
return new String[] { mParen.group(2), mParen.group(1) + (su != null ? " (" + su + ")" : "") };
|
||||
}
|
||||
|
||||
final Matcher mComma = P_SPLIT_NAME_COMMA.matcher(name);
|
||||
final Matcher mComma = P_SPLIT_NAME_FIRST_COMMA.matcher(name);
|
||||
if (mComma.matches())
|
||||
return new String[] { mComma.group(1), mComma.group(2) };
|
||||
|
||||
return super.splitPlaceAndName(name);
|
||||
return super.splitStationName(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String[] splitAddress(final String address)
|
||||
{
|
||||
final Matcher mComma = P_SPLIT_NAME_FIRST_COMMA.matcher(address);
|
||||
if (mComma.matches())
|
||||
return new String[] { mComma.group(1), mComma.group(2) };
|
||||
|
||||
return super.splitStationName(address);
|
||||
}
|
||||
|
||||
private static final Pattern P_NORMALIZE_LINE_NAME_TRAM = Pattern.compile("(?:tra|tram)\\s+(.*)", Pattern.CASE_INSENSITIVE);
|
||||
|
|
|
@ -18,6 +18,8 @@
|
|||
package de.schildbach.pte;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import de.schildbach.pte.dto.Product;
|
||||
|
||||
|
@ -120,6 +122,18 @@ public class DsbProvider extends AbstractHafasProvider
|
|||
}
|
||||
}
|
||||
|
||||
private static final Pattern P_SPLIT_NAME_PAREN = Pattern.compile("(.*) \\((.{4,}?)\\)");
|
||||
|
||||
@Override
|
||||
protected String[] splitStationName(final String name)
|
||||
{
|
||||
final Matcher mParen = P_SPLIT_NAME_PAREN.matcher(name);
|
||||
if (mParen.matches())
|
||||
return new String[] { mParen.group(2), mParen.group(1) };
|
||||
|
||||
return super.splitStationName(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Collection<Product> defaultProducts()
|
||||
{
|
||||
|
|
|
@ -89,7 +89,7 @@ public class InvgProvider extends AbstractHafasProvider
|
|||
private static final String[] PLACES = { "Ingolstadt", "München" };
|
||||
|
||||
@Override
|
||||
protected String[] splitPlaceAndName(final String name)
|
||||
protected String[] splitStationName(final String name)
|
||||
{
|
||||
for (final String place : PLACES)
|
||||
{
|
||||
|
@ -99,7 +99,7 @@ public class InvgProvider extends AbstractHafasProvider
|
|||
return new String[] { place, name.substring(place.length() + 2) };
|
||||
}
|
||||
|
||||
return super.splitPlaceAndName(name);
|
||||
return super.splitStationName(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -186,7 +186,7 @@ public class InvgProvider extends AbstractHafasProvider
|
|||
final Matcher mHeadFine = P_DEPARTURES_HEAD_FINE.matcher(mHeadCoarse.group(1));
|
||||
if (mHeadFine.matches())
|
||||
{
|
||||
final String[] placeAndName = splitPlaceAndName(ParserUtils.resolveEntities(mHeadFine.group(1)));
|
||||
final String[] placeAndName = splitStationName(ParserUtils.resolveEntities(mHeadFine.group(1)));
|
||||
final Calendar currentTime = new GregorianCalendar(timeZone);
|
||||
currentTime.clear();
|
||||
ParserUtils.parseGermanDate(currentTime, mHeadFine.group(2));
|
||||
|
@ -238,9 +238,17 @@ public class InvgProvider extends AbstractHafasProvider
|
|||
final Line line = parseLine(lineType, ParserUtils.resolveEntities(mDepFine.group(4)), false);
|
||||
|
||||
final String destinationId = mDepFine.group(5);
|
||||
final String[] destinationPlaceAndName = splitPlaceAndName(ParserUtils.resolveEntities(mDepFine.group(6)));
|
||||
final Location destination = new Location(destinationId != null ? LocationType.STATION : LocationType.ANY, destinationId,
|
||||
destinationPlaceAndName[0], destinationPlaceAndName[1]);
|
||||
final String destinationName = ParserUtils.resolveEntities(mDepFine.group(6));
|
||||
final Location destination;
|
||||
if (destinationId != null)
|
||||
{
|
||||
final String[] destinationPlaceAndName = splitStationName(destinationName);
|
||||
destination = new Location(LocationType.STATION, destinationId, destinationPlaceAndName[0], destinationPlaceAndName[1]);
|
||||
}
|
||||
else
|
||||
{
|
||||
destination = new Location(LocationType.ANY, null, null, destinationName);
|
||||
}
|
||||
|
||||
final Position position = mDepFine.group(7) != null ? new Position("Gl. " + ParserUtils.resolveEntities(mDepFine.group(7)))
|
||||
: null;
|
||||
|
|
|
@ -17,6 +17,8 @@
|
|||
|
||||
package de.schildbach.pte;
|
||||
|
||||
import java.util.regex.Matcher;
|
||||
|
||||
import de.schildbach.pte.dto.Product;
|
||||
|
||||
/**
|
||||
|
@ -107,20 +109,24 @@ public class LuProvider extends AbstractHafasProvider
|
|||
}
|
||||
}
|
||||
|
||||
private static final String[] PLACES = { "Luxembourg", "Luxembourg/Centre" };
|
||||
@Override
|
||||
protected String[] splitStationName(final String name)
|
||||
{
|
||||
final Matcher mComma = P_SPLIT_NAME_FIRST_COMMA.matcher(name);
|
||||
if (mComma.matches())
|
||||
return new String[] { mComma.group(1), mComma.group(2) };
|
||||
|
||||
return super.splitStationName(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String[] splitPlaceAndName(final String name)
|
||||
protected String[] splitAddress(final String address)
|
||||
{
|
||||
for (final String place : PLACES)
|
||||
{
|
||||
if (name.startsWith(place + " ") || 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 mComma = P_SPLIT_NAME_FIRST_COMMA.matcher(address);
|
||||
if (mComma.matches())
|
||||
return new String[] { mComma.group(1), mComma.group(2) };
|
||||
|
||||
return super.splitPlaceAndName(name);
|
||||
return super.splitStationName(address);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
package de.schildbach.pte;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.regex.Matcher;
|
||||
|
||||
import de.schildbach.pte.dto.Location;
|
||||
import de.schildbach.pte.dto.LocationType;
|
||||
|
@ -103,20 +104,24 @@ public class NasaProvider extends AbstractHafasProvider
|
|||
}
|
||||
}
|
||||
|
||||
private static final String[] PLACES = { "Leipzig", "Halle (Saale)", "Halle", "Magdeburg" };
|
||||
@Override
|
||||
protected String[] splitStationName(final String name)
|
||||
{
|
||||
final Matcher mComma = P_SPLIT_NAME_FIRST_COMMA.matcher(name);
|
||||
if (mComma.matches())
|
||||
return new String[] { mComma.group(1), mComma.group(2) };
|
||||
|
||||
return super.splitStationName(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String[] splitPlaceAndName(final String name)
|
||||
protected String[] splitAddress(final String address)
|
||||
{
|
||||
for (final String place : PLACES)
|
||||
{
|
||||
if (name.startsWith(place + " ") || 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 mComma = P_SPLIT_NAME_FIRST_COMMA.matcher(address);
|
||||
if (mComma.matches())
|
||||
return new String[] { mComma.group(1), mComma.group(2) };
|
||||
|
||||
return super.splitPlaceAndName(name);
|
||||
return super.splitStationName(address);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -113,13 +113,13 @@ public class NriProvider extends AbstractHafasProvider
|
|||
private static final String[] PLACES = { "Oslo", "Bergen" };
|
||||
|
||||
@Override
|
||||
protected String[] splitPlaceAndName(final String name)
|
||||
protected String[] splitStationName(final String name)
|
||||
{
|
||||
for (final String place : PLACES)
|
||||
if (name.startsWith(place + " "))
|
||||
return new String[] { place, name.substring(place.length() + 1) };
|
||||
|
||||
return super.splitPlaceAndName(name);
|
||||
return super.splitStationName(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
package de.schildbach.pte;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.regex.Matcher;
|
||||
|
||||
import de.schildbach.pte.dto.Location;
|
||||
import de.schildbach.pte.dto.LocationType;
|
||||
|
@ -126,8 +127,15 @@ public class NvvProvider extends AbstractHafasProvider
|
|||
"Darmstadt", "Aschaffenburg", "Berlin", "Fulda" };
|
||||
|
||||
@Override
|
||||
protected String[] splitPlaceAndName(final String name)
|
||||
protected String[] splitStationName(final String name)
|
||||
{
|
||||
if (name.startsWith("F "))
|
||||
return new String[] { "Frankfurt", name.substring(2) };
|
||||
if (name.startsWith("OF "))
|
||||
return new String[] { "Offenbach", name.substring(3) };
|
||||
if (name.startsWith("MZ "))
|
||||
return new String[] { "Mainz", name.substring(3) };
|
||||
|
||||
for (final String place : PLACES)
|
||||
{
|
||||
if (name.startsWith(place + " - "))
|
||||
|
@ -136,7 +144,17 @@ public class NvvProvider extends AbstractHafasProvider
|
|||
return new String[] { place, name.substring(place.length() + 1) };
|
||||
}
|
||||
|
||||
return super.splitPlaceAndName(name);
|
||||
return super.splitStationName(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String[] splitAddress(final String address)
|
||||
{
|
||||
final Matcher mComma = P_SPLIT_NAME_FIRST_COMMA.matcher(address);
|
||||
if (mComma.matches())
|
||||
return new String[] { mComma.group(1), mComma.group(2) };
|
||||
|
||||
return super.splitStationName(address);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -19,6 +19,7 @@ package de.schildbach.pte;
|
|||
|
||||
import java.io.IOException;
|
||||
import java.util.Collection;
|
||||
import java.util.regex.Matcher;
|
||||
|
||||
import de.schildbach.pte.dto.Location;
|
||||
import de.schildbach.pte.dto.LocationType;
|
||||
|
@ -159,6 +160,30 @@ public class OebbProvider extends AbstractHafasProvider
|
|||
return Product.ALL;
|
||||
}
|
||||
|
||||
private static final String[] PLACES = { "Wien", "Graz", "Linz/Donau", "Salzburg", "Innsbruck" };
|
||||
|
||||
@Override
|
||||
protected String[] splitStationName(final String name)
|
||||
{
|
||||
for (final String place : PLACES)
|
||||
{
|
||||
if (name.startsWith(place + " "))
|
||||
return new String[] { place, name.substring(place.length() + 1) };
|
||||
}
|
||||
|
||||
return super.splitStationName(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String[] splitAddress(final String address)
|
||||
{
|
||||
final Matcher mComma = P_SPLIT_NAME_FIRST_COMMA.matcher(address);
|
||||
if (mComma.matches())
|
||||
return new String[] { mComma.group(1), mComma.group(2) };
|
||||
|
||||
return super.splitStationName(address);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected char normalizeType(final String type)
|
||||
{
|
||||
|
|
|
@ -101,7 +101,7 @@ public class PlProvider extends AbstractHafasProvider
|
|||
private static final String[] PLACES = { "Warszawa", "Kraków" };
|
||||
|
||||
@Override
|
||||
protected String[] splitPlaceAndName(final String name)
|
||||
protected String[] splitStationName(final String name)
|
||||
{
|
||||
for (final String place : PLACES)
|
||||
{
|
||||
|
@ -111,7 +111,7 @@ public class PlProvider extends AbstractHafasProvider
|
|||
return new String[] { place, name.substring(place.length() + 1) };
|
||||
}
|
||||
|
||||
return super.splitPlaceAndName(name);
|
||||
return super.splitStationName(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -20,6 +20,7 @@ package de.schildbach.pte;
|
|||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.regex.Matcher;
|
||||
|
||||
import de.schildbach.pte.dto.Product;
|
||||
import de.schildbach.pte.dto.Style;
|
||||
|
@ -121,7 +122,7 @@ public class RsagProvider extends AbstractHafasProvider
|
|||
private static final String[] PLACES = { "Rostock", "Warnemünde" };
|
||||
|
||||
@Override
|
||||
protected String[] splitPlaceAndName(final String name)
|
||||
protected String[] splitStationName(final String name)
|
||||
{
|
||||
for (final String place : PLACES)
|
||||
{
|
||||
|
@ -129,7 +130,17 @@ public class RsagProvider extends AbstractHafasProvider
|
|||
return new String[] { place, name.substring(place.length() + 1) };
|
||||
}
|
||||
|
||||
return super.splitPlaceAndName(name);
|
||||
return super.splitStationName(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String[] splitAddress(final String address)
|
||||
{
|
||||
final Matcher mComma = P_SPLIT_NAME_FIRST_COMMA.matcher(address);
|
||||
if (mComma.matches())
|
||||
return new String[] { mComma.group(1), mComma.group(2) };
|
||||
|
||||
return super.splitStationName(address);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
package de.schildbach.pte;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.regex.Matcher;
|
||||
|
||||
import de.schildbach.pte.dto.Product;
|
||||
|
||||
|
@ -114,6 +115,26 @@ public class SbbProvider extends AbstractHafasProvider
|
|||
return Product.ALL;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String[] splitStationName(final String name)
|
||||
{
|
||||
final Matcher mComma = P_SPLIT_NAME_FIRST_COMMA.matcher(name);
|
||||
if (mComma.matches())
|
||||
return new String[] { mComma.group(1), mComma.group(2) };
|
||||
|
||||
return super.splitStationName(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String[] splitAddress(final String address)
|
||||
{
|
||||
final Matcher mComma = P_SPLIT_NAME_FIRST_COMMA.matcher(address);
|
||||
if (mComma.matches())
|
||||
return new String[] { mComma.group(1), mComma.group(2) };
|
||||
|
||||
return super.splitStationName(address);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected char normalizeType(final String type)
|
||||
{
|
||||
|
|
|
@ -136,13 +136,13 @@ public class SeProvider extends AbstractHafasProvider
|
|||
private static final Pattern P_SPLIT_NAME_PAREN = Pattern.compile("(.*) \\((.{3,}?) kn\\)");
|
||||
|
||||
@Override
|
||||
protected String[] splitPlaceAndName(final String name)
|
||||
protected String[] splitStationName(final String name)
|
||||
{
|
||||
final Matcher mParen = P_SPLIT_NAME_PAREN.matcher(name);
|
||||
if (mParen.matches())
|
||||
return new String[] { mParen.group(2), mParen.group(1) };
|
||||
|
||||
return super.splitPlaceAndName(name);
|
||||
return super.splitStationName(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -151,6 +151,16 @@ public class SeProvider extends AbstractHafasProvider
|
|||
return Product.ALL;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String[] splitAddress(final String address)
|
||||
{
|
||||
final Matcher mComma = P_SPLIT_NAME_LAST_COMMA.matcher(address);
|
||||
if (mComma.matches())
|
||||
return new String[] { mComma.group(2), mComma.group(1) };
|
||||
|
||||
return super.splitStationName(address);
|
||||
}
|
||||
|
||||
private static final Pattern P_NORMALIZE_LINE_BUS = Pattern.compile("Buss\\s*(.*)");
|
||||
private static final Pattern P_NORMALIZE_LINE_SUBWAY = Pattern.compile("Tunnelbana\\s*(.*)");
|
||||
|
||||
|
|
|
@ -99,18 +99,6 @@ public class SeptaProvider extends AbstractHafasProvider
|
|||
}
|
||||
}
|
||||
|
||||
private static final Pattern P_SPLIT_ADDRESS = Pattern.compile("(.*),\\s+([^,]+\\s+\\d{4,5})");
|
||||
|
||||
@Override
|
||||
protected String[] splitPlaceAndName(final String name)
|
||||
{
|
||||
final Matcher matcher = P_SPLIT_ADDRESS.matcher(name);
|
||||
if (matcher.matches())
|
||||
return new String[] { matcher.group(2), matcher.group(1) };
|
||||
else
|
||||
return super.splitPlaceAndName(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public NearbyStationsResult queryNearbyStations(final Location location, final int maxDistance, final int maxStations) throws IOException
|
||||
{
|
||||
|
@ -203,7 +191,7 @@ public class SeptaProvider extends AbstractHafasProvider
|
|||
else if (mPageCoarse.group(7) != null)
|
||||
return new QueryDeparturesResult(header, Status.SERVICE_DOWN);
|
||||
|
||||
final String[] placeAndName = splitPlaceAndName(ParserUtils.resolveEntities(mPageCoarse.group(1)));
|
||||
final String[] placeAndName = splitStationName(ParserUtils.resolveEntities(mPageCoarse.group(1)));
|
||||
final Calendar currentTime = new GregorianCalendar(timeZone);
|
||||
currentTime.clear();
|
||||
ParserUtils.parseAmericanDate(currentTime, mPageCoarse.group(2));
|
||||
|
@ -256,9 +244,17 @@ public class SeptaProvider extends AbstractHafasProvider
|
|||
final Line line = parseLine(lineType, ParserUtils.resolveEntities(mDepFine.group(4)), false);
|
||||
|
||||
final String destinationId = mDepFine.group(5);
|
||||
final String[] destinationPlaceAndName = splitPlaceAndName(ParserUtils.resolveEntities(mDepFine.group(6)));
|
||||
final Location destination = new Location(destinationId != null ? LocationType.STATION : LocationType.ANY, destinationId,
|
||||
destinationPlaceAndName[0], destinationPlaceAndName[1]);
|
||||
final String destinationName = ParserUtils.resolveEntities(mDepFine.group(6));
|
||||
final Location destination;
|
||||
if (destinationId != null)
|
||||
{
|
||||
final String[] destinationPlaceAndName = splitStationName(destinationName);
|
||||
destination = new Location(LocationType.STATION, destinationId, destinationPlaceAndName[0], destinationPlaceAndName[1]);
|
||||
}
|
||||
else
|
||||
{
|
||||
destination = new Location(LocationType.ANY, null, null, destinationName);
|
||||
}
|
||||
|
||||
final Position position = mDepFine.group(7) != null ? new Position("Gl. " + ParserUtils.resolveEntities(mDepFine.group(7)))
|
||||
: null;
|
||||
|
@ -299,6 +295,16 @@ public class SeptaProvider extends AbstractHafasProvider
|
|||
return queryMoreTripsXml(context, later);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String[] splitAddress(final String address)
|
||||
{
|
||||
final Matcher mComma = P_SPLIT_NAME_LAST_COMMA.matcher(address);
|
||||
if (mComma.matches())
|
||||
return new String[] { mComma.group(2), mComma.group(1) };
|
||||
|
||||
return super.splitStationName(address);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected char normalizeType(final String type)
|
||||
{
|
||||
|
|
|
@ -138,7 +138,7 @@ public class ShProvider extends AbstractHafasProvider
|
|||
private static final String[] PLACES = { "Hamburg", "Kiel", "Lübeck", "Flensburg", "Neumünster" };
|
||||
|
||||
@Override
|
||||
protected String[] splitPlaceAndName(final String name)
|
||||
protected String[] splitStationName(final String name)
|
||||
{
|
||||
for (final String place : PLACES)
|
||||
{
|
||||
|
@ -146,7 +146,17 @@ public class ShProvider extends AbstractHafasProvider
|
|||
return new String[] { place, name.substring(place.length() + 1) };
|
||||
}
|
||||
|
||||
return super.splitPlaceAndName(name);
|
||||
return super.splitStationName(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String[] splitAddress(final String address)
|
||||
{
|
||||
final Matcher mComma = P_SPLIT_NAME_FIRST_COMMA.matcher(address);
|
||||
if (mComma.matches())
|
||||
return new String[] { mComma.group(1), mComma.group(2) };
|
||||
|
||||
return super.splitStationName(address);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -219,7 +229,7 @@ public class ShProvider extends AbstractHafasProvider
|
|||
else if (mHeadCoarse.group(7) != null)
|
||||
return new QueryDeparturesResult(header, Status.SERVICE_DOWN);
|
||||
|
||||
final String[] placeAndName = splitPlaceAndName(ParserUtils.resolveEntities(mHeadCoarse.group(1)));
|
||||
final String[] placeAndName = splitStationName(ParserUtils.resolveEntities(mHeadCoarse.group(1)));
|
||||
final Calendar currentTime = new GregorianCalendar(timeZone);
|
||||
currentTime.clear();
|
||||
ParserUtils.parseGermanDate(currentTime, mHeadCoarse.group(2));
|
||||
|
@ -253,9 +263,17 @@ public class ShProvider extends AbstractHafasProvider
|
|||
final Line line = new Line(null, lineStr, lineStyle(null, lineStr));
|
||||
|
||||
final String destinationId = mDepFine.group(4);
|
||||
final String[] destinationPlaceAndName = splitPlaceAndName(ParserUtils.resolveEntities(mDepFine.group(5)));
|
||||
final Location destination = new Location(destinationId != null ? LocationType.STATION : LocationType.ANY, destinationId,
|
||||
destinationPlaceAndName[0], destinationPlaceAndName[1]);
|
||||
final String destinationName = ParserUtils.resolveEntities(mDepFine.group(5));
|
||||
final Location destination;
|
||||
if (destinationId != null)
|
||||
{
|
||||
final String[] destinationPlaceAndName = splitStationName(destinationName);
|
||||
destination = new Location(LocationType.STATION, destinationId, destinationPlaceAndName[0], destinationPlaceAndName[1]);
|
||||
}
|
||||
else
|
||||
{
|
||||
destination = new Location(LocationType.ANY, null, null, destinationName);
|
||||
}
|
||||
|
||||
final Position position = mDepFine.group(6) != null ? new Position("Gl. " + ParserUtils.resolveEntities(mDepFine.group(6)))
|
||||
: null;
|
||||
|
|
|
@ -105,13 +105,13 @@ public class SncbProvider extends AbstractHafasProvider
|
|||
private static final String[] PLACES = { "Antwerpen", "Gent", "Charleroi", "Liege", "Liège", "Brussel" };
|
||||
|
||||
@Override
|
||||
protected String[] splitPlaceAndName(final String name)
|
||||
protected String[] splitStationName(final String name)
|
||||
{
|
||||
for (final String place : PLACES)
|
||||
if (name.startsWith(place + " ") || name.startsWith(place + "-"))
|
||||
return new String[] { place, name.substring(place.length() + 1) };
|
||||
|
||||
return super.splitPlaceAndName(name);
|
||||
return super.splitStationName(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -115,13 +115,23 @@ public class StockholmProvider extends AbstractHafasProvider
|
|||
private static final Pattern P_SPLIT_NAME_PAREN = Pattern.compile("(.*) \\((.{4,}?)\\)");
|
||||
|
||||
@Override
|
||||
protected String[] splitPlaceAndName(final String name)
|
||||
protected String[] splitStationName(final String name)
|
||||
{
|
||||
final Matcher mParen = P_SPLIT_NAME_PAREN.matcher(name);
|
||||
if (mParen.matches())
|
||||
return new String[] { mParen.group(2), mParen.group(1) };
|
||||
|
||||
return super.splitPlaceAndName(name);
|
||||
return super.splitStationName(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String[] splitAddress(final String address)
|
||||
{
|
||||
final Matcher mComma = P_SPLIT_NAME_LAST_COMMA.matcher(address);
|
||||
if (mComma.matches())
|
||||
return new String[] { mComma.group(2), mComma.group(1) };
|
||||
|
||||
return super.splitStationName(address);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -116,10 +116,9 @@ public class VbbProvider extends AbstractHafasProvider
|
|||
}
|
||||
|
||||
private static final Pattern P_SPLIT_NAME_PAREN = Pattern.compile("(.*?) \\((.{4,}?)\\)(?: \\((U|S|S\\+U)\\))?");
|
||||
private static final Pattern P_SPLIT_NAME_COMMA = Pattern.compile("([^,]*), ([^,]*)");
|
||||
|
||||
@Override
|
||||
protected String[] splitPlaceAndName(final String name)
|
||||
protected String[] splitStationName(final String name)
|
||||
{
|
||||
final Matcher mParen = P_SPLIT_NAME_PAREN.matcher(name);
|
||||
if (mParen.matches())
|
||||
|
@ -128,11 +127,21 @@ public class VbbProvider extends AbstractHafasProvider
|
|||
return new String[] { mParen.group(2), mParen.group(1) + (su != null ? " (" + su + ")" : "") };
|
||||
}
|
||||
|
||||
final Matcher mComma = P_SPLIT_NAME_COMMA.matcher(name);
|
||||
final Matcher mComma = P_SPLIT_NAME_FIRST_COMMA.matcher(name);
|
||||
if (mComma.matches())
|
||||
return new String[] { mComma.group(1), mComma.group(2) };
|
||||
|
||||
return super.splitPlaceAndName(name);
|
||||
return super.splitStationName(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String[] splitAddress(final String address)
|
||||
{
|
||||
final Matcher mComma = P_SPLIT_NAME_FIRST_COMMA.matcher(address);
|
||||
if (mComma.matches())
|
||||
return new String[] { mComma.group(1), mComma.group(2) };
|
||||
|
||||
return super.splitStationName(address);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -115,7 +115,7 @@ public class VbnProvider extends AbstractHafasProvider
|
|||
private static final String[] PLACES = { "Bremen", "Bremerhaven", "Oldenburg(Oldb)", "Osnabrück", "Göttingen" };
|
||||
|
||||
@Override
|
||||
protected String[] splitPlaceAndName(final String name)
|
||||
protected String[] splitStationName(final String name)
|
||||
{
|
||||
for (final String place : PLACES)
|
||||
{
|
||||
|
@ -123,7 +123,7 @@ public class VbnProvider extends AbstractHafasProvider
|
|||
return new String[] { place, name.substring(place.length() + 1) };
|
||||
}
|
||||
|
||||
return super.splitPlaceAndName(name);
|
||||
return super.splitStationName(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
package de.schildbach.pte;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.regex.Matcher;
|
||||
|
||||
import de.schildbach.pte.dto.Location;
|
||||
import de.schildbach.pte.dto.LocationType;
|
||||
|
@ -90,20 +91,24 @@ public class VgsProvider extends AbstractHafasProvider
|
|||
}
|
||||
}
|
||||
|
||||
private static final String[] PLACES = { "Saarbrücken" };
|
||||
@Override
|
||||
protected String[] splitStationName(final String name)
|
||||
{
|
||||
final Matcher mComma = P_SPLIT_NAME_LAST_COMMA.matcher(name);
|
||||
if (mComma.matches())
|
||||
return new String[] { mComma.group(2), mComma.group(1) };
|
||||
|
||||
return super.splitStationName(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String[] splitPlaceAndName(final String name)
|
||||
protected String[] splitAddress(final String address)
|
||||
{
|
||||
for (final String place : PLACES)
|
||||
{
|
||||
if (name.endsWith(", " + place))
|
||||
return new String[] { place, name.substring(0, name.length() - place.length() - 2) };
|
||||
else if (name.startsWith(place + " ") || name.startsWith(place + "-"))
|
||||
return new String[] { place, name.substring(place.length() + 1) };
|
||||
}
|
||||
final Matcher mComma = P_SPLIT_NAME_FIRST_COMMA.matcher(address);
|
||||
if (mComma.matches())
|
||||
return new String[] { mComma.group(1), mComma.group(2) };
|
||||
|
||||
return super.splitPlaceAndName(name);
|
||||
return super.splitStationName(address);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -118,7 +118,7 @@ public class VsnProvider extends AbstractHafasProvider
|
|||
private static final String[] PLACES = { "Göttingen" };
|
||||
|
||||
@Override
|
||||
protected String[] splitPlaceAndName(final String name)
|
||||
protected String[] splitStationName(final String name)
|
||||
{
|
||||
for (final String place : PLACES)
|
||||
{
|
||||
|
@ -126,7 +126,13 @@ public class VsnProvider extends AbstractHafasProvider
|
|||
return new String[] { place, name.substring(place.length() + 1) };
|
||||
}
|
||||
|
||||
return super.splitPlaceAndName(name);
|
||||
return super.splitStationName(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String[] splitAddress(final String address)
|
||||
{
|
||||
return super.splitStationName(address);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -119,7 +119,7 @@ public class ZvvProvider extends AbstractHafasProvider
|
|||
private static final String[] PLACES = { "Zürich", "Winterthur" };
|
||||
|
||||
@Override
|
||||
protected String[] splitPlaceAndName(String name)
|
||||
protected String[] splitStationName(String name)
|
||||
{
|
||||
for (final String operator : OPERATORS)
|
||||
{
|
||||
|
@ -136,15 +136,27 @@ public class ZvvProvider extends AbstractHafasProvider
|
|||
}
|
||||
}
|
||||
|
||||
final Matcher mComma = P_SPLIT_NAME_FIRST_COMMA.matcher(name);
|
||||
if (mComma.matches())
|
||||
return new String[] { mComma.group(1), mComma.group(2) };
|
||||
|
||||
for (final String place : PLACES)
|
||||
{
|
||||
if (name.startsWith(place + ", "))
|
||||
return new String[] { place, name.substring(place.length() + 2) };
|
||||
if (name.startsWith(place + " ") || name.startsWith(place + ","))
|
||||
return new String[] { place, name.substring(place.length() + 1) };
|
||||
}
|
||||
|
||||
return super.splitPlaceAndName(name);
|
||||
return super.splitStationName(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String[] splitAddress(final String address)
|
||||
{
|
||||
final Matcher mComma = P_SPLIT_NAME_FIRST_COMMA.matcher(address);
|
||||
if (mComma.matches())
|
||||
return new String[] { mComma.group(1), mComma.group(2) };
|
||||
|
||||
return super.splitStationName(address);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -82,7 +82,7 @@ public class BahnProviderLiveTest extends AbstractProviderLiveTest
|
|||
|
||||
print(result);
|
||||
|
||||
assertEquals("Güntzelstr. (U), Berlin", result.getLocations().get(0).name);
|
||||
assertEquals("Güntzelstr. (U)", result.getLocations().get(0).name);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -103,6 +103,16 @@ public class BahnProviderLiveTest extends AbstractProviderLiveTest
|
|||
print(result);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void suggestLocationsAddress() throws Exception
|
||||
{
|
||||
final SuggestLocationsResult result = provider.suggestLocations("München, Friedenstraße 2");
|
||||
print(result);
|
||||
|
||||
assertEquals(LocationType.ADDRESS, result.getLocations().get(0).type);
|
||||
assertEquals("Friedenstraße 2", result.getLocations().get(0).name);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void shortTrip() throws Exception
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue