ezvcard.io.scribe
Class ImagePropertyScribe<T extends ImageProperty>
java.lang.Object
ezvcard.io.scribe.VCardPropertyScribe<T>
ezvcard.io.scribe.BinaryPropertyScribe<T,ImageType>
ezvcard.io.scribe.ImagePropertyScribe<T>
- Type Parameters:
T
- the property class
- Direct Known Subclasses:
- LogoScribe, PhotoScribe
public abstract class ImagePropertyScribe<T extends ImageProperty>
- extends BinaryPropertyScribe<T,ImageType>
Marshals properties that contain images.
- Author:
- Michael Angstadt
Methods inherited from class ezvcard.io.scribe.BinaryPropertyScribe |
_dataType, _defaultDataType, _newInstance, _newInstance, _parseJson, _parseText, _parseXml, _prepareParameters, _writeJson, _writeText, _writeXml, cannotUnmarshalValue, parseContentType |
Methods inherited from class ezvcard.io.scribe.VCardPropertyScribe |
dataType, date, date, defaultDataType, escape, getPropertyClass, getPropertyName, getQName, handlePrefParam, list, list, list, missingXmlElements, missingXmlElements, parseHtml, parseJson, parseText, parseXml, prepareParameters, semistructured, semistructured, split, structured, structured, structured, unescape, writeJson, writeText, writeXml |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ImagePropertyScribe
public ImagePropertyScribe(Class<T> clazz,
String propertyName)
_buildTypeObj
protected ImageType _buildTypeObj(String type)
- Description copied from class:
BinaryPropertyScribe
- Builds a
MediaTypeParameter
object based on the value of the TYPE
parameter in 2.1/3.0 vCards.
- Specified by:
_buildTypeObj
in class BinaryPropertyScribe<T extends ImageProperty,ImageType>
- Parameters:
type
- the TYPE value
- Returns:
- the parameter object
_buildMediaTypeObj
protected ImageType _buildMediaTypeObj(String mediaType)
- Description copied from class:
BinaryPropertyScribe
- Builds a
MediaTypeParameter
object based on the information in
the MEDIATYPE parameter or data URI of 4.0 vCards.
- Specified by:
_buildMediaTypeObj
in class BinaryPropertyScribe<T extends ImageProperty,ImageType>
- Parameters:
mediaType
- the media type string (e.g. "image/jpeg")
- Returns:
- the parameter object
_parseHtml
protected T _parseHtml(HCardElement element,
List<String> warnings)
- Description copied from class:
VCardPropertyScribe
Unmarshals the property from an hCard (HTML document).
This method should be overridden by child classes that wish to support
hCard. The default implementation of this method will retrieve the HTML
element's hCard value (as described in HCardElement.value()
), and
pass it into the VCardPropertyScribe._parseText(java.lang.String, ezvcard.VCardDataType, ezvcard.VCardVersion, ezvcard.parameter.VCardParameters, java.util.List)
method.
- Overrides:
_parseHtml
in class BinaryPropertyScribe<T extends ImageProperty,ImageType>
- Parameters:
element
- the property's HTML elementwarnings
- allows the programmer to alert the user to any
note-worthy (but non-critical) issues that occurred during the
unmarshalling process
Copyright © 2012-2014 Michael Angstadt. All Rights Reserved.