cosmetics

git-svn-id: https://public-transport-enabler.googlecode.com/svn/trunk@196 0924bc21-9374-b0fa-ee44-9ff1593b38f0
This commit is contained in:
andreas.schildbach 2010-09-25 13:03:27 +00:00
parent b6adc83ac1
commit a4e2e5b1de

View file

@ -180,8 +180,7 @@ public class LinzProvider implements NetworkProvider
+ "<itdDate year=\"(\\d+)\" month=\"(\\d+)\" day=\"(\\d+)\" weekday=\"\\d+\"/>" // date + "<itdDate year=\"(\\d+)\" month=\"(\\d+)\" day=\"(\\d+)\" weekday=\"\\d+\"/>" // date
+ "<itdTime hour=\"(\\d+)\" minute=\"(\\d+)\" ap=\"\"/>" // time + "<itdTime hour=\"(\\d+)\" minute=\"(\\d+)\" ap=\"\"/>" // time
+ ".*?" // + ".*?" //
+ "<itdServingLine [^>]* number=\"([^<]*)\" symbol=\"([^<]*)\" motType=\"(\\d+)\" " // line, symbol, + "<itdServingLine [^>]* number=\"([^<]*)\" symbol=\"([^<]*)\" motType=\"(\\d+)\" " // line, symbol, type
// lineType
+ "realtime=\"(\\d+)\" " // realtime + "realtime=\"(\\d+)\" " // realtime
+ "direction=\"([^<]*)\" destID=\"(\\d+)\"" // destination, destinationId + "direction=\"([^<]*)\" destID=\"(\\d+)\"" // destination, destinationId
+ ".*?" // + ".*?" //
@ -195,12 +194,10 @@ public class LinzProvider implements NetworkProvider
final Matcher mHeadCoarse = P_DEPARTURES_HEAD_COARSE.matcher(page); final Matcher mHeadCoarse = P_DEPARTURES_HEAD_COARSE.matcher(page);
if (mHeadCoarse.matches()) if (mHeadCoarse.matches())
{ {
final String headerText = mHeadCoarse.group(1);
final String departuresText = mHeadCoarse.group(2); final String departuresText = mHeadCoarse.group(2);
// // messages
// if (mHeadCoarse.group(3) != null)
// return new QueryDeparturesResult(uri, Status.INVALID_STATION);
final Matcher mHeadFine = P_DEPARTURES_HEAD_FINE.matcher(mHeadCoarse.group(1)); final Matcher mHeadFine = P_DEPARTURES_HEAD_FINE.matcher(headerText);
if (mHeadFine.matches()) if (mHeadFine.matches())
{ {
final int locationId = Integer.parseInt(mHeadFine.group(1)); final int locationId = Integer.parseInt(mHeadFine.group(1));
@ -245,7 +242,7 @@ public class LinzProvider implements NetworkProvider
} }
else else
{ {
throw new IllegalArgumentException("cannot parse '" + mHeadCoarse.group(1) + "' on " + uri); throw new IllegalArgumentException("cannot parse '" + headerText + "' on " + uri);
} }
} }
else else