Elexis API documentation
Version 2.1.6 as of December 11 2011

ch.rgw.tools
Class VCard

java.lang.Object
  extended by ch.rgw.tools.VCard

public class VCard
extends java.lang.Object

This class is a java representation of a vCard (http://www.imc.org/pdi/)


Nested Class Summary
static class VCard.VCardException
           
 
Constructor Summary
VCard(java.io.InputStream in)
          Construct a VCard from an InputStream.
 
Method Summary
 java.lang.String[] getAttributes(java.lang.String element)
          return all attributes of the given element
 java.lang.String getElement(java.lang.String name)
          find the named element
 java.lang.String[] getElements()
          find all elements in that vCard.
 java.lang.String getElementValue(java.lang.String name)
          return the value of the given named element
 java.lang.String getValue(java.lang.String element)
          return the value of the given Element
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VCard

public VCard(java.io.InputStream in)
      throws VCard.VCardException,
             java.io.IOException
Construct a VCard from an InputStream. If the stream contains more than one vCard, only one will be loaded

Parameters:
in - the Stream containing the vCard-Data
Throws:
VCard.VCardException - inf the stream does not contain a valid vCard
java.io.IOException
Method Detail

getElements

public java.lang.String[] getElements()
find all elements in that vCard. An Element is one line, e.g. N;CHARSET=ISO-8859-1;ENCODING=QUOTED-PRINTABLE:Weirich;Gerry

Returns:
a list of all elements

getElement

public java.lang.String getElement(java.lang.String name)
find the named element

Parameters:
name - the name of the element to find
Returns:
the full element (with attributes and value)

getAttributes

public java.lang.String[] getAttributes(java.lang.String element)
return all attributes of the given element

Parameters:
element -
Returns:

getValue

public java.lang.String getValue(java.lang.String element)
return the value of the given Element

Parameters:
element -
Returns:

getElementValue

public java.lang.String getElementValue(java.lang.String name)
return the value of the given named element

Parameters:
name - name of the element
Returns:
value of the element or null

Elexis API documentation
Version 2.1.6 as of December 11 2011

Copyright 2005-2011 by Gerry Weirich, Elexis