public class

CalendarLink

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

Class Overview

Contact related calendar link.

Summary

Nested Classes
enum CalendarLink.Rel Known calendar link type. 
Constants
String HREF XML "href" attribute name
String LABEL XML "label" attribute name
String PRIMARY XML "primary" attribute name
String REL XML "rel" attribute name
String XML_NAME XML element name
Fields
private static final EnumToAttributeValue<CalendarLink.Rel> REL_ENUM_TO_ATTRIBUTE_VALUE
private String href URI of the calendar
private String label User defined calendar link label
private Boolean primary Denotes primary calendar link
private CalendarLink.Rel rel Known calendar link type
[Expand]
Inherited Fields
From class com.google.gdata.data.ExtensionPoint
From class com.google.gdata.data.AbstractExtension
Public Constructors
CalendarLink()
Default mutable constructor.
CalendarLink(String href, String label, Boolean primary, CalendarLink.Rel rel)
Immutable constructor.
Public Methods
boolean equals(Object obj)
static ExtensionDescription getDefaultDescription(boolean required, boolean repeatable)
Returns the extension description, specifying whether it is required, and whether it is repeatable.
String getHref()
Returns the URI of the calendar.
String getLabel()
Returns the user defined calendar link label.
Boolean getPrimary()
Returns the denotes primary calendar link.
CalendarLink.Rel getRel()
Returns the known calendar link type.
boolean hasHref()
Returns whether it has the URI of the calendar.
boolean hasLabel()
Returns whether it has the user defined calendar link label.
boolean hasPrimary()
Returns whether it has the denotes primary calendar link.
boolean hasRel()
Returns whether it has the known calendar link type.
int hashCode()
void setHref(String href)
Sets the URI of the calendar.
void setLabel(String label)
Sets the user defined calendar link label.
void setPrimary(Boolean primary)
Sets the denotes primary calendar link.
void setRel(CalendarLink.Rel rel)
Sets the known calendar link type.
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 HREF

XML "href" attribute name

Constant Value: "href"

private static final String LABEL

XML "label" attribute name

Constant Value: "label"

private static final String PRIMARY

XML "primary" attribute name

Constant Value: "primary"

private static final String REL

XML "rel" attribute name

Constant Value: "rel"

static final String XML_NAME

XML element name

Constant Value: "calendarLink"

Fields

private static final EnumToAttributeValue<CalendarLink.Rel> REL_ENUM_TO_ATTRIBUTE_VALUE

private String href

URI of the calendar

private String label

User defined calendar link label

private Boolean primary

Denotes primary calendar link

private CalendarLink.Rel rel

Known calendar link type

Public Constructors

public CalendarLink ()

Default mutable constructor.

public CalendarLink (String href, String label, Boolean primary, CalendarLink.Rel rel)

Immutable constructor.

Parameters
href URI of the calendar.
label User defined calendar link label.
primary Denotes primary calendar link.
rel Known calendar link type.

Public Methods

public boolean equals (Object obj)

Parameters
obj

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 getHref ()

Returns the URI of the calendar.

Returns
  • URI of the calendar

public String getLabel ()

Returns the user defined calendar link label.

Returns
  • user defined calendar link label

public Boolean getPrimary ()

Returns the denotes primary calendar link.

Returns
  • denotes primary calendar link

public CalendarLink.Rel getRel ()

Returns the known calendar link type.

Returns
  • known calendar link type

public boolean hasHref ()

Returns whether it has the URI of the calendar.

Returns
  • whether it has the URI of the calendar

public boolean hasLabel ()

Returns whether it has the user defined calendar link label.

Returns
  • whether it has the user defined calendar link label

public boolean hasPrimary ()

Returns whether it has the denotes primary calendar link.

Returns
  • whether it has the denotes primary calendar link

public boolean hasRel ()

Returns whether it has the known calendar link type.

Returns
  • whether it has the known calendar link type

public int hashCode ()

public void setHref (String href)

Sets the URI of the calendar.

Parameters
href URI of the calendar or null to reset

public void setLabel (String label)

Sets the user defined calendar link label.

Parameters
label User defined calendar link label or null to reset

public void setPrimary (Boolean primary)

Sets the denotes primary calendar link.

Parameters
primary Denotes primary calendar link or null to reset

public void setRel (CalendarLink.Rel rel)

Sets the known calendar link type.

Parameters
rel Known calendar link type 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.