|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectezvcard.property.VCardProperty
public abstract class VCardProperty
Represents a vCard key/value pair entry (called a "type" or "property").
Field Summary | |
---|---|
protected String |
group
The group that this property belongs to or null if it doesn't belong to a group. |
protected VCardParameters |
parameters
The property's parameters. |
Constructor Summary | |
---|---|
VCardProperty()
|
Method Summary | |
---|---|
protected Set<VCardVersion> |
_supportedVersions()
Gets the vCard versions that support this property. |
protected void |
_validate(List<Warning> warnings,
VCardVersion version,
VCard vcard)
Checks the property for data consistency problems or deviations from the spec. |
void |
addParameter(String name,
String value)
Adds a value to a parameter. |
int |
compareTo(VCardProperty that)
Sorts by PREF parameter ascending. |
String |
getGroup()
Gets this property's group. |
String |
getParameter(String name)
Gets the first value of a parameter. |
VCardParameters |
getParameters()
Gets all of the property's parameters. |
List<String> |
getParameters(String name)
Gets all values of a parameter. |
Set<VCardVersion> |
getSupportedVersions()
Gets the vCard versions that support this property. |
void |
removeParameter(String name)
Removes a parameter from the property. |
void |
setGroup(String group)
Sets this property's group. |
void |
setParameter(String name,
String value)
Replaces all existing values of a parameter with the given value. |
void |
setParameters(VCardParameters parameters)
Sets the property's parameters. |
List<Warning> |
validate(VCardVersion version,
VCard vcard)
Checks the property for data consistency problems or deviations from the spec. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected String group
protected VCardParameters parameters
Constructor Detail |
---|
public VCardProperty()
Method Detail |
---|
public final Set<VCardVersion> getSupportedVersions()
protected Set<VCardVersion> _supportedVersions()
Gets the vCard versions that support this property.
This method should be overridden by child classes if the property does not support all vCard versions. The default implementation of this method returns all vCard versions.
public final List<Warning> validate(VCardVersion version, VCard vcard)
version
- the version to check the property against (use 4.0 for
xCard and jCard)vcard
- the vCard this property belongs to
VCard.validate(ezvcard.VCardVersion)
protected void _validate(List<Warning> warnings, VCardVersion version, VCard vcard)
warnings
- the list to add the warnings toversion
- the version to check the property againstvcard
- the vCard this property belongs topublic VCardParameters getParameters()
public void setParameters(VCardParameters parameters)
parameters
- the parameterspublic String getParameter(String name)
name
- the parameter name (case insensitive, e.g. "LANGUAGE")
public List<String> getParameters(String name)
name
- the parameter name (case insensitive, e.g. "LANGUAGE")
public void setParameter(String name, String value)
name
- the parameter name (case insensitive, e.g. "LANGUAGE")value
- the parameter valuepublic void addParameter(String name, String value)
name
- the parameter name (case insensitive, e.g. "LANGUAGE")value
- the parameter valuepublic void removeParameter(String name)
name
- the parameter name (case insensitive, e.g. "LANGUAGE")public String getGroup()
public void setGroup(String group)
group
- the group or null to remove the property's grouppublic int compareTo(VCardProperty that)
compareTo
in interface Comparable<VCardProperty>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |