|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectezvcard.types.VCardType
ezvcard.types.TextListType
public class TextListType
Represents a type whose value is a list of values.
Field Summary | |
---|---|
protected List<String> |
values
|
Fields inherited from class ezvcard.types.VCardType |
---|
group, subTypes, typeName |
Constructor Summary | |
---|---|
TextListType(String name,
char separator)
|
Method Summary | |
---|---|
void |
addValue(String value)
Adds a value to the list. |
protected void |
doMarshalText(StringBuilder sb,
VCardVersion version,
List<String> warnings,
CompatibilityMode compatibilityMode)
Converts this type object to a string for sending over the wire. |
protected void |
doMarshalXml(XCardElement parent,
List<String> warnings,
CompatibilityMode compatibilityMode)
Marshals this type for inclusion in an xCard (XML document). |
protected void |
doUnmarshalText(String value,
VCardVersion version,
List<String> warnings,
CompatibilityMode compatibilityMode)
Unmarshals the type value from off the wire. |
protected void |
doUnmarshalXml(XCardElement element,
List<String> warnings,
CompatibilityMode compatibilityMode)
Unmarshals the type from an xCard (XML document). |
List<String> |
getValues()
Gest the list of values. |
void |
removeValue(String value)
Removes a value from the list. |
Methods inherited from class ezvcard.types.VCardType |
---|
compareTo, doMarshalSubTypes, doUnmarshalHtml, getGroup, getQName, getSubTypes, getSupportedVersions, 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 |
---|
protected List<String> values
Constructor Detail |
---|
public TextListType(String name, char separator)
name
- the type name (e.g. "NICKNAME")separator
- the delimiter to use (e.g. ",")Method Detail |
---|
public List<String> getValues()
public void addValue(String value)
value
- the value to addpublic void removeValue(String value)
value
- the value to removeprotected void doMarshalText(StringBuilder sb, VCardVersion version, List<String> warnings, CompatibilityMode compatibilityMode)
VCardType
doMarshalText
in class VCardType
sb
- the buffer to add the marshalled value toversion
- the version vCard that is being generatedwarnings
- 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 doUnmarshalText(String value, VCardVersion version, List<String> warnings, CompatibilityMode compatibilityMode)
VCardType
doUnmarshalText
in class VCardType
value
- the unfolded value from off the wire. If the wire value is
in the "quoted-printable" encoding, it will be decoded.version
- the version of the vCard that is being read or null if the
VERSION type has not been parsed yet (v3.0 and v4.0 require that the
VERSION type be at the top of the vCard, but v2.1 has no such
requirement)warnings
- allows the programmer to alert the user to any
note-worthy (but non-critical) issues that occurred during the
unmarshalling processcompatibilityMode
- allows you to customize the unmarshalling
process depending on where the vCard came fromprotected void doMarshalXml(XCardElement parent, List<String> warnings, CompatibilityMode compatibilityMode)
VCardType
doMarshalXml
in class VCardType
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 VCardType
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 |