public class

AnalyticsLink

extends Link
java.lang.Object
   ↳ com.google.gdata.data.AbstractExtension
     ↳ com.google.gdata.data.ExtensionPoint
       ↳ com.google.gdata.data.Link
         ↳ com.google.gdata.data.analytics.AnalyticsLink

Class Overview

Extends the base Link class with Analytics extensions.

Summary

Nested Classes
class AnalyticsLink.Rel Link relation type. 
Constants
String TARGETKIND XML "gd:targetKind" attribute name
String XML_NAME XML element name
Fields
private String targetKind Kind of feed/entry the href is pointing to
[Expand]
Inherited Fields
From class com.google.gdata.data.Link
From class com.google.gdata.data.ExtensionPoint
From class com.google.gdata.data.AbstractExtension
Public Constructors
AnalyticsLink()
Default mutable constructor.
AnalyticsLink(String targetKind)
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.
XmlParser.ElementHandler getHandler(ExtensionProfile p, String namespace, String localName, Attributes attrs)
The default implementation uses the AbstractExtension.AttributesHandler to handle parsing the extension.
String getTargetKind()
Returns the kind of feed/entry the href is pointing to.
boolean hasTargetKind()
Returns whether it has the kind of feed/entry the href is pointing to.
int hashCode()
void setTargetKind(String targetKind)
Sets the kind of feed/entry the href is pointing to.
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.Link
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
From interface com.google.gdata.data.ILink
From interface com.google.gdata.data.Reference

Constants

private static final String TARGETKIND

XML "gd:targetKind" attribute name

Constant Value: "gd:targetKind"

static final String XML_NAME

XML element name

Constant Value: "link"

Fields

private String targetKind

Kind of feed/entry the href is pointing to

Public Constructors

public AnalyticsLink ()

Default mutable constructor.

public AnalyticsLink (String targetKind)

Immutable constructor.

Parameters
targetKind Kind of feed/entry the href is pointing to.

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 XmlParser.ElementHandler getHandler (ExtensionProfile p, String namespace, String localName, Attributes attrs)

The default implementation uses the AbstractExtension.AttributesHandler to handle parsing the extension.

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

public String getTargetKind ()

Returns the kind of feed/entry the href is pointing to.

Returns
  • kind of feed/entry the href is pointing to

public boolean hasTargetKind ()

Returns whether it has the kind of feed/entry the href is pointing to.

Returns
  • whether it has the kind of feed/entry the href is pointing to

public int hashCode ()

public void setTargetKind (String targetKind)

Sets the kind of feed/entry the href is pointing to.

Parameters
targetKind Kind of feed/entry the href is pointing to 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.