mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-19 08:49:58 +00:00
don't use non-unique efa routeIndex/routeTripIndex'es
This commit is contained in:
parent
47a2e6dc78
commit
c99ad70e1b
23 changed files with 279 additions and 13 deletions
|
@ -86,6 +86,7 @@ public abstract class AbstractEfaProvider extends AbstractNetworkProvider
|
|||
private final boolean needsSpEncId;
|
||||
private Charset requestUrlEncoding = ISO_8859_1;
|
||||
private boolean suppressPositions = false;
|
||||
private boolean useRouteIndexAsConnectionId = true;
|
||||
private final XmlPullParserFactory parserFactory;
|
||||
|
||||
private static class Context implements QueryConnectionsContext
|
||||
|
@ -160,6 +161,11 @@ public abstract class AbstractEfaProvider extends AbstractNetworkProvider
|
|||
this.suppressPositions = suppressPositions;
|
||||
}
|
||||
|
||||
public void setUseRouteIndexAsConnectionId(final boolean useRouteIndexAsConnectionId)
|
||||
{
|
||||
this.useRouteIndexAsConnectionId = useRouteIndexAsConnectionId;
|
||||
}
|
||||
|
||||
protected TimeZone timeZone()
|
||||
{
|
||||
return TimeZone.getTimeZone("Europe/Berlin");
|
||||
|
@ -1901,7 +1907,8 @@ public abstract class AbstractEfaProvider extends AbstractNetworkProvider
|
|||
|
||||
while (XmlPullUtil.test(pp, "itdRoute"))
|
||||
{
|
||||
final String id = pp.getAttributeValue(null, "routeIndex") + "-" + pp.getAttributeValue(null, "routeTripIndex");
|
||||
final String id = useRouteIndexAsConnectionId ? pp.getAttributeValue(null, "routeIndex") + "-"
|
||||
+ pp.getAttributeValue(null, "routeTripIndex") : null;
|
||||
final int numChanges = XmlPullUtil.intAttr(pp, "changes");
|
||||
XmlPullUtil.enter(pp, "itdRoute");
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue