KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > jcorporate > expresso > services > dbobj > DefaultMimetypes


1 /* ====================================================================
2  * The Jcorporate Apache Style Software License, Version 1.2 05-07-2002
3  *
4  * Copyright (c) 1995-2002 Jcorporate Ltd. All rights reserved.
5  *
6  * Redistribution and use in source and binary forms, with or without
7  * modification, are permitted provided that the following conditions
8  * are met:
9  *
10  * 1. Redistributions of source code must retain the above copyright
11  * notice, this list of conditions and the following disclaimer.
12  *
13  * 2. Redistributions in binary form must reproduce the above copyright
14  * notice, this list of conditions and the following disclaimer in
15  * the documentation and/or other materials provided with the
16  * distribution.
17  *
18  * 3. The end-user documentation included with the redistribution,
19  * if any, must include the following acknowledgment:
20  * "This product includes software developed by Jcorporate Ltd.
21  * (http://www.jcorporate.com/)."
22  * Alternately, this acknowledgment may appear in the software itself,
23  * if and wherever such third-party acknowledgments normally appear.
24  *
25  * 4. "Jcorporate" and product names such as "Expresso" must
26  * not be used to endorse or promote products derived from this
27  * software without prior written permission. For written permission,
28  * please contact info@jcorporate.com.
29  *
30  * 5. Products derived from this software may not be called "Expresso",
31  * or other Jcorporate product names; nor may "Expresso" or other
32  * Jcorporate product names appear in their name, without prior
33  * written permission of Jcorporate Ltd.
34  *
35  * 6. No product derived from this software may compete in the same
36  * market space, i.e. framework, without prior written permission
37  * of Jcorporate Ltd. For written permission, please contact
38  * partners@jcorporate.com.
39  *
40  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
41  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
42  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
43  * DISCLAIMED. IN NO EVENT SHALL JCORPORATE LTD OR ITS CONTRIBUTORS
44  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
45  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
46  * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
47  * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
48  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
49  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
50  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
51  * SUCH DAMAGE.
52  * ====================================================================
53  *
54  * This software consists of voluntary contributions made by many
55  * individuals on behalf of the Jcorporate Ltd. Contributions back
56  * to the project(s) are encouraged when you make modifications.
57  * Please send them to support@jcorporate.com. For more information
58  * on Jcorporate Ltd. and its products, please see
59  * <http://www.jcorporate.com/>.
60  *
61  * Portions of this software are based upon other open source
62  * products and are subject to their respective licenses.
63  */

64
65 package com.jcorporate.expresso.services.dbobj;
66
67 /**
68  * Static object table that allows allocation and discarding the MimeTypes[]
69  * static string array.
70  *
71  * @author Michael Rimov
72  * @version $Revision: 1.5 $ on $Date: 2004/11/17 20:48:18 $
73  */

74
75 public class DefaultMimetypes {
76     /**
77      * This is the list of mime types that are entered into the MimeType table
78      * by default. If you want all applications to automatically have this MIME
79      * type, simply add to the string array.
80      * <p/>
81      * Array fields:
82      * <ul>
83      * <li>Field 1 : The Browser MIME Type</li>
84      * <li> Field 2: A Friendly Description of the MIME Type. May be blank </li>
85      * <li>Field 3: The name of an icon that is used to represent the file type. If
86      * left blank, then Document.gif will be automatically used.</li>
87      * <li>Field 4: A space separated list of potential file endings (in lower case)
88      * so the framework can map the appropriate file names to the file type</li>
89      * </ul>
90      * This list is based upon various sources over the internet. But the registered
91      * types can be found at:
92      * ftp://ftp.isi.edu/in-notes/iana/assignments/media-types/
93      */

94     public final String JavaDoc[][] mimeTypes = {
95         {"audio/aiff", "Audio File", "Speaker.gif", "aiff aif"},
96         {"audio/basic", "audio/basic", "Speaker.gif", "au snd"},
97         {"audio/mid", "MIDI File", "Music.gif", "mid midi"},
98         {"audio/mpeg3", "MP3 File", "Speaker.gif", "mp3"},
99         {"audio/mpeg", "MPEG Audio", "Speaker.gif", "mpa abs mpega"},
100         {"audio/x-pn-realaudio", "Real Audio", "RealPlayer.gif", "ra"},
101         {"audio/wav", "Windows WAV Audio File", "Speaker.gif", "wav"},
102         {"application/x-shockwave-flash", "Macromedia Flash Animation", "MacromediaFlash.gif", "swf"},
103         {"application/mathematica", "Mathematica Notebook", "", "nb"},
104         {"application/msword", "Microsoft Word Document", "MSWord.gif", "doc dot"},
105         {"application/rtf", "Rich Text Format Document", "RTF.gif", "rtf"},
106         {"application/octet-stream", "Unknown Binary File", "", ""},
107         {"application/pcx", "PCX Image", "Image.gif", "pcx"},
108         {"application/pdf", "PDF Files", "Acrobat.gif", "pdf"},
109         {"application/pgp-encrypted", "PGP Encrypted File", "", "asc pgp"},
110         {"application/pgp-signature", "PGP Signature File", "", ""},
111         {"application/pgp-keys", "PGP Key", "", ""},
112         {"application/pkcs7-mime", "PKCS-7 Mime Encrypted Document", "", ""},
113         {"application/pkcs7-signature", "PKCS-7 Signature", "", ""},
114         {"application/postscript", "Postscript Document", "PS.gif", "ps"},
115         {"application/wordperfect", "Corel WordPerfect", "", "wp"},
116         {"application/x-javascript", "Javascript", "", "js"},
117         {"application/x-gtar", "gtar", "", "gtar"},
118         {"application/x-gzip", "GZip Compressed File", "", "gz"},
119         {"application/x-latex", "latex", "", ""},
120         {"application/x-msaccess", "MS Access Database", "MSAccess.gif", "mdb"},
121         {"application/x-mspublisher", "Microsoft Publisher", "MSPublisher.gif", "pub"},
122         {"application/x-shar", "SHAR file", "", "shar"},
123         {"application/x-tar", "UNIX Tape Archive", "", "tar"},
124         {"application/x-tex", "TEX File", "", "tex"},
125         {"application/x-troff", "UNIX NROFF Document", "", "t tr roff nroff"},
126         {"application/x-troff-man", "UNIX Man Page", "", "man"},
127         {"application/x-vrml", "VRML Model", "", "vrml wrl"},
128         {"application/x-director", "Macromedia Director File", "", "dcr dir dxr"},
129         {"application/vnd.framemaker", "Adobe Framemaker File", "", ""},
130         {"application/vnd.lotus-1-2-3", "Lotus 1-2-3 Spreadsheet", "", ""},
131         {"application/vnd.lotus-approach", "Lotus Approach Document", "", ""},
132         {"application/vnd.lotus-freelance", "Lotus Freelance Graphic", "", ""},
133         {"application/vnd.lotus-organizer", "Lotus Organizer File", "", ""},
134         {"application/vnd.lotus-screencam", "Lotus Screencam Video", "", ""},
135         {"application/vnd.lotus-wordpro", "Lotus Wordpro Document", "", ""},
136         {"application/vnd.ms-artgalry", "Microsoft Art Gallery Object", "", "cag"},
137         {"application/vnd.ms-excel", "Microsoft Excel Document", "Excel.gif", "xls xlt xlm xld xla xlc xlw xll"},
138         {"application/vnd.ms-powerpoint", "Microsoft Powerpoint Slideshow", "MSPowerPoint.gif", "ppt"},
139         {"application/vnd.ms-project", "Microsoft Project Document", "", "mpp mpt"},
140         {"application/vnd.ms-works", "Microsoft Works Document", "", "wks"},
141         {"application/vnd.sun.xml.writer.template", "StarOffice Write Document", "", "stw"},
142         {"application/vnd.sun.xml.calc", "StarOffice SpreadSheet", "", "sxc"},
143         {"application/vnd.sun.xml.calc.template", "StarOffice Calc Template", "", "stc"},
144         {"application/vnd.sun.xml.impress", "StarOffice Impress Document", "", "sxi"},
145         {"application/vnd.sun.xml.impress.template", "StarOffice Impress Template", "", "sti"},
146         {"application/vnd.sun.xml.writer.global", "Star Office Write Document", "", "sxg"},
147         {"application/vnd.sun.xml.math", "Star Office Math Doc", "", "sxm"},
148         {"application/mac-binhex40", "Macintosh HQX Compressed File", "", ""},
149         {"application/unknown", "All other file types", "Program.gif", ""},
150         {"application/wordperfect5.1", "Wordperfect 5.1 Document", "", ""},
151         {"application/zip", "Zip Compressed Archive", "", "zip"},
152         {"image/gif", "GIF Image", "Image.gif", "gif"},
153         {"image/jpeg", "JPEG Image", "Image.gif", "jpg jpeg jpe"},
154         {"image/png", "PNG Image", "Image.gif", "png"},
155         {"image/tiff", "TIFF Image", "Image.gif", "tif tiff"},
156         {"image/x-icon", "Windows Icon", "Image.gif", "ico"},
157         {"image/x-xbitmap", "X Bitmap", "Image.gif", "xbm bmp"},
158         {"message/rfc822", "RFC 822 Formatted Email Message", "envelop2.gif", ""},
159         {"text/x-csv", "Comma Separated Text", "", "csv"},
160         {"text/html", "HTML File", "HTML.gif", "htm html"},
161         {"text/plain", "Text File", "", "txt asc java pl py c cpp h hpp"},
162         {"text/xml", "XML File", "", "xml"},
163         {"text/xml-external-parsed-entity", "XML External Parsed Entity", "", ""},
164         {"text/xsl", "XSL Stylesheet", "", "xsl xslt"},
165         {"text/wml", "WML File", "PDA.gif", "wml"},
166         {"text/vnd.wap.wmlscript ", "WML Script", "PDA.gif", ""},
167         {"text/vnd.curl", "Curl Document", "", ""},
168         {"video/avi", "Microsoft AVI Video", "Movie.gif", "avi vfw avx"},
169         {"video/fli", "AutoCAD Animation", "Movie.gif", "fli flc"},
170         {"video/mpeg", "MPEG Video", "Movie.gif", "mpeg mpg mpe"},
171         {"video/mpeg2", "MPEG2 Video", "Movie.gif", ""},
172         {"video/quicktime", "Apple Quicktime Video", "QuickTime.gif", "mov qt"},
173         {"video/x-ms-asf", "Microsoft Netshow Video", "Movie.gif", "asf"},
174         {"video/vnd.rn-realvideo", "Real Video", "RealPlayer.gif", "rm"}
175     };
176
177     public DefaultMimetypes() {
178     }
179
180
181 }
Popular Tags