public class

DataEntry

extends BaseEntry<E extends BaseEntry>
java.lang.Object
   ↳ com.google.gdata.data.AbstractExtension
     ↳ com.google.gdata.data.ExtensionPoint
       ↳ com.google.gdata.data.BaseEntry<E extends com.google.gdata.data.BaseEntry>
         ↳ com.google.gdata.data.analytics.DataEntry

Class Overview

Entry element for data feed.

Summary

[Expand]
Inherited Fields
From class com.google.gdata.data.BaseEntry
From class com.google.gdata.data.ExtensionPoint
From class com.google.gdata.data.AbstractExtension
Public Constructors
DataEntry()
Default mutable constructor.
DataEntry(BaseEntry<?> sourceEntry)
Constructs a new instance by doing a shallow copy of data from an existing BaseEntry instance.
Public Methods
void addDimension(Dimension dimension)
Adds a new dimension.
void addMetric(Metric metric)
Adds a new metric.
void declareExtensions(ExtensionProfile extProfile)
Declares the set of expected Extension types for an ExtensionPoint within the target extension profile.
Double doubleValueOf(String name)
Gets the double value of the metric with the given name in this entry.
Dimension getDimension(String name)
Gets the dimension with the given name in this entry.
List<Dimension> getDimensions()
Returns the dimensions.
Metric getMetric(String name)
Gets the metric with the given name in this entry.
List<Metric> getMetrics()
Returns the metrics.
boolean hasDimensions()
Returns whether it has the dimensions.
boolean hasMetrics()
Returns whether it has the metrics.
Long longValueOf(String name)
Gets the long value of the metric with the given name in this entry.
String stringValueOf(String name)
Retrieves the string value of the named dimension or metric in this entry.
String toString()
Protected Methods
void validate()
Checks the attributes to see if there are any problems.
[Expand]
Inherited Methods
From class com.google.gdata.data.BaseEntry
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.IAtom
From interface com.google.gdata.data.IEntry
From interface com.google.gdata.data.Kind.Adaptable
From interface com.google.gdata.data.Kind.Adaptor

Public Constructors

public DataEntry ()

Default mutable constructor.

public DataEntry (BaseEntry<?> sourceEntry)

Constructs a new instance by doing a shallow copy of data from an existing BaseEntry instance.

Parameters
sourceEntry Source entry

Public Methods

public void addDimension (Dimension dimension)

Adds a new dimension.

Parameters
dimension Dimension

public void addMetric (Metric metric)

Adds a new metric.

Parameters
metric Metric

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 Double doubleValueOf (String name)

Gets the double value of the metric with the given name in this entry.

Parameters
name
Returns
  • the double value of the named metric, or null if the named metric is not present in this entry

public Dimension getDimension (String name)

Gets the dimension with the given name in this entry.

Parameters
name The name of the dimension to retrieve.
Returns
  • The named dimension, or null if the dimension is not present in this entry

public List<Dimension> getDimensions ()

Returns the dimensions.

Returns
  • dimensions

public Metric getMetric (String name)

Gets the metric with the given name in this entry.

Parameters
name The name of the metric to retrieve.
Returns
  • The named metric, or null if the metric is not present in this entry

public List<Metric> getMetrics ()

Returns the metrics.

Returns
  • metrics

public boolean hasDimensions ()

Returns whether it has the dimensions.

Returns
  • whether it has the dimensions

public boolean hasMetrics ()

Returns whether it has the metrics.

Returns
  • whether it has the metrics

public Long longValueOf (String name)

Gets the long value of the metric with the given name in this entry.

Parameters
name
Returns
  • the long value of the named metric, or null if the named metric is not present in this entry

public String stringValueOf (String name)

Retrieves the string value of the named dimension or metric in this entry.

Parameters
name
Returns
  • The value of the named dimension or metric, or null if it is not present in this entry

public String toString ()

Protected Methods

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.