*) added several MIME types (derived from http://filext.com/), some of them might be rather uncommon

*) added an annotation forgotten in last commit

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@6180 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
low012 16 years ago
parent 11dfb2d54f
commit 69551ff3d9

@ -50,11 +50,15 @@ public class bzipParser extends AbstractParser implements Parser {
* @see #getSupportedMimeTypes()
*/
public static final Hashtable<String, String> SUPPORTED_MIME_TYPES = new Hashtable<String, String>();
static String fileExtensions = "bz2,tbz,tbz2";
static final String fileExtensions = "bz2,tbz,tbz2";
static {
SUPPORTED_MIME_TYPES.put("application/x-bzip2",fileExtensions);
SUPPORTED_MIME_TYPES.put("application/bzip2", fileExtensions);
SUPPORTED_MIME_TYPES.put("application/x-bz2", fileExtensions);
SUPPORTED_MIME_TYPES.put("application/octet-stream",fileExtensions);
SUPPORTED_MIME_TYPES.put("application/x-bzip",fileExtensions);
SUPPORTED_MIME_TYPES.put("/x-compressed",fileExtensions);
SUPPORTED_MIME_TYPES.put("application/x-stuffit",fileExtensions);
}
/**

@ -46,7 +46,17 @@ public class docParser extends AbstractParser implements Parser {
* @see #getSupportedMimeTypes()
*/
public static final Hashtable<String, String> SUPPORTED_MIME_TYPES = new Hashtable<String, String>();
static { SUPPORTED_MIME_TYPES.put("application/msword","doc"); }
static {
SUPPORTED_MIME_TYPES.put("application/msword","doc");
SUPPORTED_MIME_TYPES.put("application/doc","doc");
SUPPORTED_MIME_TYPES.put("appl/text","doc");
SUPPORTED_MIME_TYPES.put("application/vnd.msword","doc");
SUPPORTED_MIME_TYPES.put("application/vnd.ms-word","doc");
SUPPORTED_MIME_TYPES.put("application/winword","doc");
SUPPORTED_MIME_TYPES.put("application/word","doc");
SUPPORTED_MIME_TYPES.put("application/x-msw6","doc");
SUPPORTED_MIME_TYPES.put("application/x-msword","doc");
}
/**
* a list of library names that are needed by this parser

@ -47,10 +47,19 @@ public class gzipParser extends AbstractParser implements Parser {
* a list of mime types that are supported by this parser class
* @see #getSupportedMimeTypes()
*/
public static final Hashtable<String, String> SUPPORTED_MIME_TYPES = new Hashtable<String, String>();
public static final Hashtable<String, String> SUPPORTED_MIME_TYPES = new Hashtable<String, String>();
static final String fileExtensions = "gz,tgz";
static {
SUPPORTED_MIME_TYPES.put("application/x-gzip","gz,tgz");
SUPPORTED_MIME_TYPES.put("application/gzip","gz,tgz");
SUPPORTED_MIME_TYPES.put("application/x-gzip",fileExtensions);
SUPPORTED_MIME_TYPES.put("application/gzip",fileExtensions);
SUPPORTED_MIME_TYPES.put("application/x-gunzip",fileExtensions);
SUPPORTED_MIME_TYPES.put("application/gzipped",fileExtensions);
SUPPORTED_MIME_TYPES.put("application/gzip-compressed",fileExtensions);
SUPPORTED_MIME_TYPES.put("application/x-compressed",fileExtensions);
SUPPORTED_MIME_TYPES.put("application/x-compress",fileExtensions);
SUPPORTED_MIME_TYPES.put("gzip/document",fileExtensions);
SUPPORTED_MIME_TYPES.put("application/octet-stream",fileExtensions);
SUPPORTED_MIME_TYPES.put("application/x-tar",fileExtensions);
}
/**
@ -106,6 +115,7 @@ public class gzipParser extends AbstractParser implements Parser {
}
}
@Override
public void reset() {
// Nothing todo here at the moment
super.reset();

@ -57,8 +57,15 @@ public class pdfParser extends AbstractParser implements Parser {
* @see #getSupportedMimeTypes()
*/
public static final Hashtable<String, String> SUPPORTED_MIME_TYPES = new Hashtable<String, String>();
static { SUPPORTED_MIME_TYPES.put("application/pdf","pdf"); }
static {
SUPPORTED_MIME_TYPES.put("application/pdf","pdf");
SUPPORTED_MIME_TYPES.put("application/x-pdf","pdf");
SUPPORTED_MIME_TYPES.put("application/acrobat","pdf");
SUPPORTED_MIME_TYPES.put("applications/vnd.pdf","pdf");
SUPPORTED_MIME_TYPES.put("text/pdf","pdf");
SUPPORTED_MIME_TYPES.put("text/x-pdf","pdf");
}
/**
* a list of library names that are needed by this parser
* @see Parser#getLibxDependences()

@ -45,11 +45,17 @@ public class pptParser extends AbstractParser implements Parser {
* a list of mime types that are supported by this parser class
* @see #getSupportedMimeTypes()
*/
public static final Hashtable<String, String> SUPPORTED_MIME_TYPES = new Hashtable<String, String>();
public static final Hashtable<String, String> SUPPORTED_MIME_TYPES = new Hashtable<String, String>();
static final String fileExtensions = "ppt,pps";
static {
SUPPORTED_MIME_TYPES.put("application/mspowerpoint","ppt,pps");
SUPPORTED_MIME_TYPES.put("application/powerpoint","ppt,pps");
SUPPORTED_MIME_TYPES.put("application/vnd.ms-powerpoint","ppt,pps");
SUPPORTED_MIME_TYPES.put("application/mspowerpoint",fileExtensions);
SUPPORTED_MIME_TYPES.put("application/powerpoint",fileExtensions);
SUPPORTED_MIME_TYPES.put("application/vnd.ms-powerpoint",fileExtensions);
SUPPORTED_MIME_TYPES.put("application/ms-powerpoint",fileExtensions);
SUPPORTED_MIME_TYPES.put("application/mspowerpnt",fileExtensions);
SUPPORTED_MIME_TYPES.put("application/vnd-mspowerpoint",fileExtensions);
SUPPORTED_MIME_TYPES.put("application/x-powerpoint",fileExtensions);
SUPPORTED_MIME_TYPES.put("application/x-m",fileExtensions);
}
/**

@ -53,6 +53,10 @@ public class psParser extends AbstractParser implements Parser {
static {
SUPPORTED_MIME_TYPES.put("application/postscript","ps");
SUPPORTED_MIME_TYPES.put("text/postscript","ps");
SUPPORTED_MIME_TYPES.put("application/ps","ps");
SUPPORTED_MIME_TYPES.put("application/x-postscript","ps");
SUPPORTED_MIME_TYPES.put("application/x-ps","ps");
SUPPORTED_MIME_TYPES.put("application/x-postscript-not-eps","ps");
}
/**

@ -59,12 +59,13 @@ public class rssParser extends AbstractParser implements Parser {
* a list of mime types that are supported by this parser class
* @see #getSupportedMimeTypes()
*/
public static final Hashtable<String, String> SUPPORTED_MIME_TYPES = new Hashtable<String, String>();
public static final Hashtable<String, String> SUPPORTED_MIME_TYPES = new Hashtable<String, String>();
static final String fileExtensions = "xml,rss,rdf";
static {
SUPPORTED_MIME_TYPES.put("text/rss","xml,rss,rdf");
SUPPORTED_MIME_TYPES.put("application/rdf+xml","xml,rss,rdf");
SUPPORTED_MIME_TYPES.put("application/rss+xml","xml,rss,rdf");
SUPPORTED_MIME_TYPES.put("application/atom+xml","xml,atom");
SUPPORTED_MIME_TYPES.put("text/rss",fileExtensions);
SUPPORTED_MIME_TYPES.put("application/rdf+xml",fileExtensions);
SUPPORTED_MIME_TYPES.put("application/rss+xml",fileExtensions);
SUPPORTED_MIME_TYPES.put("application/atom+xml",fileExtensions);
}
/**

@ -49,6 +49,11 @@ public class rtfParser extends AbstractParser implements Parser {
static {
SUPPORTED_MIME_TYPES.put("application/rtf","rtf");
SUPPORTED_MIME_TYPES.put("text/rtf","rtf");
SUPPORTED_MIME_TYPES.put("application/x-rtf","rtf");
SUPPORTED_MIME_TYPES.put("text/richtext","rtf");
SUPPORTED_MIME_TYPES.put("application/msword","rtf");
SUPPORTED_MIME_TYPES.put("application/doc","rtf");
SUPPORTED_MIME_TYPES.put("application/x-soffice","rtf");
}
/**

@ -48,6 +48,8 @@ public class swfParser extends AbstractParser implements Parser {
static {
SUPPORTED_MIME_TYPES.put("application/x-shockwave-flash","swf");
SUPPORTED_MIME_TYPES.put("application/x-shockwave-flash2-preview","swf");
SUPPORTED_MIME_TYPES.put("application/futuresplash","swf");
SUPPORTED_MIME_TYPES.put("image/vnd.rn-realflash","swf");
}
/**

@ -63,6 +63,10 @@ public class tarParser extends AbstractParser implements Parser {
static {
SUPPORTED_MIME_TYPES.put("application/x-tar","tar");
SUPPORTED_MIME_TYPES.put("application/tar","tar");
SUPPORTED_MIME_TYPES.put("applicaton/x-gtar","tar");
SUPPORTED_MIME_TYPES.put("multipart/x-tar","tar");
SUPPORTED_MIME_TYPES.put("application/x-compress","tar");
SUPPORTED_MIME_TYPES.put("application/x-compressed","tar");
}
/**

@ -64,8 +64,13 @@ public class vcfParser extends AbstractParser implements Parser {
public static final Hashtable<String, String> SUPPORTED_MIME_TYPES = new Hashtable<String, String>();
static {
SUPPORTED_MIME_TYPES.put("text/x-vcard","vcf");
SUPPORTED_MIME_TYPES.put("application/vcard","vcf");
}
SUPPORTED_MIME_TYPES.put("application/vcard","vcf");
SUPPORTED_MIME_TYPES.put("text/anytext","vcf");
SUPPORTED_MIME_TYPES.put("text/directory","vcf");
SUPPORTED_MIME_TYPES.put("application/x-versit","vcf");
SUPPORTED_MIME_TYPES.put("text/x-versit","vcf");
SUPPORTED_MIME_TYPES.put("text/x-vcalendar","vcf");
}
/**
* a list of library names that are needed by this parser

@ -64,6 +64,9 @@ public class xlsParser extends AbstractParser implements Parser, HSSFListener {
SUPPORTED_MIME_TYPES.put("application/vnd.ms-excel","xls");
SUPPORTED_MIME_TYPES.put("application/x-excel","xls");
SUPPORTED_MIME_TYPES.put("application/x-msexcel","xls");
SUPPORTED_MIME_TYPES.put("application/x-ms-excel","xls");
SUPPORTED_MIME_TYPES.put("application/x-dos_ms_excel","xls");
SUPPORTED_MIME_TYPES.put("application/xls","xls");
}
/**

@ -62,6 +62,10 @@ public class zipParser extends AbstractParser implements Parser {
SUPPORTED_MIME_TYPES.put("application/zip","zip");
SUPPORTED_MIME_TYPES.put("application/x-zip","zip");
SUPPORTED_MIME_TYPES.put("application/x-zip-compressed","zip");
SUPPORTED_MIME_TYPES.put("application/octet-stream","zip");
SUPPORTED_MIME_TYPES.put("application/x-compress","zip");
SUPPORTED_MIME_TYPES.put("application/x-compressed","zip");
SUPPORTED_MIME_TYPES.put("multipart/x-zip","zip");
SUPPORTED_MIME_TYPES.put("application/java-archive","jar");
}

Loading…
Cancel
Save