Holger's Java API

## com.antelmann.webdav
Class EzvcardHelper

    java.lang.Object
      com.antelmann.webdav.EzvcardHelper

All Implemented Interfaces:
  Forgeable<Contact>

    @ThirdParty(value="ezvcard")
    public class EzvcardHelper

extends Object
implements Forgeable<Contact>

allows to more easily parse a VCard and make it compatible with `Contact`

Since:
  03.01.2017, 16:21:49
Author:
  holger

Field Summary
`static Converter<ezvcard.property.Address,SnailMailAddress>` `SNAILMAIL_CONVERTER`

Constructor Summary
`EzvcardHelper(ezvcard.VCard vcard)`

Method Summary

`

`<T extends ezvcard.property.VCardProperty> T`

`

`findParam(List<T> list, ezvcard.parameter.VCardParameter param)`

`

`<T extends ezvcard.property.VCardProperty> T`

`

`findPreferred(Class<T> type)`

`ArrayList<SnailMailAddress>` `getAddresses()`
`String` `getDescription(ezvcard.property.VCardProperty prop)`

`

`<T extends ezvcard.property.TextListProperty> String`

`

`getPropertyString(T param)`

`void` `initAdditionalAddresses(PersonImpl<Keyword> person)`
`void` `initAddress(GlobalAddress adr)`
`void` `initCategories(ContactImpl<Keyword> contact)`
`static ezvcard.VCard` `loadVCard(CarddavClient client, String refid)`
`static ArrayList<ezvcard.VCard>` `loadVCards(CarddavClient client)`
`static ArrayList<ezvcard.VCard>` `loadVCards(CarddavClient client, Collection<String> ids)`
`static ArrayList<ezvcard.VCard>` `parseCards(XmlHelper multiResponse)`
`void` `setAllFrom(Contact contact)` copies the properties of the given object and applies them to this instance, so that its behavior in regards to the given object can be matched to the extend that the implementing class supports that behavior.
`Person` `toPerson()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### SNAILMAIL_CONVERTER

    public static final Converter<ezvcard.property.Address,SnailMailAddress> SNAILMAIL_CONVERTER

Constructor Detail

### EzvcardHelper

    public EzvcardHelper(ezvcard.VCard vcard)

Method Detail

### setAllFrom

    public void setAllFrom(Contact contact)
                    throws NullPointerException,
                           IllegalArgumentException

  Description copied from interface: `Forgeable`
  copies the properties of the given object and applies them to this instance, so that its behavior in regards to the given object can be matched to the extend that the implementing class supports that behavior.

  Specified by:
    `setAllFrom` in interface `Forgeable<Contact>`
  Parameters:
    `contact` - the object whose behavior is to be copied to this instance
  Throws:
    `NullPointerException` - if the given object parameter is null
    `IllegalArgumentException` - if the given object contains properties that for some reason cannot be copied to this instance

### toPerson

    public Person toPerson()

### findPreferred

    public <T extends ezvcard.property.VCardProperty> T findPreferred(Class<T> type)

### initCategories

    public void initCategories(ContactImpl<Keyword> contact)

### getPropertyString

    public <T extends ezvcard.property.TextListProperty> String getPropertyString(T param)

### initAddress

    public void initAddress(GlobalAddress adr)

### initAdditionalAddresses

    public void initAdditionalAddresses(PersonImpl<Keyword> person)

### getDescription

    public String getDescription(ezvcard.property.VCardProperty prop)

### getAddresses

    public ArrayList<SnailMailAddress> getAddresses()

### findParam

    public <T extends ezvcard.property.VCardProperty> T findParam(List<T> list,
                                                                  ezvcard.parameter.VCardParameter param)

### loadVCards

    public static ArrayList<ezvcard.VCard> loadVCards(CarddavClient client)
                                               throws IOException,
                                                      SAXException,
                                                      ParserConfigurationException,
                                                      URISyntaxException,
                                                      DOMException

  Throws:
    `IOException`
    `SAXException`
    `ParserConfigurationException`
    `URISyntaxException`
    `DOMException`

### loadVCards

    public static ArrayList<ezvcard.VCard> loadVCards(CarddavClient client,
                                                      Collection<String> ids)
                                               throws IOException,
                                                      SAXException,
                                                      ParserConfigurationException,
                                                      URISyntaxException,
                                                      DOMException

  Throws:
    `IOException`
    `SAXException`
    `ParserConfigurationException`
    `URISyntaxException`
    `DOMException`

### loadVCard

    public static ezvcard.VCard loadVCard(CarddavClient client,
                                          String refid)
                                   throws IOException,
                                          SAXException,
                                          ParserConfigurationException,
                                          URISyntaxException

  Throws:
    `IOException`
    `SAXException`
    `ParserConfigurationException`
    `URISyntaxException`

### parseCards

    public static ArrayList<ezvcard.VCard> parseCards(XmlHelper multiResponse)
                                               throws DOMException,
                                                      IOException

  Throws:
    `DOMException`
    `IOException`

(c) Holger Antelmann since 2001- all rights reserved (contact: info@antelmann.com)
see www.antelmann.com/developer for further details and available downloads