ezvcard
Class VCard

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

public class VCard
extends Object
implements Iterable<VCardType>

Represents the data in a vCard.

Author:
Michael Angstadt

Constructor Summary
VCard()
           
 
Method Summary
 void addAddress(AddressType address)
          Adds a mailing address.
 void addAnniversary(AnniversaryType anniversary)
           Adds an anniversary property.
 void addBirthday(BirthdayType birthday)
           Adds a birthday property.
 void addBirthplace(BirthplaceType birthplace)
           Adds a birthplace property.
 void addCalendarRequestUri(CalendarRequestUriType calendarRequestUri)
          Adds a URI that can be used to schedule a meeting with the person on his or her calendar.
 void addCalendarUri(CalendarUriType calendarUri)
          Adds a URI that points to the person's calendar.
 void addCategories(CategoriesType categories)
           Adds a CATEGORIES property to the vCard.
 void addClientPidMap(ClientPidMapType clientPidMap)
          Adds a property that is used to assign a globally-unique identifier to an individual property instance.
 void addDeathdate(DeathdateType deathdate)
           Adds a death date property.
 void addDeathplace(DeathplaceType deathplace)
           Adds a deathplace property.
 void addEmail(EmailType email)
          Adds an email address.
 EmailType addEmail(String email, EmailTypeParameter... types)
          Adds an email address.
 void addExpertise(ExpertiseType expertise)
          Adds a professional subject area of which the the person is knowledgeable.
 ExpertiseType addExpertise(String expertise)
          Adds a professional subject area of which the the person is knowledgeable.
 RawType addExtendedType(String name, String value)
          Adds an extended type to the vCard.
 void addExtendedType(VCardType type)
          Adds an extended type to the vCard.
 void addFbUrl(FbUrlType fbUrl)
          Adds a URL that can be used to determine when the person is free and/or busy.
 void addFormattedName(FormattedNameType formattedName)
           Adds a text value used for displaying the person's name.
 void addGeo(GeoType geo)
           Adds a geographical position to the vCard.
 void addHobby(HobbyType hobby)
          Adds a hobby that the person actively engages in.
 HobbyType addHobby(String hobby)
          Adds a hobby that the person actively engages in.
 void addImpp(ImppType impp)
          Adds an instant messaging handle.
 void addInterest(InterestType interest)
          Adds an interest.
 InterestType addInterest(String interest)
          Adds an interest.
 void addKey(KeyType key)
          Adds a public encryption key.
 void addLanguage(LanguageType language)
          Adds a language that the person speaks.
 LanguageType addLanguage(String language)
          Adds a language that the person speaks.
 void addLogo(LogoType logo)
          Adds a logo to the vCard, such as a company logo.
 void addMember(MemberType member)
          Adds a member to the group.
 void addNickname(NicknameType nickname)
           Adds an instance of the NICKNAME property to the vCard.
 void addNote(NoteType note)
          Adds a note.
 NoteType addNote(String note)
          Adds a note.
 void addOrganization(OrganizationType organization)
           Adds an organization property to the vCard.
 void addOrgDirectory(OrgDirectoryType orgDirectory)
          Adds an organization directory.
 OrgDirectoryType addOrgDirectory(String orgDirectory)
          Adds an organization directory.
 void addOrphanedLabel(LabelType label)
          Adds a mailing label which is not associated with any address.
 void addPhoto(PhotoType photo)
          Adds a photo to the vCard, such as a picture of the person's face.
 void addRelated(RelatedType related)
          Adds someone that the person is related to.
 void addRole(RoleType role)
          Adds a role associated with the person.
 RoleType addRole(String role)
          Adds a role associated with the person.
 void addSound(SoundType sound)
          Adds a sound to the vCard, such as a pronunciation of the person's name.
 void addSource(SourceType source)
          Adds a URI that can be used to retrieve the most up-to-date version of the person's vCard.
 SourceType addSource(String source)
          Adds a URI that can be used to retrieve the most up-to-date version of the person's vCard.
 void addStructuredName(StructuredNameType structuredName)
           Adds a property that contains the individual components of the person's name.
 TelephoneType addTelephoneNumber(String telephoneNumber, TelephoneTypeParameter... types)
          Adds a telephone number.
 void addTelephoneNumber(TelephoneType telephoneNumber)
          Adds a telephone number.
 void addTimezone(TimezoneType timezone)
           Adds a timezone to the vCard.
 TitleType addTitle(String title)
          Adds a title associated with the person.
 void addTitle(TitleType title)
          Adds a title associated with the person.
 UrlType addUrl(String url)
          Adds a URL.
 void addUrl(UrlType url)
          Adds a URL.
 void addXml(XmlType xml)
          Adds XML data to the vCard.
 List<AddressType> getAddresses()
          Gets the mailing addresses.
 AgentType getAgent()
          Gets information about the person's agent.
 Collection<VCardType> getAllTypes()
          Gets all of the vCard's properties.
 List<AnniversaryType> getAnniversaries()
           Gets all anniversary property instances.
 AnniversaryType getAnniversary()
           Gets the person's anniversary.
 BirthdayType getBirthday()
           Gets the person's birthday.
 List<BirthdayType> getBirthdays()
           Gets all birthday property instances.
 BirthplaceType getBirthplace()
           Gets the person's birthplace.
 List<BirthplaceType> getBirthplaces()
           Gets all birthplace property instances.
 List<CalendarRequestUriType> getCalendarRequestUris()
          Gets the URIs that can be used to schedule a meeting with the person on his or her calendar.
 List<CalendarUriType> getCalendarUris()
          Gets the URIs that point to the person's calendar.
 CategoriesType getCategories()
           Gets the list of keywords (aka "tags") that can be used to describe the person.
 List<CategoriesType> getCategoriesList()
           Gets all CATEGORIES properties.
 ClassificationType getClassification()
          Gets the classification of the vCard, which describes the sensitivity of the information in the vCard.
 List<ClientPidMapType> getClientPidMaps()
          Gets the properties that are used to assign globally-unique identifiers to individual property instances.
 DeathdateType getDeathdate()
           Gets the person's time of death.
 List<DeathdateType> getDeathdates()
           Gets all death date property instances.
 DeathplaceType getDeathplace()
           Gets the person's deathplace.
 List<DeathplaceType> getDeathplaces()
           Gets all deathplace property instances.
 List<EmailType> getEmails()
          Gets the email addresses.
 List<ExpertiseType> getExpertise()
          Gets the professional subject areas of which the the person is knowledgeable.
<T extends VCardType>
List<T>
getExtendedType(Class<T> clazz)
          Gets all extended types that are an instance of a particular class.
 List<RawType> getExtendedType(String typeName)
          Gets all extended types that have a particular name.
<T extends VCardType>
List<T>
getExtendedType(String typeName, Class<T> clazz)
          Gets all extended types that have a particular name and that are an instance of a particular class.
 Map<String,List<VCardType>> getExtendedTypes()
          Gets all extended types.
 List<FbUrlType> getFbUrls()
          Gets the URLs that can be used to determine when the person is free and/or busy.
 FormattedNameType getFormattedName()
           Gets the text value used for displaying the person's name.
 List<FormattedNameType> getFormattedNames()
           Gets the text values for displaying the person's name.
 GenderType getGender()
          Gets the gender of the person.
 GeoType getGeo()
           Gets the geographical position of where the person lives/works.
 List<GeoType> getGeos()
           Gets all geographical position properties.
 List<HobbyType> getHobbies()
          Gets the hobbies that the person actively engages in.
 List<ImppType> getImpps()
          Gets the instant messaging handles.
 List<InterestType> getInterests()
          Gets the person's interests.
 List<KeyType> getKeys()
          Gets the public encryption keys.
 KindType getKind()
          Gets the type of entity this vCard represents.
 List<LanguageType> getLanguages()
          Gets the languages that the person speaks.
 List<LogoType> getLogos()
          Gets the logos attached to the vCard, such a company logo.
 MailerType getMailer()
          Gets the email client that the person uses.
 List<MemberType> getMembers()
          Gets the members of the group.
 NicknameType getNickname()
           Gets the person's nicknames.
 List<NicknameType> getNicknames()
           Gets all instances of the NICKNAME property.
 List<NoteType> getNotes()
          Gets the notes.
 OrganizationType getOrganization()
           Gets the hierarchy of department(s) to which the person belongs.
 List<OrganizationType> getOrganizations()
           Gets all organization properties.
 List<OrgDirectoryType> getOrgDirectories()
          Gets the organization directories.
 List<LabelType> getOrphanedLabels()
          Gets all mailing labels that could not be assigned to an address.
 List<PhotoType> getPhotos()
          Gets the photos attached to the vCard, such as a picture of the person's face.
 ProdIdType getProdId()
          Gets the product ID, which identifies the software that created the vCard.
 ProfileType getProfile()
          Gets the PROFILE property.
 List<RelatedType> getRelations()
          Gets a list of people that the person is related to.
 RevisionType getRevision()
          Gets the time that the vCard was last modified.
 List<RoleType> getRoles()
          Gets the roles associated with the person.
 SortStringType getSortString()
           Gets the string that should be used to sort the vCard.
 List<SoundType> getSounds()
          Gets the sounds attached to the vCard, such as a pronunciation of the person's name.
 SourceDisplayTextType getSourceDisplayText()
          Gets a textual representation of the SOURCE property.
 List<SourceType> getSources()
          Gets the URIs that can be used to retrieve the most up-to-date version of the person's vCard.
 StructuredNameType getStructuredName()
           Gets the individual components of the person's name.
 List<StructuredNameType> getStructuredNames()
           Gets all structured name properties.
 List<TelephoneType> getTelephoneNumbers()
          Gets the telephone numbers.
 TimezoneType getTimezone()
           Gets the timezone the person lives/works in.
 List<TimezoneType> getTimezones()
           Gets all instances of the timezone property.
 List<TitleType> getTitles()
          Gets the titles associated with the person.
 UidType getUid()
          Gets the unique identifier of the vCard.
 List<UrlType> getUrls()
          Gets the URLs.
 VCardVersion getVersion()
          Gets the version attached to this vCard.
 List<XmlType> getXmls()
          Gets any XML data that is attached to the vCard.
 Iterator<VCardType> iterator()
          Iterates through each of the vCard's properties in no particular order.
 void setAgent(AgentType agent)
          Sets information about the person's agent.
 void setAnniversary(AnniversaryType anniversary)
           Sets the person's anniversary.
 void setBirthday(BirthdayType birthday)
           Sets the person's birthday.
 void setBirthplace(BirthplaceType birthplace)
           Sets the person's birthplace.
 void setCategories(CategoriesType categories)
           Sets the list of keywords (aka "tags") that can be used to describe the person.
 CategoriesType setCategories(String... categories)
           Sets the list of keywords (aka "tags") that can be used to describe the person.
 void setClassification(ClassificationType classification)
          Sets the classification of the vCard, which describes the sensitivity of the information in the vCard.
 ClassificationType setClassification(String classification)
          Sets the classification of the vCard, which describes the sensitivity of the information in the vCard.
 void setDeathdate(DeathdateType deathdate)
           Sets the person's time of death.
 void setDeathplace(DeathplaceType deathplace)
           Sets the person's deathplace.
 void setFormattedName(FormattedNameType formattedName)
           Sets the text value used for displaying the person's name.
 FormattedNameType setFormattedName(String formattedName)
           Sets the text value used for displaying the person's name.
 void setGender(GenderType gender)
          Sets the gender of the person.
 GeoType setGeo(double latitude, double longitude)
           Sets the geographical position of where the person lives/works.
 void setGeo(GeoType geo)
           Sets the geographical position of where the person lives/works.
 void setKind(KindType kind)
          Sets the type of entity this vCard represents.
 void setMailer(MailerType mailer)
          Sets the email client that the person uses.
 MailerType setMailer(String mailer)
          Sets the email client that the person uses.
 void setNickname(NicknameType nickname)
           Sets one or more nicknames.
 NicknameType setNickname(String... nicknames)
           Sets one or more nicknames.
 void setOrganization(OrganizationType organization)
           Sets the hierarchy of departments to which the person belongs.
 OrganizationType setOrganization(String... departments)
           Sets the hierarchy of departments to which the person belongs.
 void setProdId(ProdIdType prodId)
          Sets the product ID, which identifies the software that created the vCard.
 ProdIdType setProdId(String prodId)
          Sets the product ID, which identifies the software that created the vCard.
 void setProfile(ProfileType profile)
          Sets the PROFILE property.
 RevisionType setRevision(Date rev)
          Sets the time that the vCard was last modified.
 void setRevision(RevisionType rev)
          Sets the time that the vCard was last modified.
 void setSortString(SortStringType sortString)
           Sets the string that should be used to sort the vCard.
 SortStringType setSortString(String sortString)
           Sets the string that should be used to sort the vCard.
 void setSourceDisplayText(SourceDisplayTextType sourceDisplayText)
          Sets a textual representation of the SOURCE property.
 SourceDisplayTextType setSourceDisplayText(String sourceDisplayText)
          Sets a textual representation of the SOURCE property.
 void setStructuredName(StructuredNameType structuredName)
          Sets the individual components of the person's name.
 void setTimezone(TimezoneType timezone)
           Sets the timezone the person lives/works in.
 void setUid(UidType uid)
          Sets the unique identifier of the vCard.
 void setVersion(VCardVersion version)
          Sets the version of this vCard.
 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 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()
                 throws TemplateException

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
Throws:
TemplateException
See Also:
Ezvcard, hCard 1.0

writeHtml

public void writeHtml(File file)
               throws IOException,
                      TemplateException

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
TemplateException - if there's a problem with the freemarker template
See Also:
Ezvcard, hCard 1.0

writeHtml

public void writeHtml(OutputStream out)
               throws IOException,
                      TemplateException

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
TemplateException - if there's a problem with the freemarker template
See Also:
Ezvcard, hCard 1.0

writeHtml

public void writeHtml(Writer writer)
               throws IOException,
                      TemplateException

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
TemplateException - if there's a problem with the freemarker template
See Also:
Ezvcard, hCard 1.0

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 KindType getKind()
Gets the type of entity this vCard represents.

vCard property name: KIND

vCard versions: 4.0

Returns:
the kind

setKind

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

vCard property name: KIND

vCard versions: 4.0

Parameters:
kind - the kind

getGender

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

vCard property name: GENDER

vCard versions: 4.0

Returns:
the gender

setGender

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

vCard property name: GENDER

vCard versions: 4.0

Parameters:
gender - the gender

getMembers

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

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

vCard property name: MEMBER

vCard versions: 4.0

Returns:
the members

addMember

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

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

vCard property name: MEMBER

vCard versions: 4.0

Parameters:
member - the member to add

getProfile

public ProfileType getProfile()
Gets the PROFILE property.

vCard property name: PROFILE

vCard versions: 3.0

Returns:
the property

setProfile

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

vCard property name: PROFILE

vCard versions: 3.0

Parameters:
profile - the property

getClassification

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

vCard property name: CLASS

vCard versions: 3.0

Returns:
the classification

setClassification

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

vCard property name: CLASS

vCard versions: 3.0

Parameters:
classification - the classification

setClassification

public ClassificationType 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(ClassificationType).

vCard property name: CLASS

vCard versions: 3.0

Parameters:
classification - the classification (e.g. "PUBLIC", "PRIVATE", "CONFIDENTIAL")
Returns:
the type object that was created

getSources

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

vCard property name: SOURCE

vCard versions: 3.0, 4.0

Returns:
the sources

addSource

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

vCard property name: SOURCE

vCard versions: 3.0, 4.0

Parameters:
source - the source

addSource

public SourceType 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(SourceType) .

vCard property name: SOURCE

vCard versions: 3.0, 4.0

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

getSourceDisplayText

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

vCard property name: NAME

vCard versions: 3.0

Returns:
a textual representation of the vCard source

setSourceDisplayText

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

vCard property name: NAME

vCard versions: 3.0

Parameters:
sourceDisplayText - a textual representation of the vCard source

setSourceDisplayText

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

vCard property name: NAME

vCard versions: 3.0

Parameters:
sourceDisplayText - a textual representation of the vCard source
Returns:
the type object that was created

getFormattedNames

public List<FormattedNameType> getFormattedNames()

Gets the text values for displaying the person's name.

This method should only be used on the rare occasion when there are alternative representations of this property (see: explanation of ALTID). Otherwise, use getFormattedName().

vCard property name: FN

vCard versions: 2.1, 3.0, 4.0

Returns:
the formatted name property
See Also:
FormattedNameType.getAltId()

getFormattedName

public FormattedNameType getFormattedName()

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

Use getFormattedNames() to get the alternative representations of this property (see: explanation of ALTID).

vCard property name: FN

vCard versions: 2.1, 3.0, 4.0

Returns:
the formatted name property

addFormattedName

public void addFormattedName(FormattedNameType formattedName)

Adds a text value used for displaying the person's name.

This method should only be used on the rare occasion when alternative representations of this property are needed (see: explanation of ALTID). Otherwise, use setFormattedName(FormattedNameType).

vCard property name: FN

vCard versions: 2.1, 3.0, 4.0

Parameters:
formattedName - the formatted name property
See Also:
FormattedNameType.setAltId(java.lang.String)

setFormattedName

public void setFormattedName(FormattedNameType formattedName)

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

Use addFormattedName(ezvcard.types.FormattedNameType) to add alternative representations of this property (see: explanation of ALTID).

vCard property name: FN

vCard versions: 2.1, 3.0, 4.0

Parameters:
formattedName - the formatted name property

setFormattedName

public FormattedNameType setFormattedName(String formattedName)

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

Use addFormattedName(ezvcard.types.FormattedNameType) to add alternative representations of this property (see: explanation of ALTID).

vCard property name: FN

vCard versions: 2.1, 3.0, 4.0

Parameters:
formattedName - the formatted name (e.g. "John Doe")
Returns:
the type object that was created

getStructuredNames

public List<StructuredNameType> getStructuredNames()

Gets all structured name properties.

This method should only be used on the rare occasion when there are alternative representations of this property (see: explanation of ALTID). Otherwise, use getStructuredName().

vCard property name: N

vCard versions: 2.1, 3.0, 4.0

Returns:
the N properties
See Also:
StructuredNameType.getAltId()

getStructuredName

public StructuredNameType getStructuredName()

Gets the individual components of the person's name.

Use getStructuredNames() to get the alternative representations of this property (see: explanation of ALTID).

vCard property name: N

vCard versions: 2.1, 3.0, 4.0

Returns:
the components of the person's name

addStructuredName

public void addStructuredName(StructuredNameType structuredName)

Adds a property that contains the individual components of the person's name.

This method should only be used on the rare occasion when alternative representations of this property are needed (see: explanation of ALTID). Otherwise, use setStructuredName(ezvcard.types.StructuredNameType).

vCard property name: N

vCard versions: 2.1, 3.0, 4.0

Parameters:
structuredName - the components of the person's name
See Also:
StructuredNameType.setAltId(java.lang.String)

setStructuredName

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

vCard property name: N

vCard versions: 2.1, 3.0, 4.0

Parameters:
structuredName - the components of the person's name

getNicknames

public List<NicknameType> getNicknames()

Gets all instances of the NICKNAME property.

This method should only be used on the rare occasion when there are alternative representations of this property (see: explanation of ALTID). Otherwise, use getNickname().

vCard property name: NICKNAME

vCard versions: 3.0, 4.0

Returns:
the person's nicknames
See Also:
NicknameType.getAltId()

getNickname

public NicknameType getNickname()

Gets the person's nicknames.

Use getNicknames() to get the alternative representations of this property (see: explanation of ALTID).

vCard property name: NICKNAME

vCard versions: 3.0, 4.0

Returns:
the person's nicknames

addNickname

public void addNickname(NicknameType nickname)

Adds an instance of the NICKNAME property to the vCard.

This method should only be used on the rare occasion when alternative representations of this property are needed (see: explanation of ALTID). Otherwise, use setNickname(NicknameType).

vCard property name: NICKNAME

vCard versions: 3.0, 4.0

Parameters:
nickname - the NICKNAME property to add
See Also:
NicknameType.setAltId(java.lang.String)

setNickname

public void setNickname(NicknameType nickname)

Sets one or more nicknames.

Use addNickname(ezvcard.types.NicknameType) to add alternative representations of this property (see: explanation of ALTID).

vCard property name: NICKNAME

vCard versions: 3.0, 4.0

Parameters:
nickname - the nicknames (multiple nicknames can be added to this object)

setNickname

public NicknameType setNickname(String... nicknames)

Sets one or more nicknames. This is a convenience method for setNickname(NicknameType).

Use addNickname(ezvcard.types.NicknameType) to add alternative representations of this property (see: explanation of ALTID).

vCard property name: NICKNAME

vCard versions: 3.0, 4.0

Parameters:
nicknames - the nickname(s)
Returns:
the type object that was created

getSortString

public SortStringType getSortString()

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

For 4.0 vCards, use the StructuredNameType.getSortAs() and/or OrganizationType.getSortAs() methods.

vCard property name: SORT-STRING

vCard versions: 2.1, 3.0

Returns:
the sort string

setSortString

public void setSortString(SortStringType sortString)

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

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

vCard property name: SORT-STRING

vCard versions: 2.1, 3.0

Parameters:
sortString - the sort string

setSortString

public SortStringType setSortString(String sortString)

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

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

vCard property name: SORT-STRING

vCard versions: 2.1, 3.0

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

getTitles

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

vCard property name: TITLE

vCard versions: 2.1, 3.0, 4.0

Returns:
the titles

addTitle

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

vCard property name: TITLE

vCard versions: 2.1, 3.0, 4.0

Parameters:
title - the title

addTitle

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

vCard property name: TITLE

vCard versions: 2.1, 3.0, 4.0

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

getRoles

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

vCard property name: ROLE

vCard versions: 2.1, 3.0, 4.0

Returns:
the roles

addRole

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

vCard property name: ROLE

vCard versions: 2.1, 3.0, 4.0

Parameters:
role - the role

addRole

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

vCard property name: ROLE

vCard versions: 2.1, 3.0, 4.0

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

getPhotos

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

vCard property name: PHOTO

vCard versions: 2.1, 3.0, 4.0

Returns:
the photos

addPhoto

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

vCard property name: PHOTO

vCard versions: 2.1, 3.0, 4.0

Parameters:
photo - the photo to add

getLogos

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

vCard property name: LOGO

vCard versions: 2.1, 3.0, 4.0

Returns:
the logos

addLogo

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

vCard property name: LOGO

vCard versions: 2.1, 3.0, 4.0

Parameters:
logo - the logo to add

getSounds

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

vCard property name: SOUND

vCard versions: 2.1, 3.0, 4.0

Returns:
the sounds

addSound

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

vCard property name: SOUND

vCard versions: 2.1, 3.0, 4.0

Parameters:
sound - the sound to add

getBirthplaces

public List<BirthplaceType> getBirthplaces()

Gets all birthplace property instances.

This method should only be used on the rare occasion when there are alternative representations of this property (see: explanation of ALTID). Otherwise, use getBirthplace().

vCard property name: BIRTHPLACE

vCard versions: 4.0

Returns:
the birthplace properties
See Also:
BirthplaceType.getAltId(), RFC 6474

addBirthplace

public void addBirthplace(BirthplaceType birthplace)

Adds a birthplace property.

This method should only be used on the rare occasion when alternative representations of this property are needed (see: explanation of ALTID). Otherwise, use setBirthplace(ezvcard.types.BirthplaceType).

vCard property name: BIRTHPLACE

vCard versions: 4.0

Parameters:
birthplace - the birthplace to add
See Also:
BirthplaceType.setAltId(java.lang.String), RFC 6474

getBirthplace

public BirthplaceType getBirthplace()

Gets the person's birthplace.

Use getBirthplaces() to get the alternative representations of this property (see: explanation of ALTID).

vCard property name: BIRTHPLACE

vCard versions: 4.0

Returns:
the birthplace
See Also:
RFC 6474

setBirthplace

public void setBirthplace(BirthplaceType birthplace)

Sets the person's birthplace.

Use addBirthplace(ezvcard.types.BirthplaceType) to add alternative representations of this property (see: explanation of ALTID).

vCard property name: BIRTHPLACE

vCard versions: 4.0

Parameters:
birthplace - the birthplace
See Also:
RFC 6474

getDeathplaces

public List<DeathplaceType> getDeathplaces()

Gets all deathplace property instances.

This method should only be used on the rare occasion when there are alternative representations of this property (see: explanation of ALTID). Otherwise, use getDeathplace().

vCard property name: DEATHPLACE

vCard versions: 4.0

Returns:
the deathplace properties
See Also:
DeathplaceType.getAltId(), RFC 6474

addDeathplace

public void addDeathplace(DeathplaceType deathplace)

Adds a deathplace property.

This method should only be used on the rare occasion when alternative representations of this property are needed (see: explanation of ALTID). Otherwise, use setDeathplace(ezvcard.types.DeathplaceType).

vCard property name: DEATHPLACE

vCard versions: 4.0

Parameters:
deathplace - the deathplace to add
See Also:
DeathplaceType.setAltId(java.lang.String), RFC 6474

getDeathplace

public DeathplaceType getDeathplace()

Gets the person's deathplace.

Use getDeathplaces() to get the alternative representations of this property (see: explanation of ALTID).

vCard property name: DEATHPLACE

vCard versions: 4.0

Returns:
the deathplace
See Also:
RFC 6474

setDeathplace

public void setDeathplace(DeathplaceType deathplace)

Sets the person's deathplace.

Use addDeathplace(ezvcard.types.DeathplaceType) to add alternative representations of this property (see: explanation of ALTID).

vCard property name: DEATHPLACE

vCard versions: 4.0

Parameters:
deathplace - the deathplace
See Also:
RFC 6474

getDeathdates

public List<DeathdateType> getDeathdates()

Gets all death date property instances.

This method should only be used on the rare occasion when there are alternative representations of this property (see: explanation of ALTID). Otherwise, use getDeathdate().

vCard property name: DEATHDATE

vCard versions: 4.0

Returns:
the death date properties
See Also:
DateOrTimeType.getAltId(), RFC 6474

addDeathdate

public void addDeathdate(DeathdateType deathdate)

Adds a death date property.

This method should only be used on the rare occasion when alternative representations of this property are needed (see: explanation of ALTID). Otherwise, use setDeathdate(ezvcard.types.DeathdateType).

vCard property name: DEATHDATE

vCard versions: 4.0

Parameters:
deathdate - the death date to add
See Also:
DateOrTimeType.setAltId(java.lang.String), RFC 6474

getDeathdate

public DeathdateType getDeathdate()

Gets the person's time of death.

Use getDeathdates() to get the alternative representations of this property (see: explanation of ALTID).

vCard property name: DEATHDATE

vCard versions: 4.0

Returns:
the time of death
See Also:
RFC 6474

setDeathdate

public void setDeathdate(DeathdateType deathdate)

Sets the person's time of death.

Use addDeathdate(ezvcard.types.DeathdateType) to add alternative representations of this property (see: explanation of ALTID).

vCard property name: DEATHDATE

vCard versions: 4.0

Parameters:
deathdate - the time of death
See Also:
RFC 6474

getBirthdays

public List<BirthdayType> getBirthdays()

Gets all birthday property instances.

This method should only be used on the rare occasion when there are alternative representations of this property (see: explanation of ALTID). Otherwise, use getBirthday().

vCard property name: BDAY

vCard versions: 2.1, 3.0, 4.0

Returns:
the birthday properties
See Also:
DateOrTimeType.getAltId()

addBirthday

public void addBirthday(BirthdayType birthday)

Adds a birthday property.

This method should only be used on the rare occasion when alternative representations of this property are needed (see: explanation of ALTID). Otherwise, use setBirthday(ezvcard.types.BirthdayType).

vCard property name: BDAY

vCard versions: 2.1, 3.0, 4.0

Parameters:
birthday - the birthday to add
See Also:
DateOrTimeType.setAltId(java.lang.String)

getBirthday

public BirthdayType getBirthday()

Gets the person's birthday.

Use getBirthdays() to get the alternative representations of this property (see: explanation of ALTID).

vCard property name: BDAY

vCard versions: 2.1, 3.0, 4.0

Returns:
the birthday

setBirthday

public void setBirthday(BirthdayType birthday)

Sets the person's birthday.

Use addBirthday(ezvcard.types.BirthdayType) to add alternative representations of this property (see: explanation of ALTID).

vCard property name: BDAY

vCard versions: 2.1, 3.0, 4.0

Parameters:
birthday - the birthday

getAnniversaries

public List<AnniversaryType> getAnniversaries()

Gets all anniversary property instances.

This method should only be used on the rare occasion when there are alternative representations of this property (see: explanation of ALTID). Otherwise, use getAnniversary().

vCard property name: ANNIVERSARY

vCard versions: 4.0

Returns:
the death date properties
See Also:
DateOrTimeType.getAltId()

addAnniversary

public void addAnniversary(AnniversaryType anniversary)

Adds an anniversary property.

This method should only be used on the rare occasion when alternative representations of this property are needed (see: explanation of ALTID). Otherwise, use setAnniversary(ezvcard.types.AnniversaryType).

vCard property name: ANNIVERSARY

vCard versions: 4.0

Parameters:
anniversary - the anniversary to add
See Also:
DateOrTimeType.setAltId(java.lang.String)

getAnniversary

public AnniversaryType getAnniversary()

Gets the person's anniversary.

Use getAnniversaries() to get the alternative representations of this property (see: explanation of ALTID).

vCard property name: ANNIVERSARY

vCard versions: 4.0

Returns:
the anniversary

setAnniversary

public void setAnniversary(AnniversaryType anniversary)

Sets the person's anniversary.

Use addAnniversary(ezvcard.types.AnniversaryType) to add alternative representations of this property (see: explanation of ALTID).

vCard property name: ANNIVERSARY

vCard versions: 4.0

Parameters:
anniversary - the anniversary

getRevision

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

vCard property name: REV

vCard versions: 2.1, 3.0, 4.0

Returns:
the last modified time

setRevision

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

vCard property name: REV

vCard versions: 2.1, 3.0, 4.0

Parameters:
rev - the last modified time

setRevision

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

vCard property name: REV

vCard versions: 2.1, 3.0, 4.0

Parameters:
rev - the last modified time
Returns:
the type object that was created

getProdId

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

vCard property name: PRODID

vCard versions: 3.0, 4.0

Returns:
the product ID

setProdId

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

vCard property name: PRODID

vCard versions: 3.0, 4.0

Parameters:
prodId - the product ID

setProdId

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

vCard property name: PRODID

vCard versions: 3.0, 4.0

Parameters:
prodId - the product ID (e.g. "ez-vcard 1.0")
Returns:
the type object that was created

getAddresses

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

vCard property name: ADR

vCard versions: 2.1, 3.0, 4.0

Returns:
the mailing addresses

addAddress

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

vCard property name: ADR

vCard versions: 2.1, 3.0, 4.0

Parameters:
address - the mailing address to add

getOrphanedLabels

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

vCard property name: LABEL

vCard versions: 2.1, 3.0

Returns:
the orphaned labels

addOrphanedLabel

public void addOrphanedLabel(LabelType 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 AddressType.setLabel(java.lang.String) method.

vCard property name: LABEL

vCard versions: 2.1, 3.0

Parameters:
label - the orphaned label to add

getEmails

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

vCard property name: EMAIL

vCard versions: 2.1, 3.0, 4.0

Returns:
the email addresses

addEmail

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

vCard property name: EMAIL

vCard versions: 2.1, 3.0, 4.0

Parameters:
email - the email address to add

addEmail

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

vCard property name: EMAIL

vCard versions: 2.1, 3.0, 4.0

Parameters:
email - the email address to add (e.g. "johndoe@aol.com")
types - the type(s) to assign to the email
Returns:
the type object that was created

getTelephoneNumbers

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

vCard property name: TEL

vCard versions: 2.1, 3.0, 4.0

Returns:
the telephone numbers

addTelephoneNumber

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

vCard property name: TEL

vCard versions: 2.1, 3.0, 4.0

Parameters:
telephoneNumber - the telephone number to add

addTelephoneNumber

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

vCard property name: TEL

vCard 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 type object that was created

getMailer

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

vCard property name: MAILER

vCard versions: 2.1, 3.0

Returns:
the email client

setMailer

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

vCard property name: MAILER

vCard versions: 2.1, 3.0

Parameters:
mailer - the email client

setMailer

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

vCard property name: MAILER

vCard versions: 2.1, 3.0

Parameters:
mailer - the email client (e.g. "Thunderbird")
Returns:
the type object that was created

getUrls

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

vCard property name: URL

vCard versions: 2.1, 3.0, 4.0

Returns:
the URLs

addUrl

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

vCard property name: URL

vCard versions: 2.1, 3.0, 4.0

Parameters:
url - the URL to add

addUrl

public UrlType 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(UrlType).

vCard property name: URL

vCard versions: 2.1, 3.0, 4.0

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

getTimezones

public List<TimezoneType> getTimezones()

Gets all instances of the timezone property.

This method should only be used on the rare occasion when there are alternative representations of this property (see: explanation of ALTID). Otherwise, use getTimezone().

vCard property name: TZ

vCard versions: 2.1, 3.0, 4.0

Returns:
the timezones
See Also:
TimezoneType.getAltId()

getTimezone

public TimezoneType getTimezone()

Gets the timezone the person lives/works in.

Use getTimezones() to get the alternative representations of this property (see: explanation of ALTID).

vCard property name: TZ

vCard versions: 2.1, 3.0, 4.0

Returns:
the timezone

setTimezone

public void setTimezone(TimezoneType timezone)

Sets the timezone the person lives/works in.

Use addTimezone(ezvcard.types.TimezoneType) to add alternative representations of this property (see: explanation of ALTID).

vCard property name: TZ

vCard versions: 2.1, 3.0, 4.0

Parameters:
timezone - the timezone

addTimezone

public void addTimezone(TimezoneType timezone)

Adds a timezone to the vCard.

This method should only be used on the rare occasion when alternative representations of this property are needed (see: explanation of ALTID). Otherwise, use setTimezone(ezvcard.types.TimezoneType).

vCard property name: TZ

vCard versions: 2.1, 3.0, 4.0

Parameters:
timezone - the timezone to add
See Also:
TimezoneType.setAltId(java.lang.String)

getGeos

public List<GeoType> getGeos()

Gets all geographical position properties.

This method should only be used on the rare occasion when there are alternative representations of this property (see: explanation of ALTID). Otherwise, use getGeo().

vCard property name: GEO

vCard versions: 2.1, 3.0, 4.0

Returns:
the geographical positions
See Also:
GeoType.getAltId()

getGeo

public GeoType getGeo()

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

Use getGeos() to get the alternative representations of this property (see: explanation of ALTID).

vCard property name: GEO

vCard versions: 2.1, 3.0, 4.0

Returns:
the geographical position

setGeo

public void setGeo(GeoType geo)

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

Use addGeo(ezvcard.types.GeoType) to add alternative representations of this property (see: explanation of ALTID).

vCard property name: GEO

vCard versions: 2.1, 3.0, 4.0

Parameters:
geo - the geographical position

setGeo

public GeoType setGeo(double latitude,
                      double longitude)

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

Use addGeo(ezvcard.types.GeoType) to add alternative representations of this property (see: explanation of ALTID).

vCard property name: GEO

vCard versions: 2.1, 3.0, 4.0

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

addGeo

public void addGeo(GeoType geo)

Adds a geographical position to the vCard.

This method should only be used on the rare occasion when alternative representations of this property are needed (see: explanation of ALTID). Otherwise, use setGeo(GeoType).

vCard property name: GEO

vCard versions: 2.1, 3.0, 4.0

Parameters:
geo - the geographical position to add
See Also:
GeoType.setAltId(java.lang.String)

getOrganization

public OrganizationType getOrganization()

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

Use getOrganizations() to get the alternative representations of this property (see: explanation of ALTID).

vCard property name: ORG

vCard versions: 2.1, 3.0, 4.0

Returns:
the department(s)

getOrganizations

public List<OrganizationType> getOrganizations()

Gets all organization properties.

This method should only be used on the rare occasion when there are alternative representations of this property (see: explanation of ALTID). Otherwise, use getOrganization().

vCard property name: ORG

vCard versions: 2.1, 3.0, 4.0

Returns:
the organization properties
See Also:
OrganizationType.getAltId()

addOrganization

public void addOrganization(OrganizationType organization)

Adds an organization property to the vCard.

This method should only be used on the rare occasion when alternative representations of this property are needed (see: explanation of ALTID). Otherwise, use setOrganization(OrganizationType).

vCard property name: ORG

vCard versions: 2.1, 3.0, 4.0

Parameters:
organization - the organization type object to add
See Also:
OrganizationType.setAltId(java.lang.String)

setOrganization

public void setOrganization(OrganizationType organization)

Sets the hierarchy of departments to which the person belongs.

Use addOrganization(ezvcard.types.OrganizationType) to add alternative representations of this property (see: explanation of ALTID).

vCard property name: ORG

vCard versions: 2.1, 3.0, 4.0

Parameters:
organization - the organization type object

setOrganization

public OrganizationType setOrganization(String... departments)

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

Use addOrganization(ezvcard.types.OrganizationType) to add alternative representations of this property (see: explanation of ALTID).

vCard property name: ORG

vCard 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")

getCategoriesList

public List<CategoriesType> getCategoriesList()

Gets all CATEGORIES properties.

This method should only be used on the rare occasion when there are alternative representations of this property (see: explanation of ALTID). Otherwise, use getCategories().

vCard property name: CATEGORIES

vCard versions: 2.1, 3.0, 4.0

Returns:
the CATEGORIES properties
See Also:
CategoriesType.getAltId()

getCategories

public CategoriesType getCategories()

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

Use getCategoriesList() to get the alternative representations of this property (see: explanation of ALTID).

vCard property name: CATEGORIES

vCard versions: 2.1, 3.0, 4.0

Returns:
the categories

addCategories

public void addCategories(CategoriesType categories)

Adds a CATEGORIES property to the vCard.

This method should only be used on the rare occasion when alternative representations of this property are needed (see: explanation of ALTID). Otherwise, use setCategories(CategoriesType).

vCard property name: CATEGORIES

vCard versions: 2.1, 3.0, 4.0

Parameters:
categories - the CATEGORIES property to add
See Also:
CategoriesType.setAltId(java.lang.String)

setCategories

public void setCategories(CategoriesType categories)

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

Use addCategories(ezvcard.types.CategoriesType) to add alternative representations of this property (see: explanation of ALTID).

vCard property name: CATEGORIES

vCard versions: 2.1, 3.0, 4.0

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

setCategories

public CategoriesType 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(CategoriesType).

Use addCategories(ezvcard.types.CategoriesType) to add alternative representations of this property (see: explanation of ALTID).

vCard property name: CATEGORIES

vCard versions: 2.1, 3.0, 4.0

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

getAgent

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

vCard property name: AGENT

vCard versions: 2.1, 3.0

Returns:
the agent information

setAgent

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

vCard property name: AGENT

vCard versions: 2.1, 3.0

Parameters:
agent - the agent information

getNotes

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

vCard property name: NOTE

vCard versions: 2.1, 3.0, 4.0

Returns:
the notes

addNote

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

vCard property name: NOTE

vCard versions: 2.1, 3.0, 4.0

Parameters:
note - the note to add

addNote

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

vCard property name: NOTE

vCard versions: 2.1, 3.0, 4.0

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

getUid

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

vCard property name: UID

vCard versions: 2.1, 3.0, 4.0

Returns:
the unique identifier

setUid

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

vCard property name: UID

vCard versions: 2.1, 3.0, 4.0

Parameters:
uid - the unique identifier

getKeys

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

vCard property name: KEY

vCard versions: 2.1, 3.0, 4.0

Returns:
the keys

addKey

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

vCard property name: KEY

vCard versions: 2.1, 3.0, 4.0

Parameters:
key - the key to add

getImpps

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

vCard property name: IMPP

vCard versions: 3.0, 4.0

Returns:
the instant messaging handles

addImpp

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

vCard property name: IMPP

vCard versions: 3.0, 4.0

Parameters:
impp - the instant messaging handle to add

getRelations

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

vCard property name: RELATED

vCard versions: 4.0

Returns:
the person's relations

addRelated

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

vCard property name: RELATED

vCard versions: 4.0

Parameters:
related - the relation to add

getLanguages

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

vCard property name: LANG

vCard versions: 4.0

Returns:
the languages

addLanguage

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

vCard property name: LANG

vCard versions: 4.0

Parameters:
language - the language to add

addLanguage

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

vCard property name: LANG

vCard versions: 4.0

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

getCalendarRequestUris

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

vCard property name: CALADRURI

vCard versions: 4.0

Returns:
the calendar request URIs

addCalendarRequestUri

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

vCard property name: CALADRURI

vCard versions: 4.0

Parameters:
calendarRequestUri - the calendar request URI to add

getCalendarUris

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

vCard property name: CALURI

vCard versions: 4.0

Returns:
the calendar URIs

addCalendarUri

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

vCard property name: CALURI

vCard versions: 4.0

Parameters:
calendarUri - the calendar URI to add

getFbUrls

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

vCard property name: FBURL

vCard versions: 4.0

Returns:
the free-busy URLs

addFbUrl

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

vCard property name: FBURL

vCard versions: 4.0

Parameters:
fbUrl - the free-busy URL to add

getClientPidMaps

public List<ClientPidMapType> 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.

vCard property name: CLIENTPIDMAP

vCard versions: 4.0

Returns:
the client PID maps

addClientPidMap

public void addClientPidMap(ClientPidMapType 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.

vCard property name: CLIENTPIDMAP

vCard versions: 4.0

Parameters:
clientPidMap - the client PID map to add

getXmls

public List<XmlType> 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.

vCard property name: XML

vCard versions: 4.0

Returns:
the XML data

addXml

public void addXml(XmlType 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.

vCard property name: XML

vCard versions: 4.0

Parameters:
xml - the XML data to add

getExpertise

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

vCard property name: EXPERTISE

vCard versions: 4.0

Returns:
the professional skills
See Also:
RFC 6715

addExpertise

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

vCard property name: EXPERTISE

vCard versions: 4.0

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

addExpertise

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

vCard property name: EXPERTISE

vCard versions: 4.0

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

getHobbies

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

vCard property name: HOBBY

vCard versions: 4.0

Returns:
the hobbies
See Also:
RFC 6715

addHobby

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

vCard property name: HOBBY

vCard versions: 4.0

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

addHobby

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

vCard property name: HOBBY

vCard versions: 4.0

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

getInterests

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

vCard property name: INTEREST

vCard versions: 4.0

Returns:
the interests
See Also:
RFC 6715

addInterest

public void addInterest(InterestType interest)
Adds an interest.

vCard property name: INTEREST

vCard versions: 4.0

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

addInterest

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

vCard property name: INTEREST

vCard versions: 4.0

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

getOrgDirectories

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

vCard property name: ORG-DIRECTORY

vCard versions: 4.0

Returns:
the organization directories
See Also:
RFC 6715

addOrgDirectory

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

vCard property name: ORG-DIRECTORY

vCard versions: 4.0

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

addOrgDirectory

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

vCard property name: ORG-DIRECTORY

vCard versions: 4.0

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

addExtendedType

public void addExtendedType(VCardType type)
Adds an extended type to the vCard.

Parameters:
type - the extended type to add

addExtendedType

public RawType addExtendedType(String name,
                               String value)
Adds an extended type to the vCard.

Parameters:
name - the name of the extended type. It MUST begin with "X-" (for example, "X-GENDER").
value - the value of the extended type
Returns:
the extended type object that was created

getExtendedType

public List<RawType> getExtendedType(String typeName)
Gets all extended types that have a particular name. Use this method to retrieve the extended types that have NOT been unmarshalled into a custom, extended type class.

Parameters:
typeName - the type name
Returns:
the extended types or empty list if none were found

getExtendedType

public <T extends VCardType> List<T> getExtendedType(String typeName,
                                                     Class<T> clazz)
Gets all extended types that have a particular name and that are an instance of a particular class.

Parameters:
typeName - the type name
clazz - the type class
Returns:
the extended types or empty list if none were found

getExtendedType

public <T extends VCardType> List<T> getExtendedType(Class<T> clazz)
Gets all extended types that are an instance of a particular class.

Parameters:
clazz - the type class
Returns:
the extended types or empty list of none were found

getExtendedTypes

public Map<String,List<VCardType>> getExtendedTypes()
Gets all extended types.

Returns:
the extended types (key = the type name, value = the list of type objects that have that name)

getAllTypes

public Collection<VCardType> getAllTypes()
Gets all of the vCard's properties. Does not include the "BEGIN", "END", or "VERSION" properties.

Returns:
the vCard properties

iterator

public Iterator<VCardType> 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<VCardType>
Returns:
the iterator


Copyright © 2012-2013. All Rights Reserved.