Oracle Application Server Wireless Java API Reference
B14043-01


oracle.panama.messaging.common
Class VCard

java.lang.Object
  extended byjava.util.Dictionary
      extended byjava.util.Hashtable
          extended byoracle.panama.messaging.common.VCard

All Implemented Interfaces:
java.lang.Cloneable, java.util.Map, java.io.Serializable

public class VCard
extends java.util.Hashtable

This class can be used to create a vCard which can be send as SmartMessage(Supported mainly by Nokia phones only).

See Also:
Serialized Form

Field Summary
static java.lang.String BDAY
Key for birth day.
static java.lang.String BEGINVCARD
Defines begining of vCard.
static java.lang.String CRLF
Defines separater between two vCard property.
static java.lang.String DELIVERYADDRESS
Key for delivery address.
static int DEST_PORT
Destination port for vCard Smart Message.
static java.lang.String EMAIL
Key for email address
static java.lang.String ENCODED_VCARD
Key for encoded vCard.
static java.lang.String ENDVCARD
Defines end of vCard.
static java.lang.String ET_AOL
Email type - indicates America On-Line
static java.lang.String ET_APPLELINK
Email type - indicates AppleLink
static java.lang.String ET_ATT
Email type - indicates AT&T Mail
static java.lang.String ET_CIS
Email type - indicates CompuServe Information Service
static java.lang.String ET_EWORLD
Email type - indicates eWorld
static java.lang.String ET_IBMMAIL
Email type - indicates IBM Mail
static java.lang.String ET_MCIMAIL
Email type - indicates MCI Mail
static java.lang.String ET_POWERSHARE
Email type - indicates PowerShare
static java.lang.String ET_PRODIGY
Email type - indicates Prodigy information service
static java.lang.String ET_SMTP
Email type - indicates Internet SMTP (default)
static java.lang.String ET_TLX
Email type - indicates Telex number
static java.lang.String ET_X400
Email type - indicates X.400 service
static java.lang.String FORMATTED_NAME
Key for formatted name.
static java.lang.String MIME
MIME type for vCard.
static java.lang.String NAME
Key for name.
static java.lang.String NOOFADDRESSES
Key for number of address entries.
static java.lang.String NOOFTELEPHONES
Key for number of phone entries.
static java.lang.String NOTE
Key for note.
static java.lang.String ORG
Key for organization.
static int ORG_PORT
Origin NBS port for vCard Smart Message.
static java.lang.String PHONE_MODEL
Key for phone model.
static java.lang.String ROLE
Key for role.
static java.lang.String TELEPHONE
Key for telephone number.
static java.lang.String TITLE
Key for title.
static java.lang.String URL
Key for URL.
static java.lang.String VCARD_STRING
Key for plain vCard string.
static java.lang.String VERSION
Key for vCard version.

Constructor Summary
VCard()
Constructor - sets the vCard version to 2.1

Method Summary
void setBirthDate(int month, int date, int year)
Set the date of birth associated with the vCard.
void setBusinessCategory(java.lang.String role)
Set the information concerning the role, occupation, or business category vCard object within an organization.
void setDelieveryAddress(java.lang.String poAdd, java.lang.String extAdd, java.lang.String streetAdd, java.lang.String city, java.lang.String region, java.lang.String postalCode, java.lang.String country, boolean domAdd, boolean intlAdd, boolean postalAdd, boolean parcelAdd, boolean homeAdd, boolean workAdd)
Set the structured representation of the physical delievery address.
void setEmailAddress(java.lang.String emailAddress, java.lang.String emailType)
Set the email address.
void setFormatedName(java.lang.String formatedName)
Set the formated name
void setName(java.lang.String familyName, java.lang.String givenName, java.lang.String middleName, java.lang.String namePrefix, java.lang.String nameSuffix)
Set the structured representation of the name of place, person or a thing associated with vCard.
void setNote(java.lang.String noteMessage)
Set the supplemental information or a comment that is associated with the vCard.
void setOrganization(java.lang.String orgName, java.lang.String orgUnit)
Set the name and optionally the unit of the organization associated with the vCard object.
void setPhoneModel(java.lang.String model)
Set the phone model.
void setTelephoneNumber(java.lang.String telephoneNumber, boolean pref, boolean work, boolean home, boolean voice, boolean fax, boolean msg, boolean cell, boolean pager, boolean bbs, boolean modem, boolean car, boolean isdn, boolean video)
Set the telephone number associated with the vCard object.
void setTitle(java.lang.String title)
Set the job title, functional positions ot function of individual associated with the vCard ohject within the organization.
void setURL(java.lang.String url)
Set a URL that can be used to obtain the information about the vCard object.
void setVCard(java.lang.String vcard)
Set the encoded vCard string.
void setVCardString(java.lang.String vcard)
set the vCard using the string.

Methods inherited from class java.util.Hashtable
clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keys, keySet, put, putAll, remove, size, toString, values

Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait

Field Detail

BDAY

public static final java.lang.String BDAY
Key for birth day.
See Also:
Constant Field Values

BEGINVCARD

public static final java.lang.String BEGINVCARD
Defines begining of vCard.
See Also:
Constant Field Values

CRLF

public static final java.lang.String CRLF
Defines separater between two vCard property.
See Also:
Constant Field Values

DELIVERYADDRESS

public static final java.lang.String DELIVERYADDRESS
Key for delivery address.
See Also:
Constant Field Values

DEST_PORT

public static final int DEST_PORT
Destination port for vCard Smart Message.
See Also:
Constant Field Values

EMAIL

public static final java.lang.String EMAIL
Key for email address
See Also:
Constant Field Values

ENCODED_VCARD

public static final java.lang.String ENCODED_VCARD
Key for encoded vCard.
See Also:
Constant Field Values

ENDVCARD

public static final java.lang.String ENDVCARD
Defines end of vCard.
See Also:
Constant Field Values

ET_AOL

public static final java.lang.String ET_AOL
Email type - indicates America On-Line
See Also:
Constant Field Values

ET_APPLELINK

public static final java.lang.String ET_APPLELINK
Email type - indicates AppleLink
See Also:
Constant Field Values

ET_ATT

public static final java.lang.String ET_ATT
Email type - indicates AT&T Mail
See Also:
Constant Field Values

ET_CIS

public static final java.lang.String ET_CIS
Email type - indicates CompuServe Information Service
See Also:
Constant Field Values

ET_EWORLD

public static final java.lang.String ET_EWORLD
Email type - indicates eWorld
See Also:
Constant Field Values

ET_IBMMAIL

public static final java.lang.String ET_IBMMAIL
Email type - indicates IBM Mail
See Also:
Constant Field Values

ET_MCIMAIL

public static final java.lang.String ET_MCIMAIL
Email type - indicates MCI Mail
See Also:
Constant Field Values

ET_POWERSHARE

public static final java.lang.String ET_POWERSHARE
Email type - indicates PowerShare
See Also:
Constant Field Values

ET_PRODIGY

public static final java.lang.String ET_PRODIGY
Email type - indicates Prodigy information service
See Also:
Constant Field Values

ET_SMTP

public static final java.lang.String ET_SMTP
Email type - indicates Internet SMTP (default)
See Also:
Constant Field Values

ET_TLX

public static final java.lang.String ET_TLX
Email type - indicates Telex number
See Also:
Constant Field Values

ET_X400

public static final java.lang.String ET_X400
Email type - indicates X.400 service
See Also:
Constant Field Values

FORMATTED_NAME

public static final java.lang.String FORMATTED_NAME
Key for formatted name.
See Also:
Constant Field Values

MIME

public static final java.lang.String MIME
MIME type for vCard.
See Also:
Constant Field Values

NAME

public static final java.lang.String NAME
Key for name.
See Also:
Constant Field Values

NOOFADDRESSES

public static final java.lang.String NOOFADDRESSES
Key for number of address entries.
See Also:
Constant Field Values

NOOFTELEPHONES

public static final java.lang.String NOOFTELEPHONES
Key for number of phone entries.
See Also:
Constant Field Values

NOTE

public static final java.lang.String NOTE
Key for note.
See Also:
Constant Field Values

ORG

public static final java.lang.String ORG
Key for organization.
See Also:
Constant Field Values

ORG_PORT

public static final int ORG_PORT
Origin NBS port for vCard Smart Message.
See Also:
Constant Field Values

PHONE_MODEL

public static final java.lang.String PHONE_MODEL
Key for phone model.
See Also:
Constant Field Values

ROLE

public static final java.lang.String ROLE
Key for role.
See Also:
Constant Field Values

TELEPHONE

public static final java.lang.String TELEPHONE
Key for telephone number.
See Also:
Constant Field Values

TITLE

public static final java.lang.String TITLE
Key for title.
See Also:
Constant Field Values

URL

public static final java.lang.String URL
Key for URL.
See Also:
Constant Field Values

VCARD_STRING

public static final java.lang.String VCARD_STRING
Key for plain vCard string.
See Also:
Constant Field Values

VERSION

public static final java.lang.String VERSION
Key for vCard version.
See Also:
Constant Field Values

Constructor Detail

VCard

public VCard()
Constructor - sets the vCard version to 2.1

Method Detail

setBirthDate

public void setBirthDate(int month,
                         int date,
                         int year)
Set the date of birth associated with the vCard.
Parameters:
month - must be greater than 0 and less than or equal to 12.
date - must be greater than 0 and less than or equal to 31.
year - must be a a four digit number.

setBusinessCategory

public void setBusinessCategory(java.lang.String role)
Set the information concerning the role, occupation, or business category vCard object within an organization.

setDelieveryAddress

public void setDelieveryAddress(java.lang.String poAdd,
                                java.lang.String extAdd,
                                java.lang.String streetAdd,
                                java.lang.String city,
                                java.lang.String region,
                                java.lang.String postalCode,
                                java.lang.String country,
                                boolean domAdd,
                                boolean intlAdd,
                                boolean postalAdd,
                                boolean parcelAdd,
                                boolean homeAdd,
                                boolean workAdd)
Set the structured representation of the physical delievery address. The method can be called multiple times on a VCard object to set more than one delivery addresses, each with different set of attributes.
Parameters:
poAdd - Post office Address
extAdd - Extended Address
streetAdd - street address
city - locality
region -
country -
domAdd - true to indicate a domestic address
intlAdd - true to indicate a international address
postalAdd - true to indicate a postal delivery address
parcelAdd - true to indicare a parcel delivery address
homeAdd - true to indicate a home delivery address
workAdd - true to indicate a work delivery address

setEmailAddress

public void setEmailAddress(java.lang.String emailAddress,
                            java.lang.String emailType)
Set the email address. The address is in the form of a specific addressing type. For example, the internet mail address for John Public might be John.Public@abc.com The default email type is ET_SMTP
Parameters:
emailAddress -
emailType - type of the electronic mail address. Can be any of the valid Email types.

setFormatedName

public void setFormatedName(java.lang.String formatedName)
Set the formated name
Parameters:
formatedName - can contain desired honorific prefixes, suffixes,titles etc.

setName

public void setName(java.lang.String familyName,
                    java.lang.String givenName,
                    java.lang.String middleName,
                    java.lang.String namePrefix,
                    java.lang.String nameSuffix)
Set the structured representation of the name of place, person or a thing associated with vCard.

setNote

public void setNote(java.lang.String noteMessage)
Set the supplemental information or a comment that is associated with the vCard.

setOrganization

public void setOrganization(java.lang.String orgName,
                            java.lang.String orgUnit)
Set the name and optionally the unit of the organization associated with the vCard object.
Parameters:
orgName - Organization Name.
orgUnit - Organization Unit.

setPhoneModel

public void setPhoneModel(java.lang.String model)
Set the phone model. The phone model should be of the format: "band type", for example: "Nokia 6210". It is case insensitive.

setTelephoneNumber

public void setTelephoneNumber(java.lang.String telephoneNumber,
                               boolean pref,
                               boolean work,
                               boolean home,
                               boolean voice,
                               boolean fax,
                               boolean msg,
                               boolean cell,
                               boolean pager,
                               boolean bbs,
                               boolean modem,
                               boolean car,
                               boolean isdn,
                               boolean video)
Set the telephone number associated with the vCard object. The method can be called multiple times on a VCard object to set more than one telephone numbers, each with different set of attributes.
Parameters:
telephoneNumber - must be specified in canonical form in orfer to specify an unambiguous representation of the globally unique telephone endpoint.
pref - true to indicate preferred number.
work - true to indicate work number.
home - true to indicate home number.
voice - true to indicate voice number.
fax - true to indicate facsimile number.
msg - true to indicate messaging service on the number.
cell - true to indicate a cell number.
pager - true to indicate pager number.
bbs - true to indicate bulletin board service number.
modem - true to indicate MODEM number.
car - true to indicate a car-phone number.
isdn - true to indicate an ISDN number.
video - true to indicate a video-phone number.

setTitle

public void setTitle(java.lang.String title)
Set the job title, functional positions ot function of individual associated with the vCard ohject within the organization.

setURL

public void setURL(java.lang.String url)
Set a URL that can be used to obtain the information about the vCard object.

setVCard

public void setVCard(java.lang.String vcard)
Set the encoded vCard string. Eg of encoded vcard string is String vcard = "424547494E3A56434152440D0A464E3A4A6F686E20536D6974680D0A"+ "54454C3B4641583A35313037313030350D0A454D41494C3A6A6F686E2E736D69746840"+ "6F7261636C652E636F6D0D0A454E443A56434152440D0A";

setVCardString

public void setVCardString(java.lang.String vcard)
set the vCard using the string. Eg of such a string is : String vcard = "BEGIN:VCARD\r\nVERSION:2.1\r\nFN:John Smith\r\n"+ "TEL;FAX:51071005\r\nEMAIL:john.smith@oracle.com\r\nEND:VCARD\r\n";

Oracle Application Server Wireless Java API Reference
B14043-01


Copyright © 2004 Oracle Corporation. All Rights Reserved.