Previous Topic

Next Topic

VCard Descriptors

This example uses several Descriptors to generate an HTML page listing the VCards in a specified KowariTM model. The VCard data can be exported from Kowari, 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®.

BEGIN:VCARD   
VERSION:2.1
FN:Corky Crystal
TITLE:Computer Officer Class 3
ROLE:Programmer
ADR;WORK:; 111 Lake Drive ; WonderCity ; 5555 ; Australia
LABEL;WORK;ENCODING=QUOTED-PRINTABLE: 111 Lake Drive =0D=0A WonderCity =0D=0A 5555  Australia
EMAIL;PREF;INTERNET:corky@qqq.com
NOTE:Only works on Mondays and Fridays
TEL;WORK;VOICE:+61 7 555 5555
END:VCARD

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 Kowari database
  7. Given a model return an HTML page which will take VCard parameters and insert them into a Kowari database

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

All of these Descriptors are part of the default installation of Kowari 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.

In This Section

Try the VCards Example

See Also

Descriptor Examples

Hello World Descriptor

List Models Descriptor

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://mysite.com/server1#vcard>;

    Note - Replace mysite.com 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 <http://mysite.com:8080/webservices/descriptor/examples/vcard/vcards.rdf>
    into <rmi://mysite.com/server1#vcard>;

    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://mysite.com/server1#vcard as the model parameter and click on the Invoke button.

Latest News

Kowari 1.1.0 Pre-release 1 Released

Kowari 1.0.5 Released

Kowari 1.0.4.1 Released

Kowari 1.0.4 Released

DAWG Evaluates iTQL

Kowari article in XML.com

Kowari mentioned on XML.com

Kowari 1.0.3 Released

Kowari Lite Introduced

Kowari 1.0.2 Released

Kowari 1.0.1 Released

View all news items


Open Source logo Tucana Technologies Logo SourceForge.net Logo

© 2001-2004 Tucana Technologies, Inc. Some rights reserved.