Skip to content

Property Reference

Mike Angstadt edited this page Jun 24, 2017 · 2 revisions

ACTION

Defines the type of action to invoke when an alarm is triggered.

Definition:

RFC 5545 p.132-3

Java class:

Action

Examples:

//creating a new ACTION property
Action action = Action.audio();

if (action.isAudio()) {
  //it's an "AUDIO" alarm
}

ATTACH

Represents a binary resource that is associated with an event, to-do task, journal entry, or alarm.

Definition:

RFC 5545 p.80-1

Java class:

Attachment

Examples:

//from a byte array
byte[] data = ...
Attachment attach = new Attachment("image/png", data);

//reading from a file
Attachment attach = new Attachment("image/png", new File("image.png"));

//referencing a URL
Attachment attach = new Attachment("image/png", "http://example.com/image.png");

ATTENDEE

Defines an attendee (such as a person attending an event). This property has different meanings depending on the component that it belongs to:

  • VALARM (with "EMAIL" action) - An email address that is to receive the alarm.
  • All others - An attendee of the event.
Definition:

RFC 5545 p.107-9

Java class:

Attendee

Examples:

Attendee attendee = Attendee.email("[email protected]");
attendee.setCommonName("John Doe");
attendee.setRsvp(true);
attendee.setRole(Role.CHAIR);
attendee.setParticipationStatus(ParticipationStatus.ACCEPTED);

CALSCALE

Specifies the calendar system that this iCalendar object uses. If none is specified, then the calendar is assumed to be in "gregorian" format.

Definition:

RFC 5545 p.76-7

Java class:

CalendarScale

Examples:

//creating a new property
CalendarScale calscale = CalendarScale.gregorian();

if (calscale.isGregorian()) {
  //its value is "GREGORIAN"
}

CATEGORIES

Defines a list of "tags" or "keywords" that describe the component.

Definition:

RFC 5545 p.81-2

Java class:

Categories

Examples:

//creating a new property (multi-valued)
Categories categories = new Categories("conference", "meeting");

CLASS

Defines the level of sensitivity of the iCalendar data. If not specified, the data should be considered "public".

Definition:

RFC 5545 p.82-3

Java class:

Classification

Examples:

//creating a new property
Classification classification = Classification.public_();

if (classification.isPublic()) {
  //its value is "PUBLIC"
}

COMMENT

Defines a free-text comment.

Definition:

RFC 5545 p.83-4

Java class:

Comment

Examples:

Comment comment = new Comment("Free text");

COMPLETED

Defines the date and time that a to-do task was completed.

Definition:

RFC 5545 p.94-5

Java class:

Completed

Examples:

Date datetime = ...
Completed completed = new Completed(datetime);

CONTACT

Defines contact information for a person or other entity (for example, the name of a business and its phone number).

Definition:

RFC 5545 p.109-11

Java class:

Contact

Examples:

Contact contact = new Contact("Acme Co: (212) 555-1234");

CREATED

Defines the date and time that the calendar information was initially created.

Definition:

RFC 5545 p.136

Java class:

Created

Examples:

Date datetime = ...
Created created = new Created(datetime);

DTEND

Defines the date that an event or free/busy component ends.

Definition:

RFC 5545 p.95-6

Java class:

DateEnd

Examples:

//date and time
Date datetime = ...
DateEnd dtend = new DateEnd(datetime);

//date
Date date = ...
DateEnd dtend = new DateEnd(date, false);

//with timezone
Date datetime = ...
DateEnd dtend = new DateEnd(datetime);
dtend.setTimezoneId("America/New_York");

DTSTART

Defines the date that an event, free/busy component, or timezone component starts.

Definition:

RFC 5545 p.97-8

Java class:

DateStart

Examples:

//date and time
Date datetime = ...
DateStart dtstart = new DateStart(datetime);

//date
Date date = ...
DateStart dtstart = new DateStart(date, false);

//with timezone
Date datetime = ...
DateStart dtstart = new DateStart(datetime);
dtstart.setTimezoneId("America/New_York");

//local date and time (no timezone)
Date datetime = ...
DateStart dtstart = new DateStart(datetime);
dtstart.setLocalTime(true);

DTSTAMP

The meaning of this property varies depending on the state of the iCalendar object:

  • If a METHOD property exists: Defines the creation date of the iCalendar object (not the creation date of the actual calendar data). Use the CREATED property to define the date that the calendar data was last created.
  • Otherwise - Defines the date that the calendar data was last modified (the LAST-MODIFIED property also holds this information).
Definition:

RFC 5545 p.137-8

Java class:

DateTimeStamp

Examples:

Date datetime = ...
DateTimeStamp created = new DateTimeStamp(datetime);

DESCRIPTION

A detailed description of the component that this property belongs to. The description should be a more detailed version of the text provided by the SUMMARY property.

Definition:

RFC 5545 p.84-5

Java class:

Description

Examples:

Description description = new Description("description text");

DUE

Defines the date that a to-do task is due by.

Definition:

RFC 5545 p.96-7

Java class:

DateDue

Examples:

//date and time
Date datetime = ...
DateDue due = new DateDue(datetime);

//date
Date date = ...
DateDue due = new DateDue(date, false);

//with timezone
Date datetime = ...
DateStart due = new DateStart(datetime);
due.setTimezoneId("America/New_York");

DURATION

Defines a duration of time (for example, "2 hours and 30 minutes"). It has different meanings depending on the component it belongs to:

  • VEVENT - The duration of the event (used in place of a DTEND property).
  • VTODO - The duration of the to-do task (used in place of a DTEND property).
  • VALARM - The pause between alarm repetitions.
Definition:

RFC 5545 p.99

Java class:

DurationProperty

Examples:

Duration duration = new Duration.Builder().hours(2).minutes(30).build();
DurationProperty prop = new DurationProperty(duration);

EXDATE

Defines a list of exceptions to the recurrence rule defined in a component.

Definition:

RFC 5545 p.118-20

Java class:

ExceptionDates

Examples:

//date and times
ExceptionDates exdate = new ExceptionDates(true);
Date datetime1 = ...;
exdate.addValue(datetime1);
Date datetime2 = ...;
exdate.addValue(datetime2);

//dates
ExceptionDates exdate = new ExceptionDates(false);
Date date1 = ...;
exdate.addValue(date1);
Date date2 = ...;
exdate.addValue(date2);

EXRULE

Defines an exception to the RRULE property. Note that EXRULE has been removed from latest iCal specification. Its use should be avoided.

Definition:

RFC 2445 p.114-5

Java class:

ExceptionRule

Examples:

Recurrence recur = new Recurrence.Builder(Frequency.DAILY).count(1).build();
ExceptionRule exrule = new ExceptionRule(recur);

FREEBUSY

Defines a person's availability over certain time periods (for example, "busy" between 1pm-3pm and 4pm-5pm). Note that this property can contain multiple time periods, but only one availability type may be defined (e.g. "busy" or "free").

Definition:

RFC 5545 p.100-1

Java class:

FreeBusy

Examples:

FreeBusy freebusy = new FreeBusy();
freebusy.setType(FreeBusyType.BUSY);

Date onePM = ...
Date threePM = ...
freebusy.addValue(onePM, threePM);

Date fourPM = ...
Duration oneHour = new Duration.Builder().hours(1).build();
freeBusy.addValue(fourPM, oneHour);

GEO

Defines a set of geographical coordinates.

Definition:

RFC 5545 p.85-7

Java class:

Geo

Examples:

Geo geo = new Geo(40.714623, -74.006605);

LAST-MODIFIED

Defines the date and time that the calendar data in a component was last changed.

Definition:

RFC 5545 p.138

Java class:

LastModified

Examples:

Date datetime = ...
LastModified lastModified = new LastModified(datetime);

LOCATION

Defines the physical location of an event.

Definition:

RFC 5545 p.87-8

Java class:

Location

Examples:

Location location = new Location("Room 32B");

METHOD

Specifies the value of the Content-Type "method" parameter if the iCalendar object is defined as a MIME message entity.

Definition:

RFC 5545 p.77-8

Java class:

Method

Examples:

Method method = new Method("value");

ORGANIZER

Defines an organizer. This property has different meanings depending on the component it belongs to:

  • VEVENT - The organizer of the event
  • VTODO - The creator of the to-do task.
  • VJOURNAL - The owner of the journal entry.
  • VFREEBUSY - The person requesting the free/busy time
Definition:

RFC 5545 p.111-2

Java class:

Organizer

Examples:

Organizer organizer = Organizer.email("[email protected]");
organizer.setCommonName("John Doe");

PERCENT-COMPLETE

Defines a to-do task's level of completion.

Definition:

RFC 5545 p.88-9

Java class:

PercentComplete

Examples:

PercentComplete percentComplete = new PercentComplete(50); //50%

VTodo todo = new VTodo();
todo.setPercentComplete(50);

PRIORITY

Defines the priority of an event or to-do task.

Definition:

RFC 5545 p.89-90

Java class:

Priority

Examples:

//highest
Priority priority = new Priority(1);

//lowest
Priority priority = new Priority(9);

VTodo todo = new VTodo();
todo.setPriority(1);

PRODID

Identifies the application that created the iCalendar object.

Definition:

RFC 5545 p.78-9

Java class:

ProductId

Examples:

ProductId prodid = new ProductId("-//Company//Application Name//EN");

ICalendar ical = new ICalendar();
ical.setProductId("-//Company//Application Name//EN");

RDATE

Defines a list of dates or periods that help define a recurrence rule. It must contain either dates or time periods. It cannot contain a combination of both.

Definition:

RFC 5545 p.120-2

Java class:

RecurrenceDates

Examples:

//date-time values
Date datetime1 = ...
Date datetime2 = ...
List<Date> datetimes = Arrays.asList(datetime1, datetime2);
RecurrenceDates prop = new RecurrenceDates(datetimes, true);

//date values
Date date1 = ...
Date date2 = ...
List<Date> dates = Arrays.asList(date1, date2);
RecurrenceDates prop = new RecurrenceDates(dates, false);

//periods
Period period1 = ...
Period period2 = ...
List<Period> periods = Arrays.asList(period1, period2);
RecurrenceDates prop = new RecurrenceDates(periods, true);

RECURRENCE-ID

Records the original value of the DTSTART property if a recurrence instance has been modified. Used in conjunction with the UID and SEQUENCE properties to uniquely identify a recurrence instance.

Definition:

RFC 5545 p.112-4

Java class:

RecurrenceId

Examples:

//date-time value
Date datetime = ...
RecurrenceId recurrenceId = new RecurrenceId(datetime);

//date value
Date date = ...
RecurrenceId recurrenceId = new RecurrenceId(date, false);

RELATED-TO

Defines a relationship between the component that this property belongs to and another component.

Definition:

RFC 5545 p.115-6

Java class:

RelatedTo

Examples:

RelatedTo relatedTo = new RelatedTo("uid-value");

REPEAT

Defines the number of times an alarm should be repeated after its initial trigger. Used in conjunction with DURATION, which defines the length of the pause between repeats.

Definition:

RFC 5545 p.133

Java class:

Repeat

Examples:

//repeat 5 more times after the first time
Repeat relatedTo = new Repeat(5);

VAlarm alarm = ...;
alarm.setRepeat(5);

REQUEST-STATUS

Represents a response to a scheduling request, describing whether the request was successfully processed or not.

Each property instance has a status code. The following status code families are defined:

  • 1.x - The request has been received, but is still being processed.
  • 2.x - The request was processed successfully.
  • 3.x - There is a client-side problem with the request (such as some incorrect syntax).
  • 4.x - A server-side error occurred.
Definition:

RFC 5545 p.141-3

Java class:

RequestStatus

Examples:

RequestStatus requestStatus = new RequestStatus("2.0");
requestStatus.setDescription("Success");

RESOURCES

Defines a list of resources that are needed for an event or to-do task (for example a projector or DVD player).

Definition:

RFC 5545 p.91

Java class:

Resources

Examples:

Resources resources = new Resources("projector", "DVD player");

RRULE

Defines how often a component repeats.

Definition:

RFC 5545 p.122-32

Java class:

RecurrenceRule

Examples:

//"bi-weekly"
Recurrence recur = new Recurrence.Builder(Frequency.WEEKLY).interval(2).build();
RecurrenceRule rrule = new RecurrenceRule(recur);

SEQUENCE

Defines a revision number for an event, to-do task, or journal entry. This number can be incremented every time a significant change is made to the component.

Definition:

RFC 5545 p.138-9

Java class:

Sequence

Examples:

Sequence sequence = new Sequence(2);

VEvent event = ...
event.setSequence(2);

STATUS

Defines the status of the component that this property belongs to, such as a to-do task being in a "completed" state.

Definition:

RFC 5545 p.92-3

Java class:

Status

Examples:

//creating a new property
Status status = Status.completed();

if (status.isCompleted()) {
  //its value is "COMPLETED"
}

SUMMARY

Defines a short, one line summary of the component that this property belongs to. The summary should be a more concise version of the text provided by the DESCRIPTION property.

Definition:

RFC 5545 p.93-4

Java class:

Summary

Examples:

Summary summary = new Summary("summary text");

VEvent event = ...;
event.setSummary("summary text");

TRANSP

Defines whether an event is visible to free/busy time searches. If an event does not have this property, the event should be considered visible ("opaque").

Definition:

RFC 5545 p.101-2

Java class:

Transparency

Examples:

//creating a new property
Transparency transp = Transparency.opaque();

if (transp.isOpaque()) {
  //its value is "OPAQUE"
}

//usage in a VEVENT component
VEvent event = ...
event.setTransparency(true); //hidden from searches ("TRANSPARENT")
event.setTransparency(false); //visible to searches ("OPAQUE")

TRIGGER

Defines when an alarm will be triggered.

Definition:

RFC 5545 p.133-6

Java class:

Trigger

Examples:

//15 minutes before the start time
Duration duration = new Duration.Builder().prior(true).minutes(15).build();
Trigger trigger = new Trigger(duration, Related.START);
VAlarm alarm = VAlarm.display(trigger, "Meeting in 15 minutes");

TZID

Defines a unique identifier for a VTIMEZONE component. The identifier must be unique within the scope of the iCalendar object.

Date-time properties that support timezones (such as DTSTART) can format their date-time values according to the rules defined in the VTIMEZONE component, and then use this ID to reference the component by assigning the ID to a TZID parameter.

All properties that support timezones will have get/setTimezoneId() methods. If a property has no timezone assigned to it, it is written in UTC.

Definition:

RFC 5545 p.102-3

Java class:

TimezoneId

Examples:

VTimezone timezone = new VTimezone("Eastern");

Date start = ...;
DateStart dtstart = new DateStart(start);
dtStart.setTimezoneId("Eastern");

TZNAME

Defines a traditional, non-standard name for a timezone observance (for example, "Eastern Standard Time" for standard time on the US east coast).

Definition:

RFC 5545 p.103-4

Java class:

TimezoneName

Examples:

//creating a new property
TimezoneName tzname = new TimezoneName("Eastern Standard Time");

//usage in a VTIMEZONE component
VTimezone timezone = new VTimezone("East Coast");

StandardTime standard = new StandardTime();
standard.setTimezoneName("Eastern Standard Time");
...
timezone.addStandardTime(standard);

TZOFFSETFROM

Defines the timezone offset that was in use before a timezone observance.

Definition:

RFC 5545 p.104-5

Java class:

TimezoneOffsetFrom

Examples:

//creating a new property
TimezoneOffsetFrom tzname = new TimezoneOffsetFrom(-5, 0);

//usage in a VTIMEZONE component
VTimezone timezone = ...
StandardTime standard = new StandardTime();
standard.setTimezoneOffsetFrom(-5, 0);
...
timezone.addStandardTime(standard);

TZOFFSETTO

Defines the timezone offset that is currently in use in a timezone observance.

Definition:

RFC 5545 p.105-6

Java class:

TimezoneOffsetTo

Examples:

//creating a new property
TimezoneOffsetTo tzname = new TimezoneOffsetTo(-4, 0);

//usage in a VTIMEZONE component
VTimezone timezone = ...
StandardTime standard = new StandardTime();
standard.setTimezoneOffsetTo(-4, 0);
...
timezone.addStandardTime(standard);

TZURL

Defines a URL that points to an iCalendar object that contains further information on a timezone.

Definition:

RFC 5545 p.106

Java class:

TimezoneUrl

Examples:

//creating a new property
TimezoneUrl tzurl = new TimezoneUrl("http://example.com/tz.ics");

//usage in a VTIMEZONE component
VTimezone timezone = ...
timezone.getTimezoneUrl("http://example.com/tz.ics");

UID

Defines a unique identifier for a component.

Definition:

RFC 5545 p.117-8

Java class:

Uid

Examples:

Uid uid = new Uid("....");

//random UID
Uid uid = Uid.random();

URL

Points to a resource that contains additional information about a component.

Definition:

RFC 5545 p.116-7

Java class:

Url

Examples:

Url url = new Url("http://example.com");

VERSION

Specifies the min/max versions a consumer must support in order to successfully parse the iCalendar object.

Definition:

RFC 5545 p.79-80

Java class:

Version

Examples:

//the default iCal version
Version version = Version.v2_0();

if (verison.isV2_0()) {
  //version is "2.0"
}

XML

Used for storing properties parsed from xCal documents whose XML namespaces are not part of the xCal XML namespace.

Definition:

RFC 6321 p.17-8

Java class:

Xml

Examples:

//creating a new property
Xml xml = new Xml("<company xmlns=\"http://example.com\"><ceo>John Doe</ceo><name>Acme Co</name></company>");

//getting the parsed DOM
org.w3c.dom.Document document = xml.getValue();
Clone this wiki locally