public class

DataSource

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

Class Overview

Describes a data source.

Summary

Constants
String XML_NAME XML element name
[Expand]
Inherited Fields
From class com.google.gdata.data.ExtensionPoint
From class com.google.gdata.data.AbstractExtension
Public Constructors
DataSource()
Default mutable constructor.
Public Methods
void addProperty(Property property)
Adds a new property.
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.
List<Property> getProperties()
Returns the properties.
String getProperty(String name)
Returns the value of the named property of this entry.
TableId getTableId()
Returns the data source ID.
TableName getTableName()
Returns the table name.
boolean hasProperties()
Returns whether it has the properties.
boolean hasTableId()
Returns whether it has the data source ID.
boolean hasTableName()
Returns whether it has the table name.
void setTableId(TableId tableId)
Sets the data source ID.
void setTableName(TableName tableName)
Sets the table name.
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.ExtensionPoint
From class com.google.gdata.data.AbstractExtension
From class java.lang.Object
From interface com.google.gdata.data.Extension

Constants

static final String XML_NAME

XML element name

Constant Value: "dataSource"

Public Constructors

public DataSource ()

Default mutable constructor.

Public Methods

public void addProperty (Property property)

Adds a new property.

Parameters
property Property

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 List<Property> getProperties ()

Returns the properties.

Returns
  • properties

public String getProperty (String name)

Returns the value of the named property of this entry. More specifically, it returns the content of the value attribute of the dxp:property whose name attribute matches the argument. Returns null if no such property exists.

Parameters
name The property to retrieve from this entry
Returns
  • string value of the named property or null if it doesn't exist

public TableId getTableId ()

Returns the data source ID.

Returns
  • data source ID

public TableName getTableName ()

Returns the table name.

Returns
  • table name

public boolean hasProperties ()

Returns whether it has the properties.

Returns
  • whether it has the properties

public boolean hasTableId ()

Returns whether it has the data source ID.

Returns
  • whether it has the data source ID

public boolean hasTableName ()

Returns whether it has the table name.

Returns
  • whether it has the table name

public void setTableId (TableId tableId)

Sets the data source ID.

Parameters
tableId Data source ID or null to reset

public void setTableName (TableName tableName)

Sets the table name.

Parameters
tableName Table name or null to reset

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.