Class HCalendarParser

  • All Implemented Interfaces:
    CalendarParser

    public class HCalendarParser
    extends Object
    implements CalendarParser
    A CalendarParser that parses XHTML documents that include calendar data marked up with the hCalendar microformat.

    The parser treats the entire document as a single "vcalendar" context, ignoring any vcalendar elements and adding all components in the document to a single generated calendar.

    Since hCalendar does not include product information, the PRODID property is omitted from the generated calendar. The hCalendar profile is supposed to define the iCalendar version that it represents, but it does not, so version 2.0 is assumed.

    Supported Components

    This parser recognizes only "vevent" components.

    Supported Properties

    This parser recognizes the following properties:

    • "dtstart"
    • "dtend"
    • "duration"
    • "summary"
    • "uid"
    • "dtstamp"
    • "category"
    • "location"
    • "url"
    • "description"
    • "last-modified"
    • "status"
    • "class"
    • "attendee"
    • "contact"
    • "organizer"

    hCalendar allows for some properties to be represented by nested microformat records, including hCard, adr and geo. This parser does not recognize these records. It simply accumulates the text content of any child elements of the property element and uses the resulting string as the property value.

    Date and Date-Time Properties

    hCalendar date-time values are formatted according to RFC 3339. There is no representation in this specification for time zone ids. All date-times are specified either in UTC or with an offset that can be used to convert the local time into UTC. Neither does hCal provide a reprsentation for floating date-times. Therefore, all date-time values produced by this parser are in UTC.

    Some examples in the wild provide date and date-time values in iCalendar format rather than RFC 3339 format. Although not technically legal according to spec, these values are accepted. In this case, floating date-times are produced by the parser.

    Supported Parameters

    hCalendar does not define attributes, nested elements or other information elements representing parameter data. Therefore, this parser does not set any property parameters except as implied by property value data (e.g. VALUE=DATE-TIME or VALUE=DATE for date-time properties).

    • Constructor Detail

      • HCalendarParser

        public HCalendarParser()