r25 - 28 Jul 2007 - 10:01:18 - BrianMoseleyYou are here: OSAF >  Projects Web  > CosmoCardDav

CardDav in Cosmo

vCard (RFC 2426) is a format to store and retreive address book information in a client. An example of a vcard from my address book entry in evolution is shown below:

 FN:Brian Moseley
 EMAIL;TYPE=OTHER:bcm at osafoundation dot org 

Many standard client's use or support vCard for address book and exchanging vCard information with a server will be a value added feature. CardDav or vCard extensions to WebDAV is a draft which describes exchange of vCard information using WebDAV. Compliance with the CardDAV spec is planned for Cosmo and any deviations from the CardDAV spec will be documented in this page.

The following features are planned for Cosmo and is a MUST for any CardDAV server as per the draft 0

  • WebDAV Class 1 andClass 2 Class 2 (without locking) support - Implemented by jcr-server and extensions by Cosmo
  • WebDAV ACL's support (RFC 3744)
  • SSL Support
  • ETags support
  • MKADBK support
  • Creating vCard Object Resources
  • Address Book Reports
    • adbk-query
    • adbk-multi-get

Unsupported Optional features:

  • WebDAVDeltaV support (RFC 3253)
  • adbk-sync Report

Design Considerations:

  • Address book collection can be created while adding the user or through the MKADBK request. Cosmo will not create any address book while creating the user.
  • Used vCard4j for parsing the vCards. vcard4j uses a DOM to store it parsed data and doing XPath query to traverse the DOM may be a performance issue. May replace it with a custom parser if performance is a real issue.
  • AdBk Collection is a subset of Calendar Collection. It is possible to have a base collection class which extendsCalendarCollectionResource and have the common methods used byCalendarCollectionResource andAdBkCollectionResource - Cosmo will not have such a base class since the existing design need not be changed.


  • Based on Caldav code and the models are similar to the Caldav models.
  • Conforms to version 0 of the carddav draft
  • VCard4j is used for vcard parsing and there might be a slight overhead converting and searching the DOM structures.
  • Multi-valued properties
    • Multi valued property names will be reduntantly stored while indexing the multi valued properties. Though this violates the rules of normalization, it may perform better since a join is avoided.
    • Used MultiValueMap - a multi valued Hashmap implementation provided by commons collections api.

Source Download

  • You can checkout the source from my svn sandbox.
svn export http://svn.osafoundation.org/sandbox/vinu/cosmocarddav

If you want to make this cosmo run, you should follow CosmoBuildInstructions and use this Cosmo source instead of the default Cosmo.

Known Issues

  • Atom Feed is not tested
  • Repository browser does not display address book information properly

External Links:

  • S5 Slides of the intern presentation held on 10th August 2006 (at OSAF) - HTML , ReST
  • vCard RFC 2426
  • CardDav draft
  • http://www.viagenie.ca/projects/carddav/index.html
Edit | WYSIWYG | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r25 < r24 < r23 < r22 < r21 | More topic actions
Open Source Applications Foundation
Except where otherwise noted, this site and its content are licensed by OSAF under an Creative Commons License, Attribution Only 3.0.
See list of page contributors for attributions.