Codota Logo
Holiday
Code IndexAdd Codota to your IDE (free)

How to use
Holiday
in
de.jollyday.config

Best Java code snippets using de.jollyday.config.Holiday (Showing top 11 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
SimpleDateFormat s =
  • Codota IconString pattern;new SimpleDateFormat(pattern)
  • Codota IconString template;Locale locale;new SimpleDateFormat(template, locale)
  • Codota Iconnew SimpleDateFormat()
  • Smart code suggestions by Codota
}
origin: stanfordnlp/CoreNLP

public Map<String, JollyHoliday> getAllHolidaysMap(Set<de.jollyday.config.Holiday> allHolidays) {
 Map<String, JollyHoliday> map = Generics.newHashMap();
 for (de.jollyday.config.Holiday h : allHolidays) {
  String descKey = h.getDescriptionPropertiesKey();
  if (descKey != null) {
   descKey = descKey.replaceAll(".*\\.","");
   JollyHoliday jh = new JollyHoliday(descKey, holidayManager, h);
   map.put(jh.label, jh);
  }
 }
 return map;
}
origin: de.jollyday/jollyday

/**
 * Checks whether the holiday is within the valid date range.
 *
 * @param h the holiday to check for validity
 * @param year the year to check the holiday to be valid in
 * @return the holiday is valid
 */
private <T extends Holiday> boolean isValidInYear(T h, int year) {
  return (h.getValidFrom() == null || h.getValidFrom() <= year)
      && (h.getValidTo() == null || h.getValidTo() >= year);
}
origin: de.jollyday/jollyday

if (h.getEvery() != null) {
  if (!EVERY_YEAR.equals(h.getEvery())) {
    if (ODD_YEARS.equals(h.getEvery())) {
      return year % 2 != 0;
    } else if (EVEN_YEARS.equals(h.getEvery())) {
      return year % 2 == 0;
    } else {
      if (h.getValidFrom() != null) {
        int cycleYears;
        if (TWO_YEARS.equalsIgnoreCase(h.getEvery())) {
          cycleYears = 2;
        } else if (THREE_YEARS.equalsIgnoreCase(h.getEvery())) {
          cycleYears = 3;
        } else if (FOUR_YEARS.equalsIgnoreCase(h.getEvery())) {
          cycleYears = 4;
        } else if (FIVE_YEARS.equalsIgnoreCase(h.getEvery())) {
          cycleYears = 5;
        } else if (SIX_YEARS.equalsIgnoreCase(h.getEvery())) {
          cycleYears = 6;
        } else {
          throw new IllegalArgumentException("Cannot handle unknown cycle type '" + h.getEvery()
              + "'.");
        return (year - h.getValidFrom()) % cycleYears == 0;
origin: stanfordnlp/CoreNLP

public CollectionValuedMap<String, JollyHoliday> getAllHolidaysCVMap(Set<de.jollyday.config.Holiday> allHolidays) {
 CollectionValuedMap<String, JollyHoliday> map = new CollectionValuedMap<>();
 for (de.jollyday.config.Holiday h:allHolidays) {
  String descKey = h.getDescriptionPropertiesKey();
  if (descKey != null) {
   descKey = descKey.replaceAll(".*\\.","");
   JollyHoliday jh = new JollyHoliday(descKey, holidayManager, h);
   map.add(jh.label, jh);
  }
 }
 return map;
}
origin: stanfordnlp/CoreNLP

private SUTime.Time resolveWithYear(int year) {
 // TODO: If we knew location of article, can use that information to resolve holidays better
 Set<de.jollyday.Holiday> holidays = holidayManager.getHolidays(year);
 // Try to find this holiday
 for (de.jollyday.Holiday h : holidays) {
  if (h.getPropertiesKey().equals(base.getDescriptionPropertiesKey())) {
   return new SUTime.PartialTime(this, new Partial(h.getDate()));
  }
 }
 return null;
}
origin: edu.stanford.nlp/stanford-corenlp

public Map<String, JollyHoliday> getAllHolidaysMap(Set<de.jollyday.config.Holiday> allHolidays) {
 Map<String, JollyHoliday> map = Generics.newHashMap();
 for (de.jollyday.config.Holiday h : allHolidays) {
  String descKey = h.getDescriptionPropertiesKey();
  if (descKey != null) {
   descKey = descKey.replaceAll(".*\\.","");
   JollyHoliday jh = new JollyHoliday(descKey, holidayManager, h);
   map.put(jh.label, jh);
  }
 }
 return map;
}
origin: com.guokr/stan-cn-com

public Map<String, JollyHoliday> getAllHolidaysMap(Set<de.jollyday.config.Holiday> allHolidays)
{
 Map<String, JollyHoliday> map = Generics.newHashMap();
 for (de.jollyday.config.Holiday h:allHolidays) {
  String descKey = h.getDescriptionPropertiesKey();
  if (descKey != null) {
   descKey = descKey.replaceAll(".*\\.","");
   JollyHoliday jh = new JollyHoliday(descKey, holidayManager, h);
   map.put(jh.label, jh);
  }
 }
 return map;
}
origin: edu.stanford.nlp/stanford-corenlp

public CollectionValuedMap<String, JollyHoliday> getAllHolidaysCVMap(Set<de.jollyday.config.Holiday> allHolidays) {
 CollectionValuedMap<String, JollyHoliday> map = new CollectionValuedMap<>();
 for (de.jollyday.config.Holiday h:allHolidays) {
  String descKey = h.getDescriptionPropertiesKey();
  if (descKey != null) {
   descKey = descKey.replaceAll(".*\\.","");
   JollyHoliday jh = new JollyHoliday(descKey, holidayManager, h);
   map.add(jh.label, jh);
  }
 }
 return map;
}
origin: com.guokr/stan-cn-com

public CollectionValuedMap<String, JollyHoliday> getAllHolidaysCVMap(Set<de.jollyday.config.Holiday> allHolidays)
{
 CollectionValuedMap<String, JollyHoliday> map = new CollectionValuedMap<String, JollyHoliday>();
 for (de.jollyday.config.Holiday h:allHolidays) {
  String descKey = h.getDescriptionPropertiesKey();
  if (descKey != null) {
   descKey = descKey.replaceAll(".*\\.","");
   JollyHoliday jh = new JollyHoliday(descKey, holidayManager, h);
   map.add(jh.label, jh);
  }
 }
 return map;
}
origin: edu.stanford.nlp/stanford-corenlp

private SUTime.Time resolveWithYear(int year) {
 // TODO: If we knew location of article, can use that information to resolve holidays better
 Set<de.jollyday.Holiday> holidays = holidayManager.getHolidays(year);
 // Try to find this holiday
 for (de.jollyday.Holiday h : holidays) {
  if (h.getPropertiesKey().equals(base.getDescriptionPropertiesKey())) {
   return new SUTime.PartialTime(this, new Partial(h.getDate()));
  }
 }
 return null;
}
origin: com.guokr/stan-cn-com

@Override
public SUTime.Time resolve(SUTime.Time t, int flags) {
 Partial p = (t != null)? t.getJodaTimePartial():null;
 if (p != null) {
  if (JodaTimeUtils.hasField(p, DateTimeFieldType.year())) {
   int year = p.get(DateTimeFieldType.year());
   // TODO: If we knew location of article, can use that information to resolve holidays better
   Set<de.jollyday.Holiday> holidays = holidayManager.getHolidays(year);
   // Try to find this holiday
   for (de.jollyday.Holiday h:holidays) {
    if (h.getPropertiesKey().equals(base.getDescriptionPropertiesKey())) {
     return new SUTime.PartialTime(this, new Partial(h.getDate()));
    }
   }
  }
 }
 return this;
}
de.jollyday.configHoliday

Javadoc

Java-Klasse für Holiday complex type.

Das folgende Schemafragment gibt den erwarteten Content an, der in dieser Klasse enthalten ist.

 
<complexType name="Holiday"> 
<complexContent> 
<restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> 
<attribute name="validFrom" type="{http://www.w3.org/2001/XMLSchema}int" /> 
<attribute name="validTo" type="{http://www.w3.org/2001/XMLSchema}int" /> 
<attribute name="every" type="{http://www.example.org/Holiday}HolidayCycleType" default="EVERY_YEAR" /> 
<attribute name="descriptionPropertiesKey" type="{http://www.w3.org/2001/XMLSchema}string" /> 
<attribute name="localizedType" type="{http://www.example.org/Holiday}HolidayType" default="OFFICIAL_HOLIDAY" /> 
</restriction> 
</complexContent> 
</complexType> 

Most used methods

  • getDescriptionPropertiesKey
    Ruft den Wert der descriptionPropertiesKey-Eigenschaft ab.
  • getEvery
    Ruft den Wert der every-Eigenschaft ab.
  • getValidFrom
    Ruft den Wert der validFrom-Eigenschaft ab.
  • getValidTo
    Ruft den Wert der validTo-Eigenschaft ab.

Popular in Java

  • Reactive rest calls using spring rest template
  • startActivity (Activity)
  • compareTo (BigDecimal)
    Compares this BigDecimal with the specified BigDecimal. Two BigDecimal objects that are equal in val
  • scheduleAtFixedRate (Timer)
    Schedules the specified task for repeated fixed-rate execution, beginning after the specified delay.
  • VirtualMachine (com.sun.tools.attach)
    A Java virtual machine. A VirtualMachine represents a Java virtual machine to which this Java vir
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • InputStream (java.io)
    A readable source of bytes.Most clients will use input streams that read data from the file system (
  • MessageFormat (java.text)
    MessageFormat provides a means to produce concatenated messages in language-neutral way. Use this to
  • Timer (java.util)
    A facility for threads to schedule tasks for future execution in a background thread. Tasks may be s
  • JPanel (javax.swing)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now