if (logger.isDebugEnabled()) { logger.debug("Projected Due-In schedule"); printSchedule(schedule, logger); }
  public Schedule getProjectedDueInSchedule() {    if (logInvPG == null) {      return null;    }          calcSwitchOverDay();    ScheduleImpl schedule = new ScheduleImpl();    schedule.setScheduleElementType(QuantityScheduleElementImpl.class);    Collection list = logInvPG.getProjSupplyList();    Iterator i = list.iterator();    while (i.hasNext()) {      Task task = (Task) i.next();      if (task == null)        continue;      PlanElement pe = task.getPlanElement();      if (pe == null)        continue;      AllocationResult ar = pe.getReportedResult();      // only want the ones that were successful      if (ar == null || !ar.isSuccess())        continue;      long endTime = TaskUtils.getEndTime(task);       long startTime = getStartTime(task, endTime, false);      double quantity = TaskUtils.getDailyQuantity(task);      if (switchOverDay < endTime) {        // If switch over time occurs in the middle of a projection, we need to grab the part after that        if (switchOverDay > startTime)          startTime = switchOverDay;        while (startTime < endTime) {          NewQuantityScheduleElement qse = new QuantityScheduleElementImpl(startTime,                                                                           startTime + TimeUtils.MSEC_PER_DAY,                                                                           quantity);          schedule.addScheduleElement(qse);          startTime += TimeUtils.MSEC_PER_DAY;        }      }    }     return scheduleToNonOverlapSchedule(schedule);  }