@@ -0,0 +1,1634 @@
+package org.zanata.common;%0A%0Aimport java.util.ArrayList;%0Aimport java.util.Collections;%0Aimport java.util.List;%0A%0Apublic enum DocumentType%0A%7B%0A   GETTEXT_PORTABLE_OBJECT(%22po%22),%0A   GETTEXT_PORTABLE_OBJECT_TEMPLATE(%22pot%22),%0A   PLAIN_TEXT(%22txt%22),%0A   XML_DOCUMENT_TYPE_DEFINITION(%22dtd%22),%0A%0A   OPEN_DOCUMENT_TEXT(%22odt%22),%0A   OPEN_DOCUMENT_TEXT_FLAT(%22fodt%22),%0A   OPEN_DOCUMENT_PRESENTATION(%22odp%22),%0A   OPEN_DOCUMENT_PRESENTATION_FLAT(%22fodp%22),%0A   OPEN_DOCUMENT_SPREADSHEET(%22ods%22),%0A   OPEN_DOCUMENT_SPREADSHEET_FLAT(%22fods%22),%0A   OPEN_DOCUMENT_GRAPHICS(%22odg%22),%0A   OPEN_DOCUMENT_GRAPHICS_FLAT(%22fodg%22),%0A   OPEN_DOCUMENT_DATABASE(%22odb%22),%0A   OPEN_DOCUMENT_FORMULA(%22odf%22);%0A%0A   private static List%3CString%3E allExtensions = buildExtensionsList();%0A%0A   private static List%3CString%3E buildExtensionsList()%0A   %7B%0A      List%3CString%3E allExtensions = new ArrayList%3CString%3E();%0A      for (DocumentType type : DocumentType.values())%0A      %7B%0A         allExtensions.add(type.getExtension());%0A      %7D%0A      return allExtensions;%0A   %7D%0A%0A   /**%0A    * %0A    * @return a read-only list of file extensions for known file types%0A    */%0A   public static List%3CString%3E getAllExtensions()%0A   %7B%0A      return Collections.unmodifiableList(allExtensions);%0A   %7D%0A%0A%0A   public static DocumentType typeFor(String extension)%0A   %7B%0A      for (DocumentType type : DocumentType.values())%0A      %7B%0A         if (type.getExtension().equals(extension))%0A         %7B%0A            return type;%0A         %7D%0A      %7D%0A      return null;%0A   %7D%0A%0A%0A   private String extension;%0A   DocumentType(String extension)%0A   %7B%0A      this.extension = extension;%0A   %7D%0A%0A   public String getExtension()%0A   %7B%0A      return extension;%0A   %7D%0A%0A%7D%0A

add DocumentType enum to describe raw documents