ezvcard
Class Ezvcard.ParserChainHtmlString

java.lang.Object
  extended by ezvcard.Ezvcard.ParserChainHtmlString
Enclosing class:
Ezvcard

public static class Ezvcard.ParserChainHtmlString
extends Object

Chainer class for parsing HTML vCards.

See Also:
Ezvcard.parseHtml(String)

Method Summary
 List<VCard> all()
          Reads all vCards from the stream.
 VCard first()
          Reads the first vCard from the stream.
 Ezvcard.ParserChainHtmlString pageUrl(String pageUrl)
          Sets the original URL of the webpage.
 Ezvcard.ParserChainHtmlString register(VCardPropertyScribe<? extends VCardProperty> scribe)
          Registers a property scribe.
 Ezvcard.ParserChainHtmlString warnings(List<List<String>> warnings)
          Provides a list object that any unmarshal warnings will be put into.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

register

public Ezvcard.ParserChainHtmlString register(VCardPropertyScribe<? extends VCardProperty> scribe)
Registers a property scribe.

Parameters:
scribe - the scribe
Returns:
this

warnings

public Ezvcard.ParserChainHtmlString warnings(List<List<String>> warnings)
Provides a list object that any unmarshal warnings will be put into.

Parameters:
warnings - the list object that will be populated with the warnings of each unmarshalled vCard. Each element of the list is the list of warnings for one of the unmarshalled vCards. Therefore, the size of this list will be equal to the number of parsed vCards. If a vCard does not have any warnings, then its warning list will be empty.
Returns:
this

pageUrl

public Ezvcard.ParserChainHtmlString pageUrl(String pageUrl)
Sets the original URL of the webpage. This is used to resolve relative links and to set the SOURCE property on the vCard. Setting this property has no effect if reading from a URL.

Parameters:
pageUrl - the webpage URL
Returns:
this

first

public VCard first()
Reads the first vCard from the stream.

Returns:
the vCard or null if there are no vCards

all

public List<VCard> all()
Reads all vCards from the stream.

Returns:
the parsed vCards


Copyright © 2012-2014 Michael Angstadt. All Rights Reserved.