public class RawPropertyScribe extends ICalPropertyScribe<RawProperty>
ICalPropertyScribe.DateParser, ICalPropertyScribe.DateWriter, ICalPropertyScribe.ListCallback<T>, ICalPropertyScribe.Result<T>, ICalPropertyScribe.SemiStructuredIterator, ICalPropertyScribe.Splitter, ICalPropertyScribe.StructuredIterator
clazz, propertyName, qname
Constructor and Description |
---|
RawPropertyScribe(String propertyName) |
Modifier and Type | Method and Description |
---|---|
protected ICalDataType |
_dataType(RawProperty property,
ICalVersion version)
Determines the data type of a property instance.
|
protected RawProperty |
_parseText(String value,
ICalDataType dataType,
ICalParameters parameters,
ParseContext context)
Unmarshals a property from a plain-text iCalendar data stream.
|
protected RawProperty |
_parseXml(XCalElement element,
ICalParameters parameters,
ParseContext context)
Unmarshals a property from an XML document (xCal).
|
protected String |
_writeText(RawProperty property,
WriteContext context)
Marshals a property's value to a string.
|
_defaultDataType, _parseJson, _prepareParameters, _writeJson, _writeXml, dataType, date, date, date, date, date, defaultDataType, escape, getPropertyClass, getPropertyName, getQName, getSupportedVersions, handleTzidParameter, isInObservance, list, list, list, list, missingXmlElements, missingXmlElements, object, object, parseJson, parseText, parseXml, prepareParameters, semistructured, semistructured, splitter, structured, structured, structured, unescape, writeJson, writeText, writeXml
public RawPropertyScribe(String propertyName)
protected ICalDataType _dataType(RawProperty property, ICalVersion version)
ICalPropertyScribe
Determines the data type of a property instance.
This method should be overridden by child classes if a property's data type changes depending on its value. The default implementation of this method returns the property's default data type.
_dataType
in class ICalPropertyScribe<RawProperty>
property
- the propertyversion
- the version of the iCalendar object being generatedprotected String _writeText(RawProperty property, WriteContext context)
ICalPropertyScribe
_writeText
in class ICalPropertyScribe<RawProperty>
property
- the propertycontext
- the write contextprotected RawProperty _parseText(String value, ICalDataType dataType, ICalParameters parameters, ParseContext context)
ICalPropertyScribe
_parseText
in class ICalPropertyScribe<RawProperty>
value
- the value as read off the wiredataType
- the data type of the property value. The property's VALUE
parameter is used to determine the data type. If the property has no
VALUE parameter, then this parameter will be set to the property's
default datatype. Note that the VALUE parameter is removed from the
property's parameter list after it has been read.parameters
- the parsed parameters. These parameters will be
assigned to the property object once this method returns. Therefore, do
not assign any parameters to the property object itself whilst inside of
this method, or else they will be overwritten.context
- the parse contextprotected RawProperty _parseXml(XCalElement element, ICalParameters parameters, ParseContext context)
ICalPropertyScribe
Unmarshals a property from an XML document (xCal).
This method should be overridden by child classes that wish to support
xCal. The default implementation of this method will find the first child
element with the xCal namespace. The element's name will be used as the
property's data type and its text content will be passed into the
ICalPropertyScribe._parseText(java.lang.String, biweekly.ICalDataType, biweekly.parameter.ICalParameters, biweekly.io.ParseContext)
method. If no such child element is found, then the
parent element's text content will be passed into ICalPropertyScribe._parseText(java.lang.String, biweekly.ICalDataType, biweekly.parameter.ICalParameters, biweekly.io.ParseContext)
and
the data type will be null.
_parseXml
in class ICalPropertyScribe<RawProperty>
element
- the property's XML elementparameters
- the parsed parameters. These parameters will be
assigned to the property object once this method returns. Therefore, do
not assign any parameters to the property object itself whilst inside of
this method, or else they will be overwritten.context
- the contextCopyright © 2013-2015 Michael Angstadt. All Rights Reserved.