Examples of Holiday


Examples of com.acelet.s.task.Holiday

    holidayVector = new Vector();

    NodeList list = document.getElementsByTagName("HolidaysObject");
    for (int len = 0; len < list.getLength(); len++) {
      Node node = list.item(len);
      Holiday holiday = new Holiday();

      NodeList children = node.getChildNodes();
      for (int i = 0; i < children.getLength(); i++) {
        Node childNode = children.item(i);
        String name = childNode.getNodeName().trim();
View Full Code Here

Examples of com.ibm.icu.util.Holiday

    }
   
    public void TestDisplayName() {
        Holiday[] holidays = Holiday.getHolidays(ULocale.US);
        for (int i = 0; i < holidays.length; ++i) {
            Holiday h = holidays[i];
            // only need to test one
            // if the display names differ, we're using our data.  We know these names
            // should differ for this holiday (not all will).
            if ("Christmas".equals(h.getDisplayName(ULocale.US))) {
                if ("Christmas".equals(h.getDisplayName(ULocale.GERMANY))) {
                    errln("Using default name for holidays");
                }
            }
        }
    }
View Full Code Here

Examples of com.opengamma.core.holiday.Holiday

  @Override
  public Holiday get(UniqueId uniqueId) {
    ArgumentChecker.notNull(uniqueId, "uniqueId");

    Holiday result = null;
    try (Timer.Context context = _getTimer.time()) {
      Jedis jedis = getJedisPool().getResource();
      try {
        result = loadFromRedis(jedis, uniqueId);
        getJedisPool().returnResource(jedis);
View Full Code Here

Examples of com.opengamma.core.holiday.Holiday

    Object result = _getHoliday1.get(uniqueId);
    if (result != null) {
      return getOrThrow(result);
    }
    try {
      final Holiday h = getUnderlying().get(uniqueId);
      result = _getHoliday1.putIfAbsent(uniqueId, safeNull(h));
      if (result != null) {
        return getOrThrow(result);
      }
      return h;
View Full Code Here

Examples of com.opengamma.core.holiday.Holiday

    Object result = _getHoliday2.get(versionCorrection, objectId);
    if (result != null) {
      return getOrThrow(result);
    }
    try {
      final Holiday h = getUnderlying().get(objectId, versionCorrection);
      result = _getHoliday2.putIfAbsent(versionCorrection, objectId, safeNull(h));
      if (result != null) {
        return getOrThrow(result);
      }
      return h;
View Full Code Here

Examples of com.opengamma.core.holiday.Holiday

      @QueryParam("versionAsOf") String versionAsOf,
      @QueryParam("correctedTo") String correctedTo) {
   
    final ObjectId objectId = ObjectId.parse(idStr);
    if (version != null) {
      final Holiday result = getHolidaySource().get(objectId.atVersion(version));
      return responseOkFudge(result);
    } else {
      final VersionCorrection vc = VersionCorrection.parse(versionAsOf, correctedTo);
      Holiday result = getHolidaySource().get(objectId, vc);
      return responseOkFudge(result);
    }
  }
View Full Code Here

Examples of com.opengamma.core.holiday.Holiday

    HolidayMaster mock = mock(HolidayMaster.class);
   
    HolidayDocument doc = new HolidayDocument(example());
    when(mock.get(UID)).thenReturn(doc);
    MasterHolidaySource test = new MasterHolidaySource(mock);
    Holiday testResult = test.get(UID);
    verify(mock, times(1)).get(UID);
   
    assertEquals(example(), testResult);
  }
View Full Code Here

Examples of com.opengamma.core.holiday.Holiday

    HolidayMaster mock = mock(HolidayMaster.class);
   
    HolidayDocument doc = new HolidayDocument(example());
    when(mock.get(OID, VC)).thenReturn(doc);
    MasterHolidaySource test = new MasterHolidaySource(mock, VC);
    Holiday testResult = test.get(UID);
    verify(mock, times(1)).get(OID, VC);
   
    assertEquals(example(), testResult);
  }
View Full Code Here

Examples of com.opengamma.core.holiday.Holiday

    HolidayMaster mock = mock(HolidayMaster.class);
   
    HolidayDocument doc = new HolidayDocument(example());
    when(mock.get(OID, VC)).thenReturn(doc);
    MasterHolidaySource test = new MasterHolidaySource(mock, VC);
    Holiday testResult = test.get(OID, VC);
    verify(mock, times(1)).get(OID, VC);
   
    assertEquals(example(), testResult);
  }
View Full Code Here

Examples of com.opengamma.core.holiday.Holiday

public class NonVersionedRedisHolidaySourceTest extends AbstractRedisTestCase {
 
  public void addGetByUniqueIdEmpty() {
    NonVersionedRedisHolidaySource source = new NonVersionedRedisHolidaySource(getJedisPool(), getRedisPrefix());
   
    Holiday result = source.get(UniqueId.of("TEST", "No Such Thing"));
    assertNull(result);
  }
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.