public class SoundScribe extends BinaryPropertyScribe<Sound,SoundType>
Sound
properties.VCardPropertyScribe.DateWriter
clazz, propertyName, qname
Constructor and Description |
---|
SoundScribe() |
Modifier and Type | Method and Description |
---|---|
protected SoundType |
_mediaTypeFromFileExtension(String extension)
Searches for a
MediaTypeParameter object, given a file extension. |
protected SoundType |
_mediaTypeFromMediaTypeParameter(String mediaType)
Builds a
MediaTypeParameter object based on the value of the
MEDIATYPE parameter or data URI of 4.0 vCards. |
protected SoundType |
_mediaTypeFromTypeParameter(String type)
Builds a
MediaTypeParameter object based on the value of the TYPE
parameter in 2.1/3.0 vCards. |
protected Sound |
_newInstance(byte[] data,
SoundType contentType)
Creates a new instance of the property object from binary data.
|
protected Sound |
_newInstance(String uri,
SoundType contentType)
Creates a new instance of the property object from a URI.
|
protected Sound |
_parseHtml(HCardElement element,
ParseContext context)
Unmarshals the property from an hCard (HTML document).
|
_dataType, _defaultDataType, _parseJson, _parseText, _parseXml, _prepareParameters, _writeJson, _writeText, _writeXml, cannotUnmarshalValue, getFileExtension, parse, parseContentTypeFromParameters, parseContentTypeFromValueAndParameters
dataType, date, date, defaultDataType, escape, getPropertyClass, getPropertyName, getQName, handlePrefParam, missingXmlElements, missingXmlElements, parseHtml, parseJson, parseText, parseXml, prepareParameters, writeJson, writeText, writeXml
public SoundScribe()
protected SoundType _mediaTypeFromTypeParameter(String type)
BinaryPropertyScribe
MediaTypeParameter
object based on the value of the TYPE
parameter in 2.1/3.0 vCards._mediaTypeFromTypeParameter
in class BinaryPropertyScribe<Sound,SoundType>
type
- the TYPE value (e.g. "JPEG")protected SoundType _mediaTypeFromMediaTypeParameter(String mediaType)
BinaryPropertyScribe
MediaTypeParameter
object based on the value of the
MEDIATYPE parameter or data URI of 4.0 vCards._mediaTypeFromMediaTypeParameter
in class BinaryPropertyScribe<Sound,SoundType>
mediaType
- the media type string (e.g. "image/jpeg")protected SoundType _mediaTypeFromFileExtension(String extension)
BinaryPropertyScribe
MediaTypeParameter
object, given a file extension._mediaTypeFromFileExtension
in class BinaryPropertyScribe<Sound,SoundType>
extension
- the file extension (e.g. "jpg")protected Sound _newInstance(String uri, SoundType contentType)
BinaryPropertyScribe
_newInstance
in class BinaryPropertyScribe<Sound,SoundType>
uri
- the URIcontentType
- the content type or null if unknownprotected Sound _newInstance(byte[] data, SoundType contentType)
BinaryPropertyScribe
_newInstance
in class BinaryPropertyScribe<Sound,SoundType>
data
- the datacontentType
- the content type or null if unknownprotected Sound _parseHtml(HCardElement element, ParseContext context)
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.parameter.VCardParameters, ezvcard.io.ParseContext)
method.
_parseHtml
in class BinaryPropertyScribe<Sound,SoundType>
element
- the property's HTML elementcontext
- the parse contextCopyright © 2012–2023 Michael Angstadt. All rights reserved.