Updated mime type support
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-widget-common-event@115759 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
73dac533ba
commit
392361bf51
|
@ -9,12 +9,60 @@ package org.gcube.portlets.user.td.widgetcommonevent.shared.mime;
|
|||
public enum MimeTypeSupport {
|
||||
_csv(".csv","text/csv"),
|
||||
_jpg(".jpg","image/jpeg"),
|
||||
_jpgp(".jpg","image/pjpeg"),
|
||||
_jpe(".jpe","image/jpeg"),
|
||||
_jpep(".jpe","image/pjpeg"),
|
||||
_jpeg(".jpeg","image/jpeg"),
|
||||
_jpegp(".jpeg","image/pjpeg"),
|
||||
_png(".png","image/png"),
|
||||
_xpng(".x-png","image/png"),
|
||||
_xpm(".xpm","image/xpm"),
|
||||
_xpmPix(".xpm","image/x-xpixmap"),
|
||||
_gif(".gif","image/gif"),
|
||||
_ico(".ico","image/x-icon"),
|
||||
_bmp(".bmp","image/bmp"),
|
||||
_bmpXWin(".bmp","image/x-windows-bmp"),
|
||||
_pcx(".pcx","image/x-pcx"),
|
||||
_json(".json","application/json"),
|
||||
_txt(".txt", "text/plain"),
|
||||
_pdf(".pdf", "application/pdf"),
|
||||
_txt(".txt","text/plain"),
|
||||
_pdf(".pdf","application/pdf"),
|
||||
_doc(".doc","application/msword"),
|
||||
_dot(".dot","application/msword"),
|
||||
_xls(".xls","application/excel"),
|
||||
_xlsVND(".xls","application/vnd.ms-excel"),
|
||||
_xlsX(".xls","application/x-excel"),
|
||||
_xlsXMS(".xls","application/x-msexcel"),
|
||||
_bin(".bin","application/octet-stream"),
|
||||
_eps(".eps","application/postscript"),
|
||||
_html(".html","text/html"),
|
||||
_tcl(".tcl","application/x-tcl"),
|
||||
_tclScript(".tcl","text/x-script.tcl"),
|
||||
_tcsh(".tcsh","text/x-script.tcsh"),
|
||||
_tex(".tex","application/x-tex"),
|
||||
_texi(".texi","application/x-texinfo"),
|
||||
_texinfo(".texinfo","application/x-texinfo"),
|
||||
_tif(".tif","image/tiff"),
|
||||
_tifX(".tif","image/x-tiff"),
|
||||
_tiff(".tiff","image/tiff"),
|
||||
_tiffX(".tiff","image/x-tiff"),
|
||||
_z(".z","application/x-compress"),
|
||||
_zip(".zip","application/zip"),
|
||||
_zipM(".zip","multipart/x-zip"),
|
||||
_zipX(".zip","application/x-compressed"),
|
||||
_zipXzip(".zip","application/x-zip-compressed"),
|
||||
_tgz(".tgz","application/gnutar"),
|
||||
_tgzX(".tgz","application/x-compressed"),
|
||||
_gz(".gz","application/x-gzip"),
|
||||
_gzComp(".gz","application/x-compressed"),
|
||||
_gzip(".gzip","application/x-gzip"),
|
||||
_gzipMulti(".gzip","multipart/x-gzip"),
|
||||
_bz(".bz","application/x-bzip"),
|
||||
_bz2(".bz2","application/x-bzip2"),
|
||||
_zoo(".zoo","application/octet-stream"),
|
||||
_zsh(".zsh","text/x-script.zsh"),
|
||||
_arj(".arj","application/arj"),
|
||||
_xmlApp(".xml","application/xml"),
|
||||
_xml(".xml","text/xml"),
|
||||
_unknow(".unknow","unknow");
|
||||
|
||||
|
||||
|
@ -65,7 +113,7 @@ public enum MimeTypeSupport {
|
|||
.bin application/octet-stream
|
||||
.bin application/x-binary
|
||||
.bin application/x-macbinary
|
||||
.bm image/bmp
|
||||
.bm image/bmp
|
||||
.bmp image/bmp
|
||||
.bmp image/x-windows-bmp
|
||||
.boo application/book
|
||||
|
@ -674,7 +722,9 @@ public enum MimeTypeSupport {
|
|||
private final String mimeName;
|
||||
|
||||
/**
|
||||
* @param text
|
||||
*
|
||||
* @param extension
|
||||
* @param mimeName
|
||||
*/
|
||||
private MimeTypeSupport(final String extension, final String mimeName) {
|
||||
this.extension=extension;
|
||||
|
@ -687,10 +737,18 @@ public enum MimeTypeSupport {
|
|||
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public String getExtension(){
|
||||
return extension;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public String getMimeName(){
|
||||
return mimeName;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue