mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-16 17:39:49 +00:00
use Product enum in queryConnections()
This commit is contained in:
parent
9653a0420f
commit
29f719db5a
97 changed files with 547 additions and 376 deletions
|
@ -27,6 +27,7 @@ import java.text.DateFormat;
|
|||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.Collection;
|
||||
import java.util.Currency;
|
||||
import java.util.Date;
|
||||
import java.util.GregorianCalendar;
|
||||
|
@ -58,6 +59,7 @@ import de.schildbach.pte.dto.Location;
|
|||
import de.schildbach.pte.dto.LocationType;
|
||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||
import de.schildbach.pte.dto.Point;
|
||||
import de.schildbach.pte.dto.Product;
|
||||
import de.schildbach.pte.dto.QueryConnectionsContext;
|
||||
import de.schildbach.pte.dto.QueryConnectionsResult;
|
||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
||||
|
@ -1770,7 +1772,8 @@ public abstract class AbstractEfaProvider extends AbstractNetworkProvider
|
|||
}
|
||||
|
||||
protected String xsltTripRequestParameters(final Location from, final Location via, final Location to, final Date date, final boolean dep,
|
||||
final int numConnections, final String products, final WalkSpeed walkSpeed, final Accessibility accessibility, final Set<Option> options)
|
||||
final int numConnections, final Collection<Product> products, final WalkSpeed walkSpeed, final Accessibility accessibility,
|
||||
final Set<Option> options)
|
||||
{
|
||||
final DateFormat DATE_FORMAT = new SimpleDateFormat("yyyyMMdd", Locale.US);
|
||||
final DateFormat TIME_FORMAT = new SimpleDateFormat("HHmm", Locale.US);
|
||||
|
@ -1809,34 +1812,34 @@ public abstract class AbstractEfaProvider extends AbstractNetworkProvider
|
|||
uri.append("&includedMeans=checkbox");
|
||||
|
||||
boolean hasI = false;
|
||||
for (final char p : products.toCharArray())
|
||||
for (final Product p : products)
|
||||
{
|
||||
if (p == 'I' || p == 'R')
|
||||
if (p == Product.HIGH_SPEED_TRAIN || p == Product.REGIONAL_TRAIN)
|
||||
{
|
||||
uri.append("&inclMOT_0=on");
|
||||
if (p == 'I')
|
||||
if (p == Product.HIGH_SPEED_TRAIN)
|
||||
hasI = true;
|
||||
}
|
||||
|
||||
if (p == 'S')
|
||||
if (p == Product.SUBURBAN_TRAIN)
|
||||
uri.append("&inclMOT_1=on");
|
||||
|
||||
if (p == 'U')
|
||||
if (p == Product.SUBWAY)
|
||||
uri.append("&inclMOT_2=on");
|
||||
|
||||
if (p == 'T')
|
||||
if (p == Product.TRAM)
|
||||
uri.append("&inclMOT_3=on&inclMOT_4=on");
|
||||
|
||||
if (p == 'B')
|
||||
if (p == Product.BUS)
|
||||
uri.append("&inclMOT_5=on&inclMOT_6=on&inclMOT_7=on");
|
||||
|
||||
if (p == 'P')
|
||||
if (p == Product.ON_DEMAND)
|
||||
uri.append("&inclMOT_10=on");
|
||||
|
||||
if (p == 'F')
|
||||
if (p == Product.FERRY)
|
||||
uri.append("&inclMOT_9=on");
|
||||
|
||||
if (p == 'C')
|
||||
if (p == Product.CABLECAR)
|
||||
uri.append("&inclMOT_8=on");
|
||||
}
|
||||
|
||||
|
@ -1876,8 +1879,8 @@ public abstract class AbstractEfaProvider extends AbstractNetworkProvider
|
|||
}
|
||||
|
||||
public QueryConnectionsResult queryConnections(final Location from, final Location via, final Location to, final Date date, final boolean dep,
|
||||
final int numConnections, final String products, final WalkSpeed walkSpeed, final Accessibility accessibility, final Set<Option> options)
|
||||
throws IOException
|
||||
final int numConnections, final Collection<Product> products, final WalkSpeed walkSpeed, final Accessibility accessibility,
|
||||
final Set<Option> options) throws IOException
|
||||
{
|
||||
|
||||
final String parameters = xsltTripRequestParameters(from, via, to, date, dep, numConnections, products, walkSpeed, accessibility, options);
|
||||
|
|
|
@ -27,6 +27,7 @@ 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;
|
||||
import java.util.Date;
|
||||
import java.util.GregorianCalendar;
|
||||
|
@ -55,6 +56,7 @@ import de.schildbach.pte.dto.Location;
|
|||
import de.schildbach.pte.dto.LocationType;
|
||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||
import de.schildbach.pte.dto.Point;
|
||||
import de.schildbach.pte.dto.Product;
|
||||
import de.schildbach.pte.dto.QueryConnectionsContext;
|
||||
import de.schildbach.pte.dto.QueryConnectionsResult;
|
||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
||||
|
@ -178,7 +180,7 @@ public abstract class AbstractHafasProvider extends AbstractNetworkProvider
|
|||
return 0;
|
||||
}
|
||||
|
||||
protected abstract void setProductBits(StringBuilder productBits, char product);
|
||||
protected abstract void setProductBits(StringBuilder productBits, Product product);
|
||||
|
||||
private static final Pattern P_SPLIT_ADDRESS = Pattern.compile("(\\d{4,5}\\s+[^,]+),\\s+(.*)");
|
||||
|
||||
|
@ -789,8 +791,8 @@ public abstract class AbstractHafasProvider extends AbstractNetworkProvider
|
|||
}
|
||||
|
||||
public QueryConnectionsResult queryConnections(final Location from, final Location via, final Location to, final Date date, final boolean dep,
|
||||
final int numConnections, final String products, final WalkSpeed walkSpeed, final Accessibility accessibility, final Set<Option> options)
|
||||
throws IOException
|
||||
final int numConnections, final Collection<Product> products, final WalkSpeed walkSpeed, final Accessibility accessibility,
|
||||
final Set<Option> options) throws IOException
|
||||
{
|
||||
return queryConnectionsXml(from, via, to, date, dep, numConnections, products, walkSpeed, accessibility, options);
|
||||
}
|
||||
|
@ -802,7 +804,7 @@ public abstract class AbstractHafasProvider extends AbstractNetworkProvider
|
|||
}
|
||||
|
||||
protected final void appendConnectionsQueryUri(final StringBuilder uri, final Location from, final Location via, final Location to,
|
||||
final Date date, final boolean dep, final String products, final Accessibility accessibility, final Set<Option> options)
|
||||
final Date date, final boolean dep, final Collection<Product> products, final Accessibility accessibility, final Set<Option> options)
|
||||
{
|
||||
uri.append("?start=Suchen");
|
||||
|
||||
|
@ -850,7 +852,7 @@ public abstract class AbstractHafasProvider extends AbstractNetworkProvider
|
|||
{
|
||||
for (int i = 0; i < numProductBits; i++)
|
||||
productsStr.append('0');
|
||||
for (final char p : products.toCharArray())
|
||||
for (final Product p : products)
|
||||
setProductBits(productsStr, p);
|
||||
}
|
||||
else
|
||||
|
@ -872,8 +874,8 @@ public abstract class AbstractHafasProvider extends AbstractNetworkProvider
|
|||
}
|
||||
|
||||
protected final QueryConnectionsResult queryConnectionsXml(Location from, Location via, Location to, final Date date, final boolean dep,
|
||||
final int numConnections, final String products, final WalkSpeed walkSpeed, final Accessibility accessibility, final Set<Option> options)
|
||||
throws IOException
|
||||
final int numConnections, final Collection<Product> products, final WalkSpeed walkSpeed, final Accessibility accessibility,
|
||||
final Set<Option> options) throws IOException
|
||||
{
|
||||
final ResultHeader header = new ResultHeader(SERVER_PRODUCT);
|
||||
|
||||
|
@ -915,7 +917,7 @@ public abstract class AbstractHafasProvider extends AbstractNetworkProvider
|
|||
{
|
||||
for (int i = 0; i < numProductBits; i++)
|
||||
productsStr.append('0');
|
||||
for (final char p : products.toCharArray())
|
||||
for (final Product p : products)
|
||||
setProductBits(productsStr, p);
|
||||
}
|
||||
else
|
||||
|
@ -1487,7 +1489,7 @@ public abstract class AbstractHafasProvider extends AbstractNetworkProvider
|
|||
}
|
||||
|
||||
protected final QueryConnectionsResult queryConnectionsBinary(Location from, Location via, Location to, final Date date, final boolean dep,
|
||||
final int maxNumConnections, final String products, final WalkSpeed walkSpeed, final Accessibility accessibility,
|
||||
final int maxNumConnections, final Collection<Product> products, final WalkSpeed walkSpeed, final Accessibility accessibility,
|
||||
final Set<Option> options) throws IOException
|
||||
{
|
||||
final ResultHeader header = new ResultHeader(SERVER_PRODUCT);
|
||||
|
|
|
@ -19,6 +19,7 @@ package de.schildbach.pte;
|
|||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
@ -29,6 +30,7 @@ import java.util.regex.Pattern;
|
|||
import de.schildbach.pte.dto.Location;
|
||||
import de.schildbach.pte.dto.LocationType;
|
||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||
import de.schildbach.pte.dto.Product;
|
||||
import de.schildbach.pte.dto.QueryConnectionsContext;
|
||||
import de.schildbach.pte.dto.QueryConnectionsResult;
|
||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
||||
|
@ -90,43 +92,43 @@ public final class BahnProvider extends AbstractHafasProvider
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void setProductBits(final StringBuilder productBits, final char product)
|
||||
protected void setProductBits(final StringBuilder productBits, final Product product)
|
||||
{
|
||||
if (product == 'I')
|
||||
if (product == Product.HIGH_SPEED_TRAIN)
|
||||
{
|
||||
productBits.setCharAt(0, '1');
|
||||
productBits.setCharAt(1, '1');
|
||||
}
|
||||
else if (product == 'R')
|
||||
else if (product == Product.REGIONAL_TRAIN)
|
||||
{
|
||||
productBits.setCharAt(2, '1');
|
||||
productBits.setCharAt(3, '1');
|
||||
}
|
||||
else if (product == 'S')
|
||||
else if (product == Product.SUBURBAN_TRAIN)
|
||||
{
|
||||
productBits.setCharAt(4, '1');
|
||||
}
|
||||
else if (product == 'U')
|
||||
else if (product == Product.SUBWAY)
|
||||
{
|
||||
productBits.setCharAt(7, '1');
|
||||
}
|
||||
else if (product == 'T')
|
||||
else if (product == Product.TRAM)
|
||||
{
|
||||
productBits.setCharAt(8, '1');
|
||||
}
|
||||
else if (product == 'B')
|
||||
else if (product == Product.BUS)
|
||||
{
|
||||
productBits.setCharAt(5, '1');
|
||||
}
|
||||
else if (product == 'P')
|
||||
else if (product == Product.ON_DEMAND)
|
||||
{
|
||||
productBits.setCharAt(9, '1');
|
||||
}
|
||||
else if (product == 'F')
|
||||
else if (product == Product.FERRY)
|
||||
{
|
||||
productBits.setCharAt(6, '1');
|
||||
}
|
||||
else if (product == 'C')
|
||||
else if (product == Product.CABLECAR)
|
||||
{
|
||||
}
|
||||
else
|
||||
|
@ -219,7 +221,7 @@ public final class BahnProvider extends AbstractHafasProvider
|
|||
|
||||
@Override
|
||||
public QueryConnectionsResult queryConnections(final Location from, final Location via, final Location to, final Date date, final boolean dep,
|
||||
final int maxNumConnections, final String products, final WalkSpeed walkSpeed, final Accessibility accessibility,
|
||||
final int maxNumConnections, final Collection<Product> products, final WalkSpeed walkSpeed, final Accessibility accessibility,
|
||||
final Set<Option> options) throws IOException
|
||||
{
|
||||
return queryConnectionsBinary(from, via, to, date, dep, maxNumConnections, products, walkSpeed, accessibility, options);
|
||||
|
|
|
@ -20,6 +20,7 @@ package de.schildbach.pte;
|
|||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.Collection;
|
||||
import java.util.Date;
|
||||
import java.util.GregorianCalendar;
|
||||
import java.util.HashMap;
|
||||
|
@ -37,6 +38,7 @@ import de.schildbach.pte.dto.Location;
|
|||
import de.schildbach.pte.dto.LocationType;
|
||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||
import de.schildbach.pte.dto.Point;
|
||||
import de.schildbach.pte.dto.Product;
|
||||
import de.schildbach.pte.dto.QueryConnectionsContext;
|
||||
import de.schildbach.pte.dto.QueryConnectionsResult;
|
||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
||||
|
@ -106,41 +108,41 @@ public final class BvgProvider extends AbstractHafasProvider
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void setProductBits(final StringBuilder productBits, final char product)
|
||||
protected void setProductBits(final StringBuilder productBits, final Product product)
|
||||
{
|
||||
if (product == 'I')
|
||||
if (product == Product.HIGH_SPEED_TRAIN)
|
||||
{
|
||||
productBits.setCharAt(5, '1');
|
||||
}
|
||||
else if (product == 'R')
|
||||
else if (product == Product.REGIONAL_TRAIN)
|
||||
{
|
||||
productBits.setCharAt(6, '1');
|
||||
}
|
||||
else if (product == 'S')
|
||||
else if (product == Product.SUBURBAN_TRAIN)
|
||||
{
|
||||
productBits.setCharAt(0, '1');
|
||||
}
|
||||
else if (product == 'U')
|
||||
else if (product == Product.SUBWAY)
|
||||
{
|
||||
productBits.setCharAt(1, '1');
|
||||
}
|
||||
else if (product == 'T')
|
||||
else if (product == Product.TRAM)
|
||||
{
|
||||
productBits.setCharAt(2, '1');
|
||||
}
|
||||
else if (product == 'B')
|
||||
else if (product == Product.BUS)
|
||||
{
|
||||
productBits.setCharAt(3, '1');
|
||||
}
|
||||
else if (product == 'P')
|
||||
else if (product == Product.ON_DEMAND)
|
||||
{
|
||||
productBits.setCharAt(7, '1');
|
||||
}
|
||||
else if (product == 'F')
|
||||
else if (product == Product.FERRY)
|
||||
{
|
||||
productBits.setCharAt(4, '1');
|
||||
}
|
||||
else if (product == 'C')
|
||||
else if (product == Product.CABLECAR)
|
||||
{
|
||||
}
|
||||
else
|
||||
|
@ -527,7 +529,7 @@ public final class BvgProvider extends AbstractHafasProvider
|
|||
|
||||
@Override
|
||||
public QueryConnectionsResult queryConnections(final Location from, final Location via, final Location to, final Date date, final boolean dep,
|
||||
final int maxNumConnections, final String products, final WalkSpeed walkSpeed, final Accessibility accessibility,
|
||||
final int maxNumConnections, final Collection<Product> products, final WalkSpeed walkSpeed, final Accessibility accessibility,
|
||||
final Set<Option> options) throws IOException
|
||||
{
|
||||
return queryConnectionsBinary(from, via, to, date, dep, maxNumConnections, products, walkSpeed, accessibility, options);
|
||||
|
|
|
@ -24,6 +24,7 @@ import java.util.Locale;
|
|||
import de.schildbach.pte.dto.Location;
|
||||
import de.schildbach.pte.dto.LocationType;
|
||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||
import de.schildbach.pte.dto.Product;
|
||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
||||
import de.schildbach.pte.util.ParserUtils;
|
||||
|
||||
|
@ -58,44 +59,44 @@ public class DsbProvider extends AbstractHafasProvider
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void setProductBits(final StringBuilder productBits, final char product)
|
||||
protected void setProductBits(final StringBuilder productBits, final Product product)
|
||||
{
|
||||
if (product == 'I')
|
||||
if (product == Product.HIGH_SPEED_TRAIN)
|
||||
{
|
||||
productBits.setCharAt(0, '1'); // Intercity
|
||||
productBits.setCharAt(1, '1'); // InterCityExpress
|
||||
}
|
||||
else if (product == 'R')
|
||||
else if (product == Product.REGIONAL_TRAIN)
|
||||
{
|
||||
productBits.setCharAt(2, '1'); // Regionalzug
|
||||
productBits.setCharAt(3, '1'); // sonstige Züge
|
||||
}
|
||||
else if (product == 'S')
|
||||
else if (product == Product.SUBURBAN_TRAIN)
|
||||
{
|
||||
productBits.setCharAt(4, '1'); // S-Bahn
|
||||
}
|
||||
else if (product == 'U')
|
||||
else if (product == Product.SUBWAY)
|
||||
{
|
||||
productBits.setCharAt(10, '1'); // U-Bahn
|
||||
}
|
||||
else if (product == 'T')
|
||||
else if (product == Product.TRAM)
|
||||
{
|
||||
}
|
||||
else if (product == 'B')
|
||||
else if (product == Product.BUS)
|
||||
{
|
||||
productBits.setCharAt(5, '1'); // Bus
|
||||
productBits.setCharAt(6, '1'); // ExpressBus
|
||||
productBits.setCharAt(7, '1'); // Nachtbus
|
||||
}
|
||||
else if (product == 'P')
|
||||
else if (product == Product.ON_DEMAND)
|
||||
{
|
||||
productBits.setCharAt(8, '1'); // Telebus/andere
|
||||
}
|
||||
else if (product == 'F')
|
||||
else if (product == Product.FERRY)
|
||||
{
|
||||
productBits.setCharAt(9, '1'); // Schiff
|
||||
}
|
||||
else if (product == 'C')
|
||||
else if (product == Product.CABLECAR)
|
||||
{
|
||||
}
|
||||
else
|
||||
|
|
|
@ -27,6 +27,7 @@ import de.schildbach.pte.dto.Line;
|
|||
import de.schildbach.pte.dto.Location;
|
||||
import de.schildbach.pte.dto.LocationType;
|
||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||
import de.schildbach.pte.dto.Product;
|
||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
||||
import de.schildbach.pte.util.ParserUtils;
|
||||
|
||||
|
@ -60,34 +61,34 @@ public class EireannProvider extends AbstractHafasProvider
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void setProductBits(final StringBuilder productBits, final char product)
|
||||
protected void setProductBits(final StringBuilder productBits, final Product product)
|
||||
{
|
||||
if (product == 'I')
|
||||
if (product == Product.HIGH_SPEED_TRAIN)
|
||||
{
|
||||
}
|
||||
else if (product == 'R')
|
||||
else if (product == Product.REGIONAL_TRAIN)
|
||||
{
|
||||
}
|
||||
else if (product == 'S')
|
||||
else if (product == Product.SUBURBAN_TRAIN)
|
||||
{
|
||||
}
|
||||
else if (product == 'U')
|
||||
else if (product == Product.SUBWAY)
|
||||
{
|
||||
}
|
||||
else if (product == 'T')
|
||||
else if (product == Product.TRAM)
|
||||
{
|
||||
}
|
||||
else if (product == 'B')
|
||||
else if (product == Product.BUS)
|
||||
{
|
||||
productBits.setCharAt(3, '1');
|
||||
}
|
||||
else if (product == 'P')
|
||||
else if (product == Product.ON_DEMAND)
|
||||
{
|
||||
}
|
||||
else if (product == 'F')
|
||||
else if (product == Product.FERRY)
|
||||
{
|
||||
}
|
||||
else if (product == 'C')
|
||||
else if (product == Product.CABLECAR)
|
||||
{
|
||||
}
|
||||
else
|
||||
|
|
|
@ -33,6 +33,7 @@ import de.schildbach.pte.dto.Line;
|
|||
import de.schildbach.pte.dto.Location;
|
||||
import de.schildbach.pte.dto.LocationType;
|
||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||
import de.schildbach.pte.dto.Product;
|
||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
||||
import de.schildbach.pte.dto.QueryDeparturesResult.Status;
|
||||
import de.schildbach.pte.dto.ResultHeader;
|
||||
|
@ -71,7 +72,7 @@ public class InvgProvider extends AbstractHafasProvider
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void setProductBits(final StringBuilder productBits, final char product)
|
||||
protected void setProductBits(final StringBuilder productBits, final Product product)
|
||||
{
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
|
|
@ -19,11 +19,11 @@ package de.schildbach.pte;
|
|||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import de.schildbach.pte.dto.Location;
|
||||
import de.schildbach.pte.dto.LocationType;
|
||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||
import de.schildbach.pte.dto.Product;
|
||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
||||
|
||||
/**
|
||||
|
@ -54,43 +54,43 @@ public class LuProvider extends AbstractHafasProvider
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void setProductBits(final StringBuilder productBits, final char product)
|
||||
protected void setProductBits(final StringBuilder productBits, final Product product)
|
||||
{
|
||||
if (product == 'I')
|
||||
if (product == Product.HIGH_SPEED_TRAIN)
|
||||
{
|
||||
productBits.setCharAt(0, '1'); // Hochgeschwindigkeitszug
|
||||
productBits.setCharAt(1, '1'); // IC/EC
|
||||
productBits.setCharAt(2, '1'); // Fernverkehrszug
|
||||
}
|
||||
else if (product == 'R')
|
||||
else if (product == Product.REGIONAL_TRAIN)
|
||||
{
|
||||
productBits.setCharAt(3, '1'); // Regionalverkehrszug
|
||||
}
|
||||
else if (product == 'S')
|
||||
else if (product == Product.SUBURBAN_TRAIN)
|
||||
{
|
||||
productBits.setCharAt(4, '1'); // S-Bahn
|
||||
}
|
||||
else if (product == 'U')
|
||||
else if (product == Product.SUBWAY)
|
||||
{
|
||||
productBits.setCharAt(7, '1'); // U-Bahn
|
||||
}
|
||||
else if (product == 'T')
|
||||
else if (product == Product.TRAM)
|
||||
{
|
||||
productBits.setCharAt(8, '1'); // Straßenbahn
|
||||
}
|
||||
else if (product == 'B')
|
||||
else if (product == Product.BUS)
|
||||
{
|
||||
productBits.setCharAt(5, '1'); // Bus
|
||||
}
|
||||
else if (product == 'P')
|
||||
else if (product == Product.ON_DEMAND)
|
||||
{
|
||||
productBits.setCharAt(9, '1'); // AST/Rufbus
|
||||
}
|
||||
else if (product == 'F')
|
||||
else if (product == Product.FERRY)
|
||||
{
|
||||
productBits.setCharAt(6, '1'); // Schiff
|
||||
}
|
||||
else if (product == 'C')
|
||||
else if (product == Product.CABLECAR)
|
||||
{
|
||||
}
|
||||
else
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
package de.schildbach.pte;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Collection;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
@ -25,6 +26,7 @@ import java.util.Set;
|
|||
import de.schildbach.pte.dto.Location;
|
||||
import de.schildbach.pte.dto.LocationType;
|
||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||
import de.schildbach.pte.dto.Product;
|
||||
import de.schildbach.pte.dto.QueryConnectionsContext;
|
||||
import de.schildbach.pte.dto.QueryConnectionsResult;
|
||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
||||
|
@ -80,32 +82,32 @@ public class NasaProvider extends AbstractHafasProvider
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void setProductBits(final StringBuilder productBits, final char product)
|
||||
protected void setProductBits(final StringBuilder productBits, final Product product)
|
||||
{
|
||||
if (product == 'I')
|
||||
if (product == Product.HIGH_SPEED_TRAIN)
|
||||
{
|
||||
productBits.setCharAt(0, '1'); // ICE
|
||||
productBits.setCharAt(1, '1'); // IC/EC
|
||||
}
|
||||
else if (product == 'R')
|
||||
else if (product == Product.REGIONAL_TRAIN)
|
||||
{
|
||||
productBits.setCharAt(3, '1'); // RE/RB
|
||||
productBits.setCharAt(7, '1'); // Tourismus-Züge
|
||||
productBits.setCharAt(2, '1'); // undokumentiert
|
||||
}
|
||||
else if (product == 'S' || product == 'U')
|
||||
else if (product == Product.SUBURBAN_TRAIN || product == Product.SUBWAY)
|
||||
{
|
||||
productBits.setCharAt(4, '1'); // S/U
|
||||
}
|
||||
else if (product == 'T')
|
||||
else if (product == Product.TRAM)
|
||||
{
|
||||
productBits.setCharAt(5, '1'); // Straßenbahn
|
||||
}
|
||||
else if (product == 'B' || product == 'P')
|
||||
else if (product == Product.BUS || product == Product.ON_DEMAND)
|
||||
{
|
||||
productBits.setCharAt(6, '1'); // Bus
|
||||
}
|
||||
else if (product == 'F' || product == 'C')
|
||||
else if (product == Product.FERRY || product == Product.CABLECAR)
|
||||
{
|
||||
}
|
||||
else
|
||||
|
@ -176,7 +178,7 @@ public class NasaProvider extends AbstractHafasProvider
|
|||
|
||||
@Override
|
||||
public QueryConnectionsResult queryConnections(final Location from, final Location via, final Location to, final Date date, final boolean dep,
|
||||
final int maxNumConnections, final String products, final WalkSpeed walkSpeed, final Accessibility accessibility,
|
||||
final int maxNumConnections, final Collection<Product> products, final WalkSpeed walkSpeed, final Accessibility accessibility,
|
||||
final Set<Option> options) throws IOException
|
||||
{
|
||||
return queryConnectionsBinary(from, via, to, date, dep, maxNumConnections, products, walkSpeed, accessibility, options);
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
package de.schildbach.pte;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Collection;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
@ -25,6 +26,7 @@ import java.util.Set;
|
|||
import de.schildbach.pte.dto.Location;
|
||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||
import de.schildbach.pte.dto.Point;
|
||||
import de.schildbach.pte.dto.Product;
|
||||
import de.schildbach.pte.dto.QueryConnectionsContext;
|
||||
import de.schildbach.pte.dto.QueryConnectionsResult;
|
||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
||||
|
@ -132,8 +134,8 @@ public interface NetworkProvider
|
|||
* @return result object that can contain alternatives to clear up ambiguousnesses, or contains possible connections
|
||||
* @throws IOException
|
||||
*/
|
||||
QueryConnectionsResult queryConnections(Location from, Location via, Location to, Date date, boolean dep, int numConnections, String products,
|
||||
WalkSpeed walkSpeed, Accessibility accessibility, Set<Option> options) throws IOException;
|
||||
QueryConnectionsResult queryConnections(Location from, Location via, Location to, Date date, boolean dep, int numConnections,
|
||||
Collection<Product> products, WalkSpeed walkSpeed, Accessibility accessibility, Set<Option> options) throws IOException;
|
||||
|
||||
/**
|
||||
* Query more connections (e.g. earlier or later)
|
||||
|
|
|
@ -24,6 +24,7 @@ import java.util.Locale;
|
|||
import de.schildbach.pte.dto.Location;
|
||||
import de.schildbach.pte.dto.LocationType;
|
||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||
import de.schildbach.pte.dto.Product;
|
||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
||||
import de.schildbach.pte.util.ParserUtils;
|
||||
|
||||
|
@ -78,37 +79,37 @@ public class NriProvider extends AbstractHafasProvider
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void setProductBits(final StringBuilder productBits, final char product)
|
||||
protected void setProductBits(final StringBuilder productBits, final Product product)
|
||||
{
|
||||
if (product == 'I')
|
||||
if (product == Product.HIGH_SPEED_TRAIN)
|
||||
{
|
||||
productBits.setCharAt(0, '1'); // Flugzeug
|
||||
}
|
||||
else if (product == 'R')
|
||||
else if (product == Product.REGIONAL_TRAIN)
|
||||
{
|
||||
productBits.setCharAt(1, '1'); // Regionalverkehrszug
|
||||
productBits.setCharAt(7, '1'); // Tourismus-Züge
|
||||
productBits.setCharAt(2, '1'); // undokumentiert
|
||||
}
|
||||
else if (product == 'S' || product == 'T')
|
||||
else if (product == Product.SUBURBAN_TRAIN || product == Product.TRAM)
|
||||
{
|
||||
productBits.setCharAt(3, '1'); // Stadtbahn
|
||||
}
|
||||
else if (product == 'U')
|
||||
else if (product == Product.SUBWAY)
|
||||
{
|
||||
productBits.setCharAt(4, '1'); // U-Bahn
|
||||
}
|
||||
else if (product == 'B' || product == 'P')
|
||||
else if (product == Product.BUS || product == Product.ON_DEMAND)
|
||||
{
|
||||
productBits.setCharAt(2, '1'); // Bus
|
||||
}
|
||||
else if (product == 'F')
|
||||
else if (product == Product.FERRY)
|
||||
{
|
||||
productBits.setCharAt(5, '1'); // Express-Boot
|
||||
productBits.setCharAt(6, '1'); // Schiff
|
||||
productBits.setCharAt(7, '1'); // Fähre
|
||||
}
|
||||
else if (product == 'C')
|
||||
else if (product == Product.CABLECAR)
|
||||
{
|
||||
}
|
||||
else
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
package de.schildbach.pte;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Collection;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
@ -26,6 +27,7 @@ import java.util.Set;
|
|||
import de.schildbach.pte.dto.Location;
|
||||
import de.schildbach.pte.dto.LocationType;
|
||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||
import de.schildbach.pte.dto.Product;
|
||||
import de.schildbach.pte.dto.QueryConnectionsContext;
|
||||
import de.schildbach.pte.dto.QueryConnectionsResult;
|
||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
||||
|
@ -68,39 +70,39 @@ public class NsProvider extends AbstractHafasProvider
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void setProductBits(final StringBuilder productBits, final char product)
|
||||
protected void setProductBits(final StringBuilder productBits, final Product product)
|
||||
{
|
||||
if (product == 'I')
|
||||
if (product == Product.HIGH_SPEED_TRAIN)
|
||||
{
|
||||
productBits.setCharAt(0, '1'); // HST
|
||||
productBits.setCharAt(1, '1'); // IC/EC
|
||||
}
|
||||
else if (product == 'R')
|
||||
else if (product == Product.REGIONAL_TRAIN)
|
||||
{
|
||||
productBits.setCharAt(2, '1'); // IR/D
|
||||
productBits.setCharAt(3, '1');
|
||||
}
|
||||
else if (product == 'S')
|
||||
else if (product == Product.SUBURBAN_TRAIN)
|
||||
{
|
||||
productBits.setCharAt(4, '1');
|
||||
}
|
||||
else if (product == 'U')
|
||||
else if (product == Product.SUBWAY)
|
||||
{
|
||||
// productBits.setCharAt(8, '1');
|
||||
}
|
||||
else if (product == 'T')
|
||||
else if (product == Product.TRAM)
|
||||
{
|
||||
// productBits.setCharAt(7, '1');
|
||||
}
|
||||
else if (product == 'B' || product == 'P')
|
||||
else if (product == Product.BUS || product == Product.ON_DEMAND)
|
||||
{
|
||||
// productBits.setCharAt(5, '1');
|
||||
}
|
||||
else if (product == 'F')
|
||||
else if (product == Product.FERRY)
|
||||
{
|
||||
productBits.setCharAt(6, '1'); // boat
|
||||
}
|
||||
else if (product == 'C')
|
||||
else if (product == Product.CABLECAR)
|
||||
{
|
||||
}
|
||||
else
|
||||
|
@ -149,7 +151,7 @@ public class NsProvider extends AbstractHafasProvider
|
|||
|
||||
@Override
|
||||
public QueryConnectionsResult queryConnections(final Location from, final Location via, final Location to, final Date date, final boolean dep,
|
||||
final int maxNumConnections, final String products, final WalkSpeed walkSpeed, final Accessibility accessibility,
|
||||
final int maxNumConnections, final Collection<Product> products, final WalkSpeed walkSpeed, final Accessibility accessibility,
|
||||
final Set<Option> options) throws IOException
|
||||
{
|
||||
return queryConnectionsBinary(from, via, to, date, dep, maxNumConnections, products, walkSpeed, accessibility, options);
|
||||
|
|
|
@ -23,6 +23,7 @@ import java.util.List;
|
|||
import de.schildbach.pte.dto.Location;
|
||||
import de.schildbach.pte.dto.LocationType;
|
||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||
import de.schildbach.pte.dto.Product;
|
||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
||||
|
||||
/**
|
||||
|
@ -53,44 +54,44 @@ public class NvvProvider extends AbstractHafasProvider
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void setProductBits(final StringBuilder productBits, final char product)
|
||||
protected void setProductBits(final StringBuilder productBits, final Product product)
|
||||
{
|
||||
if (product == 'I')
|
||||
if (product == Product.HIGH_SPEED_TRAIN)
|
||||
{
|
||||
productBits.setCharAt(0, '1'); // Zug ICE
|
||||
productBits.setCharAt(1, '1'); // Zug
|
||||
}
|
||||
else if (product == 'R')
|
||||
else if (product == Product.REGIONAL_TRAIN)
|
||||
{
|
||||
productBits.setCharAt(2, '1'); // Zug Nahverkehr
|
||||
productBits.setCharAt(10, '1'); // RegioTram
|
||||
}
|
||||
else if (product == 'S')
|
||||
else if (product == Product.SUBURBAN_TRAIN)
|
||||
{
|
||||
productBits.setCharAt(3, '1'); // S-Bahn
|
||||
}
|
||||
else if (product == 'U')
|
||||
else if (product == Product.SUBWAY)
|
||||
{
|
||||
productBits.setCharAt(4, '1'); // U-Bahn
|
||||
}
|
||||
else if (product == 'T')
|
||||
else if (product == Product.TRAM)
|
||||
{
|
||||
productBits.setCharAt(5, '1'); // Tram
|
||||
}
|
||||
else if (product == 'B')
|
||||
else if (product == Product.BUS)
|
||||
{
|
||||
productBits.setCharAt(6, '1'); // Niederflurbus
|
||||
productBits.setCharAt(7, '1'); // Bus
|
||||
}
|
||||
else if (product == 'P')
|
||||
else if (product == Product.ON_DEMAND)
|
||||
{
|
||||
productBits.setCharAt(9, '1'); // Anruf-Sammel-Taxi
|
||||
}
|
||||
else if (product == 'F')
|
||||
else if (product == Product.FERRY)
|
||||
{
|
||||
productBits.setCharAt(8, '1'); // Schiff
|
||||
}
|
||||
else if (product == 'C')
|
||||
else if (product == Product.CABLECAR)
|
||||
{
|
||||
}
|
||||
else
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
package de.schildbach.pte;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Collection;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
@ -26,6 +27,7 @@ import java.util.Set;
|
|||
import de.schildbach.pte.dto.Location;
|
||||
import de.schildbach.pte.dto.LocationType;
|
||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||
import de.schildbach.pte.dto.Product;
|
||||
import de.schildbach.pte.dto.QueryConnectionsContext;
|
||||
import de.schildbach.pte.dto.QueryConnectionsResult;
|
||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
||||
|
@ -95,9 +97,9 @@ public class OebbProvider extends AbstractHafasProvider
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void setProductBits(final StringBuilder productBits, final char product)
|
||||
protected void setProductBits(final StringBuilder productBits, final Product product)
|
||||
{
|
||||
if (product == 'I')
|
||||
if (product == Product.HIGH_SPEED_TRAIN)
|
||||
{
|
||||
productBits.setCharAt(0, '1'); // railjet/ICE
|
||||
productBits.setCharAt(1, '1'); // ÖBB EC/ÖBB IC
|
||||
|
@ -105,36 +107,36 @@ public class OebbProvider extends AbstractHafasProvider
|
|||
productBits.setCharAt(10, '1'); // Autoreisezug
|
||||
productBits.setCharAt(12, '1'); // westbahn
|
||||
}
|
||||
else if (product == 'R')
|
||||
else if (product == Product.REGIONAL_TRAIN)
|
||||
{
|
||||
productBits.setCharAt(3, '1'); // D/EN
|
||||
productBits.setCharAt(4, '1'); // REX/R
|
||||
}
|
||||
else if (product == 'S')
|
||||
else if (product == Product.SUBURBAN_TRAIN)
|
||||
{
|
||||
productBits.setCharAt(5, '1'); // S-Bahnen
|
||||
}
|
||||
else if (product == 'U')
|
||||
else if (product == Product.SUBWAY)
|
||||
{
|
||||
productBits.setCharAt(8, '1'); // U-Bahn
|
||||
}
|
||||
else if (product == 'T')
|
||||
else if (product == Product.TRAM)
|
||||
{
|
||||
productBits.setCharAt(9, '1'); // Straßenbahn
|
||||
}
|
||||
else if (product == 'B')
|
||||
else if (product == Product.BUS)
|
||||
{
|
||||
productBits.setCharAt(6, '1'); // Busse
|
||||
}
|
||||
else if (product == 'P')
|
||||
else if (product == Product.ON_DEMAND)
|
||||
{
|
||||
productBits.setCharAt(11, '1'); // Anrufpflichtige Verkehre
|
||||
}
|
||||
else if (product == 'F')
|
||||
else if (product == Product.FERRY)
|
||||
{
|
||||
productBits.setCharAt(7, '1'); // Schiffe
|
||||
}
|
||||
else if (product == 'C')
|
||||
else if (product == Product.CABLECAR)
|
||||
{
|
||||
}
|
||||
else
|
||||
|
@ -206,7 +208,7 @@ public class OebbProvider extends AbstractHafasProvider
|
|||
|
||||
@Override
|
||||
public QueryConnectionsResult queryConnections(final Location from, final Location via, final Location to, final Date date, final boolean dep,
|
||||
final int maxNumConnections, final String products, final WalkSpeed walkSpeed, final Accessibility accessibility,
|
||||
final int maxNumConnections, final Collection<Product> products, final WalkSpeed walkSpeed, final Accessibility accessibility,
|
||||
final Set<Option> options) throws IOException
|
||||
{
|
||||
return queryConnectionsBinary(from, via, to, date, dep, maxNumConnections, products, walkSpeed, accessibility, options);
|
||||
|
|
|
@ -23,6 +23,7 @@ import java.util.List;
|
|||
import de.schildbach.pte.dto.Location;
|
||||
import de.schildbach.pte.dto.LocationType;
|
||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||
import de.schildbach.pte.dto.Product;
|
||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
||||
import de.schildbach.pte.util.StringReplaceReader;
|
||||
|
||||
|
@ -78,34 +79,34 @@ public class PlProvider extends AbstractHafasProvider
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void setProductBits(final StringBuilder productBits, final char product)
|
||||
protected void setProductBits(final StringBuilder productBits, final Product product)
|
||||
{
|
||||
if (product == 'I')
|
||||
if (product == Product.HIGH_SPEED_TRAIN)
|
||||
{
|
||||
productBits.setCharAt(0, '1'); // Kolej dużych prędkości
|
||||
productBits.setCharAt(1, '1'); // EC/IC/EIC/Ex
|
||||
}
|
||||
else if (product == 'R')
|
||||
else if (product == Product.REGIONAL_TRAIN)
|
||||
{
|
||||
productBits.setCharAt(2, '1'); // TLK/IR/RE/D/Posp.
|
||||
}
|
||||
else if (product == 'S')
|
||||
else if (product == Product.SUBURBAN_TRAIN)
|
||||
{
|
||||
productBits.setCharAt(3, '1'); // Regio/Osobowe
|
||||
}
|
||||
else if (product == 'U')
|
||||
else if (product == Product.SUBWAY)
|
||||
{
|
||||
productBits.setCharAt(6, '1'); // Metro
|
||||
}
|
||||
else if (product == 'T')
|
||||
else if (product == Product.TRAM)
|
||||
{
|
||||
productBits.setCharAt(5, '1'); // Tramwaj
|
||||
}
|
||||
else if (product == 'B' || product == 'P')
|
||||
else if (product == Product.BUS || product == Product.ON_DEMAND)
|
||||
{
|
||||
productBits.setCharAt(4, '1'); // Autobus
|
||||
}
|
||||
else if (product == 'F' || product == 'C')
|
||||
else if (product == Product.FERRY || product == Product.CABLECAR)
|
||||
{
|
||||
}
|
||||
else
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
package de.schildbach.pte;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Collection;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
@ -26,6 +27,7 @@ import java.util.Set;
|
|||
import de.schildbach.pte.dto.Location;
|
||||
import de.schildbach.pte.dto.LocationType;
|
||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||
import de.schildbach.pte.dto.Product;
|
||||
import de.schildbach.pte.dto.QueryConnectionsContext;
|
||||
import de.schildbach.pte.dto.QueryConnectionsResult;
|
||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
||||
|
@ -59,44 +61,44 @@ public class RmvProvider extends AbstractHafasProvider
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void setProductBits(final StringBuilder productBits, final char product)
|
||||
protected void setProductBits(final StringBuilder productBits, final Product product)
|
||||
{
|
||||
if (product == 'I')
|
||||
if (product == Product.HIGH_SPEED_TRAIN)
|
||||
{
|
||||
productBits.setCharAt(0, '1'); // ICE
|
||||
productBits.setCharAt(1, '1'); // Zug, scheinbar IC?
|
||||
}
|
||||
else if (product == 'R')
|
||||
else if (product == Product.REGIONAL_TRAIN)
|
||||
{
|
||||
productBits.setCharAt(2, '1'); // Zug
|
||||
productBits.setCharAt(10, '1'); // Zug
|
||||
}
|
||||
else if (product == 'S')
|
||||
else if (product == Product.SUBURBAN_TRAIN)
|
||||
{
|
||||
productBits.setCharAt(3, '1'); // S-Bahn
|
||||
}
|
||||
else if (product == 'U')
|
||||
else if (product == Product.SUBWAY)
|
||||
{
|
||||
productBits.setCharAt(4, '1'); // U-Bahn
|
||||
}
|
||||
else if (product == 'T')
|
||||
else if (product == Product.TRAM)
|
||||
{
|
||||
productBits.setCharAt(5, '1'); // Straßenbahn
|
||||
}
|
||||
else if (product == 'B')
|
||||
else if (product == Product.BUS)
|
||||
{
|
||||
productBits.setCharAt(6, '1'); // Niederflurbus
|
||||
productBits.setCharAt(7, '1'); // Bus
|
||||
}
|
||||
else if (product == 'P')
|
||||
else if (product == Product.ON_DEMAND)
|
||||
{
|
||||
productBits.setCharAt(9, '1'); // AST/Rufbus
|
||||
}
|
||||
else if (product == 'F')
|
||||
else if (product == Product.FERRY)
|
||||
{
|
||||
productBits.setCharAt(8, '1'); // Fähre/Schiff
|
||||
}
|
||||
else if (product == 'C')
|
||||
else if (product == Product.CABLECAR)
|
||||
{
|
||||
}
|
||||
else
|
||||
|
@ -214,7 +216,7 @@ public class RmvProvider extends AbstractHafasProvider
|
|||
|
||||
@Override
|
||||
public QueryConnectionsResult queryConnections(final Location from, final Location via, final Location to, final Date date, final boolean dep,
|
||||
final int maxNumConnections, final String products, final WalkSpeed walkSpeed, final Accessibility accessibility,
|
||||
final int maxNumConnections, final Collection<Product> products, final WalkSpeed walkSpeed, final Accessibility accessibility,
|
||||
final Set<Option> options) throws IOException
|
||||
{
|
||||
return queryConnectionsBinary(from, via, to, date, dep, maxNumConnections, products, walkSpeed, accessibility, options);
|
||||
|
|
|
@ -24,6 +24,7 @@ import java.util.Locale;
|
|||
import de.schildbach.pte.dto.Location;
|
||||
import de.schildbach.pte.dto.LocationType;
|
||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||
import de.schildbach.pte.dto.Product;
|
||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
||||
import de.schildbach.pte.util.ParserUtils;
|
||||
|
||||
|
@ -55,43 +56,43 @@ public class RtProvider extends AbstractHafasProvider
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void setProductBits(final StringBuilder productBits, final char product)
|
||||
protected void setProductBits(final StringBuilder productBits, final Product product)
|
||||
{
|
||||
if (product == 'I')
|
||||
if (product == Product.HIGH_SPEED_TRAIN)
|
||||
{
|
||||
productBits.setCharAt(0, '1'); // Hochgeschwindigkeitszug
|
||||
productBits.setCharAt(1, '1'); // IC/EC
|
||||
productBits.setCharAt(2, '1'); // Fernverkehrszug
|
||||
}
|
||||
else if (product == 'R')
|
||||
else if (product == Product.REGIONAL_TRAIN)
|
||||
{
|
||||
productBits.setCharAt(3, '1'); // Regionalverkehrszug
|
||||
}
|
||||
else if (product == 'S')
|
||||
else if (product == Product.SUBURBAN_TRAIN)
|
||||
{
|
||||
productBits.setCharAt(4, '1'); // S-Bahn
|
||||
}
|
||||
else if (product == 'U')
|
||||
else if (product == Product.SUBWAY)
|
||||
{
|
||||
productBits.setCharAt(7, '1'); // U-Bahn
|
||||
}
|
||||
else if (product == 'T')
|
||||
else if (product == Product.TRAM)
|
||||
{
|
||||
productBits.setCharAt(8, '1'); // Stadtbahn
|
||||
}
|
||||
else if (product == 'B')
|
||||
else if (product == Product.BUS)
|
||||
{
|
||||
productBits.setCharAt(5, '1'); // Bus
|
||||
}
|
||||
else if (product == 'P')
|
||||
else if (product == Product.ON_DEMAND)
|
||||
{
|
||||
productBits.setCharAt(9, '1'); // Anruf-Sammel-Taxi
|
||||
}
|
||||
else if (product == 'F')
|
||||
else if (product == Product.FERRY)
|
||||
{
|
||||
productBits.setCharAt(6, '1'); // Schiff
|
||||
}
|
||||
else if (product == 'C')
|
||||
else if (product == Product.CABLECAR)
|
||||
{
|
||||
}
|
||||
else
|
||||
|
|
|
@ -6,6 +6,7 @@ import java.text.SimpleDateFormat;
|
|||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Calendar;
|
||||
import java.util.Collection;
|
||||
import java.util.Currency;
|
||||
import java.util.Date;
|
||||
import java.util.GregorianCalendar;
|
||||
|
@ -32,6 +33,7 @@ import de.schildbach.pte.dto.Line;
|
|||
import de.schildbach.pte.dto.Location;
|
||||
import de.schildbach.pte.dto.LocationType;
|
||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||
import de.schildbach.pte.dto.Product;
|
||||
import de.schildbach.pte.dto.QueryConnectionsContext;
|
||||
import de.schildbach.pte.dto.QueryConnectionsResult;
|
||||
import de.schildbach.pte.dto.QueryConnectionsResult.Status;
|
||||
|
@ -122,8 +124,8 @@ public class SadProvider extends AbstractNetworkProvider {
|
|||
return list;
|
||||
}
|
||||
|
||||
public QueryConnectionsResult queryConnections(Location from, Location via, Location to, Date date, boolean dep, final int numConnections, String products,
|
||||
WalkSpeed walkSpeed, Accessibility accessibility, Set<Option> options) throws IOException {
|
||||
public QueryConnectionsResult queryConnections(Location from, Location via, Location to, Date date, boolean dep, final int numConnections,
|
||||
Collection<Product> products, WalkSpeed walkSpeed, Accessibility accessibility, Set<Option> options) throws IOException {
|
||||
|
||||
// Select correct SOAP method depending on the dep flag
|
||||
final String soapMethod = dep ? "searchCollPartenza" : "searchCollArrivo";
|
||||
|
|
|
@ -24,6 +24,7 @@ import java.util.Locale;
|
|||
import de.schildbach.pte.dto.Location;
|
||||
import de.schildbach.pte.dto.LocationType;
|
||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||
import de.schildbach.pte.dto.Product;
|
||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
||||
import de.schildbach.pte.util.ParserUtils;
|
||||
|
||||
|
@ -56,36 +57,36 @@ public class SbbProvider extends AbstractHafasProvider
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void setProductBits(final StringBuilder productBits, final char product)
|
||||
protected void setProductBits(final StringBuilder productBits, final Product product)
|
||||
{
|
||||
if (product == 'I')
|
||||
if (product == Product.HIGH_SPEED_TRAIN)
|
||||
{
|
||||
productBits.setCharAt(0, '1'); // ICE/TGV/IRJ
|
||||
productBits.setCharAt(1, '1'); // EC/IC
|
||||
}
|
||||
else if (product == 'R')
|
||||
else if (product == Product.REGIONAL_TRAIN)
|
||||
{
|
||||
productBits.setCharAt(2, '1'); // IR
|
||||
productBits.setCharAt(3, '1'); // RE/D
|
||||
productBits.setCharAt(8, '1'); // ARZ/EXT
|
||||
}
|
||||
else if (product == 'S')
|
||||
else if (product == Product.SUBURBAN_TRAIN)
|
||||
{
|
||||
productBits.setCharAt(5, '1'); // S/SN/R
|
||||
}
|
||||
else if (product == 'U' || product == 'T')
|
||||
else if (product == Product.SUBWAY || product == Product.TRAM)
|
||||
{
|
||||
productBits.setCharAt(9, '1'); // Tram/Metro
|
||||
}
|
||||
else if (product == 'B' || product == 'P')
|
||||
else if (product == Product.BUS || product == Product.ON_DEMAND)
|
||||
{
|
||||
productBits.setCharAt(6, '1'); // Bus
|
||||
}
|
||||
else if (product == 'F')
|
||||
else if (product == Product.FERRY)
|
||||
{
|
||||
productBits.setCharAt(4, '1'); // Schiff
|
||||
}
|
||||
else if (product == 'C')
|
||||
else if (product == Product.CABLECAR)
|
||||
{
|
||||
productBits.setCharAt(7, '1'); // Seilbahn
|
||||
}
|
||||
|
|
|
@ -27,6 +27,7 @@ import de.schildbach.pte.dto.Line;
|
|||
import de.schildbach.pte.dto.Location;
|
||||
import de.schildbach.pte.dto.LocationType;
|
||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||
import de.schildbach.pte.dto.Product;
|
||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
||||
import de.schildbach.pte.util.ParserUtils;
|
||||
|
||||
|
@ -87,42 +88,42 @@ public class SeProvider extends AbstractHafasProvider
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void setProductBits(final StringBuilder productBits, final char product)
|
||||
protected void setProductBits(final StringBuilder productBits, final Product product)
|
||||
{
|
||||
if (product == 'I')
|
||||
if (product == Product.HIGH_SPEED_TRAIN)
|
||||
{
|
||||
productBits.setCharAt(0, '1'); // Flyg
|
||||
productBits.setCharAt(1, '1'); // Snabbtåg
|
||||
}
|
||||
else if (product == 'R')
|
||||
else if (product == Product.REGIONAL_TRAIN)
|
||||
{
|
||||
productBits.setCharAt(2, '1'); // Tåg
|
||||
productBits.setCharAt(4, '1'); // Lokaltåg
|
||||
}
|
||||
else if (product == 'S')
|
||||
else if (product == Product.SUBURBAN_TRAIN)
|
||||
{
|
||||
}
|
||||
else if (product == 'U')
|
||||
else if (product == Product.SUBWAY)
|
||||
{
|
||||
productBits.setCharAt(5, '1'); // Tunnelbana
|
||||
}
|
||||
else if (product == 'T')
|
||||
else if (product == Product.TRAM)
|
||||
{
|
||||
productBits.setCharAt(6, '1'); // Spårvagn
|
||||
}
|
||||
else if (product == 'B')
|
||||
else if (product == Product.BUS)
|
||||
{
|
||||
productBits.setCharAt(3, '1'); // Expressbuss
|
||||
productBits.setCharAt(7, '1'); // Buss
|
||||
}
|
||||
else if (product == 'P')
|
||||
else if (product == Product.ON_DEMAND)
|
||||
{
|
||||
}
|
||||
else if (product == 'F')
|
||||
else if (product == Product.FERRY)
|
||||
{
|
||||
productBits.setCharAt(8, '1'); // Båt
|
||||
}
|
||||
else if (product == 'C')
|
||||
else if (product == Product.CABLECAR)
|
||||
{
|
||||
}
|
||||
else
|
||||
|
|
|
@ -33,6 +33,7 @@ import de.schildbach.pte.dto.Line;
|
|||
import de.schildbach.pte.dto.Location;
|
||||
import de.schildbach.pte.dto.LocationType;
|
||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||
import de.schildbach.pte.dto.Product;
|
||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
||||
import de.schildbach.pte.dto.QueryDeparturesResult.Status;
|
||||
import de.schildbach.pte.dto.ResultHeader;
|
||||
|
@ -75,28 +76,28 @@ public class SeptaProvider extends AbstractHafasProvider
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void setProductBits(final StringBuilder productBits, final char product)
|
||||
protected void setProductBits(final StringBuilder productBits, final Product product)
|
||||
{
|
||||
if (product == 'I')
|
||||
if (product == Product.HIGH_SPEED_TRAIN)
|
||||
{
|
||||
}
|
||||
else if (product == 'R' || product == 'S')
|
||||
else if (product == Product.REGIONAL_TRAIN || product == Product.SUBURBAN_TRAIN)
|
||||
{
|
||||
productBits.setCharAt(3, '1'); // Regional Rail
|
||||
}
|
||||
else if (product == 'U')
|
||||
else if (product == Product.SUBWAY)
|
||||
{
|
||||
productBits.setCharAt(0, '1'); // Subway
|
||||
}
|
||||
else if (product == 'T')
|
||||
else if (product == Product.TRAM)
|
||||
{
|
||||
productBits.setCharAt(1, '1'); // Trolley
|
||||
}
|
||||
else if (product == 'B')
|
||||
else if (product == Product.BUS)
|
||||
{
|
||||
productBits.setCharAt(2, '1'); // Bus
|
||||
}
|
||||
else if (product == 'P' || product == 'F' || product == 'C')
|
||||
else if (product == Product.ON_DEMAND || product == Product.FERRY || product == Product.CABLECAR)
|
||||
{
|
||||
}
|
||||
else
|
||||
|
|
|
@ -31,6 +31,7 @@ import de.schildbach.pte.dto.Line;
|
|||
import de.schildbach.pte.dto.Location;
|
||||
import de.schildbach.pte.dto.LocationType;
|
||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||
import de.schildbach.pte.dto.Product;
|
||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
||||
import de.schildbach.pte.dto.QueryDeparturesResult.Status;
|
||||
import de.schildbach.pte.dto.ResultHeader;
|
||||
|
@ -67,43 +68,43 @@ public class ShProvider extends AbstractHafasProvider
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void setProductBits(final StringBuilder productBits, final char product)
|
||||
protected void setProductBits(final StringBuilder productBits, final Product product)
|
||||
{
|
||||
if (product == 'I')
|
||||
if (product == Product.HIGH_SPEED_TRAIN)
|
||||
{
|
||||
productBits.setCharAt(0, '1'); // Hochgeschwindigkeitszug
|
||||
productBits.setCharAt(1, '1'); // IC/EC
|
||||
productBits.setCharAt(2, '1'); // Fernverkehrszug
|
||||
}
|
||||
else if (product == 'R')
|
||||
else if (product == Product.REGIONAL_TRAIN)
|
||||
{
|
||||
productBits.setCharAt(3, '1'); // Regionalverkehrszug
|
||||
}
|
||||
else if (product == 'S')
|
||||
else if (product == Product.SUBURBAN_TRAIN)
|
||||
{
|
||||
productBits.setCharAt(4, '1'); // S-Bahn
|
||||
}
|
||||
else if (product == 'U')
|
||||
else if (product == Product.SUBWAY)
|
||||
{
|
||||
productBits.setCharAt(7, '1'); // U-Bahn
|
||||
}
|
||||
else if (product == 'T')
|
||||
else if (product == Product.TRAM)
|
||||
{
|
||||
productBits.setCharAt(8, '1'); // Stadtbahn
|
||||
}
|
||||
else if (product == 'B')
|
||||
else if (product == Product.BUS)
|
||||
{
|
||||
productBits.setCharAt(5, '1'); // Bus
|
||||
}
|
||||
else if (product == 'P')
|
||||
else if (product == Product.ON_DEMAND)
|
||||
{
|
||||
productBits.setCharAt(9, '1'); // Anruf-Sammel-Taxi
|
||||
}
|
||||
else if (product == 'F')
|
||||
else if (product == Product.FERRY)
|
||||
{
|
||||
productBits.setCharAt(6, '1'); // Schiff
|
||||
}
|
||||
else if (product == 'C')
|
||||
else if (product == Product.CABLECAR)
|
||||
{
|
||||
}
|
||||
else
|
||||
|
|
|
@ -24,6 +24,7 @@ import java.util.Locale;
|
|||
import de.schildbach.pte.dto.Location;
|
||||
import de.schildbach.pte.dto.LocationType;
|
||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||
import de.schildbach.pte.dto.Product;
|
||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
||||
import de.schildbach.pte.util.ParserUtils;
|
||||
|
||||
|
@ -55,30 +56,30 @@ public class SncbProvider extends AbstractHafasProvider
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void setProductBits(final StringBuilder productBits, final char product)
|
||||
protected void setProductBits(final StringBuilder productBits, final Product product)
|
||||
{
|
||||
if (product == 'I')
|
||||
if (product == Product.HIGH_SPEED_TRAIN)
|
||||
{
|
||||
productBits.setCharAt(0, '1'); // Hochgeschwindigkeitszug
|
||||
productBits.setCharAt(2, '1'); // IC/IR/P/ICT
|
||||
}
|
||||
else if (product == 'R' || product == 'S')
|
||||
else if (product == Product.REGIONAL_TRAIN || product == Product.SUBURBAN_TRAIN)
|
||||
{
|
||||
productBits.setCharAt(6, '1'); // Zug
|
||||
}
|
||||
else if (product == 'U')
|
||||
else if (product == Product.SUBWAY)
|
||||
{
|
||||
productBits.setCharAt(8, '1'); // Metro
|
||||
}
|
||||
else if (product == 'T')
|
||||
else if (product == Product.TRAM)
|
||||
{
|
||||
productBits.setCharAt(10, '1'); // Stadtbahn
|
||||
}
|
||||
else if (product == 'B' || product == 'P')
|
||||
else if (product == Product.BUS || product == Product.ON_DEMAND)
|
||||
{
|
||||
productBits.setCharAt(9, '1'); // Bus
|
||||
}
|
||||
else if (product == 'F' || product == 'C')
|
||||
else if (product == Product.FERRY || product == Product.CABLECAR)
|
||||
{
|
||||
}
|
||||
else
|
||||
|
|
|
@ -27,6 +27,7 @@ import de.schildbach.pte.dto.Line;
|
|||
import de.schildbach.pte.dto.Location;
|
||||
import de.schildbach.pte.dto.LocationType;
|
||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||
import de.schildbach.pte.dto.Product;
|
||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
||||
import de.schildbach.pte.util.ParserUtils;
|
||||
|
||||
|
@ -77,39 +78,39 @@ public class StockholmProvider extends AbstractHafasProvider
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void setProductBits(final StringBuilder productBits, final char product)
|
||||
protected void setProductBits(final StringBuilder productBits, final Product product)
|
||||
{
|
||||
if (product == 'I')
|
||||
if (product == Product.HIGH_SPEED_TRAIN)
|
||||
{
|
||||
}
|
||||
else if (product == 'R')
|
||||
else if (product == Product.REGIONAL_TRAIN)
|
||||
{
|
||||
productBits.setCharAt(2, '1'); // Lokalbanor
|
||||
}
|
||||
else if (product == 'S')
|
||||
else if (product == Product.SUBURBAN_TRAIN)
|
||||
{
|
||||
productBits.setCharAt(0, '1'); // Pendeltåg
|
||||
}
|
||||
else if (product == 'U')
|
||||
else if (product == Product.SUBWAY)
|
||||
{
|
||||
productBits.setCharAt(1, '1'); // Tunnelbana
|
||||
}
|
||||
else if (product == 'T')
|
||||
else if (product == Product.TRAM)
|
||||
{
|
||||
}
|
||||
else if (product == 'B')
|
||||
else if (product == Product.BUS)
|
||||
{
|
||||
productBits.setCharAt(3, '1'); // Bussar
|
||||
productBits.setCharAt(4, '1'); // Flygbussar
|
||||
}
|
||||
else if (product == 'P')
|
||||
else if (product == Product.ON_DEMAND)
|
||||
{
|
||||
}
|
||||
else if (product == 'F')
|
||||
else if (product == Product.FERRY)
|
||||
{
|
||||
productBits.setCharAt(6, '1'); // Båt
|
||||
}
|
||||
else if (product == 'C')
|
||||
else if (product == Product.CABLECAR)
|
||||
{
|
||||
}
|
||||
else
|
||||
|
|
|
@ -26,6 +26,7 @@ import java.util.regex.Pattern;
|
|||
import de.schildbach.pte.dto.Location;
|
||||
import de.schildbach.pte.dto.LocationType;
|
||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||
import de.schildbach.pte.dto.Product;
|
||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
||||
import de.schildbach.pte.util.ParserUtils;
|
||||
|
||||
|
@ -78,37 +79,37 @@ public class VbbProvider extends AbstractHafasProvider
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void setProductBits(final StringBuilder productBits, final char product)
|
||||
protected void setProductBits(final StringBuilder productBits, final Product product)
|
||||
{
|
||||
if (product == 'I')
|
||||
if (product == Product.HIGH_SPEED_TRAIN)
|
||||
{
|
||||
productBits.setCharAt(5, '1');
|
||||
}
|
||||
else if (product == 'R')
|
||||
else if (product == Product.REGIONAL_TRAIN)
|
||||
{
|
||||
productBits.setCharAt(6, '1');
|
||||
}
|
||||
else if (product == 'S')
|
||||
else if (product == Product.SUBURBAN_TRAIN)
|
||||
{
|
||||
productBits.setCharAt(0, '1');
|
||||
}
|
||||
else if (product == 'U')
|
||||
else if (product == Product.SUBWAY)
|
||||
{
|
||||
productBits.setCharAt(1, '1');
|
||||
}
|
||||
else if (product == 'T')
|
||||
else if (product == Product.TRAM)
|
||||
{
|
||||
productBits.setCharAt(2, '1');
|
||||
}
|
||||
else if (product == 'B' || product == 'P')
|
||||
else if (product == Product.BUS || product == Product.ON_DEMAND)
|
||||
{
|
||||
productBits.setCharAt(3, '1');
|
||||
}
|
||||
else if (product == 'F')
|
||||
else if (product == Product.FERRY)
|
||||
{
|
||||
productBits.setCharAt(4, '1');
|
||||
}
|
||||
else if (product == 'C')
|
||||
else if (product == Product.CABLECAR)
|
||||
{
|
||||
}
|
||||
else
|
||||
|
|
|
@ -24,6 +24,7 @@ import java.util.Locale;
|
|||
import de.schildbach.pte.dto.Location;
|
||||
import de.schildbach.pte.dto.LocationType;
|
||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||
import de.schildbach.pte.dto.Product;
|
||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
||||
import de.schildbach.pte.util.ParserUtils;
|
||||
|
||||
|
@ -55,43 +56,43 @@ public class VbnProvider extends AbstractHafasProvider
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void setProductBits(final StringBuilder productBits, final char product)
|
||||
protected void setProductBits(final StringBuilder productBits, final Product product)
|
||||
{
|
||||
if (product == 'I')
|
||||
if (product == Product.HIGH_SPEED_TRAIN)
|
||||
{
|
||||
productBits.setCharAt(0, '1'); // Hochgeschwindigkeitszug
|
||||
productBits.setCharAt(1, '1'); // IC/EC
|
||||
productBits.setCharAt(2, '1'); // Fernverkehrszug
|
||||
}
|
||||
else if (product == 'R')
|
||||
else if (product == Product.REGIONAL_TRAIN)
|
||||
{
|
||||
productBits.setCharAt(3, '1'); // Regionalverkehrszug
|
||||
}
|
||||
else if (product == 'S')
|
||||
else if (product == Product.SUBURBAN_TRAIN)
|
||||
{
|
||||
productBits.setCharAt(4, '1'); // S-Bahn
|
||||
}
|
||||
else if (product == 'U')
|
||||
else if (product == Product.SUBWAY)
|
||||
{
|
||||
productBits.setCharAt(7, '1'); // U-Bahn
|
||||
}
|
||||
else if (product == 'T')
|
||||
else if (product == Product.TRAM)
|
||||
{
|
||||
productBits.setCharAt(8, '1'); // Stadtbahn
|
||||
}
|
||||
else if (product == 'B')
|
||||
else if (product == Product.BUS)
|
||||
{
|
||||
productBits.setCharAt(5, '1'); // Bus
|
||||
}
|
||||
else if (product == 'P')
|
||||
else if (product == Product.ON_DEMAND)
|
||||
{
|
||||
productBits.setCharAt(9, '1'); // Anruf-Sammel-Taxi
|
||||
}
|
||||
else if (product == 'F')
|
||||
else if (product == Product.FERRY)
|
||||
{
|
||||
productBits.setCharAt(6, '1'); // Schiff
|
||||
}
|
||||
else if (product == 'C')
|
||||
else if (product == Product.CABLECAR)
|
||||
{
|
||||
}
|
||||
else
|
||||
|
|
|
@ -17,10 +17,12 @@
|
|||
|
||||
package de.schildbach.pte;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Date;
|
||||
import java.util.Set;
|
||||
|
||||
import de.schildbach.pte.dto.Location;
|
||||
import de.schildbach.pte.dto.Product;
|
||||
|
||||
/**
|
||||
* @author Andreas Schildbach
|
||||
|
@ -52,7 +54,8 @@ public class VgnProvider extends AbstractEfaProvider
|
|||
|
||||
@Override
|
||||
protected String xsltTripRequestParameters(final Location from, final Location via, final Location to, final Date date, final boolean dep,
|
||||
final int numConnections, final String products, final WalkSpeed walkSpeed, final Accessibility accessibility, final Set<Option> options)
|
||||
final int numConnections, final Collection<Product> products, final WalkSpeed walkSpeed, final Accessibility accessibility,
|
||||
final Set<Option> options)
|
||||
{
|
||||
return super.xsltTripRequestParameters(from, via, to, date, dep, numConnections, products, walkSpeed, accessibility, options)
|
||||
+ "&itdLPxx_showTariffLevel=1";
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
package de.schildbach.pte;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Collection;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
@ -26,6 +27,7 @@ import java.util.Set;
|
|||
import de.schildbach.pte.dto.Location;
|
||||
import de.schildbach.pte.dto.LocationType;
|
||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||
import de.schildbach.pte.dto.Product;
|
||||
import de.schildbach.pte.dto.QueryConnectionsContext;
|
||||
import de.schildbach.pte.dto.QueryConnectionsResult;
|
||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
||||
|
@ -58,44 +60,44 @@ public class VgsProvider extends AbstractHafasProvider
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void setProductBits(final StringBuilder productBits, final char product)
|
||||
protected void setProductBits(final StringBuilder productBits, final Product product)
|
||||
{
|
||||
if (product == 'I')
|
||||
if (product == Product.HIGH_SPEED_TRAIN)
|
||||
{
|
||||
productBits.setCharAt(0, '1'); // Hochgeschwindigkeitszug
|
||||
productBits.setCharAt(1, '1'); // IC/EC
|
||||
productBits.setCharAt(2, '1'); // Fernverkehrszug
|
||||
}
|
||||
else if (product == 'R')
|
||||
else if (product == Product.REGIONAL_TRAIN)
|
||||
{
|
||||
productBits.setCharAt(3, '1'); // Regionalverkehrszug
|
||||
}
|
||||
else if (product == 'S')
|
||||
else if (product == Product.SUBURBAN_TRAIN)
|
||||
{
|
||||
productBits.setCharAt(4, '1'); // S-Bahn
|
||||
}
|
||||
else if (product == 'U')
|
||||
else if (product == Product.SUBWAY)
|
||||
{
|
||||
productBits.setCharAt(5, '1'); // U-Bahn
|
||||
}
|
||||
else if (product == 'T')
|
||||
else if (product == Product.TRAM)
|
||||
{
|
||||
productBits.setCharAt(6, '1'); // Stadtbahn
|
||||
}
|
||||
else if (product == 'B')
|
||||
else if (product == Product.BUS)
|
||||
{
|
||||
productBits.setCharAt(7, '1'); // Bus
|
||||
productBits.setCharAt(10, '1'); // Schulbus
|
||||
}
|
||||
else if (product == 'P')
|
||||
else if (product == Product.ON_DEMAND)
|
||||
{
|
||||
productBits.setCharAt(9, '1'); // Anruf-Sammel-Taxi
|
||||
}
|
||||
else if (product == 'F')
|
||||
else if (product == Product.FERRY)
|
||||
{
|
||||
productBits.setCharAt(8, '1'); // Schiff
|
||||
}
|
||||
else if (product == 'C')
|
||||
else if (product == Product.CABLECAR)
|
||||
{
|
||||
}
|
||||
else
|
||||
|
@ -182,7 +184,7 @@ public class VgsProvider extends AbstractHafasProvider
|
|||
|
||||
@Override
|
||||
public QueryConnectionsResult queryConnections(final Location from, final Location via, final Location to, final Date date, final boolean dep,
|
||||
final int maxNumConnections, final String products, final WalkSpeed walkSpeed, final Accessibility accessibility,
|
||||
final int maxNumConnections, final Collection<Product> products, final WalkSpeed walkSpeed, final Accessibility accessibility,
|
||||
final Set<Option> options) throws IOException
|
||||
{
|
||||
return queryConnectionsBinary(from, via, to, date, dep, maxNumConnections, products, walkSpeed, accessibility, options);
|
||||
|
|
|
@ -27,6 +27,7 @@ import de.schildbach.pte.dto.Line;
|
|||
import de.schildbach.pte.dto.Location;
|
||||
import de.schildbach.pte.dto.LocationType;
|
||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||
import de.schildbach.pte.dto.Product;
|
||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
||||
import de.schildbach.pte.dto.Style;
|
||||
import de.schildbach.pte.dto.Style.Shape;
|
||||
|
@ -86,38 +87,38 @@ public class ZvvProvider extends AbstractHafasProvider
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void setProductBits(final StringBuilder productBits, final char product)
|
||||
protected void setProductBits(final StringBuilder productBits, final Product product)
|
||||
{
|
||||
if (product == 'I')
|
||||
if (product == Product.HIGH_SPEED_TRAIN)
|
||||
{
|
||||
productBits.setCharAt(0, '1'); // ICE/EN/CNL/CIS/ES/MET/NZ/PEN/TGV/THA/X2
|
||||
productBits.setCharAt(1, '1'); // EuroCity/InterCity/InterCityNight/SuperCity
|
||||
}
|
||||
else if (product == 'R')
|
||||
else if (product == Product.REGIONAL_TRAIN)
|
||||
{
|
||||
productBits.setCharAt(2, '1'); // InterRegio
|
||||
productBits.setCharAt(3, '1'); // Schnellzug/RegioExpress
|
||||
}
|
||||
else if (product == 'S')
|
||||
else if (product == Product.SUBURBAN_TRAIN)
|
||||
{
|
||||
productBits.setCharAt(5, '1'); // S-Bahn/StadtExpress/Eilzug/Regionalzug
|
||||
}
|
||||
else if (product == 'U')
|
||||
else if (product == Product.SUBWAY)
|
||||
{
|
||||
}
|
||||
else if (product == 'T')
|
||||
else if (product == Product.TRAM)
|
||||
{
|
||||
productBits.setCharAt(9, '1'); // Tram
|
||||
}
|
||||
else if (product == 'B' || product == 'P')
|
||||
else if (product == Product.BUS || product == Product.ON_DEMAND)
|
||||
{
|
||||
productBits.setCharAt(6, '1'); // Postauto/Bus
|
||||
}
|
||||
else if (product == 'F')
|
||||
else if (product == Product.FERRY)
|
||||
{
|
||||
productBits.setCharAt(4, '1'); // Schiff/Fähre/Dampfschiff
|
||||
}
|
||||
else if (product == 'C')
|
||||
else if (product == Product.CABLECAR)
|
||||
{
|
||||
productBits.setCharAt(7, '1'); // Luftseilbahn/Standseilbahn/Bergbahn
|
||||
}
|
||||
|
|
63
enabler/src/de/schildbach/pte/dto/Product.java
Normal file
63
enabler/src/de/schildbach/pte/dto/Product.java
Normal file
|
@ -0,0 +1,63 @@
|
|||
/*
|
||||
* Copyright 2010-2013 the original author or authors.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package de.schildbach.pte.dto;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Andreas Schildbach
|
||||
*/
|
||||
public enum Product
|
||||
{
|
||||
HIGH_SPEED_TRAIN('I'), REGIONAL_TRAIN('R'), SUBURBAN_TRAIN('S'), SUBWAY('U'), TRAM('T'), BUS('B'), FERRY('F'), CABLECAR('C'), ON_DEMAND('P');
|
||||
|
||||
public static final char UNKNOWN = '?';
|
||||
public static final List<Product> ALL = Arrays.asList(values());
|
||||
|
||||
public final char code;
|
||||
|
||||
private Product(final char code)
|
||||
{
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public static Product fromCode(char code)
|
||||
{
|
||||
if (code == HIGH_SPEED_TRAIN.code)
|
||||
return HIGH_SPEED_TRAIN;
|
||||
else if (code == REGIONAL_TRAIN.code)
|
||||
return REGIONAL_TRAIN;
|
||||
else if (code == SUBURBAN_TRAIN.code)
|
||||
return SUBURBAN_TRAIN;
|
||||
else if (code == SUBWAY.code)
|
||||
return SUBWAY;
|
||||
else if (code == TRAM.code)
|
||||
return TRAM;
|
||||
else if (code == BUS.code)
|
||||
return BUS;
|
||||
else if (code == FERRY.code)
|
||||
return FERRY;
|
||||
else if (code == CABLECAR.code)
|
||||
return CABLECAR;
|
||||
else if (code == ON_DEMAND.code)
|
||||
return ON_DEMAND;
|
||||
else
|
||||
throw new IllegalArgumentException(Character.toString(code));
|
||||
}
|
||||
}
|
|
@ -18,6 +18,7 @@
|
|||
package de.schildbach.pte.live;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Collection;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
|
@ -26,6 +27,7 @@ import de.schildbach.pte.NetworkProvider.Accessibility;
|
|||
import de.schildbach.pte.NetworkProvider.WalkSpeed;
|
||||
import de.schildbach.pte.dto.Location;
|
||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||
import de.schildbach.pte.dto.Product;
|
||||
import de.schildbach.pte.dto.QueryConnectionsContext;
|
||||
import de.schildbach.pte.dto.QueryConnectionsResult;
|
||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
||||
|
@ -35,8 +37,6 @@ import de.schildbach.pte.dto.QueryDeparturesResult;
|
|||
*/
|
||||
public abstract class AbstractProviderLiveTest
|
||||
{
|
||||
protected static final String ALL_PRODUCTS = "IRSUTBFC";
|
||||
|
||||
protected final NetworkProvider provider;
|
||||
|
||||
public AbstractProviderLiveTest(final NetworkProvider provider)
|
||||
|
@ -68,7 +68,7 @@ public abstract class AbstractProviderLiveTest
|
|||
}
|
||||
|
||||
protected final QueryConnectionsResult queryConnections(final Location from, final Location via, final Location to, final Date date,
|
||||
final boolean dep, final String products, final WalkSpeed walkSpeed, final Accessibility accessibility) throws IOException
|
||||
final boolean dep, final Collection<Product> products, final WalkSpeed walkSpeed, final Accessibility accessibility) throws IOException
|
||||
{
|
||||
return provider.queryConnections(from, via, to, date, dep, 4, products, walkSpeed, accessibility, null);
|
||||
}
|
||||
|
|
|
@ -28,6 +28,7 @@ import de.schildbach.pte.NetworkProvider.WalkSpeed;
|
|||
import de.schildbach.pte.dto.Location;
|
||||
import de.schildbach.pte.dto.LocationType;
|
||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||
import de.schildbach.pte.dto.Product;
|
||||
import de.schildbach.pte.dto.QueryConnectionsResult;
|
||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
||||
|
||||
|
@ -86,7 +87,7 @@ public class AtcProviderLiveTest extends AbstractProviderLiveTest
|
|||
public void shortConnection() throws Exception
|
||||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.STATION, 0, null, "Hauptwache"), null, new Location(
|
||||
LocationType.STATION, 0, null, "Südbahnhof"), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
LocationType.STATION, 0, null, "Südbahnhof"), new Date(), true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
final QueryConnectionsResult laterResult = queryMoreConnections(result.context, true);
|
||||
System.out.println(laterResult);
|
||||
|
|
|
@ -31,6 +31,7 @@ import de.schildbach.pte.NetworkProvider.WalkSpeed;
|
|||
import de.schildbach.pte.dto.Location;
|
||||
import de.schildbach.pte.dto.LocationType;
|
||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||
import de.schildbach.pte.dto.Product;
|
||||
import de.schildbach.pte.dto.QueryConnectionsResult;
|
||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
||||
|
||||
|
@ -88,7 +89,7 @@ public class AvvProviderLiveTest extends AbstractProviderLiveTest
|
|||
public void shortConnection() throws Exception
|
||||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.STATION, 101, null, "Königsplatz"), null, new Location(
|
||||
LocationType.STATION, 100, null, "Hauptbahnhof"), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
LocationType.STATION, 100, null, "Hauptbahnhof"), new Date(), true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
assertEquals(QueryConnectionsResult.Status.OK, result.status);
|
||||
assertTrue(result.connections.size() > 0);
|
||||
|
|
|
@ -30,6 +30,7 @@ import de.schildbach.pte.NetworkProvider.WalkSpeed;
|
|||
import de.schildbach.pte.dto.Location;
|
||||
import de.schildbach.pte.dto.LocationType;
|
||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||
import de.schildbach.pte.dto.Product;
|
||||
import de.schildbach.pte.dto.QueryConnectionsResult;
|
||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
||||
|
||||
|
@ -99,7 +100,7 @@ public class BahnProviderLiveTest extends AbstractProviderLiveTest
|
|||
public void shortConnection() throws Exception
|
||||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.STATION, 8011160, null, "Berlin Hbf"), null, new Location(
|
||||
LocationType.STATION, 8010205, null, "Leipzig Hbf"), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
LocationType.STATION, 8010205, null, "Leipzig Hbf"), new Date(), true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
final QueryConnectionsResult laterResult = queryMoreConnections(result.context, true);
|
||||
System.out.println(laterResult);
|
||||
|
@ -116,7 +117,7 @@ public class BahnProviderLiveTest extends AbstractProviderLiveTest
|
|||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.STATION, 732655, 52535576, 13422171, null,
|
||||
"Marienburger Str., Berlin"), null, new Location(LocationType.STATION, 623234, 48000221, 11342490, null,
|
||||
"Tutzinger-Hof-Platz, Starnberg"), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
"Tutzinger-Hof-Platz, Starnberg"), new Date(), true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
|
||||
if (!result.context.canQueryLater())
|
||||
|
@ -130,7 +131,7 @@ public class BahnProviderLiveTest extends AbstractProviderLiveTest
|
|||
public void noConnections() throws Exception
|
||||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.STATION, 513729, null, "Schillerplatz, Kaiserslautern"),
|
||||
null, new Location(LocationType.STATION, 403631, null, "Trippstadt Grundschule"), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL,
|
||||
null, new Location(LocationType.STATION, 403631, null, "Trippstadt Grundschule"), new Date(), true, Product.ALL, WalkSpeed.NORMAL,
|
||||
Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
}
|
||||
|
@ -140,7 +141,7 @@ public class BahnProviderLiveTest extends AbstractProviderLiveTest
|
|||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.ADDRESS, 0, 52517139, 13388749, null,
|
||||
"Berlin - Mitte, Unter den Linden 24"), null, new Location(LocationType.ADDRESS, 0, 47994243, 11338543, null,
|
||||
"Starnberg, Possenhofener Straße 13"), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
"Starnberg, Possenhofener Straße 13"), new Date(), true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
|
||||
if (!result.context.canQueryLater())
|
||||
|
@ -154,7 +155,7 @@ public class BahnProviderLiveTest extends AbstractProviderLiveTest
|
|||
public void connectionsTooClose() throws Exception
|
||||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.STATION, 8010205, null, "Leipzig Hbf"), null, new Location(
|
||||
LocationType.STATION, 8010205, null, "Leipzig Hbf"), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
LocationType.STATION, 8010205, null, "Leipzig Hbf"), new Date(), true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
|
||||
Assert.assertEquals(QueryConnectionsResult.Status.TOO_CLOSE, result.status);
|
||||
|
@ -164,7 +165,7 @@ public class BahnProviderLiveTest extends AbstractProviderLiveTest
|
|||
public void connectionsInvalidDate() throws Exception
|
||||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.STATION, 8011160, null, "Berlin Hbf"), null, new Location(
|
||||
LocationType.STATION, 8010205, null, "Leipzig Hbf"), new Date(0), true, ALL_PRODUCTS, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
LocationType.STATION, 8010205, null, "Leipzig Hbf"), new Date(0), true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
|
||||
Assert.assertEquals(QueryConnectionsResult.Status.INVALID_DATE, result.status);
|
||||
|
|
|
@ -28,6 +28,7 @@ import de.schildbach.pte.NetworkProvider.WalkSpeed;
|
|||
import de.schildbach.pte.dto.Location;
|
||||
import de.schildbach.pte.dto.LocationType;
|
||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||
import de.schildbach.pte.dto.Product;
|
||||
import de.schildbach.pte.dto.QueryConnectionsResult;
|
||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
||||
|
||||
|
@ -85,7 +86,7 @@ public class BayernProviderLiveTest extends AbstractProviderLiveTest
|
|||
public void shortConnection() throws Exception
|
||||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.STATION, 80000793, "München", "Ostbahnhof"), null,
|
||||
new Location(LocationType.STATION, 80000799, "München", "Pasing"), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL,
|
||||
new Location(LocationType.STATION, 80000799, "München", "Pasing"), new Date(), true, Product.ALL, WalkSpeed.NORMAL,
|
||||
Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
final QueryConnectionsResult laterResult = queryMoreConnections(result.context, true);
|
||||
|
@ -96,7 +97,7 @@ public class BayernProviderLiveTest extends AbstractProviderLiveTest
|
|||
public void longConnection() throws Exception
|
||||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.STATION, 1005530, "Starnberg", "Arbeitsamt"), null,
|
||||
new Location(LocationType.STATION, 3001459, "Nürnberg", "Fallrohrstraße"), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL,
|
||||
new Location(LocationType.STATION, 3001459, "Nürnberg", "Fallrohrstraße"), new Date(), true, Product.ALL, WalkSpeed.NORMAL,
|
||||
Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
// seems like there are no more connections all the time
|
||||
|
@ -106,7 +107,7 @@ public class BayernProviderLiveTest extends AbstractProviderLiveTest
|
|||
public void connectionBetweenCoordinates() throws Exception
|
||||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.ADDRESS, 0, 48165238, 11577473), null, new Location(
|
||||
LocationType.ADDRESS, 0, 47987199, 11326532), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
LocationType.ADDRESS, 0, 47987199, 11326532), new Date(), true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
final QueryConnectionsResult laterResult = queryMoreConnections(result.context, true);
|
||||
System.out.println(laterResult);
|
||||
|
@ -116,7 +117,7 @@ public class BayernProviderLiveTest extends AbstractProviderLiveTest
|
|||
public void connectionBetweenCoordinateAndStation() throws Exception
|
||||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.ADDRESS, 0, 48238341, 11478230), null, new Location(
|
||||
LocationType.ANY, 0, null, "Ostbahnhof"), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
LocationType.ANY, 0, null, "Ostbahnhof"), new Date(), true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
final QueryConnectionsResult laterResult = queryMoreConnections(result.context, true);
|
||||
System.out.println(laterResult);
|
||||
|
@ -126,7 +127,7 @@ public class BayernProviderLiveTest extends AbstractProviderLiveTest
|
|||
public void connectionBetweenAddresses() throws Exception
|
||||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.ADDRESS, 0, null, "München, Maximilianstr. 1"), null,
|
||||
new Location(LocationType.ADDRESS, 0, null, "Starnberg, Jahnstraße 50"), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL,
|
||||
new Location(LocationType.ADDRESS, 0, null, "Starnberg, Jahnstraße 50"), new Date(), true, Product.ALL, WalkSpeed.NORMAL,
|
||||
Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
final QueryConnectionsResult laterResult = queryMoreConnections(result.context, true);
|
||||
|
@ -137,7 +138,7 @@ public class BayernProviderLiveTest extends AbstractProviderLiveTest
|
|||
public void connectionBetweenStationAndAddress() throws Exception
|
||||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.STATION, 1220, null, "Josephsburg"), null, new Location(
|
||||
LocationType.ADDRESS, 0, 48188018, 11574239, null, "München Frankfurter Ring 35"), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL,
|
||||
LocationType.ADDRESS, 0, 48188018, 11574239, null, "München Frankfurter Ring 35"), new Date(), true, Product.ALL, WalkSpeed.NORMAL,
|
||||
Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
final QueryConnectionsResult laterResult = queryMoreConnections(result.context, true);
|
||||
|
|
|
@ -31,6 +31,7 @@ import de.schildbach.pte.NetworkProvider.WalkSpeed;
|
|||
import de.schildbach.pte.dto.Location;
|
||||
import de.schildbach.pte.dto.LocationType;
|
||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||
import de.schildbach.pte.dto.Product;
|
||||
import de.schildbach.pte.dto.QueryConnectionsResult;
|
||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
||||
|
||||
|
@ -88,7 +89,7 @@ public class BsagProviderLiveTest extends AbstractProviderLiveTest
|
|||
public void shortConnection() throws Exception
|
||||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.STATION, 28000257, null, "Bremen, Hauptbahnhof"), null,
|
||||
new Location(LocationType.STATION, 28000512, null, "Herdentor"), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL,
|
||||
new Location(LocationType.STATION, 28000512, null, "Herdentor"), new Date(), true, Product.ALL, WalkSpeed.NORMAL,
|
||||
Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
assertEquals(QueryConnectionsResult.Status.OK, result.status);
|
||||
|
|
|
@ -31,6 +31,7 @@ import de.schildbach.pte.NetworkProvider.WalkSpeed;
|
|||
import de.schildbach.pte.dto.Location;
|
||||
import de.schildbach.pte.dto.LocationType;
|
||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||
import de.schildbach.pte.dto.Product;
|
||||
import de.schildbach.pte.dto.QueryConnectionsResult;
|
||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
||||
|
||||
|
@ -88,7 +89,7 @@ public class BsvagProviderLiveTest extends AbstractProviderLiveTest
|
|||
public void shortConnection() throws Exception
|
||||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.STATION, 26000178, null, "Hauptbahnhof"), null,
|
||||
new Location(LocationType.STATION, 26000322, null, "Packhof"), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL,
|
||||
new Location(LocationType.STATION, 26000322, null, "Packhof"), new Date(), true, Product.ALL, WalkSpeed.NORMAL,
|
||||
Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
assertEquals(QueryConnectionsResult.Status.OK, result.status);
|
||||
|
|
|
@ -31,6 +31,7 @@ import de.schildbach.pte.NetworkProvider.WalkSpeed;
|
|||
import de.schildbach.pte.dto.Location;
|
||||
import de.schildbach.pte.dto.LocationType;
|
||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||
import de.schildbach.pte.dto.Product;
|
||||
import de.schildbach.pte.dto.QueryConnectionsResult;
|
||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
||||
|
||||
|
@ -88,7 +89,7 @@ public class BvbProviderLiveTest extends AbstractProviderLiveTest
|
|||
public void shortConnection() throws Exception
|
||||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.STATION, 10000, null, "Bahnhof"), null, new Location(
|
||||
LocationType.STATION, 86, null, "Markthalle"), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
LocationType.STATION, 86, null, "Markthalle"), new Date(), true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
assertEquals(QueryConnectionsResult.Status.OK, result.status);
|
||||
assertTrue(result.connections.size() > 0);
|
||||
|
|
|
@ -31,6 +31,7 @@ import de.schildbach.pte.NetworkProvider.WalkSpeed;
|
|||
import de.schildbach.pte.dto.Location;
|
||||
import de.schildbach.pte.dto.LocationType;
|
||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||
import de.schildbach.pte.dto.Product;
|
||||
import de.schildbach.pte.dto.QueryConnectionsResult;
|
||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
||||
|
||||
|
@ -113,7 +114,7 @@ public class BvgProviderLiveTest extends AbstractProviderLiveTest
|
|||
public void shortConnection() throws Exception
|
||||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.STATION, 9056102, "Berlin", "Nollendorfplatz"), null,
|
||||
new Location(LocationType.STATION, 9013103, "Berlin", "Prinzenstraße"), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL,
|
||||
new Location(LocationType.STATION, 9013103, "Berlin", "Prinzenstraße"), new Date(), true, Product.ALL, WalkSpeed.NORMAL,
|
||||
Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
final QueryConnectionsResult laterResult = queryMoreConnections(result.context, true);
|
||||
|
@ -131,7 +132,7 @@ public class BvgProviderLiveTest extends AbstractProviderLiveTest
|
|||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.STATION, 9056102, "Berlin", "Nollendorfplatz"),
|
||||
new Location(LocationType.STATION, 9044202, "Berlin", "Bundesplatz"), new Location(LocationType.STATION, 9013103, "Berlin",
|
||||
"Prinzenstraße"), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
"Prinzenstraße"), new Date(), true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
final QueryConnectionsResult laterResult = queryMoreConnections(result.context, true);
|
||||
System.out.println(laterResult);
|
||||
|
@ -141,7 +142,7 @@ public class BvgProviderLiveTest extends AbstractProviderLiveTest
|
|||
public void connectionBetweenCoordinates() throws Exception
|
||||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.ADDRESS, 0, 52501507, 13357026, null, null), null,
|
||||
new Location(LocationType.ADDRESS, 0, 52513639, 13568648, null, null), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL,
|
||||
new Location(LocationType.ADDRESS, 0, 52513639, 13568648, null, null), new Date(), true, Product.ALL, WalkSpeed.NORMAL,
|
||||
Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
final QueryConnectionsResult laterResult = queryMoreConnections(result.context, true);
|
||||
|
@ -153,7 +154,7 @@ public class BvgProviderLiveTest extends AbstractProviderLiveTest
|
|||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.ADDRESS, 0, 52536099, 13426309, null,
|
||||
"Christburger Straße 1, 10405 Berlin, Deutschland"), null, new Location(LocationType.ADDRESS, 0, 52486400, 13350744, null,
|
||||
"Eisenacher Straße 70, 10823 Berlin, Deutschland"), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
"Eisenacher Straße 70, 10823 Berlin, Deutschland"), new Date(), true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
final QueryConnectionsResult laterResult = queryMoreConnections(result.context, true);
|
||||
System.out.println(laterResult);
|
||||
|
@ -164,7 +165,7 @@ public class BvgProviderLiveTest extends AbstractProviderLiveTest
|
|||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.ADDRESS, 0, 52501507, 13357026, null, null), new Location(
|
||||
LocationType.ADDRESS, 0, 52479868, 13324247, null, null), new Location(LocationType.ADDRESS, 0, 52513639, 13568648, null, null),
|
||||
new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
new Date(), true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
final QueryConnectionsResult laterResult = queryMoreConnections(result.context, true);
|
||||
System.out.println(laterResult);
|
||||
|
@ -175,7 +176,7 @@ public class BvgProviderLiveTest extends AbstractProviderLiveTest
|
|||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.ADDRESS, 0, 52479663, 13324278, "10715 Berlin-Wilmersdorf",
|
||||
"Weimarische Str. 7"), null, new Location(LocationType.ADDRESS, 0, 52541536, 13421290, "10437 Berlin-Prenzlauer Berg",
|
||||
"Göhrener Str. 5"), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
"Göhrener Str. 5"), new Date(), true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
final QueryConnectionsResult laterResult = queryMoreConnections(result.context, true);
|
||||
System.out.println(laterResult);
|
||||
|
@ -186,7 +187,7 @@ public class BvgProviderLiveTest extends AbstractProviderLiveTest
|
|||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.ADDRESS, 0, 52479663, 13324278, "10715 Berlin-Wilmersdorf",
|
||||
"Weimarische Str. 7"), new Location(LocationType.ADDRESS, 0, 52527872, 13381657, "10115 Berlin-Mitte", "Hannoversche Str. 20"),
|
||||
new Location(LocationType.ADDRESS, 0, 52526029, 13399878, "10178 Berlin-Mitte", "Sophienstr. 24"), new Date(), true, ALL_PRODUCTS,
|
||||
new Location(LocationType.ADDRESS, 0, 52526029, 13399878, "10178 Berlin-Mitte", "Sophienstr. 24"), new Date(), true, Product.ALL,
|
||||
WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
final QueryConnectionsResult laterResult = queryMoreConnections(result.context, true);
|
||||
|
|
|
@ -31,6 +31,7 @@ import de.schildbach.pte.NetworkProvider.WalkSpeed;
|
|||
import de.schildbach.pte.dto.Location;
|
||||
import de.schildbach.pte.dto.LocationType;
|
||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||
import de.schildbach.pte.dto.Product;
|
||||
import de.schildbach.pte.dto.QueryConnectionsResult;
|
||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
||||
|
||||
|
@ -88,7 +89,7 @@ public class DingProviderLiveTest extends AbstractProviderLiveTest
|
|||
public void shortConnection() throws Exception
|
||||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.STATION, 9001011, null, "Justizgebäude"), null,
|
||||
new Location(LocationType.STATION, 2504524, null, "Theater"), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
new Location(LocationType.STATION, 2504524, null, "Theater"), new Date(), true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
assertEquals(QueryConnectionsResult.Status.OK, result.status);
|
||||
assertTrue(result.connections.size() > 0);
|
||||
|
|
|
@ -28,6 +28,7 @@ import de.schildbach.pte.NetworkProvider.WalkSpeed;
|
|||
import de.schildbach.pte.dto.Location;
|
||||
import de.schildbach.pte.dto.LocationType;
|
||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||
import de.schildbach.pte.dto.Product;
|
||||
import de.schildbach.pte.dto.QueryConnectionsResult;
|
||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
||||
|
||||
|
@ -77,7 +78,7 @@ public class DsbProviderLiveTest extends AbstractProviderLiveTest
|
|||
public void shortConnection() throws Exception
|
||||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.STATION, 900000011, null, "Copenhagen Airport"), null,
|
||||
new Location(LocationType.STATION, 551922500, null, "Billund Airport"), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL,
|
||||
new Location(LocationType.STATION, 551922500, null, "Billund Airport"), new Date(), true, Product.ALL, WalkSpeed.NORMAL,
|
||||
Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
final QueryConnectionsResult laterResult = queryMoreConnections(result.context, true);
|
||||
|
|
|
@ -31,6 +31,7 @@ import de.schildbach.pte.NetworkProvider.WalkSpeed;
|
|||
import de.schildbach.pte.dto.Location;
|
||||
import de.schildbach.pte.dto.LocationType;
|
||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||
import de.schildbach.pte.dto.Product;
|
||||
import de.schildbach.pte.dto.QueryConnectionsResult;
|
||||
|
||||
/**
|
||||
|
@ -71,7 +72,7 @@ public class DubProviderLiveTest extends AbstractProviderLiveTest
|
|||
public void shortConnection() throws Exception
|
||||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.STATION, 3505565, null, "Airport Terminal 1, Arrival"),
|
||||
null, new Location(LocationType.STATION, 3505445, null, "Airport Terminal 3"), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL,
|
||||
null, new Location(LocationType.STATION, 3505445, null, "Airport Terminal 3"), new Date(), true, Product.ALL, WalkSpeed.NORMAL,
|
||||
Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
assertEquals(QueryConnectionsResult.Status.OK, result.status);
|
||||
|
|
|
@ -28,6 +28,7 @@ import de.schildbach.pte.NetworkProvider.WalkSpeed;
|
|||
import de.schildbach.pte.dto.Location;
|
||||
import de.schildbach.pte.dto.LocationType;
|
||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||
import de.schildbach.pte.dto.Product;
|
||||
import de.schildbach.pte.dto.QueryConnectionsResult;
|
||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
||||
|
||||
|
@ -93,7 +94,7 @@ public class EireannProviderLiveTest extends AbstractProviderLiveTest
|
|||
public void shortConnection() throws Exception
|
||||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.STATION, 8052281, null, "Dublin Rd (GMIT)"), null,
|
||||
new Location(LocationType.STATION, 8013100, null, "Dublin Airport (Atrium Road)"), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL,
|
||||
new Location(LocationType.STATION, 8013100, null, "Dublin Airport (Atrium Road)"), new Date(), true, Product.ALL, WalkSpeed.NORMAL,
|
||||
Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
final QueryConnectionsResult laterResult = queryMoreConnections(result.context, true);
|
||||
|
|
|
@ -31,6 +31,7 @@ import de.schildbach.pte.NetworkProvider.WalkSpeed;
|
|||
import de.schildbach.pte.dto.Location;
|
||||
import de.schildbach.pte.dto.LocationType;
|
||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||
import de.schildbach.pte.dto.Product;
|
||||
import de.schildbach.pte.dto.QueryConnectionsResult;
|
||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
||||
|
||||
|
@ -112,7 +113,7 @@ public class GvhProviderLiveTest extends AbstractProviderLiveTest
|
|||
public void incompleteConnection() throws Exception
|
||||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.ANY, 0, null, "hann"), null, new Location(LocationType.ANY,
|
||||
0, null, "laat"), new Date(), true, ALL_PRODUCTS, WalkSpeed.FAST, Accessibility.NEUTRAL);
|
||||
0, null, "laat"), new Date(), true, Product.ALL, WalkSpeed.FAST, Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
}
|
||||
|
||||
|
@ -120,7 +121,7 @@ public class GvhProviderLiveTest extends AbstractProviderLiveTest
|
|||
public void shortConnection() throws Exception
|
||||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.STATION, 25000031, null, "Hannover Hauptbahnhof"), null,
|
||||
new Location(LocationType.STATION, 25001141, null, "Hannover Bismarckstraße"), new Date(), true, ALL_PRODUCTS, WalkSpeed.FAST,
|
||||
new Location(LocationType.STATION, 25001141, null, "Hannover Bismarckstraße"), new Date(), true, Product.ALL, WalkSpeed.FAST,
|
||||
Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
assertEquals(QueryConnectionsResult.Status.OK, result.status);
|
||||
|
@ -150,7 +151,7 @@ public class GvhProviderLiveTest extends AbstractProviderLiveTest
|
|||
{
|
||||
final QueryConnectionsResult result = queryConnections(
|
||||
new Location(LocationType.ANY, 0, 53069619, 8799202, null, "bremen, neustadtswall 12"), null, new Location(LocationType.ADDRESS, 0,
|
||||
53104124, 8788575, null, "Bremen Glücksburger Straße 37"), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL,
|
||||
53104124, 8788575, null, "Bremen Glücksburger Straße 37"), new Date(), true, Product.ALL, WalkSpeed.NORMAL,
|
||||
Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
final QueryConnectionsResult laterResult = queryMoreConnections(result.context, true);
|
||||
|
@ -162,7 +163,7 @@ public class GvhProviderLiveTest extends AbstractProviderLiveTest
|
|||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.ADDRESS, 0, 53622859, 10133545, null,
|
||||
"Zamenhofweg 14, 22159 Hamburg, Deutschland"), null, new Location(LocationType.ADDRESS, 0, 53734260, 9674990, null,
|
||||
"Lehmkuhlen 5, 25337 Elmshorn, Deutschland"), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
"Lehmkuhlen 5, 25337 Elmshorn, Deutschland"), new Date(), true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
final QueryConnectionsResult laterResult = queryMoreConnections(result.context, true);
|
||||
System.out.println(laterResult);
|
||||
|
|
|
@ -28,6 +28,7 @@ import de.schildbach.pte.NetworkProvider.WalkSpeed;
|
|||
import de.schildbach.pte.dto.Location;
|
||||
import de.schildbach.pte.dto.LocationType;
|
||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||
import de.schildbach.pte.dto.Product;
|
||||
import de.schildbach.pte.dto.QueryConnectionsResult;
|
||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
||||
|
||||
|
@ -78,7 +79,7 @@ public class InvgProviderLiveTest extends AbstractProviderLiveTest
|
|||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.STATION, 80302, null,
|
||||
"Ingolstadt, Hauptbahnhof Stadteinwärts"), null, new Location(LocationType.STATION, 181102, null, "Elisabethstraße"), new Date(),
|
||||
true, ALL_PRODUCTS, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
final QueryConnectionsResult laterResult = queryMoreConnections(result.context, true);
|
||||
System.out.println(laterResult);
|
||||
|
|
|
@ -31,6 +31,7 @@ import de.schildbach.pte.NetworkProvider.WalkSpeed;
|
|||
import de.schildbach.pte.dto.Location;
|
||||
import de.schildbach.pte.dto.LocationType;
|
||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||
import de.schildbach.pte.dto.Product;
|
||||
import de.schildbach.pte.dto.QueryConnectionsResult;
|
||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
||||
|
||||
|
@ -88,7 +89,7 @@ public class IvbProviderLiveTest extends AbstractProviderLiveTest
|
|||
public void shortConnection() throws Exception
|
||||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.STATION, 60466402, null, "Kochstraße"), null, new Location(
|
||||
LocationType.STATION, 60461679, null, "Messe/Zeughaus"), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
LocationType.STATION, 60461679, null, "Messe/Zeughaus"), new Date(), true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
assertEquals(QueryConnectionsResult.Status.OK, result.status);
|
||||
assertTrue(result.connections.size() > 0);
|
||||
|
|
|
@ -31,6 +31,7 @@ import de.schildbach.pte.NetworkProvider.WalkSpeed;
|
|||
import de.schildbach.pte.dto.Location;
|
||||
import de.schildbach.pte.dto.LocationType;
|
||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||
import de.schildbach.pte.dto.Product;
|
||||
import de.schildbach.pte.dto.QueryConnectionsResult;
|
||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
||||
|
||||
|
@ -89,7 +90,7 @@ public class KvvProviderLiveTest extends AbstractProviderLiveTest
|
|||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.STATION, 7000070, 49009208, 8404126, "Karlsruhe",
|
||||
"Marktplatz (Pyramide)"), null, new Location(LocationType.STATION, 7000002, 49009392, 8409086, "Karlsruhe",
|
||||
"Kronenplatz (Kaiserstr.)"), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
"Kronenplatz (Kaiserstr.)"), new Date(), true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
assertEquals(QueryConnectionsResult.Status.OK, result.status);
|
||||
assertTrue(result.connections.size() > 0);
|
||||
|
@ -118,7 +119,7 @@ public class KvvProviderLiveTest extends AbstractProviderLiveTest
|
|||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.ADDRESS, 0, 48985089, 8402709, null,
|
||||
"Konstanzer Straße 17, 76199 Karlsruhe, Deutschland"), null, new Location(LocationType.ADDRESS, 0, 49007706, 8356358, null,
|
||||
"Durmersheimer Straße 6, 76185 Karlsruhe, Deutschland"), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
"Durmersheimer Straße 6, 76185 Karlsruhe, Deutschland"), new Date(), true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
final QueryConnectionsResult laterResult = queryMoreConnections(result.context, true);
|
||||
System.out.println(laterResult);
|
||||
|
|
|
@ -31,6 +31,7 @@ import de.schildbach.pte.NetworkProvider.WalkSpeed;
|
|||
import de.schildbach.pte.dto.Location;
|
||||
import de.schildbach.pte.dto.LocationType;
|
||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||
import de.schildbach.pte.dto.Product;
|
||||
import de.schildbach.pte.dto.QueryConnectionsResult;
|
||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
||||
|
||||
|
@ -103,7 +104,7 @@ public class LinzProviderLiveTest extends AbstractProviderLiveTest
|
|||
public void incompleteConnection() throws Exception
|
||||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.ANY, 0, null, "linz"), null, new Location(LocationType.ANY,
|
||||
0, null, "gel"), new Date(), true, ALL_PRODUCTS, WalkSpeed.FAST, Accessibility.NEUTRAL);
|
||||
0, null, "gel"), new Date(), true, Product.ALL, WalkSpeed.FAST, Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
}
|
||||
|
||||
|
@ -111,7 +112,7 @@ public class LinzProviderLiveTest extends AbstractProviderLiveTest
|
|||
public void shortConnection() throws Exception
|
||||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.STATION, 0, null, "Linz Hauptbahnhof"), null, new Location(
|
||||
LocationType.STATION, 0, null, "Linz Auwiesen"), new Date(), true, ALL_PRODUCTS, WalkSpeed.FAST, Accessibility.NEUTRAL);
|
||||
LocationType.STATION, 0, null, "Linz Auwiesen"), new Date(), true, Product.ALL, WalkSpeed.FAST, Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
assertEquals(QueryConnectionsResult.Status.OK, result.status);
|
||||
assertTrue(result.connections.size() > 0);
|
||||
|
@ -139,7 +140,7 @@ public class LinzProviderLiveTest extends AbstractProviderLiveTest
|
|||
public void longConnection() throws Exception
|
||||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.STATION, 0, null, "Linz Auwiesen"), null, new Location(
|
||||
LocationType.STATION, 0, null, "Linz Hafen"), new Date(), true, ALL_PRODUCTS, WalkSpeed.SLOW, Accessibility.NEUTRAL);
|
||||
LocationType.STATION, 0, null, "Linz Hafen"), new Date(), true, Product.ALL, WalkSpeed.SLOW, Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
// final QueryConnectionsResult laterResult = queryMoreConnections(provider, result.context, true);
|
||||
// System.out.println(laterResult);
|
||||
|
|
|
@ -28,6 +28,7 @@ import de.schildbach.pte.NetworkProvider.WalkSpeed;
|
|||
import de.schildbach.pte.dto.Location;
|
||||
import de.schildbach.pte.dto.LocationType;
|
||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||
import de.schildbach.pte.dto.Product;
|
||||
import de.schildbach.pte.dto.QueryConnectionsResult;
|
||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
||||
|
||||
|
@ -77,7 +78,7 @@ public class LuProviderLiveTest extends AbstractProviderLiveTest
|
|||
public void shortConnection() throws Exception
|
||||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.STATION, 200416001, null, "Cité Aéroport"), null,
|
||||
new Location(LocationType.STATION, 200405035, "Luxembourg", "Gare Centrale"), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL,
|
||||
new Location(LocationType.STATION, 200405035, "Luxembourg", "Gare Centrale"), new Date(), true, Product.ALL, WalkSpeed.NORMAL,
|
||||
Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
final QueryConnectionsResult laterResult = queryMoreConnections(result.context, true);
|
||||
|
@ -89,7 +90,7 @@ public class LuProviderLiveTest extends AbstractProviderLiveTest
|
|||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.ADDRESS, 0, 49611610, 6130265, null,
|
||||
"Luxembourg, Rue Génistre 2"), null, new Location(LocationType.STATION, 200405035, "Luxembourg", "Gare Centrale"), new Date(), true,
|
||||
ALL_PRODUCTS, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
final QueryConnectionsResult laterResult = queryMoreConnections(result.context, true);
|
||||
System.out.println(laterResult);
|
||||
|
|
|
@ -31,6 +31,7 @@ import de.schildbach.pte.NetworkProvider.WalkSpeed;
|
|||
import de.schildbach.pte.dto.Location;
|
||||
import de.schildbach.pte.dto.LocationType;
|
||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||
import de.schildbach.pte.dto.Product;
|
||||
import de.schildbach.pte.dto.QueryConnectionsResult;
|
||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
||||
|
||||
|
@ -80,7 +81,7 @@ public class MariborProviderLiveTest extends AbstractProviderLiveTest
|
|||
public void shortConnection() throws Exception
|
||||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.STATION, 63202999, null, "Graz Marburger Straße"), null,
|
||||
new Location(LocationType.STATION, 63201746, null, "Flughafen Graz Bahnhof"), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL,
|
||||
new Location(LocationType.STATION, 63201746, null, "Flughafen Graz Bahnhof"), new Date(), true, Product.ALL, WalkSpeed.NORMAL,
|
||||
Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
assertEquals(QueryConnectionsResult.Status.OK, result.status);
|
||||
|
|
|
@ -31,6 +31,7 @@ import de.schildbach.pte.NetworkProvider.WalkSpeed;
|
|||
import de.schildbach.pte.dto.Location;
|
||||
import de.schildbach.pte.dto.LocationType;
|
||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||
import de.schildbach.pte.dto.Product;
|
||||
import de.schildbach.pte.dto.QueryConnectionsResult;
|
||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
||||
|
||||
|
@ -81,7 +82,7 @@ public class MetProviderLiveTest extends AbstractProviderLiveTest
|
|||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.STATION, 10002717, "Melbourne City",
|
||||
"6-Franklin St/Elizabeth St"), null, new Location(LocationType.STATION, 10002722, "Melbourne City",
|
||||
"1-Flinders Street Railway Station/Elizabeth St"), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
"1-Flinders Street Railway Station/Elizabeth St"), new Date(), true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
assertEquals(QueryConnectionsResult.Status.OK, result.status);
|
||||
assertTrue(result.connections.size() > 0);
|
||||
|
|
|
@ -31,6 +31,7 @@ import de.schildbach.pte.NetworkProvider.WalkSpeed;
|
|||
import de.schildbach.pte.dto.Location;
|
||||
import de.schildbach.pte.dto.LocationType;
|
||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||
import de.schildbach.pte.dto.Product;
|
||||
import de.schildbach.pte.dto.QueryConnectionsResult;
|
||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
||||
|
||||
|
@ -88,7 +89,7 @@ public class MvgProviderLiveTest extends AbstractProviderLiveTest
|
|||
public void shortConnection() throws Exception
|
||||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.STATION, 24200200, null, "Lüd., Christuskirche"), null,
|
||||
new Location(LocationType.STATION, 24200032, null, "Lüd., Friedrichstr."), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL,
|
||||
new Location(LocationType.STATION, 24200032, null, "Lüd., Friedrichstr."), new Date(), true, Product.ALL, WalkSpeed.NORMAL,
|
||||
Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
assertEquals(QueryConnectionsResult.Status.OK, result.status);
|
||||
|
|
|
@ -30,6 +30,7 @@ import de.schildbach.pte.NetworkProvider.WalkSpeed;
|
|||
import de.schildbach.pte.dto.Location;
|
||||
import de.schildbach.pte.dto.LocationType;
|
||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||
import de.schildbach.pte.dto.Product;
|
||||
import de.schildbach.pte.dto.QueryConnectionsResult;
|
||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
||||
|
||||
|
@ -96,7 +97,7 @@ public class MvvProviderLiveTest extends AbstractProviderLiveTest
|
|||
public void shortConnection() throws Exception
|
||||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.STATION, 2, "München", "Marienplatz"), null, new Location(
|
||||
LocationType.STATION, 10, "München", "Pasing"), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
LocationType.STATION, 10, "München", "Pasing"), new Date(), true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
final QueryConnectionsResult laterResult = queryMoreConnections(result.context, true);
|
||||
System.out.println(laterResult);
|
||||
|
@ -108,7 +109,7 @@ public class MvvProviderLiveTest extends AbstractProviderLiveTest
|
|||
public void longConnection() throws Exception
|
||||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.ANY, 0, null, "Starnberg, Arbeitsamt"), null, new Location(
|
||||
LocationType.STATION, 0, null, "Ackermannstraße"), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
LocationType.STATION, 0, null, "Ackermannstraße"), new Date(), true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
// seems like there are no more connections all the time
|
||||
}
|
||||
|
@ -117,7 +118,7 @@ public class MvvProviderLiveTest extends AbstractProviderLiveTest
|
|||
public void connectionBetweenCoordinates() throws Exception
|
||||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.ADDRESS, 0, 48165238, 11577473), null, new Location(
|
||||
LocationType.ADDRESS, 0, 47987199, 11326532), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
LocationType.ADDRESS, 0, 47987199, 11326532), new Date(), true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
final QueryConnectionsResult laterResult = queryMoreConnections(result.context, true);
|
||||
System.out.println(laterResult);
|
||||
|
@ -127,7 +128,7 @@ public class MvvProviderLiveTest extends AbstractProviderLiveTest
|
|||
public void connectionBetweenCoordinateAndStation() throws Exception
|
||||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.ADDRESS, 0, 48238341, 11478230), null, new Location(
|
||||
LocationType.ANY, 0, null, "Ostbahnhof"), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
LocationType.ANY, 0, null, "Ostbahnhof"), new Date(), true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
final QueryConnectionsResult laterResult = queryMoreConnections(result.context, true);
|
||||
System.out.println(laterResult);
|
||||
|
@ -137,7 +138,7 @@ public class MvvProviderLiveTest extends AbstractProviderLiveTest
|
|||
public void connectionBetweenAddresses() throws Exception
|
||||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.ADDRESS, 0, null, "München, Maximilianstr. 1"), null,
|
||||
new Location(LocationType.ADDRESS, 0, null, "Starnberg, Jahnstraße 50"), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL,
|
||||
new Location(LocationType.ADDRESS, 0, null, "Starnberg, Jahnstraße 50"), new Date(), true, Product.ALL, WalkSpeed.NORMAL,
|
||||
Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
final QueryConnectionsResult laterResult = queryMoreConnections(result.context, true);
|
||||
|
@ -148,7 +149,7 @@ public class MvvProviderLiveTest extends AbstractProviderLiveTest
|
|||
public void connectionBetweenStationAndAddress() throws Exception
|
||||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.STATION, 1220, null, "Josephsburg"), null, new Location(
|
||||
LocationType.ADDRESS, 0, 48188018, 11574239, null, "München Frankfurter Ring 35"), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL,
|
||||
LocationType.ADDRESS, 0, 48188018, 11574239, null, "München Frankfurter Ring 35"), new Date(), true, Product.ALL, WalkSpeed.NORMAL,
|
||||
Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
final QueryConnectionsResult laterResult = queryMoreConnections(result.context, true);
|
||||
|
@ -159,12 +160,12 @@ public class MvvProviderLiveTest extends AbstractProviderLiveTest
|
|||
public void queryConnectionInvalidStation() throws Exception
|
||||
{
|
||||
final QueryConnectionsResult result1 = queryConnections(new Location(LocationType.STATION, 2, "München", "Marienplatz"), null, new Location(
|
||||
LocationType.STATION, 99999, 0, 0, null, null), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
LocationType.STATION, 99999, 0, 0, null, null), new Date(), true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
|
||||
Assert.assertEquals(QueryConnectionsResult.Status.UNKNOWN_TO, result1.status);
|
||||
|
||||
final QueryConnectionsResult result2 = queryConnections(new Location(LocationType.STATION, 99999, 0, 0, null, null), null, new Location(
|
||||
LocationType.STATION, 2, "München", "Marienplatz"), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
LocationType.STATION, 2, "München", "Marienplatz"), new Date(), true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
|
||||
Assert.assertEquals(QueryConnectionsResult.Status.UNKNOWN_FROM, result2.status);
|
||||
}
|
||||
|
|
|
@ -31,6 +31,7 @@ import de.schildbach.pte.NetworkProvider.WalkSpeed;
|
|||
import de.schildbach.pte.dto.Location;
|
||||
import de.schildbach.pte.dto.LocationType;
|
||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||
import de.schildbach.pte.dto.Product;
|
||||
import de.schildbach.pte.dto.QueryConnectionsResult;
|
||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
||||
|
||||
|
@ -88,7 +89,7 @@ public class NaldoProviderLiveTest extends AbstractProviderLiveTest
|
|||
public void shortConnection() throws Exception
|
||||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.STATION, 3019697, null, "Amberg Kurfürstenbad"), null,
|
||||
new Location(LocationType.STATION, 3019500, null, "Amberg Bahnhof"), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL,
|
||||
new Location(LocationType.STATION, 3019500, null, "Amberg Bahnhof"), new Date(), true, Product.ALL, WalkSpeed.NORMAL,
|
||||
Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
assertEquals(QueryConnectionsResult.Status.OK, result.status);
|
||||
|
|
|
@ -28,6 +28,7 @@ import de.schildbach.pte.NetworkProvider.WalkSpeed;
|
|||
import de.schildbach.pte.dto.Location;
|
||||
import de.schildbach.pte.dto.LocationType;
|
||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||
import de.schildbach.pte.dto.Product;
|
||||
import de.schildbach.pte.dto.QueryConnectionsResult;
|
||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
||||
|
||||
|
@ -77,7 +78,7 @@ public class NasaProviderLiveTest extends AbstractProviderLiveTest
|
|||
public void shortConnection() throws Exception
|
||||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.STATION, 11063, null, "Leipzig, Johannisplatz"), null,
|
||||
new Location(LocationType.STATION, 8010205, null, "Leipzig Hbf"), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL,
|
||||
new Location(LocationType.STATION, 8010205, null, "Leipzig Hbf"), new Date(), true, Product.ALL, WalkSpeed.NORMAL,
|
||||
Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
|
||||
|
@ -92,7 +93,7 @@ public class NasaProviderLiveTest extends AbstractProviderLiveTest
|
|||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.STATION, 8010205, 51346546, 12383333, null, "Leipzig Hbf"),
|
||||
null, new Location(LocationType.STATION, 8012183, 51423340, 12223423, null, "Leipzig/Halle Flughafen"), new Date(), true,
|
||||
ALL_PRODUCTS, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
|
||||
if (!result.context.canQueryLater())
|
||||
|
@ -105,7 +106,7 @@ public class NasaProviderLiveTest extends AbstractProviderLiveTest
|
|||
public void outdatedConnection() throws Exception
|
||||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.STATION, 13002, null, "Leipzig, Augustusplatz"), null,
|
||||
new Location(LocationType.STATION, 8010205, null, "Leipzig Hbf"), new Date(2011, 1, 1), true, ALL_PRODUCTS, WalkSpeed.NORMAL,
|
||||
new Location(LocationType.STATION, 8010205, null, "Leipzig Hbf"), new Date(2011, 1, 1), true, Product.ALL, WalkSpeed.NORMAL,
|
||||
Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
|
||||
|
@ -119,7 +120,7 @@ public class NasaProviderLiveTest extends AbstractProviderLiveTest
|
|||
public void ambiguousConnection() throws Exception
|
||||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.ANY, 0, null, "Platz"), null, new Location(
|
||||
LocationType.STATION, 8010205, null, "Leipzig Hbf"), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
LocationType.STATION, 8010205, null, "Leipzig Hbf"), new Date(), true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
|
||||
if (!result.context.canQueryLater())
|
||||
|
@ -132,7 +133,7 @@ public class NasaProviderLiveTest extends AbstractProviderLiveTest
|
|||
public void sameStationConnection() throws Exception
|
||||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.STATION, 8010205, null, "Leipzig Hbf"), null, new Location(
|
||||
LocationType.STATION, 8010205, null, "Leipzig Hbf"), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
LocationType.STATION, 8010205, null, "Leipzig Hbf"), new Date(), true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
|
||||
if (!result.context.canQueryLater())
|
||||
|
@ -145,7 +146,7 @@ public class NasaProviderLiveTest extends AbstractProviderLiveTest
|
|||
public void addressConnection() throws Exception
|
||||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.ADDRESS, 0, 51334078, 12478331, "04319 Leipzig-Engelsdorf",
|
||||
"August-Bebel-Platz"), null, new Location(LocationType.STATION, 8010205, null, "Leipzig Hbf"), new Date(), true, ALL_PRODUCTS,
|
||||
"August-Bebel-Platz"), null, new Location(LocationType.STATION, 8010205, null, "Leipzig Hbf"), new Date(), true, Product.ALL,
|
||||
WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
|
||||
|
|
|
@ -28,6 +28,7 @@ import de.schildbach.pte.NriProvider;
|
|||
import de.schildbach.pte.dto.Location;
|
||||
import de.schildbach.pte.dto.LocationType;
|
||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||
import de.schildbach.pte.dto.Product;
|
||||
import de.schildbach.pte.dto.QueryConnectionsResult;
|
||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
||||
|
||||
|
@ -77,7 +78,7 @@ public class NriProviderLiveTest extends AbstractProviderLiveTest
|
|||
public void shortConnection() throws Exception
|
||||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.STATION, 8059, null, "Oslo"), null, new Location(
|
||||
LocationType.STATION, 6642, null, "Bergen BGO"), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
LocationType.STATION, 6642, null, "Bergen BGO"), new Date(), true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
final QueryConnectionsResult laterResult = queryMoreConnections(result.context, true);
|
||||
System.out.println(laterResult);
|
||||
|
|
|
@ -31,6 +31,7 @@ import de.schildbach.pte.NvbwProvider;
|
|||
import de.schildbach.pte.dto.Location;
|
||||
import de.schildbach.pte.dto.LocationType;
|
||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||
import de.schildbach.pte.dto.Product;
|
||||
import de.schildbach.pte.dto.QueryConnectionsResult;
|
||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
||||
|
||||
|
@ -88,7 +89,7 @@ public class NvbwProviderLiveTest extends AbstractProviderLiveTest
|
|||
public void shortConnection() throws Exception
|
||||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.STATION, 17002402, null, "Bahnhof"), null, new Location(
|
||||
LocationType.STATION, 17009001, null, "Bahnhof"), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
LocationType.STATION, 17009001, null, "Bahnhof"), new Date(), true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
assertEquals(QueryConnectionsResult.Status.OK, result.status);
|
||||
assertTrue(result.connections.size() > 0);
|
||||
|
|
|
@ -28,6 +28,7 @@ import de.schildbach.pte.NvvProvider;
|
|||
import de.schildbach.pte.dto.Location;
|
||||
import de.schildbach.pte.dto.LocationType;
|
||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||
import de.schildbach.pte.dto.Product;
|
||||
import de.schildbach.pte.dto.QueryConnectionsResult;
|
||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
||||
|
||||
|
@ -77,7 +78,7 @@ public class NvvProviderLiveTest extends AbstractProviderLiveTest
|
|||
public void shortConnection() throws Exception
|
||||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.STATION, 2200007, null, "Kassel Wilhelmshöhe"), null,
|
||||
new Location(LocationType.STATION, 2200278, null, "Kassel Wilhelmshöher Weg"), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL,
|
||||
new Location(LocationType.STATION, 2200278, null, "Kassel Wilhelmshöher Weg"), new Date(), true, Product.ALL, WalkSpeed.NORMAL,
|
||||
Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
final QueryConnectionsResult laterResult = queryMoreConnections(result.context, true);
|
||||
|
|
|
@ -31,6 +31,7 @@ import de.schildbach.pte.OebbProvider;
|
|||
import de.schildbach.pte.dto.Location;
|
||||
import de.schildbach.pte.dto.LocationType;
|
||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||
import de.schildbach.pte.dto.Product;
|
||||
import de.schildbach.pte.dto.QueryConnectionsResult;
|
||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
||||
|
||||
|
@ -93,7 +94,7 @@ public class OebbProviderLiveTest extends AbstractProviderLiveTest
|
|||
public void shortConnection() throws Exception
|
||||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.STATION, 1140101, null, "Linz"), null, new Location(
|
||||
LocationType.STATION, 1190100, null, "Wien"), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
LocationType.STATION, 1190100, null, "Wien"), new Date(), true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
assertEquals(QueryConnectionsResult.Status.OK, result.status);
|
||||
assertTrue(result.connections.size() > 0);
|
||||
|
@ -105,7 +106,7 @@ public class OebbProviderLiveTest extends AbstractProviderLiveTest
|
|||
public void slowConnection() throws Exception
|
||||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.ANY, 0, null, "Ramsen Zoll!"), null, new Location(
|
||||
LocationType.ANY, 0, null, "Azuga!"), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
LocationType.ANY, 0, null, "Azuga!"), new Date(), true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
assertEquals(QueryConnectionsResult.Status.OK, result.status);
|
||||
assertTrue(result.connections.size() > 0);
|
||||
|
@ -117,7 +118,7 @@ public class OebbProviderLiveTest extends AbstractProviderLiveTest
|
|||
public void connectionWithFootway() throws Exception
|
||||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.ANY, 0, null, "Graz, Haselweg!"), null, new Location(
|
||||
LocationType.ANY, 0, null, "Innsbruck, Gumppstraße 69!"), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
LocationType.ANY, 0, null, "Innsbruck, Gumppstraße 69!"), new Date(), true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
assertEquals(QueryConnectionsResult.Status.OK, result.status);
|
||||
assertTrue(result.connections.size() > 0);
|
||||
|
@ -129,7 +130,7 @@ public class OebbProviderLiveTest extends AbstractProviderLiveTest
|
|||
public void connectionWithFootway2() throws Exception
|
||||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.ANY, 0, null, "Wien, Krottenbachstraße 110!"), null,
|
||||
new Location(LocationType.ADDRESS, 0, null, "Wien, Meidlinger Hauptstraße 1!"), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL,
|
||||
new Location(LocationType.ADDRESS, 0, null, "Wien, Meidlinger Hauptstraße 1!"), new Date(), true, Product.ALL, WalkSpeed.NORMAL,
|
||||
Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
assertEquals(QueryConnectionsResult.Status.OK, result.status);
|
||||
|
|
|
@ -28,6 +28,7 @@ import de.schildbach.pte.PlProvider;
|
|||
import de.schildbach.pte.dto.Location;
|
||||
import de.schildbach.pte.dto.LocationType;
|
||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||
import de.schildbach.pte.dto.Product;
|
||||
import de.schildbach.pte.dto.QueryConnectionsResult;
|
||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
||||
|
||||
|
@ -85,7 +86,7 @@ public class PlProviderLiveTest extends AbstractProviderLiveTest
|
|||
public void shortConnection() throws Exception
|
||||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.STATION, 5196001, null, "KRAKÓW"), null, new Location(
|
||||
LocationType.STATION, 5196003, null, "WARSZAWA"), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
LocationType.STATION, 5196003, null, "WARSZAWA"), new Date(), true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
final QueryConnectionsResult laterResult = queryMoreConnections(result.context, true);
|
||||
System.out.println(laterResult);
|
||||
|
|
|
@ -31,6 +31,7 @@ import de.schildbach.pte.RmvProvider;
|
|||
import de.schildbach.pte.dto.Location;
|
||||
import de.schildbach.pte.dto.LocationType;
|
||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||
import de.schildbach.pte.dto.Product;
|
||||
import de.schildbach.pte.dto.QueryConnectionsResult;
|
||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
||||
|
||||
|
@ -88,7 +89,7 @@ public class RmvProviderLiveTest extends AbstractProviderLiveTest
|
|||
public void shortConnection() throws Exception
|
||||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.STATION, 3000001, null, "Hauptwache"), null, new Location(
|
||||
LocationType.STATION, 3000912, null, "Südbahnhof"), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
LocationType.STATION, 3000912, null, "Südbahnhof"), new Date(), true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
assertEquals(QueryConnectionsResult.Status.OK, result.status);
|
||||
assertTrue(result.connections.size() > 0);
|
||||
|
@ -159,7 +160,7 @@ public class RmvProviderLiveTest extends AbstractProviderLiveTest
|
|||
{
|
||||
final QueryConnectionsResult result = queryConnections(
|
||||
new Location(LocationType.STATION, 3029079, 50017679, 8229480, "Mainz", "An den Dünen"), null, new Location(LocationType.STATION,
|
||||
3013508, 50142890, 8895203, "Hanau", "Beethovenplatz"), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL,
|
||||
3013508, 50142890, 8895203, "Hanau", "Beethovenplatz"), new Date(), true, Product.ALL, WalkSpeed.NORMAL,
|
||||
Accessibility.BARRIER_FREE);
|
||||
System.out.println(result);
|
||||
assertEquals(QueryConnectionsResult.Status.OK, result.status);
|
||||
|
@ -176,7 +177,7 @@ public class RmvProviderLiveTest extends AbstractProviderLiveTest
|
|||
public void shortConnectionByName() throws Exception
|
||||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.ANY, 0, null, "Frankfurt Bockenheimer Warte!"), null,
|
||||
new Location(LocationType.ANY, 0, null, "Frankfurt Hauptbahnhof!"), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL,
|
||||
new Location(LocationType.ANY, 0, null, "Frankfurt Hauptbahnhof!"), new Date(), true, Product.ALL, WalkSpeed.NORMAL,
|
||||
Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
}
|
||||
|
|
|
@ -30,6 +30,7 @@ import de.schildbach.pte.RtProvider;
|
|||
import de.schildbach.pte.dto.Location;
|
||||
import de.schildbach.pte.dto.LocationType;
|
||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||
import de.schildbach.pte.dto.Product;
|
||||
import de.schildbach.pte.dto.QueryConnectionsResult;
|
||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
||||
|
||||
|
@ -95,7 +96,7 @@ public class RtProviderLiveTest extends AbstractProviderLiveTest
|
|||
public void shortConnection() throws Exception
|
||||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.STATION, 8503000, null, "Zürich HB"), null, new Location(
|
||||
LocationType.STATION, 8507785, null, "Bern, Hauptbahnhof"), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
LocationType.STATION, 8507785, null, "Bern, Hauptbahnhof"), new Date(), true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
final QueryConnectionsResult laterResult = queryMoreConnections(result.context, true);
|
||||
System.out.println(laterResult);
|
||||
|
@ -105,7 +106,7 @@ public class RtProviderLiveTest extends AbstractProviderLiveTest
|
|||
public void slowConnection() throws Exception
|
||||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.ANY, 0, null, "Schocherswil, Alte Post!"), null,
|
||||
new Location(LocationType.ANY, 0, null, "Laconnex, Mollach"), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
new Location(LocationType.ANY, 0, null, "Laconnex, Mollach"), new Date(), true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
final QueryConnectionsResult laterResult = queryMoreConnections(result.context, true);
|
||||
System.out.println(laterResult);
|
||||
|
@ -115,7 +116,7 @@ public class RtProviderLiveTest extends AbstractProviderLiveTest
|
|||
public void connectionWithFootway() throws Exception
|
||||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.ADDRESS, 0, null, "Spiez, Seestraße 62"), null,
|
||||
new Location(LocationType.ADDRESS, 0, null, "Einsiedeln, Erlenmoosweg 24"), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL,
|
||||
new Location(LocationType.ADDRESS, 0, null, "Einsiedeln, Erlenmoosweg 24"), new Date(), true, Product.ALL, WalkSpeed.NORMAL,
|
||||
Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
final QueryConnectionsResult laterResult = queryMoreConnections(result.context, true);
|
||||
|
@ -127,7 +128,7 @@ public class RtProviderLiveTest extends AbstractProviderLiveTest
|
|||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.ADDRESS, 0, 51521886, -51447, null,
|
||||
"26 Coopers Close, Poplar, Greater London E1 4, Vereinigtes Königreich"), null, new Location(LocationType.STATION, 8096022, 50941312,
|
||||
6967206, null, "COLOGNE"), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
6967206, null, "COLOGNE"), new Date(), true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
final QueryConnectionsResult laterResult = queryMoreConnections(result.context, true);
|
||||
System.out.println(laterResult);
|
||||
|
@ -138,7 +139,7 @@ public class RtProviderLiveTest extends AbstractProviderLiveTest
|
|||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.STATION, 8400056, null, "Amsterdam RAI"), new Location(
|
||||
LocationType.STATION, 8400058, null, "Amsterdam Centraal"), new Location(LocationType.STATION, 8000085, null, "Düsseldorf Hbf"),
|
||||
new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
new Date(), true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
final QueryConnectionsResult laterResult = queryMoreConnections(result.context, true);
|
||||
System.out.println(laterResult);
|
||||
|
@ -148,7 +149,7 @@ public class RtProviderLiveTest extends AbstractProviderLiveTest
|
|||
public void crossStateConnection() throws Exception
|
||||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.STATION, 8000207, null, "Köln Hbf"), null, new Location(
|
||||
LocationType.STATION, 6096001, null, "DUBLIN"), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
LocationType.STATION, 6096001, null, "DUBLIN"), new Date(), true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
final QueryConnectionsResult laterResult = queryMoreConnections(result.context, true);
|
||||
System.out.println(laterResult);
|
||||
|
|
|
@ -28,6 +28,7 @@ import de.schildbach.pte.SbbProvider;
|
|||
import de.schildbach.pte.dto.Location;
|
||||
import de.schildbach.pte.dto.LocationType;
|
||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||
import de.schildbach.pte.dto.Product;
|
||||
import de.schildbach.pte.dto.QueryConnectionsResult;
|
||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
||||
|
||||
|
@ -93,7 +94,7 @@ public class SbbProviderLiveTest extends AbstractProviderLiveTest
|
|||
public void shortConnection() throws Exception
|
||||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.STATION, 8503000, null, "Zürich HB"), null, new Location(
|
||||
LocationType.STATION, 8507785, null, "Bern, Hauptbahnhof"), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
LocationType.STATION, 8507785, null, "Bern, Hauptbahnhof"), new Date(), true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
final QueryConnectionsResult laterResult = queryMoreConnections(result.context, true);
|
||||
System.out.println(laterResult);
|
||||
|
@ -103,7 +104,7 @@ public class SbbProviderLiveTest extends AbstractProviderLiveTest
|
|||
public void slowConnection() throws Exception
|
||||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.ANY, 0, null, "Schocherswil, Alte Post!"), null,
|
||||
new Location(LocationType.ANY, 0, null, "Laconnex, Mollach"), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
new Location(LocationType.ANY, 0, null, "Laconnex, Mollach"), new Date(), true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
final QueryConnectionsResult laterResult = queryMoreConnections(result.context, true);
|
||||
System.out.println(laterResult);
|
||||
|
@ -113,7 +114,7 @@ public class SbbProviderLiveTest extends AbstractProviderLiveTest
|
|||
public void connectionWithFootway() throws Exception
|
||||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.ADDRESS, 0, null, "Spiez, Seestraße 62"), null,
|
||||
new Location(LocationType.ADDRESS, 0, null, "Einsiedeln, Erlenmoosweg 24"), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL,
|
||||
new Location(LocationType.ADDRESS, 0, null, "Einsiedeln, Erlenmoosweg 24"), new Date(), true, Product.ALL, WalkSpeed.NORMAL,
|
||||
Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
final QueryConnectionsResult laterResult = queryMoreConnections(result.context, true);
|
||||
|
@ -124,7 +125,7 @@ public class SbbProviderLiveTest extends AbstractProviderLiveTest
|
|||
public void connectionFromAddress() throws Exception
|
||||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.ADDRESS, 0, null, "Dorfstrasse 10, Dällikon, Schweiz"),
|
||||
null, new Location(LocationType.STATION, 8500010, null, "Basel"), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL,
|
||||
null, new Location(LocationType.STATION, 8500010, null, "Basel"), new Date(), true, Product.ALL, WalkSpeed.NORMAL,
|
||||
Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
final QueryConnectionsResult laterResult = queryMoreConnections(result.context, true);
|
||||
|
|
|
@ -28,6 +28,7 @@ import de.schildbach.pte.SeProvider;
|
|||
import de.schildbach.pte.dto.Location;
|
||||
import de.schildbach.pte.dto.LocationType;
|
||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||
import de.schildbach.pte.dto.Product;
|
||||
import de.schildbach.pte.dto.QueryConnectionsResult;
|
||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
||||
|
||||
|
@ -77,7 +78,7 @@ public class SeProviderLiveTest extends AbstractProviderLiveTest
|
|||
public void shortConnection() throws Exception
|
||||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.STATION, 7414867, null, "Luleå Airport"), null,
|
||||
new Location(LocationType.STATION, 7498000, null, "STOCKHOLM"), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL,
|
||||
new Location(LocationType.STATION, 7498000, null, "STOCKHOLM"), new Date(), true, Product.ALL, WalkSpeed.NORMAL,
|
||||
Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
final QueryConnectionsResult laterResult = queryMoreConnections(result.context, true);
|
||||
|
|
|
@ -28,6 +28,7 @@ import de.schildbach.pte.SeptaProvider;
|
|||
import de.schildbach.pte.dto.Location;
|
||||
import de.schildbach.pte.dto.LocationType;
|
||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||
import de.schildbach.pte.dto.Product;
|
||||
import de.schildbach.pte.dto.QueryConnectionsResult;
|
||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
||||
|
||||
|
@ -77,7 +78,7 @@ public class SeptaProviderLiveTest extends AbstractProviderLiveTest
|
|||
public void shortConnection() throws Exception
|
||||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.STATION, 1021532, null, "30th St Station"), null,
|
||||
new Location(LocationType.STATION, 1001392, null, "15th St Station"), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL,
|
||||
new Location(LocationType.STATION, 1001392, null, "15th St Station"), new Date(), true, Product.ALL, WalkSpeed.NORMAL,
|
||||
Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
final QueryConnectionsResult laterResult = queryMoreConnections(result.context, true);
|
||||
|
@ -88,7 +89,7 @@ public class SeptaProviderLiveTest extends AbstractProviderLiveTest
|
|||
public void addressConnection() throws Exception
|
||||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.ADDRESS, 0, 40015670, -75209400, "Philadelphia 19127",
|
||||
"3601 Main St"), null, new Location(LocationType.STATION, 2090227, null, "Main Street"), new Date(), true, ALL_PRODUCTS,
|
||||
"3601 Main St"), null, new Location(LocationType.STATION, 2090227, null, "Main Street"), new Date(), true, Product.ALL,
|
||||
WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
final QueryConnectionsResult laterResult = queryMoreConnections(result.context, true);
|
||||
|
|
|
@ -31,6 +31,7 @@ import de.schildbach.pte.SfProvider;
|
|||
import de.schildbach.pte.dto.Location;
|
||||
import de.schildbach.pte.dto.LocationType;
|
||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||
import de.schildbach.pte.dto.Product;
|
||||
import de.schildbach.pte.dto.QueryConnectionsResult;
|
||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
||||
|
||||
|
@ -81,7 +82,7 @@ public class SfProviderLiveTest extends AbstractProviderLiveTest
|
|||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.STATION, 10001032, 37784976, -122406784, "San Francisco",
|
||||
"BART Powell"), null, new Location(LocationType.STATION, 10001026, 37789376, -122401320, "San Francisco", "BART Montgomery"),
|
||||
new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
new Date(), true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
assertEquals(QueryConnectionsResult.Status.OK, result.status);
|
||||
assertTrue(result.connections.size() > 0);
|
||||
|
|
|
@ -28,6 +28,7 @@ import de.schildbach.pte.ShProvider;
|
|||
import de.schildbach.pte.dto.Location;
|
||||
import de.schildbach.pte.dto.LocationType;
|
||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||
import de.schildbach.pte.dto.Product;
|
||||
import de.schildbach.pte.dto.QueryConnectionsResult;
|
||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
||||
|
||||
|
@ -93,7 +94,7 @@ public class ShProviderLiveTest extends AbstractProviderLiveTest
|
|||
public void shortConnection() throws Exception
|
||||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.STATION, 8002547, null, "Flughafen Hamburg"), null,
|
||||
new Location(LocationType.STATION, 715210, null, "Flughafen, Lübeck"), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL,
|
||||
new Location(LocationType.STATION, 715210, null, "Flughafen, Lübeck"), new Date(), true, Product.ALL, WalkSpeed.NORMAL,
|
||||
Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
final QueryConnectionsResult laterResult = queryMoreConnections(result.context, true);
|
||||
|
|
|
@ -28,6 +28,7 @@ import de.schildbach.pte.SncbProvider;
|
|||
import de.schildbach.pte.dto.Location;
|
||||
import de.schildbach.pte.dto.LocationType;
|
||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||
import de.schildbach.pte.dto.Product;
|
||||
import de.schildbach.pte.dto.QueryConnectionsResult;
|
||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
||||
|
||||
|
@ -113,7 +114,7 @@ public class SncbProviderLiveTest extends AbstractProviderLiveTest
|
|||
public void connectionFromAddress() throws Exception
|
||||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.ADDRESS, 0, null, "Bruxelles - Haren, Rue Paul Janson 9"),
|
||||
null, new Location(LocationType.STATION, 8500010, null, "Basel"), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL,
|
||||
null, new Location(LocationType.STATION, 8500010, null, "Basel"), new Date(), true, Product.ALL, WalkSpeed.NORMAL,
|
||||
Accessibility.NEUTRAL);
|
||||
System.out.println(result.status + " " + result.connections);
|
||||
|
||||
|
|
|
@ -28,6 +28,7 @@ import de.schildbach.pte.StockholmProvider;
|
|||
import de.schildbach.pte.dto.Location;
|
||||
import de.schildbach.pte.dto.LocationType;
|
||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||
import de.schildbach.pte.dto.Product;
|
||||
import de.schildbach.pte.dto.QueryConnectionsResult;
|
||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
||||
|
||||
|
@ -85,7 +86,7 @@ public class StockholmProviderLiveTest extends AbstractProviderLiveTest
|
|||
public void shortConnection() throws Exception
|
||||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.STATION, 200101051, "Stockholm", "T-Centralen"), null,
|
||||
new Location(LocationType.STATION, 200101221, "Stockholm", "Abrahamsberg"), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL,
|
||||
new Location(LocationType.STATION, 200101221, "Stockholm", "Abrahamsberg"), new Date(), true, Product.ALL, WalkSpeed.NORMAL,
|
||||
Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
final QueryConnectionsResult laterResult = queryMoreConnections(result.context, true);
|
||||
|
|
|
@ -31,6 +31,7 @@ import de.schildbach.pte.StvProvider;
|
|||
import de.schildbach.pte.dto.Location;
|
||||
import de.schildbach.pte.dto.LocationType;
|
||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||
import de.schildbach.pte.dto.Product;
|
||||
import de.schildbach.pte.dto.QueryConnectionsResult;
|
||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
||||
|
||||
|
@ -88,7 +89,7 @@ public class StvProviderLiveTest extends AbstractProviderLiveTest
|
|||
public void shortConnection() throws Exception
|
||||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.STATION, 63203040, null, "Graz Hauptbahnhof"), null,
|
||||
new Location(LocationType.STATION, 63203149, null, "Graz Babenbergerstraße"), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL,
|
||||
new Location(LocationType.STATION, 63203149, null, "Graz Babenbergerstraße"), new Date(), true, Product.ALL, WalkSpeed.NORMAL,
|
||||
Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
assertEquals(QueryConnectionsResult.Status.OK, result.status);
|
||||
|
|
|
@ -31,6 +31,7 @@ import de.schildbach.pte.SvvProvider;
|
|||
import de.schildbach.pte.dto.Location;
|
||||
import de.schildbach.pte.dto.LocationType;
|
||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||
import de.schildbach.pte.dto.Product;
|
||||
import de.schildbach.pte.dto.QueryConnectionsResult;
|
||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
||||
|
||||
|
@ -81,7 +82,7 @@ public class SvvProviderLiveTest extends AbstractProviderLiveTest
|
|||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.STATION, 60650021, 47797036, 13053608, "Salzburg",
|
||||
"Justizgebäude"), null, new Location(LocationType.STATION, 60650022, 47793760, 13059338, "Salzburg", "Akademiestraße"), new Date(),
|
||||
true, ALL_PRODUCTS, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
assertEquals(QueryConnectionsResult.Status.OK, result.status);
|
||||
assertTrue(result.connections.size() > 0);
|
||||
|
|
|
@ -31,6 +31,7 @@ import de.schildbach.pte.SydneyProvider;
|
|||
import de.schildbach.pte.dto.Location;
|
||||
import de.schildbach.pte.dto.LocationType;
|
||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||
import de.schildbach.pte.dto.Product;
|
||||
import de.schildbach.pte.dto.QueryConnectionsResult;
|
||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
||||
|
||||
|
@ -80,7 +81,7 @@ public class SydneyProviderLiveTest extends AbstractProviderLiveTest
|
|||
public void shortConnection() throws Exception
|
||||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.STATION, 10101100, "Sydney", "Central Station"), null,
|
||||
new Location(LocationType.STATION, 0, "Sydney", "Capitol Square"), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL,
|
||||
new Location(LocationType.STATION, 0, "Sydney", "Capitol Square"), new Date(), true, Product.ALL, WalkSpeed.NORMAL,
|
||||
Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
assertEquals(QueryConnectionsResult.Status.OK, result.status);
|
||||
|
|
|
@ -31,6 +31,7 @@ import de.schildbach.pte.TfiProvider;
|
|||
import de.schildbach.pte.dto.Location;
|
||||
import de.schildbach.pte.dto.LocationType;
|
||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||
import de.schildbach.pte.dto.Product;
|
||||
import de.schildbach.pte.dto.QueryConnectionsResult;
|
||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
||||
|
||||
|
@ -81,7 +82,7 @@ public class TfiProviderLiveTest extends AbstractProviderLiveTest
|
|||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.STATION, 51013670, "Dublin City South",
|
||||
"O'Connell Bridge (on Lower O'Connell Street)"), null, new Location(LocationType.STATION, 52003679, "Dublin City South",
|
||||
"Dublin (Baggot Street)"), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
"Dublin (Baggot Street)"), new Date(), true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
assertEquals(QueryConnectionsResult.Status.OK, result.status);
|
||||
assertTrue(result.connections.size() > 0);
|
||||
|
|
|
@ -31,6 +31,7 @@ import de.schildbach.pte.TflProvider;
|
|||
import de.schildbach.pte.dto.Location;
|
||||
import de.schildbach.pte.dto.LocationType;
|
||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||
import de.schildbach.pte.dto.Product;
|
||||
import de.schildbach.pte.dto.QueryConnectionsResult;
|
||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
||||
|
||||
|
@ -80,7 +81,7 @@ public class TflProviderLiveTest extends AbstractProviderLiveTest
|
|||
public void shortConnection() throws Exception
|
||||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.STATION, 1008730, null, "King & Queen Wharf"), null,
|
||||
new Location(LocationType.STATION, 1006433, null, "Edinburgh Court"), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL,
|
||||
new Location(LocationType.STATION, 1006433, null, "Edinburgh Court"), new Date(), true, Product.ALL, WalkSpeed.NORMAL,
|
||||
Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
assertEquals(QueryConnectionsResult.Status.OK, result.status);
|
||||
|
@ -109,7 +110,7 @@ public class TflProviderLiveTest extends AbstractProviderLiveTest
|
|||
public void postcodeConnection() throws Exception
|
||||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.ANY, 0, null, "sw19 8ta"), null, new Location(
|
||||
LocationType.STATION, 1016019, 51655903, -397249, null, "Watford (Herts), Watford Town Centre"), new Date(), true, ALL_PRODUCTS,
|
||||
LocationType.STATION, 1016019, 51655903, -397249, null, "Watford (Herts), Watford Town Centre"), new Date(), true, Product.ALL,
|
||||
WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
}
|
||||
|
|
|
@ -31,6 +31,7 @@ import de.schildbach.pte.TlemProvider;
|
|||
import de.schildbach.pte.dto.Location;
|
||||
import de.schildbach.pte.dto.LocationType;
|
||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||
import de.schildbach.pte.dto.Product;
|
||||
import de.schildbach.pte.dto.QueryConnectionsResult;
|
||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
||||
|
||||
|
@ -80,7 +81,7 @@ public class TlemProviderLiveTest extends AbstractProviderLiveTest
|
|||
public void shortConnection() throws Exception
|
||||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.STATION, 1008730, null, "King & Queen Wharf"), null,
|
||||
new Location(LocationType.STATION, 1006433, null, "Edinburgh Court"), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL,
|
||||
new Location(LocationType.STATION, 1006433, null, "Edinburgh Court"), new Date(), true, Product.ALL, WalkSpeed.NORMAL,
|
||||
Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
assertEquals(QueryConnectionsResult.Status.OK, result.status);
|
||||
|
|
|
@ -31,6 +31,7 @@ import de.schildbach.pte.TlswProvider;
|
|||
import de.schildbach.pte.dto.Location;
|
||||
import de.schildbach.pte.dto.LocationType;
|
||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||
import de.schildbach.pte.dto.Product;
|
||||
import de.schildbach.pte.dto.QueryConnectionsResult;
|
||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
||||
|
||||
|
@ -81,7 +82,7 @@ public class TlswProviderLiveTest extends AbstractProviderLiveTest
|
|||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.STATION, 60011202, 51850168, -1094302, "Upper Arncott",
|
||||
"Bullingdon Prison"), null, new Location(LocationType.STATION, 60006576, 51856352, -1113127, "Lower Arncott", "The Plough"),
|
||||
new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
new Date(), true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
assertEquals(QueryConnectionsResult.Status.OK, result.status);
|
||||
assertTrue(result.connections.size() > 0);
|
||||
|
|
|
@ -31,6 +31,7 @@ import de.schildbach.pte.TlwmProvider;
|
|||
import de.schildbach.pte.dto.Location;
|
||||
import de.schildbach.pte.dto.LocationType;
|
||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||
import de.schildbach.pte.dto.Product;
|
||||
import de.schildbach.pte.dto.QueryConnectionsResult;
|
||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
||||
|
||||
|
@ -81,7 +82,7 @@ public class TlwmProviderLiveTest extends AbstractProviderLiveTest
|
|||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.STATION, 2099014, 52478184, -1898364, "Birmingham",
|
||||
"Birmingham New Street Rail Station"), null, new Location(LocationType.STATION, 2099150, 52585468, -2122962, "Wolverhampton",
|
||||
"Wolverhampton Rail Station"), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
"Wolverhampton Rail Station"), new Date(), true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
assertEquals(QueryConnectionsResult.Status.OK, result.status);
|
||||
assertTrue(result.connections.size() > 0);
|
||||
|
|
|
@ -31,6 +31,7 @@ import de.schildbach.pte.VagfrProvider;
|
|||
import de.schildbach.pte.dto.Location;
|
||||
import de.schildbach.pte.dto.LocationType;
|
||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||
import de.schildbach.pte.dto.Product;
|
||||
import de.schildbach.pte.dto.QueryConnectionsResult;
|
||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
||||
|
||||
|
@ -80,7 +81,7 @@ public class VagfrProviderLiveTest extends AbstractProviderLiveTest
|
|||
public void shortConnection() throws Exception
|
||||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.STATION, 6930100, null, "Freiburg Bertoldsbrunnen"), null,
|
||||
new Location(LocationType.STATION, 6930101, null, "Freiburg Siegesdenkmal"), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL,
|
||||
new Location(LocationType.STATION, 6930101, null, "Freiburg Siegesdenkmal"), new Date(), true, Product.ALL, WalkSpeed.NORMAL,
|
||||
Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
assertEquals(QueryConnectionsResult.Status.OK, result.status);
|
||||
|
|
|
@ -31,6 +31,7 @@ import de.schildbach.pte.VbbProvider;
|
|||
import de.schildbach.pte.dto.Location;
|
||||
import de.schildbach.pte.dto.LocationType;
|
||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||
import de.schildbach.pte.dto.Product;
|
||||
import de.schildbach.pte.dto.QueryConnectionsResult;
|
||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
||||
|
||||
|
@ -117,7 +118,7 @@ public class VbbProviderLiveTest extends AbstractProviderLiveTest
|
|||
public void shortConnection() throws Exception
|
||||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.STATION, 9056102, "Berlin", "Nollendorfplatz"), null,
|
||||
new Location(LocationType.STATION, 9013103, "Berlin", "Prinzenstraße"), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL,
|
||||
new Location(LocationType.STATION, 9013103, "Berlin", "Prinzenstraße"), new Date(), true, Product.ALL, WalkSpeed.NORMAL,
|
||||
Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
final QueryConnectionsResult laterResult = queryMoreConnections(result.context, true);
|
||||
|
@ -131,7 +132,7 @@ public class VbbProviderLiveTest extends AbstractProviderLiveTest
|
|||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.STATION, 9056102, "Berlin", "Nollendorfplatz"),
|
||||
new Location(LocationType.STATION, 9044202, "Berlin", "Bundesplatz"), new Location(LocationType.STATION, 9013103, "Berlin",
|
||||
"Prinzenstraße"), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
"Prinzenstraße"), new Date(), true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
final QueryConnectionsResult laterResult = queryMoreConnections(result.context, true);
|
||||
System.out.println(laterResult);
|
||||
|
@ -141,7 +142,7 @@ public class VbbProviderLiveTest extends AbstractProviderLiveTest
|
|||
public void connectionBetweenCoordinates() throws Exception
|
||||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.ADDRESS, 0, 52501507, 13357026, null, null), null,
|
||||
new Location(LocationType.ADDRESS, 0, 52513639, 13568648, null, null), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL,
|
||||
new Location(LocationType.ADDRESS, 0, 52513639, 13568648, null, null), new Date(), true, Product.ALL, WalkSpeed.NORMAL,
|
||||
Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
final QueryConnectionsResult laterResult = queryMoreConnections(result.context, true);
|
||||
|
@ -153,7 +154,7 @@ public class VbbProviderLiveTest extends AbstractProviderLiveTest
|
|||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.ADDRESS, 0, 52501507, 13357026, null, null), new Location(
|
||||
LocationType.ADDRESS, 0, 52479868, 13324247, null, null), new Location(LocationType.ADDRESS, 0, 52513639, 13568648, null, null),
|
||||
new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
new Date(), true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
final QueryConnectionsResult laterResult = queryMoreConnections(result.context, true);
|
||||
System.out.println(laterResult);
|
||||
|
@ -164,7 +165,7 @@ public class VbbProviderLiveTest extends AbstractProviderLiveTest
|
|||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.ADDRESS, 0, 52479663, 13324278, "10715 Berlin-Wilmersdorf",
|
||||
"Weimarische Str. 7"), null, new Location(LocationType.ADDRESS, 0, 52541536, 13421290, "10437 Berlin-Prenzlauer Berg",
|
||||
"Göhrener Str. 5"), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
"Göhrener Str. 5"), new Date(), true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
final QueryConnectionsResult laterResult = queryMoreConnections(result.context, true);
|
||||
System.out.println(laterResult);
|
||||
|
@ -175,7 +176,7 @@ public class VbbProviderLiveTest extends AbstractProviderLiveTest
|
|||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.ADDRESS, 0, 52479663, 13324278, "10715 Berlin-Wilmersdorf",
|
||||
"Weimarische Str. 7"), new Location(LocationType.ADDRESS, 0, 52527872, 13381657, "10115 Berlin-Mitte", "Hannoversche Str. 20"),
|
||||
new Location(LocationType.ADDRESS, 0, 52526029, 13399878, "10178 Berlin-Mitte", "Sophienstr. 24"), new Date(), true, ALL_PRODUCTS,
|
||||
new Location(LocationType.ADDRESS, 0, 52526029, 13399878, "10178 Berlin-Mitte", "Sophienstr. 24"), new Date(), true, Product.ALL,
|
||||
WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
final QueryConnectionsResult laterResult = queryMoreConnections(result.context, true);
|
||||
|
|
|
@ -31,6 +31,7 @@ import de.schildbach.pte.VblProvider;
|
|||
import de.schildbach.pte.dto.Location;
|
||||
import de.schildbach.pte.dto.LocationType;
|
||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||
import de.schildbach.pte.dto.Product;
|
||||
import de.schildbach.pte.dto.QueryConnectionsResult;
|
||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
||||
|
||||
|
@ -89,7 +90,7 @@ public class VblProviderLiveTest extends AbstractProviderLiveTest
|
|||
{
|
||||
final QueryConnectionsResult result = queryConnections(
|
||||
new Location(LocationType.STATION, 119, 47050760, 8310252, "Luzern", "Luzern, Bahnhof"), null, new Location(LocationType.STATION,
|
||||
118, 47048844, 8306433, "Luzern", "Kantonalbank"), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
118, 47048844, 8306433, "Luzern", "Kantonalbank"), new Date(), true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
assertEquals(QueryConnectionsResult.Status.OK, result.status);
|
||||
assertTrue(result.connections.size() > 0);
|
||||
|
|
|
@ -30,6 +30,7 @@ import de.schildbach.pte.VbnProvider;
|
|||
import de.schildbach.pte.dto.Location;
|
||||
import de.schildbach.pte.dto.LocationType;
|
||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||
import de.schildbach.pte.dto.Product;
|
||||
import de.schildbach.pte.dto.QueryConnectionsResult;
|
||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
||||
|
||||
|
@ -79,7 +80,7 @@ public class VbnProviderLiveTest extends AbstractProviderLiveTest
|
|||
public void shortConnection() throws Exception
|
||||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.STATION, 8096109, null, "Oldenburg"), null, new Location(
|
||||
LocationType.STATION, 625398, null, "Bremerhaven"), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
LocationType.STATION, 625398, null, "Bremerhaven"), new Date(), true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
assertEquals(QueryConnectionsResult.Status.OK, result.status);
|
||||
System.out.println(result);
|
||||
final QueryConnectionsResult laterResult = queryMoreConnections(result.context, true);
|
||||
|
@ -90,7 +91,7 @@ public class VbnProviderLiveTest extends AbstractProviderLiveTest
|
|||
public void connectionDateOutsideTimetablePeriod() throws Exception
|
||||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.STATION, 8096109, null, "Oldenburg"), null, new Location(
|
||||
LocationType.STATION, 625398, null, "Bremerhaven"), new Date(1155822689759l), true, ALL_PRODUCTS, WalkSpeed.NORMAL,
|
||||
LocationType.STATION, 625398, null, "Bremerhaven"), new Date(1155822689759l), true, Product.ALL, WalkSpeed.NORMAL,
|
||||
Accessibility.NEUTRAL);
|
||||
assertEquals(QueryConnectionsResult.Status.INVALID_DATE, result.status);
|
||||
}
|
||||
|
|
|
@ -28,6 +28,7 @@ import de.schildbach.pte.VgnProvider;
|
|||
import de.schildbach.pte.dto.Location;
|
||||
import de.schildbach.pte.dto.LocationType;
|
||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||
import de.schildbach.pte.dto.Product;
|
||||
import de.schildbach.pte.dto.QueryConnectionsResult;
|
||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
||||
|
||||
|
@ -85,7 +86,7 @@ public class VgnProviderLiveTest extends AbstractProviderLiveTest
|
|||
public void shortConnection() throws Exception
|
||||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.STATION, 451, "Nürnberg", "Ostring"), null, new Location(
|
||||
LocationType.STATION, 510, "Nürnberg", "Hauptbahnhof"), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
LocationType.STATION, 510, "Nürnberg", "Hauptbahnhof"), new Date(), true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
final QueryConnectionsResult laterResult = queryMoreConnections(result.context, true);
|
||||
System.out.println(laterResult);
|
||||
|
|
|
@ -28,6 +28,7 @@ import de.schildbach.pte.VgsProvider;
|
|||
import de.schildbach.pte.dto.Location;
|
||||
import de.schildbach.pte.dto.LocationType;
|
||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||
import de.schildbach.pte.dto.Product;
|
||||
import de.schildbach.pte.dto.QueryConnectionsResult;
|
||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
||||
|
||||
|
@ -77,7 +78,7 @@ public class VgsProviderLiveTest extends AbstractProviderLiveTest
|
|||
public void shortConnection() throws Exception
|
||||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.STATION, 10640, "Saarbrücken", "Hauptbahnhof"), null,
|
||||
new Location(LocationType.STATION, 10700, "Saarbrücken", "Ostbahnhof"), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL,
|
||||
new Location(LocationType.STATION, 10700, "Saarbrücken", "Ostbahnhof"), new Date(), true, Product.ALL, WalkSpeed.NORMAL,
|
||||
Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
final QueryConnectionsResult laterResult = queryMoreConnections(result.context, true);
|
||||
|
|
|
@ -31,6 +31,7 @@ import de.schildbach.pte.VmobilProvider;
|
|||
import de.schildbach.pte.dto.Location;
|
||||
import de.schildbach.pte.dto.LocationType;
|
||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||
import de.schildbach.pte.dto.Product;
|
||||
import de.schildbach.pte.dto.QueryConnectionsResult;
|
||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
||||
|
||||
|
@ -89,7 +90,7 @@ public class VmobilProviderLiveTest extends AbstractProviderLiveTest
|
|||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.STATION, 60000822, 47238428, 9596940, "Feldkirch",
|
||||
"Katzenturm"), null, new Location(LocationType.STATION, 60000305, 47240744, 9589368, "Tosters", "Vorarlberghalle"), new Date(), true,
|
||||
ALL_PRODUCTS, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
assertEquals(QueryConnectionsResult.Status.OK, result.status);
|
||||
assertTrue(result.connections.size() > 0);
|
||||
|
|
|
@ -31,6 +31,7 @@ import de.schildbach.pte.VmsProvider;
|
|||
import de.schildbach.pte.dto.Location;
|
||||
import de.schildbach.pte.dto.LocationType;
|
||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||
import de.schildbach.pte.dto.Product;
|
||||
import de.schildbach.pte.dto.QueryConnectionsResult;
|
||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
||||
|
||||
|
@ -81,7 +82,7 @@ public class VmsProviderLiveTest extends AbstractProviderLiveTest
|
|||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.STATION, 36030131, 50831380, 12922278, "Chemnitz",
|
||||
"Zentralhaltestelle"), null, new Location(LocationType.STATION, 36030522, 50836056, 12922042, "Chemnitz", "Stadthalle"), new Date(),
|
||||
true, ALL_PRODUCTS, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
assertEquals(QueryConnectionsResult.Status.OK, result.status);
|
||||
assertTrue(result.connections.size() > 0);
|
||||
|
|
|
@ -31,6 +31,7 @@ import de.schildbach.pte.VmvProvider;
|
|||
import de.schildbach.pte.dto.Location;
|
||||
import de.schildbach.pte.dto.LocationType;
|
||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||
import de.schildbach.pte.dto.Product;
|
||||
import de.schildbach.pte.dto.QueryConnectionsResult;
|
||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
||||
|
||||
|
@ -80,7 +81,7 @@ public class VmvProviderLiveTest extends AbstractProviderLiveTest
|
|||
public void shortConnection() throws Exception
|
||||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.STATION, 44402006, null, "Schwerin Marienplatz"), null,
|
||||
new Location(LocationType.STATION, 44402007, 53625272, 11409350, null, "Schlossblick"), new Date(), true, ALL_PRODUCTS,
|
||||
new Location(LocationType.STATION, 44402007, 53625272, 11409350, null, "Schlossblick"), new Date(), true, Product.ALL,
|
||||
WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
assertEquals(QueryConnectionsResult.Status.OK, result.status);
|
||||
|
|
|
@ -31,6 +31,7 @@ import de.schildbach.pte.VorProvider;
|
|||
import de.schildbach.pte.dto.Location;
|
||||
import de.schildbach.pte.dto.LocationType;
|
||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||
import de.schildbach.pte.dto.Product;
|
||||
import de.schildbach.pte.dto.QueryConnectionsResult;
|
||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
||||
|
||||
|
@ -89,7 +90,7 @@ public class VorProviderLiveTest extends AbstractProviderLiveTest
|
|||
{
|
||||
final QueryConnectionsResult result = queryConnections(
|
||||
new Location(LocationType.STATION, 60200657, 48200756, 16369001, "Wien", "Karlsplatz"), null, new Location(LocationType.STATION,
|
||||
60201094, 48198612, 16367719, "Wien", "Resselgasse"), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
60201094, 48198612, 16367719, "Wien", "Resselgasse"), new Date(), true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
assertEquals(QueryConnectionsResult.Status.OK, result.status);
|
||||
assertTrue(result.connections.size() > 0);
|
||||
|
@ -117,7 +118,7 @@ public class VorProviderLiveTest extends AbstractProviderLiveTest
|
|||
public void connectionBetweenCoordinates() throws Exception
|
||||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.ADDRESS, 0, 48180281, 16333551), null, new Location(
|
||||
LocationType.ADDRESS, 0, 48240452, 16444788), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
LocationType.ADDRESS, 0, 48240452, 16444788), new Date(), true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
final QueryConnectionsResult laterResult = queryMoreConnections(result.context, true);
|
||||
System.out.println(laterResult);
|
||||
|
|
|
@ -31,6 +31,7 @@ import de.schildbach.pte.VrnProvider;
|
|||
import de.schildbach.pte.dto.Location;
|
||||
import de.schildbach.pte.dto.LocationType;
|
||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||
import de.schildbach.pte.dto.Product;
|
||||
import de.schildbach.pte.dto.QueryConnectionsResult;
|
||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
||||
|
||||
|
@ -113,7 +114,7 @@ public class VrnProviderLiveTest extends AbstractProviderLiveTest
|
|||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.STATION, 6002417, 49479748, 8469938, "Mannheim",
|
||||
"Mannheim, Hauptbahnhof"), null, new Location(LocationType.STATION, 6005542, 49482892, 8473050, "Mannheim", "Kunsthalle"),
|
||||
new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
new Date(), true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
assertEquals(QueryConnectionsResult.Status.OK, result.status);
|
||||
assertTrue(result.connections.size() > 0);
|
||||
|
|
|
@ -31,6 +31,7 @@ import de.schildbach.pte.VrrProvider;
|
|||
import de.schildbach.pte.dto.Location;
|
||||
import de.schildbach.pte.dto.LocationType;
|
||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||
import de.schildbach.pte.dto.Product;
|
||||
import de.schildbach.pte.dto.QueryConnectionsResult;
|
||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
||||
|
||||
|
@ -116,7 +117,7 @@ public class VrrProviderLiveTest extends AbstractProviderLiveTest
|
|||
public void shortConnection() throws Exception
|
||||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.STATION, 20009289, "Essen", "Hauptbahnhof"), null,
|
||||
new Location(LocationType.STATION, 20009161, "Essen", "Bismarckplatz"), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL,
|
||||
new Location(LocationType.STATION, 20009161, "Essen", "Bismarckplatz"), new Date(), true, Product.ALL, WalkSpeed.NORMAL,
|
||||
Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
assertEquals(QueryConnectionsResult.Status.OK, result.status);
|
||||
|
@ -145,7 +146,7 @@ public class VrrProviderLiveTest extends AbstractProviderLiveTest
|
|||
public void shortConnectionPaderborn() throws Exception
|
||||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.STATION, 23007000, "Paderborn", "Paderborn Hbf"), null,
|
||||
new Location(LocationType.STATION, 23007700, "Höxter", "Bahnhof / Rathaus"), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL,
|
||||
new Location(LocationType.STATION, 23007700, "Höxter", "Bahnhof / Rathaus"), new Date(), true, Product.ALL, WalkSpeed.NORMAL,
|
||||
Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
assertEquals(QueryConnectionsResult.Status.OK, result.status);
|
||||
|
|
|
@ -31,6 +31,7 @@ import de.schildbach.pte.VrtProvider;
|
|||
import de.schildbach.pte.dto.Location;
|
||||
import de.schildbach.pte.dto.LocationType;
|
||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||
import de.schildbach.pte.dto.Product;
|
||||
import de.schildbach.pte.dto.QueryConnectionsResult;
|
||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
||||
|
||||
|
@ -80,7 +81,7 @@ public class VrtProviderLiveTest extends AbstractProviderLiveTest
|
|||
public void shortConnection() throws Exception
|
||||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.STATION, 17002402, null, "Bahnhof"), null, new Location(
|
||||
LocationType.STATION, 17009001, null, "Bahnhof"), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
LocationType.STATION, 17009001, null, "Bahnhof"), new Date(), true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
assertEquals(QueryConnectionsResult.Status.OK, result.status);
|
||||
assertTrue(result.connections.size() > 0);
|
||||
|
|
|
@ -31,6 +31,7 @@ import de.schildbach.pte.VvmProvider;
|
|||
import de.schildbach.pte.dto.Location;
|
||||
import de.schildbach.pte.dto.LocationType;
|
||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||
import de.schildbach.pte.dto.Product;
|
||||
import de.schildbach.pte.dto.QueryConnectionsResult;
|
||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
||||
|
||||
|
@ -89,7 +90,7 @@ public class VvmProviderLiveTest extends AbstractProviderLiveTest
|
|||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.STATION, 3700075, 49801076, 9934302, "Würzburg",
|
||||
"Busbahnhof"), null, new Location(LocationType.STATION, 3700403, 49797772, 9934986, "Würzburg", "Stift Haug"), new Date(), true,
|
||||
ALL_PRODUCTS, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
assertEquals(QueryConnectionsResult.Status.OK, result.status);
|
||||
assertTrue(result.connections.size() > 0);
|
||||
|
|
|
@ -31,6 +31,7 @@ import de.schildbach.pte.VvoProvider;
|
|||
import de.schildbach.pte.dto.Location;
|
||||
import de.schildbach.pte.dto.LocationType;
|
||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||
import de.schildbach.pte.dto.Product;
|
||||
import de.schildbach.pte.dto.QueryConnectionsResult;
|
||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
||||
|
||||
|
@ -88,7 +89,7 @@ public class VvoProviderLiveTest extends AbstractProviderLiveTest
|
|||
public void shortConnection() throws Exception
|
||||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.STATION, 33000013, null, "Dresden Albertplatz"), null,
|
||||
new Location(LocationType.STATION, 33000262, null, "Dresden Bischofsweg"), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL,
|
||||
new Location(LocationType.STATION, 33000262, null, "Dresden Bischofsweg"), new Date(), true, Product.ALL, WalkSpeed.NORMAL,
|
||||
Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
assertEquals(QueryConnectionsResult.Status.OK, result.status);
|
||||
|
|
|
@ -31,6 +31,7 @@ import de.schildbach.pte.VvsProvider;
|
|||
import de.schildbach.pte.dto.Location;
|
||||
import de.schildbach.pte.dto.LocationType;
|
||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||
import de.schildbach.pte.dto.Product;
|
||||
import de.schildbach.pte.dto.QueryConnectionsResult;
|
||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
||||
|
||||
|
@ -89,7 +90,7 @@ public class VvsProviderLiveTest extends AbstractProviderLiveTest
|
|||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.STATION, 5006118, 48782984, 9179846, "Stuttgart",
|
||||
"Stuttgart, Hauptbahnhof"), null, new Location(LocationType.STATION, 5006024, 48782584, 9187098, "Stuttgart", "Staatsgalerie"),
|
||||
new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
new Date(), true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
assertEquals(QueryConnectionsResult.Status.OK, result.status);
|
||||
assertTrue(result.connections.size() > 0);
|
||||
|
|
|
@ -31,6 +31,7 @@ import de.schildbach.pte.VvtProvider;
|
|||
import de.schildbach.pte.dto.Location;
|
||||
import de.schildbach.pte.dto.LocationType;
|
||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||
import de.schildbach.pte.dto.Product;
|
||||
import de.schildbach.pte.dto.QueryConnectionsResult;
|
||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
||||
|
||||
|
@ -89,7 +90,7 @@ public class VvtProviderLiveTest extends AbstractProviderLiveTest
|
|||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.STATION, 60161512, 47268336, 11355532, "Innsbruck",
|
||||
"Allerheiligen"), null, new Location(LocationType.STATION, 60161510, 47267272, 11350938, "Innsbruck", "Tschiggfreystraße"),
|
||||
new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
new Date(), true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
assertEquals(QueryConnectionsResult.Status.OK, result.status);
|
||||
assertTrue(result.connections.size() > 0);
|
||||
|
|
|
@ -31,6 +31,7 @@ import de.schildbach.pte.VvvProvider;
|
|||
import de.schildbach.pte.dto.Location;
|
||||
import de.schildbach.pte.dto.LocationType;
|
||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||
import de.schildbach.pte.dto.Product;
|
||||
import de.schildbach.pte.dto.QueryConnectionsResult;
|
||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
||||
|
||||
|
@ -89,7 +90,7 @@ public class VvvProviderLiveTest extends AbstractProviderLiveTest
|
|||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.STATION, 30202006, 50484564, 12140028, "Plauen (Vogtl)",
|
||||
"Bickelstraße"), null, new Location(LocationType.STATION, 30202012, 50487332, 12139050, "Plauen (Vogtl)", "Hofer Straße"),
|
||||
new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
new Date(), true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
assertEquals(QueryConnectionsResult.Status.OK, result.status);
|
||||
assertTrue(result.connections.size() > 0);
|
||||
|
|
|
@ -28,6 +28,7 @@ import de.schildbach.pte.ZvvProvider;
|
|||
import de.schildbach.pte.dto.Location;
|
||||
import de.schildbach.pte.dto.LocationType;
|
||||
import de.schildbach.pte.dto.NearbyStationsResult;
|
||||
import de.schildbach.pte.dto.Product;
|
||||
import de.schildbach.pte.dto.QueryConnectionsResult;
|
||||
import de.schildbach.pte.dto.QueryDeparturesResult;
|
||||
|
||||
|
@ -77,7 +78,7 @@ public class ZvvProviderLiveTest extends AbstractProviderLiveTest
|
|||
public void shortConnection() throws Exception
|
||||
{
|
||||
final QueryConnectionsResult result = queryConnections(new Location(LocationType.STATION, 8503000, null, "Zürich HB"), null, new Location(
|
||||
LocationType.STATION, 8507785, null, "Bern, Hauptbahnhof"), new Date(), true, ALL_PRODUCTS, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
LocationType.STATION, 8507785, null, "Bern, Hauptbahnhof"), new Date(), true, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL);
|
||||
System.out.println(result);
|
||||
final QueryConnectionsResult laterResult = queryMoreConnections(result.context, true);
|
||||
System.out.println(laterResult);
|
||||
|
|
|
@ -31,6 +31,7 @@ import de.schildbach.pte.NetworkProvider.WalkSpeed;
|
|||
import de.schildbach.pte.RtProvider;
|
||||
import de.schildbach.pte.dto.Location;
|
||||
import de.schildbach.pte.dto.LocationType;
|
||||
import de.schildbach.pte.dto.Product;
|
||||
import de.schildbach.pte.dto.QueryConnectionsResult;
|
||||
|
||||
/**
|
||||
|
@ -52,7 +53,7 @@ public class ConnectionController
|
|||
{
|
||||
final Location fromLocation = new Location(fromType, fromId, null, from);
|
||||
final Location toLocation = new Location(toType, toId, null, to);
|
||||
final String products = "IRSUTBFC";
|
||||
return provider.queryConnections(fromLocation, null, toLocation, new Date(), true, 4, products, WalkSpeed.NORMAL, Accessibility.NEUTRAL, null);
|
||||
return provider.queryConnections(fromLocation, null, toLocation, new Date(), true, 4, Product.ALL, WalkSpeed.NORMAL, Accessibility.NEUTRAL,
|
||||
null);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue