public class StructuredName extends VCardProperty implements HasAltId
Defines the individual components of the person's name.
Code sample
VCard vcard = new VCard(); StructuredName n = new StructuredName(); n.setFamily("House"); n.setGiven("Gregory"); n.addPrefix("Dr"); n.addSuffix("MD"); vcard.setStructuredName(n);
Property name: N
Supported versions: 2.1, 3.0, 4.0
group, parameters
Constructor and Description |
---|
StructuredName() |
Modifier and Type | Method and Description |
---|---|
void |
addAdditional(java.lang.String additional)
Adds an additional name the person goes by.
|
void |
addPrefix(java.lang.String prefix)
Adds a prefix.
|
void |
addSuffix(java.lang.String suffix)
Adds a suffix.
|
java.util.List<java.lang.String> |
getAdditional()
Gets any additional names the person goes by.
|
java.lang.String |
getAltId()
Gets the property's ALTID parameter.
|
java.lang.String |
getFamily()
Gets the family name (aka "last name").
|
java.lang.String |
getGiven()
Gets the given name (aka "first name").
|
java.lang.String |
getLanguage()
Gets the language that the property value is written in.
|
java.util.List<java.lang.String> |
getPrefixes()
Gets the prefixes.
|
java.util.List<java.lang.String> |
getSortAs()
Gets the string(s) that define how to sort the vCard.
|
java.util.List<java.lang.String> |
getSuffixes()
Gets the suffixes.
|
void |
setAltId(java.lang.String altId)
Sets the property's ALTID parameter.
|
void |
setFamily(java.lang.String family)
Sets the family name (aka "last name").
|
void |
setGiven(java.lang.String given)
Sets the given name (aka "first name").
|
void |
setLanguage(java.lang.String language)
Sets the language that the property value is written in.
|
void |
setSortAs(java.lang.String family)
Sets the string that defines how to sort the vCard.
|
void |
setSortAs(java.lang.String family,
java.lang.String given)
Sets the strings that define how to sort the vCard.
|
_supportedVersions, _validate, addParameter, compareTo, getGroup, getParameter, getParameters, getParameters, getSupportedVersions, removeParameter, setGroup, setParameter, setParameters, validate
public java.lang.String getFamily()
public void setFamily(java.lang.String family)
family
- the family name or null to removepublic java.lang.String getGiven()
public void setGiven(java.lang.String given)
given
- the given name or null to removepublic java.util.List<java.lang.String> getAdditional()
public void addAdditional(java.lang.String additional)
additional
- the additional name to addpublic java.util.List<java.lang.String> getPrefixes()
public void addPrefix(java.lang.String prefix)
prefix
- the prefix to add (e.g. "Mr.")public java.util.List<java.lang.String> getSuffixes()
public void addSuffix(java.lang.String suffix)
suffix
- the suffix to add (e.g. "Jr.")public java.util.List<java.lang.String> getSortAs()
2.1 and 3.0 vCards should use the SORT-STRING
property
instead.
Supported versions: 4.0
VCardParameters.getSortAs()
public void setSortAs(java.lang.String family)
2.1 and 3.0 vCards should use the SORT-STRING
property
instead.
Supported versions: 4.0
family
- the sorttable family name (e.g. "Adboville" if the family
name is "d'Aboville") or null to removepublic void setSortAs(java.lang.String family, java.lang.String given)
2.1 and 3.0 vCards should use the SORT-STRING
property
instead.
Supported versions: 4.0
family
- the sortable family name (e.g. "Adboville" if the family
name is "d'Aboville")given
- the sortable given namepublic java.lang.String getLanguage()
VCardProperty
VCardParameters.getLanguage()
public void setLanguage(java.lang.String language)
VCardProperty
language
- the language or null to removeVCardParameters.setLanguage(java.lang.String)
public java.lang.String getAltId()
HasAltId
Supported versions: 4.0
getAltId
in interface HasAltId
VCardParameters.getAltId()
public void setAltId(java.lang.String altId)
HasAltId
Supported versions: 4.0
setAltId
in interface HasAltId
altId
- the ALTID or null to removeVCardParameters.setAltId(java.lang.String)
This software is published under the BSD license. Copyright © 2003-${build.year}, CRIXP AG, Switzerland, All rights reserved. Use is subject to license terms.