--- android/TrainInfoService/src/dk/thoerup/traininfoservice/banedk/CompareStations.java 2012/02/24 13:45:51 1691 +++ android/TrainInfoService/src/dk/thoerup/traininfoservice/banedk/CompareStations.java 2012/02/24 14:26:53 1692 @@ -38,6 +38,7 @@ Map banedkStations = new TreeMap(); Set dbStations = new TreeSet(); + StationDAO dao = new StationDAO(); try { Document doc = (Document) cb.invoke(jsoup); @@ -53,7 +54,6 @@ } } - StationDAO dao = new StationDAO(); StationBean bean = dao.dumpAll(); for (StationEntry station : bean.entries) { if (station.isRegional() || station.isStrain()) { @@ -74,9 +74,21 @@ Set tmpDbStations = new TreeSet( dbStations ); Set tmpBanedkStations = new TreeSet( banedkStations.keySet()) ; tmpBanedkStations.removeAll(tmpDbStations); + + + for(String s : tmpBanedkStations) { String uri = banedkStations.get(s); - sb.append( "
  • "+ s + "
  • " ); + String disabled = ""; + try { + boolean tmpdisabled = dao.hasDisabledStation(s); + if (tmpdisabled == true) + disabled = "disabled"; + } catch (Exception e) { + throw new ServletException(e); + } + + sb.append( "
  • " + s + "  " + disabled + "
  • " ); } sb.append(""); @@ -99,4 +111,5 @@ } + }