#
# PUT a VCARD record into an addressbook
#
TYPE=PUT
URL=http://regression.host/caldav.php/user1/addressbook/andresenesq.vcf

HEADER=User-Agent: DAViCalTester/public
HEADER=Content-Type: text/vcard; charset=utf-8
HEADER=If-None-Match: *
HEAD

BEGINDATA
BEGIN:VCARD
VERSION:4.0
PRODID:-//ALAB//NOSGML Version 0.9//DE
REV;VALUE=date-time:20100623071522Z
UID:uid=andresenesq.1209158007\,ou=Contacts\,dc=andresen\,dc=de
X-ABUID:ADDEEFEF-162A-260A-DEA3-1DA8-8A913187\:ABPerson
FN:Sven Joseph Klaus Michael Andresen\, Esq.
SORT-STRING:Andresen\, Esq.\, Sven Joseph Klaus Michael
N:Andresen,Esq.;Sven;Joseph,Klaus,Michael;;Dr.,Prof.;Esq.
X-DISPLAYNAME:Svenni
X-INITIALS:SA
X-INITIALS:SHA
NICKNAME:Svenny,Sveny
PHOTO;ENCODING=b;TYPE=jpeg:
[encoded data, 16896 characters]
 ooooA//Z
X-SPOUSE:Manuela Graf
X-EVOLUTION-SPOUSE:Manuela Graf
item1.X-ABRELATEDNAMES:Manuela Graf
item1.X-ABLabel:_$!<Spouse>!$_
item2.X-ABRELATEDNAMES:Manager
item2.X-ABLabel:_$!<Manager>!$_
item3.X-ABRELATEDNAMES:Aufsichtsrat
item3.X-ABLabel:_$!<Manager>!$_
item4.X-ABRELATEDNAMES:Barbara Jonas
item4.X-ABLabel:_$!<Assistant>!$_
item5.X-ABRELATEDNAMES:Dominik Maller
item5.X-ABLabel:_$!<Assistant>!$_
ROLE:CTO
ROLE:Vorstand
X-MANAGER:Manager
X-MANAGER:Aufsichtsrat
X-EVOLUTION-MANAGER:Manager
X-EVOLUTION-MANAGER:Aufsichtsrat
X-ASSISTANT:Babsi
X-ASSISTANT:Dominik
X-EVOLUTION-ASSISTANT:Barbara Jonas
X-EVOLUTION-ASSISTANT:Dominik Müller
BDAY;VALUE=date:1971-06-21
X-ANNIVERSARY:2000-01-01\, Testfeier
X-ANNIVERSARY:2003-2-2\, Blafeier
X-EVOLUTION-ANNIVERSARY:2000-01-01\, Testfeier
X-EVOLUTION-ANNIVERSARY:2003-2-2\, Blafeier
IMPP:aim:balbala
IMPP:aim:hakunamatata
X-AIM:balbala
X-AIM:hakunamatata
EMAIL;TYPE=INTERNET:sven@andresen.de
EMAIL;TYPE=INTERNET:andresen@andresen.de
TEL;TYPE=WORK,VOICE:+49 89 11 11 111
TEL;TYPE=WORK,VOICE:+49 234 222 222
TEL;TYPE=WORK,FAX:+49 7373 73
TEL;TYPE=PAGER:+49 160 073 727 272
TEL;TYPE=PAGER:+49 2626 26
TEL;TYPE=CELL,VOICE:+49 39292 82
TEL;TYPE=CELL,VOICE:+49 7272 722
TEL;TYPE=PREF,VOICE:+49 12 34 567
TEL;TYPE=CAR,VOICE:+49 8292 38 383
TEL;TYPE=HOME,VOICE:+49 7327 272 727
TEL;TYPE=HOME,VOICE:+49 7272 7282
TEL;TYPE=HOME,FAX:+49 1010 1
item6.TEL;TYPE=VOICE:+49 8373 6262
item6.X-ABLabel:_$!<Other>!$_
item7.TEL;TYPE=VOICE:+61 27 28 73 246
item7.X-ABLabel:_$!<Other>!$_
item8.TEL;TYPE=FAX:+49 9382 3424
item8.X-ABLabel:_$!<Other>!$_
TEL;TYPE=ISDN:8797
TEL;TYPE=ISDN:98732947234
TEL;TYPE=X-EVOLUTION-RADIO:+49 88 298 723 498 32
TEL;TYPE=X-EVOLUTION-RADIO:+49 9872 394 872 34
TEL;TYPE=X-EVOLUTION-TELEX:+49 2763 382 882 28 82
TEL;TYPE=X-EVOLUTION-TELEX:+49 7722 88 28 282
TEL;TYPE=MAIN:+49 6237 623 723 84 76
TEL;TYPE=MAIN:+49 9324 32 479 234234
TEL;X-EVOLUTION-CALLBACK:+49 8383 73 723
TEL;X-EVOLUTION-CALLBACK:+49 7363 6363
TEL;TYPE=MODEM:+49 8383 73 723
TEL;TYPE=MODEM:+49 7363 6363
TEL;X-EVOLUTION-TTYTDD:+49 3377 37 373
TEL;X-EVOLUTION-TTYTDD:+49 8378 33
TEL;X-QUICKDIAL:13355
ADR;TYPE=WORK;CHARSET=utf-8:PO 373;Andresen AG\, R&D;Messegasse 7;Passau;Ba
 yern;94036;Deutschland
ADR;TYPE=WORK;CHARSET=utf-8:6266 AA;andresen Holding\, Geschäftsleitung;Wei
 senstraße 13;Irgendwo;Niedersachsen;34332
ADR;TYPE=HOME;CHARSET=utf-8:;;Weisenstraße 13\r;Irgendwo;;34332
ADR;TYPE=X-OTHER:;;Irgendwo;Nirgendwo;Sonstwo;0000;Antarktis
ORG:andresen AG;R&D;;XXX\, 033
ORG;CHARSET=utf-8:andresen Holding;Geschäftsleitung;;-\, 0223
X-HOUSE;TYPE=WORK:XXX
X-HOUSE;TYPE=WORK:-
X-ROOM;TYPE=WORK:033
X-ROOM;TYPE=WORK:0223
LABEL;TYPE=WORK:1. Stock\, links
LABEL;TYPE=WORK:oder rechts
URL;TYPE=WORK:http://www.andresen.de
URL;TYPE=WORK:http://www.andresens.de
item9.URL;TYPE=HOME:http://www.zuhause.de
item9.X-ABLabel:_$!<HomePage>!$_
item10.URL;TYPE=HOME:http://www.andresen.de/~andresen
item10.X-ABLabel:_$!<HomePage>!$_
X-BUSINESS-CATEGORY:IT
X-BUSINESS-CATEGORY:Development
KEY;ENCODING=b;TYPE=X-CERT:
 LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUR2RENDQXlXZ0F3SUJBZ0lK
 QUpUeXNHNDV0V3BZTUEwR0NTcUdTSWIzRFFFQkJRVUFNSUdiTVFzd0NRWUQKVlFR
 R0V3SkJWVEVUTUJFR0ExVUVDQk1LVTI5dFpTMVRkR0YwWlRFTk1Bc0dBMVVFQnhN
 RVEybDBlVEVoTUI4RwpBMVVFQ2hNWVNXNTBaWEp1WlhRZ1YybGtaMmwwY3lCUWRI
 a2dUSFJrTVF3d0NnWURWUVFMRkFOU0prUXhGakFVCkJnTlZCQU1URFZOMlpXNGdR
 VzVrY21WelpXNHh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MRkFOU0prUXhGakFVQmdOVkJBTVREVk4yWlc0Z1FXNWtjbVZ6Wlc0eEh6QWRC
 Z2txaGtpRzl3MEIKQ1FFV0VITjJaVzVBWVc1a2NtVnpaVzR1WkdXQ0NRQ1U4ckJ1
 T2JWcVdEQU1CZ05WSFJNRUJUQURBUUgvTUEwRwpDU3FHU0liM0RRRUJCUVVBQTRH
 QkFGcnVidGpoWVB1RERHVVpQRTQraUo2a3FmdEtXWDFJVzdmTXdtc3BRUWt5CitX
 UThSL3AxbURrc3ZEQ3hDYWp2YVduSVI2dGIwbmtCMTFFNmQ0dDhkMkxWTTE4M3dD
 UWJtMDRJS05mdkRKOXQKUE4vdHBVTkJrc0VkaXBlMEM1SEgyMnY0RitSSzVUK1lq
 M1J6VHZmOTdROVMzTzF3eE5lZkt0NXVUNFFxNUZtdAotLS0tLUVORCBDRVJUSUZJ
 Q0FURS0tLS0tCg==
CALURI:http://caldav.andresen.local/sja
FBURL:http://caldav.andresen.local/freebusy
CAPURI:http://caldav.andresen.local/access
CALADRURI:http://caldav.andresen.local/access
X-DESCRIPTION:Beschreibung
X-DESCRIPTION;CHARSET=utf-8:außerdem
NOTE:Nur so ein Test!
CATEGORIES:bla,blubb,test,hihi,oops
END:VCARD
ENDDATA

QUERY
SELECT caldav_data.dav_name,
       version, nickname, fn, n, note, org, url, fburl, caladruri, caluri
  FROM caldav_data LEFT JOIN addressbook_resource USING(dav_id)
  WHERE caldav_data.dav_name ~ '/user1/addressbook/andresenesq.vcf'
ENDQUERY

QUERY
SELECT 
       type, box_no, unit_no, street_address, locality, region, postcode, country, property
  FROM caldav_data 
        LEFT JOIN addressbook_address_adr USING(dav_id)
  WHERE caldav_data.dav_name ~ '/user1/addressbook/andresenesq.vcf'
  ORDER BY dav_id, property
ENDQUERY

QUERY
SELECT 
        addressbook_address_tel.type, addressbook_address_tel.tel
  FROM caldav_data
        LEFT JOIN addressbook_address_tel USING(dav_id)
  WHERE caldav_data.dav_name ~ '/user1/addressbook/andresenesq.vcf'
  ORDER BY dav_id, property
ENDQUERY

QUERY
SELECT 
        addressbook_address_email.type, addressbook_address_email.email, addressbook_address_email.property
  FROM caldav_data
        LEFT JOIN addressbook_address_email USING(dav_id)
  WHERE caldav_data.dav_name ~ '/user1/addressbook/andresenesq.vcf'
  ORDER BY dav_id, property
ENDQUERY


