/**
 * Copyright 2013 Cloudera Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.cloudera.cdk.data;

/**
 * <p>
 * Contains constant definitions for the standard {@link Format} instances supported
 * by the library. {@link #AVRO} is the default format.
 * </p>
 *
 * @since 0.2.0
 */
public class Formats {

  private Formats() {
  }

  /**
   * AVRO: the
   * <a href="http://avro.apache.org/docs/current/spec.html#Object+Container+Files">Avro
   * row-oriented format</a>
   */
  public static final Format AVRO = new Format("avro");

  /**
   * PARQUET: the <a href="http://parquet.io/">Parquet columnar format</a>
   */
  public static final Format PARQUET = new Format("parquet");

  /**
   * CSV: comma-separated values (read-only).
   */
  public static final Format CSV = new Format("csv");

  /**
   * Return a {@link Format} for the format name specified. If {@code formatName}
   * is not a valid name, an IllegalArgumentException is thrown. Currently the
   * formats <q>avro</q> and <q>parquet</q> are supported. Format names are
   * case sensitive.
   *
   * @since 0.9.0
   * @return an appropriate instance of Format
   * @throws IllegalArgumentException if {@code formatName} is not a valid format.
   */
  public static Format fromString(String formatName) {
    if (formatName.equals("avro")) {
      return AVRO;
    } else if (formatName.equals("parquet")) {
      return PARQUET;
    } else if (formatName.equals("csv")) {
      return CSV;
    } else {
      throw new IllegalArgumentException("Unknown format type: " + formatName);
    }
  }

}

@@ -1509,16 +1509,29 @@
 avro%3C/q%3E
+, %3Cq%3Ecsv%3C/q%3E,
  and %3Cq%3E

Add mention of CSV in Formats#fromString.