62 |
|
|
63 |
|
|
64 |
URL url = new URL("http://www.m.dk/layouts/Metro/Widgets/MetroWidget.ashx?StationId=" + station.getMetro() + "&Congestion=true&Application=MyMetro&Expiration=true"); |
URL url = new URL("http://www.m.dk/layouts/Metro/Widgets/MetroWidget.ashx?StationId=" + station.getMetro() + "&Congestion=true&Application=MyMetro&Expiration=true"); |
65 |
|
logger.fine("URL:" + url); |
66 |
|
|
67 |
JsoupInvocation wrapper = new JsoupInvocation( url, 3000); |
JsoupInvocation wrapper = new JsoupInvocation( url, 3000); |
68 |
CircuitBreaker breaker = CircuitBreakerManager.getManager().getCircuitBreaker("metro"); |
CircuitBreaker breaker = CircuitBreakerManager.getManager().getCircuitBreaker("metro"); |
103 |
|
|
104 |
bean.operationInfo = contentElems.get(3).text(); |
bean.operationInfo = contentElems.get(3).text(); |
105 |
|
|
106 |
int planIndex; |
for (int i=4; i<contentElems.size(); i++) { |
107 |
if (contentElems.get(4).text().trim().equalsIgnoreCase("stationsinformation")) { |
if (contentElems.get(i).text().trim().equalsIgnoreCase("køreplan")) { |
108 |
planIndex = 7; |
bean.plan = contentElems.get(i+1).text(); |
109 |
} else { |
} |
|
planIndex = 5; |
|
110 |
} |
} |
111 |
|
|
|
bean.plan = contentElems.get(planIndex).text(); |
|
|
|
|
112 |
return bean; |
return bean; |
113 |
} |
} |
114 |
|
|