Examples of Holiday


Examples of com.opengamma.core.holiday.Holiday

    usd.setCurrency(Currency.USD);
    usd.setType(HolidayType.CURRENCY);
    usd.setUniqueId(UniqueId.of("TEST", "USD Test Holiday"));
    source.addHoliday(usd);
   
    Holiday result = source.get(usd.getUniqueId());
    assertNotNull(result);
    assertEquals(Currency.USD, result.getCurrency());
    assertEquals(usd.getUniqueId(), result.getUniqueId());
    assertEquals(HolidayType.CURRENCY, result.getType());
    assertNull(usd.getExchangeExternalId());
    assertNull(usd.getRegionExternalId());
  }
View Full Code Here

Examples of com.opengamma.core.holiday.Holiday

    usBank.setType(HolidayType.BANK);
    usBank.setRegionExternalId(ExternalId.of("RegionScheme", "Chicago"));
    usBank.setUniqueId(UniqueId.of("TEST", "USD Test Bank Holiday"));
    source.addHoliday(usBank);
   
    Holiday result = source.get(usBank.getUniqueId());
    assertNotNull(result);
    assertEquals(usBank.getUniqueId(), result.getUniqueId());
    assertEquals(HolidayType.BANK, result.getType());
    assertNull(usBank.getCurrency());
    assertEquals(usBank.getRegionExternalId(), result.getRegionExternalId());
    assertNull(result.getExchangeExternalId());
  }
View Full Code Here

Examples of de.iritgo.aktera.scheduler.entity.Holiday

      holidayReader.open(new InputStreamReader(this.getClass().getResourceAsStream("holidays_de.csv")));

      while (holidayReader.hasNext())
      {
        Holiday holiday = holidayReader.next();

        update("INSERT INTO holiday (id,name,country,province,day,month,year) values (?,?,?,?,?,?,?)",
                new Object[]
                {
                        createKeelId("Holiday"), holiday.getName(), holiday.getCountry(),
                        holiday.getProvince(), holiday.getDay(), holiday.getMonth(),
                        holiday.getYear()
                });
      }

      currentVersion.setVersion("2.1.3");
    }
View Full Code Here

Examples of de.iritgo.aktera.scheduler.entity.Holiday

    holidayReader.open(new InputStreamReader(this.getClass().getResourceAsStream("holidays_de.csv")));

    while (holidayReader.hasNext())
    {
      Holiday holiday = holidayReader.next();

      if (holiday.getYear() != null)
      {
        update("INSERT INTO holiday (name, country, province, day, month, year) values (?, ?, ?, ?, ?, ?)",
                new Object[]
                {
                        holiday.getName(), holiday.getCountry(), holiday.getProvince(),
                        holiday.getDay(), holiday.getMonth(), holiday.getYear()
                });
      }
      else
      {
        update("INSERT INTO holiday (name, country, province, day, month) values (?, ?, ?, ?, ?)", new Object[]
        {
                holiday.getName(), holiday.getCountry(), holiday.getProvince(), holiday.getDay(),
                holiday.getMonth()
        });
      }
    }
  }
View Full Code Here

Examples of de.jollyday.Holiday

    Set<Holiday> additionalHolidays = new HashSet<Holiday>();
    for (Holiday d : holidays) {
      LocalDate twoDaysLater = d.getDate().plusDays(2);
      if (calendarUtil.contains(holidays, twoDaysLater)) {
        LocalDate bridgingDate = twoDaysLater.minusDays(1);
        additionalHolidays.add(new Holiday(bridgingDate, BRIDGING_HOLIDAY_PROPERTIES_KEY,
            LocalizedHolidayType.OFFICIAL_HOLIDAY));
      }
    }
    holidays.addAll(additionalHolidays);
    return holidays;
View Full Code Here

Examples of de.jollyday.Holiday

      } else if (rf.getDays() != null) {
        // if number of days set -> move number of days
        fixed = fixed.plusDays(rf.getWhen() == When.BEFORE ? -rf.getDays() : rf.getDays());
      }
      HolidayType type = xmlUtil.getType(rf.getLocalizedType());
      holidays.add(new Holiday(fixed, rf.getDescriptionPropertiesKey(), type));
    }
  }
View Full Code Here

Examples of de.jollyday.Holiday

        throw new IllegalArgumentException("Unknown islamic holiday " + i.getType());
      }
      String propertiesKey = PREFIX_PROPERTY_ISLAMIC + i.getType().name();
      HolidayType type = xmlUtil.getType(i.getLocalizedType());
      for (LocalDate d : islamicHolidays) {
        holidays.add(new Holiday(d, propertiesKey, type));
      }
    }
  }
View Full Code Here

Examples of de.jollyday.Holiday

        }
        from = from.plusDays(1);
      }
      if (result != null) {
        HolidayType type = xmlUtil.getType(fwm.getLocalizedType());
        holidays.add(new Holiday(result, fwm.getDescriptionPropertiesKey(), type));
      }
    }
  }
View Full Code Here

Examples of de.jollyday.Holiday

      if (!isValid(fwm, year)) {
        continue;
      }
      LocalDate date = parse(year, fwm);
      HolidayType type = xmlUtil.getType(fwm.getLocalizedType());
      holidays.add(new Holiday(date, fwm.getDescriptionPropertiesKey(), type));
    }
  }
View Full Code Here

Examples of de.jollyday.Holiday

        throw new IllegalArgumentException("Unknown ethiopian orthodox holiday type " + h.getType());
      }
      String propertiesKey = PREFIXE_PROPERTY_ETHIOPIAN_ORTHODOX + h.getType().name();
      HolidayType type = xmlUtil.getType(h.getLocalizedType());
      for (LocalDate d : ethiopianHolidays) {
        holidays.add(new Holiday(d, propertiesKey, type));
      }
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.