private List<org.jquantlib.time.Date> generateCouponDates(DBObject stream1)
      throws ParseException, UnknownHostException {
    org.jquantlib.time.Date effectiveDate = getDate(stream1, "effectiveDate.unadjustedDate.$");
    org.jquantlib.time.Date terminationDate = getDate(stream1, "terminationDate.unadjustedDate.$");
    TimeUnit timeUnit = getTimeUnit(stream1, "calculationPeriodFrequency.period.$");
    int freq = (Integer) get(stream1, "calculationPeriodFrequency.periodMultiplier.$");

    Object roll = get(stream1, "calculationPeriodFrequency.rollConvention.$");

    String businessDayConvention =
        get(stream1, "calculationPeriodDatesAdjustments.businessDayConvention.$");
    String businessCentersHref =
        get(stream1, "calculationPeriodDatesAdjustments.businessCentersReference.@href");
    Calendar c =
        getCalendar(stream1, "terminationDate.dateAdjustments.businessCenters.businessCenter");
    Period period = new Period(freq, timeUnit);

    final Calendar nullCalendar = new NullCalendar();

    MakeSchedule mSchedule =
        new MakeSchedule(
            effectiveDate, terminationDate, period, c, BusinessDayConvention.ModifiedFollowing);
    mSchedule.forwards();

    if (roll instanceof Integer) {
      org.jquantlib.time.Date firstDate =
          nullCalendar.advance(effectiveDate, period, BusinessDayConvention.Unadjusted, false);
      if (firstDate.dayOfMonth() != (Integer) roll) {
        Date tmp = firstDate.longDate();
        tmp.setDate((Integer) roll);
        firstDate = new org.jquantlib.time.Date(tmp);
        mSchedule.withFirstDate(firstDate);
      }
    }

    List<org.jquantlib.time.Date> dates = mSchedule.schedule().dates();
    return dates;
  }