Class Calendar

java.lang.Object
net.fortuna.ical4j.model.Calendar
All Implemented Interfaces:
Serializable, ComponentContainer<CalendarComponent>, FluentCalendar, PropertyContainer

$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
       notation:
    
         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          /
    
                    x-prop
    
                    )
    
         component  = 1*(eventc / todoc / journalc / freebusyc /
                    / timezonec / iana-comp / x-comp)
    
         iana-comp  = "BEGIN" ":" iana-token CRLF
    
                      1*contentline
    
                      "END" ":" iana-token CRLF
    
         x-comp     = "BEGIN" ":" x-name CRLF
    
                      1*contentline
    
                      "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"));
 calendar.getProperties().add(Version.VERSION_2_0);
 calendar.getProperties().add(CalScale.GREGORIAN);
 
 // Add events, etc..
 
See Also: