220 |
|
|
221 |
|
|
222 |
|
|
223 |
String cleanText(String input) { |
public static String cleanText(String input) { |
224 |
//apparently JSoup interprets some of space characters on www.bane.dk as 0xA0 |
//apparently JSoup translates characters on www.bane.dk to 0xA0 |
225 |
return input.replace((char) 0xA0, (char)0x20).trim(); |
return input.replace((char) 0xA0, (char)0x20).trim(); |
226 |
} |
} |
227 |
|
|
231 |
|
|
232 |
String type = getTypeStringWww(trainType); |
String type = getTypeStringWww(trainType); |
233 |
|
|
234 |
|
stationcode = URLEncoder.encode(stationcode, "ISO-8859-1"); |
235 |
|
|
236 |
|
|
237 |
String uri = "http://www.bane.dk/visStation.asp?ArtikelID=4275&W=" + type + "&S=" + stationcode; |
String uri = "http://www.bane.dk/visStation.asp?ArtikelID=4275&W=" + type + "&S=" + stationcode; |
238 |
|
logger.info("URI:" + uri); |
239 |
JsoupInvocation wrapper = new JsoupInvocation( new URL(uri), replyTimeout); |
JsoupInvocation wrapper = new JsoupInvocation( new URL(uri), replyTimeout); |
240 |
CircuitBreaker breaker = CircuitBreakerManager.getManager().getCircuitBreaker("banedk"); |
CircuitBreaker breaker = CircuitBreakerManager.getManager().getCircuitBreaker("banedk"); |
241 |
|
|