de.focus_shift.jollyday.jaxb.JaxbEthiopianOrthodoxHoliday Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jollyday-jaxb Show documentation
Show all versions of jollyday-jaxb Show documentation
Jakarta XML Binding (JAXB) based jollyday implementation
package de.focus_shift.jollyday.jaxb;
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 JaxbEthiopianOrthodoxHoliday implements EthiopianOrthodoxHoliday {
private final de.focus_shift.jollyday.jaxb.mapping.EthiopianOrthodoxHoliday ethiopianOrthodoxHoliday;
public JaxbEthiopianOrthodoxHoliday(de.focus_shift.jollyday.jaxb.mapping.EthiopianOrthodoxHoliday ethiopianOrthodoxHoliday) {
this.ethiopianOrthodoxHoliday = ethiopianOrthodoxHoliday;
}
@Override
public String descriptionPropertiesKey() {
return ethiopianOrthodoxHoliday.getDescriptionPropertiesKey();
}
@Override
public HolidayType officiality() {
return ethiopianOrthodoxHoliday.getLocalizedType() == null
? HolidayType.PUBLIC_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 - 2025 Weber Informatics LLC | Privacy Policy