-
Notifications
You must be signed in to change notification settings - Fork 7
Vobject Overview
The "vobject" data format is used by vCard and iCalendar files. It does not have a specification in and of itself, but is defined by both the iCalendar and vCard specifications as if it were unique to those specifications. The name "vobject" comes from a naming convention where certain objects within the data format are always given names that start with the letter "V".
The vobject data model consists of components and properties.
A component consists of a collection of properties and nested components. Lines that start with "BEGIN:" mark the beginning of a component, and lines that start with "END:" mark the end of a component.
A property consists of a name, an optional group name (a way of saying that certain properties belong together), a list of parameters (key/value attributes), and a value.
Each line of text within a component is a property. The property's name is located at the beginning of the line. If the property belongs to a group, then the line begins with the group name, followed by a dot, followed by the property name. The property's parameters are located in between the property name and the first colon character. The property's value is located after the first colon character.
Properties with large values are typically folded, meaning their values are split across multiple lines. Folded lines are identified by the fact that they begin with a whitespace character (a space or a tab). The vCard and iCalendar specifications recommend that lines longer than 75 characters should be folded, but line folding is not required.
There are two different versions of the vobject data format. This library refers to them as syntax styles. They are similar to each other, but not identical. See Syntax style differences for more information.
The text below represents an iCalendar object that contains the date and time for a meeting. The data is encapsulated in a VCALENDAR component, which has an inner VEVENT component. The DESCRIPTION property has a large value, and is folded across three lines. The SUMMARY property has a parameter named LANGUAGE.
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Microsoft Corporation//Outlook 14.0 MIMEDIR//EN
BEGIN:VEVENT
UID:d6d88f2e50080b9602da53dac1102762
DTSTAMP:20130601T080000Z
SUMMARY;LANGUAGE=en-us:Team Meeting
DESCRIPTION:Lorem ipsum dolor sit amet\, consectetur adipiscing elit. Vesti
bulum ultricies tempor orci ac dignissim. Curabitur posuere consequat mass
a.
DTSTART:20130610T120000Z
DURATION:PT1H
RRULE:FREQ=WEEKLY;INTERVAL=2
END:VEVENT
END:VCALENDAR
Here is another example. The text below represents a vCard object that contains a person's contact information. The data is encapsulated in a VCARD component. The NOTE property has a large value, and is folded across three lines. The EMAIL property has a parameter named TYPE. The EMAIL property also belongs to a group named "group1".
BEGIN:VCARD
VERSION:4.0
N:Doe;John;;Mr;
FN:Mr. John Doe
group1.EMAIL;TYPE=home:[email protected]
NOTE:Lorem ipsum dolor sit amet\, consectetur adipiscing elit. Donec at lac
us justo. Phasellus quis nisl eget augue gravida tempor in at ante. Suspen
disse suscipit eleifend molestie.
END:VCARD
1 An overview of the vobject data format
3 Project Information
3.1 News
3.2 Supported Specifications
3.3 Changelog
4 Reference
4.1 Javadocs