KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jical > ICalendarParser


1 /*
2  * iCalenderParser.java
3  *
4  * Created on August 1, 2002, 9:01 PM
5  *
6  * Stores an icalendar as a java object.
7  * Can parse an ICalendar file and create the ICalendar Java Object from
8  * that ICalendar file.
9  *
10  * Currently, this is a partial implementation. Its purpose is to parse an iCal file
11  * and create a freebusy string loadable out to a file or as a web-response if
12  * a URL.
13  *
14  */

15
16 package org.jical;
17
18 /**
19  *
20  * @author sfg
21  * RFC 2445
22  *
23  */

24
25 import java.io.BufferedReader JavaDoc;
26 import java.io.File JavaDoc;
27 import java.io.FileInputStream JavaDoc;
28 import java.io.InputStreamReader JavaDoc;
29 import java.text.SimpleDateFormat JavaDoc;
30 import java.util.Date JavaDoc;
31 import java.util.StringTokenizer JavaDoc;
32 import java.util.TimeZone JavaDoc;
33 import java.util.logging.Logger JavaDoc;
34
35 public class ICalendarParser {
36
37     private String JavaDoc thisLine;
38     private ICalendar ical;
39     private ICalendarVEvent iCalEvent;
40     private ICalendarTimeZone icalTimeZone;
41     // If parsing timezone cannot be parsing others.
42
private boolean icalTimeZoneParser;
43     private boolean icalEventParser;
44     private String JavaDoc timeZoneType;
45     private TimeZone JavaDoc gmt;
46
47     private int lineCtr;
48
49     // Java logger for all error/interesting messages.
50
private Logger JavaDoc logger = Logger.getLogger(this.getClass().getName());
51
52
53
54     /** Creates a new instance of ICalendar. */
55     public ICalendarParser() {
56     }
57
58     /** Read ICalendar from file.
59      * @param iCalFilePath File name.
60      * @return The ICalendar.
61      */

62     public ICalendar parse(java.lang.String JavaDoc iCalFilePath) {
63         File JavaDoc iCalFile = new File JavaDoc(iCalFilePath);
64         if (iCalFile.isFile())
65         {
66             parse(iCalFile);
67         }
68         else
69         {
70             logger.fine("The input file is not a file! File provided:" + iCalFilePath);
71             ical = null;
72         }
73         return ical;
74     }
75
76     /** Read ICalendar from file.
77      * @param iCalFile File.
78      * @return The ICalendar.
79      */

80     public ICalendar parse(File JavaDoc iCalFile) {
81         return parse(iCalFile,null);
82     }
83
84     public ICalendar parse(File JavaDoc iCalFile, String JavaDoc enc) {
85         // Setup Log4J stuff..
86
gmt = TimeZone.getTimeZone("GMT");
87         //logcat = Category.getInstance(ICalendarParser.class.getName());
88
// Must run, Initialisation stuff.
89
//logcat.info("Reading:" + iCalFile.toString());
90
// Read ICalendar File in and parse it creating the relevant attributes.
91
// File iCalFile = new File(iCalFilePath);
92
try
93         {
94             FileInputStream JavaDoc fin = new FileInputStream JavaDoc(iCalFile);
95             BufferedReader JavaDoc myInput = null;
96             if (enc == null)
97                 myInput = new BufferedReader JavaDoc(new InputStreamReader JavaDoc(fin));
98             else
99                 myInput = new BufferedReader JavaDoc(new InputStreamReader JavaDoc(fin, enc));
100             String JavaDoc buildLine = null;
101
102             /* Two loops, first joins lines together, second processes lines..
103              */

104             while((thisLine = myInput.readLine()) != null)
105             {
106                 /*
107                 * 4.1 Content Lines
108                 * That is, a long
109                 * line can be split between any two characters by inserting a CRLF
110                 * immediately followed by a single linear white space character (i.e.,
111                 * SPACE, US-ASCII decimal 32 or HTAB, US-ASCII decimal 9)
112                 *
113                 */

114
115                 lineCtr++;
116                 if (thisLine.startsWith(" ")
117                 || thisLine.startsWith("\u0032 ")
118                 || thisLine.startsWith("\u0009") )
119                 {
120                     buildLine = buildLine + thisLine.substring(1);
121                 }
122                 else if (buildLine != null) {
123                     try {
124                         processLine (buildLine);
125                     }
126                     catch (Exception JavaDoc e) {
127                         logger.fine("Error processing line of ICalendar, line:" + lineCtr
128                                             + "iCal Line = " + buildLine
129                                             + "Exception" + e);
130                     }
131
132                     buildLine = thisLine;
133                 }
134                 else
135                 {
136                     buildLine = thisLine;
137                 }
138             }
139         }
140         catch(Exception JavaDoc e)
141         {
142             e.printStackTrace(System.err);
143         }
144         return ical;
145     }
146     public void processLine(java.lang.String JavaDoc iCalLine) {
147
148         if (iCalLine.startsWith("BEGIN:VCALENDAR") )
149         {
150             // Start a new ICalendar. Null all values.
151
// This should be the first item in the calendar.
152
/*
153              4.4 ICalendar Object
154              The Calendaring and Scheduling Core Object is a collection of
155             calendaring and scheduling information. Typically, this information
156             will consist of a single ICalendar object. However, multiple
157             ICalendar objects can be sequentially grouped together. The first
158             line and last line of the ICalendar object MUST contain a pair of
159             ICalendar object delimiter strings. The syntax for an ICalendar
160             object is as follows:
161                 icalobject = 1*("BEGIN" ":" "VCALENDAR" CRLF
162                       icalbody
163                         "END" ":" "VCALENDAR" CRLF)
164              The following is a simple example of an ICalendar object:
165              BEGIN:VCALENDAR
166              VERSION:2.0
167              PRODID:-//hacksw/handcal//NONSGML v1.0//EN
168              BEGIN:VEVENT
169              DTSTART:19970714T170000Z
170              DTEND:19970715T035959Z
171              SUMMARY:Bastille Day Party
172              END:VEVENT
173              END:VCALENDAR
174              */

175             ical = new ICalendar();
176         }
177         else if (iCalLine.startsWith("END:VCALENDAR") )
178         {
179
180         }
181         else if (iCalLine.startsWith("CALSCALE") )
182         {
183             /*
184             4.7 Calendar Properties
185
186                The Calendar Properties are attributes that apply to the ICalendar
187                object, as a whole. These properties do not appear within a calendar
188                component. They SHOULD be specified after the "BEGIN:VCALENDAR"
189                property and prior to any calendar component.
190
191             4.7.1 Calendar Scale
192
193                Property Name: CALSCALE
194
195                Purpose: This property defines the calendar scale used for the
196                calendar information specified in the ICalendar object.
197                Value Type: TEXT
198
199                Property Parameters: Non-standard property parameters can be
200                specified on this property.
201
202                Conformance: Property can be specified in an ICalendar object. The
203                default value is "GREGORIAN".
204
205                Description: This memo is based on the Gregorian calendar scale. The
206                Gregorian calendar scale is assumed if this property is not specified
207                in the ICalendar object. It is expected that other calendar scales
208                will be defined in other specifications or by future versions of this
209                memo.
210
211                Format Definition: The property is defined by the following notation:
212
213                  calscale = "CALSCALE" calparam ":" calvalue CRLF
214
215                  calparam = *(";" xparam)
216
217                  calvalue = "GREGORIAN" / iana-token
218
219                Example: The following is an example of this property:
220
221                  CALSCALE:GREGORIAN
222
223             */

224
225             ical.setCalScale(extractAttribute(iCalLine, "CALSCALE"));
226         }
227
228         else if (iCalLine.startsWith("PRODID") )
229         {
230             /*
231              4.7.3 Product Identifier
232
233                Property Name: PRODID
234
235                Purpose: This property specifies the identifier for the product that
236                created the ICalendar object.
237
238                Value Type: TEXT
239
240                Property Parameters: Non-standard property parameters can be
241                specified on this property.
242
243                Conformance: The property MUST be specified once in an ICalendar
244                object.
245
246                Description: The vendor of the implementation SHOULD assure that this
247                is a globally unique identifier; using some technique such as an FPI
248                value, as defined in [ISO 9070].
249
250                This property SHOULD not be used to alter the interpretation of an
251                ICalendar object beyond the semantics specified in this memo. For
252                example, it is not to be used to further the understanding of non-
253                standard properties.
254
255                Format Definition: The property is defined by the following notation:
256
257                  prodid = "PRODID" pidparam ":" pidvalue CRLF
258                  pidparam = *(";" xparam)
259
260                  pidvalue = text
261                  ;Any text that describes the product and version
262                  ;and that is generally assured of being unique.
263
264                Example: The following is an example of this property. It does not
265                imply that English is the default language.
266
267                  PRODID:-//ABC Corporation//NONSGML My Product//EN
268
269              */

270             ical.setProdId(extractAttribute(iCalLine, "PRODID"));
271         }
272         else if (iCalLine.startsWith("VERSION") )
273         {
274             /*
275              4.7.4 Version
276
277                Property Name: VERSION
278
279                Purpose: This property specifies the identifier corresponding to the
280                highest version number or the minimum and maximum range of the
281                ICalendar specification that is required in order to interpret the
282                ICalendar object.
283
284                Value Type: TEXT
285
286                Property Parameters: Non-standard property parameters can be
287                specified on this property.
288
289                Conformance: This property MUST be specified by an ICalendar object,
290                but MUST only be specified once.
291
292                Description: A value of "2.0" corresponds to this memo.
293
294                Format Definition: The property is defined by the following notation:
295
296                  version = "VERSION" verparam ":" vervalue CRLF
297
298                  verparam = *(";" xparam)
299
300                  vervalue = "2.0" ;This memo
301                             / maxver
302                             / (minver ";" maxver)
303
304                  minver = <A IANA registered ICalendar version identifier>
305                  ;Minimum ICalendar version needed to parse the ICalendar object
306
307                  maxver = <A IANA registered ICalendar version identifier>
308                  ;Maximum ICalendar version needed to parse the ICalendar object
309
310                Example: The following is an example of this property:
311
312                  VERSION:2.0
313
314              */

315             ical.setVersion(extractAttribute(iCalLine, "VERSION"));
316         }
317         else if (iCalLine.startsWith("ATTACH") )
318         {
319             /*
320             4.8 Component Properties
321
322                The following properties can appear within calendar components, as
323                specified by each component property definition.
324
325             4.8.1 Descriptive Component Properties
326
327                The following properties specify descriptive information about
328                calendar components.
329
330             4.8.1.1 Attachment
331
332                Property Name: ATTACH
333
334                Purpose: The property provides the capability to associate a document
335                object with a calendar component.
336
337                Value Type: The default value type for this property is URI. The
338                value type can also be set to BINARY to indicate inline binary
339                encoded content information.
340
341                Property Parameters: Non-standard, inline encoding, format type and
342                value data type property parameters can be specified on this
343                property.
344
345                Conformance: The property can be specified in a "VEVENT", "VTODO",
346                "VJOURNAL" or "VALARM" calendar components.
347
348                Description: The property can be specified within "VEVENT", "VTODO",
349                "VJOURNAL", or "VALARM" calendar components. This property can be
350                specified multiple times within an ICalendar object.
351
352                Format Definition: The property is defined by the following notation:
353
354                  attach = "ATTACH" attparam ":" uri CRLF
355
356                  attach =/ "ATTACH" attparam ";" "ENCODING" "=" "BASE64"
357                                ";" "VALUE" "=" "BINARY" ":" binary
358
359                  attparam = *(
360
361                             ; the following is optional,
362                             ; but MUST NOT occur more than once
363
364                             (";" fmttypeparam) /
365
366                             ; the following is optional,
367                             ; and MAY occur more than once
368
369                             (";" xparam)
370
371                             )
372
373                Example: The following are examples of this property:
374
375                  ATTACH:CID:jsmith.part3.960817T083000.xyzMail@host1.com
376
377                  ATTACH;FMTTYPE=application/postscript:ftp://xyzCorp.com/pub/
378                   reports/r-960812.ps
379
380              */

381             if (icalEventParser)
382             {
383                 iCalEvent.setAttach(extractAttribute(iCalLine, "ATTACH"));
384             }
385
386         }
387         else if (iCalLine.startsWith("CATEGORIES") )
388         {
389             /*
390              4.8.1.2 Categories
391
392                Property Name: CATEGORIES
393
394                Purpose: This property defines the categories for a calendar
395                component.
396
397                Value Type: TEXT
398
399                Property Parameters: Non-standard and language property parameters
400                can be specified on this property.
401
402                Conformance: The property can be specified within "VEVENT", "VTODO"
403                or "VJOURNAL" calendar components.
404
405                Description: This property is used to specify categories or subtypes
406                of the calendar component. The categories are useful in searching for
407                a calendar component of a particular type and category. Within the
408                "VEVENT", "VTODO" or "VJOURNAL" calendar components, more than one
409                category can be specified as a list of categories separated by the
410                COMMA character (US-ASCII decimal 44).
411
412                Format Definition: The property is defined by the following notation:
413
414                  categories = "CATEGORIES" catparam ":" text *("," text)
415                               CRLF
416
417                  catparam = *(
418
419                             ; the following is optional,
420                             ; but MUST NOT occur more than once
421
422                             (";" languageparam ) /
423
424                             ; the following is optional,
425                             ; and MAY occur more than once
426
427                             (";" xparam)
428
429                             )
430
431                Example: The following are examples of this property:
432
433                  CATEGORIES:APPOINTMENT,EDUCATION
434
435                  CATEGORIES:MEETING
436              */

437             if (icalEventParser)
438             {
439                 iCalEvent.setCategories(extractAttribute(iCalLine, "CATEGORIES"));
440             }
441         }
442         else if (iCalLine.startsWith("CLASS") )
443         {
444             /*
445             4.8.1.3 Classification
446
447             Property Name: CLASS
448
449             Purpose: This property defines the access classification for a
450             calendar component.
451
452             Value Type: TEXT
453
454             Property Parameters: Non-standard property parameters can be
455             specified on this property.
456
457             Conformance: The property can be specified once in a "VEVENT",
458             "VTODO" or "VJOURNAL" calendar components.
459
460             Description: An access classification is only one component of the
461             general security system within a calendar application. It provides a
462             method of capturing the scope of the access the calendar owner
463             intends for information within an individual calendar entry. The
464             access classification of an individual ICalendar component is useful
465             when measured along with the other security components of a calendar
466             system (e.g., calendar user authentication, authorization, access
467             rights, access role, etc.). Hence, the semantics of the individual
468             access classifications cannot be completely defined by this memo
469             alone. Additionally, due to the "blind" nature of most exchange
470             processes using this memo, these access classifications cannot serve
471             as an enforcement statement for a system receiving an ICalendar
472             object. Rather, they provide a method for capturing the intention of
473             the calendar owner for the access to the calendar component.
474
475             Format Definition: The property is defined by the following notation:
476
477              class = "CLASS" classparam ":" classvalue CRLF
478              classparam = *(";" xparam)
479              classvalue = "PUBLIC" / "PRIVATE" / "CONFIDENTIAL" / iana-token
480                         / x-name
481              ;Default is PUBLIC
482
483             Example: The following is an example of this property:
484
485              CLASS:PUBLIC
486
487              */

488             if (icalEventParser)
489             {
490                 iCalEvent.setEventClass(extractAttribute(iCalLine, "CLASS"));
491             }
492         }
493         else if (iCalLine.startsWith("COMMENT") )
494         {
495             /*
496              4.8.1.4 Comment
497
498                Property Name: COMMENT
499
500                Purpose: This property specifies non-processing information intended
501                to provide a comment to the calendar user.
502
503                Value Type: TEXT
504
505                Property Parameters: Non-standard, alternate text representation and
506                language property parameters can be specified on this property.
507
508                Conformance: This property can be specified in "VEVENT", "VTODO",
509                "VJOURNAL", "VTIMEZONE" or "VFREEBUSY" calendar components.
510
511                Description: The property can be specified multiple times.
512
513                Format Definition: The property is defined by the following notation:
514
515                  comment = "COMMENT" commparam ":" text CRLF
516
517                  commparam = *(
518
519                             ; the following are optional,
520                             ; but MUST NOT occur more than once
521
522                             (";" altrepparam) / (";" languageparam) /
523
524                             ; the following is optional,
525                             ; and MAY occur more than once
526
527                             (";" xparam)
528
529                             )
530
531                Example: The following is an example of this property:
532
533                  COMMENT:The meeting really needs to include both ourselves
534                    and the customer. We can't hold this meeting without them.
535                    As a matter of fact\, the venue for the meeting ought to be at
536                    their site. - - John
537
538                The data type for this property is TEXT.
539
540              */

541             if (icalEventParser)
542             {
543                 iCalEvent.setComment(extractAttribute(iCalLine, "COMMENT"));
544             }
545         }
546         else if (iCalLine.startsWith("DESCRIPTION") )
547         {
548             /*
549              4.8.1.5 Description
550
551                Property Name: DESCRIPTION
552
553                Purpose: This property provides a more complete description of the
554                calendar component, than that provided by the "SUMMARY" property.
555
556                Value Type: TEXT
557
558                Property Parameters: Non-standard, alternate text representation and
559                language property parameters can be specified on this property.
560
561                Conformance: The property can be specified in the "VEVENT", "VTODO",
562                "VJOURNAL" or "VALARM" calendar components. The property can be
563                specified multiple times only within a "VJOURNAL" calendar component.
564
565                Description: This property is used in the "VEVENT" and "VTODO" to
566                capture lengthy textual decriptions associated with the activity.
567
568                This property is used in the "VJOURNAL" calendar component to capture
569                one more textual journal entries.
570
571                This property is used in the "VALARM" calendar component to capture
572                the display text for a DISPLAY category of alarm, to capture the body
573                text for an EMAIL category of alarm and to capture the argument
574                string for a PROCEDURE category of alarm.
575
576                Format Definition: The property is defined by the following notation:
577
578                  description = "DESCRIPTION" descparam ":" text CRLF
579
580                  descparam = *(
581
582                             ; the following are optional,
583                             ; but MUST NOT occur more than once
584
585                             (";" altrepparam) / (";" languageparam) /
586
587                             ; the following is optional,
588                             ; and MAY occur more than once
589
590                             (";" xparam)
591
592                             )
593                Example: The following is an example of the property with formatted
594                line breaks in the property value:
595
596                  DESCRIPTION:Meeting to provide technical review for "Phoenix"
597                    design.\n Happy Face Conference Room. Phoenix design team
598                    MUST attend this meeting.\n RSVP to team leader.
599
600                The following is an example of the property with folding of long
601                lines:
602
603                  DESCRIPTION:Last draft of the new novel is to be completed
604                    for the editor's proof today.
605              */

606             if (icalEventParser)
607             {
608                 iCalEvent.setDescription(extractAttribute(iCalLine, "DESCRIPTION"));
609             }
610         }
611         else if (iCalLine.startsWith("GEO") )
612         {
613             /*
614              4.8.1.6 Geographic Position
615
616                Property Name: GEO
617
618                Purpose: This property specifies information related to the global
619                position for the activity specified by a calendar component.
620
621                Value Type: FLOAT. The value MUST be two SEMICOLON separated FLOAT
622                values.
623
624                Property Parameters: Non-standard property parameters can be
625                specified on this property.
626
627                Conformance: This property can be specified in "VEVENT" or "VTODO"
628                calendar components.
629
630                Description: The property value specifies latitude and longitude, in
631                that order (i.e., "LAT LON" ordering). The longitude represents the
632                location east or west of the prime meridian as a positive or negative
633                real number, respectively. The longitude and latitude values MAY be
634                specified up to six decimal places, which will allow for accuracy to
635                within one meter of geographical position. Receiving applications
636                MUST accept values of this precision and MAY truncate values of
637                greater precision.
638
639                Values for latitude and longitude shall be expressed as decimal
640                fractions of degrees. Whole degrees of latitude shall be represented
641                by a two-digit decimal number ranging from 0 through 90. Whole
642                degrees of longitude shall be represented by a decimal number ranging
643                from 0 through 180. When a decimal fraction of a degree is specified,
644                it shall be separated from the whole number of degrees by a decimal
645                point.
646
647                Latitudes north of the equator shall be specified by a plus sign (+),
648                or by the absence of a minus sign (-), preceding the digits
649                designating degrees. Latitudes south of the Equator shall be
650                designated by a minus sign (-) preceding the digits designating
651                degrees. A point on the Equator shall be assigned to the Northern
652                Hemisphere.
653
654                Longitudes east of the prime meridian shall be specified by a plus
655                sign (+), or by the absence of a minus sign (-), preceding the digits
656                designating degrees. Longitudes west of the meridian shall be
657                designated by minus sign (-) preceding the digits designating
658                degrees. A point on the prime meridian shall be assigned to the
659                Eastern Hemisphere. A point on the 180th meridian shall be assigned
660                to the Western Hemisphere. One exception to this last convention is
661                permitted. For the special condition of describing a band of latitude
662                around the earth, the East Bounding Coordinate data element shall be
663                assigned the value +180 (180) degrees.
664
665                Any spatial address with a latitude of +90 (90) or -90 degrees will
666                specify the position at the North or South Pole, respectively. The
667                component for longitude may have any legal value.
668
669                With the exception of the special condition described above, this
670                form is specified in Department of Commerce, 1986, Representation of
671                geographic point locations for information interchange (Federal
672                Information Processing Standard 70-1): Washington, Department of
673                Commerce, National Institute of Standards and Technology.
674
675                The simple formula for converting degrees-minutes-seconds into
676                decimal degrees is:
677
678                  decimal = degrees + minutes/60 + seconds/3600.
679
680                Format Definition: The property is defined by the following notation:
681
682                  geo = "GEO" geoparam ":" geovalue CRLF
683
684                  geoparam = *(";" xparam)
685
686                  geovalue = float ";" float
687                  ;Latitude and Longitude components
688
689                Example: The following is an example of this property:
690
691                  GEO:37.386013;-122.082932
692
693              */

694             if (icalEventParser)
695             {
696
697                 // Get X/Y from..
698
String JavaDoc geo = extractAttribute(iCalLine, "GEO");
699                 iCalEvent.setGeo(geo);
700                 StringTokenizer JavaDoc st = new StringTokenizer JavaDoc(geo,":");
701                 try
702                 {
703                     iCalEvent.setGeoX(new Float JavaDoc(st.nextToken()).floatValue());
704                     iCalEvent.setGeoY(new Float JavaDoc(st.nextToken()).floatValue());
705                 }
706                 catch (Exception JavaDoc e)
707                 {
708                     // This means the Geo is probably badly formed, so set geoX/Y to -1
709
iCalEvent.setGeoX(-1);
710                     iCalEvent.setGeoY(-1);
711                     logger.severe("Exception parsing int from line "+iCalLine);
712                     e.printStackTrace(System.err);
713                 }
714             }
715         }
716         else if (iCalLine.startsWith("LOCATION") )
717         {
718             /*
719             4.8.1.7 Location
720
721                Property Name: LOCATION
722
723                Purpose: The property defines the intended venue for the activity
724                defined by a calendar component.
725
726                Value Type: TEXT
727
728                Property Parameters: Non-standard, alternate text representation and
729                language property parameters can be specified on this property.
730
731                Conformance: This property can be specified in "VEVENT" or "VTODO"
732                calendar component.
733
734                Description: Specific venues such as conference or meeting rooms may
735                be explicitly specified using this property. An alternate
736                representation may be specified that is a URI that points to
737                directory information with more structured specification of the
738                location. For example, the alternate representation may specify
739                either an LDAP URI pointing to an LDAP server entry or a CID URI
740                pointing to a MIME body part containing a vCard [RFC 2426] for the
741                location.
742
743                Format Definition: The property is defined by the following notation:
744
745                  location = "LOCATION locparam ":" text CRLF
746
747                  locparam = *(
748
749                             ; the following are optional,
750                             ; but MUST NOT occur more than once
751
752                             (";" altrepparam) / (";" languageparam) /
753
754                             ; the following is optional,
755                             ; and MAY occur more than once
756
757                             (";" xparam)
758
759                             )
760
761                Example: The following are some examples of this property:
762
763                  LOCATION:Conference Room - F123, Bldg. 002
764
765                  LOCATION;ALTREP="http://xyzcorp.com/conf-rooms/f123.vcf":
766                   Conference Room - F123, Bldg. 002
767
768              */

769             if (icalEventParser)
770             {
771                 iCalEvent.setLocation(extractAttribute(iCalLine, "LOCATION"));
772             }
773         }
774         else if (iCalLine.startsWith("PERCENT-COMPLETE") )
775         {
776             /*
777              4.8.1.8 Percent Complete
778
779                Property Name: PERCENT-COMPLETE
780
781                Purpose: This property is used by an assignee or delegatee of a to-do
782                to convey the percent completion of a to-do to the Organizer.
783
784                Value Type: INTEGER
785
786                Property Parameters: Non-standard property parameters can be
787                specified on this property.
788
789                Conformance: This property can be specified in a "VTODO" calendar
790                component.
791
792                Description: The property value is a positive integer between zero
793                and one hundred. A value of "0" indicates the to-do has not yet been
794                started. A value of "100" indicates that the to-do has been
795                completed. Integer values in between indicate the percent partially
796                complete.
797
798                When a to-do is assigned to multiple individuals, the property value
799                indicates the percent complete for that portion of the to-do assigned
800                to the assignee or delegatee. For example, if a to-do is assigned to
801                both individuals "A" and "B". A reply from "A" with a percent
802                complete of "70" indicates that "A" has completed 70% of the to-do
803                assigned to them. A reply from "B" with a percent complete of "50"
804                indicates "B" has completed 50% of the to-do assigned to them.
805
806                Format Definition: The property is defined by the following notation:
807
808                  percent = "PERCENT-COMPLETE" pctparam ":" integer CRLF
809
810                  pctparam = *(";" xparam)
811
812                Example: The following is an example of this property to show 39%
813                completion:
814
815                  PERCENT-COMPLETE:39
816
817              */

818             if (icalEventParser)
819             {
820                 iCalEvent.setPercentComplete(extractAttribute(iCalLine, "PERCENT-COMPLETE"));
821             }
822         }
823         else if (iCalLine.startsWith("PRIORITY") )
824         {
825             /*
826              4.8.1.9 Priority
827
828                Property Name: PRIORITY
829
830                Purpose: The property defines the relative priority for a calendar
831                component.
832
833                Value Type: INTEGER
834
835                Property Parameters: Non-standard property parameters can be
836                specified on this property.
837
838                Conformance: The property can be specified in a "VEVENT" or "VTODO"
839                calendar component.
840
841                Description: The priority is specified as an integer in the range
842                zero to nine. A value of zero (US-ASCII decimal 48) specifies an
843                undefined priority. A value of one (US-ASCII decimal 49) is the
844                highest priority. A value of two (US-ASCII decimal 50) is the second
845                highest priority. Subsequent numbers specify a decreasing ordinal
846                priority. A value of nine (US-ASCII decimal 58) is the lowest
847                priority.
848
849                A CUA with a three-level priority scheme of "HIGH", "MEDIUM" and
850                "LOW" is mapped into this property such that a property value in the
851                range of one (US-ASCII decimal 49) to four (US-ASCII decimal 52)
852                specifies "HIGH" priority. A value of five (US-ASCII decimal 53) is
853                the normal or "MEDIUM" priority. A value in the range of six (US-
854                ASCII decimal 54) to nine (US-ASCII decimal 58) is "LOW" priority.
855
856                A CUA with a priority schema of "A1", "A2", "A3", "B1", "B2", ...,
857                "C3" is mapped into this property such that a property value of one
858                (US-ASCII decimal 49) specifies "A1", a property value of two (US-
859                ASCII decimal 50) specifies "A2", a property value of three (US-ASCII
860                decimal 51) specifies "A3", and so forth up to a property value of 9
861                (US-ASCII decimal 58) specifies "C3".
862
863                Other integer values are reserved for future use.
864
865                Within a "VEVENT" calendar component, this property specifies a
866                priority for the event. This property may be useful when more than
867                one event is scheduled for a given time period.
868
869                Within a "VTODO" calendar component, this property specified a
870                priority for the to-do. This property is useful in prioritizing
871                multiple action items for a given time period.
872
873                Format Definition: The property is specified by the following
874                notation:
875
876                  priority = "PRIORITY" prioparam ":" privalue CRLF
877                  ;Default is zero
878
879                  prioparam = *(";" xparam)
880
881                  privalue = integer ;Must be in the range [0..9]
882                     ; All other values are reserved for future use
883
884                The following is an example of a property with the highest priority:
885
886                  PRIORITY:1
887
888                The following is an example of a property with a next highest
889                priority:
890
891                  PRIORITY:2
892
893                Example: The following is an example of a property with no priority.
894                This is equivalent to not specifying the "PRIORITY" property:
895
896                  PRIORITY:0
897
898              */

899             if (icalEventParser)
900             {
901                 try
902                 {
903                     iCalEvent.setPriority(Integer.parseInt(extractAttribute(iCalLine, "PRIORITY")));
904                 }
905                 catch (Exception JavaDoc e)
906                 {
907                     logger.severe("Exception parsing int from line "+iCalLine);
908                     e.printStackTrace(System.err);
909                 }
910             }
911         }
912         else if (iCalLine.startsWith("RESOURCES") )
913         {
914             /*
915             4.8.1.10 Resources
916
917                Property Name: RESOURCES
918
919                Purpose: This property defines the equipment or resources anticipated
920                for an activity specified by a calendar entity..
921
922                Value Type: TEXT
923
924                Property Parameters: Non-standard, alternate text representation and
925                language property parameters can be specified on this property.
926
927                Conformance: This property can be specified in "VEVENT" or "VTODO"
928                calendar component.
929
930                Description: The property value is an arbitrary text. More than one
931                resource can be specified as a list of resources separated by the
932                COMMA character (US-ASCII decimal 44).
933
934                Format Definition: The property is defined by the following notation:
935
936                  resources = "RESOURCES" resrcparam ":" text *("," text) CRLF
937
938                  resrcparam = *(
939
940                             ; the following are optional,
941                             ; but MUST NOT occur more than once
942
943                             (";" altrepparam) / (";" languageparam) /
944
945                             ; the following is optional,
946                             ; and MAY occur more than once
947
948                             (";" xparam)
949
950                             )
951
952                Example: The following is an example of this property:
953
954                  RESOURCES:EASEL,PROJECTOR,VCR
955
956                  RESOURCES;LANGUAGE=fr:1 raton-laveur
957
958              */

959             if (icalEventParser)
960             {
961                 iCalEvent.setResources(extractAttribute(iCalLine, "RESOURCES"));
962             }
963         }
964         else if (iCalLine.startsWith("STATUS") )
965         {
966             /*
967             4.8.1.11 Status
968
969                Property Name: STATUS
970
971                Purpose: This property defines the overall status or confirmation for
972                the calendar component.
973
974                Value Type: TEXT
975
976                Property Parameters: Non-standard property parameters can be
977                specified on this property.
978
979                Conformance: This property can be specified in "VEVENT", "VTODO" or
980                "VJOURNAL" calendar components.
981
982                Description: In a group scheduled calendar component, the property is
983                used by the "Organizer" to provide a confirmation of the event to the
984                "Attendees". For example in a "VEVENT" calendar component, the
985                "Organizer" can indicate that a meeting is tentative, confirmed or
986                cancelled. In a "VTODO" calendar component, the "Organizer" can
987                indicate that an action item needs action, is completed, is in
988                process or being worked on, or has been cancelled. In a "VJOURNAL"
989                calendar component, the "Organizer" can indicate that a journal entry
990                is draft, final or has been cancelled or removed.
991
992                Format Definition: The property is defined by the following notation:
993
994                  status = "STATUS" statparam] ":" statvalue CRLF
995
996                  statparam = *(";" xparam)
997
998                  statvalue = "TENTATIVE" ;Indicates event is
999                                                     ;tentative.
1000                            / "CONFIRMED" ;Indicates event is
1001                                                    ;definite.
1002                            / "CANCELLED" ;Indicates event was
1003                                                    ;cancelled.
1004                    ;Status values for a "VEVENT"
1005
1006                 statvalue =/ "NEEDS-ACTION" ;Indicates to-do needs action.
1007                            / "COMPLETED" ;Indicates to-do completed.
1008                            / "IN-PROCESS" ;Indicates to-do in process of
1009                            / "CANCELLED" ;Indicates to-do was cancelled.
1010                    ;Status values for "VTODO".
1011
1012                 statvalue =/ "DRAFT" ;Indicates journal is draft.
1013                            / "FINAL" ;Indicates journal is final.
1014                            / "CANCELLED" ;Indicates journal is removed.
1015                    ;Status values for "VJOURNAL".
1016
1017               Example: The following is an example of this property for a "VEVENT"
1018               calendar component:
1019
1020                 STATUS:TENTATIVE
1021
1022               The following is an example of this property for a "VTODO" calendar
1023               component:
1024
1025                 STATUS:NEEDS-ACTION
1026
1027               The following is an example of this property for a "VJOURNAL"
1028               calendar component:
1029
1030                 STATUS:DRAFT
1031             */

1032            if (icalEventParser)
1033            {
1034                iCalEvent.setResources(extractAttribute(iCalLine, "STATUS"));
1035            }
1036        }
1037        else if (iCalLine.startsWith("SUMMARY") )
1038        {
1039            /*
1040            4.8.1.12 Summary
1041
1042               Property Name: SUMMARY
1043
1044               Purpose: This property defines a short summary or subject for the
1045               calendar component.
1046
1047               Value Type: TEXT
1048
1049               Property Parameters: Non-standard, alternate text representation and
1050               language property parameters can be specified on this property.
1051
1052               Conformance: The property can be specified in "VEVENT", "VTODO",
1053               "VJOURNAL" or "VALARM" calendar components.
1054
1055               Description: This property is used in the "VEVENT", "VTODO" and
1056               "VJOURNAL" calendar components to capture a short, one line summary
1057               about the activity or journal entry.
1058
1059               This property is used in the "VALARM" calendar component to capture
1060               the subject of an EMAIL category of alarm.
1061
1062               Format Definition: The property is defined by the following notation:
1063
1064                 summary = "SUMMARY" summparam ":" text CRLF
1065
1066                 summparam = *(
1067
1068                            ; the following are optional,
1069                            ; but MUST NOT occur more than once
1070
1071                            (";" altrepparam) / (";" languageparam) /
1072
1073                            ; the following is optional,
1074                            ; and MAY occur more than once
1075
1076                            (";" xparam)
1077
1078                            )
1079
1080               Example: The following is an example of this property:
1081
1082                 SUMMARY:Department Party
1083             */

1084            if (icalEventParser)
1085            {
1086                iCalEvent.setSummary(extractAttribute(iCalLine, "SUMMARY"));
1087            }
1088        }
1089        else if (iCalLine.startsWith("COMPLETED") )
1090        {
1091            /*
1092             4.8.2 Date and Time Component Properties
1093
1094               The following properties specify date and time related information in
1095               calendar components.
1096
1097            4.8.2.1 Date/Time Completed
1098
1099               Property Name: COMPLETED
1100
1101               Purpose: This property defines the date and time that a to-do was
1102               actually completed.
1103
1104               Value Type: DATE-TIME
1105
1106               Property Parameters: Non-standard property parameters can be
1107               specified on this property.
1108
1109               Conformance: The property can be specified in a "VTODO" calendar
1110               component.
1111
1112               Description: The date and time MUST be in a UTC format.
1113
1114               Format Definition: The property is defined by the following notation:
1115
1116                 completed = "COMPLETED" compparam ":" date-time CRLF
1117                 compparam = *(";" xparam)
1118
1119               Example: The following is an example of this property:
1120
1121                 COMPLETED:19960401T235959Z
1122
1123             */

1124
1125        }
1126        else if (iCalLine.startsWith("DTEND") )
1127        {
1128            /*
1129             4.8.2.2 Date/Time End
1130
1131               Property Name: DTEND
1132
1133               Purpose: This property specifies the date and time that a calendar
1134               component ends.
1135
1136               Value Type: The default value type is DATE-TIME. The value type can
1137               be set to a DATE value type.
1138
1139               Property Parameters: Non-standard, value data type, time zone
1140               identifier property parameters can be specified on this property.
1141
1142               Conformance: This property can be specified in "VEVENT" or
1143               "VFREEBUSY" calendar components.
1144
1145               Description: Within the "VEVENT" calendar component, this property
1146               defines the date and time by which the event ends. The value MUST be
1147               later in time than the value of the "DTSTART" property.
1148
1149               Within the "VFREEBUSY" calendar component, this property defines the
1150               end date and time for the free or busy time information. The time
1151               MUST be specified in the UTC time format. The value MUST be later in
1152               time than the value of the "DTSTART" property.
1153
1154               Format Definition: The property is defined by the following notation:
1155
1156                 dtend = "DTEND" dtendparam":" dtendval CRLF
1157
1158                 dtendparam = *(
1159
1160                            ; the following are optional,
1161                            ; but MUST NOT occur more than once
1162
1163                            (";" "VALUE" "=" ("DATE-TIME" / "DATE")) /
1164                            (";" tzidparam) /
1165
1166                            ; the following is optional,
1167                            ; and MAY occur more than once
1168                            (";" xparam)
1169
1170                            )
1171
1172
1173
1174                 dtendval = date-time / date
1175                 ;Value MUST match value type
1176
1177               Example: The following is an example of this property:
1178
1179                 DTEND:19960401T235959Z
1180
1181                 DTEND;VALUE=DATE:19980704
1182
1183             */

1184            if (icalEventParser == true)
1185            {
1186                iCalEvent.setDateEnd(convertIcalDate(extractAttribute(iCalLine, "DTEND")));
1187            }
1188        }
1189        else if (iCalLine.startsWith("DUE") )
1190        {
1191            /*
1192             4.8.2.3 Date/Time Due
1193
1194               Property Name: DUE
1195
1196               Purpose: This property defines the date and time that a to-do is
1197               expected to be completed.
1198
1199               Value Type: The default value type is DATE-TIME. The value type can
1200               be set to a DATE value type.
1201
1202               Property Parameters: Non-standard, value data type, time zone
1203               identifier property parameters can be specified on this property.
1204
1205               Conformance: The property can be specified once in a "VTODO" calendar
1206               component.
1207
1208               Description: The value MUST be a date/time equal to or after the
1209               DTSTART value, if specified.
1210
1211               Format Definition: The property is defined by the following notation:
1212
1213                 due = "DUE" dueparam":" dueval CRLF
1214
1215                 dueparam = *(
1216                            ; the following are optional,
1217                            ; but MUST NOT occur more than once
1218
1219                            (";" "VALUE" "=" ("DATE-TIME" / "DATE")) /
1220                            (";" tzidparam) /
1221
1222                            ; the following is optional,
1223                            ; and MAY occur more than once
1224
1225                              *(";" xparam)
1226
1227                            )
1228
1229
1230
1231                 dueval = date-time / date
1232                 ;Value MUST match value type
1233
1234               Example: The following is an example of this property:
1235
1236                 DUE:19980430T235959Z
1237
1238             */

1239        }
1240        else if (iCalLine.startsWith("DTSTART") )
1241        {
1242            /*
1243            4.8.2.4 Date/Time Start
1244
1245               Property Name: DTSTART
1246
1247               Purpose: This property specifies when the calendar component begins.
1248
1249               Value Type: The default value type is DATE-TIME. The time value MUST
1250               be one of the forms defined for the DATE-TIME value type. The value
1251               type can be set to a DATE value type.
1252
1253               Property Parameters: Non-standard, value data type, time zone
1254               identifier property parameters can be specified on this property.
1255
1256               Conformance: This property can be specified in the "VEVENT", "VTODO",
1257               "VFREEBUSY", or "VTIMEZONE" calendar components.
1258
1259               Description: Within the "VEVENT" calendar component, this property
1260               defines the start date and time for the event. The property is
1261               REQUIRED in "VEVENT" calendar components. Events can have a start
1262               date/time but no end date/time. In that case, the event does not take
1263               up any time.
1264
1265               Within the "VFREEBUSY" calendar component, this property defines the
1266               start date and time for the free or busy time information. The time
1267               MUST be specified in UTC time.
1268
1269               Within the "VTIMEZONE" calendar component, this property defines the
1270               effective start date and time for a time zone specification. This
1271               property is REQUIRED within each STANDARD and DAYLIGHT part included
1272               in "VTIMEZONE" calendar components and MUST be specified as a local
1273               DATE-TIME without the "TZID" property parameter.
1274
1275               Format Definition: The property is defined by the following notation:
1276
1277                 dtstart = "DTSTART" dtstparam ":" dtstval CRLF
1278
1279                 dtstparam = *(
1280
1281                            ; the following are optional,
1282                            ; but MUST NOT occur more than once
1283
1284                            (";" "VALUE" "=" ("DATE-TIME" / "DATE")) /
1285                            (";" tzidparam) /
1286
1287                            ; the following is optional,
1288                            ; and MAY occur more than once
1289
1290                              *(";" xparam)
1291
1292                            )
1293
1294
1295
1296                 dtstval = date-time / date
1297                 ;Value MUST match value type
1298
1299               Example: The following is an example of this property:
1300
1301                 DTSTART:19980118T073000Z
1302
1303            */

1304
1305            if (icalTimeZoneParser == true){
1306                if (timeZoneType.equalsIgnoreCase("STANDARD") )
1307                {
1308                   icalTimeZone.setstandardDtStart(convertIcalDate(extractAttribute(iCalLine, "DTSTART")));
1309                }
1310                else
1311                {
1312                   icalTimeZone.setdaylightDtStart(convertIcalDate(extractAttribute(iCalLine, "DTSTART")));
1313                }
1314            }
1315            else if (icalEventParser == true)
1316            {
1317                iCalEvent.setDateStart(convertIcalDate(extractAttribute(iCalLine, "DTSTART")));
1318            }
1319        }
1320        else if (iCalLine.startsWith("DURATION") )
1321        {
1322            /*
1323            4.8.2.5 Duration
1324
1325               Property Name: DURATION
1326
1327               Purpose: The property specifies a positive duration of time.
1328
1329               Value Type: DURATION
1330
1331               Property Parameters: Non-standard property parameters can be
1332               specified on this property.
1333
1334               Conformance: The property can be specified in "VEVENT", "VTODO",
1335               "VFREEBUSY" or "VALARM" calendar components.
1336
1337               Description: In a "VEVENT" calendar component the property may be
1338               used to specify a duration of the event, instead of an explicit end
1339               date/time. In a "VTODO" calendar component the property may be used
1340               to specify a duration for the to-do, instead of an explicit due
1341               date/time. In a "VFREEBUSY" calendar component the property may be
1342               used to specify the interval of free time being requested. In a
1343               "VALARM" calendar component the property may be used to specify the
1344               delay period prior to repeating an alarm.
1345
1346               Format Definition: The property is defined by the following notation:
1347
1348                 duration = "DURATION" durparam ":" dur-value CRLF
1349                              ;consisting of a positive duration of time.
1350
1351                 durparam = *(";" xparam)
1352
1353               Example: The following is an example of this property that specifies
1354               an interval of time of 1 hour and zero minutes and zero seconds:
1355
1356                 DURATION:PT1H0M0S
1357
1358               The following is an example of this property that specifies an
1359               interval of time of 15 minutes.
1360
1361                 DURATION:PT15M
1362
1363             */

1364            if (icalEventParser == true)
1365            {
1366                iCalEvent.setDuration(extractAttribute(iCalLine, "DURATION"));
1367            }
1368        }
1369
1370        else if (iCalLine.startsWith("BEGIN:VEVENT") )
1371        {
1372            /*
1373             4.6.1 Event Component
1374             Component Name: "VEVENT"
1375             Purpose: Provide a grouping of component properties that describe an event.
1376             Format Definition: A "VEVENT" calendar component is defined by the following
1377             notation: eventc = "BEGIN" ":" "VEVENT" CRLF
1378                  eventprop *alarmc
1379                  "END" ":" "VEVENT" CRLF
1380                 BEGIN:VEVENT
1381                 UID:19970901T130000Z-123401@host.com
1382                 DTSTAMP:19970901T1300Z
1383                 DTSTART:19970903T163000Z
1384                 DTEND:19970903T190000Z
1385                 SUMMARY:Annual Employee Review
1386                 CLASS:PRIVATE
1387                 CATEGORIES:BUSINESS,HUMAN RESOURCES
1388                 END:VEVENT
1389
1390               Description: A "VEVENT" calendar component is a grouping of component
1391               properties, and possibly including "VALARM" calendar components, that
1392               represents a scheduled amount of time on a calendar. For example, it
1393               can be an activity; such as a one-hour long, department meeting from
1394               8:00 AM to 9:00 AM, tomorrow. Generally, an event will take up time
1395               on an individual calendar. Hence, the event will appear as an opaque
1396               interval in a search for busy time. Alternately, the event can have
1397               its Time Transparency set to "TRANSPARENT" in order to prevent
1398               blocking of the event in searches for busy time.
1399               The "VEVENT" is also the calendar component used to specify an
1400               anniversary or daily reminder within a calendar. These events have a
1401               DATE value type for the "DTSTART" property instead of the default
1402               data type of DATE-TIME. If such a "VEVENT" has a "DTEND" property, it
1403               MUST be specified as a DATE value also. The anniversary type of
1404               "VEVENT" can span more than one date (i.e, "DTEND" property value is
1405               set to a calendar date after the "DTSTART" property value).
1406               The "DTSTART" property for a "VEVENT" specifies the inclusive start
1407               of the event. For recurring events, it also specifies the very first
1408               instance in the recurrence set. The "DTEND" property for a "VEVENT"
1409               calendar component specifies the non-inclusive end of the event. For
1410               cases where a "VEVENT" calendar component specifies a "DTSTART"
1411               property with a DATE data type but no "DTEND" property, the events
1412               non-inclusive end is the end of the calendar date specified by the
1413               "DTSTART" property. For cases where a "VEVENT" calendar component
1414               specifies a "DTSTART" property with a DATE-TIME data type but no
1415               "DTEND" property, the event ends on the same calendar date and time
1416               of day specified by the "DTSTART" property.
1417               The "VEVENT" calendar component cannot be nested within another
1418               calendar component. However, "VEVENT" calendar components can be
1419               related to each other or to a "VTODO" or to a "VJOURNAL" calendar
1420               component with the "RELATED-TO" property.
1421             */

1422            icalEventParser = true;
1423            iCalEvent = new ICalendarVEvent();
1424            iCalEvent.setEventClass("");
1425        }
1426        else if (iCalLine.startsWith("UID:") )
1427        {
1428            if (icalEventParser)
1429            {
1430                iCalEvent.setUid(extractAttribute(iCalLine, "UID"));
1431            }
1432        }
1433        else if (iCalLine.startsWith("END:VEVENT") )
1434        {
1435            if (icalEventParser == true)
1436            {
1437                ical.icalEventCollection.add(iCalEvent);
1438                icalEventParser = false;
1439            }
1440        }
1441        else if (iCalLine.startsWith("BEGIN:VTODO") )
1442        {
1443            /*
1444             4.6.2 To-do Component
1445             Component Name: VTODO Purpose: Provide a grouping of calendar properties that describe a to-do.
1446             Formal Definition: A "VTODO" calendar component is defined by the following
1447             notation: todoc = "BEGIN" ":" "VTODO" CRLF
1448                  todoprop *alarmc
1449                  "END" ":" "VTODO" CRLF
1450                todoprop = *( ; the following are optional,
1451                ; but MUST NOT occur more than once
1452                    class / completed / created / description / dtstamp /
1453                    dtstart / geo / last-mod / location / organizer /
1454                    percent / priority / recurid / seq / status /
1455                    summary / uid / url /
1456             ; either 'due' or 'duration' may appear in
1457             ; a 'todoprop', but 'due' and 'duration'
1458             ; MUST NOT occur in the same 'todoprop'
1459                    due / duration /
1460             ; the following are optional,
1461             ; and MAY occur more than once
1462                attach / attendee / categories / comment / contact /
1463                exdate / exrule / rstatus / related / resources /
1464                rdate / rrule / x-prop )
1465             Description: A "VTODO" calendar component is a grouping of component
1466               properties and possibly "VALARM" calendar components that represent
1467               an action-item or assignment. For example, it can be used to
1468               represent an item of work assigned to an individual; such as "turn in
1469               travel expense today". The "VTODO" calendar component cannot be nested within another
1470               calendar component. However, "VTODO" calendar components can be
1471               related to each other or to a "VTODO" or to a "VJOURNAL" calendar
1472               component with the "RELATED-TO" property.
1473             A "VTODO" calendar component without the "DTSTART" and "DUE" (or
1474                "DURATION") properties specifies a to-do that will be associated with
1475                each successive calendar date, until it is completed.
1476             Example: The following is an example of a "VTODO" calendar component:
1477             BEGIN:VTODO
1478             UID:19970901T130000Z-123404@host.com
1479             DTSTAMP:19970901T1300Z
1480             DTSTART:19970415T133000Z
1481             DUE:19970416T045959Z
1482             SUMMARY:1996 Income Tax Preparation
1483             CLASS:CONFIDENTIAL
1484             CATEGORIES:FAMILY,FINANCE
1485             PRIORITY:1
1486             STATUS:NEEDS-ACTION
1487             END:VTODO
1488             */

1489        }
1490        else if (iCalLine.startsWith("END:VTODO") )
1491        {
1492            /*
1493             We will probably not do vtodos just yet..
1494             */

1495        }
1496        else if (iCalLine.startsWith("BEGIN:VJOURNAL") )
1497        {
1498             /*
1499             Not implemented.
1500             */

1501        }
1502        else if (iCalLine.startsWith("END:VJOURNAL") )
1503        {
1504             /*
1505             Not Implemented.
1506             */

1507        }
1508        else if (iCalLine.startsWith("BEGIN:VFREEBUSY") )
1509        {
1510             /*
1511              *4.6.4 Free/Busy Component
1512              freebusyc = "BEGIN" ":" "VFREEBUSY" CRLF
1513                  fbprop
1514                  "END" ":" "VFREEBUSY" CRLF
1515              fbprop = *(
1516                ; the following are optional,
1517                ; but MUST NOT occur more than once
1518                    contact / dtstart / dtend / duration / dtstamp /
1519                    organizer / uid / url /
1520              ; the following are optional,
1521              ; and MAY occur more than once
1522              attendee / comment / freebusy / rstatus / x-prop
1523              )
1524              Description: A "VFREEBUSY" calendar component is a grouping of
1525               component properties that represents either a request for, a reply to
1526               a request for free or busy time information or a published set of
1527               busy time information. When used to request free/busy time information, the "ATTENDEE"
1528               property specifies the calendar users whose free/busy time is being
1529               requested; the "ORGANIZER" property specifies the calendar user who
1530               is requesting the free/busy time; the "DTSTART" and "DTEND"
1531               properties specify the window of time for which the free/busy time is
1532               being requested; the "UID" and "DTSTAMP" properties are specified to
1533               assist in proper sequencing of multiple free/busy time requests.
1534               When used to reply to a request for free/busy time, the "ATTENDEE"
1535               property specifies the calendar user responding to the free/busy time
1536               request; the "ORGANIZER" property specifies the calendar user that
1537               originally requested the free/busy time; the "FREEBUSY" property
1538               specifies the free/busy time information (if it exists); and the
1539               "UID" and "DTSTAMP" properties are specified to assist in proper
1540               sequencing of multiple free/busy time replies.
1541               When used to publish busy time, the "ORGANIZER" property specifies
1542               the calendar user associated with the published busy time; the
1543               "DTSTART" and "DTEND" properties specify an inclusive time window
1544               that surrounds the busy time information; the "FREEBUSY" property
1545               specifies the published busy time information; and the "DTSTAMP"
1546               property specifies the date/time that ICalendar object was created.
1547               The "VFREEBUSY" calendar component cannot be nested within another
1548               calendar component. Multiple "VFREEBUSY" calendar components can be
1549               specified within an ICalendar object. This permits the grouping of
1550               Free/Busy information into logical collections, such as monthly
1551               groups of busy time information.
1552               The "VFREEBUSY" calendar component is intended for use in ICalendar
1553               object methods involving requests for free time, requests for busy
1554               time, requests for both free and busy, and the associated replies.
1555               Free/Busy information is represented with the "FREEBUSY" property.
1556               This property provides a terse representation of time periods. One or
1557               more "FREEBUSY" properties can be specified in the "VFREEBUSY"
1558               calendar component.
1559               When present in a "VFREEBUSY" calendar component, the "DTSTART" and
1560               "DTEND" properties SHOULD be specified prior to any "FREEBUSY"
1561               properties. In a free time request, these properties can be used in
1562               combination with the "DURATION" property to represent a request for a
1563               duration of free time within a specified window of time.
1564               The recurrence properties ("RRULE", "EXRULE", "RDATE", "EXDATE") are
1565               not permitted within a "VFREEBUSY" calendar component. Any recurring
1566               events are resolved into their individual busy time periods using the
1567               "FREEBUSY" property.
1568               Example: The following is an example of a "VFREEBUSY" calendar
1569               component used to request free or busy time information:
1570                 BEGIN:VFREEBUSY
1571                 ORGANIZER:MAILTO:jane_doe@host1.com
1572                 ATTENDEE:MAILTO:john_public@host2.com
1573                 DTSTART:19971015T050000Z
1574                 DTEND:19971016T050000Z
1575                 DTSTAMP:19970901T083000Z
1576                 END:VFREEBUSY
1577               The following is an example of a "VFREEBUSY" calendar component used
1578               to reply to the request with busy time information:
1579                 BEGIN:VFREEBUSY
1580                 ORGANIZER:MAILTO:jane_doe@host1.com
1581                 ATTENDEE:MAILTO:john_public@host2.com
1582                 DTSTAMP:19970901T100000Z
1583                 FREEBUSY;VALUE=PERIOD:19971015T050000Z/PT8H30M,
1584                  19971015T160000Z/PT5H30M,19971015T223000Z/PT6H30M
1585                 URL:http://host2.com/pub/busy/jpublic-01.ifb
1586                 COMMENT:This ICalendar file contains busy time information for
1587                  the next three months.
1588                 END:VFREEBUSY
1589              The following is an example of a "VFREEBUSY" calendar component used
1590              to publish busy time information.
1591                 BEGIN:VFREEBUSY
1592                 ORGANIZER:jsmith@host.com
1593                 DTSTART:19980313T141711Z
1594                 DTEND:19980410T141711Z
1595                 FREEBUSY:19980314T233000Z/19980315T003000Z
1596                 FREEBUSY:19980316T153000Z/19980316T163000Z
1597                 FREEBUSY:19980318T030000Z/19980318T040000Z
1598                 URL:http://www.host.com/calendar/busytime/jsmith.ifb
1599                 END:VFREEBUSY
1600             */

1601
1602        }
1603        else if (iCalLine.startsWith("END:VFREEBUSY") )
1604        {
1605             /*
1606             Not Implemented. We generate this!
1607             */

1608        }
1609        else if (iCalLine.startsWith("BEGIN:VTIMEZONE") )
1610        {
1611             /*
1612             4.6.5 Time Zone Component
1613
1614           Component Name: VTIMEZONE
1615
1616           Purpose: Provide a grouping of component properties that defines a
1617           time zone.
1618
1619           Formal Definition: A "VTIMEZONE" calendar component is defined by the
1620           following notation:
1621
1622             timezonec = "BEGIN" ":" "VTIMEZONE" CRLF
1623
1624                          2*(
1625
1626                          ; 'tzid' is required, but MUST NOT occur more
1627                          ; than once
1628
1629                        tzid /
1630
1631                          ; 'last-mod' and 'tzurl' are optional,
1632                        but MUST NOT occur more than once
1633
1634                        last-mod / tzurl /
1635
1636                          ; one of 'standardc' or 'daylightc' MUST occur
1637                        ..; and each MAY occur more than once.
1638
1639                        standardc / daylightc /
1640
1641                        ; the following is optional,
1642                        ; and MAY occur more than once
1643
1644                          x-prop
1645
1646                          )
1647
1648                          "END" ":" "VTIMEZONE" CRLF
1649
1650             standardc = "BEGIN" ":" "STANDARD" CRLF
1651
1652                          tzprop
1653
1654                          "END" ":" "STANDARD" CRLF
1655
1656             daylightc = "BEGIN" ":" "DAYLIGHT" CRLF
1657
1658                          tzprop
1659
1660                          "END" ":" "DAYLIGHT" CRLF
1661
1662             tzprop = 3*(
1663
1664                        ; the following are each REQUIRED,
1665                        ; but MUST NOT occur more than once
1666
1667                        dtstart / tzoffsetto / tzoffsetfrom /
1668
1669                        ; the following are optional,
1670                        ; and MAY occur more than once
1671
1672                        comment / rdate / rrule / tzname / x-prop
1673
1674                        )
1675
1676           Description: A time zone is unambiguously defined by the set of time
1677           measurement rules determined by the governing body for a given
1678           geographic area. These rules describe at a minimum the base offset
1679           from UTC for the time zone, often referred to as the Standard Time
1680           offset. Many locations adjust their Standard Time forward or backward
1681           by one hour, in order to accommodate seasonal changes in number of
1682           daylight hours, often referred to as Daylight Saving Time. Some
1683           locations adjust their time by a fraction of an hour. Standard Time
1684           is also known as Winter Time. Daylight Saving Time is also known as
1685           Advanced Time, Summer Time, or Legal Time in certain countries. The
1686           following table shows the changes in time zone rules in effect for
1687           New York City starting from 1967. Each line represents a description
1688           or rule for a particular observance.
1689
1690             Effective Observance Rule
1691
1692             Date (Date/Time) Offset Abbreviation
1693
1694             1967-* last Sun in Oct, 02:00 -0500 EST
1695
1696             1967-1973 last Sun in Apr, 02:00 -0400 EDT
1697
1698             1974-1974 Jan 6, 02:00 -0400 EDT
1699
1700             1975-1975 Feb 23, 02:00 -0400 EDT
1701
1702             1976-1986 last Sun in Apr, 02:00 -0400 EDT
1703
1704             1987-* first Sun in Apr, 02:00 -0400 EDT
1705
1706                Note: The specification of a global time zone registry is not
1707                addressed by this document and is left for future study.
1708                However, implementers may find the Olson time zone database [TZ]
1709                a useful reference. It is an informal, public-domain collection
1710                of time zone information, which is currently being maintained by
1711                volunteer Internet participants, and is used in several
1712                operating systems. This database contains current and historical
1713                time zone information for a wide variety of locations around the
1714                globe; it provides a time zone identifier for every unique time
1715                zone rule set in actual use since 1970, with historical data
1716                going back to the introduction of standard time.
1717
1718           Interoperability between two calendaring and scheduling applications,
1719           especially for recurring events, to-dos or journal entries, is
1720           dependent on the ability to capture and convey date and time
1721           information in an unambiguous format. The specification of current
1722           time zone information is integral to this behavior.
1723
1724           If present, the "VTIMEZONE" calendar component defines the set of
1725           Standard Time and Daylight Saving Time observances (or rules) for a
1726           particular time zone for a given interval of time. The "VTIMEZONE"
1727           calendar component cannot be nested within other calendar components.
1728           Multiple "VTIMEZONE" calendar components can exist in an ICalendar
1729           object. In this situation, each "VTIMEZONE" MUST represent a unique
1730           time zone definition. This is necessary for some classes of events,
1731           such as airline flights, that start in one time zone and end in
1732           another.
1733
1734           The "VTIMEZONE" calendar component MUST be present if the ICalendar
1735           object contains an RRULE that generates dates on both sides of a time
1736           zone shift (e.g. both in Standard Time and Daylight Saving Time)
1737           unless the ICalendar object intends to convey a floating time (See
1738           the section "4.1.10.11 Time" for proper interpretation of floating
1739           time). It can be present if the ICalendar object does not contain
1740           such a RRULE. In addition, if a RRULE is present, there MUST be valid
1741           time zone information for all recurrence instances.
1742
1743           The "VTIMEZONE" calendar component MUST include the "TZID" property
1744           and at least one definition of a standard or daylight component. The
1745           standard or daylight component MUST include the "DTSTART",
1746           "TZOFFSETFROM" and "TZOFFSETTO" properties.
1747
1748           An individual "VTIMEZONE" calendar component MUST be specified for
1749           each unique "TZID" parameter value specified in the ICalendar object.
1750
1751           Each "VTIMEZONE" calendar component consists of a collection of one
1752           or more sub-components that describe the rule for a particular
1753           observance (either a Standard Time or a Daylight Saving Time
1754           observance). The "STANDARD" sub-component consists of a collection of
1755           properties that describe Standard Time. The "DAYLIGHT" sub-component
1756           consists of a collection of properties that describe Daylight Saving
1757           Time. In general this collection of properties consists of:
1758
1759                - the first onset date-time for the observance
1760
1761                - the last onset date-time for the observance, if a last onset
1762                  is known.
1763
1764                - the offset to be applied for the observance
1765
1766                - a rule that describes the day and time when the observance
1767                  takes effect
1768
1769                - an optional name for the observance
1770
1771           For a given time zone, there may be multiple unique definitions of
1772           the observances over a period of time. Each observance is described
1773           using either a "STANDARD" or "DAYLIGHT" sub-component. The collection
1774           of these sub-components is used to describe the time zone for a given
1775           period of time. The offset to apply at any given time is found by
1776           locating the observance that has the last onset date and time before
1777           the time in question, and using the offset value from that observance.
1778
1779           The top-level properties in a "VTIMEZONE" calendar component are:
1780
1781           The mandatory "TZID" property is a text value that uniquely
1782           identifies the VTIMZONE calendar component within the scope of an
1783           ICalendar object.
1784
1785           The optional "LAST-MODIFIED" property is a UTC value that specifies
1786           the date and time that this time zone definition was last updated.
1787
1788           The optional "TZURL" property is url value that points to a published
1789           VTIMEZONE definition. TZURL SHOULD refer to a resource that is
1790           accessible by anyone who might need to interpret the object. This
1791           SHOULD NOT normally be a file: URL or other URL that is not widely-
1792           accessible.
1793
1794           The collection of properties that are used to define the STANDARD and
1795           DAYLIGHT sub-components include:
1796
1797           The mandatory "DTSTART" property gives the effective onset date and
1798           local time for the time zone sub-component definition. "DTSTART" in
1799           this usage MUST be specified as a local DATE-TIME value.
1800
1801           The mandatory "TZOFFSETFROM" property gives the UTC offset which is
1802           in use when the onset of this time zone observance begins.
1803           "TZOFFSETFROM" is combined with "DTSTART" to define the effective
1804           onset for the time zone sub-component definition. For example, the
1805           following represents the time at which the observance of Standard
1806           Time took effect in Fall 1967 for New York City:
1807
1808             DTSTART:19671029T020000
1809
1810             TZOFFSETFROM:-0400
1811
1812           The mandatory "TZOFFSETTO " property gives the UTC offset for the
1813           time zone sub-component (Standard Time or Daylight Saving Time) when
1814           this observance is in use.
1815
1816           The optional "TZNAME" property is the customary name for the time
1817           zone. It may be specified multiple times, to allow for specifying
1818           multiple language variants of the time zone names. This could be used
1819           for displaying dates.
1820
1821           If specified, the onset for the observance defined by the time zone
1822           sub-component is defined by either the "RRULE" or "RDATE" property.
1823           If neither is specified, only one sub-component can be specified in
1824           the "VTIMEZONE" calendar component and it is assumed that the single
1825           observance specified is always in effect.
1826
1827           The "RRULE" property defines the recurrence rule for the onset of the
1828           observance defined by this time zone sub-component. Some specific
1829           requirements for the usage of RRULE for this purpose include:
1830
1831                - If observance is known to have an effective end date, the
1832                "UNTIL" recurrence rule parameter MUST be used to specify the
1833                last valid onset of this observance (i.e., the UNTIL date-time
1834                will be equal to the last instance generated by the recurrence
1835                pattern). It MUST be specified in UTC time.
1836
1837                - The "DTSTART" and the "TZOFFSETTO" properties MUST be used
1838                when generating the onset date-time values (instances) from the
1839                RRULE.
1840
1841           Alternatively, the "RDATE" property can be used to define the onset
1842           of the observance by giving the individual onset date and times.
1843           "RDATE" in this usage MUST be specified as a local DATE-TIME value in
1844           UTC time.
1845
1846           The optional "COMMENT" property is also allowed for descriptive
1847           explanatory text.
1848
1849           Example: The following are examples of the "VTIMEZONE" calendar
1850           component:
1851
1852           This is an example showing time zone information for the Eastern
1853           United States using "RDATE" property. Note that this is only suitable
1854           for a recurring event that starts on or later than April 6, 1997 at
1855           03:00:00 EDT (i.e., the earliest effective transition date and time)
1856           and ends no later than April 7, 1998 02:00:00 EST (i.e., latest valid
1857           date and time for EST in this scenario). For example, this can be
1858           used for a recurring event that occurs every Friday, 8am-9:00 AM,
1859           starting June 1, 1997, ending December 31, 1997.
1860
1861             BEGIN:VTIMEZONE
1862             TZID:US-Eastern
1863             LAST-MODIFIED:19870101T000000Z
1864             BEGIN:STANDARD
1865             DTSTART:19971026T020000
1866             RDATE:19971026T020000
1867             TZOFFSETFROM:-0400
1868             TZOFFSETTO:-0500
1869             TZNAME:EST
1870             END:STANDARD
1871             BEGIN:DAYLIGHT
1872             DTSTART:19971026T020000
1873             RDATE:19970406T020000
1874             TZOFFSETFROM:-0500
1875             TZOFFSETTO:-0400
1876             TZNAME:EDT
1877             END:DAYLIGHT
1878             END:VTIMEZONE
1879
1880           This is a simple example showing the current time zone rules for the
1881           Eastern United States using a RRULE recurrence pattern. Note that
1882           there is no effective end date to either of the Standard Time or
1883           Daylight Time rules. This information would be valid for a recurring
1884           event starting today and continuing indefinitely.
1885
1886             BEGIN:VTIMEZONE
1887             TZID:US-Eastern
1888             LAST-MODIFIED:19870101T000000Z
1889             TZURL:http://zones.stds_r_us.net/tz/US-Eastern
1890             BEGIN:STANDARD
1891             DTSTART:19671029T020000
1892             RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10
1893             TZOFFSETFROM:-0400
1894             TZOFFSETTO:-0500
1895             TZNAME:EST
1896             END:STANDARD
1897             BEGIN:DAYLIGHT
1898             DTSTART:19870405T020000
1899             RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=4
1900             TZOFFSETFROM:-0500
1901             TZOFFSETTO:-0400
1902             TZNAME:EDT
1903             END:DAYLIGHT
1904             END:VTIMEZONE
1905
1906           This is an example showing a fictitious set of rules for the Eastern
1907           United States, where the Daylight Time rule has an effective end date
1908           (i.e., after that date, Daylight Time is no longer observed).
1909
1910             BEGIN:VTIMEZONE
1911             TZID:US--Fictitious-Eastern
1912             LAST-MODIFIED:19870101T000000Z
1913             BEGIN:STANDARD
1914             DTSTART:19671029T020000
1915             RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10
1916             TZOFFSETFROM:-0400
1917             TZOFFSETTO:-0500
1918             TZNAME:EST
1919             END:STANDARD
1920             BEGIN:DAYLIGHT
1921             DTSTART:19870405T020000
1922             RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=4;UNTIL=19980404T070000Z
1923             TZOFFSETFROM:-0500
1924             TZOFFSETTO:-0400
1925             TZNAME:EDT
1926             END:DAYLIGHT
1927             END:VTIMEZONE
1928
1929           This is an example showing a fictitious set of rules for the Eastern
1930           United States, where the first Daylight Time rule has an effective
1931           end date. There is a second Daylight Time rule that picks up where
1932           the other left off.
1933
1934             BEGIN:VTIMEZONE
1935             TZID:US--Fictitious-Eastern
1936             LAST-MODIFIED:19870101T000000Z
1937             BEGIN:STANDARD
1938             DTSTART:19671029T020000
1939             RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10
1940             TZOFFSETFROM:-0400
1941             TZOFFSETTO:-0500
1942             TZNAME:EST
1943             END:STANDARD
1944             BEGIN:DAYLIGHT
1945             DTSTART:19870405T020000
1946             RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=4;UNTIL=19980404T070000Z
1947             TZOFFSETFROM:-0500
1948             TZOFFSETTO:-0400
1949             TZNAME:EDT
1950             END:DAYLIGHT
1951             BEGIN:DAYLIGHT
1952             DTSTART:19990424T020000
1953             RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=4
1954             TZOFFSETFROM:-0500
1955             TZOFFSETTO:-0400
1956             TZNAME:EDT
1957             END:DAYLIGHT
1958             END:VTIMEZONE
1959
1960            */

1961            icalTimeZone = new ICalendarTimeZone();
1962            icalTimeZoneParser = true;
1963        }
1964        else if (iCalLine.startsWith("END:VTIMEZONE") )
1965        {
1966            icalTimeZoneParser = false;
1967            if (icalTimeZone == null){}
1968            else {
1969                ical.icaltimeZoneCollection.add(icalTimeZone);
1970            }
1971        }
1972        else if (iCalLine.startsWith("BEGIN:VALARM") )
1973        {
1974             /*
1975            4.6.6 Alarm Component
1976
1977               Component Name: VALARM
1978
1979               Purpose: Provide a grouping of component properties that define an
1980               alarm.
1981               Formal Definition: A "VALARM" calendar component is defined by the
1982               following notation:
1983
1984                      alarmc = "BEGIN" ":" "VALARM" CRLF
1985                                   (audioprop / dispprop / emailprop / procprop)
1986                                   "END" ":" "VALARM" CRLF
1987
1988                 audioprop = 2*(
1989
1990                            ; 'action' and 'trigger' are both REQUIRED,
1991                            ; but MUST NOT occur more than once
1992
1993                            action / trigger /
1994
1995                            ; 'duration' and 'repeat' are both optional,
1996                            ; and MUST NOT occur more than once each,
1997                            ; but if one occurs, so MUST the other
1998
1999                            duration / repeat /
2000
2001                            ; the following is optional,
2002                            ; but MUST NOT occur more than once
2003
2004                            attach /
2005
2006                            ; the following is optional,
2007                            ; and MAY occur more than once
2008
2009                            x-prop
2010
2011                            )
2012
2013
2014
2015                 dispprop = 3*(
2016
2017                            ; the following are all REQUIRED,
2018                            ; but MUST NOT occur more than once
2019
2020                            action / description / trigger /
2021
2022                            ; 'duration' and 'repeat' are both optional,
2023                            ; and MUST NOT occur more than once each,
2024                            ; but if one occurs, so MUST the other
2025
2026                            duration / repeat /
2027
2028                            ; the following is optional,
2029                            ; and MAY occur more than once
2030
2031                            *x-prop
2032
2033                            )
2034
2035
2036
2037                 emailprop = 5*(
2038
2039                            ; the following are all REQUIRED,
2040                            ; but MUST NOT occur more than once
2041
2042                            action / description / trigger / summary
2043
2044                            ; the following is REQUIRED,
2045                            ; and MAY occur more than once
2046
2047                            attendee /
2048
2049                            ; 'duration' and 'repeat' are both optional,
2050                            ; and MUST NOT occur more than once each,
2051                            ; but if one occurs, so MUST the other
2052
2053                            duration / repeat /
2054
2055                            ; the following are optional,
2056                            ; and MAY occur more than once
2057
2058                            attach / x-prop
2059
2060                            )
2061
2062
2063
2064                 procprop = 3*(
2065
2066                            ; the following are all REQUIRED,
2067                            ; but MUST NOT occur more than once
2068
2069                            action / attach / trigger /
2070
2071                            ; 'duration' and 'repeat' are both optional,
2072                            ; and MUST NOT occur more than once each,
2073                            ; but if one occurs, so MUST the other
2074
2075                            duration / repeat /
2076
2077                            ; 'description' is optional,
2078                            ; and MUST NOT occur more than once
2079
2080                            description /
2081
2082                            ; the following is optional,
2083                            ; and MAY occur more than once
2084
2085                            x-prop
2086
2087                            )
2088
2089               Description: A "VALARM" calendar component is a grouping of component
2090               properties that is a reminder or alarm for an event or a to-do. For
2091               example, it may be used to define a reminder for a pending event or
2092               an overdue to-do.
2093
2094               The "VALARM" calendar component MUST include the "ACTION" and
2095               "TRIGGER" properties. The "ACTION" property further constrains the
2096               "VALARM" calendar component in the following ways:
2097
2098               When the action is "AUDIO", the alarm can also include one and only
2099               one "ATTACH" property, which MUST point to a sound resource, which is
2100               rendered when the alarm is triggered.
2101
2102               When the action is "DISPLAY", the alarm MUST also include a
2103               "DESCRIPTION" property, which contains the text to be displayed when
2104               the alarm is triggered.
2105
2106               When the action is "EMAIL", the alarm MUST include a "DESCRIPTION"
2107               property, which contains the text to be used as the message body, a
2108               "SUMMARY" property, which contains the text to be used as the message
2109               subject, and one or more "ATTENDEE" properties, which contain the
2110               email address of attendees to receive the message. It can also
2111               include one or more "ATTACH" properties, which are intended to be
2112               sent as message attachments. When the alarm is triggered, the email
2113               message is sent.
2114
2115               When the action is "PROCEDURE", the alarm MUST include one and only
2116               one "ATTACH" property, which MUST point to a procedure resource,
2117               which is invoked when the alarm is triggered.
2118
2119               The "VALARM" calendar component MUST only appear within either a
2120               "VEVENT" or "VTODO" calendar component. "VALARM" calendar components
2121               cannot be nested. Multiple mutually independent "VALARM" calendar
2122               components can be specified for a single "VEVENT" or "VTODO" calendar
2123               component.
2124
2125               The "TRIGGER" property specifies when the alarm will be triggered.
2126               The "TRIGGER" property specifies a duration prior to the start of an
2127               event or a to-do. The "TRIGGER" edge may be explicitly set to be
2128               relative to the "START" or "END" of the event or to-do with the
2129               "RELATED" parameter of the "TRIGGER" property. The "TRIGGER" property
2130               value type can alternatively be set to an absolute calendar date and
2131               time of day value.
2132
2133               In an alarm set to trigger on the "START" of an event or to-do, the
2134               "DTSTART" property MUST be present in the associated event or to-do.
2135               In an alarm in a "VEVENT" calendar component set to trigger on the
2136               "END" of the event, either the "DTEND" property MUST be present, or
2137               the "DTSTART" and "DURATION" properties MUST both be present. In an
2138               alarm in a "VTODO" calendar component set to trigger on the "END" of
2139               the to-do, either the "DUE" property MUST be present, or the
2140               "DTSTART" and "DURATION" properties MUST both be present.
2141
2142               The alarm can be defined such that it triggers repeatedly. A
2143               definition of an alarm with a repeating trigger MUST include both the
2144               "DURATION" and "REPEAT" properties. The "DURATION" property specifies
2145               the delay period, after which the alarm will repeat. The "REPEAT"
2146               property specifies the number of additional repetitions that the
2147               alarm will triggered. This repitition count is in addition to the
2148               initial triggering of the alarm. Both of these properties MUST be
2149               present in order to specify a repeating alarm. If one of these two
2150               properties is absent, then the alarm will not repeat beyond the
2151               initial trigger.
2152
2153               The "ACTION" property is used within the "VALARM" calendar component
2154               to specify the type of action invoked when the alarm is triggered.
2155               The "VALARM" properties provide enough information for a specific
2156               action to be invoked. It is typically the responsibility of a
2157               "Calendar User Agent" (CUA) to deliver the alarm in the specified
2158               fashion. An "ACTION" property value of AUDIO specifies an alarm that
2159               causes a sound to be played to alert the user; DISPLAY specifies an
2160               alarm that causes a text message to be displayed to the user; EMAIL
2161               specifies an alarm that causes an electronic email message to be
2162               delivered to one or more email addresses; and PROCEDURE specifies an
2163               alarm that causes a procedure to be executed. The "ACTION" property
2164               MUST specify one and only one of these values.
2165
2166               In an AUDIO alarm, if the optional "ATTACH" property is included, it
2167               MUST specify an audio sound resource. The intention is that the sound
2168               will be played as the alarm effect. If an "ATTACH" property is
2169               specified that does not refer to a sound resource, or if the
2170               specified sound resource cannot be rendered (because its format is
2171               unsupported, or because it cannot be retrieved), then the CUA or
2172               other entity responsible for playing the sound may choose a fallback
2173               action, such as playing a built-in default sound, or playing no sound
2174               at all.
2175
2176               In a DISPLAY alarm, the intended alarm effect is for the text value
2177               of the "DESCRIPTION" property to be displayed to the user.
2178
2179               In an EMAIL alarm, the intended alarm effect is for an email message
2180               to be composed and delivered to all the addresses specified by the
2181               "ATTENDEE" properties in the "VALARM" calendar component. The
2182               "DESCRIPTION" property of the "VALARM" calendar component MUST be
2183               used as the body text of the message, and the "SUMMARY" property MUST
2184               be used as the subject text. Any "ATTACH" properties in the "VALARM"
2185               calendar component SHOULD be sent as attachments to the message.
2186
2187               In a PROCEDURE alarm, the "ATTACH" property in the "VALARM" calendar
2188               component MUST specify a procedure or program that is intended to be
2189               invoked as the alarm effect. If the procedure or program is in a
2190               format that cannot be rendered, then no procedure alarm will be
2191               invoked. If the "DESCRIPTION" property is present, its value
2192               specifies the argument string to be passed to the procedure or
2193               program. "Calendar User Agents" that receive an ICalendar object with
2194               this category of alarm, can disable or allow the "Calendar User" to
2195               disable, or otherwise ignore this type of alarm. While a very useful
2196               alarm capability, the PROCEDURE type of alarm SHOULD be treated by
2197               the "Calendar User Agent" as a potential security risk.
2198
2199               Example: The following example is for a "VALARM" calendar component
2200               that specifies an audio alarm that will sound at a precise time and
2201               repeat 4 more times at 15 minute intervals:
2202
2203                 BEGIN:VALARM
2204                 TRIGGER;VALUE=DATE-TIME:19970317T133000Z
2205                 REPEAT:4
2206                 DURATION:PT15M
2207                 ACTION:AUDIO
2208                 ATTACH;FMTTYPE=audio/basic:ftp://host.com/pub/sounds/bell-01.aud
2209                 END:VALARM
2210
2211               The following example is for a "VALARM" calendar component that
2212               specifies a display alarm that will trigger 30 minutes before the
2213               scheduled start of the event or the due date/time of the to-do it is
2214               associated with and will repeat 2 more times at 15 minute intervals:
2215
2216                 BEGIN:VALARM
2217                 TRIGGER:-PT30M
2218                 REPEAT:2
2219                 DURATION:PT15M
2220                 ACTION:DISPLAY
2221                 DESCRIPTION:Breakfast meeting with executive\n
2222                  team at 8:30 AM EST.
2223                 END:VALARM
2224
2225               The following example is for a "VALARM" calendar component that
2226               specifies an email alarm that will trigger 2 days before the
2227               scheduled due date/time of a to-do it is associated with. It does not
2228               repeat. The email has a subject, body and attachment link.
2229
2230                 BEGIN:VALARM
2231                 TRIGGER:-P2D
2232                 ACTION:EMAIL
2233                 ATTENDEE:MAILTO:john_doe@host.com
2234                 SUMMARY:*** REMINDER: SEND AGENDA FOR WEEKLY STAFF MEETING ***
2235                 DESCRIPTION:A draft agenda needs to be sent out to the attendees
2236                   to the weekly managers meeting (MGR-LIST). Attached is a
2237                   pointer the document template for the agenda file.
2238                 ATTACH;FMTTYPE=application/binary:http://host.com/templates/agen
2239                  da.doc
2240                 END:VALARM
2241
2242               The following example is for a "VALARM" calendar component that
2243               specifies a procedural alarm that will trigger at a precise date/time
2244               and will repeat 23 more times at one hour intervals. The alarm will
2245               invoke a procedure file.
2246
2247                 BEGIN:VALARM
2248                 TRIGGER;VALUE=DATE-TIME:19980101T050000Z
2249                 REPEAT:23
2250                 DURATION:PT1H
2251                 ACTION:PROCEDURE
2252                 ATTACH;FMTTYPE=application/binary:ftp://host.com/novo-
2253                  procs/felizano.exe
2254                 END:VALARM
2255
2256             */

2257        }
2258        else if (iCalLine.startsWith("TRANSP:") )
2259        {
2260             /*
2261             4.8.2.7 Time Transparency
2262
2263               Property Name: TRANSP
2264
2265               Purpose: This property defines whether an event is transparent or not
2266               to busy time searches.
2267
2268               Value Type: TEXT
2269
2270               Property Parameters: Non-standard property parameters can be
2271               specified on this property.
2272
2273               Conformance: This property can be specified once in a "VEVENT"
2274               calendar component.
2275
2276               Description: Time Transparency is the characteristic of an event that
2277               determines whether it appears to consume time on a calendar. Events
2278               that consume actual time for the individual or resource associated
2279
2280               with the calendar SHOULD be recorded as OPAQUE, allowing them to be
2281               detected by free-busy time searches. Other events, which do not take
2282               up the individual's (or resource's) time SHOULD be recorded as
2283               TRANSPARENT, making them invisible to free-busy time searches.
2284
2285               Format Definition: The property is specified by the following
2286               notation:
2287
2288                 transp = "TRANSP" tranparam ":" transvalue CRLF
2289
2290                 tranparam = *(";" xparam)
2291
2292                 transvalue = "OPAQUE" ;Blocks or opaque on busy time searches.
2293                            / "TRANSPARENT" ;Transparent on busy time searches.
2294                    ;Default value is OPAQUE
2295
2296               Example: The following is an example of this property for an event
2297               that is transparent or does not block on free/busy time searches:
2298
2299                 TRANSP:TRANSPARENT
2300
2301               The following is an example of this property for an event that is
2302               opaque or blocks on free/busy time searches:
2303
2304                 TRANSP:OPAQUE
2305
2306             */

2307            if (icalEventParser)
2308            {
2309                iCalEvent.setTransparency(extractAttribute(iCalLine, "TRANSP"));
2310            }
2311        }
2312        else if (iCalLine.startsWith("TZID") )
2313        {
2314             /*
2315            4.8.3 Time Zone Component Properties
2316
2317               The following properties specify time zone information in calendar
2318               components.
2319
2320            4.8.3.1 Time Zone Identifier
2321
2322               Property Name: TZID
2323
2324               Purpose: This property specifies the text value that uniquely
2325               identifies the "VTIMEZONE" calendar component.
2326
2327               Value Type: TEXT
2328
2329               Property Parameters: Non-standard property parameters can be
2330               specified on this property.
2331
2332               Conformance: This property MUST be specified in a "VTIMEZONE"
2333               calendar component.
2334
2335               Description:
2336               This is the label by which a time zone calendar
2337               component is referenced by any ICalendar properties whose data type
2338               is either DATE-TIME or TIME and not intended to specify a UTC or a
2339               "floating" time. The presence of the SOLIDUS character (US-ASCII
2340               decimal 47) as a prefix, indicates that this TZID represents an
2341               unique ID in a globally defined time zone registry (when such
2342               registry is defined).
2343
2344                    Note: This document does not define a naming convention for time
2345                    zone identifiers. Implementers may want to use the naming
2346                    conventions defined in existing time zone specifications such as
2347                    the public-domain Olson database [TZ]. The specification of
2348                    globally unique time zone identifiers is not addressed by this
2349                    document and is left for future study.
2350
2351               Format Definition: This property is defined by the following
2352               notation:
2353
2354                 tzid = "TZID" tzidpropparam ":" [tzidprefix] text CRLF
2355
2356                 tzidpropparam = *(";" xparam)
2357
2358                 ;tzidprefix = "/"
2359                 ; Defined previously. Just listed here for reader convenience.
2360
2361               Example: The following are examples of non-globally unique time zone
2362               identifiers:
2363
2364                 TZID:US-Eastern
2365
2366                 TZID:California-Los_Angeles
2367
2368               The following is an example of a fictitious globally unique time zone
2369               identifier:
2370
2371                 TZID:/US-New_York-New_York
2372
2373             */

2374            if (icalTimeZoneParser)
2375            {
2376                icalTimeZone.setTzID(extractAttribute(iCalLine, "TZID"));
2377            }
2378        }
2379        else if (iCalLine.startsWith("BEGIN:STANDARD") )
2380        {
2381            // Time Zone Standard
2382
timeZoneType = "STANDARD";
2383        }
2384        else if (iCalLine.startsWith("BEGIN:DAYLIGHT") )
2385        {
2386            // Time Zone Daylight
2387
timeZoneType = "DAYLIGHT";
2388        }
2389        else if (iCalLine.startsWith("TZNAME") )
2390        {
2391             /*
2392            4.8.3.2 Time Zone Name
2393
2394               Property Name: TZNAME
2395
2396               Purpose: This property specifies the customary designation for a time
2397               zone description.
2398
2399               Value Type: TEXT
2400
2401               Property Parameters: Non-standard and language property parameters
2402               can be specified on this property.
2403
2404               Conformance: This property can be specified in a "VTIMEZONE" calendar
2405               component.
2406
2407               Description: This property may be specified in multiple languages; in
2408               order to provide for different language requirements.
2409
2410               Format Definition: This property is defined by the following
2411               notation:
2412
2413                 tzname = "TZNAME" tznparam ":" text CRLF
2414
2415                 tznparam = *(
2416
2417                            ; the following is optional,
2418                            ; but MUST NOT occur more than once
2419
2420                            (";" languageparam) /
2421
2422                            ; the following is optional,
2423                            ; and MAY occur more than once
2424
2425                            (";" xparam)
2426
2427                            )
2428
2429               Example: The following are example of this property:
2430
2431                 TZNAME:EST
2432
2433               The following is an example of this property when two different
2434               languages for the time zone name are specified:
2435
2436                 TZNAME;LANGUAGE=en:EST
2437                 TZNAME;LANGUAGE=fr-CA:HNE
2438
2439             */

2440            if (icalTimeZoneParser)
2441            {
2442                if (timeZoneType.equalsIgnoreCase("STANDARD") )
2443                {
2444                    icalTimeZone.setstandardTzName(extractAttribute(iCalLine, "TZNAME"));
2445                }
2446                else
2447                {
2448                    icalTimeZone.setdaylightTzName(extractAttribute(iCalLine, "TZNAME"));
2449                }
2450            }
2451        }
2452        else if (iCalLine.startsWith("TZOFFSETFROM") )
2453        {
2454             /*
2455            4.8.3.3 Time Zone Offset From
2456
2457               Property Name: TZOFFSETFROM
2458
2459               Purpose: This property specifies the offset which is in use prior to
2460               this time zone observance.
2461
2462               Value Type: UTC-OFFSET
2463
2464               Property Parameters: Non-standard property parameters can be
2465               specified on this property.
2466
2467               Conformance: This property MUST be specified in a "VTIMEZONE"
2468               calendar component.
2469
2470               Description: This property specifies the offset which is in use prior
2471               to this time observance. It is used to calculate the absolute time at
2472               which the transition to a given observance takes place. This property
2473               MUST only be specified in a "VTIMEZONE" calendar component. A
2474               "VTIMEZONE" calendar component MUST include this property. The
2475               property value is a signed numeric indicating the number of hours and
2476               possibly minutes from UTC. Positive numbers represent time zones east
2477               of the prime meridian, or ahead of UTC. Negative numbers represent
2478               time zones west of the prime meridian, or behind UTC.
2479
2480               Format Definition: The property is defined by the following notation:
2481
2482                 tzoffsetfrom = "TZOFFSETFROM" frmparam ":" utc-offset
2483                                      CRLF
2484
2485                 frmparam = *(";" xparam)
2486
2487               Example: The following are examples of this property:
2488
2489                 TZOFFSETFROM:-0500
2490
2491                 TZOFFSETFROM:+1345
2492
2493            */

2494            if (icalTimeZoneParser)
2495            {
2496                String JavaDoc offSetVal = iCalLine.substring("TZOFFSETFROM:".length());
2497                if (offSetVal.startsWith("+"))
2498                {
2499                    offSetVal = offSetVal.substring(1);
2500                }
2501                if (timeZoneType.equalsIgnoreCase("STANDARD") )
2502                {
2503                    icalTimeZone.setstandardTzOffsetFrom(java.lang.Integer.parseInt(offSetVal));
2504                }
2505                else
2506                {
2507                    icalTimeZone.setdaylightTzOffsetFrom(java.lang.Integer.parseInt(offSetVal));
2508                }
2509            }
2510        }
2511        else if (iCalLine.startsWith("TZOFFSETTO") )
2512        {
2513             /*
2514            4.8.3.4 Time Zone Offset To
2515
2516               Property Name: TZOFFSETTO
2517
2518               Purpose: This property specifies the offset which is in use in this
2519               time zone observance.
2520
2521               Value Type: UTC-OFFSET
2522
2523               Property Parameters: Non-standard property parameters can be
2524               specified on this property.
2525
2526               Conformance: This property MUST be specified in a "VTIMEZONE"
2527               calendar component.
2528
2529               Description: This property specifies the offset which is in use in
2530               this time zone observance. It is used to calculate the absolute time
2531               for the new observance. The property value is a signed numeric
2532               indicating the number of hours and possibly minutes from UTC.
2533               Positive numbers represent time zones east of the prime meridian, or
2534               ahead of UTC. Negative numbers represent time zones west of the prime
2535               meridian, or behind UTC.
2536
2537               Format Definition: The property is defined by the following notation:
2538
2539                 tzoffsetto = "TZOFFSETTO" toparam ":" utc-offset CRLF
2540
2541                 toparam = *(";" xparam)
2542
2543               Example: The following are examples of this property:
2544
2545                 TZOFFSETTO:-0400
2546
2547                 TZOFFSETTO:+1245
2548
2549             */

2550        }
2551        else if (iCalLine.startsWith("TZURL") )
2552        {
2553             /*
2554            4.8.3.5 Time Zone URL
2555
2556               Property Name: TZURL
2557
2558               Purpose: The TZURL provides a means for a VTIMEZONE component to
2559               point to a network location that can be used to retrieve an up-to-
2560               date version of itself.
2561
2562               Value Type: URI
2563
2564               Property Parameters: Non-standard property parameters can be
2565               specified on this property.
2566
2567               Conformance: This property can be specified in a "VTIMEZONE" calendar
2568               component.
2569
2570               Description: The TZURL provides a means for a VTIMEZONE component to
2571               point to a network location that can be used to retrieve an up-to-
2572               date version of itself. This provides a hook to handle changes
2573               government bodies impose upon time zone definitions. Retrieval of
2574               this resource results in an ICalendar object containing a single
2575               VTIMEZONE component and a METHOD property set to PUBLISH.
2576
2577               Format Definition: The property is defined by the following notation:
2578
2579                 tzurl = "TZURL" tzurlparam ":" uri CRLF
2580
2581                 tzurlparam = *(";" xparam)
2582
2583               Example: The following is an example of this property:
2584
2585                 TZURL:http://timezones.r.us.net/tz/US-California-Los_Angeles
2586
2587             */

2588        }
2589        else if (iCalLine.startsWith("ATTENDEE") )
2590        {
2591             /*
2592                4.8.4 Relationship Component Properties
2593
2594                   The following properties specify relationship information in calendar
2595                   components.
2596
2597                4.8.4.1 Attendee
2598
2599                   Property Name: ATTENDEE
2600
2601                   Purpose: The property defines an "Attendee" within a calendar
2602                   component.
2603
2604                   Value Type: CAL-ADDRESS
2605
2606                   Property Parameters: Non-standard, language, calendar user type,
2607                   group or list membership, participation role, participation status,
2608                   RSVP expectation, delegatee, delegator, sent by, common name or
2609                   directory entry reference property parameters can be specified on
2610                   this property.
2611
2612                   Conformance: This property MUST be specified in an ICalendar object
2613                   that specifies a group scheduled calendar entity. This property MUST
2614                   NOT be specified in an ICalendar object when publishing the calendar
2615                   information (e.g., NOT in an ICalendar object that specifies the
2616                   publication of a calendar user's busy time, event, to-do or journal).
2617                   This property is not specified in an ICalendar object that specifies
2618                   only a time zone definition or that defines calendar entities that
2619                   are not group scheduled entities, but are entities only on a single
2620                   user's calendar.
2621
2622                   Description: The property MUST only be specified within calendar
2623                   components to specify participants, non-participants and the chair of
2624                   a group scheduled calendar entity. The property is specified within
2625                   an "EMAIL" category of the "VALARM" calendar component to specify an
2626                   email address that is to receive the email type of ICalendar alarm.
2627
2628                   The property parameter CN is for the common or displayable name
2629                   associated with the calendar address; ROLE, for the intended role
2630                   that the attendee will have in the calendar component; PARTSTAT, for
2631                   the status of the attendee's participation; RSVP, for indicating
2632                   whether the favor of a reply is requested; CUTYPE, to indicate the
2633                   type of calendar user; MEMBER, to indicate the groups that the
2634                   attendee belongs to; DELEGATED-TO, to indicate the calendar users
2635                   that the original request was delegated to; and DELEGATED-FROM, to
2636                   indicate whom the request was delegated from; SENT-BY, to indicate
2637                   whom is acting on behalf of the ATTENDEE; and DIR, to indicate the
2638                   URI that points to the directory information corresponding to the
2639                   attendee. These property parameters can be specified on an "ATTENDEE"
2640                   property in either a "VEVENT", "VTODO" or "VJOURNAL" calendar
2641                   component. They MUST not be specified in an "ATTENDEE" property in a
2642                   "VFREEBUSY" or "VALARM" calendar component. If the LANGUAGE property
2643                   parameter is specified, the identified language applies to the CN
2644                   parameter.
2645
2646                   A recipient delegated a request MUST inherit the RSVP and ROLE values
2647                   from the attendee that delegated the request to them.
2648
2649                   Multiple attendees can be specified by including multiple "ATTENDEE"
2650                   properties within the calendar component.
2651
2652                   Format Definition: The property is defined by the following notation:
2653
2654                     attendee = "ATTENDEE" attparam ":" cal-address CRLF
2655
2656                     attparam = *(
2657
2658                                ; the following are optional,
2659                                ; but MUST NOT occur more than once
2660
2661                                (";" cutypeparam) / (";"memberparam) /
2662                                (";" roleparam) / (";" partstatparam) /
2663                                (";" rsvpparam) / (";" deltoparam) /
2664                                (";" delfromparam) / (";" sentbyparam) /
2665                                (";"cnparam) / (";" dirparam) /
2666                                (";" languageparam) /
2667
2668                                ; the following is optional,
2669                                ; and MAY occur more than once
2670
2671                                (";" xparam)
2672
2673                                )
2674
2675                   Example: The following are examples of this property's use for a to-
2676                   do:
2677
2678                     ORGANIZER:MAILTO:jsmith@host1.com
2679                     ATTENDEE;MEMBER="MAILTO:DEV-GROUP@host2.com":
2680                      MAILTO:joecool@host2.com
2681                     ATTENDEE;DELEGATED-FROM="MAILTO:immud@host3.com":
2682                      MAILTO:ildoit@host1.com
2683
2684                   The following is an example of this property used for specifying
2685                   multiple attendees to an event:
2686
2687                     ORGANIZER:MAILTO:jsmith@host1.com
2688                     ATTENDEE;ROLE=REQ-PARTICIPANT;PARTSTAT=TENTATIVE;CN=Henry Cabot
2689                      :MAILTO:hcabot@host2.com
2690                     ATTENDEE;ROLE=REQ-PARTICIPANT;DELEGATED-FROM="MAILTO:bob@host.com"
2691                      ;PARTSTAT=ACCEPTED;CN=Jane Doe:MAILTO:jdoe@host1.com
2692
2693                   The following is an example of this property with a URI to the
2694                   directory information associated with the attendee:
2695
2696                     ATTENDEE;CN=John Smith;DIR="ldap://host.com:6666/o=eDABC%
2697                      20Industries,c=3DUS??(cn=3DBJim%20Dolittle)":MAILTO:jimdo@
2698                      host1.com
2699
2700                   The following is an example of this property with "delegatee" and
2701                   "delegator" information for an event:
2702
2703                     ORGANIZER;CN=John Smith:MAILTO:jsmith@host.com
2704                     ATTENDEE;ROLE=REQ-PARTICIPANT;PARTSTAT=TENTATIVE;DELEGATED-FROM=
2705                      "MAILTO:iamboss@host2.com";CN=Henry Cabot:MAILTO:hcabot@
2706                      host2.com
2707                     ATTENDEE;ROLE=NON-PARTICIPANT;PARTSTAT=DELEGATED;DELEGATED-TO=
2708                      "MAILTO:hcabot@host2.com";CN=The Big Cheese:MAILTO:iamboss
2709                      @host2.com
2710                     ATTENDEE;ROLE=REQ-PARTICIPANT;PARTSTAT=ACCEPTED;CN=Jane Doe
2711                      :MAILTO:jdoe@host1.com
2712
2713                   Example: The following is an example of this property's use when
2714                   another calendar user is acting on behalf of the "Attendee":
2715
2716                     ATTENDEE;SENT-BY=MAILTO:jan_doe@host1.com;CN=John Smith:MAILTO:
2717                      jsmith@host1.com
2718             */

2719            // This should be implemented as a collection under the VEVENT. Some other time
2720
}
2721        else if (iCalLine.startsWith("CONTACT") )
2722        {
2723             /*
2724             4.8.4.2 Contact
2725
2726               Property Name: CONTACT
2727
2728               Purpose: The property is used to represent contact information or
2729               alternately a reference to contact information associated with the
2730               calendar component.
2731
2732               Value Type: TEXT
2733
2734               Property Parameters: Non-standard, alternate text representation and
2735               language property parameters can be specified on this property.
2736
2737               Conformance: The property can be specified in a "VEVENT", "VTODO",
2738               "VJOURNAL" or "VFREEBUSY" calendar component.
2739
2740               Description: The property value consists of textual contact
2741               information. An alternative representation for the property value can
2742               also be specified that refers to a URI pointing to an alternate form,
2743               such as a vCard [RFC 2426], for the contact information.
2744
2745               Format Definition: The property is defined by the following notation:
2746
2747                 contact = "CONTACT" contparam ":" text CRLF
2748
2749                 contparam = *(
2750                            ; the following are optional,
2751                            ; but MUST NOT occur more than once
2752
2753                            (";" altrepparam) / (";" languageparam) /
2754
2755                            ; the following is optional,
2756                            ; and MAY occur more than once
2757
2758                            (";" xparam)
2759
2760                            )
2761
2762               Example: The following is an example of this property referencing
2763               textual contact information:
2764
2765                 CONTACT:Jim Dolittle\, ABC Industries\, +1-919-555-1234
2766
2767               The following is an example of this property with an alternate
2768               representation of a LDAP URI to a directory entry containing the
2769               contact information:
2770
2771                 CONTACT;ALTREP="ldap://host.com:6666/o=3DABC%20Industries\,
2772                  c=3DUS??(cn=3DBJim%20Dolittle)":Jim Dolittle\, ABC Industries\,
2773                  +1-919-555-1234
2774
2775               The following is an example of this property with an alternate
2776               representation of a MIME body part containing the contact
2777               information, such as a vCard [RFC 2426] embedded in a [MIME-DIR]
2778               content-type:
2779
2780                 CONTACT;ALTREP="CID=<part3.msg970930T083000SILVER@host.com>":Jim
2781                   Dolittle\, ABC Industries\, +1-919-555-1234
2782
2783               The following is an example of this property referencing a network
2784               resource, such as a vCard [RFC 2426] object containing the contact
2785               information:
2786
2787                 CONTACT;ALTREP="http://host.com/pdi/jdoe.vcf":Jim
2788                   Dolittle\, ABC Industries\, +1-919-555-1234
2789
2790             */

2791            if (icalEventParser)
2792            {
2793                // We will break this field into currently two bits. One is the original iCalendar data
2794
// 'organizer' the other is the email address.
2795
iCalEvent.setContact(extractAttribute(iCalLine, "CONTACT"));
2796            }
2797        }
2798        else if (iCalLine.startsWith("ORGANIZER") )
2799        {
2800             /*
2801            4.8.4.3 Organizer
2802
2803               Property Name: ORGANIZER
2804
2805               Purpose: The property defines the organizer for a calendar component.
2806
2807               Value Type: CAL-ADDRESS
2808
2809               Property Parameters: Non-standard, language, common name, directory
2810               entry reference, sent by property parameters can be specified on this
2811               property.
2812
2813               Conformance: This property MUST be specified in an ICalendar object
2814               that specifies a group scheduled calendar entity. This property MUST
2815               be specified in an ICalendar object that specifies the publication of
2816               a calendar user's busy time. This property MUST NOT be specified in
2817               an ICalendar object that specifies only a time zone definition or
2818               that defines calendar entities that are not group scheduled entities,
2819               but are entities only on a single user's calendar.
2820
2821               Description: The property is specified within the "VEVENT", "VTODO",
2822               "VJOURNAL calendar components to specify the organizer of a group
2823               scheduled calendar entity. The property is specified within the
2824               "VFREEBUSY" calendar component to specify the calendar user
2825               requesting the free or busy time. When publishing a "VFREEBUSY"
2826               calendar component, the property is used to specify the calendar that
2827               the published busy time came from.
2828
2829               The property has the property parameters CN, for specifying the
2830               common or display name associated with the "Organizer", DIR, for
2831               specifying a pointer to the directory information associated with the
2832               "Organizer", SENT-BY, for specifying another calendar user that is
2833               acting on behalf of the "Organizer". The non-standard parameters may
2834               also be specified on this property. If the LANGUAGE property
2835               parameter is specified, the identified language applies to the CN
2836               parameter value.
2837
2838               Format Definition: The property is defined by the following notation:
2839
2840                 organizer = "ORGANIZER" orgparam ":"
2841                              cal-address CRLF
2842
2843                 orgparam = *(
2844
2845                            ; the following are optional,
2846                            ; but MUST NOT occur more than once
2847
2848                            (";" cnparam) / (";" dirparam) / (";" sentbyparam) /
2849                            (";" languageparam) /
2850
2851                            ; the following is optional,
2852                            ; and MAY occur more than once
2853
2854                            (";" xparam)
2855
2856                            )
2857
2858               Example: The following is an example of this property:
2859
2860                 ORGANIZER;CN=John Smith:MAILTO:jsmith@host1.com
2861
2862               The following is an example of this property with a pointer to the
2863               directory information associated with the organizer:
2864
2865                 ORGANIZER;CN=JohnSmith;DIR="ldap://host.com:6666/o=3DDC%20Associ
2866                  ates,c=3DUS??(cn=3DJohn%20Smith)":MAILTO:jsmith@host1.com
2867
2868               The following is an example of this property used by another calendar
2869               user who is acting on behalf of the organizer, with responses
2870               intended to be sent back to the organizer, not the other calendar
2871               user:
2872
2873                 ORGANIZER;SENT-BY="MAILTO:jane_doe@host.com":
2874                  MAILTO:jsmith@host1.com
2875
2876             */

2877            // Add support for parsing the iCal Event Organizer
2878
if (icalEventParser)
2879            {
2880                // We will break this field into currently two bits. One is the original iCalendar data
2881
// 'organizer' the other is the email address.
2882
parseOrganizer(iCalEvent, extractAttribute(iCalLine, "ORGANIZER"));
2883            }
2884            else // iCal level
2885
ical.setOrganizer(extractAttribute(iCalLine, "ORGANIZER"));
2886        }
2887        else if (iCalLine.startsWith("RECURRENCE-ID") )
2888        {
2889             /*
2890             4.8.4.4 Recurrence ID
2891
2892               Property Name: RECURRENCE-ID
2893
2894               Purpose: This property is used in conjunction with the "UID" and
2895               "SEQUENCE" property to identify a specific instance of a recurring
2896               "VEVENT", "VTODO" or "VJOURNAL" calendar component. The property
2897               value is the effective value of the "DTSTART" property of the
2898               recurrence instance.
2899
2900               Value Type: The default value type for this property is DATE-TIME.
2901               The time format can be any of the valid forms defined for a DATE-TIME
2902               value type. See DATE-TIME value type definition for specific
2903               interpretations of the various forms. The value type can be set to
2904               DATE.
2905
2906               Property Parameters: Non-standard property, value data type, time
2907               zone identifier and recurrence identifier range parameters can be
2908               specified on this property.
2909
2910               Conformance: This property can be specified in an ICalendar object
2911               containing a recurring calendar component.
2912
2913               Description: The full range of calendar components specified by a
2914               recurrence set is referenced by referring to just the "UID" property
2915               value corresponding to the calendar component. The "RECURRENCE-ID"
2916               property allows the reference to an individual instance within the
2917               recurrence set.
2918
2919               If the value of the "DTSTART" property is a DATE type value, then the
2920               value MUST be the calendar date for the recurrence instance.
2921
2922               The date/time value is set to the time when the original recurrence
2923               instance would occur; meaning that if the intent is to change a
2924               Friday meeting to Thursday, the date/time is still set to the
2925               original Friday meeting.
2926
2927               The "RECURRENCE-ID" property is used in conjunction with the "UID"
2928               and "SEQUENCE" property to identify a particular instance of a
2929               recurring event, to-do or journal. For a given pair of "UID" and
2930               "SEQUENCE" property values, the "RECURRENCE-ID" value for a
2931               recurrence instance is fixed. When the definition of the recurrence
2932               set for a calendar component changes, and hence the "SEQUENCE"
2933               property value changes, the "RECURRENCE-ID" for a given recurrence
2934               instance might also change.The "RANGE" parameter is used to specify
2935               the effective range of recurrence instances from the instance
2936               specified by the "RECURRENCE-ID" property value. The default value
2937               for the range parameter is the single recurrence instance only. The
2938               value can also be "THISANDPRIOR" to indicate a range defined by the
2939               given recurrence instance and all prior instances or the value can be
2940               "THISANDFUTURE" to indicate a range defined by the given recurrence
2941               instance and all subsequent instances.
2942
2943               Format Definition: The property is defined by the following notation:
2944
2945                 recurid = "RECURRENCE-ID" ridparam ":" ridval CRLF
2946
2947                 ridparam = *(
2948
2949                            ; the following are optional,
2950                            ; but MUST NOT occur more than once
2951
2952                            (";" "VALUE" "=" ("DATE-TIME" / "DATE)) /
2953                            (";" tzidparam) / (";" rangeparam) /
2954                            ; the following is optional,
2955                            ; and MAY occur more than once
2956
2957                            (";" xparam)
2958
2959                            )
2960
2961                 ridval = date-time / date
2962                 ;Value MUST match value type
2963
2964               Example: The following are examples of this property:
2965
2966                 RECURRENCE-ID;VALUE=DATE:19960401
2967
2968                 RECURRENCE-ID;RANGE=THISANDFUTURE:19960120T120000Z
2969
2970             */

2971
2972            // Added to support fixing single occurrence Exceptions
2973
// for a recurring event
2974
if (icalEventParser)
2975            {
2976                iCalEvent.setRecurrenceId(true);
2977            }
2978
2979
2980        }
2981        else if (iCalLine.startsWith("RELATED-TO") )
2982        {
2983             /*
2984            4.8.4.5 Related To
2985
2986               Property Name: RELATED-TO
2987
2988               Purpose: The property is used to represent a relationship or
2989               reference between one calendar component and another.
2990
2991               Value Type: TEXT
2992
2993               Property Parameters: Non-standard and relationship type property
2994               parameters can be specified on this property.
2995
2996               Conformance: The property can be specified one or more times in the
2997               "VEVENT", "VTODO" or "VJOURNAL" calendar components.
2998
2999               Description: The property value consists of the persistent, globally
3000               unique identifier of another calendar component. This value would be
3001               represented in a calendar component by the "UID" property.
3002
3003               By default, the property value points to another calendar component
3004               that has a PARENT relationship to the referencing object. The
3005               "RELTYPE" property parameter is used to either explicitly state the
3006               default PARENT relationship type to the referenced calendar component
3007               or to override the default PARENT relationship type and specify
3008               either a CHILD or SIBLING relationship. The PARENT relationship
3009               indicates that the calendar component is a subordinate of the
3010               referenced calendar component. The CHILD relationship indicates that
3011               the calendar component is a superior of the referenced calendar
3012               component. The SIBLING relationship indicates that the calendar
3013               component is a peer of the referenced calendar component.
3014
3015               Changes to a calendar component referenced by this property can have
3016               an implicit impact on the related calendar component. For example, if
3017               a group event changes its start or end date or time, then the
3018               related, dependent events will need to have their start and end dates
3019               changed in a corresponding way. Similarly, if a PARENT calendar
3020               component is canceled or deleted, then there is an implied impact to
3021               the related CHILD calendar components. This property is intended only
3022               to provide information on the relationship of calendar components. It
3023               is up to the target calendar system to maintain any property
3024               implications of this relationship.
3025
3026               Format Definition: The property is defined by the following notation:
3027
3028                 related = "RELATED-TO" [relparam] ":" text CRLF
3029
3030                 relparam = *(
3031
3032                            ; the following is optional,
3033                            ; but MUST NOT occur more than once
3034
3035                            (";" reltypeparam) /
3036
3037                            ; the following is optional,
3038                            ; and MAY occur more than once
3039
3040                            (";" xparm)
3041
3042                            )
3043
3044               The following is an example of this property:
3045
3046                 RELATED-TO:<jsmith.part7.19960817T083000.xyzMail@host3.com>
3047
3048                 RELATED-TO:<19960401-080045-4000F192713-0052@host1.com>
3049
3050             */

3051            if (icalEventParser)
3052            {
3053                iCalEvent.setRelatedTo(extractAttribute(iCalLine, "RELATED-TO"));
3054            }
3055        }
3056        else if (iCalLine.startsWith("URL") )
3057        {
3058             /*
3059            4.8.4.6 Uniform Resource Locator
3060
3061               Property Name: URL
3062
3063               Purpose: This property defines a Uniform Resource Locator (URL)
3064               associated with the ICalendar object.
3065
3066               Value Type: URI
3067
3068               Property Parameters: Non-standard property parameters can be
3069               specified on this property.
3070
3071               Conformance: This property can be specified once in the "VEVENT",
3072               "VTODO", "VJOURNAL" or "VFREEBUSY" calendar components.
3073
3074               Description: This property may be used in a calendar component to
3075               convey a location where a more dynamic rendition of the calendar
3076               information associated with the calendar component can be found. This
3077               memo does not attempt to standardize the form of the URI, nor the
3078               format of the resource pointed to by the property value. If the URL
3079               property and Content-Location MIME header are both specified, they
3080               MUST point to the same resource.
3081
3082               Format Definition: The property is defined by the following notation:
3083
3084                 url = "URL" urlparam ":" uri CRLF
3085
3086                 urlparam = *(";" xparam)
3087
3088               Example: The following is an example of this property:
3089
3090                 URL:http://abc.com/pub/calendars/jsmith/mytime.ics
3091
3092             */

3093            // Add support for parsing and iCal Event URL
3094
if (icalEventParser)
3095            {
3096                String JavaDoc url = extractAttribute(iCalLine, "URL");
3097                if (url.startsWith("VALUE=URI:")) {
3098                    url = url.substring(10);
3099                }
3100                iCalEvent.setUrl(url);
3101            }
3102
3103
3104
3105        }
3106        else if (iCalLine.startsWith("EXDATE") )
3107        {
3108             /*
3109            4.8.5 Recurrence Component Properties
3110
3111               The following properties specify recurrence information in calendar
3112               components.
3113
3114            4.8.5.1 Exception Date/Times
3115
3116               Property Name: EXDATE
3117
3118               Purpose: This property defines the list of date/time exceptions for a
3119               recurring calendar component.
3120
3121               Value Type: The default value type for this property is DATE-TIME.
3122               The value type can be set to DATE.
3123
3124               Property Parameters: Non-standard, value data type and time zone
3125               identifier property parameters can be specified on this property.
3126
3127               Conformance: This property can be specified in an ICalendar object
3128               that includes a recurring calendar component.
3129
3130               Description: The exception dates, if specified, are used in computing
3131               the recurrence set. The recurrence set is the complete set of
3132               recurrence instances for a calendar component. The recurrence set is
3133               generated by considering the initial "DTSTART" property along with
3134               the "RRULE", "RDATE", "EXDATE" and "EXRULE" properties contained
3135               within the ICalendar object. The "DTSTART" property defines the first
3136               instance in the recurrence set. Multiple instances of the "RRULE" and
3137               "EXRULE" properties can also be specified to define more
3138               sophisticated recurrence sets. The final recurrence set is generated
3139               by gathering all of the start date-times generated by any of the
3140               specified "RRULE" and "RDATE" properties, and then excluding any
3141               start date and times which fall within the union of start date and
3142               times generated by any specified "EXRULE" and "EXDATE" properties.
3143               This implies that start date and times within exclusion related
3144               properties (i.e., "EXDATE" and "EXRULE") take precedence over those
3145               specified by inclusion properties (i.e., "RDATE" and "RRULE"). Where
3146               duplicate instances are generated by the "RRULE" and "RDATE"
3147               properties, only one recurrence is considered. Duplicate instances
3148               are ignored.
3149
3150               The "EXDATE" property can be used to exclude the value specified in
3151               "DTSTART". However, in such cases the original "DTSTART" date MUST
3152               still be maintained by the calendaring and scheduling system because
3153               the original "DTSTART" value has inherent usage dependencies by other
3154               properties such as the "RECURRENCE-ID".
3155
3156               Format Definition: The property is defined by the following notation:
3157
3158                 exdate = "EXDATE" exdtparam ":" exdtval *("," exdtval) CRLF
3159
3160                 exdtparam = *(
3161
3162                            ; the following are optional,
3163                            ; but MUST NOT occur more than once
3164
3165                            (";" "VALUE" "=" ("DATE-TIME" / "DATE")) /
3166
3167                            (";" tzidparam) /
3168
3169                            ; the following is optional,
3170                            ; and MAY occur more than once
3171
3172                            (";" xparam)
3173
3174                            )
3175
3176                 exdtval = date-time / date
3177                 ;Value MUST match value type
3178
3179               Example: The following is an example of this property:
3180
3181                 EXDATE:19960402T010000Z,19960403T010000Z,19960404T010000Z
3182
3183             */

3184            if (icalEventParser)
3185            {
3186                // Fix a bug parsing recurring event Exception Dates
3187
parseExDate(iCalEvent,iCalLine.substring(7));
3188
3189                //iCalEvent.exDateCollection.add(iCalLine.substring(18));
3190
iCalEvent.setExDatesExist(true);
3191            }
3192        }
3193        else if (iCalLine.startsWith("RRULE") )
3194        {
3195             /*
3196            4.8.5.4 Recurrence Rule
3197
3198               Property Name: RRULE
3199
3200               Purpose: This property defines a rule or repeating pattern for
3201               recurring events, to-dos, or time zone definitions.
3202
3203               Value Type: RECUR
3204
3205               Property Parameters: Non-standard property parameters can be
3206               specified on this property.
3207
3208               Conformance: This property can be specified one or more times in
3209               recurring "VEVENT", "VTODO" and "VJOURNAL" calendar components. It
3210               can also be specified once in each STANDARD or DAYLIGHT sub-component
3211               of the "VTIMEZONE" calendar component.
3212
3213               Description: The recurrence rule, if specified, is used in computing
3214               the recurrence set. The recurrence set is the complete set of
3215               recurrence instances for a calendar component. The recurrence set is
3216               generated by considering the initial "DTSTART" property along with
3217               the "RRULE", "RDATE", "EXDATE" and "EXRULE" properties contained
3218               within the ICalendar object. The "DTSTART" property defines the first
3219               instance in the recurrence set. Multiple instances of the "RRULE" and
3220               "EXRULE" properties can also be specified to define more
3221               sophisticated recurrence sets. The final recurrence set is generated
3222               by gathering all of the start date/times generated by any of the
3223               specified "RRULE" and "RDATE" properties, and excluding any start
3224               date/times which fall within the union of start date/times generated
3225               by any specified "EXRULE" and "EXDATE" properties. This implies that
3226               start date/times within exclusion related properties (i.e., "EXDATE"
3227               and "EXRULE") take precedence over those specified by inclusion
3228               properties (i.e., "RDATE" and "RRULE"). Where duplicate instances are
3229               generated by the "RRULE" and "RDATE" properties, only one recurrence
3230               is considered. Duplicate instances are ignored.
3231
3232               The "DTSTART" and "DTEND" property pair or "DTSTART" and "DURATION"
3233               property pair, specified within the ICalendar object defines the
3234               first instance of the recurrence. When used with a recurrence rule,
3235               the "DTSTART" and "DTEND" properties MUST be specified in local time
3236               and the appropriate set of "VTIMEZONE" calendar components MUST be
3237               included. For detail on the usage of the "VTIMEZONE" calendar
3238               component, see the "VTIMEZONE" calendar component definition.
3239
3240               Any duration associated with the ICalendar object applies to all
3241               members of the generated recurrence set. Any modified duration for
3242               specific recurrences MUST be explicitly specified using the "RDATE"
3243               property.
3244
3245               Format Definition: This property is defined by the following
3246               notation:
3247
3248                 rrule = "RRULE" rrulparam ":" recur CRLF
3249
3250                 rrulparam = *(";" xparam)
3251
3252               Example: All examples assume the Eastern United States time zone.
3253
3254               Daily for 10 occurrences:
3255
3256                 DTSTART;TZID=US-Eastern:19970902T090000
3257                 RRULE:FREQ=DAILY;COUNT=10
3258
3259                 ==> (1997 9:00 AM EDT)September 2-11
3260
3261               Daily until December 24, 1997:
3262
3263                 DTSTART;TZID=US-Eastern:19970902T090000
3264                 RRULE:FREQ=DAILY;UNTIL=19971224T000000Z
3265
3266                 ==> (1997 9:00 AM EDT)September 2-30;October 1-25
3267                     (1997 9:00 AM EST)October 26-31;November 1-30;December 1-23
3268
3269               Every other day - forever:
3270
3271                 DTSTART;TZID=US-Eastern:19970902T090000
3272                 RRULE:FREQ=DAILY;INTERVAL=2
3273                 ==> (1997 9:00 AM EDT)September2,4,6,8...24,26,28,30;
3274                      October 2,4,6...20,22,24
3275                     (1997 9:00 AM EST)October 26,28,30;November 1,3,5,7...25,27,29;
3276                      Dec 1,3,...
3277
3278               Every 10 days, 5 occurrences:
3279              *
3280                 DTSTART;TZID=US-Eastern:19970902T090000
3281                 RRULE:FREQ=DAILY;INTERVAL=10;COUNT=5
3282
3283                 ==> (1997 9:00 AM EDT)September 2,12,22;October 2,12
3284
3285               Everyday in January, for 3 years:
3286
3287                 DTSTART;TZID=US-Eastern:19980101T090000
3288                 RRULE:FREQ=YEARLY;UNTIL=20000131T090000Z;
3289                  BYMONTH=1;BYDAY=SU,MO,TU,WE,TH,FR,SA
3290                 or
3291                 RRULE:FREQ=DAILY;UNTIL=20000131T090000Z;BYMONTH=1
3292
3293                 ==> (1998 9:00 AM EDT)January 1-31
3294                     (1999 9:00 AM EDT)January 1-31
3295                     (2000 9:00 AM EDT)January 1-31
3296
3297               Weekly for 10 occurrences
3298
3299                 DTSTART;TZID=US-Eastern:19970902T090000
3300                 RRULE:FREQ=WEEKLY;COUNT=10
3301
3302                 ==> (1997 9:00 AM EDT)September 2,9,16,23,30;October 7,14,21
3303                     (1997 9:00 AM EST)October 28;November 4
3304
3305               Weekly until December 24, 1997
3306
3307                 DTSTART;TZID=US-Eastern:19970902T090000
3308                 RRULE:FREQ=WEEKLY;UNTIL=19971224T000000Z
3309
3310                 ==> (1997 9:00 AM EDT)September 2,9,16,23,30;October 7,14,21
3311                     (1997 9:00 AM EST)October 28;November 4,11,18,25;
3312                                       December 2,9,16,23
3313               Every other week - forever:
3314
3315                 DTSTART;TZID=US-Eastern:19970902T090000
3316                 RRULE:FREQ=WEEKLY;INTERVAL=2;WKST=SU
3317
3318                 ==> (1997 9:00 AM EDT)September 2,16,30;October 14
3319                     (1997 9:00 AM EST)October 28;November 11,25;December 9,23
3320                     (1998 9:00 AM EST)January 6,20;February
3321                 ...
3322
3323               Weekly on Tuesday and Thursday for 5 weeks:
3324
3325                DTSTART;TZID=US-Eastern:19970902T090000
3326                RRULE:FREQ=WEEKLY;UNTIL=19971007T000000Z;WKST=SU;BYDAY=TU,TH
3327                or
3328
3329                RRULE:FREQ=WEEKLY;COUNT=10;WKST=SU;BYDAY=TU,TH
3330
3331                ==> (1997 9:00 AM EDT)September 2,4,9,11,16,18,23,25,30;October 2
3332
3333               Every other week on Monday, Wednesday and Friday until December 24,
3334               1997, but starting on Tuesday, September 2, 1997:
3335
3336                 DTSTART;TZID=US-Eastern:19970902T090000
3337                 RRULE:FREQ=WEEKLY;INTERVAL=2;UNTIL=19971224T000000Z;WKST=SU;
3338                  BYDAY=MO,WE,FR
3339                 ==> (1997 9:00 AM EDT)September 2,3,5,15,17,19,29;October
3340                 1,3,13,15,17
3341                     (1997 9:00 AM EST)October 27,29,31;November 10,12,14,24,26,28;
3342                                       December 8,10,12,22
3343
3344               Every other week on Tuesday and Thursday, for 8 occurrences:
3345
3346                 DTSTART;TZID=US-Eastern:19970902T090000
3347                 RRULE:FREQ=WEEKLY;INTERVAL=2;COUNT=8;WKST=SU;BYDAY=TU,TH
3348
3349                 ==> (1997 9:00 AM EDT)September 2,4,16,18,30;October 2,14,16
3350
3351               Monthly on the 1st Friday for ten occurrences:
3352
3353                 DTSTART;TZID=US-Eastern:19970905T090000
3354                 RRULE:FREQ=MONTHLY;COUNT=10;BYDAY=1FR
3355
3356                 ==> (1997 9:00 AM EDT)September 5;October 3
3357                     (1997 9:00 AM EST)November 7;Dec 5
3358                     (1998 9:00 AM EST)January 2;February 6;March 6;April 3
3359                     (1998 9:00 AM EDT)May 1;June 5
3360
3361               Monthly on the 1st Friday until December 24, 1997:
3362
3363                 DTSTART;TZID=US-Eastern:19970905T090000
3364                 RRULE:FREQ=MONTHLY;UNTIL=19971224T000000Z;BYDAY=1FR
3365
3366                 ==> (1997 9:00 AM EDT)September 5;October 3
3367                     (1997 9:00 AM EST)November 7;December 5
3368
3369               Every other month on the 1st and last Sunday of the month for 10
3370               occurrences:
3371
3372                 DTSTART;TZID=US-Eastern:19970907T090000
3373                 RRULE:FREQ=MONTHLY;INTERVAL=2;COUNT=10;BYDAY=1SU,-1SU
3374
3375                 ==> (1997 9:00 AM EDT)September 7,28
3376                     (1997 9:00 AM EST)November 2,30
3377                     (1998 9:00 AM EST)January 4,25;March 1,29
3378                     (1998 9:00 AM EDT)May 3,31
3379
3380               Monthly on the second to last Monday of the month for 6 months:
3381
3382                 DTSTART;TZID=US-Eastern:19970922T090000
3383                 RRULE:FREQ=MONTHLY;COUNT=6;BYDAY=-2MO
3384
3385                 ==> (1997 9:00 AM EDT)September 22;October 20
3386                     (1997 9:00 AM EST)November 17;December 22
3387                     (1998 9:00 AM EST)January 19;February 16
3388
3389               Monthly on the third to the last day of the month, forever:
3390
3391                 DTSTART;TZID=US-Eastern:19970928T090000
3392                 RRULE:FREQ=MONTHLY;BYMONTHDAY=-3
3393
3394                 ==> (1997 9:00 AM EDT)September 28
3395                     (1997 9:00 AM EST)October 29;November 28;December 29
3396                     (1998 9:00 AM EST)January 29;February 26
3397                 ...
3398
3399               Monthly on the 2nd and 15th of the month for 10 occurrences:
3400
3401                 DTSTART;TZID=US-Eastern:19970902T090000
3402                 RRULE:FREQ=MONTHLY;COUNT=10;BYMONTHDAY=2,15
3403
3404                 ==> (1997 9:00 AM EDT)September 2,15;October 2,15
3405                     (1997 9:00 AM EST)November 2,15;December 2,15
3406                     (1998 9:00 AM EST)January 2,15
3407
3408               Monthly on the first and last day of the month for 10 occurrences:
3409
3410                 DTSTART;TZID=US-Eastern:19970930T090000
3411                 RRULE:FREQ=MONTHLY;COUNT=10;BYMONTHDAY=1,-1
3412
3413                 ==> (1997 9:00 AM EDT)September 30;October 1
3414                     (1997 9:00 AM EST)October 31;November 1,30;December 1,31
3415                     (1998 9:00 AM EST)January 1,31;February 1
3416
3417               Every 18 months on the 10th thru 15th of the month for 10
3418               occurrences:
3419
3420                 DTSTART;TZID=US-Eastern:19970910T090000
3421                 RRULE:FREQ=MONTHLY;INTERVAL=18;COUNT=10;BYMONTHDAY=10,11,12,13,14,
3422                  15
3423
3424                 ==> (1997 9:00 AM EDT)September 10,11,12,13,14,15
3425                     (1999 9:00 AM EST)March 10,11,12,13
3426
3427               Every Tuesday, every other month:
3428
3429                 DTSTART;TZID=US-Eastern:19970902T090000
3430                 RRULE:FREQ=MONTHLY;INTERVAL=2;BYDAY=TU
3431
3432                 ==> (1997 9:00 AM EDT)September 2,9,16,23,30
3433                     (1997 9:00 AM EST)November 4,11,18,25
3434                     (1998 9:00 AM EST)January 6,13,20,27;March 3,10,17,24,31
3435                 ...
3436
3437               Yearly in June and July for 10 occurrences:
3438
3439                 DTSTART;TZID=US-Eastern:19970610T090000
3440                 RRULE:FREQ=YEARLY;COUNT=10;BYMONTH=6,7
3441                 ==> (1997 9:00 AM EDT)June 10;July 10
3442                     (1998 9:00 AM EDT)June 10;July 10
3443                     (1999 9:00 AM EDT)June 10;July 10
3444                     (2000 9:00 AM EDT)June 10;July 10
3445                     (2001 9:00 AM EDT)June 10;July 10
3446                 Note: Since none of the BYDAY, BYMONTHDAY or BYYEARDAY components
3447                 are specified, the day is gotten from DTSTART
3448
3449               Every other year on January, February, and March for 10 occurrences:
3450
3451                 DTSTART;TZID=US-Eastern:19970310T090000
3452                 RRULE:FREQ=YEARLY;INTERVAL=2;COUNT=10;BYMONTH=1,2,3
3453
3454                 ==> (1997 9:00 AM EST)March 10
3455                     (1999 9:00 AM EST)January 10;February 10;March 10
3456                     (2001 9:00 AM EST)January 10;February 10;March 10
3457                     (2003 9:00 AM EST)January 10;February 10;March 10
3458
3459               Every 3rd year on the 1st, 100th and 200th day for 10 occurrences:
3460
3461                 DTSTART;TZID=US-Eastern:19970101T090000
3462                 RRULE:FREQ=YEARLY;INTERVAL=3;COUNT=10;BYYEARDAY=1,100,200
3463
3464                 ==> (1997 9:00 AM EST)January 1
3465                     (1997 9:00 AM EDT)April 10;July 19
3466                     (2000 9:00 AM EST)January 1
3467                     (2000 9:00 AM EDT)April 9;July 18
3468                     (2003 9:00 AM EST)January 1
3469                     (2003 9:00 AM EDT)April 10;July 19
3470                     (2006 9:00 AM EST)January 1
3471
3472               Every 20th Monday of the year, forever:
3473
3474                 DTSTART;TZID=US-Eastern:19970519T090000
3475                 RRULE:FREQ=YEARLY;BYDAY=20MO
3476
3477                 ==> (1997 9:00 AM EDT)May 19
3478                     (1998 9:00 AM EDT)May 18
3479                     (1999 9:00 AM EDT)May 17
3480                 ...
3481
3482               Monday of week number 20 (where the default start of the week is
3483               Monday), forever:
3484
3485                 DTSTART;TZID=US-Eastern:19970512T090000
3486                 RRULE:FREQ=YEARLY;BYWEEKNO=20;BYDAY=MO
3487
3488                 ==> (1997 9:00 AM EDT)May 12
3489                     (1998 9:00 AM EDT)May 11
3490                     (1999 9:00 AM EDT)May 17
3491                 ...
3492
3493               Every Thursday in March, forever:
3494
3495                 DTSTART;TZID=US-Eastern:19970313T090000
3496                 RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=TH
3497
3498                 ==> (1997 9:00 AM EST)March 13,20,27
3499                     (1998 9:00 AM EST)March 5,12,19,26
3500                     (1999 9:00 AM EST)March 4,11,18,25
3501                 ...
3502
3503               Every Thursday, but only during June, July, and August, forever:
3504
3505                 DTSTART;TZID=US-Eastern:19970605T090000
3506                 RRULE:FREQ=YEARLY;BYDAY=TH;BYMONTH=6,7,8
3507
3508                 ==> (1997 9:00 AM EDT)June 5,12,19,26;July 3,10,17,24,31;
3509                                   August 7,14,21,28
3510                     (1998 9:00 AM EDT)June 4,11,18,25;July 2,9,16,23,30;
3511                                   August 6,13,20,27
3512                     (1999 9:00 AM EDT)June 3,10,17,24;July 1,8,15,22,29;
3513                                   August 5,12,19,26
3514                 ...
3515
3516               Every Friday the 13th, forever:
3517
3518                 DTSTART;TZID=US-Eastern:19970902T090000
3519                 EXDATE;TZID=US-Eastern:19970902T090000
3520                 RRULE:FREQ=MONTHLY;BYDAY=FR;BYMONTHDAY=13
3521
3522                 ==> (1998 9:00 AM EST)February 13;March 13;November 13
3523                     (1999 9:00 AM EDT)August 13
3524                     (2000 9:00 AM EDT)October 13
3525                 ...
3526
3527               The first Saturday that follows the first Sunday of the month,
3528                forever:
3529
3530                 DTSTART;TZID=US-Eastern:19970913T090000
3531                 RRULE:FREQ=MONTHLY;BYDAY=SA;BYMONTHDAY=7,8,9,10,11,12,13
3532
3533                 ==> (1997 9:00 AM EDT)September 13;October 11
3534                     (1997 9:00 AM EST)November 8;December 13
3535                     (1998 9:00 AM EST)January 10;February 7;March 7
3536                     (1998 9:00 AM EDT)April 11;May 9;June 13...
3537                 ...
3538
3539               Every four years, the first Tuesday after a Monday in November,
3540               forever (U.S. Presidential Election day):
3541
3542                 DTSTART;TZID=US-Eastern:19961105T090000
3543                 RRULE:FREQ=YEARLY;INTERVAL=4;BYMONTH=11;BYDAY=TU;BYMONTHDAY=2,3,4,
3544                  5,6,7,8
3545
3546                 ==> (1996 9:00 AM EST)November 5
3547                     (2000 9:00 AM EST)November 7
3548                     (2004 9:00 AM EST)November 2
3549                 ...
3550
3551               The 3rd instance into the month of one of Tuesday, Wednesday or
3552               Thursday, for the next 3 months:
3553
3554                 DTSTART;TZID=US-Eastern:19970904T090000
3555                 RRULE:FREQ=MONTHLY;COUNT=3;BYDAY=TU,WE,TH;BYSETPOS=3
3556
3557                 ==> (1997 9:00 AM EDT)September 4;October 7
3558                     (1997 9:00 AM EST)November 6
3559
3560               The 2nd to last weekday of the month:
3561
3562                 DTSTART;TZID=US-Eastern:19970929T090000
3563                 RRULE:FREQ=MONTHLY;BYDAY=MO,TU,WE,TH,FR;BYSETPOS=-2
3564
3565                 ==> (1997 9:00 AM EDT)September 29
3566                     (1997 9:00 AM EST)October 30;November 27;December 30
3567                     (1998 9:00 AM EST)January 29;February 26;March 30
3568                 ...
3569
3570               Every 3 hours from 9:00 AM to 5:00 PM on a specific day:
3571
3572                 DTSTART;TZID=US-Eastern:19970902T090000
3573                 RRULE:FREQ=HOURLY;INTERVAL=3;UNTIL=19970902T170000Z
3574
3575                 ==> (September 2, 1997 EDT)09:00,12:00,15:00
3576
3577               Every 15 minutes for 6 occurrences:
3578
3579                 DTSTART;TZID=US-Eastern:19970902T090000
3580                 RRULE:FREQ=MINUTELY;INTERVAL=15;COUNT=6
3581
3582                 ==> (September 2, 1997 EDT)09:00,09:15,09:30,09:45,10:00,10:15
3583
3584               Every hour and a half for 4 occurrences:
3585
3586                 DTSTART;TZID=US-Eastern:19970902T090000
3587                 RRULE:FREQ=MINUTELY;INTERVAL=90;COUNT=4
3588
3589                 ==> (September 2, 1997 EDT)09:00,10:30;12:00;13:30
3590
3591               Every 20 minutes from 9:00 AM to 4:40 PM every day:
3592
3593                 DTSTART;TZID=US-Eastern:19970902T090000
3594                 RRULE:FREQ=DAILY;BYHOUR=9,10,11,12,13,14,15,16;BYMINUTE=0,20,40
3595                 or
3596                 RRULE:FREQ=MINUTELY;INTERVAL=20;BYHOUR=9,10,11,12,13,14,15,16
3597
3598                 ==> (September 2, 1997 EDT)9:00,9:20,9:40,10:00,10:20,
3599                                            ... 16:00,16:20,16:40
3600                     (September 3, 1997 EDT)9:00,9:20,9:40,10:00,10:20,
3601                                           ...16:00,16:20,16:40
3602                 ...
3603
3604               An example where the days generated makes a difference because of
3605               WKST:
3606
3607                 DTSTART;TZID=US-Eastern:19970805T090000
3608                 RRULE:FREQ=WEEKLY;INTERVAL=2;COUNT=4;BYDAY=TU,SU;WKST=MO
3609
3610                 ==> (1997 EDT)Aug 5,10,19,24
3611
3612                 changing only WKST from MO to SU, yields different results...
3613
3614                 DTSTART;TZID=US-Eastern:19970805T090000
3615                 RRULE:FREQ=WEEKLY;INTERVAL=2;COUNT=4;BYDAY=TU,SU;WKST=SU
3616                 ==> (1997 EDT)August 5,17,19,31
3617
3618            */

3619            try{
3620                if (icalTimeZoneParser)
3621                {
3622                    if (timeZoneType.equalsIgnoreCase("STANDARD") )
3623                    {
3624                       icalTimeZone.setstandardRRule(extractAttribute(iCalLine, "RRULE"));
3625                    }
3626                    else
3627                    {
3628                        icalTimeZone.setdaylightRRule(extractAttribute(iCalLine, "RRULE"));
3629                    }
3630                }
3631                if (icalEventParser)
3632                {
3633                    iCalEvent.setRRule(extractAttribute(iCalLine,"RRULE"));
3634                    RepeatRules rr = new RepeatRules();
3635                    rr.parseRepeatRules(iCalEvent.getRRule());
3636                    // Move parsed values back into iCalEvent.
3637
iCalEvent.setRepeatRules(rr);
3638                }
3639            }
3640            catch (Exception JavaDoc e)
3641            {
3642                logger.fine("Error processing RRULE line of ICalendar, line:" + lineCtr
3643                   + "Exception" + e);
3644            }
3645        }
3646        else if (iCalLine.startsWith("CREATED") )
3647        {
3648             /*
3649            4.8.7 Change Management Component Properties
3650
3651               The following properties specify change management information in
3652               calendar components.
3653
3654            4.8.7.1 Date/Time Created
3655
3656               Property Name: CREATED
3657
3658               Purpose: This property specifies the date and time that the calendar
3659               information was created by the calendar user agent in the calendar
3660               store.
3661
3662                    Note: This is analogous to the creation date and time for a file
3663                    in the file system.
3664
3665               Value Type: DATE-TIME
3666
3667               Property Parameters: Non-standard property parameters can be
3668               specified on this property.
3669
3670               Conformance: The property can be specified once in "VEVENT", "VTODO"
3671               or "VJOURNAL" calendar components.
3672
3673               Description: The date and time is a UTC value.
3674
3675               Format Definition: The property is defined by the following notation:
3676
3677                 created = "CREATED" creaparam ":" date-time CRLF
3678
3679                 creaparam = *(";" xparam)
3680
3681               Example: The following is an example of this property:
3682
3683                 CREATED:19960329T133000Z
3684             */

3685            if (icalEventParser)
3686                iCalEvent.setCreated(convertIcalDate(extractAttribute(iCalLine, "CREATED")));
3687        }
3688        else if (iCalLine.startsWith("DTSTAMP") )
3689        {
3690             /*
3691            4.8.7.2 Date/Time Stamp
3692
3693               Property Name: DTSTAMP
3694
3695               Purpose: The property indicates the date/time that the instance of
3696               the ICalendar object was created.
3697
3698               Value Type: DATE-TIME
3699
3700               Property Parameters: Non-standard property parameters can be
3701               specified on this property.
3702
3703               Conformance: This property MUST be included in the "VEVENT", "VTODO",
3704               "VJOURNAL" or "VFREEBUSY" calendar components.
3705
3706               Description: The value MUST be specified in the UTC time format.
3707
3708               This property is also useful to protocols such as [IMIP] that have
3709               inherent latency issues with the delivery of content. This property
3710               will assist in the proper sequencing of messages containing ICalendar
3711               objects.
3712
3713               This property is different than the "CREATED" and "LAST-MODIFIED"
3714               properties. These two properties are used to specify when the
3715               particular calendar data in the calendar store was created and last
3716               modified. This is different than when the ICalendar object
3717               representation of the calendar service information was created or
3718               last modified.
3719
3720               Format Definition: The property is defined by the following notation:
3721
3722                 dtstamp = "DTSTAMP" stmparam ":" date-time CRLF
3723
3724                 stmparam = *(";" xparam)
3725
3726               Example:
3727
3728                 DTSTAMP:19971210T080000Z
3729
3730             */

3731            if (icalEventParser)
3732                iCalEvent.setDateStamp(convertIcalDate(extractAttribute(iCalLine, "DTSTAMP")));
3733        }
3734        else if (iCalLine.startsWith("LAST-MODIFIED") )
3735        {
3736             /*
3737            4.8.7.3 Last Modified
3738
3739               Property Name: LAST-MODIFIED
3740
3741               Purpose: The property specifies the date and time that the
3742               information associated with the calendar component was last revised
3743               in the calendar store.
3744
3745                    Note: This is analogous to the modification date and time for a
3746                    file in the file system.
3747
3748               Value Type: DATE-TIME
3749
3750               Property Parameters: Non-standard property parameters can be
3751               specified on this property.
3752
3753               Conformance: This property can be specified in the "EVENT", "VTODO",
3754               "VJOURNAL" or "VTIMEZONE" calendar components.
3755
3756               Description: The property value MUST be specified in the UTC time
3757               format.
3758
3759               Format Definition: The property is defined by the following notation:
3760
3761                 last-mod = "LAST-MODIFIED" lstparam ":" date-time CRLF
3762
3763                 lstparam = *(";" xparam)
3764
3765               Example: The following is are examples of this property:
3766
3767                 LAST-MODIFIED:19960817T133000Z
3768
3769             */

3770            if (icalEventParser)
3771                iCalEvent.setLastModified(convertIcalDate(extractAttribute(iCalLine, "LAST-MODIFIED")));
3772        }
3773        else if (iCalLine.startsWith("SEQUENCE") )
3774        {
3775             /*
3776            4.8.7.4 Sequence Number
3777
3778               Property Name: SEQUENCE
3779
3780               Purpose: This property defines the revision sequence number of the
3781               calendar component within a sequence of revisions.
3782
3783               Value Type: integer
3784
3785               Property Parameters: Non-standard property parameters can be
3786               specified on this property.
3787
3788               Conformance: The property can be specified in "VEVENT", "VTODO" or
3789               "VJOURNAL" calendar component.
3790
3791               Description: When a calendar component is created, its sequence
3792               number is zero (US-ASCII decimal 48). It is monotonically incremented
3793               by the "Organizer's" CUA each time the "Organizer" makes a
3794               significant revision to the calendar component. When the "Organizer"
3795               makes changes to one of the following properties, the sequence number
3796               MUST be incremented:
3797
3798                 . "DTSTART"
3799
3800                 . "DTEND"
3801
3802                 . "DUE"
3803
3804                 . "RDATE"
3805
3806                 . "RRULE"
3807
3808                 . "EXDATE"
3809
3810                 . "EXRULE"
3811
3812                 . "STATUS"
3813
3814               In addition, changes made by the "Organizer" to other properties can
3815               also force the sequence number to be incremented. The "Organizer" CUA
3816               MUST increment the sequence number when ever it makes changes to
3817               properties in the calendar component that the "Organizer" deems will
3818               jeopardize the validity of the participation status of the
3819               "Attendees". For example, changing the location of a meeting from one
3820               locale to another distant locale could effectively impact the
3821               participation status of the "Attendees".
3822
3823               The "Organizer" includes this property in an ICalendar object that it
3824               sends to an "Attendee" to specify the current version of the calendar
3825               component.
3826
3827               The "Attendee" includes this property in an ICalendar object that it
3828               sends to the "Organizer" to specify the version of the calendar
3829               component that the "Attendee" is referring to.
3830
3831               A change to the sequence number is not the mechanism that an
3832               "Organizer" uses to request a response from the "Attendees". The
3833               "RSVP" parameter on the "ATTENDEE" property is used by the
3834               "Organizer" to indicate that a response from the "Attendees" is
3835               requested.
3836
3837               Format Definition: This property is defined by the following
3838               notation:
3839
3840                 seq = "SEQUENCE" seqparam ":" integer CRLF
3841                 ; Default is "0"
3842
3843                 seqparam = *(";" xparam)
3844
3845               Example: The following is an example of this property for a calendar
3846               component that was just created by the "Organizer".
3847
3848                 SEQUENCE:0
3849
3850               The following is an example of this property for a calendar component
3851               that has been revised two different times by the "Organizer".
3852
3853                 SEQUENCE:2
3854
3855             */

3856            if (icalEventParser)
3857            {
3858                try
3859                {
3860                    iCalEvent.setSequence(Integer.parseInt((extractAttribute(iCalLine, "SEQUENCE"))));
3861                }
3862                catch (Exception JavaDoc e)
3863                {
3864                    logger.severe("Parse Integer error on data :"+extractAttribute(iCalLine, "SEQUENCE")
3865                            + "Exception is : "+e);
3866                    e.printStackTrace(System.err);
3867                }
3868            }
3869        }
3870        else if (iCalLine.startsWith("X-") )
3871        {
3872             /*
3873            4.8.8 Miscellaneous Component Properties
3874
3875               The following properties specify information about a number of
3876               miscellaneous features of calendar components.
3877
3878            4.8.8.1 Non-standard Properties
3879
3880               Property Name: Any property name with a "X-" prefix
3881
3882               Purpose: This class of property provides a framework for defining
3883               non-standard properties.
3884
3885               Value Type: TEXT
3886
3887               Property Parameters: Non-standard and language property parameters
3888               can be specified on this property.
3889
3890               Conformance: This property can be specified in any calendar
3891               component.
3892
3893               Description: The MIME Calendaring and Scheduling Content Type
3894               provides a "standard mechanism for doing non-standard things". This
3895               extension support is provided for implementers to "push the envelope"
3896               on the existing version of the memo. Extension properties are
3897               specified by property and/or property parameter names that have the
3898               prefix text of "X-" (the two character sequence: LATIN CAPITAL LETTER
3899               X character followed by the HYPEN-MINUS character). It is recommended
3900               that vendors concatenate onto this sentinel another short prefix text
3901               to identify the vendor. This will facilitate readability of the
3902               extensions and minimize possible collision of names between different
3903               vendors. User agents that support this content type are expected to
3904               be able to parse the extension properties and property parameters but
3905               can ignore them.
3906
3907               At present, there is no registration authority for names of extension
3908               properties and property parameters. The data type for this property
3909               is TEXT. Optionally, the data type can be any of the other valid data
3910               types.
3911
3912               Format Definition: The property is defined by the following notation:
3913
3914                 x-prop = x-name *(";" xparam) [";" languageparam] ":" text CRLF
3915                    ; Lines longer than 75 octets should be folded
3916
3917               Example: The following might be the ABC vendor's extension for an
3918               audio-clip form of subject property:
3919
3920                 X-ABC-MMSUBJ;X-ABC-MMSUBJTYPE=wave:http://load.noise.org/mysubj.wav
3921
3922             */

3923        }
3924        else if (iCalLine.startsWith("REQUEST-STATUS") )
3925        {
3926             /*
3927            4.8.8.2 Request Status
3928
3929               Property Name: REQUEST-STATUS
3930
3931               Purpose: This property defines the status code returned for a
3932               scheduling request.
3933
3934               Value Type: TEXT
3935
3936               Property Parameters: Non-standard and language property parameters
3937               can be specified on this property.
3938
3939               Conformance: The property can be specified in "VEVENT", "VTODO",
3940               "VJOURNAL" or "VFREEBUSY" calendar component.
3941
3942               Description: This property is used to return status code information
3943               related to the processing of an associated ICalendar object. The data
3944               type for this property is TEXT.
3945
3946               The value consists of a short return status component, a longer
3947               return status description component, and optionally a status-specific
3948               data component. The components of the value are separated by the
3949               SEMICOLON character (US-ASCII decimal 59).
3950
3951               The short return status is a PERIOD character (US-ASCII decimal 46)
3952               separated 3-tuple of integers. For example, "3.1.1". The successive
3953               levels of integers provide for a successive level of status code
3954               granularity.
3955
3956               The following are initial classes for the return status code.
3957               Individual ICalendar object methods will define specific return
3958               status codes for these classes. In addition, other classes for the
3959               return status code may be defined using the registration process
3960               defined later in this memo.
3961
3962                 |==============+===============================================|
3963                 | Short Return | Longer Return Status Description |
3964                 | Status Code | |
3965                 |==============+===============================================|
3966                 | 1.xx | Preliminary success. This class of status |
3967                 | | of status code indicates that the request has |
3968                 | | request has been initially processed but that |
3969                 | | completion is pending. |
3970                 |==============+===============================================|
3971                 | 2.xx | Successful. This class of status code |
3972                 | | indicates that the request was completed |
3973                 | | successfuly. However, the exact status code |
3974                 | | can indicate that a fallback has been taken. |
3975                 |==============+===============================================|
3976                 | 3.xx | Client Error. This class of status code |
3977                 | | indicates that the request was not successful.|
3978                 | | The error is the result of either a syntax or |
3979                 | | a semantic error in the client formatted |
3980                 | | request. Request should not be retried until |
3981                 | | the condition in the request is corrected. |
3982                 |==============+===============================================|
3983                 | 4.xx | Scheduling Error. This class of status code |
3984                 | | indicates that the request was not successful.|
3985                 | | Some sort of error occurred within the |
3986                 | | calendaring and scheduling service, not |
3987                 | | directly related to the request itself. |
3988                 |==============+===============================================|
3989
3990               Format Definition: The property is defined by the following notation:
3991
3992                 rstatus = "REQUEST-STATUS" rstatparam ":"
3993                              statcode ";" statdesc [";" extdata]
3994
3995                 rstatparam = *(
3996
3997                            ; the following is optional,
3998                            ; but MUST NOT occur more than once
3999
4000                            (";" languageparm) /
4001
4002                            ; the following is optional,
4003                            ; and MAY occur more than once
4004
4005                            (";" xparam)
4006
4007                            )
4008
4009                 statcode = 1*DIGIT *("." 1*DIGIT)
4010                 ;Hierarchical, numeric return status code
4011
4012                 statdesc = text
4013                 ;Textual status description
4014
4015                 extdata = text
4016                 ;Textual exception data. For example, the offending property
4017                 ;name and value or complete property line.
4018
4019               Example: The following are some possible examples of this property.
4020               The COMMA and SEMICOLON separator characters in the property value
4021               are BACKSLASH character escaped because they appear in a text value.
4022
4023                 REQUEST-STATUS:2.0;Success
4024
4025                 REQUEST-STATUS:3.1;Invalid property value;DTSTART:96-Apr-01
4026
4027                 REQUEST-STATUS:2.8; Success\, repeating event ignored. Scheduled
4028                  as a single event.;RRULE:FREQ=WEEKLY\;INTERVAL=2
4029
4030                 REQUEST-STATUS:4.1;Event conflict. Date/time is busy.
4031
4032                 REQUEST-STATUS:3.7;Invalid calendar user;ATTENDEE:
4033                  MAILTO:jsmith@host.com
4034
4035             */

4036            if (icalEventParser)
4037            {
4038                iCalEvent.setRequestStatus(extractAttribute(iCalLine, "REQUEST-STATUS"));
4039            }
4040        }
4041        else
4042        {
4043            logger.fine("Line not parsed (probably correct but check):"+iCalLine);
4044        }
4045    }
4046
4047    public Date JavaDoc convertIcalDate (String JavaDoc iCalString)
4048    {
4049        /*
4050         * DTSTART:19970714T133000 ;Local time
4051         * DTSTART:19970714T173000Z ;UTC time
4052         * DTSTART;TZID=US-Eastern:19970714T133000 ;Local time and time
4053         * ; zone reference
4054         *DTSTART;VALUE=DATE;
4055           TZID=/softwarestudio.org/Olson_20011030_5/Europe/Amsterdam:20030902
4056         *
4057         * Point of all this, return date as local.
4058        */

4059//logger.fine(iCalEvent.getSummary());
4060
//logger.fine(iCalString);
4061

4062        String JavaDoc iCalFormat = null;
4063        int startPoint = 0;
4064        String JavaDoc tzName = null;
4065
4066        TimeZone JavaDoc offsetZone = java.util.TimeZone.getDefault();
4067
4068        if (iCalString.startsWith("TZID=")){
4069            // Time for a specific Time Zone
4070
startPoint = iCalString.indexOf(":") + 1;
4071            // Get timezone.
4072
offsetZone = getTimeZoneFromDate(iCalString, startPoint);
4073/*
4074            if (iCalString.indexOf("TZID=/softwarestudio.org/Olson_20011030_5/") != -1)
4075            {
4076                tzName = iCalString.substring("TZID=/softwarestudio.org/Olson_20011030_5/".length(),startPoint -1);
4077            }
4078            else
4079            {
4080                tzName = iCalString.substring("TZID=".length(),startPoint -1);
4081            }
4082            offsetZone = TimeZone.getTimeZone(tzName);
4083 **/

4084            //logger.fine("TZID St Pt = " + startPoint + " String " + iCalString);
4085
iCalString = iCalString.substring(startPoint ,startPoint + 8) + iCalString.substring(startPoint + 9, startPoint + 15);
4086            iCalFormat = "yyyyMMddHHmmss";
4087            // Need to do the offset thing to get in local date/time.
4088
// Currently expect that all time is local.
4089
}
4090        else if (iCalString.startsWith("VALUE=DATE:"))
4091        {
4092            startPoint = iCalString.indexOf(":") + 1;
4093            iCalString = iCalString.substring(startPoint ,startPoint + 8);
4094            // + "000000" ;
4095
iCalFormat = "yyyyMMdd";
4096        }
4097        else if (iCalString.startsWith("VALUE=DATE;"))
4098        {
4099            // decipher dates of type: VALUE=DATE;TZID=/softwarestudio.org/Olson_20011030_5/Australia/Sydney:20020918
4100
startPoint = iCalString.indexOf(";") + 1;
4101            iCalString = iCalString.substring(startPoint);
4102            startPoint = iCalString.indexOf(":") + 1;
4103            // Get timezone.
4104
//logger.fine("TZID 2 St Pt = " + startPoint + " String " + iCalString);
4105
offsetZone = getTimeZoneFromDate(iCalString,startPoint);
4106            //iCalString = iCalString.substring(startPoint ,startPoint + 8) + iCalString.substring(startPoint + 10, startPoint + 16);
4107
iCalString = iCalString.substring(startPoint);
4108            iCalFormat = "yyyyMMdd";
4109        }
4110        else if (iCalString.startsWith("VALUE=DATE-TIME;"))
4111        {
4112            // decipher dates of type: VALUE=DATE-TIME;TZID=/softwarestudio.org/Olson_20011030_5/Australia/Sydney:20020918T120000
4113
startPoint = iCalString.indexOf(";") + 1;
4114            iCalString = iCalString.substring(startPoint);
4115            startPoint = iCalString.indexOf(":") + 1;
4116            // Get timezone.
4117
//logger.fine("TZID 2 St Pt = " + startPoint + " String " + iCalString);
4118
offsetZone = getTimeZoneFromDate(iCalString,startPoint);
4119            //iCalString = iCalString.substring(startPoint ,startPoint + 8) + iCalString.substring(startPoint + 10, startPoint + 16);
4120
iCalString = iCalString.substring(startPoint);
4121            iCalFormat = "yyyyMMdd'T'HHmmss";
4122        }
4123        else if (iCalString.startsWith("VALUE=DATE-TIME:"))
4124        {
4125            // decipher dates of type: VALUE=DATE-TIME:20020918T120000
4126
startPoint = iCalString.indexOf(":") + 1;
4127            offsetZone = gmt;
4128            iCalString = iCalString.substring(startPoint);
4129            iCalFormat = "yyyyMMdd'T'HHmmss";
4130        }
4131        else if (iCalString.endsWith("Z"))
4132        {
4133            // UTC Time
4134
offsetZone = gmt;
4135            iCalString = iCalString.substring(0,8) + iCalString.substring(9,15);
4136            iCalFormat = "yyyyMMddHHmmss";
4137        }
4138        else if (iCalString.substring(8,9).equalsIgnoreCase("T"))
4139        {
4140            // Local Time
4141
iCalString = iCalString.substring(0,8) + iCalString.substring(9);
4142            iCalFormat = "yyyyMMddHHmmss";
4143        }
4144        else
4145        {
4146            logger.fine("Date Type not known:(" + iCalString + ")");
4147            return null;
4148        }
4149
4150        Date JavaDoc date = null;
4151        try
4152        {
4153            SimpleDateFormat JavaDoc formatter = new SimpleDateFormat JavaDoc(iCalFormat);
4154            formatter.setTimeZone(offsetZone);
4155            //logger.fine("Parsing:" + iCalFormat + "with:" + iCalString );
4156
date = (Date JavaDoc)formatter.parse(iCalString);
4157        }
4158        catch (Exception JavaDoc e)
4159        {
4160            System.err.print("Parse error - " + e);
4161        }
4162        return date;
4163    }
4164
4165    public TimeZone JavaDoc getTimeZoneFromDate(String JavaDoc iCalString, int startPoint)
4166    {
4167        TimeZone JavaDoc tz = null;
4168        try {
4169            String JavaDoc tzName = null;
4170            if (iCalString.indexOf("TZID=/softwarestudio.org/Olson_20011030_5/") != -1)
4171            {
4172                tzName = iCalString.substring("TZID=/softwarestudio.org/Olson_20011030_5/".length(),startPoint -1);
4173            }
4174            else
4175            {
4176                tzName = iCalString.substring("TZID=".length(),startPoint -1);
4177            }
4178            tz = TimeZone.getTimeZone(tzName);
4179        }
4180        catch (Exception JavaDoc e)
4181        {
4182            System.err.print("iCal Line - " + lineCtr + "Parse error - " + e);
4183        }
4184        return tz;
4185    }
4186    public String JavaDoc extractAttribute(String JavaDoc attribLine, String JavaDoc attribName)
4187    {
4188        String JavaDoc attr = "";
4189        /*
4190        if (attribName.equals("TRANSP"))
4191        {
4192            logger.fine (attribLine
4193                        + attribLine.length()
4194                                );
4195        }
4196         */

4197        // Returns Attribute Value.. Add 1 for the colon :
4198
try {
4199            attr = attribLine.substring(attribName.length() + 1);
4200        }
4201        catch (Exception JavaDoc e)
4202        {
4203            logger.fine ("iCal Line - " + lineCtr + "Parse error when extracting Attribute - "
4204                            + attribName + " from Attribute Line - " + attribLine
4205                            + "Parse error is: " + e);
4206        }
4207        // Fix bugs where escaped characters were not being unescaped
4208
// Convert "\n" to a LF and "\r" to a CR
4209
attr = attr.replaceAll("\\\\n","\n");
4210        attr = attr.replaceAll("\\\\r","\r");
4211        attr = attr.replaceAll("\\\\,",",");
4212        attr = attr.replaceAll("\\\\\"","\"");
4213        attr = attr.replaceAll("\\\\;",";");
4214
4215        return attr;
4216    }
4217
4218    public void parseOrganizer(ICalendarVEvent iCalEvent, String JavaDoc organizer)
4219    {
4220        String JavaDoc iCalOrganizer = extractAttribute(organizer,"ORGANIZER");
4221        iCalEvent.setOrganizer(iCalOrganizer);
4222
4223        int startPoint = -1;
4224        int ii = 0;
4225        boolean mailto = false;
4226        while (organizer != null && ii < 10) {
4227            ii++;
4228            String JavaDoc attr = null;
4229            startPoint = organizer.indexOf(":");
4230            if (startPoint != -1) {
4231                attr = organizer.substring(0,startPoint);
4232                organizer = organizer.substring(startPoint + 1);
4233            } else {
4234                attr = organizer;
4235                organizer = null;
4236            }
4237            if (attr.toUpperCase().startsWith("CN=")) {
4238                attr = attr.substring(3);
4239                if (attr.startsWith("\"")) {
4240                    attr = attr.substring(1);
4241                }
4242                if (attr.endsWith("\"")) {
4243                    attr = attr.substring(0,attr.length()-1);
4244                }
4245                iCalEvent.setOrganizer(attr);
4246            } else if (attr.toUpperCase().startsWith("MAILTO")) {
4247                mailto = true;
4248            } else if (mailto) {
4249                mailto = false;
4250                iCalEvent.setOrganizerEmail(attr);
4251            }
4252        }
4253    }
4254    public void parseExDate(ICalendarVEvent iCalEvent, String JavaDoc exDate)
4255    {
4256        int startPoint = -1;
4257        int ii = 0;
4258        boolean mailto = false;
4259        while (exDate != null && ii < 10) {
4260            ii++;
4261            String JavaDoc attr = null;
4262            startPoint = exDate.indexOf(":");
4263            if (startPoint != -1) {
4264                attr = exDate.substring(0,startPoint);
4265                exDate = exDate.substring(startPoint + 1);
4266            } else {
4267                attr = exDate;
4268                exDate = null;
4269            }
4270            if (!attr.toUpperCase().startsWith("TZID=")) {
4271                StringTokenizer JavaDoc st = new StringTokenizer JavaDoc(attr,",");
4272                while (st.hasMoreTokens()) {
4273                    String JavaDoc exdate = st.nextToken();
4274                    logger.fine("iCalendarParser.parseExDate() add " + exdate);
4275                    iCalEvent.exDateCollection.add(exdate);
4276                }
4277            }
4278        }
4279    }
4280
4281    /*
4282     * Stuff left to parse..
4283     * @author sfg
4284     *
4285     * TODO To change the template for this generated type comment go to
4286     * Window - Preferences - Java - Code Style - Code Templates
4287     *
4288     *
4289     *
4290            Parameter Name: ALTREP
4291           Purpose: To specify an alternate text representation for the property
4292           value. Format Definition: The property parameter is defined by the following
4293           notation:
4294           STUART: ALTREP is used within another parameter..
4295           Look at the bits between the = double quotes.
4296
4297           Parameter Name CN
4298           ecify the common name to be associated with the
4299        // calendar user specified by the property.
4300        // CN=parameter value
4301        //ical.setCommonName(extractAttribute(iCalLine,ICalendarParser.CN));
4302
4303    }
4304    else if (iCalLine.startsWith(ICalendarParser.CUTYPE) )
4305    {
4306
4307        Parameter Name: CUTYPE Purpose: To specify the type of calendar user specified by the
4308       property. Format Definition: The property parameter is defined by the following
4309       notation: cutypeparam = "CUTYPE" "="
4310                             ("INDIVIDUAL" ; An individual
4311                            / "GROUP" ; A group of individuals
4312                            / "RESOURCE" ; A physical resource
4313                            / "ROOM" ; A room resource
4314                            / "UNKNOWN" ; Otherwise not known
4315                            / x-name ; Experimental type
4316                            / iana-token) ; Other IANA registered
4317                                                    ; type
4318         ; Default is INDIVIDUAL
4319           Description: This parameter can be specified on properties with a
4320           CAL-ADDRESS value type. The parameter identifies the type of calendar
4321           user specified by the property. If not specified on a property that
4322           allows this parameter, the default is INDIVIDUAL.
4323
4324        //ical.setCuType(extractAttribute(iCalLine,ICalendarParser.CUTYPE));
4325    }
4326    else if (iCalLine.startsWith("DELEGATED-FROM") )
4327    {
4328
4329       Parameter Name: DELEGATED-FROM
4330        Purpose: To specify the calendar users that have delegated their
4331        participation to the calendar user specified by the property.
4332        Format Definition: The property parameter is defined by the following
4333        notation:
4334        delfromparam = "DELEGATED-FROM" "=" DQUOTE cal-address DQUOTE
4335                      *("," DQUOTE cal-address DQUOTE)
4336        Description: This parameter can be specified on properties with a
4337        CAL-ADDRESS value type. This parameter can be specified on a property
4338        that has a value type of calendar address. This parameter specifies
4339        those calendar uses that have delegated their participation in a
4340        group scheduled event or to-do to the calendar user specified by the
4341        property. The value MUST be a MAILTO URI as defined in [RFC 1738].
4342        The individual calendar address parameter values MUST each be
4343        specified in a quoted-string.
4344        Example: ATTENDEE;DELEGATED-FROM="MAILTO:jsmith@host.com":MAILTO:
4345         jdoe@host.com
4346
4347        //ical.setDelegatedFrom(extractAttribute(iCalLine,ICalendarParser.DELETEGATEDFROM));
4348    }
4349    else if (iCalLine.startsWith("DELEGATED-TO") )
4350    {
4351
4352        Parameter Name: DELEGATED-TO
4353        Purpose: To specify the calendar users to whom the calendar user
4354                specified by the property has delegated participation.
4355        Format Definition: The property parameter is defined by the following
4356        notation: deltoparam = "DELEGATED-TO" "=" DQUOTE cal-address DQUOTE
4357                      *("," DQUOTE cal-address DQUOTE)
4358        Description: This parameter can be specified on properties with a
4359                    CAL-ADDRESS value type. This parameter specifies those calendar users
4360                    whom have been delegated participation in a group scheduled event or
4361                    to-do by the calendar user specified by the property. The value MUST
4362                    be a MAILTO URI as defined in [RFC 1738]. The individual calendar
4363                    address parameter values MUST each be specified in a quoted-string.
4364        Example: ATTENDEE;DELEGATED-TO="MAILTO:jdoe@host.com","MAILTO:jqpublic@
4365                    host.com":MAILTO:jsmith@host.com
4366            ical.setDelegatedTo(extractAttribute(iCalLine,ICalendarParser.DELEGATEDTO));
4367    }
4368
4369            4.2.6 Directory Entry Reference
4370                    Parameter Name: DIR
4371                    Purpose: To specify reference to a directory entry associated with
4372                            the calendar user specified by the property.
4373                    Format Definition: The property parameter is defined by the following notation
4374
4375                    dirparam = "DIR" "=" DQUOTE uri DQUOTE
4376                    Description: This parameter can be specified on properties with a
4377                                CAL-ADDRESS value type. The parameter specifies a reference to the
4378                                directory entry associated with the calendar user specified by the
4379                                property. The parameter value is a URI. The individual URI parameter
4380                                values MUST each be specified in a quoted-string.
4381                    Example: ORGANIZER;DIR="ldap://host.com:6666/o=eDABC%20Industries,c=3DUS??
4382                                  (cn=3DBJim%20Dolittle)":MAILTO:jimdo@host1.com
4383
4384
4385
4386            4.2.7 Inline Encoding
4387            Parameter Name: ENCODING
4388            Purpose: To specify an alternate inline encoding for the property value.
4389            Format Definition: The property parameter is defined by the following
4390                notation:
4391            encodingparam = "ENCODING" "="
4392                          ("8BIT" ; "8bit" text encoding is defined in [RFC 2045]
4393                                        / "BASE64"
4394                        ; "BASE64" binary encoding format is defined in [RFC 2045]
4395                                        / iana-token
4396                        ; Some other IANA registered ICalendar encoding type
4397                                        / x-name)
4398                        ; A non-standard, experimental encoding type
4399            Description: The property parameter identifies the inline encoding
4400                   used in a property value. The default encoding is "8BIT",
4401                   corresponding to a property value consisting of text. The "BASE64"
4402                   encoding type corresponds to a property value encoded using the
4403                   "BASE64" encoding defined in [RFC 2045].
4404            If the value type parameter is ";VALUE=BINARY", then the inline
4405                   encoding parameter MUST be specified with the value
4406                   ";ENCODING=BASE64".
4407            Example: ATTACH;FMTYPE=IMAGE/JPEG;ENCODING=BASE64;VALUE=BINARY:MIICajC
4408                      CAdOgAwIBAgICBEUwDQYJKoZIhvcNAQEEBQAwdzELMAkGA1UEBhMCVVMxLDA
4409                      qBgNVBAoTI05ldHNjYXBlIENvbW11bmljYXRpb25zIENvcnBvcmF0aW9uMRw
4410                      <...remainder of "BASE64" encoded binary data...>
4411
4412
4413        }
4414
4415
4416            4.2.8 Format Type
4417            Parameter Name: FMTTYPE
4418            Purpose: To specify the content type of a referenced object.
4419            Format Definition: The property parameter is defined by the following
4420            notation: fmttypeparam = "FMTTYPE" "=" iana-token
4421                                        ; A IANA registered content type
4422                                     / x-name
4423                                        ; A non-standard content type
4424            Description: This parameter can be specified on properties that are
4425                           used to reference an object. The parameter specifies the content type
4426                           of the referenced object. For example, on the "ATTACH" property, a
4427                           FTP type URI value does not, by itself, necessarily convey the type
4428                           of content associated with the resource. The parameter value MUST be
4429                           the TEXT for either an IANA registered content type or a non-standard
4430                           content type.
4431            Example: ATTACH;FMTTYPE=application/binary:ftp://domain.com/pub/docs/agenda.doc
4432
4433            4.2.9 Free/Busy Time Type
4434            Parameter Name: FBTYPE
4435            Purpose: To specify the free or busy time type.
4436            Format Definition: The property parameter is defined by the following
4437            notation: fbtypeparam = "FBTYPE" "=" ("FREE" / "BUSY"
4438                        / "BUSY-UNAVAILABLE" / "BUSY-TENTATIVE"
4439                        / x-name
4440                    ; Some experimental ICalendar data type.
4441                        / iana-token)
4442            *
4443            Description: The parameter specifies the free or busy time type. The
4444               value FREE indicates that the time interval is free for scheduling.
4445               The value BUSY indicates that the time interval is busy because one
4446               or more events have been scheduled for that interval. The value
4447               BUSY-UNAVAILABLE indicates that the time interval is busy and that
4448               the interval can not be scheduled. The value BUSY-TENTATIVE indicates
4449               that the time interval is busy because one or more events have been
4450               tentatively scheduled for that interval. If not specified on a
4451               property that allows this parameter, the default is BUSY.
4452            Example: The following is an example of this parameter on a FREEBUSY property.
4453            FREEBUSY;FBTYPE=BUSY:19980415T133000Z/19980415T170000Z
4454
4455        }
4456        else
4457                   if (iCalLine.startsWith("LANGUAGE") )
4458        {
4459
4460           4.2.10 Language
4461           Parameter Name: LANGUAGE
4462           Purpose: To specify the language for text values in a property or property parameter.
4463           Format Definition: The property parameter is defined by the following
4464           notation: languageparam = "LANGUAGE" "=" language
4465                language = <Text identifying a language, as defined in [RFC 1766]>
4466           Description: This parameter can be specified on properties with a
4467           text value type. The parameter identifies the language of the text in
4468           the property or property parameter value. The value of the "language"
4469           property parameter is that defined in [RFC 1766].
4470           For transport in a MIME entity, the Content-Language header field can
4471           be used to set the default language for the entire body part.
4472           Otherwise, no default language is assumed.
4473            Example: SUMMARY;LANGUAGE=us-EN:Company Holiday Party
4474                            LOCATION;LANGUAGE=en:Germany
4475                            LOCATION;LANGUAGE=no:Tyskland
4476
4477
4478        }
4479
4480                                 if (iCalLine.startsWith("MEMBER") )
4481        {
4482
4483            4.2.11 Group or List Membership
4484            Parameter Name: MEMBER
4485            Purpose: To specify the group or list membership of the calendar user
4486            specified by the property.
4487            Format Definition: The property parameter is defined by the following
4488            notation: memberparam = "MEMBER" "=" DQUOTE cal-address DQUOTE
4489                          *("," DQUOTE cal-address DQUOTE)
4490            Description: This parameter can be specified on properties with a
4491            CAL-ADDRESS value type. The parameter identifies the groups or list
4492            membership for the calendar user specified by the property. The
4493            parameter value either a single calendar address in a quoted-string
4494            or a COMMA character (US-ASCII decimal 44) list of calendar
4495            addresses, each in a quoted-string. The individual calendar address
4496            parameter values MUST each be specified in a quoted-string.
4497            Example: ATTENDEE;MEMBER="MAILTO:ietf-calsch@imc.org":MAILTO:jsmith@host.com
4498            ATTENDEE;MEMBER="MAILTO:projectA@host.com","MAILTO:projectB@host.com":MAILTO:janedoe@host.com
4499
4500        }
4501        else if (iCalLine.startsWith("PARTSTAT") )
4502        {
4503
4504            4.2.12 Participation Status
4505            Parameter Name: PARTSTAT
4506            Purpose: To specify the participation status for the calendar user
4507            specified by the property.
4508            Format Definition: The property parameter is defined by the following
4509            notation: partstatparam = "PARTSTAT" "="
4510                         ("NEEDS-ACTION" ; Event needs action
4511                        / "ACCEPTED" ; Event accepted
4512                        / "DECLINED" ; Event declined Dawson & Stenerson
4513                        / "TENTATIVE" ; Event tentatively
4514                                                ; accepted
4515                        / "DELEGATED" ; Event delegated
4516                        / x-name ; Experimental status
4517                        / iana-token) ; Other IANA registered
4518                                                ; status
4519             ; These are the participation statuses for a "VEVENT". Default is
4520             ; NEEDS-ACTION
4521            partstatparam /= "PARTSTAT" "="
4522                         ("NEEDS-ACTION" ; To-do needs action
4523                        / "ACCEPTED" ; To-do accepted
4524                        / "DECLINED" ; To-do declined
4525                        / "TENTATIVE" ; To-do tentatively
4526                                                ; accepted
4527                        / "DELEGATED" ; To-do delegated
4528                        / "COMPLETED" ; To-do completed.
4529                                                ; COMPLETED property has
4530                                                ;date/time completed.
4531                        / "IN-PROCESS" ; To-do in process of
4532                                                ; being completed
4533                        / x-name ; Experimental status
4534                        / iana-token) ; Other IANA registered
4535                                                ; status
4536             ; These are the participation statuses for a "VTODO". Default is
4537             ; NEEDS-ACTION partstatparam /= "PARTSTAT" "="
4538                         ("NEEDS-ACTION" ; Journal needs action
4539                        / "ACCEPTED" ; Journal accepted
4540                        / "DECLINED" ; Journal declined
4541                        / x-name ; Experimental status
4542                        / iana-token) ; Other IANA registered
4543                                                ; status
4544             ; These are the participation statuses for a "VJOURNAL". Default is
4545             ; NEEDS-ACTION
4546                Description: This parameter can be specified on properties with a
4547               CAL-ADDRESS value type. The parameter identifies the participation
4548               status for the calendar user specified by the property value. The
4549               parameter values differ depending on whether they are associated with
4550               a group scheduled "VEVENT", "VTODO" or "VJOURNAL". The values MUST
4551               match one of the values allowed for the given calendar component. If
4552               not specified on a property that allows this parameter, the default
4553               value is NEEDS-ACTION. Example: ATTENDEE;PARTSTAT=DECLINED:MAILTO:jsmith@host.com
4554
4555        }
4556        else
4557
4558        if (iCalLine.startsWith("RANGE") )
4559        {
4560
4561            4.2.13 Recurrence Identifier Range
4562            Parameter Name: RANGE
4563            Purpose: To specify the effective range of recurrence instances from
4564            the instance specified by the recurrence identifier specified by the
4565            property.
4566            Format Definition: The property parameter is defined by the following
4567            notation: rangeparam = "RANGE" "=" ("THISANDPRIOR"
4568                ; To specify all instances prior to the recurrence identifier
4569                            / "THISANDFUTURE")
4570                ; To specify the instance specified by the recurrence identifier
4571                ; and all subsequent recurrence instances
4572            Description: The parameter can be specified on a property that
4573            specifies a recurrence identifier. The parameter specifies the
4574            effective range of recurrence instances that is specified by the
4575            property. The effective range is from the recurrence identified
4576            specified by the property. If this parameter is not specified an
4577            allowed property, then the default range is the single instance
4578            specified by the recurrence identifier value of the property. The
4579            parameter value can be "THISANDPRIOR" to indicate a range defined by
4580            the recurrence identified value of the property and all prior
4581            instances. The parameter value can also be "THISANDFUTURE" to
4582            indicate a range defined by the recurrence identifier and all
4583            subsequent instances.
4584
4585            Example: RECURRENCE-ID;RANGE=THISANDPRIOR:19980401T133000Z
4586
4587
4588
4589            // TODO Should implement this
4590        }
4591        else if (iCalLine.startsWith("RELATED") )
4592        {
4593
4594            4.2.14 Alarm Trigger Relationship
4595            Parameter Name: RELATED
4596            Purpose: To specify the relationship of the alarm trigger with
4597            respect to the start or end of the calendar component.
4598            Format Definition: The property parameter is defined by the following
4599            notation: trigrelparam = "RELATED" "="
4600                             ("START" ; Trigger off of start
4601                            / "END") ; Trigger off of end Dawson & Stenerson
4602            Description: The parameter can be specified on properties that
4603               specify an alarm trigger with a DURATION value type. The parameter
4604               specifies whether the alarm will trigger relative to the start or end
4605               of the calendar component. The parameter value START will set the
4606               alarm to trigger off the start of the calendar component; the
4607               parameter value END will set the alarm to trigger off the end of the
4608               calendar component. If the parameter is not specified on an allowable
4609               property, then the default is START.
4610
4611            Example: TRIGGER;RELATED=END:PT5M
4612
4613        }
4614        else if (iCalLine.startsWith("RELTYPE") )
4615        {
4616
4617            4.2.15 Relationship Type
4618            Parameter Name: RELTYPE
4619            Purpose: To specify the type of hierarchical relationship associated
4620            with the calendar component specified by the property.
4621            Format Definition: The property parameter is defined by the following
4622            notation: reltypeparam = "RELTYPE" "="
4623                         ("PARENT" ; Parent relationship. Default.
4624                        / "CHILD" ; Child relationship
4625                        / "SIBLING ; Sibling relationship
4626                        / iana-token ; Some other IANA registered
4627                                        ; ICalendar relationship type
4628                        / x-name) ; A non-standard, experimental
4629                                        ; relationship type
4630            Description: This parameter can be specified on a property that
4631               references another related calendar. The parameter specifies the
4632               hierarchical relationship type of the calendar component referenced
4633               by the property. The parameter value can be PARENT, to indicate that
4634               the referenced calendar component is a superior of calendar
4635               component; CHILD to indicate that the referenced calendar component
4636               is a subordinate of the calendar component; SIBLING to indicate that
4637               the referenced calendar component is a peer of the calendar
4638               component. If this parameter is not specified on an allowable
4639               property, the default relationship type is PARENT.
4640            Example: RELATED-TO;RELTYPE=SIBLING:<19960401-080045-4000F192713@host.com>
4641
4642        }
4643        else if (iCalLine.startsWith("ROLE") )
4644        {
4645
4646            4.2.16 Participation Role
4647            Parameter Name: ROLE
4648            Purpose: To specify the participation role for the calendar user
4649            specified by the property.
4650            Format Definition: The property parameter is defined by the following
4651            notation: roleparam = "ROLE" "="
4652                 ("CHAIR" ; Indicates chair of the
4653                                        ; calendar entity
4654                / "REQ-PARTICIPANT" ; Indicates a participant whose
4655                                        ; participation is required
4656                / "OPT-PARTICIPANT" ; Indicates a participant whose
4657                                        ; participation is optional
4658                / "NON-PARTICIPANT" ; Indicates a participant who is
4659                                        ; copied for information
4660                                        ; purposes only
4661                / x-name ; Experimental role
4662                / iana-token) ; Other IANA role
4663            ; Default is REQ-PARTICIPANT
4664            Description: This parameter can be specified on properties with a
4665            CAL-ADDRESS value type. The parameter specifies the participation
4666            role for the calendar user specified by the property in the group
4667            schedule calendar component. If not specified on a property that
4668            allows this parameter, the default value is REQ-PARTICIPANT.
4669            Example: ATTENDEE;ROLE=CHAIR:MAILTO:mrbig@host.com
4670
4671        }
4672        else if (iCalLine.startsWith("RSVP") )
4673        {
4674
4675            4.2.17 RSVP Expectation
4676            Parameter Name: RSVP
4677            Purpose: To specify whether there is an expectation of a favor of a
4678            reply from the calendar user specified by the property value.
4679            Format Definition: The property parameter is defined by the following
4680            notation: rsvpparam = "RSVP" "=" ("TRUE" / "FALSE")
4681                ; Default is FALSE
4682            Description: This parameter can be specified on properties with a
4683               CAL-ADDRESS value type. The parameter identifies the expectation of a
4684               reply from the calendar user specified by the property value. This
4685               parameter is used by the "Organizer" to request a participation
4686               status reply from an "Attendee" of a group scheduled event or to-do.
4687               If not specified on a property that allows this parameter, the
4688                default value is FALSE.
4689            Example: ATTENDEE;RSVP=TRUE:MAILTO:jsmith@host.com
4690
4691
4692        }
4693        else if (iCalLine.startsWith("SENT-BY") )
4694        {
4695
4696            4.2.18 Sent By
4697            Parameter Name: SENT-BY
4698            Purpose: To specify the calendar user that is acting on behalf of the
4699            calendar user specified by the property.
4700            Format Definition: The property parameter is defined by the following
4701            notation: sentbyparam = "SENT-BY" "=" DQUOTE cal-address DQUOTE
4702            Description: This parameter can be specified on properties with a
4703           CAL-ADDRESS value type. The parameter specifies the calendar user
4704           that is acting on behalf of the calendar user specified by the
4705           property. The parameter value MUST be a MAILTO URI as defined in [RFC
4706           1738]. The individual calendar address parameter values MUST each be
4707           specified in a quoted-string.
4708            Example: ORGANIZER;SENT-BY:"MAILTO:sray@host.com":MAILTO:jsmith@host.com
4709
4710        }
4711        else if (iCalLine.startsWith("VALUE") )
4712        {
4713
4714            4.2.20 Value Data Types
4715            Parameter Name: VALUE
4716            Purpose: To explicitly specify the data type format for a property value.
4717            Format Definition: The "VALUE" property parameter is defined by the following
4718            notation: valuetypeparam = "VALUE" "=" valuetype valuetype = ("BINARY"
4719                / "BOOLEAN"
4720                / "CAL-ADDRESS"
4721                / "DATE"
4722                / "DATE-TIME"
4723                / "DURATION"
4724                / "FLOAT"
4725                / "INTEGER"
4726                / "PERIOD"
4727                / "RECUR"
4728                / "TEXT"
4729                / "TIME"
4730                / "URI"
4731                / "UTC-OFFSET"
4732                / x-name
4733                ; Some experimental ICalendar data type.
4734                / iana-token)
4735                ; Some other IANA registered ICalendar data type.
4736            Description: The parameter specifies the data type and format of the
4737               property value. The property values MUST be of a single value type.
4738               For example, a "RDATE" property cannot have a combination of DATE-
4739               TIME and TIME value types. If the property's value is the default value type, then this
4740               parameter need not be specified. However, if the property's default
4741               value type is overridden by some other allowable value type, then
4742               this parameter MUST be specified.
4743
4744        }
4745
4746
4747        else
4748
4749else if (iCalLine.startsWith("METHOD") )
4750        {
4751
4752            4.7.2 Method
4753
4754               Property Name: METHOD
4755
4756               Purpose: This property defines the ICalendar object method associated
4757               with the calendar object.
4758
4759               Value Type: TEXT
4760
4761               Property Parameters: Non-standard property parameters can be
4762               specified on this property.
4763
4764               Conformance: The property can be specified in an ICalendar object.
4765
4766               Description: When used in a MIME message entity, the value of this
4767               property MUST be the same as the Content-Type "method" parameter
4768               value. This property can only appear once within the ICalendar
4769               object. If either the "METHOD" property or the Content-Type "method"
4770               parameter is specified, then the other MUST also be specified.
4771
4772               No methods are defined by this specification. This is the subject of
4773               other specifications, such as the ICalendar Transport-independent
4774
4775               Interoperability Protocol (iTIP) defined by [ITIP].
4776
4777               If this property is not present in the ICalendar object, then a
4778               scheduling transaction MUST NOT be assumed. In such cases, the
4779               ICalendar object is merely being used to transport a snapshot of some
4780               calendar information; without the intention of conveying a scheduling
4781               semantic.
4782
4783               Format Definition: The property is defined by the following notation:
4784
4785                 method = "METHOD" metparam ":" metvalue CRLF
4786
4787                 metparam = *(";" xparam)
4788
4789                 metvalue = iana-token
4790
4791               Example: The following is a hypothetical example of this property to
4792               convey that the ICalendar object is a request for a meeting:
4793
4794                 METHOD:REQUEST
4795
4796        }
4797
4798       else if (iCalLine.startsWith("FREEBUSY") )
4799        {
4800
4801             4.8.2.6 Free/Busy Time
4802
4803               Property Name: FREEBUSY
4804
4805               Purpose: The property defines one or more free or busy time
4806               intervals.
4807
4808               Value Type: PERIOD. The date and time values MUST be in an UTC time
4809               format.
4810
4811               Property Parameters: Non-standard or free/busy time type property
4812               parameters can be specified on this property.
4813
4814               Conformance: The property can be specified in a "VFREEBUSY" calendar
4815               component.
4816
4817               Property Parameter: "FBTYPE" and non-standard parameters can be
4818               specified on this property.
4819
4820               Description: These time periods can be specified as either a start
4821               and end date-time or a start date-time and duration. The date and
4822               time MUST be a UTC time format.
4823
4824               "FREEBUSY" properties within the "VFREEBUSY" calendar component
4825               SHOULD be sorted in ascending order, based on start time and then end
4826               time, with the earliest periods first.
4827
4828               The "FREEBUSY" property can specify more than one value, separated by
4829               the COMMA character (US-ASCII decimal 44). In such cases, the
4830               "FREEBUSY" property values SHOULD all be of the same "FBTYPE"
4831               property parameter type (e.g., all values of a particular "FBTYPE"
4832               listed together in a single property).
4833
4834               Format Definition: The property is defined by the following notation:
4835
4836                 freebusy = "FREEBUSY" fbparam ":" fbvalue
4837                              CRLF
4838
4839                 fbparam = *(
4840                            ; the following is optional,
4841                            ; but MUST NOT occur more than once
4842
4843                            (";" fbtypeparam) /
4844
4845                            ; the following is optional,
4846                            ; and MAY occur more than once
4847
4848                            (";" xparam)
4849
4850                            )
4851
4852                 fbvalue = period *["," period]
4853                 ;Time value MUST be in the UTC time format.
4854
4855               Example: The following are some examples of this property:
4856
4857                 FREEBUSY;FBTYPE=BUSY-UNAVAILABLE:19970308T160000Z/PT8H30M
4858
4859                 FREEBUSY;FBTYPE=FREE:19970308T160000Z/PT3H,19970308T200000Z/PT1H
4860
4861                 FREEBUSY;FBTYPE=FREE:19970308T160000Z/PT3H,19970308T200000Z/PT1H,
4862                  19970308T230000Z/19970309T000000Z
4863
4864
4865        }
4866
4867        else if (iCalLine.startsWith("EXRULE") )
4868        {
4869
4870            4.8.5.2 Exception Rule
4871
4872               Property Name: EXRULE
4873
4874               Purpose: This property defines a rule or repeating pattern for an
4875               exception to a recurrence set.
4876
4877               Value Type: RECUR
4878
4879               Property Parameters: Non-standard property parameters can be
4880               specified on this property.
4881
4882               Conformance: This property can be specified in "VEVENT", "VTODO" or
4883               "VJOURNAL" calendar components.
4884
4885               Description: The exception rule, if specified, is used in computing
4886               the recurrence set. The recurrence set is the complete set of
4887               recurrence instances for a calendar component. The recurrence set is
4888               generated by considering the initial "DTSTART" property along with
4889               the "RRULE", "RDATE", "EXDATE" and "EXRULE" properties contained
4890               within the ICalendar object. The "DTSTART" defines the first instance
4891               in the recurrence set. Multiple instances of the "RRULE" and "EXRULE"
4892               properties can also be specified to define more sophisticated
4893               recurrence sets. The final recurrence set is generated by gathering
4894               all of the start date-times generated by any of the specified "RRULE"
4895               and "RDATE" properties, and excluding any start date and times which
4896               fall within the union of start date and times generated by any
4897               specified "EXRULE" and "EXDATE" properties. This implies that start
4898               date and times within exclusion related properties (i.e., "EXDATE"
4899               and "EXRULE") take precedence over those specified by inclusion
4900               properties (i.e., "RDATE" and "RRULE"). Where duplicate instances are
4901               generated by the "RRULE" and "RDATE" properties, only one recurrence
4902               is considered. Duplicate instances are ignored.
4903
4904               The "EXRULE" property can be used to exclude the value specified in
4905               "DTSTART". However, in such cases the original "DTSTART" date MUST
4906               still be maintained by the calendaring and scheduling system because
4907               the original "DTSTART" value has inherent usage dependencies by other
4908               properties such as the "RECURRENCE-ID".
4909
4910               Format Definition: The property is defined by the following notation:
4911
4912                 exrule = "EXRULE" exrparam ":" recur CRLF
4913
4914                 exrparam = *(";" xparam)
4915
4916               Example: The following are examples of this property. Except every
4917               other week, on Tuesday and Thursday for 4 occurrences:
4918
4919                 EXRULE:FREQ=WEEKLY;COUNT=4;INTERVAL=2;BYDAY=TU,TH
4920
4921               Except daily for 10 occurrences:
4922
4923                 EXRULE:FREQ=DAILY;COUNT=10
4924
4925               Except yearly in June and July for 8 occurrences:
4926
4927                 EXRULE:FREQ=YEARLY;COUNT=8;BYMONTH=6,7
4928
4929
4930        }
4931        else if (iCalLine.startsWith("RDATE") )
4932        {
4933
4934            4.8.5.3 Recurrence Date/Times
4935
4936               Property Name: RDATE
4937
4938               Purpose: This property defines the list of date/times for a
4939               recurrence set.
4940
4941               Value Type: The default value type for this property is DATE-TIME.
4942               The value type can be set to DATE or PERIOD.
4943
4944               Property Parameters: Non-standard, value data type and time zone
4945               identifier property parameters can be specified on this property.
4946
4947               Conformance: The property can be specified in "VEVENT", "VTODO",
4948               "VJOURNAL" or "VTIMEZONE" calendar components.
4949
4950               Description: This property can appear along with the "RRULE" property
4951               to define an aggregate set of repeating occurrences. When they both
4952               appear in an ICalendar object, the recurring events are defined by
4953               the union of occurrences defined by both the "RDATE" and "RRULE".
4954
4955               The recurrence dates, if specified, are used in computing the
4956               recurrence set. The recurrence set is the complete set of recurrence
4957               instances for a calendar component. The recurrence set is generated
4958               by considering the initial "DTSTART" property along with the "RRULE",
4959               "RDATE", "EXDATE" and "EXRULE" properties contained within the
4960               ICalendar object. The "DTSTART" property defines the first instance
4961               in the recurrence set. Multiple instances of the "RRULE" and "EXRULE"
4962               properties can also be specified to define more sophisticated
4963               recurrence sets. The final recurrence set is generated by gathering
4964               all of the start date/times generated by any of the specified "RRULE"
4965               and "RDATE" properties, and excluding any start date/times which fall
4966               within the union of start date/times generated by any specified
4967               "EXRULE" and "EXDATE" properties. This implies that start date/times
4968               within exclusion related properties (i.e., "EXDATE" and "EXRULE")
4969               take precedence over those specified by inclusion properties (i.e.,
4970               "RDATE" and "RRULE"). Where duplicate instances are generated by the
4971               "RRULE" and "RDATE" properties, only one recurrence is considered.
4972               Duplicate instances are ignored.
4973
4974               Format Definition: The property is defined by the following notation:
4975
4976                 rdate = "RDATE" rdtparam ":" rdtval *("," rdtval) CRLF
4977
4978                 rdtparam = *(
4979
4980                            ; the following are optional,
4981                            ; but MUST NOT occur more than once
4982
4983                            (";" "VALUE" "=" ("DATE-TIME" / "DATE" / "PERIOD")) /
4984                            (";" tzidparam) /
4985
4986                            ; the following is optional,
4987                            ; and MAY occur more than once
4988
4989                            (";" xparam)
4990
4991                            )
4992
4993                 rdtval = date-time / date / period
4994                 ;Value MUST match value type
4995
4996               Example: The following are examples of this property:
4997
4998                 RDATE:19970714T123000Z
4999
5000                 RDATE;TZID=US-EASTERN:19970714T083000
5001
5002                 RDATE;VALUE=PERIOD:19960403T020000Z/19960403T040000Z,
5003                  19960404T010000Z/PT3H
5004
5005                 RDATE;VALUE=DATE:19970101,19970120,19970217,19970421
5006                  19970526,19970704,19970901,19971014,19971128,19971129,19971225
5007
5008
5009        }
5010                      else if (iCalLine.startsWith("ACTION") )
5011        {
5012
5013            4.8.6 Alarm Component Properties
5014
5015               The following properties specify alarm information in calendar
5016               components.
5017
5018            4.8.6.1 Action
5019
5020               Property Name: ACTION
5021
5022               Purpose: This property defines the action to be invoked when an alarm
5023               is triggered.
5024
5025               Value Type: TEXT
5026
5027               Property Parameters: Non-standard property parameters can be
5028               specified on this property.
5029
5030               Conformance: This property MUST be specified once in a "VALARM"
5031               calendar component.
5032
5033               Description: Each "VALARM" calendar component has a particular type
5034               of action associated with it. This property specifies the type of
5035               action
5036
5037               Format Definition: The property is defined by the following notation:
5038
5039                 action = "ACTION" actionparam ":" actionvalue CRLF
5040
5041                 actionparam = *(";" xparam)
5042
5043                 actionvalue = "AUDIO" / "DISPLAY" / "EMAIL" / "PROCEDURE"
5044                                    / iana-token / x-name
5045
5046               Example: The following are examples of this property in a "VALARM"
5047               calendar component:
5048
5049                 ACTION:AUDIO
5050
5051                 ACTION:DISPLAY
5052
5053                 ACTION:PROCEDURE
5054
5055        }
5056
5057                else if (iCalLine.startsWith("REPEAT") )
5058        {
5059
5060            4.8.6.2 Repeat Count
5061
5062               Property Name: REPEAT
5063
5064               Purpose: This property defines the number of time the alarm should be
5065               repeated, after the initial trigger.
5066
5067               Value Type: INTEGER
5068
5069               Property Parameters: Non-standard property parameters can be
5070               specified on this property.
5071
5072               Conformance: This property can be specified in a "VALARM" calendar
5073               component.
5074
5075               Description: If the alarm triggers more than once, then this property
5076               MUST be specified along with the "DURATION" property.
5077
5078               Format Definition: The property is defined by the following notation:
5079
5080                 repeatcnt = "REPEAT" repparam ":" integer CRLF
5081                 ;Default is "0", zero.
5082
5083                 repparam = *(";" xparam)
5084
5085               Example: The following is an example of this property for an alarm
5086               that repeats 4 additional times with a 5 minute delay after the
5087               initial triggering of the alarm:
5088
5089                 REPEAT:4
5090                 DURATION:PT5M
5091
5092
5093        }
5094        else if (iCalLine.startsWith("TRIGGER") )
5095        {
5096
5097                4.8.6.3 Trigger
5098
5099                   Property Name: TRIGGER
5100
5101                   Purpose: This property specifies when an alarm will trigger.
5102
5103                   Value Type: The default value type is DURATION. The value type can be
5104                   set to a DATE-TIME value type, in which case the value MUST specify a
5105                   UTC formatted DATE-TIME value.
5106
5107                   Property Parameters: Non-standard, value data type, time zone
5108                   identifier or trigger relationship property parameters can be
5109                   specified on this property. The trigger relationship property
5110                   parameter MUST only be specified when the value type is DURATION.
5111
5112                   Conformance: This property MUST be specified in the "VALARM" calendar
5113                   component.
5114
5115                   Description: Within the "VALARM" calendar component, this property
5116                   defines when the alarm will trigger. The default value type is
5117                   DURATION, specifying a relative time for the trigger of the alarm.
5118                   The default duration is relative to the start of an event or to-do
5119                   that the alarm is associated with. The duration can be explicitly set
5120                   to trigger from either the end or the start of the associated event
5121                   or to-do with the "RELATED" parameter. A value of START will set the
5122                   alarm to trigger off the start of the associated event or to-do. A
5123                   value of END will set the alarm to trigger off the end of the
5124                   associated event or to-do.
5125
5126                   Either a positive or negative duration may be specified for the
5127                   "TRIGGER" property. An alarm with a positive duration is triggered
5128                   after the associated start or end of the event or to-do. An alarm
5129                   with a negative duration is triggered before the associated start or
5130                   end of the event or to-do.
5131
5132                   The "RELATED" property parameter is not valid if the value type of
5133                   the property is set to DATE-TIME (i.e., for an absolute date and time
5134                   alarm trigger). If a value type of DATE-TIME is specified, then the
5135                   property value MUST be specified in the UTC time format. If an
5136                   absolute trigger is specified on an alarm for a recurring event or
5137                   to-do, then the alarm will only trigger for the specified absolute
5138                   date/time, along with any specified repeating instances.
5139
5140                   If the trigger is set relative to START, then the "DTSTART" property
5141                   MUST be present in the associated "VEVENT" or "VTODO" calendar
5142                   component. If an alarm is specified for an event with the trigger set
5143                   relative to the END, then the "DTEND" property or the "DSTART" and
5144                   "DURATION' properties MUST be present in the associated "VEVENT"
5145                   calendar component. If the alarm is specified for a to-do with a
5146                   trigger set relative to the END, then either the "DUE" property or
5147                   the "DSTART" and "DURATION' properties MUST be present in the
5148                   associated "VTODO" calendar component.
5149
5150                   Alarms specified in an event or to-do which is defined in terms of a
5151                   DATE value type will be triggered relative to 00:00:00 UTC on the
5152                   specified date. For example, if "DTSTART:19980205, then the duration
5153                   trigger will be relative to19980205T000000Z.
5154
5155                   Format Definition: The property is defined by the following notation:
5156
5157                     trigger = "TRIGGER" (trigrel / trigabs)
5158
5159                     trigrel = *(
5160
5161                                ; the following are optional,
5162                                ; but MUST NOT occur more than once
5163
5164                                  (";" "VALUE" "=" "DURATION") /
5165                                  (";" trigrelparam) /
5166
5167                                ; the following is optional,
5168                                ; and MAY occur more than once
5169
5170                                  (";" xparam)
5171                                  ) ":" dur-value
5172
5173                     trigabs = 1*(
5174
5175                                ; the following is REQUIRED,
5176                                ; but MUST NOT occur more than once
5177
5178                                  (";" "VALUE" "=" "DATE-TIME") /
5179
5180                                ; the following is optional,
5181                                ; and MAY occur more than once
5182
5183                                  (";" xparam)
5184
5185                                  ) ":" date-time
5186
5187                   Example: A trigger set 15 minutes prior to the start of the event or
5188                   to-do.
5189
5190                     TRIGGER:-P15M
5191
5192                   A trigger set 5 minutes after the end of the event or to-do.
5193
5194                     TRIGGER;RELATED=END:P5M
5195
5196                   A trigger set to an absolute date/time.
5197
5198                     TRIGGER;VALUE=DATE-TIME:19980101T050000Z
5199
5200        }
5201
5202
5203    */

5204
5205}
5206
Popular Tags