.getInstance();
routeControl.setRoutingDelay(Preferences.getInstance().getIntValue(
PreferencesKeys.ROUTING_DELAY));
for (Route route : persistence.getAllRoutes()) {
SRCPRoute sRoute = new SRCPRoute();
for (RouteItem routeItem : route.getRouteItems()) {
SRCPRouteItem sRouteItem = new SRCPRouteItem();
SRCPTurnout sTurnout = turnoutControl.getSRCPTurnout(routeItem
.getTurnout());
sRouteItem.setTurnout(sTurnout);
if (routeItem.getRoutedState().toUpperCase().equals("LEFT")) {
sRouteItem.setRoutedState(SRCPTurnoutState.LEFT);
} else if (routeItem.getRoutedState().toUpperCase()
.equals("RIGHT")) {
sRouteItem.setRoutedState(SRCPTurnoutState.RIGHT);
} else if (routeItem.getRoutedState().toUpperCase()
.equals("STRAIGHT")) {
sRouteItem.setRoutedState(SRCPTurnoutState.STRAIGHT);
} else {
sRouteItem.setRoutedState(SRCPTurnoutState.UNDEF);
}
sRoute.addRouteItem(sRouteItem);
}
routesSRCPRoutesMap.put(route, sRoute);
SRCPRoutesRoutesMap.put(sRoute, route);
}
routeControl.addRouteChangeListener(this);