location is populated with lat and lon if possible

git-svn-id: https://public-transport-enabler.googlecode.com/svn/trunk@248 0924bc21-9374-b0fa-ee44-9ff1593b38f0
This commit is contained in:
andreas.schildbach 2010-10-08 18:50:52 +00:00
parent 19c9c269e2
commit 8797d02a4b
8 changed files with 66 additions and 43 deletions

View file

@ -83,7 +83,7 @@ public final class VbbProvider implements NetworkProvider
final Matcher mSingle = P_SINGLE_MASTID.matcher(page);
if (mSingle.matches())
{
results.add(new Location(LocationType.ANY, 0 /* TODO */, ParserUtils.resolveEntities(mSingle.group(1))));
results.add(new Location(LocationType.ANY, 0, 0, 0, ParserUtils.resolveEntities(mSingle.group(1))));
}
}
else
@ -93,14 +93,14 @@ public final class VbbProvider implements NetworkProvider
final Matcher mSingle = P_SINGLE_NAME.matcher(page);
if (mSingle.matches())
{
results.add(new Location(LocationType.ANY, 0 /* TODO */, ParserUtils.resolveEntities(mSingle.group(1))));
results.add(new Location(LocationType.ANY, 0, 0, 0, ParserUtils.resolveEntities(mSingle.group(1))));
}
else
{
final Matcher mMulti = P_MULTI_NAME.matcher(page);
while (mMulti.find())
results.add(new Location(LocationType.STATION, Integer.parseInt(mMulti.group(1)), ParserUtils
.resolveEntities(mMulti.group(2))));
results.add(new Location(LocationType.STATION, Integer.parseInt(mMulti.group(1)), 0, 0, ParserUtils.resolveEntities(mMulti
.group(2))));
}
}
@ -244,7 +244,7 @@ public final class VbbProvider implements NetworkProvider
{
final String address = ParserUtils.resolveEntities(mAddress.group(1));
if (!addresses.contains(address))
addresses.add(new Location(LocationType.ANY, 0, address));
addresses.add(new Location(LocationType.ANY, 0, 0, 0, address));
}
if (addresses.isEmpty())