public class

Data

extends ExtensionPoint
java.lang.Object
   ↳ com.google.gdata.data.AbstractExtension
     ↳ com.google.gdata.data.ExtensionPoint
       ↳ com.google.gdata.data.spreadsheet.Data

Class Overview

Describes a data region of a table.

Summary

Nested Classes
enum Data.InsertionMode Insertion mode. 
Constants
String INSERTIONMODE XML "insertionMode" attribute name
String NUMROWS XML "numRows" attribute name
String STARTROW XML "startRow" attribute name
String XML_NAME XML element name
Fields
private static final EnumToAttributeValue<Data.InsertionMode> INSERTIONMODE_ENUM_TO_ATTRIBUTE_VALUE
private Data.InsertionMode insertionMode Insertion mode
private Integer numberOfRows Number of rows in the data section
private Integer startIndex Index of the first row of the data section (inclusive)
[Expand]
Inherited Fields
From class com.google.gdata.data.ExtensionPoint
From class com.google.gdata.data.AbstractExtension
Public Constructors
Data()
Default mutable constructor.
Data(Data.InsertionMode insertionMode, Integer numberOfRows, Integer startIndex)
Immutable constructor.
Public Methods
void addColumn(Column column)
Adds a new column.
void declareExtensions(ExtensionProfile extProfile)
Declares the set of expected Extension types for an ExtensionPoint within the target extension profile.
List<Column> getColumns()
Returns the columns.
static ExtensionDescription getDefaultDescription(boolean required, boolean repeatable)
Returns the extension description, specifying whether it is required, and whether it is repeatable.
Data.InsertionMode getInsertionMode()
Returns the insertion mode.
Integer getNumberOfRows()
Returns the number of rows in the data section.
Integer getStartIndex()
Returns the index of the first row of the data section (inclusive).
boolean hasColumns()
Returns whether it has the columns.
boolean hasInsertionMode()
Returns whether it has the insertion mode.
boolean hasNumberOfRows()
Returns whether it has the number of rows in the data section.
boolean hasStartIndex()
Returns whether it has the index of the first row of the data section (inclusive).
void setInsertionMode(Data.InsertionMode insertionMode)
Sets the insertion mode.
void setNumberOfRows(Integer numberOfRows)
Sets the number of rows in the data section.
void setStartIndex(Integer startIndex)
Sets the index of the first row of the data section (inclusive).
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 INSERTIONMODE

XML "insertionMode" attribute name

Constant Value: "insertionMode"

private static final String NUMROWS

XML "numRows" attribute name

Constant Value: "numRows"

private static final String STARTROW

XML "startRow" attribute name

Constant Value: "startRow"

static final String XML_NAME

XML element name

Constant Value: "data"

Fields

private static final EnumToAttributeValue<Data.InsertionMode> INSERTIONMODE_ENUM_TO_ATTRIBUTE_VALUE

private Data.InsertionMode insertionMode

Insertion mode

private Integer numberOfRows

Number of rows in the data section

private Integer startIndex

Index of the first row of the data section (inclusive)

Public Constructors

public Data ()

Default mutable constructor.

public Data (Data.InsertionMode insertionMode, Integer numberOfRows, Integer startIndex)

Immutable constructor.

Parameters
insertionMode Insertion mode.
numberOfRows Number of rows in the data section.
startIndex Index of the first row of the data section (inclusive).

Public Methods

public void addColumn (Column column)

Adds a new column.

Parameters
column Column

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 List<Column> getColumns ()

Returns the columns.

Returns
  • columns

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 Data.InsertionMode getInsertionMode ()

Returns the insertion mode.

Returns
  • insertion mode

public Integer getNumberOfRows ()

Returns the number of rows in the data section.

Returns
  • number of rows in the data section

public Integer getStartIndex ()

Returns the index of the first row of the data section (inclusive).

Returns
  • index of the first row of the data section (inclusive)

public boolean hasColumns ()

Returns whether it has the columns.

Returns
  • whether it has the columns

public boolean hasInsertionMode ()

Returns whether it has the insertion mode.

Returns
  • whether it has the insertion mode

public boolean hasNumberOfRows ()

Returns whether it has the number of rows in the data section.

Returns
  • whether it has the number of rows in the data section

public boolean hasStartIndex ()

Returns whether it has the index of the first row of the data section (inclusive).

Returns
  • whether it has the index of the first row of the data section (inclusive)

public void setInsertionMode (Data.InsertionMode insertionMode)

Sets the insertion mode.

Parameters
insertionMode Insertion mode or null to reset

public void setNumberOfRows (Integer numberOfRows)

Sets the number of rows in the data section.

Parameters
numberOfRows Number of rows in the data section or null to reset

public void setStartIndex (Integer startIndex)

Sets the index of the first row of the data section (inclusive).

Parameters
startIndex Index of the first row of the data section (inclusive) 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.