renamed VbbProvider to BvgProvider

git-svn-id: https://public-transport-enabler.googlecode.com/svn/trunk@311 0924bc21-9374-b0fa-ee44-9ff1593b38f0
This commit is contained in:
andreas.schildbach 2010-10-17 21:49:06 +00:00
parent b04e80cbf2
commit 98ceed52f8
2 changed files with 7 additions and 7 deletions

View file

@ -46,7 +46,7 @@ import de.schildbach.pte.util.ParserUtils;
/** /**
* @author Andreas Schildbach * @author Andreas Schildbach
*/ */
public final class VbbProvider implements NetworkProvider public final class BvgProvider implements NetworkProvider
{ {
public static final String NETWORK_ID = "mobil.bvg.de"; public static final String NETWORK_ID = "mobil.bvg.de";
@ -109,10 +109,10 @@ public final class VbbProvider implements NetworkProvider
uri.append("http://mobil.bvg.de/Fahrinfo/bin/query.bin/dox"); uri.append("http://mobil.bvg.de/Fahrinfo/bin/query.bin/dox");
uri.append("?REQ0HafasInitialSelection=0"); uri.append("?REQ0HafasInitialSelection=0");
appendLocationVbb(uri, from, "S0", "SID"); appendLocationBvg(uri, from, "S0", "SID");
appendLocationVbb(uri, to, "Z0", "ZID"); appendLocationBvg(uri, to, "Z0", "ZID");
if (via != null) if (via != null)
appendLocationVbb(uri, via, "1", null); appendLocationBvg(uri, via, "1", null);
uri.append("&REQ0HafasSearchForw=").append(dep ? "1" : "0"); uri.append("&REQ0HafasSearchForw=").append(dep ? "1" : "0");
uri.append("&REQ0JourneyDate=").append(ParserUtils.urlEncode(DATE_FORMAT.format(date))); uri.append("&REQ0JourneyDate=").append(ParserUtils.urlEncode(DATE_FORMAT.format(date)));
@ -142,7 +142,7 @@ public final class VbbProvider implements NetworkProvider
return uri.toString(); return uri.toString();
} }
private static final void appendLocationVbb(final StringBuilder uri, final Location location, final String paramSuffix, final String paramWgs) private static final void appendLocationBvg(final StringBuilder uri, final Location location, final String paramSuffix, final String paramWgs)
{ {
if (location.type == LocationType.ADDRESS && location.lat != 0 && location.lon != 0 && paramWgs != null) if (location.type == LocationType.ADDRESS && location.lat != 0 && location.lon != 0 && paramWgs != null)
{ {

View file

@ -26,7 +26,7 @@ import org.junit.Test;
/** /**
* @author Andreas Schildbach * @author Andreas Schildbach
*/ */
public class VbbProviderTest public class BvgProviderTest
{ {
@Test @Test
public void footwayWithLink() public void footwayWithLink()
@ -90,7 +90,7 @@ public class VbbProviderTest
private void assertFineConnectionDetails(String s) private void assertFineConnectionDetails(String s)
{ {
Matcher m = VbbProvider.P_CONNECTION_DETAILS_FINE.matcher(s); Matcher m = BvgProvider.P_CONNECTION_DETAILS_FINE.matcher(s);
assertTrue(m.matches()); assertTrue(m.matches());
// ParserUtils.printGroups(m); // ParserUtils.printGroups(m);
} }