diff options
author | tkellner <tkellner@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4> | 2013-12-19 14:31:48 +0000 |
---|---|---|
committer | tkellner <tkellner@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4> | 2013-12-19 14:31:48 +0000 |
commit | 687d119265e13ce6b523a5db83bf5d9c4579831f (patch) | |
tree | fe907f44543efc7b4ffbb0d7c8f028683d27d110 /BKUCommonGUI/src/main/java | |
parent | 109b8c7d788b8d9f65e7db8e1b6c8f2c4432a268 (diff) | |
download | mocca-687d119265e13ce6b523a5db83bf5d9c4579831f.tar.gz mocca-687d119265e13ce6b523a5db83bf5d9c4579831f.tar.bz2 mocca-687d119265e13ce6b523a5db83bf5d9c4579831f.zip |
Expand MimeTypes, use for CMSHashDataInput
git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@1268 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4
Diffstat (limited to 'BKUCommonGUI/src/main/java')
-rw-r--r-- | BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/viewer/MimeTypes.java | 52 |
1 files changed, 34 insertions, 18 deletions
diff --git a/BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/viewer/MimeTypes.java b/BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/viewer/MimeTypes.java index 17316602..6984c47a 100644 --- a/BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/viewer/MimeTypes.java +++ b/BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/viewer/MimeTypes.java @@ -36,27 +36,43 @@ public class MimeTypes { private static final Map<String , String> FILE_EXTENSIONS = new HashMap<String, String>() { private static final long serialVersionUID = 1L; -{ - put("application/msword", ".doc"); - put("application/octet-stream", ".bin"); - put("application/pdf", ".pdf"); - put("application/xhtml+xml", ".xhtml"); - put("text/html", ".html"); - put("text/plain", ".txt"); - put("text/xml", ".xml"); - }}; + { + put("application/gzip", ".gz"); + put("application/msword", ".doc"); + put("application/octet-stream", ".bin"); + put("application/pdf", ".pdf"); + put("application/vnd.openxmlformats-officedocument.wordprocessingml.document", ".docx"); + put("application/xhtml+xml", ".xhtml"); + put("application/xml", ".xml"); + put("application/zip", ".zip"); + put("image/gif", ".gif"); + put("image/jpeg", ".jpg"); + put("image/png", ".png"); + put("text/html", ".html"); + put("text/plain", ".txt"); + put("text/xml", ".xml"); + } + }; private static final Map<String , String> DESCRIPTIONS = new HashMap<String, String>() { private static final long serialVersionUID = 1L; -{ - put("application/msword", "mimetype.desc.doc"); - put("application/octet-stream", "mimetype.desc.bin"); - put("application/pdf", "mimetype.desc.pdf"); - put("application/xhtml+xml", "mimetype.desc.xhtml"); - put("text/html", "mimetype.desc.html"); - put("text/plain", "mimetype.desc.txt"); - put("text/xml", "mimetype.desc.xml"); - }}; + { + put("application/gzip", "mimetype.desc.gz"); + put("application/msword", "mimetype.desc.doc"); + put("application/octet-stream", "mimetype.desc.bin"); + put("application/pdf", "mimetype.desc.pdf"); + put("application/vnd.openxmlformats-officedocument.wordprocessingml.document", "mimetype.desc.docx"); + put("application/xhtml+xml", "mimetype.desc.xhtml"); + put("application/xml", "mimetype.desc.xml"); + put("application/zip", "mimetype.desc.zip"); + put("image/gif", "mimetype.desc.gif"); + put("image/jpeg", "mimetype.desc.jpg"); + put("image/png", "mimetype.desc.png"); + put("text/html", "mimetype.desc.html"); + put("text/plain", "mimetype.desc.txt"); + put("text/xml", "mimetype.desc.xml"); + } + }; public static String getExtension(String mimetype) { if (FILE_EXTENSIONS.containsKey(mimetype)) { |