de.focus_shift.jollyday.jackson.JacksonEthiopianOrthodoxHoliday Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jollyday-jackson Show documentation
Show all versions of jollyday-jackson Show documentation
Jackson based jollyday implementation
package de.focus_shift.jollyday.jackson;
import de.focus_shift.jollyday.core.HolidayType;
import de.focus_shift.jollyday.core.spi.EthiopianOrthodoxHoliday;
import de.focus_shift.jollyday.core.spi.EthiopianOrthodoxHolidayType;
import de.focus_shift.jollyday.core.spi.YearCycle;
import java.time.Year;
public class JacksonEthiopianOrthodoxHoliday implements EthiopianOrthodoxHoliday {
private final de.focus_shift.jollyday.jackson.mapping.EthiopianOrthodoxHoliday ethiopianOrthodoxHoliday;
public JacksonEthiopianOrthodoxHoliday(de.focus_shift.jollyday.jackson.mapping.EthiopianOrthodoxHoliday ethiopianOrthodoxHoliday) {
this.ethiopianOrthodoxHoliday = ethiopianOrthodoxHoliday;
}
@Override
public String descriptionPropertiesKey() {
return ethiopianOrthodoxHoliday.getDescriptionPropertiesKey();
}
@Override
public HolidayType officiality() {
return ethiopianOrthodoxHoliday.getLocalizedType() == null
? HolidayType.OFFICIAL_HOLIDAY
: HolidayType.valueOf(ethiopianOrthodoxHoliday.getLocalizedType().name());
}
@Override
public EthiopianOrthodoxHolidayType type() {
return EthiopianOrthodoxHolidayType.valueOf(ethiopianOrthodoxHoliday.getType().name());
}
@Override
public Year validFrom() {
return ethiopianOrthodoxHoliday.getValidFrom() == null
? null
: Year.of(ethiopianOrthodoxHoliday.getValidFrom());
}
@Override
public Year validTo() {
return ethiopianOrthodoxHoliday.getValidTo() == null
? null
: Year.of(ethiopianOrthodoxHoliday.getValidTo());
}
@Override
public YearCycle cycle() {
return ethiopianOrthodoxHoliday.getEvery() == null
? YearCycle.EVERY_YEAR
: YearCycle.valueOf(ethiopianOrthodoxHoliday.getEvery().name());
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy