This is a VCard interface compliant with RFC-2426 and RFC-4770 and implements the following sections and sub-sections of the RFC:
2.1 PREDEFINED TYPE USAGE ......................................5 2.1.1 BEGIN and END Type ......................................5 2.1.2 NAME Type ...............................................5 2.1.3 PROFILE Type ............................................5 2.1.4 SOURCE Type .............................................5 3.1 IDENTIFICATION TYPES .......................................8 3.1.1 FN Type Definition ......................................8 3.1.2 N Type Definition .......................................9 3.1.3 NICKNAME Type Definition ................................9 3.1.4 PHOTO Type Definition ..................................10 3.1.5 BDAY Type Definition ...................................11 3.2 DELIVERY ADDRESSING TYPES .................................11 3.2.1 ADR Type Definition ....................................11 3.2.2 LABEL Type Definition ..................................13 3.3 TELECOMMUNICATIONS ADDRESSING TYPES .......................13 3.3.1 TEL Type Definition ....................................14 3.3.2 EMAIL Type Definition ..................................15 3.3.3 MAILER Type Definition .................................15 3.4 GEOGRAPHICAL TYPES ........................................16 3.4.1 TZ Type Definition .....................................16 3.4.2 GEO Type Definition ....................................16 3.5 ORGANIZATIONAL TYPES ......................................17 3.5.1 TITLE Type Definition ..................................17 3.5.2 ROLE Type Definition ...................................18 3.5.3 LOGO Type Definition ...................................18 3.5.4 AGENT Type Definition ..................................19 3.5.5 ORG Type Definition ....................................20 3.6 EXPLANATORY TYPES .........................................20 3.6.1 CATEGORIES Type Definition .............................20 3.6.2 NOTE Type Definition ...................................21 3.6.3 PRODID Type Definition .................................21 3.6.4 REV Type Definition ....................................22 3.6.5 SORT-STRING Type Definition ............................22 3.6.6 SOUND Type Definition ..................................23 3.6.7 UID Type Definition ....................................24 3.6.8 URL Type Definition ....................................25 3.6.9 VERSION Type Definition ................................25 3.7 SECURITY TYPES ............................................25 3.7.1 CLASS Type Definition ..................................26 3.7.2 KEY Type Definition ....................................26 3.8 EXTENDED TYPES ............................................27
You should refer to the JEP-54 documentation.
Please note that this class is incomplete but it does provide the most commonly found information in vCards. Also remember that VCard transfer is not a standard, and the protocol may change or be replaced.
Usage:
// To save VCard: VCard vCard = new VCard(); vCard.setFirstName("kir"); vCard.setLastName("max"); vCard.setEmailHome("foo@fee.bar"); vCard.setJabberId("jabber@id.org"); vCard.setOrganization("Jetbrains, s.r.o"); vCard.setNickName("KIR"); vCard.setField("TITLE", "Mr"); vCard.setAddressFieldHome("STREET", "Some street"); vCard.setAddressFieldWork("CTRY", "US"); vCard.setPhoneWork("FAX", "3443233"); vCard.save(connection); // To load VCard: VCard vCard = new VCard(); vCard.load(conn); // load own VCard vCard.load(conn, "joe@foo.bar"); // load someone's VCard@author Kirill Maximov (kir@maxkir.com)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|