public class

Website

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

Class Overview

Contact related website.

Summary

Nested Classes
enum Website.Rel Known website 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<Website.Rel> REL_ENUM_TO_ATTRIBUTE_VALUE
private String href URI of the website
private String label User defined website label
private Boolean primary Denotes primary website
private Website.Rel rel Known website type
[Expand]
Inherited Fields
From class com.google.gdata.data.ExtensionPoint
From class com.google.gdata.data.AbstractExtension
Public Constructors
Website()
Default mutable constructor.
Website(String href, String label, Boolean primary, Website.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 website.
String getLabel()
Returns the user defined website label.
Boolean getPrimary()
Returns the denotes primary website.
Website.Rel getRel()
Returns the known website type.
boolean hasHref()
Returns whether it has the URI of the website.
boolean hasLabel()
Returns whether it has the user defined website label.
boolean hasPrimary()
Returns whether it has the denotes primary website.
boolean hasRel()
Returns whether it has the known website type.
int hashCode()
void setHref(String href)
Sets the URI of the website.
void setLabel(String label)
Sets the user defined website label.
void setPrimary(Boolean primary)
Sets the denotes primary website.
void setRel(Website.Rel rel)
Sets the known website 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: "website"

Fields

private static final EnumToAttributeValue<Website.Rel> REL_ENUM_TO_ATTRIBUTE_VALUE

private String href

URI of the website

private String label

User defined website label

private Boolean primary

Denotes primary website

private Website.Rel rel

Known website type

Public Constructors

public Website ()

Default mutable constructor.

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

Immutable constructor.

Parameters
href URI of the website.
label User defined website label.
primary Denotes primary website.
rel Known website 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 website.

Returns
  • URI of the website

public String getLabel ()

Returns the user defined website label.

Returns
  • user defined website label

public Boolean getPrimary ()

Returns the denotes primary website.

Returns
  • denotes primary website

public Website.Rel getRel ()

Returns the known website type.

Returns
  • known website type

public boolean hasHref ()

Returns whether it has the URI of the website.

Returns
  • whether it has the URI of the website

public boolean hasLabel ()

Returns whether it has the user defined website label.

Returns
  • whether it has the user defined website label

public boolean hasPrimary ()

Returns whether it has the denotes primary website.

Returns
  • whether it has the denotes primary website

public boolean hasRel ()

Returns whether it has the known website type.

Returns
  • whether it has the known website type

public int hashCode ()

public void setHref (String href)

Sets the URI of the website.

Parameters
href URI of the website or null to reset

public void setLabel (String label)

Sets the user defined website label.

Parameters
label User defined website label or null to reset

public void setPrimary (Boolean primary)

Sets the denotes primary website.

Parameters
primary Denotes primary website or null to reset

public void setRel (Website.Rel rel)

Sets the known website type.

Parameters
rel Known website 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.