- java.lang.Object
-
- de.focus_shift.jollyday.jackson.XMLUtil
-
public class XMLUtil extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classXMLUtil.JacksonMapperCreator
-
Constructor Summary
Constructors Constructor Description XMLUtil()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetMonth(Month month)Returns the value for the given month.HolidayTypegetType(HolidayType type)Gets the type.DayOfWeekgetWeekday(Weekday weekday)Returns theDayOfWeekequivalent for the given weekday.ConfigurationunmarshallConfiguration(InputStream stream)Unmarshalls the configuration from the stream.
-
-
-
Method Detail
-
unmarshallConfiguration
public Configuration unmarshallConfiguration(InputStream stream)
Unmarshalls the configuration from the stream. Usesjacksonfor this.- Parameters:
stream- aInputStreamobject.- Returns:
- The unmarshalled configuration.
-
getWeekday
public final DayOfWeek getWeekday(Weekday weekday)
Returns theDayOfWeekequivalent for the given weekday.- Parameters:
weekday- aWeekdayobject.- Returns:
- a DayOfWeek instance.
-
getMonth
public int getMonth(Month month)
Returns the value for the given month.- Parameters:
month- aMonthobject.- Returns:
- a 1-12 value.
-
getType
public HolidayType getType(HolidayType type)
Gets the type.- Parameters:
type- the type of holiday in the config- Returns:
- the type of holiday
-
-