public class

Event

extends ExtensionPoint
java.lang.Object
   ↳ com.google.gdata.data.AbstractExtension
     ↳ com.google.gdata.data.ExtensionPoint
       ↳ com.google.gdata.data.contacts.Event

Class Overview

Contact's events.

Summary

Nested Classes
class Event.Rel Event type. 
Constants
String LABEL XML "label" attribute name
String REL XML "rel" attribute name
String XML_NAME XML element name
Fields
private String label Label
private String rel Event type
[Expand]
Inherited Fields
From class com.google.gdata.data.ExtensionPoint
From class com.google.gdata.data.AbstractExtension
Public Constructors
Event()
Default mutable constructor.
Event(String label, String rel)
Immutable constructor.
Public Methods
void declareExtensions(ExtensionProfile extProfile)
Declares the set of expected Extension types for an ExtensionPoint within the target extension profile.
static ExtensionDescription getDefaultDescription(boolean required, boolean repeatable)
Returns the extension description, specifying whether it is required, and whether it is repeatable.
String getLabel()
Returns the label.
String getRel()
Returns the event type.
When getWhen()
Returns the time period description.
boolean hasLabel()
Returns whether it has the label.
boolean hasRel()
Returns whether it has the event type.
boolean hasWhen()
Returns whether it has the time period description.
void setLabel(String label)
Sets the label.
void setRel(String rel)
Sets the event type.
void setWhen(When when)
Sets the time period description.
String toString()
Protected Methods
void consumeAttributes(AttributeHelper helper)
Consumes attributes from the attribute helper.
void putAttributes(AttributeGenerator generator)
Puts attributes into the attribute generator.
void validate()
Checks the attributes to see if there are any problems.
[Expand]
Inherited Methods
From class com.google.gdata.data.ExtensionPoint
From class com.google.gdata.data.AbstractExtension
From class java.lang.Object
From interface com.google.gdata.data.Extension

Constants

private static final String LABEL

XML "label" attribute name

Constant Value: "label"

private static final String REL

XML "rel" attribute name

Constant Value: "rel"

static final String XML_NAME

XML element name

Constant Value: "event"

Fields

private String label

Label

private String rel

Event type

Public Constructors

public Event ()

Default mutable constructor.

public Event (String label, String rel)

Immutable constructor.

Parameters
label Label.
rel Event type.

Public Methods

public void declareExtensions (ExtensionProfile extProfile)

Declares the set of expected Extension types for an ExtensionPoint within the target extension profile. The base implementation does not declare any extensions, but can be overridden by specific types of ExtensionPoints that always contain a well-defined set of extensions.

Parameters
extProfile The ExtensionProfile to initialize.

public static ExtensionDescription getDefaultDescription (boolean required, boolean repeatable)

Returns the extension description, specifying whether it is required, and whether it is repeatable.

Parameters
required Whether it is required
repeatable Whether it is repeatable
Returns
  • extension description

public String getLabel ()

Returns the label.

Returns
  • label

public String getRel ()

Returns the event type.

Returns
  • event type

public When getWhen ()

Returns the time period description.

Returns
  • time period description

public boolean hasLabel ()

Returns whether it has the label.

Returns
  • whether it has the label

public boolean hasRel ()

Returns whether it has the event type.

Returns
  • whether it has the event type

public boolean hasWhen ()

Returns whether it has the time period description.

Returns
  • whether it has the time period description

public void setLabel (String label)

Sets the label.

Parameters
label Label or null to reset

public void setRel (String rel)

Sets the event type.

Parameters
rel Event type or null to reset

public void setWhen (When when)

Sets the time period description.

Parameters
when Time period description or null to reset

public String toString ()

Protected Methods

protected void consumeAttributes (AttributeHelper helper)

Consumes attributes from the attribute helper. May also use consumeContent(boolean) to consume the element's text content. Called from getHandler(ExtensionProfile, String, String, Attributes). Default implementation does nothing, though generally this is discouraged unless there really are no attributes.

Parameters
helper Attribute helper

protected void putAttributes (AttributeGenerator generator)

Puts attributes into the attribute generator. Called from generate(XmlWriter, ExtensionProfile). Default implementation does nothing, though generally this is discouraged unless there really are no attributes.

Parameters
generator Attribute generator

protected void validate ()

Checks the attributes to see if there are any problems. Default implementation does nothing, though generally this is discouraged unless there really are no restrictions.