public class

WebContent

extends Object
implements Extension
java.lang.Object
   ↳ com.google.gdata.data.calendar.WebContent

Class Overview

A "web content" extension -- here are some examples:

<atom:link rel="http://schemas.google.com/gCal/2005/webContent" title="World Cup" href="http://www.google.com/calendar/images/google-holiday.gif" type="image/gif"> <gCal:webContent width="276" height="120" url="http://www.google.com/logos/worldcup06.gif" /> </atom:link> <atom:link rel="http://schemas.google.com/gCal/2005/webContent" title="DateTime Gadget (a classic!)" href="http://www.google.com/favicon.ico" type="application/x-google-gadgets+xml"> <gCal:webContent width="300" height="136" url="http://google.com/ig/modules/datetime.xml"> <gCal:webContentGadgetPref name="color" value="green" /> </gCal:webContent> </atom:link>

Summary

Constants
String GADGET_TYPE the name of a gadget pref element
String REL value of the rel attribute for a link containing web content
String TYPE the name of the child element of the web content link
Fields
private static final ExtensionDescription EXTENSION_DESCRIPTION
private Map<String, String> gadgetPrefs
private String height
private String url
private Link webContentLink
private String width
Public Constructors
WebContent()
Public Methods
void generate(XmlWriter writer, ExtensionProfile profile)
Generates an XML representation for the extension.
static ExtensionDescription getDefaultDescription()
Map<String, String> getGadgetPrefs()
XmlParser.ElementHandler getHandler(ExtensionProfile profile, String namespace, String localName, Attributes attrs)
Gets an XML element handler for the extension.
String getHeight()
String getIcon()
String getTitle()
String getType()
String getUrl()
String getWidth()
void setGadgetPrefs(Map<String, String> gadgetPrefs)
void setHeight(String height)
void setIcon(String icon)
void setTitle(String title)
void setType(String type)
void setUrl(String url)
void setWidth(String width)
String toString()
static void updateWebContent(CalendarEventEntry entry)
Done as a post-process on a CalendarEventEntry to see if it contains the appropriate XML to signify that the entry contains web content.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.google.gdata.data.Extension

Constants

private static final String GADGET_TYPE

the name of a gadget pref element

Constant Value: "webContentGadgetPref"

public static final String REL

value of the rel attribute for a link containing web content

Constant Value: "http://schemas.google.com/gCal/2005/webContent"

private static final String TYPE

the name of the child element of the web content link

Constant Value: "webContent"

Fields

private static final ExtensionDescription EXTENSION_DESCRIPTION

private Map<String, String> gadgetPrefs

private String height

private String url

private Link webContentLink

private String width

Public Constructors

public WebContent ()

Public Methods

public void generate (XmlWriter writer, ExtensionProfile profile)

Generates an XML representation for the extension.

Parameters
writer XML writer
profile Extension profile
Throws
IOException

public static ExtensionDescription getDefaultDescription ()

public Map<String, String> getGadgetPrefs ()

public XmlParser.ElementHandler getHandler (ExtensionProfile profile, String namespace, String localName, Attributes attrs)

Gets an XML element handler for the extension.

Parameters
profile Extension profile
namespace Extension namespace
localName Tag name, without the namespace prefix
attrs Tag attributes
Returns
  • an element handler
Throws
IOException
ParseException

public String getHeight ()

public String getIcon ()

public String getTitle ()

public String getType ()

public String getUrl ()

public String getWidth ()

public void setGadgetPrefs (Map<String, String> gadgetPrefs)

Parameters
gadgetPrefs

public void setHeight (String height)

Parameters
height

public void setIcon (String icon)

Parameters
icon

public void setTitle (String title)

Parameters
title

public void setType (String type)

Parameters
type

public void setUrl (String url)

Parameters
url

public void setWidth (String width)

Parameters
width

public String toString ()

public static void updateWebContent (CalendarEventEntry entry)

Done as a post-process on a CalendarEventEntry to see if it contains the appropriate XML to signify that the entry contains web content. If so, the WebContent property of the entry is set.

Parameters
entry