com.google.visualization.datasource.datatable
Class ColumnDescription

java.lang.Object
  extended by com.google.visualization.datasource.datatable.ColumnDescription

public class ColumnDescription
extends java.lang.Object

Holds all the information we keep for a single column in a DataTable. This does not include all the values, which are kept in TableCells. The information that is included is:

Author:
Yoah B.D.

Constructor Summary
ColumnDescription(java.lang.String id, ValueType type, java.lang.String label)
          Creates a new column description.
 
Method Summary
 ColumnDescription clone()
          Returns a clone of the ColumnDescription, meaning a column descriptor with the exact same properties.
 java.util.Map<java.lang.String,java.lang.String> getCustomProperties()
          Returns an immutable map of the custom properties.
 java.lang.String getCustomProperty(java.lang.String key)
          Retrieves a custom property.
 java.lang.String getId()
          Returns the column id.
 java.lang.String getLabel()
          Returns the column label.
 java.lang.String getPattern()
          Returns the column pattern.
 ValueType getType()
          Returns the column type.
 void setCustomProperty(java.lang.String propertyKey, java.lang.String propertyValue)
          Sets a custom property.
 void setLabel(java.lang.String label)
          Sets a column label.
 void setPattern(java.lang.String pattern)
          Sets a column pattern.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ColumnDescription

public ColumnDescription(java.lang.String id,
                         ValueType type,
                         java.lang.String label)
Creates a new column description.

Parameters:
id - The column's identifier.
type - The column's data type.
label - The column's displayed name (label).
Method Detail

getId

public java.lang.String getId()
Returns the column id.

Returns:
The column id.

getType

public ValueType getType()
Returns the column type.

Returns:
The column type.

getLabel

public java.lang.String getLabel()
Returns the column label.

Returns:
The column label.

getPattern

public java.lang.String getPattern()
Returns the column pattern.

Returns:
The column pattern.

setPattern

public void setPattern(java.lang.String pattern)
Sets a column pattern.

Parameters:
pattern - A pattern to set for this column.

setLabel

public void setLabel(java.lang.String label)
Sets a column label.

Parameters:
label - A label to set for this column.

getCustomProperty

public java.lang.String getCustomProperty(java.lang.String key)
Retrieves a custom property. Returns null if it does not exist.

Parameters:
key - The property key.
Returns:
The property value, or null if it does not exist.

setCustomProperty

public void setCustomProperty(java.lang.String propertyKey,
                              java.lang.String propertyValue)
Sets a custom property.

Parameters:
propertyKey - The property key.
propertyValue - The property value.

getCustomProperties

public java.util.Map<java.lang.String,java.lang.String> getCustomProperties()
Returns an immutable map of the custom properties.

Returns:
An immutable map of the custom properties.

clone

public ColumnDescription clone()
Returns a clone of the ColumnDescription, meaning a column descriptor with the exact same properties. This is a deep clone as it copies all custom properties.

Overrides:
clone in class java.lang.Object
Returns:
The cloned ColumnDescription.


Copyright © 2009 Google. All Rights Reserved.