Class Calendar

  • All Implemented Interfaces:
    Serializable, ComponentContainer<CalendarComponent>, PropertyContainer

    public class Calendar
    extends Object
    implements Serializable, PropertyContainer, ComponentContainer<CalendarComponent>
    $Id$ [Apr 5, 2004] Defines an iCalendar calendar.
        4.6 Calendar Components
           The body of the iCalendar object consists of a sequence of calendar
           properties and one or more calendar components. The calendar
           properties are attributes that apply to the calendar as a whole. The
           calendar components are collections of properties that express a
           particular calendar semantic. For example, the calendar component can
           specify an event, a to-do, a journal entry, time zone information, or
           free/busy time information, or an alarm.
           The body of the iCalendar object is defined by the following
             icalbody   = calprops component
             calprops   = 2*(
                        ; 'prodid' and 'version' are both REQUIRED,
                        ; but MUST NOT occur more than once
                        prodid /version /
                        ; 'calscale' and 'method' are optional,
                        ; but MUST NOT occur more than once
                        calscale        /
                        method          /
             component  = 1*(eventc / todoc / journalc / freebusyc /
                        / timezonec / iana-comp / x-comp)
             iana-comp  = "BEGIN" ":" iana-token CRLF
                          "END" ":" iana-token CRLF
             x-comp     = "BEGIN" ":" x-name CRLF
                          "END" ":" x-name CRLF
    Example 1 - Creating a new calendar:
     Calendar calendar = new Calendar();
     calendar.getProperties().add(new ProdId("-//Ben Fortuna//iCal4j 1.0//EN"));
     // Add events, etc..
    See Also:
    Serialized Form