# Google Data APIs Client Library (1.43.0)

## com.google.gdata.data.analytics
Class DataSource

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

All Implemented Interfaces:
  Extension

    public class DataSource

extends ExtensionPoint

Describes a data source.

Nested Class Summary

Nested classes/interfaces inherited from class com.google.gdata.data.ExtensionPoint
`ExtensionPoint.CumulativeBlobHandler, ExtensionPoint.ExtensionHandler`

Nested classes/interfaces inherited from class com.google.gdata.data.AbstractExtension
`AbstractExtension.AttributesHandler`

Field Summary

Fields inherited from class com.google.gdata.data.ExtensionPoint
`xmlBlob`

Fields inherited from class com.google.gdata.data.AbstractExtension
`localName, namespace`

Constructor Summary
`DataSource()` Default mutable constructor.

Method Summary
`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.
`java.util.List<Property>` `getProperties()` Returns the properties.
`java.lang.String` `getProperty(java.lang.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.
`java.lang.String` `toString()`
`protected void` `validate()` Checks the attributes to see if there are any problems.

Methods inherited from class com.google.gdata.data.ExtensionPoint

`addExtension, addExtension, addRepeatingExtension, addRepeatingExtension, checkRequiredExtensions, createExtensionInstance, generate, generateCumulativeXmlBlob, generateExtensions, generateStartElement, getExtension, getExtensionDescription, getExtensionHandler, getExtensions, getHandler, getManifest, getRepeatingExtension, getRepeatingExtensions, getXmlBlob, hasExtension, hasRepeatingExtension, initializeArbitraryXml, parseCumulativeXmlBlob, removeExtension, removeExtension, removeRepeatingExtension, setExtension, setXmlBlob, visit, visitChild, visitChildren`

Methods inherited from class com.google.gdata.data.AbstractExtension
`consumeAttributes, disableStrictValidation, enableStrictValidation, eq, generate, generateAttributes, getExtensionLocalName, getExtensionNamespace, isImmutable, isStrictValidation, putAttributes, sameClassAs, setImmutable, throwExceptionForMissingAttribute, throwExceptionIfImmutable`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### DataSource

    public DataSource()

  Default mutable constructor.

Method Detail

### declareExtensions

    public void declareExtensions(ExtensionProfile extProfile)

  Description copied from class: `ExtensionPoint`
  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.

  Overrides:
    `declareExtensions` in class `ExtensionPoint`
  Parameters:
    `extProfile` - the ExtensionProfile to initialize.

### getProperties

    public java.util.List<Property> getProperties()

  Returns the properties.

  Returns:
    properties

### addProperty

    public void addProperty(Property property)

  Adds a new property.

  Parameters:
    `property` - property

### hasProperties

    public boolean hasProperties()

  Returns whether it has the properties.

  Returns:
    whether it has the properties

### getTableId

    public TableId getTableId()

  Returns the data source ID.

  Returns:
    data source ID

### setTableId

    public void setTableId(TableId tableId)

  Sets the data source ID.

  Parameters:
    `tableId` - data source ID or `null` to reset

### hasTableId

    public boolean hasTableId()

  Returns whether it has the data source ID.

  Returns:
    whether it has the data source ID

### getTableName

    public TableName getTableName()

  Returns the table name.

  Returns:
    table name

### setTableName

    public void setTableName(TableName tableName)

  Sets the table name.

  Parameters:
    `tableName` - table name or `null` to reset

### hasTableName

    public boolean hasTableName()

  Returns whether it has the table name.

  Returns:
    whether it has the table name

### validate

    protected void validate()

  Description copied from class: `AbstractExtension`
  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.

  Overrides:
    `validate` in class `AbstractExtension`

### getDefaultDescription

    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

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`

### getProperty

    public java.lang.String getProperty(java.lang.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