-
Notifications
You must be signed in to change notification settings - Fork 44
Property Reference
Defines the type of action to invoke when an alarm is triggered.
Definition: | |
Java class: |
Examples:
//creating a new ACTION property
Action action = Action.audio();
if (action.isAudio()) {
//it's an "AUDIO" alarm
}
Represents a binary resource that is associated with an event, to-do task, journal entry, or alarm.
Definition: | |
Java class: |
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");
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: | |
Java class: |
Examples:
Attendee attendee = Attendee.email("[email protected]");
attendee.setCommonName("John Doe");
attendee.setRsvp(true);
attendee.setRole(Role.CHAIR);
attendee.setParticipationStatus(ParticipationStatus.ACCEPTED);
Specifies the calendar system that this iCalendar object uses. If none is specified, then the calendar is assumed to be in "gregorian" format.
Definition: | |
Java class: |
Examples:
//creating a new property
CalendarScale calscale = CalendarScale.gregorian();
if (calscale.isGregorian()) {
//its value is "GREGORIAN"
}
Defines a list of "tags" or "keywords" that describe the component.
Definition: | |
Java class: |
Examples:
//creating a new property (multi-valued)
Categories categories = new Categories("conference", "meeting");
Defines the level of sensitivity of the iCalendar data. If not specified, the data should be considered "public".
Definition: | |
Java class: |
Examples:
//creating a new property
Classification classification = Classification.public_();
if (classification.isPublic()) {
//its value is "PUBLIC"
}
Defines a free-text comment.
Definition: | |
Java class: |
Examples:
Comment comment = new Comment("Free text");
Defines the date and time that a to-do task was completed.
Definition: | |
Java class: |
Examples:
Date datetime = ...
Completed completed = new Completed(datetime);
Defines contact information for a person or other entity (for example, the name of a business and its phone number).
Definition: | |
Java class: |
Examples:
Contact contact = new Contact("Acme Co: (212) 555-1234");
Defines the date and time that the calendar information was initially created.
Definition: | |
Java class: |
Examples:
Date datetime = ...
Created created = new Created(datetime);
Defines the date that an event or free/busy component ends.
Definition: | |
Java class: |
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");
Defines the date that an event, free/busy component, or timezone component starts.
Definition: | |
Java class: |
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);
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: | |
Java class: |
Examples:
Date datetime = ...
DateTimeStamp created = new DateTimeStamp(datetime);
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: | |
Java class: |
Examples:
Description description = new Description("description text");
Defines the date that a to-do task is due by.
Definition: | |
Java class: |
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");
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: | |
Java class: |
Examples:
Duration duration = new Duration.Builder().hours(2).minutes(30).build();
DurationProperty prop = new DurationProperty(duration);
Defines a list of exceptions to the recurrence rule defined in a component.
Definition: | |
Java class: |
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);
Defines an exception to the RRULE
property. Note that EXRULE
has been removed from latest iCal specification. Its use should be avoided.
Definition: | |
Java class: |
Examples:
Recurrence recur = new Recurrence.Builder(Frequency.DAILY).count(1).build();
ExceptionRule exrule = new ExceptionRule(recur);
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: | |
Java class: |
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);
Defines a set of geographical coordinates.
Definition: | |
Java class: |
Examples:
Geo geo = new Geo(40.714623, -74.006605);
Defines the date and time that the calendar data in a component was last changed.
Definition: | |
Java class: |
Examples:
Date datetime = ...
LastModified lastModified = new LastModified(datetime);
Defines the physical location of an event.
Definition: | |
Java class: |
Examples:
Location location = new Location("Room 32B");
Specifies the value of the Content-Type "method" parameter if the iCalendar object is defined as a MIME message entity.
Definition: | |
Java class: |
Examples:
Method method = new Method("value");
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: | |
Java class: |
Examples:
Organizer organizer = Organizer.email("[email protected]");
organizer.setCommonName("John Doe");
Defines a to-do task's level of completion.
Definition: | |
Java class: |
Examples:
PercentComplete percentComplete = new PercentComplete(50); //50%
VTodo todo = new VTodo();
todo.setPercentComplete(50);
Defines the priority of an event or to-do task.
Definition: | |
Java class: |
Examples:
//highest
Priority priority = new Priority(1);
//lowest
Priority priority = new Priority(9);
VTodo todo = new VTodo();
todo.setPriority(1);
Identifies the application that created the iCalendar object.
Definition: | |
Java class: |
Examples:
ProductId prodid = new ProductId("-//Company//Application Name//EN");
ICalendar ical = new ICalendar();
ical.setProductId("-//Company//Application Name//EN");
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: | |
Java class: |
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);
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: | |
Java class: |
Examples:
//date-time value
Date datetime = ...
RecurrenceId recurrenceId = new RecurrenceId(datetime);
//date value
Date date = ...
RecurrenceId recurrenceId = new RecurrenceId(date, false);
Defines a relationship between the component that this property belongs to and another component.
Definition: | |
Java class: |
Examples:
RelatedTo relatedTo = new RelatedTo("uid-value");
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: | |
Java class: |
Examples:
//repeat 5 more times after the first time
Repeat relatedTo = new Repeat(5);
VAlarm alarm = ...;
alarm.setRepeat(5);
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: | |
Java class: |
Examples:
RequestStatus requestStatus = new RequestStatus("2.0");
requestStatus.setDescription("Success");
Defines a list of resources that are needed for an event or to-do task (for example a projector or DVD player).
Definition: | |
Java class: |
Examples:
Resources resources = new Resources("projector", "DVD player");
Defines how often a component repeats.
Definition: | |
Java class: |
Examples:
//"bi-weekly"
Recurrence recur = new Recurrence.Builder(Frequency.WEEKLY).interval(2).build();
RecurrenceRule rrule = new RecurrenceRule(recur);
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: | |
Java class: |
Examples:
Sequence sequence = new Sequence(2);
VEvent event = ...
event.setSequence(2);
Defines the status of the component that this property belongs to, such as a to-do task being in a "completed" state.
Definition: | |
Java class: |
Examples:
//creating a new property
Status status = Status.completed();
if (status.isCompleted()) {
//its value is "COMPLETED"
}
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: | |
Java class: |
Examples:
Summary summary = new Summary("summary text");
VEvent event = ...;
event.setSummary("summary text");
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: | |
Java class: |
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")
Defines when an alarm will be triggered.
Definition: | |
Java class: |
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");
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: | |
Java class: |
Examples:
VTimezone timezone = new VTimezone("Eastern");
Date start = ...;
DateStart dtstart = new DateStart(start);
dtStart.setTimezoneId("Eastern");
Defines a traditional, non-standard name for a timezone observance (for example, "Eastern Standard Time" for standard time on the US east coast).
Definition: | |
Java class: |
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);
Defines the timezone offset that was in use before a timezone observance.
Definition: | |
Java class: |
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);
Defines the timezone offset that is currently in use in a timezone observance.
Definition: | |
Java class: |
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);
Defines a URL that points to an iCalendar object that contains further information on a timezone.
Definition: | |
Java class: |
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");
Defines a unique identifier for a component.
Definition: | |
Java class: |
Examples:
Uid uid = new Uid("....");
//random UID
Uid uid = Uid.random();
Points to a resource that contains additional information about a component.
Definition: | |
Java class: |
Examples:
Url url = new Url("http://example.com");
Specifies the min/max versions a consumer must support in order to successfully parse the iCalendar object.
Definition: | |
Java class: |
Examples:
//the default iCal version
Version version = Version.v2_0();
if (verison.isV2_0()) {
//version is "2.0"
}
Used for storing properties parsed from xCal documents whose XML namespaces are not part of the xCal XML namespace.
Definition: | |
Java class: |
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();
biweekly is maintained by Michael Angstadt
Table of Contents
Getting started
Examples
FAQ
Javadocs
Downloads
1 An Overview of the iCalendar data format
2 Reading and Writing iCalendar data with biweekly
2.1 Plain-text (traditional)
2.2 XML-encoded (xCal)
2.3 JSON-encoded (jCal)
4 Working with Timezones
4.1 0.4.6 and earlier
4.2 0.5.0 and later
5 Dealing with Non-standard Data
5.1 Non-standard components
5.2 Non-standard properties
5.3 Non-standard parameters
6 Project Information
6.1 Dependencies
6.2 Supported Specifications
6.3 Changelog
7 Reference
7.1 iCalendar Component Reference
7.2 iCalendar Property Reference
7.3 Javadocs