|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectezvcard.types.VCardType
ezvcard.types.TextType
ezvcard.types.LanguageType
public class LanguageType
A language that the person speaks.
VCard vcard = new VCard(); LanguageType lang = new LanguageType("en"); lang.setPref(1); //most preferred vcard.addLanguage(lang); lang = new LanguageType("fr"); lang.setPref(2); //second-most preferred vcard.addLanguage(lang);
vCard property name: LANG
vCard versions: 4.0
Field Summary | |
---|---|
static String |
NAME
|
Fields inherited from class ezvcard.types.TextType |
---|
value |
Fields inherited from class ezvcard.types.VCardType |
---|
group, subTypes, typeName |
Constructor Summary | |
---|---|
LanguageType()
|
|
LanguageType(String language)
|
Method Summary | |
---|---|
void |
addPid(int localId,
int clientPidMapRef)
Adds a PID value. |
protected void |
doMarshalXml(XCardElement parent,
List<String> warnings,
CompatibilityMode compatibilityMode)
Marshals this type for inclusion in an xCard (XML document). |
protected void |
doUnmarshalXml(XCardElement element,
List<String> warnings,
CompatibilityMode compatibilityMode)
Unmarshals the type from an xCard (XML document). |
String |
getAltId()
Gets the ALTID. |
List<Integer[]> |
getPids()
Gets all PID parameter values. |
Integer |
getPref()
Gets the preference value. |
VCardVersion[] |
getSupportedVersions()
Gets the vCard versions that support this type. |
String |
getType()
Gets the TYPE parameter. |
void |
removePids()
Removes all PID values. |
void |
setAltId(String altId)
Sets the ALTID. |
void |
setPref(Integer pref)
Sets the preference value. |
void |
setType(String type)
Sets the TYPE parameter. |
Methods inherited from class ezvcard.types.TextType |
---|
doMarshalText, doUnmarshalHtml, doUnmarshalText, getValue, setValue |
Methods inherited from class ezvcard.types.VCardType |
---|
compareTo, doMarshalSubTypes, getGroup, getQName, getSubTypes, getTypeName, marshalSubTypes, marshalText, marshalXml, setGroup, unmarshalHtml, unmarshalText, unmarshalXml |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String NAME
Constructor Detail |
---|
public LanguageType()
public LanguageType(String language)
language
- the language (e.g. "en-ca")Method Detail |
---|
public String getType()
vCard versions: 4.0
public void setType(String type)
vCard versions: 4.0
type
- the TYPE value (this should be either "work" or "home") or
null to removepublic List<Integer[]> getPids()
vCard versions: 4.0
VCardSubTypes.getPids()
public void addPid(int localId, int clientPidMapRef)
vCard versions: 4.0
localId
- the local IDclientPidMapRef
- the ID used to reference the property's globally
unique identifier in the CLIENTPIDMAP property.VCardSubTypes.addPid(int, int)
public void removePids()
vCard versions: 4.0
VCardSubTypes.removePids()
public Integer getPref()
vCard versions: 4.0
VCardSubTypes.getPref()
public void setPref(Integer pref)
vCard versions: 4.0
pref
- the preference value or null to removeVCardSubTypes.setPref(java.lang.Integer)
public String getAltId()
vCard versions: 4.0
VCardSubTypes.getAltId()
public void setAltId(String altId)
vCard versions: 4.0
altId
- the ALTID or null to removeVCardSubTypes.setAltId(java.lang.String)
public VCardVersion[] getSupportedVersions()
VCardType
getSupportedVersions
in class VCardType
protected void doMarshalXml(XCardElement parent, List<String> warnings, CompatibilityMode compatibilityMode)
VCardType
doMarshalXml
in class TextType
parent
- the XML element that the type's value will be inserted
into. For example, this would be the "<fn>" element for the "FN"
type.warnings
- allows the programmer to alert the user to any
note-worthy (but non-critical) issues that occurred during the
marshalling processcompatibilityMode
- allows the programmer to customize the
marshalling process depending on the expected consumer of the vCardprotected void doUnmarshalXml(XCardElement element, List<String> warnings, CompatibilityMode compatibilityMode)
VCardType
doUnmarshalXml
in class TextType
element
- the XML element that contains the type data. For example,
this would be the "<fn>" element for the "FN" type. This object
will NOT include the "<parameters>" child element (it is removed
after being unmarshalled into a VCardSubTypes
object).warnings
- allows the programmer to alert the user to any
note-worthy (but non-critical) issues that occurred during the
unmarshalling processcompatibilityMode
- allows the programmer to customize the
unmarshalling process depending on where the vCard came from
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |