Class XMLUtil


  • public class XMLUtil
    extends Object
    • Constructor Detail

      • XMLUtil

        public XMLUtil()
    • Method Detail

      • unmarshallConfiguration

        public de.focus_shift.jollyday.jaxb.mapping.Configuration unmarshallConfiguration​(InputStream stream)
        Unmarshalls the configuration from the stream. Uses JAXB for this.
        Parameters:
        stream - a InputStream object.
        Returns:
        The unmarshalled configuration.
      • getWeekday

        public final DayOfWeek getWeekday​(de.focus_shift.jollyday.jaxb.mapping.Weekday weekday)
        Returns the DayOfWeek equivalent for the given weekday.
        Parameters:
        weekday - a Weekday object.
        Returns:
        a DayOfWeek instance.
      • getMonth

        public int getMonth​(de.focus_shift.jollyday.jaxb.mapping.Month month)
        Returns the value for the given month.
        Parameters:
        month - a Month object.
        Returns:
        a 1-12 value.
      • getType

        public HolidayType getType​(de.focus_shift.jollyday.jaxb.mapping.HolidayType type)
        Gets the type.
        Parameters:
        type - the type of holiday in the config
        Returns:
        the type of holiday