com.google.visualization.datasource.base
Enum OutputType

java.lang.Object
  extended by java.lang.Enum<OutputType>
      extended by com.google.visualization.datasource.base.OutputType
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<OutputType>

public enum OutputType
extends java.lang.Enum<OutputType>

Enumeration of the supported output formats for the data source. This enumeration almost exactly correlates to the "out" parameter of the wire protocol, except JSONP which is never explicitly specified in the "out" parameter.

Author:
Nimrod T.

Enum Constant Summary
CSV
           
HTML
           
JSON
           
JSONP
           
TSV_EXCEL
          Output type value for tab-separated values encoded using UTF-16 little-endian with byte-order mark supported by Microsoft Excel.
 
Method Summary
static OutputType defaultValue()
          Returns the default OutputType.
static OutputType findByCode(java.lang.String code)
          Finds the OutputType that matches the given code.
 java.lang.String getCode()
          Returns the code for this OutputType.
static OutputType valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static OutputType[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

HTML

public static final OutputType HTML

JSON

public static final OutputType JSON

JSONP

public static final OutputType JSONP

CSV

public static final OutputType CSV

TSV_EXCEL

public static final OutputType TSV_EXCEL
Output type value for tab-separated values encoded using UTF-16 little-endian with byte-order mark supported by Microsoft Excel. UTF-8 encoding used by CSV output type is not supported by Excel. The Unicode encoding understood by Excel is UTF-16 little-endian with byte-order mark. Excel also does not support comma delimiter in UTF-16 encoded files, however, it supports tab delimiter. The default output filename for Excel should have a .csv extension in spite of containing tab-separated values because Excel does not automatically associate with files having .tsv extension.

Method Detail

values

public static OutputType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (OutputType c : OutputType.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static OutputType valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

getCode

public java.lang.String getCode()
Returns the code for this OutputType.

Returns:
The code for this OutputType.

findByCode

public static OutputType findByCode(java.lang.String code)
Finds the OutputType that matches the given code.

Parameters:
code - The code to search for.
Returns:
The OutputType that matches the given code or null if none are found.

defaultValue

public static OutputType defaultValue()
Returns the default OutputType.

Returns:
The default OutputType.


Copyright © 2009 Google. All Rights Reserved.