ezvcard.io.scribe
Class SoundScribe

java.lang.Object
  extended by ezvcard.io.scribe.VCardPropertyScribe<T>
      extended by ezvcard.io.scribe.BinaryPropertyScribe<Sound,SoundType>
          extended by ezvcard.io.scribe.SoundScribe

public class SoundScribe
extends BinaryPropertyScribe<Sound,SoundType>

Marshals Sound properties.

Author:
Michael Angstadt

Nested Class Summary
 
Nested classes/interfaces inherited from class ezvcard.io.scribe.VCardPropertyScribe
VCardPropertyScribe.DateWriter, VCardPropertyScribe.Result<T extends VCardProperty>, VCardPropertyScribe.SemiStructuredIterator, VCardPropertyScribe.Splitter, VCardPropertyScribe.StructuredIterator
 
Field Summary
 
Fields inherited from class ezvcard.io.scribe.VCardPropertyScribe
clazz, propertyName, qname
 
Constructor Summary
SoundScribe()
           
 
Method Summary
protected  SoundType _buildMediaTypeObj(String mediaType)
          Builds a MediaTypeParameter object based on the information in the MEDIATYPE parameter or data URI of 4.0 vCards.
protected  SoundType _buildTypeObj(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)
           
protected  Sound _newInstance(String uri, SoundType contentType)
           
protected  Sound _parseHtml(HCardElement element, List<String> warnings)
           Unmarshals the property from an hCard (HTML document).
 
Methods inherited from class ezvcard.io.scribe.BinaryPropertyScribe
_dataType, _defaultDataType, _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
 

Constructor Detail

SoundScribe

public SoundScribe()
Method Detail

_buildTypeObj

protected SoundType _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<Sound,SoundType>
Parameters:
type - the TYPE value
Returns:
the parameter object

_buildMediaTypeObj

protected SoundType _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<Sound,SoundType>
Parameters:
mediaType - the media type string (e.g. "image/jpeg")
Returns:
the parameter object

_newInstance

protected Sound _newInstance(String uri,
                             SoundType contentType)
Specified by:
_newInstance in class BinaryPropertyScribe<Sound,SoundType>

_newInstance

protected Sound _newInstance(byte[] data,
                             SoundType contentType)
Specified by:
_newInstance in class BinaryPropertyScribe<Sound,SoundType>

_parseHtml

protected Sound _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<Sound,SoundType>
Parameters:
element - the property's HTML element
warnings - 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.