mulgara - semantic store

skip navigation


VCard Descriptors

This example uses several Descriptors to generate an HTML page listing the VCards in a specified Mulgara model. The VCard data can be exported from Mulgara, in VCard format, for use by applications such as Netscape Address book and Microsoft® Outlook. New VCards can be entered from an HTML interface.

Here is a sample screen capture.

Clicking on the Export VCard button sends a file, similar to the one shown below, to your browser. Depending on your configuration, your browser may ask you to save the file or it may pass the file directly to an external application, such as Microsoft® Outlook®.

FN:Corky Crystal
TITLE:Computer Officer Class 3
ADR;WORK:; 111 Lake Drive ; WonderCity ; 5555 ; Australia
LABEL;WORK;ENCODING=QUOTED-PRINTABLE: 111 Lake Drive =0D=0A WonderCity =0D=0A 5555  Australia
NOTE:Only works on Mondays and Fridays
TEL;WORK;VOICE:+61 7 555 5555

This example uses seven Descriptors to perform a variety of tasks. Using a browser and clicking on the links below displays the source in a new window.

  1. Given a Model show all VCards in that model as HTML
  2. Given a Model return a list of VCards URIs in that model as XML
  3. Given a VCard URI return an HTML version of the VCard
  4. Given a VCard URI return a XML version of the VCard
  5. Given a VCard URI return a VCard Format version of the VCard
  6. Given VCard parameters insert a VCard into a Mulgara database
  7. Given a model return an HTML page which will take VCard parameters and insert them into a Mulgara database

    The above links are available in the online version of the documentation.

All of these Descriptors are part of the default installation of Mulgara and are available from the List Descriptors task on the Descriptor Management page.

The diagram below outlines the relationships between these Descriptors to demonstrate their reusability.

Note - Descriptor 4 (Given a VCard URI return the VCard as XML) is used by both browser tasks. This is to demonstrate the reusability of well designed Descriptors.


Try the VCards Example

To try out the VCards example, you need to load VCard RDF into a model.

  1. Using the TKS ViewerTM or the iTQLTM command line, create a model for storing the VCards. For example:

    create <rmi://>;

    Note - Replace with the fully qualified hostname of your TKS server.

  2. Load some VCard RDF data into your model.

    A sample file, vcards.rdf, is included as part of the TKS installation. If you want to use this file, copy the link address for it and load the data into the vcard model. For example:

    load <>
    into <rmi://>;

    If you want to add more vcards to the file, download it, edit it and load it in using a file: URL. Make sure the default Descriptors are loaded (use the Deploy Bundled Descriptors task on the Descriptor Management page).

  3. Use the See List of Descriptors Available on this Host task from the Descriptor Management page to locate the Given a Model Show All VCards in that Model as HTML Descriptor.

    Enter rmi:// as the model parameter and click on the Invoke button.

Valid XHTML 1.0 TransitionalValid CSS 3.0!