|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectezvcard.types.VCardType
ezvcard.types.DateOrTimeType
public class DateOrTimeType
Represents a type that contains a date and/or time (for example, the BDAY type).
| Field Summary |
|---|
| Fields inherited from class ezvcard.types.VCardType |
|---|
group, subTypes, typeName |
| Constructor Summary | |
|---|---|
DateOrTimeType(String typeName)
|
|
DateOrTimeType(String typeName,
Date date)
|
|
| Method Summary | |
|---|---|
protected void |
doMarshalSubTypes(VCardSubTypes copy,
VCardVersion version,
List<String> warnings,
CompatibilityMode compatibilityMode,
VCard vcard)
Gets the sub types that will be sent over the wire. |
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 |
doUnmarshalHtml(HCardElement element,
List<String> warnings)
Unmarshals the type from an hCard (HTML 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). |
String |
getAltId()
Gets the ALTID. |
CalscaleParameter |
getCalscale()
Gets the type of calendar this date uses. |
Date |
getDate()
Gets the date value. |
String |
getReducedAccuracyDate()
Gets the reduced accuracy date string. |
String |
getText()
Gets the text value of this type. |
void |
setAltId(String altId)
Sets the ALTID. |
void |
setCalsclae(CalscaleParameter calscale)
Sets the type of calendar this date uses. |
void |
setDate(Date date,
boolean dateHasTime)
Sets the value of this type to a complete date. |
void |
setReducedAccuracyDate(String reducedAccuracyDate)
Sets the value of this type to a "reduced accuracy" date. |
void |
setText(String text)
Sets the value of this type to a text string. |
| Methods inherited from class ezvcard.types.VCardType |
|---|
compareTo, 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 |
| Constructor Detail |
|---|
public DateOrTimeType(String typeName)
typeName - the name of the type (e.g. "BDAY")
public DateOrTimeType(String typeName,
Date date)
typeName - the name of the type (e.g. "BDAY")date - the date value| Method Detail |
|---|
public Date getDate()
public void setDate(Date date,
boolean dateHasTime)
date - the datedateHasTime - true if the date contains a time component, false if
it's just a datepublic String getReducedAccuracyDate()
public void setReducedAccuracyDate(String reducedAccuracyDate)
reducedAccuracyDate - the reduced accuracy date (e.g "--0210" for
"February 10")public String getText()
public void setText(String text)
text - the text valuepublic CalscaleParameter getCalscale()
vCard versions: 4.0
public void setCalsclae(CalscaleParameter calscale)
vCard versions: 4.0
calscale - the type of calendar or null to removepublic 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)
protected void doMarshalSubTypes(VCardSubTypes copy,
VCardVersion version,
List<String> warnings,
CompatibilityMode compatibilityMode,
VCard vcard)
VCardType
If this method is NOT overridden, then the type's sub types will be sent
over the wire as-is. In other words, whatever is in the
VCardType.subTypes field will be sent. Child classes can override
this method in order to modify the sub types before they are marshalled.
doMarshalSubTypes in class VCardTypecopy - the sub types that will be marshalled into the vCard.
This object is a copy of the VCardType.subTypes field, so any
modifications done to this object will not effect the state of the field.version - 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 vCardvcard - the VCard object that is being marshalled
protected void doMarshalText(StringBuilder sb,
VCardVersion version,
List<String> warnings,
CompatibilityMode compatibilityMode)
VCardType
doMarshalText in class VCardTypesb - 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 vCard
protected void doUnmarshalText(String value,
VCardVersion version,
List<String> warnings,
CompatibilityMode compatibilityMode)
VCardType
doUnmarshalText in class VCardTypevalue - 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 from
protected void doMarshalXml(XCardElement parent,
List<String> warnings,
CompatibilityMode compatibilityMode)
VCardType
doMarshalXml in class VCardTypeparent - 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 vCard
protected void doUnmarshalXml(XCardElement element,
List<String> warnings,
CompatibilityMode compatibilityMode)
VCardType
doUnmarshalXml in class VCardTypeelement - 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
protected void doUnmarshalHtml(HCardElement element,
List<String> warnings)
VCardType
doUnmarshalHtml in class VCardTypeelement - the HTML element that contains the type data.warnings - allows the programmer to alert the user to any
note-worthy (but non-critical) issues that occurred during the
unmarshalling process
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||