TrainOrdersModel order =  getSchedule().getCurrentOrder(w);
Schedule schedule = (Schedule) w.get(KEY.TRAIN_SCHEDULES, si.getScheduleId(), Player.AUTHORITATIVE); TrainOrdersModel order = schedule.getOrder(index);
    public Object getElementAt(int index) {        ScheduleIterator si = getSchedule();        int gotoStatus;        if (si.getCurrentOrderIndex() == index) {            if(si.hasPriorityOrder()){                gotoStatus = GOTO_AFTER_PRIORITY_ORDERS;            }else{                gotoStatus = GOTO_NOW;            }        } else {            if(si.hasPriorityOrder() && 0 == index){                //These orders are the priority orders.                gotoStatus = GOTO_NOW;            } else {                gotoStatus = DONT_GOTO;            }        }                       boolean isPriorityOrders = (0 == index && si.hasPriorityOrder());        TrainOrdersModel order =  getSchedule().getCurrentOrder(w);	return new TrainOrdersListElement(isPriorityOrders, gotoStatus, order,		trainNumber);    }