Holger's Java API

## com.antelmann.webdav
Class CarddavClient

    java.lang.Object
      com.antelmann.webdav.WebdavClient
          com.antelmann.webdav.CarddavClient

    @ThirdParty(value="Apache Commons HttpClient (org.apache.http)")
    public class CarddavClient

extends WebdavClient

an implementation of a CardDav client. Helpful info: http://sabre.io/dav/building-a-carddav-client/

Since:
  25.10.2016, 16:24:45
Author:
  holger

Constructor Summary
`CarddavClient(URL url, String username, String password)`

Method Summary
`ArrayList<CardHeader>` `listCards()` maps href (the UID for the card) to etag
`XmlHelper` `listCardXml()`
`Collection<Properties>` `listInfo()`
`String` `loadCardContent(String refid)`
`XmlHelper` `loadCardData()`
`XmlHelper` `loadCardData(Collection<String> ids)`
`XmlHelper` `loadCardDataForCategory(String category)` http://stackoverflow.com/questions/14137894/how-to-do-advanced-filters-in-carddav-webdav-report-request
`static ArrayList<String>` `parseAddressData(XmlHelper xml)`
`static String` `parseEtag(String source)`
`static String` `parseEtag(XmlHelper xml)`
`static ArrayList<XmlHelper>` `parseResponses(XmlHelper xml)`
`protected String` `unquote(String str)`

Methods inherited from class com.antelmann.webdav.WebdavClient
`getCharset, getPassword, getUrl, getUrlContent, getUsername, getXmlResponse, initHttpConsoleLogging, propfind, report, setCharset, setPassword, setUrl, setUsername`

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

Constructor Detail

### CarddavClient

    public CarddavClient(URL url,
                         String username,
                         String password)

Method Detail

### listCardXml

    public XmlHelper listCardXml()
                          throws IOException,
                                 SAXException,
                                 ParserConfigurationException,
                                 URISyntaxException

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

### listInfo

    public Collection<Properties> listInfo()
                                    throws IOException,
                                           SAXException,
                                           ParserConfigurationException,
                                           URISyntaxException

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

### listCards

    public ArrayList<CardHeader> listCards()
                                    throws IOException,
                                           SAXException,
                                           ParserConfigurationException,
                                           URISyntaxException

  maps href (the UID for the card) to etag

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

### unquote

    protected String unquote(String str)

### loadCardData

    public XmlHelper loadCardData()
                           throws IOException,
                                  SAXException,
                                  ParserConfigurationException,
                                  URISyntaxException

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

### loadCardData

    public XmlHelper loadCardData(Collection<String> ids)
                           throws IOException,
                                  SAXException,
                                  ParserConfigurationException,
                                  URISyntaxException

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

### loadCardDataForCategory

    @Todo(value="not working yet")
    public XmlHelper loadCardDataForCategory(String category)
                                      throws IOException,
                                             SAXException,
                                             ParserConfigurationException,
                                             URISyntaxException

  http://stackoverflow.com/questions/14137894/how-to-do-advanced-filters-in-carddav-webdav-report-request

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

### loadCardContent

    public String loadCardContent(String refid)
                           throws SAXException,
                                  IOException,
                                  ParserConfigurationException,
                                  URISyntaxException

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

### parseAddressData

    public static ArrayList<String> parseAddressData(XmlHelper xml)
                                              throws DOMException,
                                                     IOException

  Throws:
    `DOMException`
    `IOException`

### parseResponses

    public static ArrayList<XmlHelper> parseResponses(XmlHelper xml)
                                               throws DOMException,
                                                      IOException

  Throws:
    `DOMException`
    `IOException`

### parseEtag

    public static String parseEtag(String source)
                            throws SAXException,
                                   IOException,
                                   ParserConfigurationException

  Throws:
    `SAXException`
    `IOException`
    `ParserConfigurationException`

### parseEtag

    public static String parseEtag(XmlHelper xml)

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