public class VCardProperty extends Object
N:name
, TEL:1111111111
are
"property".
BEGIN:VCARD
N:name
TEL:1111111111
END:VCARD
vCard's property has three elements: name, parameter (or param), and value. Name is the name
of each property. Parameter or param is additional information for the property. Value is one
or multiple values representing the parameter.
e.g.
N;CHARSET=UTF-8:Joe;Due;M.;Mr.;Ph.D.
, has "N" for name, "CHALSET=UTF-8" for param,
and "Joe;Due;M.;Mr.;Ph.D." for value.
Usually params are represented as "key=value" pair, but not always
(The property TEL;WORK;VOICE:(111) 555-1212
has two params without key "TYPE",
which are same as "TYPE=WORK" and "TYPE=VOICE". In vCard 3.0, we can even express them as
"TYPE=WORK,VOICE").
Sometimes (not always) value can be separated by semi-colon. In the example above "Joe;Due;;;"
should be interpreted as five strings: "Joe" (for family name), "Due" (for given name), "M."
(for middle name), "Mr." (for prefix), and "Ph.D." (for suffix). Whether the value is
separable or not is specified by vCard specs.Constructor and Description |
---|
VCardProperty() |
Modifier and Type | Method and Description |
---|---|
void |
addGroup(String group) |
void |
addParameter(String paramName,
String paramValue) |
void |
addValues(List<String> propertyValueList) |
void |
addValues(String... propertyValues) |
byte[] |
getByteValue() |
List<String> |
getGroupList() |
String |
getName() |
Map<String,Collection<String>> |
getParameterMap() |
Collection<String> |
getParameters(String type) |
String |
getRawValue() |
List<String> |
getValueList() |
void |
setByteValue(byte[] byteValue) |
void |
setName(String name) |
void |
setParameter(String paramName,
String paramValue) |
void |
setRawValue(String rawValue) |
void |
setValues(List<String> propertyValueList) |
void |
setValues(String... propertyValues) |
public void setName(String name)
public void addGroup(String group)
public void setRawValue(String rawValue)
public void setValues(String... propertyValues)
public void addValues(String... propertyValues)
public void setByteValue(byte[] byteValue)
public String getName()
public Map<String,Collection<String>> getParameterMap()
public Collection<String> getParameters(String type)
public String getRawValue()
public byte[] getByteValue()