ezvcard
Class VCard

java.lang.Object
  extended by ezvcard.VCard
All Implemented Interfaces:
Iterable<VCardProperty>

public class VCard
extends Object
implements Iterable<VCardProperty>

Represents a vCard.

Author:
Michael Angstadt

Constructor Summary
VCard()
           
 
Method Summary
 void addAddress(Address address)
          Adds a mailing address.
 void addAddressAlt(Address... altRepresentations)
           Adds an address property as a group of alternative representations (see: description of ALTID).
 void addAddressAlt(Collection<Address> altRepresentations)
           Adds an address property as a group of alternative representations (see: description of ALTID).
 void addCalendarRequestUri(CalendarRequestUri calendarRequestUri)
          Adds a URI that can be used to schedule a meeting with the person on his or her calendar.
 void addCalendarRequestUriAlt(CalendarRequestUri... altRepresentations)
           Adds a calendar request URI property as a group of alternative representations (see: description of ALTID ).
 void addCalendarRequestUriAlt(Collection<CalendarRequestUri> altRepresentations)
           Adds a calendar request URI property as a group of alternative representations (see: description of ALTID ).
 void addCalendarUri(CalendarUri calendarUri)
          Adds a URI that points to the person's calendar.
 void addCalendarUriAlt(CalendarUri... altRepresentations)
           Adds a calendar URI property as a group of alternative representations (see: description of ALTID).
 void addCalendarUriAlt(Collection<CalendarUri> altRepresentations)
           Adds a calendar URI property as a group of alternative representations (see: description of ALTID).
 void addCategories(Categories categories)
           Adds a list of keywords (aka "tags") that can be used to describe the person.
 void addCategoriesAlt(Categories... altRepresentations)
           Adds a categories property as a group of alternative representations (see: description of ALTID).
 void addCategoriesAlt(Collection<Categories> altRepresentations)
           Adds a categories property as a group of alternative representations (see: description of ALTID).
 void addClientPidMap(ClientPidMap clientPidMap)
          Adds a property that is used to assign a globally-unique identifier to an individual property instance.
 void addEmail(Email email)
          Adds an email address.
 Email addEmail(String email, EmailType... types)
          Adds an email address.
 void addEmailAlt(Collection<Email> altRepresentations)
           Adds an email property as a group of alternative representations (see: description of ALTID).
 void addEmailAlt(Email... altRepresentations)
           Adds an email property as a group of alternative representations (see: description of ALTID).
 void addExpertise(Expertise expertise)
          Adds a professional subject area of which the the person is knowledgeable.
 Expertise addExpertise(String expertise)
          Adds a professional subject area of which the the person is knowledgeable.
 void addExpertiseAlt(Collection<Expertise> altRepresentations)
           Adds an expertise property as a group of alternative representations (see: description of ALTID).
 void addExpertiseAlt(Expertise... altRepresentations)
           Adds an expertise property as a group of alternative representations (see: description of ALTID).
 RawProperty addExtendedProperty(String name, String value)
          Adds an extended property.
 void addFbUrl(FreeBusyUrl fbUrl)
          Adds a URL that can be used to determine when the person is free and/or busy.
 void addFbUrlAlt(Collection<FreeBusyUrl> altRepresentations)
           Adds an fburl property as a group of alternative representations (see: description of ALTID).
 void addFbUrlAlt(FreeBusyUrl... altRepresentations)
           Adds an fburl property as a group of alternative representations (see: description of ALTID).
 void addFormattedName(FormattedName formattedName)
           Adds a text value used for displaying the person's name.
 void addFormattedNameAlt(Collection<FormattedName> altRepresentations)
           Adds a formatted name property as a group of alternative representations (see: description of ALTID).
 void addFormattedNameAlt(FormattedName... altRepresentations)
           Adds a formatted name property as a group of alternative representations (see: description of ALTID).
 void addGeo(Geo geo)
           Adds a geographical position of where the person lives/works.
 void addGeoAlt(Collection<Geo> altRepresentations)
           Adds a geographical position of where the person lives/works as a group of alternative representations (see: description of ALTID).
 void addGeoAlt(Geo... altRepresentations)
           Adds a geographical position of where the person lives/works as a group of alternative representations (see: description of ALTID).
 void addHobby(Hobby hobby)
          Adds a hobby that the person actively engages in.
 Hobby addHobby(String hobby)
          Adds a hobby that the person actively engages in.
 void addHobbyAlt(Collection<Hobby> altRepresentations)
           Adds a hobby property as a group of alternative representations (see: description of ALTID).
 void addHobbyAlt(Hobby... altRepresentations)
           Adds a hobby property as a group of alternative representations (see: description of ALTID).
 void addImpp(Impp impp)
          Adds an instant messaging handle.
 void addImppAlt(Collection<Impp> altRepresentations)
           Adds an impp property as a group of alternative representations (see: description of ALTID).
 void addImppAlt(Impp... altRepresentations)
           Adds an impp property as a group of alternative representations (see: description of ALTID).
 void addInterest(Interest interest)
          Adds an interest.
 Interest addInterest(String interest)
          Adds an interest.
 void addInterestAlt(Collection<Interest> altRepresentations)
           Adds an interest property as a group of alternative representations (see: description of ALTID).
 void addInterestAlt(Interest... altRepresentations)
           Adds an interest property as a group of alternative representations (see: description of ALTID).
 void addKey(Key key)
          Adds a public encryption key.
 void addKeyAlt(Collection<Key> altRepresentations)
           Adds a key property as a group of alternative representations (see: description of ALTID).
 void addKeyAlt(Key... altRepresentations)
           Adds a key property as a group of alternative representations (see: description of ALTID).
 void addLanguage(Language language)
          Adds a language that the person speaks.
 Language addLanguage(String language)
          Adds a language that the person speaks.
 void addLanguageAlt(Collection<Language> altRepresentations)
           Adds a language property as a group of alternative representations (see: description of ALTID).
 void addLanguageAlt(Language... altRepresentations)
           Adds a language property as a group of alternative representations (see: description of ALTID).
 void addLogo(Logo logo)
          Adds a logo to the vCard, such as a company logo.
 void addLogoAlt(Collection<Logo> altRepresentations)
           Adds a logo property as a group of alternative representations (see: description of ALTID).
 void addLogoAlt(Logo... altRepresentations)
           Adds a logo property as a group of alternative representations (see: description of ALTID).
 void addMember(Member member)
          Adds a member to the group.
 void addMemberAlt(Collection<Member> altRepresentations)
           Adds a member property as a group of alternative representations (see: description of ALTID).
 void addMemberAlt(Member... altRepresentations)
           Adds a member property as a group of alternative representations (see: description of ALTID).
 void addNickname(Nickname nickname)
           Adds a set of nicknames.
 void addNicknameAlt(Collection<Nickname> altRepresentations)
           Adds a nickname property as a group of alternative representations (see: description of ALTID).
 void addNicknameAlt(Nickname... altRepresentations)
           Adds a nickname property as a group of alternative representations (see: description of ALTID).
 void addNote(Note note)
          Adds a note.
 Note addNote(String note)
          Adds a note.
 void addNoteAlt(Collection<Note> altRepresentations)
           Adds a note property as a group of alternative representations (see: description of ALTID).
 void addNoteAlt(Note... altRepresentations)
           Adds a note property as a group of alternative representations (see: description of ALTID).
 void addOrganization(Organization organization)
           Adds a hierarchy of departments to which the person belongs.
 void addOrganizationAlt(Collection<Organization> altRepresentations)
           Adds an organization property as a group of alternative representations (see: description of ALTID).
 void addOrganizationAlt(Organization... altRepresentations)
           Adds an organization property as a group of alternative representations (see: description of ALTID).
 void addOrgDirectory(OrgDirectory orgDirectory)
          Adds an organization directory.
 OrgDirectory addOrgDirectory(String orgDirectory)
          Adds an organization directory.
 void addOrgDirectoryAlt(Collection<OrgDirectory> altRepresentations)
           Adds an org directory property as a group of alternative representations (see: description of ALTID).
 void addOrgDirectoryAlt(OrgDirectory... altRepresentations)
           Adds an org directory property as a group of alternative representations (see: description of ALTID).
 void addOrphanedLabel(Label label)
          Adds a mailing label which is not associated with any address.
 void addPhoto(Photo photo)
          Adds a photo to the vCard, such as a picture of the person's face.
 void addPhotoAlt(Collection<Photo> altRepresentations)
           Adds a photo property as a group of alternative representations (see: description of ALTID).
 void addPhotoAlt(Photo... altRepresentations)
           Adds a photo property as a group of alternative representations (see: description of ALTID).
 void addProperty(VCardProperty property)
          Adds a property.
<T extends VCardProperty & HasAltId>
void
addPropertyAlt(Class<T> propertyClass, Collection<T> altRepresentations)
          Adds a property in the form of a collection of alternative representations.
<T extends VCardProperty & HasAltId>
void
addPropertyAlt(Class<T> propertyClass, T... altRepresentations)
          Adds a property in the form of a collection of alternative representations.
 void addRelated(Related related)
          Adds someone that the person is related to.
 void addRelatedAlt(Collection<Related> altRepresentations)
           Adds a related property as a group of alternative representations (see: description of ALTID).
 void addRelatedAlt(Related... altRepresentations)
           Adds a related property as a group of alternative representations (see: description of ALTID).
 void addRole(Role role)
          Adds a role associated with the person.
 Role addRole(String role)
          Adds a role associated with the person.
 void addRoleAlt(Collection<Role> altRepresentations)
           Adds a role property as a group of alternative representations (see: description of ALTID).
 void addRoleAlt(Role... altRepresentations)
           Adds a role property as a group of alternative representations (see: description of ALTID).
 void addSound(Sound sound)
          Adds a sound to the vCard, such as a pronunciation of the person's name.
 void addSoundAlt(Collection<Sound> altRepresentations)
           Adds a sound property as a group of alternative representations (see: description of ALTID).
 void addSoundAlt(Sound... altRepresentations)
           Adds a sound property as a group of alternative representations (see: description of ALTID).
 void addSource(Source source)
          Adds a URI that can be used to retrieve the most up-to-date version of the person's vCard.
 Source addSource(String source)
          Adds a URI that can be used to retrieve the most up-to-date version of the person's vCard.
 void addSourceAlt(Collection<Source> altRepresentations)
           Adds a source property as a group of alternative representations (see: description of ALTID).
 void addSourceAlt(Source... altRepresentations)
           Adds a source property as a group of alternative representations (see: description of ALTID).
 Telephone addTelephoneNumber(String telephoneNumber, TelephoneType... types)
          Adds a telephone number.
 void addTelephoneNumber(Telephone telephoneNumber)
          Adds a telephone number.
 void addTelephoneNumberAlt(Collection<Telephone> altRepresentations)
           Adds a telephone property as a group of alternative representations (see: description of ALTID).
 void addTelephoneNumberAlt(Telephone... altRepresentations)
           Adds a telephone property as a group of alternative representations (see: description of ALTID).
 void addTimezone(Timezone timezone)
           Adds a timezone the person lives/works in.
 void addTimezoneAlt(Collection<Timezone> altRepresentations)
           Adds a timezone the person lives/works in as a group of alternative representations (see: description of ALTID ).
 void addTimezoneAlt(Timezone... altRepresentations)
           Adds a timezone the person lives/works in as a group of alternative representations (see: description of ALTID ).
 Title addTitle(String title)
          Adds a title associated with the person.
 void addTitle(Title title)
          Adds a title associated with the person.
 void addTitleAlt(Collection<Title> altRepresentations)
           Adds a title property as a group of alternative representations (see: description of ALTID).
 void addTitleAlt(Title... altRepresentations)
           Adds a title property as a group of alternative representations (see: description of ALTID).
 Url addUrl(String url)
          Adds a URL.
 void addUrl(Url url)
          Adds a URL.
 void addUrlAlt(Collection<Url> altRepresentations)
           Adds a URL property as a group of alternative representations (see: description of ALTID).
 void addUrlAlt(Url... altRepresentations)
           Adds a URL property as a group of alternative representations (see: description of ALTID).
 void addXml(Xml xml)
          Adds XML data to the vCard.
 void addXmlAlt(Collection<Xml> altRepresentations)
           Adds an XML property as a group of alternative representations (see: description of ALTID).
 void addXmlAlt(Xml... altRepresentations)
           Adds an XML property as a group of alternative representations (see: description of ALTID).
 List<Address> getAddresses()
          Gets the mailing addresses.
 Agent getAgent()
          Gets information about the person's agent.
 List<Anniversary> getAnniversaries()
           Gets all anniversary property instances.
 Anniversary getAnniversary()
           Gets the person's anniversary.
 Birthday getBirthday()
           Gets the person's birthday.
 List<Birthday> getBirthdays()
           Gets all birthday property instances.
 Birthplace getBirthplace()
           Gets the person's birthplace.
 List<Birthplace> getBirthplaces()
           Gets all birthplace property instances.
 List<CalendarRequestUri> getCalendarRequestUris()
          Gets the URIs that can be used to schedule a meeting with the person on his or her calendar.
 List<CalendarUri> getCalendarUris()
          Gets the URIs that point to the person's calendar.
 Categories getCategories()
           Gets the list of keywords (aka "tags") that can be used to describe the person.
 List<Categories> getCategoriesList()
           Gets all instances of the categories property.
 Classification getClassification()
          Gets the classification of the vCard, which describes the sensitivity of the information in the vCard.
 List<ClientPidMap> getClientPidMaps()
          Gets the properties that are used to assign globally-unique identifiers to individual property instances.
 Deathdate getDeathdate()
           Gets the person's time of death.
 List<Deathdate> getDeathdates()
           Gets all death date property instances.
 Deathplace getDeathplace()
           Gets the person's deathplace.
 List<Deathplace> getDeathplaces()
           Gets all deathplace property instances.
 List<Email> getEmails()
          Gets the email addresses.
 List<Expertise> getExpertise()
          Gets the professional subject areas of which the the person is knowledgeable.
 List<RawProperty> getExtendedProperties()
          Gets all extended properties.
 List<RawProperty> getExtendedProperties(String name)
          Gets all extended properties with a given name.
 RawProperty getExtendedProperty(String name)
          Gets the first extended property with a given name.
 List<FreeBusyUrl> getFbUrls()
          Gets the URLs that can be used to determine when the person is free and/or busy.
 FormattedName getFormattedName()
           Gets the text value used for displaying the person's name.
 List<FormattedName> getFormattedNames()
           Gets all instances of the formatted name property.
 Gender getGender()
          Gets the gender of the person.
 Geo getGeo()
           Gets the geographical position of where the person lives/works.
 List<Geo> getGeos()
           Gets all instances of the geo property.
 List<Hobby> getHobbies()
          Gets the hobbies that the person actively engages in.
 List<Impp> getImpps()
          Gets the instant messaging handles.
 List<Interest> getInterests()
          Gets the person's interests.
 List<Key> getKeys()
          Gets the public encryption keys.
 Kind getKind()
          Gets the type of entity this vCard represents.
 List<Language> getLanguages()
          Gets the languages that the person speaks.
 List<Logo> getLogos()
          Gets the logos attached to the vCard, such a company logo.
 Mailer getMailer()
          Gets the email client that the person uses.
 List<Member> getMembers()
          Gets the members of the group.
 Nickname getNickname()
           Gets the person's nicknames.
 List<Nickname> getNicknames()
           Gets all instances of the nickname property.
 List<Note> getNotes()
          Gets the notes.
 Organization getOrganization()
           Gets the hierarchy of department(s) to which the person belongs.
 List<Organization> getOrganizations()
           Gets all instances of the organization property.
 List<OrgDirectory> getOrgDirectories()
          Gets the organization directories.
 List<Label> getOrphanedLabels()
          Gets all mailing labels that could not be assigned to an address.
 List<Photo> getPhotos()
          Gets the photos attached to the vCard, such as a picture of the person's face.
 ProductId getProdId()
          Gets the product ID, which identifies the software that created the vCard.
 Profile getProfile()
          Gets the PROFILE property.
 Collection<VCardProperty> getProperties()
          Gets all the properties in this vCard.
<T extends VCardProperty>
List<T>
getProperties(Class<T> clazz)
          Gets all properties of a given class.
<T extends VCardProperty & HasAltId>
List<List<T>>
getPropertiesAlt(Class<T> clazz)
          Gets all properties of a given class, grouping the alternative representations of each property together (see: description of ALTID)
<T extends VCardProperty>
T
getProperty(Class<T> clazz)
          Gets the first property of a given class.
 List<Related> getRelations()
          Gets a list of people that the person is related to.
 Revision getRevision()
          Gets the time that the vCard was last modified.
 List<Role> getRoles()
          Gets the roles associated with the person.
 SortString getSortString()
           Gets the string that should be used to sort the vCard.
 List<Sound> getSounds()
          Gets the sounds attached to the vCard, such as a pronunciation of the person's name.
 SourceDisplayText getSourceDisplayText()
          Gets a textual representation of the SOURCE property.
 List<Source> getSources()
          Gets the URIs that can be used to retrieve the most up-to-date version of the person's vCard.
 StructuredName getStructuredName()
           Gets the individual components of the person's name.
 List<StructuredName> getStructuredNames()
           Gets all structured name properties.
 List<Telephone> getTelephoneNumbers()
          Gets the telephone numbers.
 Timezone getTimezone()
           Gets the timezone the person lives/works in.
 List<Timezone> getTimezones()
           Gets all instances of the timezone property.
 List<Title> getTitles()
          Gets the titles associated with the person.
 Uid getUid()
          Gets the unique identifier of the vCard.
 List<Url> getUrls()
          Gets the URLs.
 VCardVersion getVersion()
          Gets the version attached to this vCard.
 List<Xml> getXmls()
          Gets any XML data that is attached to the vCard.
 Iterator<VCardProperty> iterator()
          Iterates through each of the vCard's properties in no particular order.
 void removeExtendedProperty(String name)
          Removes all extended properties that have the given name.
 void removeProperties(Class<? extends VCardProperty> clazz)
          Removes all properties of a given class.
 void removeProperty(VCardProperty property)
          Removes a property instance from the vCard.
 void setAgent(Agent agent)
          Sets information about the person's agent.
 void setAnniversary(Anniversary anniversary)
           Sets the person's anniversary.
 void setAnniversaryAlt(Anniversary... altRepresentations)
           Sets the person's anniversary as a group of alternative representations (see VCardParameters.getAltId() for more details).
 void setAnniversaryAlt(Collection<Anniversary> altRepresentations)
           Sets the person's anniversary as a group of alternative representations (see VCardParameters.getAltId() for more details).
 void setBirthday(Birthday birthday)
           Sets the person's birthday.
 void setBirthdayAlt(Birthday... altRepresentations)
           Sets the person's birthday as a group of alternative representations (see: description of ALTID).
 void setBirthdayAlt(Collection<Birthday> altRepresentations)
           Sets the person's birthday as a group of alternative representations (see: description of ALTID).
 void setBirthplace(Birthplace birthplace)
           Sets the person's birthplace.
 void setBirthplaceAlt(Birthplace... altRepresentations)
           Sets the person's birthplace as a group of alternative representations (see: description of ALTID.
 void setBirthplaceAlt(Collection<Birthplace> altRepresentations)
           Sets the person's birthplace as a group of alternative representations (see: description of ALTID.
 void setCategories(Categories categories)
           Sets the list of keywords (aka "tags") that can be used to describe the person.
 Categories setCategories(String... categories)
           Sets the list of keywords (aka "tags") that can be used to describe the person.
 void setCategoriesAlt(Categories... altRepresentations)
           Sets the categories property as a group of alternative representations (see: description of ALTID).
 void setCategoriesAlt(Collection<Categories> altRepresentations)
           Sets the categories property as a group of alternative representations (see: description of ALTID).
 void setClassification(Classification classification)
          Sets the classification of the vCard, which describes the sensitivity of the information in the vCard.
 Classification setClassification(String classification)
          Sets the classification of the vCard, which describes the sensitivity of the information in the vCard.
 void setDeathdate(Deathdate deathdate)
           Sets the person's time of death.
 void setDeathdateAlt(Collection<Deathdate> altRepresentations)
           Sets the deathdate property as a group of alternative representations (see: description of ALTID).
 void setDeathdateAlt(Deathdate... altRepresentations)
           Sets the deathdate property as a group of alternative representations (see: description of ALTID).
 void setDeathplace(Deathplace deathplace)
           Sets the person's deathplace.
 void setDeathplaceAlt(Collection<Deathplace> altRepresentations)
           Sets the person's deathplace as a group of alternative representations (see VCardParameters.getAltId() for more details).
 void setDeathplaceAlt(Deathplace... altRepresentations)
           Sets the person's deathplace as a group of alternative representations (see VCardParameters.getAltId() for more details).
 RawProperty setExtendedProperty(String name, String value)
          Replaces all existing extended properties with the given name with a single property instance.
 void setFormattedName(FormattedName formattedName)
           Sets the text value used for displaying the person's name.
 FormattedName setFormattedName(String formattedName)
           Sets the text value used for displaying the person's name.
 void setFormattedNameAlt(Collection<FormattedName> altRepresentations)
           Sets the formatted name property as a group of alternative representations (see: description of ALTID ).
 void setFormattedNameAlt(FormattedName... altRepresentations)
           Sets the formatted name property as a group of alternative representations (see: description of ALTID ).
 void setGender(Gender gender)
          Sets the gender of the person.
 Geo setGeo(double latitude, double longitude)
           Sets the geographical position of where the person lives/works.
 void setGeo(Geo geo)
           Sets the geographical position of where the person lives/works.
 void setGeoAlt(Collection<Geo> altRepresentations)
           Sets the geographical position of where the person lives/works as a group of alternative representations (see: description of ALTID).
 void setKind(Kind kind)
          Sets the type of entity this vCard represents.
 void setMailer(Mailer mailer)
          Sets the email client that the person uses.
 Mailer setMailer(String mailer)
          Sets the email client that the person uses.
 void setNickname(Nickname nickname)
           Sets the person's nickname(s).
 Nickname setNickname(String... nicknames)
           Sets the person's nicknames.
 void setNicknameAlt(Collection<Nickname> altRepresentations)
           Sets the nickname property as a group of alternative representations (see: description of ALTID).
 void setNicknameAlt(Nickname... altRepresentations)
           Sets the nickname property as a group of alternative representations (see: description of ALTID).
 void setOrganization(Organization organization)
           Sets the hierarchy of departments to which the person belongs.
 Organization setOrganization(String... departments)
           Sets the hierarchy of departments to which the person belongs.
 void setOrganizationAlt(Collection<Organization> altRepresentations)
           Sets the organization property as a group of alternative representations (see: description of ALTID).
 void setOrganizationAlt(Organization... altRepresentations)
           Sets the organization property as a group of alternative representations (see: description of ALTID).
 void setProdId(ProductId prodId)
          Sets the product ID, which identifies the software that created the vCard.
 ProductId setProdId(String prodId)
          Sets the product ID, which identifies the software that created the vCard.
 void setProfile(Profile profile)
          Sets the PROFILE property.
<T extends VCardProperty>
void
setProperty(Class<T> clazz, T property)
          Replaces all existing properties of the given class with a single property instance.
<T extends VCardProperty & HasAltId>
void
setPropertyAlt(Class<T> propertyClass, Collection<T> altRepresentations)
          Sets a property in the form of a collection of alternative representations.
<T extends VCardProperty & HasAltId>
void
setPropertyAlt(Class<T> propertyClass, T... altRepresentations)
          Sets a property in the form of a collection of alternative representations.
 Revision setRevision(Date rev)
          Sets the time that the vCard was last modified.
 void setRevision(Revision rev)
          Sets the time that the vCard was last modified.
 void setSortString(SortString sortString)
           Sets the string that should be used to sort the vCard.
 SortString setSortString(String sortString)
           Sets the string that should be used to sort the vCard.
 void setSourceDisplayText(SourceDisplayText sourceDisplayText)
          Sets a textual representation of the SOURCE property.
 SourceDisplayText setSourceDisplayText(String sourceDisplayText)
          Sets a textual representation of the SOURCE property.
 void setStructuredName(StructuredName structuredName)
          Sets the individual components of the person's name.
 void setStructuredNameAlt(Collection<StructuredName> altRepresentations)
           Sets the structured name property as a group of alternative representations (see VCardParameters.getAltId() for more details).
 void setStructuredNameAlt(StructuredName... altRepresentations)
           Sets the structured name property as a group of alternative representations (see VCardParameters.getAltId() for more details).
 void setTimezone(Timezone timezone)
           Sets the timezone the person lives/works in.
 void setTimezoneAlt(Collection<Timezone> altRepresentations)
           Sets the timezone the person lives/works in as a group of alternative representations (see: description of ALTID ).
 void setTimezoneAlt(Timezone... altRepresentations)
           Sets the timezone the person lives/works in as a group of alternative representations (see: description of ALTID ).
 void setUid(Uid uid)
          Sets the unique identifier of the vCard.
 void setVersion(VCardVersion version)
          Sets the version of this vCard.
 ValidationWarnings validate(VCardVersion version)
          Checks this vCard for data consistency problems or deviations from the spec.
 String write()
           Marshals this vCard to its text representation.
 void write(File file)
           Marshals this vCard to its text representation.
 void write(OutputStream out)
           Marshals this vCard to its text representation.
 void write(Writer writer)
           Marshals this vCard to its text representation.
 String writeHtml()
           Marshals this vCard to a basic HTML page (hCard).
 void writeHtml(File file)
           Marshals this vCard to a basic HTML page (hCard).
 void writeHtml(OutputStream out)
           Marshals this vCard to a basic HTML page (hCard).
 void writeHtml(Writer writer)
           Marshals this vCard to a basic HTML page (hCard).
 String writeJson()
           Marshals this vCard to its JSON representation (jCard).
 void writeJson(File file)
           Marshals this vCard to its JSON representation (jCard).
 void writeJson(OutputStream out)
           Marshals this vCard to its JSON representation (jCard).
 void writeJson(Writer writer)
           Marshals this vCard to its JSON representation (jCard).
 String writeXml()
           Marshals this vCard to its XML representation (xCard).
 void writeXml(File file)
           Marshals this vCard to its XML representation (xCard).
 void writeXml(OutputStream out)
           Marshals this vCard to its XML representation (xCard).
 void writeXml(Writer writer)
           Marshals this vCard to its XML representation (xCard).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VCard

public VCard()
Method Detail

write

public String write()

Marshals this vCard to its text representation.

The vCard will be marshalled to whatever version is attached to this VCard object (see setVersion(VCardVersion)). If no version is set, then it will be marshalled to 3.0.

Use the Ezvcard class to customize the marshalling process and to write multiple vCards to the same stream.

Returns:
the vCard string
See Also:
Ezvcard, vCard 2.1, RFC 2426 (3.0), RFC 6350 (4.0)

write

public void write(File file)
           throws IOException

Marshals this vCard to its text representation.

The vCard will be marshalled to whatever version is attached to this VCard object (see setVersion(VCardVersion)). If no version is set, then it will be marshalled to 3.0.

Use the Ezvcard class to customize the marshalling process and to write multiple vCards to the same stream.

Parameters:
file - the file to write the vCard to
Throws:
IOException - if there's a problem writing to the file
See Also:
Ezvcard, vCard 2.1, RFC 2426 (3.0), RFC 6350 (4.0)

write

public void write(OutputStream out)
           throws IOException

Marshals this vCard to its text representation.

The vCard will be marshalled to whatever version is attached to this VCard object (see setVersion(VCardVersion)). If no version is set, then it will be marshalled to 3.0.

Use the Ezvcard class to customize the marshalling process and to write multiple vCards to the same stream.

Parameters:
out - the output stream to write the vCard to
Throws:
IOException - if there's a problem writing to the output stream
See Also:
Ezvcard, vCard 2.1, RFC 2426 (3.0), RFC 6350 (4.0)

write

public void write(Writer writer)
           throws IOException

Marshals this vCard to its text representation.

The vCard will be marshalled to whatever version is attached to this VCard object (see setVersion(VCardVersion)). If no version is set, then it will be marshalled to 3.0.

Use the Ezvcard class to customize the marshalling process and to write multiple vCards to the same stream.

Parameters:
writer - the writer to write the vCard to
Throws:
IOException - if there's a problem writing to the writer
See Also:
Ezvcard, vCard 2.1, RFC 2426 (3.0), RFC 6350 (4.0)

writeXml

public String writeXml()

Marshals this vCard to its XML representation (xCard).

Use the Ezvcard class to customize the marshalling process and to write multiple vCards to the same stream.

Returns:
the vCard XML document
See Also:
Ezvcard, RFC 6351

writeXml

public void writeXml(File file)
              throws IOException,
                     TransformerException

Marshals this vCard to its XML representation (xCard).

Use the Ezvcard class to customize the marshalling process and to write multiple vCards to the same stream.

Parameters:
file - the file to write to
Throws:
IOException - if there's a problem writing to the file
TransformerException - if there's a problem writing the vCard
See Also:
Ezvcard, RFC 6351

writeXml

public void writeXml(OutputStream out)
              throws TransformerException

Marshals this vCard to its XML representation (xCard).

Use the Ezvcard class to customize the marshalling process and to write multiple vCards to the same stream.

Parameters:
out - the output stream to write the vCard to
Throws:
TransformerException - if there's a problem writing to the output stream
See Also:
Ezvcard, RFC 6351

writeXml

public void writeXml(Writer writer)
              throws TransformerException

Marshals this vCard to its XML representation (xCard).

Use the Ezvcard class to customize the marshalling process and to write multiple vCards to the same stream.

Parameters:
writer - the writer to write the vCard to
Throws:
TransformerException - if there's a problem writing to the writer
See Also:
Ezvcard, RFC 6351

writeHtml

public String writeHtml()

Marshals this vCard to a basic HTML page (hCard).

Use the Ezvcard class to customize the marshalling process and to write multiple vCards to the same stream.

Returns:
the HTML page
See Also:
Ezvcard, hCard 1.0

writeHtml

public void writeHtml(File file)
               throws IOException

Marshals this vCard to a basic HTML page (hCard).

Use the Ezvcard class to customize the marshalling process and to write multiple vCards to the same stream.

Parameters:
file - the file to write to
Throws:
IOException - if there's a problem writing to the file
See Also:
Ezvcard, hCard 1.0

writeHtml

public void writeHtml(OutputStream out)
               throws IOException

Marshals this vCard to a basic HTML page (hCard).

Use the Ezvcard class to customize the marshalling process and to write multiple vCards to the same stream.

Parameters:
out - the output stream to write to
Throws:
IOException - if there's a problem writing to the output stream
See Also:
Ezvcard, hCard 1.0

writeHtml

public void writeHtml(Writer writer)
               throws IOException

Marshals this vCard to a basic HTML page (hCard).

Use the Ezvcard class to customize the marshalling process and to write multiple vCards to the same stream.

Parameters:
writer - the writer to write to
Throws:
IOException - if there's a problem writing to the writer
See Also:
Ezvcard, hCard 1.0

writeJson

public String writeJson()

Marshals this vCard to its JSON representation (jCard).

Use the Ezvcard class to customize the marshalling process and to write multiple vCards to the same stream.

Returns:
the JSON string
See Also:
Ezvcard, RFC 7095

writeJson

public void writeJson(File file)
               throws IOException

Marshals this vCard to its JSON representation (jCard).

Use the Ezvcard class to customize the marshalling process and to write multiple vCards to the same stream.

Parameters:
file - the file to write the vCard to
Throws:
IOException - if there's a problem writing to the file
See Also:
Ezvcard, RFC 7095

writeJson

public void writeJson(OutputStream out)
               throws IOException

Marshals this vCard to its JSON representation (jCard).

Use the Ezvcard class to customize the marshalling process and to write multiple vCards to the same stream.

Parameters:
out - the output stream to write the vCard to
Throws:
IOException - if there's a problem writing to the output stream
See Also:
Ezvcard, RFC 7095

writeJson

public void writeJson(Writer writer)
               throws IOException

Marshals this vCard to its JSON representation (jCard).

Use the Ezvcard class to customize the marshalling process and to write multiple vCards to the same stream.

Parameters:
writer - the writer to write the vCard to
Throws:
IOException - if there's a problem writing to the writer
See Also:
Ezvcard, RFC 7095

getVersion

public VCardVersion getVersion()
Gets the version attached to this vCard.

Returns:
the vCard version

setVersion

public void setVersion(VCardVersion version)
Sets the version of this vCard. When marshalling a vCard with the VCardWriter class, use the setTargetVersion method to define what version the vCard should be marshalled as. VCardWriter does not look at the version that is set on the VCard object.

Parameters:
version - the vCard version

getKind

public Kind getKind()
Gets the type of entity this vCard represents.

Property name: KIND

Supported versions: 4.0

Returns:
the kind

setKind

public void setKind(Kind kind)
Sets the type of entity this vCard represents.

Property name: KIND

Supported versions: 4.0

Parameters:
kind - the kind

getGender

public Gender getGender()
Gets the gender of the person.

Property name: GENDER

Supported versions: 4.0

Returns:
the gender

setGender

public void setGender(Gender gender)
Sets the gender of the person.

Property name: GENDER

Supported versions: 4.0

Parameters:
gender - the gender

getMembers

public List<Member> getMembers()
Gets the members of the group. Only valid if the KIND property is set to "group".

 VCard vcard = ...
 Kind kind = vcard.getKind();
 if (kind != null && kind.isGroup()){
   for (Member member : vcard.getMembers(){
     ...
   }
 }
 

Property name: MEMBER

Supported versions: 4.0

Returns:
the members

addMember

public void addMember(Member member)
Adds a member to the group. Only valid if the KIND property is set to "group".

 VCard vcard = new VCard();
 vcard.setKind(Kind.group());
 vcard.addMember(...);
 

Property name: MEMBER

Supported versions: 4.0

Parameters:
member - the member to add

addMemberAlt

public void addMemberAlt(Collection<Member> altRepresentations)

Adds a member property as a group of alternative representations (see: description of ALTID). An appropriate ALTID parameter value is automatically generated and assigned to the properties.

Property name: MEMBER

Supported versions: 4.0

Parameters:
altRepresentations - the alternative representations of the property

addMemberAlt

public void addMemberAlt(Member... altRepresentations)

Adds a member property as a group of alternative representations (see: description of ALTID). An appropriate ALTID parameter value is automatically generated and assigned to the properties.

Property name: MEMBER

Supported versions: 4.0

Parameters:
altRepresentations - the alternative representations of the property

getProfile

public Profile getProfile()
Gets the PROFILE property.

Property name: PROFILE

Supported versions: 3.0

Returns:
the property

setProfile

public void setProfile(Profile profile)
Sets the PROFILE property.

Property name: PROFILE

Supported versions: 3.0

Parameters:
profile - the property

getClassification

public Classification getClassification()
Gets the classification of the vCard, which describes the sensitivity of the information in the vCard.

Property name: CLASS

Supported versions: 3.0

Returns:
the classification

setClassification

public void setClassification(Classification classification)
Sets the classification of the vCard, which describes the sensitivity of the information in the vCard.

Property name: CLASS

Supported versions: 3.0

Parameters:
classification - the classification

setClassification

public Classification setClassification(String classification)
Sets the classification of the vCard, which describes the sensitivity of the information in the vCard. This is a convenience method for setClassification(Classification).

Property name: CLASS

Supported versions: 3.0

Parameters:
classification - the classification (e.g. "PUBLIC", "PRIVATE", "CONFIDENTIAL") or null to remove
Returns:
the property object that was created

getSources

public List<Source> getSources()
Gets the URIs that can be used to retrieve the most up-to-date version of the person's vCard.

Property name: SOURCE

Supported versions: 3.0, 4.0

Returns:
the sources

addSource

public void addSource(Source source)
Adds a URI that can be used to retrieve the most up-to-date version of the person's vCard.

Property name: SOURCE

Supported versions: 3.0, 4.0

Parameters:
source - the source

addSource

public Source addSource(String source)
Adds a URI that can be used to retrieve the most up-to-date version of the person's vCard. This is a convenience method for addSource(Source) .

Property name: SOURCE

Supported versions: 3.0, 4.0

Parameters:
source - the source URI (e.g. "http://example.com/vcard.vcf")
Returns:
the property object that was created

addSourceAlt

public void addSourceAlt(Collection<Source> altRepresentations)

Adds a source property as a group of alternative representations (see: description of ALTID). An appropriate ALTID parameter value is automatically generated and assigned to the properties.

Property name: SOURCE

Supported versions: 4.0*
* Only 4.0 supports alternative representations

Parameters:
altRepresentations - the alternative representations of the property

addSourceAlt

public void addSourceAlt(Source... altRepresentations)

Adds a source property as a group of alternative representations (see: description of ALTID). An appropriate ALTID parameter value is automatically generated and assigned to the properties.

Property name: SOURCE

Supported versions: 4.0*
* Only 4.0 supports alternative representations

Parameters:
altRepresentations - the alternative representations of the property

getSourceDisplayText

public SourceDisplayText getSourceDisplayText()
Gets a textual representation of the SOURCE property.

Property name: NAME

Supported versions: 3.0

Returns:
a textual representation of the vCard source

setSourceDisplayText

public void setSourceDisplayText(SourceDisplayText sourceDisplayText)
Sets a textual representation of the SOURCE property.

Property name: NAME

Supported versions: 3.0

Parameters:
sourceDisplayText - a textual representation of the vCard source

setSourceDisplayText

public SourceDisplayText setSourceDisplayText(String sourceDisplayText)
Sets a textual representation of the SOURCE property. This is a convenience method for setSourceDisplayText(SourceDisplayText).

Property name: NAME

Supported versions: 3.0

Parameters:
sourceDisplayText - a textual representation of the vCard source or null to remove
Returns:
the property object that was created

getFormattedNames

public List<FormattedName> getFormattedNames()

Gets all instances of the formatted name property. Version 4.0 vCards may have multiple instances if alternative representations are defined (see: description of ALTID) or if properties with different TYPE parameters are defined.

Property name: FN

Supported versions: 4.0*
* Only 4.0 supports multiple instances

Returns:
the formatted name properties

getFormattedName

public FormattedName getFormattedName()

Gets the text value used for displaying the person's name.

Property name: FN

Supported versions: 2.1, 3.0, 4.0

Returns:
the formatted name property or null if one doesn't exist

setFormattedNameAlt

public void setFormattedNameAlt(Collection<FormattedName> altRepresentations)

Sets the formatted name property as a group of alternative representations (see: description of ALTID ). An appropriate ALTID parameter value is automatically generated and assigned to the properties.

Property name: FN

Supported versions: 4.0*
* Only 4.0 supports alternative representations

Parameters:
altRepresentations - the alternative representations of the property

setFormattedNameAlt

public void setFormattedNameAlt(FormattedName... altRepresentations)

Sets the formatted name property as a group of alternative representations (see: description of ALTID ). An appropriate ALTID parameter value is automatically generated and assigned to the properties.

Property name: FN

Supported versions: 4.0*
* Only 4.0 supports alternative representations

Parameters:
altRepresentations - the alternative representations of the property

addFormattedNameAlt

public void addFormattedNameAlt(Collection<FormattedName> altRepresentations)

Adds a formatted name property as a group of alternative representations (see: description of ALTID). An appropriate ALTID parameter value is automatically generated and assigned to the properties.

Property name: FN

Supported versions: 4.0*
* Only 4.0 supports alternative representations

Parameters:
altRepresentations - the alternative representations of the property

addFormattedNameAlt

public void addFormattedNameAlt(FormattedName... altRepresentations)

Adds a formatted name property as a group of alternative representations (see: description of ALTID). An appropriate ALTID parameter value is automatically generated and assigned to the properties.

Property name: FN

Supported versions: 4.0*
* Only 4.0 supports alternative representations

Parameters:
altRepresentations - the alternative representations of the property

setFormattedName

public void setFormattedName(FormattedName formattedName)

Sets the text value used for displaying the person's name.

Property name: FN

Supported versions: 2.1, 3.0, 4.0

Parameters:
formattedName - the formatted name property or null to remove

addFormattedName

public void addFormattedName(FormattedName formattedName)

Adds a text value used for displaying the person's name. Note that only version 4.0 vCards support multiple instances of this property.

Property name: FN

Supported versions: 4.0*
* Only 4.0 supports multiple instances

Parameters:
formattedName - the formatted name property

setFormattedName

public FormattedName setFormattedName(String formattedName)

Sets the text value used for displaying the person's name. This is a convenience method for setFormattedName(FormattedName).

Property name: FN

Supported versions: 2.1, 3.0, 4.0

Parameters:
formattedName - the formatted name (e.g. "John Doe") or null to remove
Returns:
the property object that was created

getStructuredNames

public List<StructuredName> getStructuredNames()

Gets all structured name properties. Version 4.0 vCards may have multiple instances if alternative representations are defined (see: description of ALTID).

Property name: N

Supported versions: 4.0*

* Only 4.0 supports alternative representations

Returns:
the structured name property objects

getStructuredName

public StructuredName getStructuredName()

Gets the individual components of the person's name.

Property name: N

Supported versions: 2.1, 3.0, 4.0

Returns:
the components of the person's name

setStructuredNameAlt

public void setStructuredNameAlt(Collection<StructuredName> altRepresentations)

Sets the structured name property as a group of alternative representations (see VCardParameters.getAltId() for more details). An appropriate ALTID parameter value is automatically generated and assigned to the properties.

Property name: N

Supported versions: 4.0*
* Only 4.0 supports alternative representations

Parameters:
altRepresentations - the alternative representations of the property

setStructuredNameAlt

public void setStructuredNameAlt(StructuredName... altRepresentations)

Sets the structured name property as a group of alternative representations (see VCardParameters.getAltId() for more details). An appropriate ALTID parameter value is automatically generated and assigned to the properties.

Property name: N

Supported versions: 4.0*
* Only 4.0 supports alternative representations

Parameters:
altRepresentations - the alternative representations of the property

setStructuredName

public void setStructuredName(StructuredName structuredName)
Sets the individual components of the person's name.

Property name: N

Supported versions: 2.1, 3.0, 4.0

Parameters:
structuredName - the components of the person's name or null to remove

getNicknames

public List<Nickname> getNicknames()

Gets all instances of the nickname property. Version 4.0 vCards may have multiple instances if alternative representations are defined (see: description of ALTID) or if properties with different TYPE parameters are defined.

Property name: NICKNAME

Supported versions: 3.0, 4.0

Returns:
the nickname properties

getNickname

public Nickname getNickname()

Gets the person's nicknames.

Property name: NICKNAME

Supported versions: 3.0, 4.0

Returns:
the person's nicknames

setNicknameAlt

public void setNicknameAlt(Collection<Nickname> altRepresentations)

Sets the nickname property as a group of alternative representations (see: description of ALTID). An appropriate ALTID parameter value is automatically generated and assigned to the properties.

Property name: NICKNAME

Supported versions: 4.0*
* Only 4.0 supports alternative representations

Parameters:
altRepresentations - the alternative representations of the property

setNicknameAlt

public void setNicknameAlt(Nickname... altRepresentations)

Sets the nickname property as a group of alternative representations (see: description of ALTID). An appropriate ALTID parameter value is automatically generated and assigned to the properties.

Property name: NICKNAME

Supported versions: 4.0*
* Only 4.0 supports alternative representations

Parameters:
altRepresentations - the alternative representations of the property

addNicknameAlt

public void addNicknameAlt(Collection<Nickname> altRepresentations)

Adds a nickname property as a group of alternative representations (see: description of ALTID). An appropriate ALTID parameter value is automatically generated and assigned to the properties.

Property name: NICKNAME

Supported versions: 4.0*
* Only 4.0 supports alternative representations

Parameters:
altRepresentations - the alternative representations of the property

addNicknameAlt

public void addNicknameAlt(Nickname... altRepresentations)

Adds a nickname property as a group of alternative representations (see: description of ALTID). An appropriate ALTID parameter value is automatically generated and assigned to the properties.

Property name: NICKNAME

Supported versions: 4.0*
* Only 4.0 supports alternative representations

Parameters:
altRepresentations - the alternative representations of the property

setNickname

public void setNickname(Nickname nickname)

Sets the person's nickname(s).

Property name: NICKNAME

Supported versions: 3.0, 4.0

Parameters:
nickname - the nickname property or null to remove (note that multiple nicknames may be added this object)

addNickname

public void addNickname(Nickname nickname)

Adds a set of nicknames. Note that only version 4.0 vCards support multiple instances of this property.

Property name: NICKNAME

Supported versions: 4.0*
* Only 4.0 supports multiple instances

Parameters:
nickname - the nickname property (note that multiple nicknames may be added this object)

setNickname

public Nickname setNickname(String... nicknames)

Sets the person's nicknames. This is a convenience method for setNickname(Nickname).

Property name: NICKNAME

Supported versions: 3.0, 4.0

Parameters:
nicknames - the nickname(s) (e.g. "Jonny") or null to remove
Returns:
the property object that was created

getSortString

public SortString getSortString()

Gets the string that should be used to sort the vCard.

For 4.0 vCards, use the StructuredName.getSortAs() and/or Organization.getSortAs() methods.

Property name: SORT-STRING

Supported versions: 2.1, 3.0

Returns:
the sort string

setSortString

public void setSortString(SortString sortString)

Sets the string that should be used to sort the vCard.

For 4.0 vCards, use the StructuredName.setSortAs(java.lang.String) and/or Organization.setSortAs(java.lang.String...) methods.

Property name: SORT-STRING

Supported versions: 2.1, 3.0

Parameters:
sortString - the sort string

setSortString

public SortString setSortString(String sortString)

Sets the string that should be used to sort the vCard. This is a convenience method for setSortString(SortString).

For 4.0 vCards, use the StructuredName.setSortAs(java.lang.String) and/or Organization.setSortAs(java.lang.String...) methods.

Property name: SORT-STRING

Supported versions: 2.1, 3.0

Parameters:
sortString - the sort string (e.g. "Armour" if the person's last name is "d'Armour") or null to remove
Returns:
the property object that was created

getTitles

public List<Title> getTitles()
Gets the titles associated with the person.

Property name: TITLE

Supported versions: 2.1, 3.0, 4.0

Returns:
the titles

addTitle

public void addTitle(Title title)
Adds a title associated with the person.

Property name: TITLE

Supported versions: 2.1, 3.0, 4.0

Parameters:
title - the title

addTitle

public Title addTitle(String title)
Adds a title associated with the person. This is a convenience method for addTitle(Title).

Property name: TITLE

Supported versions: 2.1, 3.0, 4.0

Parameters:
title - the title (e.g. "V.P. Research and Development")
Returns:
the property object that was created

addTitleAlt

public void addTitleAlt(Collection<Title> altRepresentations)

Adds a title property as a group of alternative representations (see: description of ALTID). An appropriate ALTID parameter value is automatically generated and assigned to the properties.

Property name: TITLE

Supported versions: 4.0*
* Only 4.0 supports alternative representations

Parameters:
altRepresentations - the alternative representations of the property

addTitleAlt

public void addTitleAlt(Title... altRepresentations)

Adds a title property as a group of alternative representations (see: description of ALTID). An appropriate ALTID parameter value is automatically generated and assigned to the properties.

Property name: TITLE

Supported versions: 4.0*
* Only 4.0 supports alternative representations

Parameters:
altRepresentations - the alternative representations of the property

getRoles

public List<Role> getRoles()
Gets the roles associated with the person.

Property name: ROLE

Supported versions: 2.1, 3.0, 4.0

Returns:
the roles

addRole

public void addRole(Role role)
Adds a role associated with the person.

Property name: ROLE

Supported versions: 2.1, 3.0, 4.0

Parameters:
role - the role

addRole

public Role addRole(String role)
Adds a role associated with the person. This is a convenience method for addRole(Role).

Property name: ROLE

Supported versions: 2.1, 3.0, 4.0

Parameters:
role - the role (e.g. "Executive")
Returns:
the property object that was created

addRoleAlt

public void addRoleAlt(Collection<Role> altRepresentations)

Adds a role property as a group of alternative representations (see: description of ALTID). An appropriate ALTID parameter value is automatically generated and assigned to the properties.

Property name: ROLE

Supported versions: 4.0*
* Only 4.0 supports alternative representations

Parameters:
altRepresentations - the alternative representations of the property

addRoleAlt

public void addRoleAlt(Role... altRepresentations)

Adds a role property as a group of alternative representations (see: description of ALTID). An appropriate ALTID parameter value is automatically generated and assigned to the properties.

Property name: ROLE

Supported versions: 4.0*
* Only 4.0 supports alternative representations

Parameters:
altRepresentations - the alternative representations of the property

getPhotos

public List<Photo> getPhotos()
Gets the photos attached to the vCard, such as a picture of the person's face.

Property name: PHOTO

Supported versions: 2.1, 3.0, 4.0

Returns:
the photos

addPhoto

public void addPhoto(Photo photo)
Adds a photo to the vCard, such as a picture of the person's face.

Property name: PHOTO

Supported versions: 2.1, 3.0, 4.0

Parameters:
photo - the photo to add

addPhotoAlt

public void addPhotoAlt(Collection<Photo> altRepresentations)

Adds a photo property as a group of alternative representations (see: description of ALTID). An appropriate ALTID parameter value is automatically generated and assigned to the properties.

Property name: FN

Supported versions: 4.0*
* Only 4.0 supports alternative representations

Parameters:
altRepresentations - the alternative representations of the property

addPhotoAlt

public void addPhotoAlt(Photo... altRepresentations)

Adds a photo property as a group of alternative representations (see: description of ALTID). An appropriate ALTID parameter value is automatically generated and assigned to the properties.

Property name: FN

Supported versions: 4.0*
* Only 4.0 supports alternative representations

Parameters:
altRepresentations - the alternative representations of the property

getLogos

public List<Logo> getLogos()
Gets the logos attached to the vCard, such a company logo.

Property name: LOGO

Supported versions: 2.1, 3.0, 4.0

Returns:
the logos

addLogo

public void addLogo(Logo logo)
Adds a logo to the vCard, such as a company logo.

Property name: LOGO

Supported versions: 2.1, 3.0, 4.0

Parameters:
logo - the logo to add

addLogoAlt

public void addLogoAlt(Collection<Logo> altRepresentations)

Adds a logo property as a group of alternative representations (see: description of ALTID). An appropriate ALTID parameter value is automatically generated and assigned to the properties.

Property name: LOGO

Supported versions: 4.0*
* Only 4.0 supports alternative representations

Parameters:
altRepresentations - the alternative representations of the property

addLogoAlt

public void addLogoAlt(Logo... altRepresentations)

Adds a logo property as a group of alternative representations (see: description of ALTID). An appropriate ALTID parameter value is automatically generated and assigned to the properties.

Property name: LOGO

Supported versions: 4.0*
* Only 4.0 supports alternative representations

Parameters:
altRepresentations - the alternative representations of the property

getSounds

public List<Sound> getSounds()
Gets the sounds attached to the vCard, such as a pronunciation of the person's name.

Property name: SOUND

Supported versions: 2.1, 3.0, 4.0

Returns:
the sounds

addSound

public void addSound(Sound sound)
Adds a sound to the vCard, such as a pronunciation of the person's name.

Property name: SOUND

Supported versions: 2.1, 3.0, 4.0

Parameters:
sound - the sound to add

addSoundAlt

public void addSoundAlt(Collection<Sound> altRepresentations)

Adds a sound property as a group of alternative representations (see: description of ALTID). An appropriate ALTID parameter value is automatically generated and assigned to the properties.

Property name: FN

Supported versions: 4.0*
* Only 4.0 supports alternative representations

Parameters:
altRepresentations - the alternative representations of the property

addSoundAlt

public void addSoundAlt(Sound... altRepresentations)

Adds a sound property as a group of alternative representations (see: description of ALTID). An appropriate ALTID parameter value is automatically generated and assigned to the properties.

Property name: FN

Supported versions: 4.0*
* Only 4.0 supports alternative representations

Parameters:
altRepresentations - the alternative representations of the property

getBirthplaces

public List<Birthplace> getBirthplaces()

Gets all birthplace property instances. There may be multiple instances if alternative representations are defined (see: description of ALTID).

Property name: BIRTHPLACE

Supported versions: 4.0

Returns:
the birthplace properties
See Also:
RFC 6474

getBirthplace

public Birthplace getBirthplace()

Gets the person's birthplace.

Property name: BIRTHPLACE

Supported versions: 4.0

Returns:
the birthplace or null if one doesn't exist
See Also:
RFC 6474

setBirthplaceAlt

public void setBirthplaceAlt(Collection<Birthplace> altRepresentations)

Sets the person's birthplace as a group of alternative representations (see: description of ALTID. An appropriate ALTID parameter value is automatically generated and assigned to the properties.

Property name: BIRTHPLACE

Supported versions: 4.0

Parameters:
altRepresentations - the alternative representations of the property
See Also:
RFC 6474

setBirthplaceAlt

public void setBirthplaceAlt(Birthplace... altRepresentations)

Sets the person's birthplace as a group of alternative representations (see: description of ALTID. An appropriate ALTID parameter value is automatically generated and assigned to the properties.

Property name: BIRTHPLACE

Supported versions: 4.0

Parameters:
altRepresentations - the alternative representations of the property
See Also:
RFC 6474

setBirthplace

public void setBirthplace(Birthplace birthplace)

Sets the person's birthplace.

Property name: BIRTHPLACE

Supported versions: 4.0

Parameters:
birthplace - the birthplace or null to remove
See Also:
RFC 6474

getDeathplaces

public List<Deathplace> getDeathplaces()

Gets all deathplace property instances. There may be multiple instances if alternative representations are defined (see: description of ALTID).

Property name: DEATHPLACE

Supported versions: 4.0

Returns:
the deathplace properties
See Also:
RFC 6474

getDeathplace

public Deathplace getDeathplace()

Gets the person's deathplace.

Property name: DEATHPLACE

Supported versions: 4.0

Returns:
the deathplace or null if one doesn't exist
See Also:
RFC 6474

setDeathplaceAlt

public void setDeathplaceAlt(Collection<Deathplace> altRepresentations)

Sets the person's deathplace as a group of alternative representations (see VCardParameters.getAltId() for more details). An appropriate ALTID parameter value is automatically generated and assigned to the properties.

Property name: DEATHPLACE

Supported versions: 4.0

Parameters:
altRepresentations - the alternative representations of the property
See Also:
RFC 6474

setDeathplaceAlt

public void setDeathplaceAlt(Deathplace... altRepresentations)

Sets the person's deathplace as a group of alternative representations (see VCardParameters.getAltId() for more details). An appropriate ALTID parameter value is automatically generated and assigned to the properties.

Property name: DEATHPLACE

Supported versions: 4.0

Parameters:
altRepresentations - the alternative representations of the property
See Also:
RFC 6474

setDeathplace

public void setDeathplace(Deathplace deathplace)

Sets the person's deathplace.

Property name: DEATHPLACE

Supported versions: 4.0

Parameters:
deathplace - the deathplace or null to remove
See Also:
RFC 6474

getDeathdates

public List<Deathdate> getDeathdates()

Gets all death date property instances. There may be multiple instances if alternative representations are defined (see: description of ALTID).

Property name: DEATHDATE

Supported versions: 4.0

Returns:
the death date properties
See Also:
RFC 6474

getDeathdate

public Deathdate getDeathdate()

Gets the person's time of death.

Property name: DEATHDATE

Supported versions: 4.0

Returns:
the time of death or null if one doesn't exist
See Also:
RFC 6474

setDeathdateAlt

public void setDeathdateAlt(Collection<Deathdate> altRepresentations)

Sets the deathdate property as a group of alternative representations (see: description of ALTID). An appropriate ALTID parameter value is automatically generated and assigned to the properties.

Property name: DEATHDATE

Supported versions: 4.0

Parameters:
altRepresentations - the alternative representations of the property

setDeathdateAlt

public void setDeathdateAlt(Deathdate... altRepresentations)

Sets the deathdate property as a group of alternative representations (see: description of ALTID). An appropriate ALTID parameter value is automatically generated and assigned to the properties.

Property name: DEATHDATE

Supported versions: 4.0

Parameters:
altRepresentations - the alternative representations of the property

setDeathdate

public void setDeathdate(Deathdate deathdate)

Sets the person's time of death.

Property name: DEATHDATE

Supported versions: 4.0

Parameters:
deathdate - the time of death or null to remove
See Also:
RFC 6474

getBirthdays

public List<Birthday> getBirthdays()

Gets all birthday property instances. Version 4.0 vCards may have multiple instances if alternative representations are defined (see: description of ALTID).

Property name: BDAY

Supported versions: 4.0*
* Only 4.0 supports alternative representations

Returns:
the birthday properties

getBirthday

public Birthday getBirthday()

Gets the person's birthday.

Property name: BDAY

Supported versions: 2.1, 3.0, 4.0

Returns:
the birthday

setBirthdayAlt

public void setBirthdayAlt(Collection<Birthday> altRepresentations)

Sets the person's birthday as a group of alternative representations (see: description of ALTID). An appropriate ALTID parameter value is automatically generated and assigned to the properties.

Property name: BDAY

Supported versions: 4.0*
* Only 4.0 supports alternative representations

Parameters:
altRepresentations - the alternative representations of the property

setBirthdayAlt

public void setBirthdayAlt(Birthday... altRepresentations)

Sets the person's birthday as a group of alternative representations (see: description of ALTID). An appropriate ALTID parameter value is automatically generated and assigned to the properties.

Property name: BDAY

Supported versions: 4.0*
* Only 4.0 supports alternative representations

Parameters:
altRepresentations - the alternative representations of the property

setBirthday

public void setBirthday(Birthday birthday)

Sets the person's birthday.

Property name: BDAY

Supported versions: 2.1, 3.0, 4.0

Parameters:
birthday - the birthday or null to remove

getAnniversaries

public List<Anniversary> getAnniversaries()

Gets all anniversary property instances. There may be multiple instances if alternative representations are defined (see: description of ALTID).

Property name: ANNIVERSARY

Supported versions: 4.0

Returns:
the anniversary properties

getAnniversary

public Anniversary getAnniversary()

Gets the person's anniversary.

Property name: ANNIVERSARY

Supported versions: 4.0

Returns:
the anniversary

setAnniversaryAlt

public void setAnniversaryAlt(Collection<Anniversary> altRepresentations)

Sets the person's anniversary as a group of alternative representations (see VCardParameters.getAltId() for more details). An appropriate ALTID parameter value is automatically generated and assigned to the properties.

Property name: ANNIVERSARY

Supported versions: 4.0

Parameters:
altRepresentations - the alternative representations of the property

setAnniversaryAlt

public void setAnniversaryAlt(Anniversary... altRepresentations)

Sets the person's anniversary as a group of alternative representations (see VCardParameters.getAltId() for more details). An appropriate ALTID parameter value is automatically generated and assigned to the properties.

Property name: ANNIVERSARY

Supported versions: 4.0

Parameters:
altRepresentations - the alternative representations of the property

setAnniversary

public void setAnniversary(Anniversary anniversary)

Sets the person's anniversary.

Property name: ANNIVERSARY

Supported versions: 4.0

Parameters:
anniversary - the anniversary or null to remove

getRevision

public Revision getRevision()
Gets the time that the vCard was last modified.

Property name: REV

Supported versions: 2.1, 3.0, 4.0

Returns:
the last modified time

setRevision

public void setRevision(Revision rev)
Sets the time that the vCard was last modified.

Property name: REV

Supported versions: 2.1, 3.0, 4.0

Parameters:
rev - the last modified time

setRevision

public Revision setRevision(Date rev)
Sets the time that the vCard was last modified. This is a convenience method for setRevision(Revision).

Property name: REV

Supported versions: 2.1, 3.0, 4.0

Parameters:
rev - the last modified time or null to remove
Returns:
the property object that was created

getProdId

public ProductId getProdId()
Gets the product ID, which identifies the software that created the vCard.

Property name: PRODID

Supported versions: 3.0, 4.0

Returns:
the product ID

setProdId

public void setProdId(ProductId prodId)
Sets the product ID, which identifies the software that created the vCard.

Property name: PRODID

Supported versions: 3.0, 4.0

Parameters:
prodId - the product ID

setProdId

public ProductId setProdId(String prodId)
Sets the product ID, which identifies the software that created the vCard. This is a convenience method for setProdId(ProductId).

Property name: PRODID

Supported versions: 3.0, 4.0

Parameters:
prodId - the product ID (e.g. "ez-vcard 1.0") or null to remove
Returns:
the property object that was created

getAddresses

public List<Address> getAddresses()
Gets the mailing addresses.

Property name: ADR

Supported versions: 2.1, 3.0, 4.0

Returns:
the mailing addresses

addAddress

public void addAddress(Address address)
Adds a mailing address.

Property name: ADR

Supported versions: 2.1, 3.0, 4.0

Parameters:
address - the mailing address to add

addAddressAlt

public void addAddressAlt(Collection<Address> altRepresentations)

Adds an address property as a group of alternative representations (see: description of ALTID). An appropriate ALTID parameter value is automatically generated and assigned to the properties.

Property name: ADR

Supported versions: 4.0*
* Only 4.0 supports alternative representations

Parameters:
altRepresentations - the alternative representations of the property

addAddressAlt

public void addAddressAlt(Address... altRepresentations)

Adds an address property as a group of alternative representations (see: description of ALTID). An appropriate ALTID parameter value is automatically generated and assigned to the properties.

Property name: ADR

Supported versions: 4.0*
* Only 4.0 supports alternative representations

Parameters:
altRepresentations - the alternative representations of the property

getOrphanedLabels

public List<Label> getOrphanedLabels()
Gets all mailing labels that could not be assigned to an address. Use Address.getLabel() to get a label that has been assigned to an address.

Property name: LABEL

Supported versions: 2.1, 3.0

Returns:
the orphaned labels

addOrphanedLabel

public void addOrphanedLabel(Label label)
Adds a mailing label which is not associated with any address. Use of this method is discouraged. To add a mailing label to an address, use the Address.setLabel(java.lang.String) method.

Property name: LABEL

Supported versions: 2.1, 3.0

Parameters:
label - the orphaned label to add

getEmails

public List<Email> getEmails()
Gets the email addresses.

Property name: EMAIL

Supported versions: 2.1, 3.0, 4.0

Returns:
the email addresses

addEmail

public void addEmail(Email email)
Adds an email address.

Property name: EMAIL

Supported versions: 2.1, 3.0, 4.0

Parameters:
email - the email address to add

addEmail

public Email addEmail(String email,
                      EmailType... types)
Adds an email address. This is a convenience method for addEmail(Email).

Property name: EMAIL

Supported versions: 2.1, 3.0, 4.0

Parameters:
email - the email address to add (e.g. "[email protected]")
types - the type(s) to assign to the email
Returns:
the property object that was created

addEmailAlt

public void addEmailAlt(Collection<Email> altRepresentations)

Adds an email property as a group of alternative representations (see: description of ALTID). An appropriate ALTID parameter value is automatically generated and assigned to the properties.

Property name: EMAIL

Supported versions: 4.0*
* Only 4.0 supports alternative representations

Parameters:
altRepresentations - the alternative representations of the property

addEmailAlt

public void addEmailAlt(Email... altRepresentations)

Adds an email property as a group of alternative representations (see: description of ALTID). An appropriate ALTID parameter value is automatically generated and assigned to the properties.

Property name: EMAIL

Supported versions: 4.0*
* Only 4.0 supports alternative representations

Parameters:
altRepresentations - the alternative representations of the property

getTelephoneNumbers

public List<Telephone> getTelephoneNumbers()
Gets the telephone numbers.

Property name: TEL

Supported versions: 2.1, 3.0, 4.0

Returns:
the telephone numbers

addTelephoneNumber

public void addTelephoneNumber(Telephone telephoneNumber)
Adds a telephone number.

Property name: TEL

Supported versions: 2.1, 3.0, 4.0

Parameters:
telephoneNumber - the telephone number to add

addTelephoneNumber

public Telephone addTelephoneNumber(String telephoneNumber,
                                    TelephoneType... types)
Adds a telephone number. This is a convenience method for addTelephoneNumber(Telephone).

Property name: TEL

Supported versions: 2.1, 3.0, 4.0

Parameters:
telephoneNumber - the telephone number to add (e.g. "+1 555-555-5555")
types - the type(s) to assign to the telephone number (e.g. "cell", "work", etc)
Returns:
the property object that was created

addTelephoneNumberAlt

public void addTelephoneNumberAlt(Collection<Telephone> altRepresentations)

Adds a telephone property as a group of alternative representations (see: description of ALTID). An appropriate ALTID parameter value is automatically generated and assigned to the properties.

Property name: TEL

Supported versions: 4.0*
* Only 4.0 supports alternative representations

Parameters:
altRepresentations - the alternative representations of the property

addTelephoneNumberAlt

public void addTelephoneNumberAlt(Telephone... altRepresentations)

Adds a telephone property as a group of alternative representations (see: description of ALTID). An appropriate ALTID parameter value is automatically generated and assigned to the properties.

Property name: TEL

Supported versions: 4.0*
* Only 4.0 supports alternative representations

Parameters:
altRepresentations - the alternative representations of the property

getMailer

public Mailer getMailer()
Gets the email client that the person uses.

Property name: MAILER

Supported versions: 2.1, 3.0

Returns:
the email client

setMailer

public void setMailer(Mailer mailer)
Sets the email client that the person uses.

Property name: MAILER

Supported versions: 2.1, 3.0

Parameters:
mailer - the email client

setMailer

public Mailer setMailer(String mailer)
Sets the email client that the person uses. This is a convenience method for setMailer(Mailer).

Property name: MAILER

Supported versions: 2.1, 3.0

Parameters:
mailer - the email client (e.g. "Thunderbird") or null to remove
Returns:
the property object that was created

getUrls

public List<Url> getUrls()
Gets the URLs. URLs can point to websites such as a personal homepage or business website.

Property name: URL

Supported versions: 2.1, 3.0, 4.0

Returns:
the URLs

addUrl

public void addUrl(Url url)
Adds a URL. URLs can point to websites such as a personal homepage or business website.

Property name: URL

Supported versions: 2.1, 3.0, 4.0

Parameters:
url - the URL to add

addUrl

public Url addUrl(String url)
Adds a URL. URLs can point to websites such as a personal homepage or business website. This is a convenience method for addUrl(Url).

Property name: URL

Supported versions: 2.1, 3.0, 4.0

Parameters:
url - the URL to add (e.g. "http://example.com")
Returns:
the property object that was created

addUrlAlt

public void addUrlAlt(Collection<Url> altRepresentations)

Adds a URL property as a group of alternative representations (see: description of ALTID). An appropriate ALTID parameter value is automatically generated and assigned to the properties.

Property name: URL

Supported versions: 4.0*
* Only 4.0 supports alternative representations

Parameters:
altRepresentations - the alternative representations of the property

addUrlAlt

public void addUrlAlt(Url... altRepresentations)

Adds a URL property as a group of alternative representations (see: description of ALTID). An appropriate ALTID parameter value is automatically generated and assigned to the properties.

Property name: URL

Supported versions: 4.0*
* Only 4.0 supports alternative representations

Parameters:
altRepresentations - the alternative representations of the property

getTimezones

public List<Timezone> getTimezones()

Gets all instances of the timezone property. Version 4.0 vCards may have multiple instances if alternative representations are defined (see: description of ALTID) or if properties with different TYPE parameters are defined.

Property name: TZ

Supported versions: 4.0*
* Only 4.0 supports multiple instances

Returns:
the timezones

getTimezone

public Timezone getTimezone()

Gets the timezone the person lives/works in.

Property name: TZ

Supported versions: 2.1, 3.0, 4.0

Returns:
the timezone

setTimezoneAlt

public void setTimezoneAlt(Collection<Timezone> altRepresentations)

Sets the timezone the person lives/works in as a group of alternative representations (see: description of ALTID ). An appropriate ALTID parameter value is automatically generated and assigned to the properties.

Property name: TZ

Supported versions: 4.0*
* Only 4.0 supports alternative representations

Parameters:
altRepresentations - the alternative representations of the property

setTimezoneAlt

public void setTimezoneAlt(Timezone... altRepresentations)

Sets the timezone the person lives/works in as a group of alternative representations (see: description of ALTID ). An appropriate ALTID parameter value is automatically generated and assigned to the properties.

Property name: TZ

Supported versions: 4.0*
* Only 4.0 supports alternative representations

Parameters:
altRepresentations - the alternative representations of the property

addTimezoneAlt

public void addTimezoneAlt(Collection<Timezone> altRepresentations)

Adds a timezone the person lives/works in as a group of alternative representations (see: description of ALTID ). An appropriate ALTID parameter value is automatically generated and assigned to the properties.

Property name: TZ

Supported versions: 4.0*
* Only 4.0 supports alternative representations

Parameters:
altRepresentations - the alternative representations of the property

addTimezoneAlt

public void addTimezoneAlt(Timezone... altRepresentations)

Adds a timezone the person lives/works in as a group of alternative representations (see: description of ALTID ). An appropriate ALTID parameter value is automatically generated and assigned to the properties.

Property name: TZ

Supported versions: 4.0*
* Only 4.0 supports alternative representations

Parameters:
altRepresentations - the alternative representations of the property

setTimezone

public void setTimezone(Timezone timezone)

Sets the timezone the person lives/works in.

Property name: TZ

Supported versions: 2.1, 3.0, 4.0

Parameters:
timezone - the timezone or null to remove

addTimezone

public void addTimezone(Timezone timezone)

Adds a timezone the person lives/works in.

Property name: TZ

Supported versions: 4.0*
* Only 4.0 supports multiple instances

Parameters:
timezone - the timezone or null to remove

getGeos

public List<Geo> getGeos()

Gets all instances of the geo property. Version 4.0 vCards may have multiple instances if alternative representations are defined (see: description of ALTID) or if properties with different TYPE parameters are defined.

Property name: GEO

Supported versions: 4.0*
* Only 4.0 supports multiple instances

Returns:
the geo properties

getGeo

public Geo getGeo()

Gets the geographical position of where the person lives/works.

Property name: GEO

Supported versions: 2.1, 3.0, 4.0

Returns:
the geographical position or null if one doesn't exist

setGeoAlt

public void setGeoAlt(Collection<Geo> altRepresentations)

Sets the geographical position of where the person lives/works as a group of alternative representations (see: description of ALTID). An appropriate ALTID parameter value is automatically generated and assigned to the properties.

Property name: GEO

Supported versions: 4.0*
* Only 4.0 supports alternative representations

Parameters:
altRepresentations - the alternative representations of the property

addGeoAlt

public void addGeoAlt(Collection<Geo> altRepresentations)

Adds a geographical position of where the person lives/works as a group of alternative representations (see: description of ALTID). An appropriate ALTID parameter value is automatically generated and assigned to the properties.

Property name: GEO

Supported versions: 4.0*
* Only 4.0 supports alternative representations

Parameters:
altRepresentations - the alternative representations of the property

addGeoAlt

public void addGeoAlt(Geo... altRepresentations)

Adds a geographical position of where the person lives/works as a group of alternative representations (see: description of ALTID). An appropriate ALTID parameter value is automatically generated and assigned to the properties.

Property name: GEO

Supported versions: 4.0*
* Only 4.0 supports alternative representations

Parameters:
altRepresentations - the alternative representations of the property

setGeo

public void setGeo(Geo geo)

Sets the geographical position of where the person lives/works.

Property name: GEO

Supported versions: 2.1, 3.0, 4.0

Parameters:
geo - the geographical position or null to remove

addGeo

public void addGeo(Geo geo)

Adds a geographical position of where the person lives/works. Note that only version 4.0 vCards support multiple instances of this property.

Property name: GEO

Supported versions: 4.0*
* Only 4.0 supports multiple instances

Parameters:
geo - the geographical position

setGeo

public Geo setGeo(double latitude,
                  double longitude)

Sets the geographical position of where the person lives/works. This is a convenience method for setGeo(Geo).

Property name: GEO

Supported versions: 2.1, 3.0, 4.0

Parameters:
latitude - the latitude
longitude - the longitude
Returns:
the property object that was created

getOrganizations

public List<Organization> getOrganizations()

Gets all instances of the organization property. Version 4.0 vCards may have multiple instances if alternative representations are defined (see: description of ALTID) or if properties with different TYPE parameters are defined.

Property name: ORG

Supported versions: 4.0*
* Only 4.0 supports multiple instances

Returns:
the organization properties

getOrganization

public Organization getOrganization()

Gets the hierarchy of department(s) to which the person belongs.

Property name: ORG

Supported versions: 2.1, 3.0, 4.0

Returns:
the department(s)

setOrganizationAlt

public void setOrganizationAlt(Collection<Organization> altRepresentations)

Sets the organization property as a group of alternative representations (see: description of ALTID). An appropriate ALTID parameter value is automatically generated and assigned to the properties.

Property name: ORG

Supported versions: 4.0*
* Only 4.0 supports alternative representations

Parameters:
altRepresentations - the alternative representations of the property

setOrganizationAlt

public void setOrganizationAlt(Organization... altRepresentations)

Sets the organization property as a group of alternative representations (see: description of ALTID). An appropriate ALTID parameter value is automatically generated and assigned to the properties.

Property name: ORG

Supported versions: 4.0*
* Only 4.0 supports alternative representations

Parameters:
altRepresentations - the alternative representations of the property

addOrganizationAlt

public void addOrganizationAlt(Collection<Organization> altRepresentations)

Adds an organization property as a group of alternative representations (see: description of ALTID). An appropriate ALTID parameter value is automatically generated and assigned to the properties.

Property name: ORG

Supported versions: 4.0*
* Only 4.0 supports alternative representations

Parameters:
altRepresentations - the alternative representations of the property

addOrganizationAlt

public void addOrganizationAlt(Organization... altRepresentations)

Adds an organization property as a group of alternative representations (see: description of ALTID). An appropriate ALTID parameter value is automatically generated and assigned to the properties.

Property name: ORG

Supported versions: 4.0*
* Only 4.0 supports alternative representations

Parameters:
altRepresentations - the alternative representations of the property

setOrganization

public void setOrganization(Organization organization)

Sets the hierarchy of departments to which the person belongs.

Property name: ORG

Supported versions: 2.1, 3.0, 4.0

Parameters:
organization - the organization property or null to remove

addOrganization

public void addOrganization(Organization organization)

Adds a hierarchy of departments to which the person belongs. Note that only version 4.0 vCards support multiple instances of this property.

Property name: ORG

Supported versions: 4.0*
* Only 4.0 supports multiple instances

Parameters:
organization - the organization property

setOrganization

public Organization setOrganization(String... departments)

Sets the hierarchy of departments to which the person belongs. This is a convenience method for setOrganization(Organization).

Property name: ORG

Supported versions: 2.1, 3.0, 4.0

Parameters:
departments - the ordered list of department(s), starting with the broadest and ending with the most specific (e.g. "Google", "GMail Team", "Spam Detection Squad") or null to remove
Returns:
the property object that was created

getCategoriesList

public List<Categories> getCategoriesList()

Gets all instances of the categories property. Version 4.0 vCards may have multiple instances if alternative representations are defined (see: description of ALTID) or if properties with different TYPE parameters are defined.

Property name: CATEGORIES

Supported versions: 4.0*
* Only 4.0 supports multiple instances

Returns:
the categories properties

getCategories

public Categories getCategories()

Gets the list of keywords (aka "tags") that can be used to describe the person.

Property name: CATEGORIES

Supported versions: 2.1, 3.0, 4.0

Returns:
the categories

setCategoriesAlt

public void setCategoriesAlt(Collection<Categories> altRepresentations)

Sets the categories property as a group of alternative representations (see: description of ALTID). An appropriate ALTID parameter value is automatically generated and assigned to the properties.

Property name: CATEGORIES

Supported versions: 4.0*
* Only 4.0 supports alternative representations

Parameters:
altRepresentations - the alternative representations of the property

setCategoriesAlt

public void setCategoriesAlt(Categories... altRepresentations)

Sets the categories property as a group of alternative representations (see: description of ALTID). An appropriate ALTID parameter value is automatically generated and assigned to the properties.

Property name: CATEGORIES

Supported versions: 4.0*
* Only 4.0 supports alternative representations

Parameters:
altRepresentations - the alternative representations of the property

addCategoriesAlt

public void addCategoriesAlt(Collection<Categories> altRepresentations)

Adds a categories property as a group of alternative representations (see: description of ALTID). An appropriate ALTID parameter value is automatically generated and assigned to the properties.

Property name: CATEGORIES

Supported versions: 4.0*
* Only 4.0 supports alternative representations

Parameters:
altRepresentations - the alternative representations of the property

addCategoriesAlt

public void addCategoriesAlt(Categories... altRepresentations)

Adds a categories property as a group of alternative representations (see: description of ALTID). An appropriate ALTID parameter value is automatically generated and assigned to the properties.

Property name: CATEGORIES

Supported versions: 4.0*
* Only 4.0 supports alternative representations

Parameters:
altRepresentations - the alternative representations of the property

setCategories

public void setCategories(Categories categories)

Sets the list of keywords (aka "tags") that can be used to describe the person.

Property name: CATEGORIES

Supported versions: 2.1, 3.0, 4.0

Parameters:
categories - the categories or null to remove (note: multiple categories may be added to this object)

addCategories

public void addCategories(Categories categories)

Adds a list of keywords (aka "tags") that can be used to describe the person. Note that only version 4.0 vCards support multiple instances of this property.

Property name: CATEGORIES

Supported versions: 4.0*
* Only 4.0 supports multiple instances

Parameters:
categories - the categories (note: multiple categories may be added to this object)

setCategories

public Categories setCategories(String... categories)

Sets the list of keywords (aka "tags") that can be used to describe the person. This is a convenience method for setCategories(Categories).

Property name: CATEGORIES

Supported versions: 2.1, 3.0, 4.0

Parameters:
categories - the category or categories (e.g. "swimmer", "biker", "knitter")
Returns:
the property object that was created

getAgent

public Agent getAgent()
Gets information about the person's agent.

Property name: AGENT

Supported versions: 2.1, 3.0

Returns:
the agent information

setAgent

public void setAgent(Agent agent)
Sets information about the person's agent.

Property name: AGENT

Supported versions: 2.1, 3.0

Parameters:
agent - the agent information

getNotes

public List<Note> getNotes()
Gets the notes. Notes contain free-form, miscellaneous text.

Property name: NOTE

Supported versions: 2.1, 3.0, 4.0

Returns:
the notes

addNote

public void addNote(Note note)
Adds a note. Notes contain free-form, miscellaneous text.

Property name: NOTE

Supported versions: 2.1, 3.0, 4.0

Parameters:
note - the note to add

addNote

public Note addNote(String note)
Adds a note. Notes contain free-form, miscellaneous text. This is a convenience method for addNote(Note).

Property name: NOTE

Supported versions: 2.1, 3.0, 4.0

Parameters:
note - the note to add
Returns:
the property object that was created

addNoteAlt

public void addNoteAlt(Collection<Note> altRepresentations)

Adds a note property as a group of alternative representations (see: description of ALTID). An appropriate ALTID parameter value is automatically generated and assigned to the properties.

Property name: NOTE

Supported versions: 4.0*
* Only 4.0 supports alternative representations

Parameters:
altRepresentations - the alternative representations of the property

addNoteAlt

public void addNoteAlt(Note... altRepresentations)

Adds a note property as a group of alternative representations (see: description of ALTID). An appropriate ALTID parameter value is automatically generated and assigned to the properties.

Property name: NOTE

Supported versions: 4.0*
* Only 4.0 supports alternative representations

Parameters:
altRepresentations - the alternative representations of the property

getUid

public Uid getUid()
Gets the unique identifier of the vCard.

Property name: UID

Supported versions: 2.1, 3.0, 4.0

Returns:
the unique identifier

setUid

public void setUid(Uid uid)
Sets the unique identifier of the vCard.

Property name: UID

Supported versions: 2.1, 3.0, 4.0

Parameters:
uid - the unique identifier

getKeys

public List<Key> getKeys()
Gets the public encryption keys.

Property name: KEY

Supported versions: 2.1, 3.0, 4.0

Returns:
the keys

addKey

public void addKey(Key key)
Adds a public encryption key.

Property name: KEY

Supported versions: 2.1, 3.0, 4.0

Parameters:
key - the key to add

addKeyAlt

public void addKeyAlt(Collection<Key> altRepresentations)

Adds a key property as a group of alternative representations (see: description of ALTID). An appropriate ALTID parameter value is automatically generated and assigned to the properties.

Property name: KEY

Supported versions: 4.0*
* Only 4.0 supports alternative representations

Parameters:
altRepresentations - the alternative representations of the property

addKeyAlt

public void addKeyAlt(Key... altRepresentations)

Adds a key property as a group of alternative representations (see: description of ALTID). An appropriate ALTID parameter value is automatically generated and assigned to the properties.

Property name: KEY

Supported versions: 4.0*
* Only 4.0 supports alternative representations

Parameters:
altRepresentations - the alternative representations of the property

getImpps

public List<Impp> getImpps()
Gets the instant messaging handles.

Property name: IMPP

Supported versions: 3.0, 4.0

Returns:
the instant messaging handles

addImpp

public void addImpp(Impp impp)
Adds an instant messaging handle.

Property name: IMPP

Supported versions: 3.0, 4.0

Parameters:
impp - the instant messaging handle to add

addImppAlt

public void addImppAlt(Collection<Impp> altRepresentations)

Adds an impp property as a group of alternative representations (see: description of ALTID). An appropriate ALTID parameter value is automatically generated and assigned to the properties.

Property name: IMPP

Supported versions: 4.0*
* Only 4.0 supports alternative representations

Parameters:
altRepresentations - the alternative representations of the property

addImppAlt

public void addImppAlt(Impp... altRepresentations)

Adds an impp property as a group of alternative representations (see: description of ALTID). An appropriate ALTID parameter value is automatically generated and assigned to the properties.

Property name: IMPP

Supported versions: 4.0*
* Only 4.0 supports alternative representations

Parameters:
altRepresentations - the alternative representations of the property

getRelations

public List<Related> getRelations()
Gets a list of people that the person is related to.

Property name: RELATED

Supported versions: 4.0

Returns:
the person's relations

addRelated

public void addRelated(Related related)
Adds someone that the person is related to.

Property name: RELATED

Supported versions: 4.0

Parameters:
related - the relation to add

addRelatedAlt

public void addRelatedAlt(Collection<Related> altRepresentations)

Adds a related property as a group of alternative representations (see: description of ALTID). An appropriate ALTID parameter value is automatically generated and assigned to the properties.

Property name: RELATED

Supported versions: 4.0

Parameters:
altRepresentations - the alternative representations of the property

addRelatedAlt

public void addRelatedAlt(Related... altRepresentations)

Adds a related property as a group of alternative representations (see: description of ALTID). An appropriate ALTID parameter value is automatically generated and assigned to the properties.

Property name: RELATED

Supported versions: 4.0

Parameters:
altRepresentations - the alternative representations of the property

getLanguages

public List<Language> getLanguages()
Gets the languages that the person speaks.

Property name: LANG

Supported versions: 4.0

Returns:
the languages

addLanguage

public void addLanguage(Language language)
Adds a language that the person speaks.

Property name: LANG

Supported versions: 4.0

Parameters:
language - the language to add

addLanguage

public Language addLanguage(String language)
Adds a language that the person speaks. This is a convenience method for addLanguage(Language).

Property name: LANG

Supported versions: 4.0

Parameters:
language - the language to add (e.g. "en-us")
Returns:
the property object that was created

addLanguageAlt

public void addLanguageAlt(Collection<Language> altRepresentations)

Adds a language property as a group of alternative representations (see: description of ALTID). An appropriate ALTID parameter value is automatically generated and assigned to the properties.

Property name: LANG

Supported versions: 4.0

Parameters:
altRepresentations - the alternative representations of the property

addLanguageAlt

public void addLanguageAlt(Language... altRepresentations)

Adds a language property as a group of alternative representations (see: description of ALTID). An appropriate ALTID parameter value is automatically generated and assigned to the properties.

Property name: LANG

Supported versions: 4.0

Parameters:
altRepresentations - the alternative representations of the property

getCalendarRequestUris

public List<CalendarRequestUri> getCalendarRequestUris()
Gets the URIs that can be used to schedule a meeting with the person on his or her calendar.

Property name: CALADRURI

Supported versions: 4.0

Returns:
the calendar request URIs

addCalendarRequestUri

public void addCalendarRequestUri(CalendarRequestUri calendarRequestUri)
Adds a URI that can be used to schedule a meeting with the person on his or her calendar.

Property name: CALADRURI

Supported versions: 4.0

Parameters:
calendarRequestUri - the calendar request URI to add

addCalendarRequestUriAlt

public void addCalendarRequestUriAlt(Collection<CalendarRequestUri> altRepresentations)

Adds a calendar request URI property as a group of alternative representations (see: description of ALTID ). An appropriate ALTID parameter value is automatically generated and assigned to the properties.

Property name: CALADRURI

Supported versions: 4.0

Parameters:
altRepresentations - the alternative representations of the property

addCalendarRequestUriAlt

public void addCalendarRequestUriAlt(CalendarRequestUri... altRepresentations)

Adds a calendar request URI property as a group of alternative representations (see: description of ALTID ). An appropriate ALTID parameter value is automatically generated and assigned to the properties.

Property name: CALADRURI

Supported versions: 4.0

Parameters:
altRepresentations - the alternative representations of the property

getCalendarUris

public List<CalendarUri> getCalendarUris()
Gets the URIs that point to the person's calendar.

Property name: CALURI

Supported versions: 4.0

Returns:
the calendar URIs

addCalendarUri

public void addCalendarUri(CalendarUri calendarUri)
Adds a URI that points to the person's calendar.

Property name: CALURI

Supported versions: 4.0

Parameters:
calendarUri - the calendar URI to add

addCalendarUriAlt

public void addCalendarUriAlt(Collection<CalendarUri> altRepresentations)

Adds a calendar URI property as a group of alternative representations (see: description of ALTID). An appropriate ALTID parameter value is automatically generated and assigned to the properties.

Property name: CALURI

Supported versions: 4.0

Parameters:
altRepresentations - the alternative representations of the property

addCalendarUriAlt

public void addCalendarUriAlt(CalendarUri... altRepresentations)

Adds a calendar URI property as a group of alternative representations (see: description of ALTID). An appropriate ALTID parameter value is automatically generated and assigned to the properties.

Property name: CALURI

Supported versions: 4.0

Parameters:
altRepresentations - the alternative representations of the property

getFbUrls

public List<FreeBusyUrl> getFbUrls()
Gets the URLs that can be used to determine when the person is free and/or busy.

Property name: FBURL

Supported versions: 4.0

Returns:
the free-busy URLs

addFbUrl

public void addFbUrl(FreeBusyUrl fbUrl)
Adds a URL that can be used to determine when the person is free and/or busy.

Property name: FBURL

Supported versions: 4.0

Parameters:
fbUrl - the free-busy URL to add

addFbUrlAlt

public void addFbUrlAlt(Collection<FreeBusyUrl> altRepresentations)

Adds an fburl property as a group of alternative representations (see: description of ALTID). An appropriate ALTID parameter value is automatically generated and assigned to the properties.

Property name: FBURL

Supported versions: 4.0

Parameters:
altRepresentations - the alternative representations of the property

addFbUrlAlt

public void addFbUrlAlt(FreeBusyUrl... altRepresentations)

Adds an fburl property as a group of alternative representations (see: description of ALTID). An appropriate ALTID parameter value is automatically generated and assigned to the properties.

Property name: FBURL

Supported versions: 4.0

Parameters:
altRepresentations - the alternative representations of the property

getClientPidMaps

public List<ClientPidMap> getClientPidMaps()
Gets the properties that are used to assign globally-unique identifiers to individual property instances. CLIENTPIDMAPs are used for merging together different versions of the same vCard.

Property name: CLIENTPIDMAP

Supported versions: 4.0

Returns:
the client PID maps

addClientPidMap

public void addClientPidMap(ClientPidMap clientPidMap)
Adds a property that is used to assign a globally-unique identifier to an individual property instance. CLIENTPIDMAPs are used for merging together different versions of the same vCard.

Property name: CLIENTPIDMAP

Supported versions: 4.0

Parameters:
clientPidMap - the client PID map to add

getXmls

public List<Xml> getXmls()
Gets any XML data that is attached to the vCard. XML properties may be present if the vCard was encoded in XML and the XML document contained non-standard elements. The XML vCard properties in this case would contain all of the non-standard XML elements.

Property name: XML

Supported versions: 4.0

Returns:
the XML data

addXml

public void addXml(Xml xml)
Adds XML data to the vCard. XML properties may be present if the vCard was encoded in XML and the XML document contained non-standard elements. The XML vCard properties in this case would contain all of the non-standard XML elements.

Property name: XML

Supported versions: 4.0

Parameters:
xml - the XML data to add

addXmlAlt

public void addXmlAlt(Collection<Xml> altRepresentations)

Adds an XML property as a group of alternative representations (see: description of ALTID). An appropriate ALTID parameter value is automatically generated and assigned to the properties.

Property name: XML

Supported versions: 4.0

Parameters:
altRepresentations - the alternative representations of the property

addXmlAlt

public void addXmlAlt(Xml... altRepresentations)

Adds an XML property as a group of alternative representations (see: description of ALTID). An appropriate ALTID parameter value is automatically generated and assigned to the properties.

Property name: XML

Supported versions: 4.0

Parameters:
altRepresentations - the alternative representations of the property

getExpertise

public List<Expertise> getExpertise()
Gets the professional subject areas of which the the person is knowledgeable.

Property name: EXPERTISE

Supported versions: 4.0

Returns:
the professional skills
See Also:
RFC 6715

addExpertise

public void addExpertise(Expertise expertise)
Adds a professional subject area of which the the person is knowledgeable.

Property name: EXPERTISE

Supported versions: 4.0

Parameters:
expertise - the professional skill to add
See Also:
RFC 6715

addExpertise

public Expertise addExpertise(String expertise)
Adds a professional subject area of which the the person is knowledgeable. This is a convenience method for addExpertise(Expertise).

Property name: EXPERTISE

Supported versions: 4.0

Parameters:
expertise - the professional skill to add (e.g. "programming")
Returns:
the property object that was created
See Also:
RFC 6715

addExpertiseAlt

public void addExpertiseAlt(Collection<Expertise> altRepresentations)

Adds an expertise property as a group of alternative representations (see: description of ALTID). An appropriate ALTID parameter value is automatically generated and assigned to the properties.

Property name: EXPERTISE

Supported versions: 4.0

Parameters:
altRepresentations - the alternative representations of the property
See Also:
RFC 6715

addExpertiseAlt

public void addExpertiseAlt(Expertise... altRepresentations)

Adds an expertise property as a group of alternative representations (see: description of ALTID). An appropriate ALTID parameter value is automatically generated and assigned to the properties.

Property name: EXPERTISE

Supported versions: 4.0

Parameters:
altRepresentations - the alternative representations of the property
See Also:
RFC 6715

getHobbies

public List<Hobby> getHobbies()
Gets the hobbies that the person actively engages in.

Property name: HOBBY

Supported versions: 4.0

Returns:
the hobbies
See Also:
RFC 6715

addHobby

public void addHobby(Hobby hobby)
Adds a hobby that the person actively engages in.

Property name: HOBBY

Supported versions: 4.0

Parameters:
hobby - the hobby to add
See Also:
RFC 6715

addHobby

public Hobby addHobby(String hobby)
Adds a hobby that the person actively engages in. This is a convenience method for addHobby(Hobby).

Property name: HOBBY

Supported versions: 4.0

Parameters:
hobby - the hobby to add (e.g. "photography")
Returns:
the type objec that was created
See Also:
RFC 6715

addHobbyAlt

public void addHobbyAlt(Collection<Hobby> altRepresentations)

Adds a hobby property as a group of alternative representations (see: description of ALTID). An appropriate ALTID parameter value is automatically generated and assigned to the properties.

Property name: HOBBY

Supported versions: 4.0

Parameters:
altRepresentations - the alternative representations of the property
See Also:
RFC 6715

addHobbyAlt

public void addHobbyAlt(Hobby... altRepresentations)

Adds a hobby property as a group of alternative representations (see: description of ALTID). An appropriate ALTID parameter value is automatically generated and assigned to the properties.

Property name: HOBBY

Supported versions: 4.0

Parameters:
altRepresentations - the alternative representations of the property
See Also:
RFC 6715

getInterests

public List<Interest> getInterests()
Gets the person's interests.

Property name: INTEREST

Supported versions: 4.0

Returns:
the interests
See Also:
RFC 6715

addInterest

public void addInterest(Interest interest)
Adds an interest.

Property name: INTEREST

Supported versions: 4.0

Parameters:
interest - the interest to add
See Also:
RFC 6715

addInterest

public Interest addInterest(String interest)
Adds an interest. This is a convenience method for addInterest(Interest).

Property name: INTEREST

Supported versions: 4.0

Parameters:
interest - the interest to add (e.g. "football")
Returns:
the property object that was created
See Also:
RFC 6715

addInterestAlt

public void addInterestAlt(Collection<Interest> altRepresentations)

Adds an interest property as a group of alternative representations (see: description of ALTID). An appropriate ALTID parameter value is automatically generated and assigned to the properties.

Property name: INTEREST

Supported versions: 4.0

Parameters:
altRepresentations - the alternative representations of the property
See Also:
RFC 6715

addInterestAlt

public void addInterestAlt(Interest... altRepresentations)

Adds an interest property as a group of alternative representations (see: description of ALTID). An appropriate ALTID parameter value is automatically generated and assigned to the properties.

Property name: INTEREST

Supported versions: 4.0

Parameters:
altRepresentations - the alternative representations of the property
See Also:
RFC 6715

getOrgDirectories

public List<OrgDirectory> getOrgDirectories()
Gets the organization directories.

Property name: ORG-DIRECTORY

Supported versions: 4.0

Returns:
the organization directories
See Also:
RFC 6715

addOrgDirectory

public void addOrgDirectory(OrgDirectory orgDirectory)
Adds an organization directory.

Property name: ORG-DIRECTORY

Supported versions: 4.0

Parameters:
orgDirectory - the organization directory to add
See Also:
RFC 6715

addOrgDirectory

public OrgDirectory addOrgDirectory(String orgDirectory)
Adds an organization directory. This is a convenience method for addOrgDirectory(OrgDirectory).

Property name: ORG-DIRECTORY

Supported versions: 4.0

Parameters:
orgDirectory - the organization directory to add (e.g. "http://company.com/staff")
Returns:
the property object that was created
See Also:
RFC 6715

addOrgDirectoryAlt

public void addOrgDirectoryAlt(Collection<OrgDirectory> altRepresentations)

Adds an org directory property as a group of alternative representations (see: description of ALTID). An appropriate ALTID parameter value is automatically generated and assigned to the properties.

Property name: ORG-DIRECTORY

Supported versions: 4.0

Parameters:
altRepresentations - the alternative representations of the property

addOrgDirectoryAlt

public void addOrgDirectoryAlt(OrgDirectory... altRepresentations)

Adds an org directory property as a group of alternative representations (see: description of ALTID). An appropriate ALTID parameter value is automatically generated and assigned to the properties.

Property name: ORG-DIRECTORY

Supported versions: 4.0

Parameters:
altRepresentations - the alternative representations of the property

iterator

public Iterator<VCardProperty> iterator()
Iterates through each of the vCard's properties in no particular order. Does not include the "BEGIN", "END", or "VERSION" properties.

Specified by:
iterator in interface Iterable<VCardProperty>
Returns:
the iterator

getProperty

public <T extends VCardProperty> T getProperty(Class<T> clazz)
Gets the first property of a given class.

Parameters:
clazz - the property class
Returns:
the property or null if not found

getProperties

public <T extends VCardProperty> List<T> getProperties(Class<T> clazz)
Gets all properties of a given class.

Parameters:
clazz - the property class
Returns:
the properties

getPropertiesAlt

public <T extends VCardProperty & HasAltId> List<List<T>> getPropertiesAlt(Class<T> clazz)
Gets all properties of a given class, grouping the alternative representations of each property together (see: description of ALTID)

Parameters:
clazz - the property class
Returns:
the properties

getProperties

public Collection<VCardProperty> getProperties()
Gets all the properties in this vCard.

Returns:
the properties

addProperty

public void addProperty(VCardProperty property)
Adds a property.

Parameters:
property - the property to add

setProperty

public <T extends VCardProperty> void setProperty(Class<T> clazz,
                                                  T property)
Replaces all existing properties of the given class with a single property instance. If the property instance is null, then all instances of that property will be removed.

Parameters:
clazz - the property class (e.g. "Note.class")
property - the property or null to remove

removeProperty

public void removeProperty(VCardProperty property)
Removes a property instance from the vCard.

Parameters:
property - the property to remove

removeProperties

public void removeProperties(Class<? extends VCardProperty> clazz)
Removes all properties of a given class.

Parameters:
clazz - the class of the properties to remove (e.g. "Note.class")

getExtendedProperty

public RawProperty getExtendedProperty(String name)
Gets the first extended property with a given name.

Parameters:
name - the property name (e.g. "X-ALT-DESC")
Returns:
the property or null if none were found

getExtendedProperties

public List<RawProperty> getExtendedProperties(String name)
Gets all extended properties with a given name.

Parameters:
name - the property name (e.g. "X-ALT-DESC")
Returns:
the properties

getExtendedProperties

public List<RawProperty> getExtendedProperties()
Gets all extended properties.

Returns:
the properties

addExtendedProperty

public RawProperty addExtendedProperty(String name,
                                       String value)
Adds an extended property.

Parameters:
name - the property name (e.g. "X-ALT-DESC")
value - the property value
Returns:
the property object that was created

setExtendedProperty

public RawProperty setExtendedProperty(String name,
                                       String value)
Replaces all existing extended properties with the given name with a single property instance.

Parameters:
name - the property name (e.g. "X-ALT-DESC")
value - the property value
Returns:
the property object that was created

removeExtendedProperty

public void removeExtendedProperty(String name)
Removes all extended properties that have the given name.

Parameters:
name - the component name (e.g. "X-ALT-DESC")

addPropertyAlt

public <T extends VCardProperty & HasAltId> void addPropertyAlt(Class<T> propertyClass,
                                                               T... altRepresentations)
Adds a property in the form of a collection of alternative representations. This method will generate a unique ALTID parameter value and assign it to each of the property instances (see: description of ALTID).

Parameters:
propertyClass - the property class
altRepresentations - the alternative representations of the property to add

addPropertyAlt

public <T extends VCardProperty & HasAltId> void addPropertyAlt(Class<T> propertyClass,
                                                               Collection<T> altRepresentations)
Adds a property in the form of a collection of alternative representations. This method will generate a unique ALTID parameter value and assign it to each of the property instances (see: description of ALTID).

Parameters:
propertyClass - the property class
altRepresentations - the alternative representations of the property to add

setPropertyAlt

public <T extends VCardProperty & HasAltId> void setPropertyAlt(Class<T> propertyClass,
                                                               T... altRepresentations)
Sets a property in the form of a collection of alternative representations. This method will generate a unique ALTID parameter value and assign it to each of the property instances (see: description of ALTID).

Parameters:
propertyClass - the property class
altRepresentations - the alternative representations of the property to add

setPropertyAlt

public <T extends VCardProperty & HasAltId> void setPropertyAlt(Class<T> propertyClass,
                                                               Collection<T> altRepresentations)
Sets a property in the form of a collection of alternative representations. This method will generate a unique ALTID parameter value and assign it to each of the property instances (see: description of ALTID).

Parameters:
propertyClass - the property class
altRepresentations - the alternative representations of the property to add

validate

public ValidationWarnings validate(VCardVersion version)
Checks this vCard for data consistency problems or deviations from the spec. These problems will not prevent the vCard from being written to a data stream, but may prevent it from being parsed correctly by the consuming application. These problems can largely be avoided by reading the Javadocs of the property classes, or by being familiar with the vCard standard.

Parameters:
version - the version to check the vCard against (use 4.0 for xCard and jCard)
Returns:
the validation warnings


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