|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectezvcard.VCardSubTypes
public class VCardSubTypes
Holds the parameters (aka "sub types") of a vCard Type.
Constructor Summary | |
---|---|
VCardSubTypes()
|
|
VCardSubTypes(VCardSubTypes orig)
Copy constructor. |
Method Summary | |
---|---|
void |
addPid(int localId)
Adds a PID parameter value. |
void |
addPid(int localId,
int clientPidMapRef)
Adds a PID parameter value. |
void |
addType(String type)
Adds a TYPE sub type |
List<String> |
get(String name)
Gets the values of a Sub Type |
String |
getAltId()
Gets the ALTID parameter value. |
CalscaleParameter |
getCalscale()
Gets the CALSCALE parameter value. |
String |
getCharset()
Gets the CHARSET sub type. |
EncodingParameter |
getEncoding()
Gets the ENCODING sub type. |
String |
getFirst(String name)
Gets the first value of a Sub Type. |
double[] |
getGeo()
Gets the GEO parameter value. |
Integer |
getIndex()
Gets the INDEX parameter. |
String |
getLanguage()
Gets the LANGUAGE sub type. |
String |
getLevel()
Gets the LEVEL parameter. |
String |
getMediaType()
Gets the MEDIATYPE parameter. |
ListMultimap<String,String> |
getMultimap()
Gets the object used to store the Sub Types. |
Set<String> |
getNames()
Gets the names of all the Sub Types. |
List<Integer[]> |
getPids()
Gets all PID parameter values. |
Integer |
getPref()
Gets the preference value. |
List<String> |
getSortAs()
Gets the SORT-AS parameter value(s). |
String |
getType()
Gets the first TYPE sub type. |
Set<String> |
getTypes()
Gets all TYPE sub types. |
ValueParameter |
getValue()
Gets the VALUE sub type. |
void |
put(String name,
String value)
Adds a value to a Sub Type. |
void |
remove(String name,
String value)
Removes a value from a Sub Type. |
List<String> |
removeAll(String name)
Removes a Sub Type. |
void |
removePids()
Removes all PID values. |
void |
removeType(String type)
Removes a TYPE sub type. |
List<String> |
replace(String name,
String value)
Adds a value to a Sub Type, replacing all existing values that the Sub Type has. |
void |
setAltId(String altId)
Sets the ALTID parameter value. |
void |
setCalscale(CalscaleParameter value)
Gets the CALSCALE parameter value. |
void |
setCharset(String charset)
Sets the CHARSET sub type |
void |
setEncoding(EncodingParameter encoding)
Sets the ENCODING sub type. |
void |
setGeo(double latitude,
double longitude)
Sets the GEO parameter value. |
void |
setIndex(Integer index)
Sets the INDEX parameter. |
void |
setLanguage(String language)
Sets the LANGUAGE sub type. |
void |
setLevel(String level)
Sets the LEVEL parameter. |
void |
setMediaType(String mediaType)
Sets the MEDIATYPE parameter. |
void |
setPref(Integer pref)
Sets the preference value. |
void |
setSortAs(String... names)
Sets the SORT-AS parameter value(s). |
void |
setType(String type)
Sets the TYPE sub type. |
void |
setValue(ValueParameter value)
Sets the VALUE sub type. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public VCardSubTypes()
public VCardSubTypes(VCardSubTypes orig)
orig
- the object to copyMethod Detail |
---|
public void put(String name, String value)
name
- the Sub Type namevalue
- the value to addpublic List<String> replace(String name, String value)
name
- the Sub Type namevalue
- the values to replace all existing values with
public List<String> removeAll(String name)
name
- the Sub Type name
public void remove(String name, String value)
name
- the Sub Type namevalue
- the value to removepublic List<String> get(String name)
name
- the Sub Type name
public String getFirst(String name)
name
- the Sub Type name
public Set<String> getNames()
public ListMultimap<String,String> getMultimap()
public EncodingParameter getEncoding()
vCard versions: 2.1, 3.0
public void setEncoding(EncodingParameter encoding)
vCard versions: 2.1, 3.0
encoding
- the encoding or null to removepublic ValueParameter getValue()
vCard versions: 2.1, 3.0, 4.0
public void setValue(ValueParameter value)
vCard versions: 2.1, 3.0, 4.0
value
- the value or null to removepublic String getCharset()
vCard versions: 2.1
public void setCharset(String charset)
vCard versions: 2.1
charset
- the value or null to removepublic String getLanguage()
vCard versions: 2.1, 3.0, 4.0
public void setLanguage(String language)
vCard versions: 2.1, 3.0, 4.0
language
- the language (e.g "en-US") or null to removepublic Set<String> getTypes()
vCard versions: 2.1, 3.0, 4.0
public void addType(String type)
vCard versions: 2.1, 3.0, 4.0
type
- the valuepublic String getType()
vCard versions: 2.1, 3.0, 4.0
public void setType(String type)
vCard versions: 2.1, 3.0, 4.0
type
- the value or null to removepublic void removeType(String type)
vCard versions: 2.1, 3.0, 4.0
type
- the value to removepublic Integer getPref()
Gets the preference value. The lower the number, the more preferred this type is compared to other types in the vCard with the same name. If a type doesn't have a preference value, then it is considered the least preferred.
In the vCard below, the address on the second row is the most preferred because it has the lowest PREF value.
ADR;TYPE=work;PREF=2: ADR;TYPE=work;PREF=1: ADR;TYPE=home:
Preference values must be numeric and must be between 1 and 100.
vCard versions: 4.0
public void setPref(Integer pref)
Sets the preference value. The lower the number, the more preferred this type is compared to other types in the vCard with the same name. If a type doesn't have a preference value, then it is considered the least preferred.
In the vCard below, the address on the second row is the most preferred because it has the lowest PREF value.
ADR;TYPE=work;PREF=2: ADR;TYPE=work;PREF=1: ADR;TYPE=home:
Preference values must be numeric and must be between 1 and 100.
vCard versions: 4.0
pref
- the preference value or null to remove
IllegalArgumentException
- if the value is not between 1 and 100public String getAltId()
For example, a vCard may contain multiple NOTE types that each have the same ALTID. This means that each NOTE contains a different representation of the same information. In the example below, the first three NOTEs have the same ALTID. They each contain the same message, but each is written in a different language. The other NOTEs have different (or absent) ALTIDs, which means they are not associated with the top three.
NOTE;ALTID=1;LANGUAGE=en: Hello world! NOTE;ALTID=1;LANGUAGE=fr: Bonjour tout le monde! NOTE;ALTID=1;LANGUAGE=es: �Hola, mundo! NOTE;ALTID=2;LANGUAGE=de: Meine Lieblingsfarbe ist blau. NOTE;ALTID=2;LANGUAGE=en: My favorite color is blue. NOTE: This vCard will self-destruct in 5 seconds.
vCard versions: 4.0
public void setAltId(String altId)
For example, a vCard may contain multiple NOTE types that each have the same ALTID. This means that each NOTE contains a different representation of the same information. In the example below, the first three NOTEs have the same ALTID. They each contain the same message, but each is written in a different language. The other NOTEs have different (or absent) ALTIDs, which means they are not associated with the top three.
NOTE;ALTID=1;LANGUAGE=en: Hello world! NOTE;ALTID=1;LANGUAGE=fr: Bonjour tout le monde! NOTE;ALTID=1;LANGUAGE=es: �Hola, mundo! NOTE;ALTID=2;LANGUAGE=de: Meine Lieblingsfarbe ist blau. NOTE;ALTID=2;LANGUAGE=en: My favorite color is blue. NOTE: This vCard will self-destruct in 5 seconds.
vCard versions: 4.0
altId
- the ALTID or null to removepublic double[] getGeo()
vCard versions: 4.0
public void setGeo(double latitude, double longitude)
vCard versions: 4.0
latitude
- the latitudelongitude
- the longitudepublic List<String> getSortAs()
vCard versions: 4.0
public void setSortAs(String... names)
vCard versions: 4.0
names
- the names in the order they should be sorted in (e.g.
["Aboville", "Christine"] if the family name is "d'Aboville" and the
given name is "Christine") or empty parameter list to removepublic CalscaleParameter getCalscale()
vCard versions: 4.0
public void setCalscale(CalscaleParameter value)
vCard versions: 4.0
value
- the type of calendar or null to removepublic List<Integer[]> getPids()
Gets all PID parameter values. PIDs can exist on any property where multiple instances are allowed (such as EMAIL or ADR, but not N because only 1 instance of N is allowed).
When used in conjunction with the CLIENTPIDMAP property, it allows an individual property instance to be uniquely identifiable. This feature is made use of when two different versions of the same vCard have to be merged together (called "synchronizing").
vCard versions: 4.0
public void addPid(int localId)
Adds a PID parameter value. PIDs can exist on any property where multiple instances are allowed (such as EMAIL or ADR, but not N because only 1 instance of N is allowed).
When used in conjunction with the CLIENTPIDMAP property, it allows an individual property instance to be uniquely identifiable. This feature is made use of when two different versions of the same vCard have to be merged together (called "synchronizing").
vCard versions: 4.0
localId
- the local IDpublic void addPid(int localId, int clientPidMapRef)
Adds a PID parameter value. PIDs can exist on any property where multiple instances are allowed (such as EMAIL or ADR, but not N because only 1 instance of N is allowed).
When used in conjunction with the CLIENTPIDMAP property, it allows an individual property instance to be uniquely identifiable. This feature is made use of when two different versions of the same vCard have to be merged together (called "synchronizing").
vCard versions: 4.0
localId
- the local IDclientPidMapRef
- the ID used to reference the property's globally
unique identifier in the CLIENTPIDMAP property.public void removePids()
vCard versions: 4.0
public String getMediaType()
vCard versions: 4.0
public void setMediaType(String mediaType)
vCard versions: 4.0
mediaType
- the media type (e.g. "image/jpeg") or null to removepublic String getLevel()
vCard versions: 4.0
public void setLevel(String level)
vCard versions: 4.0
level
- the level (e.g. "beginner") or null to removepublic Integer getIndex()
vCard versions: 4.0
public void setIndex(Integer index)
vCard versions: 4.0
index
- the INDEX value (must be greater than 0) or null to remove
IllegalArgumentException
- if the value is not greater than 0
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |