/*
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you 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 org.apache.uima.cas;

/**
 * The various forms of serialization (typically of the CAS)  
 *
 */
public enum SerialFormat {
  
  /**
   * XML-serialized CAS
   */
  XMI("xmi"),

  /**
   * XML-serialized CAS
   */
  XCAS("xcas"),

  /**
   * Java-serialized CAS without type system
   */
  SERIALIZED("scas"),

  /**
   * Java-serialized CAS with type system
   */
  SERIALIZED_TS("scas"),

  /**
   * Java-serialized CAS without type system, no filtering
   */
  BINARY("bcas"),

  /**
   * Binary compressed CAS without type system, no filtering  (form 4)
   */
  COMPRESSED("bcas"),

  /**
   * Binary compressed CAS with reachability and type and feature filtering (form 6)
   */
  COMPRESSED_FILTERED("bcas"),

  /**
   * Binary compressed CAS with embedded Java-serialized type system
   * with reachability and type and feature filtering (form 6)
   */
  COMPRESSED_FILTERED_TS("bcas"),

  /**
   * with subset of views (not in use)
   */
  COMPRESSED_PROJECTION("bcas"),
  
  /**
   *  Unknown format 
   */
  UNKNOWN(""); 
  
  
  
  private String defaultFileExtension;

  SerialFormat(String defaultFileExtension) {
    this.defaultFileExtension = defaultFileExtension;
  }

  public String getDefaultFileExtension() {
    return defaultFileExtension;
  }
  
}

@@ -952,47 +952,49 @@
   * 
-XML-serialized CAS%0A   */%0A  XMI(%22xmi%22),%0A
+ Unknown format %0A   */%0A  UNKNOWN(%22%22), %0A  
 %0A  /
@@ -1046,36 +1046,35 @@
 %22),%0A%0A  /**%0A   * 
-Java
+XML
 -serialized CAS 
@@ -1076,133 +1076,25 @@
  CAS
- without type system%0A   */%0A  SERIALIZED(%22scas%22),%0A%0A  /**%0A   * Java-serialized CAS with type system%0A   */%0A  SERIALIZED_TS(%22scas
+%0A   */%0A  XMI(%22xmi
 %22),%0A
@@ -1411,32 +1411,277 @@
 TERED(%22bcas%22),%0A%0A
+  /**%0A   * with subset of views (not in use)%0A   */%0A  COMPRESSED_PROJECTION(%22bcas%22),%0A%0A  /**%0A   * Java-serialized CAS without type system%0A   */%0A  SERIALIZED(%22scas%22),%0A%0A  /**%0A   * Java-serialized CAS with type system%0A   */%0A  SERIALIZED_TS(%22scas%22),%0A%0A
   /**%0A   * Binar
@@ -1844,150 +1844,9 @@
 as%22)
-,%0A%0A  /**%0A   * with subset of views (not in use)%0A   */%0A  COMPRESSED_PROJECTION(%22bcas%22),%0A  %0A  /**%0A   *  Unknown format %0A   */%0A  UNKNOWN(%22%22); %0A  
+;
 %0A  %0A

reorder enums to improve backwards compatibility, same order, new ones at end.