diff --git a/source/de/anomic/plasma/parser/bzip/bzipParser.java b/source/de/anomic/plasma/parser/bzip/bzipParser.java index b87bb0ca9..408242a62 100644 --- a/source/de/anomic/plasma/parser/bzip/bzipParser.java +++ b/source/de/anomic/plasma/parser/bzip/bzipParser.java @@ -50,11 +50,15 @@ public class bzipParser extends AbstractParser implements Parser { * @see #getSupportedMimeTypes() */ public static final Hashtable SUPPORTED_MIME_TYPES = new Hashtable(); - 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); } /** diff --git a/source/de/anomic/plasma/parser/doc/docParser.java b/source/de/anomic/plasma/parser/doc/docParser.java index 151c24bad..4abc2cc6a 100644 --- a/source/de/anomic/plasma/parser/doc/docParser.java +++ b/source/de/anomic/plasma/parser/doc/docParser.java @@ -46,7 +46,17 @@ public class docParser extends AbstractParser implements Parser { * @see #getSupportedMimeTypes() */ public static final Hashtable SUPPORTED_MIME_TYPES = new Hashtable(); - 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 diff --git a/source/de/anomic/plasma/parser/gzip/gzipParser.java b/source/de/anomic/plasma/parser/gzip/gzipParser.java index a9dcc6471..5ed07c189 100644 --- a/source/de/anomic/plasma/parser/gzip/gzipParser.java +++ b/source/de/anomic/plasma/parser/gzip/gzipParser.java @@ -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 SUPPORTED_MIME_TYPES = new Hashtable(); + public static final Hashtable SUPPORTED_MIME_TYPES = new Hashtable(); + 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(); diff --git a/source/de/anomic/plasma/parser/pdf/pdfParser.java b/source/de/anomic/plasma/parser/pdf/pdfParser.java index 67441404b..e9b06e62f 100644 --- a/source/de/anomic/plasma/parser/pdf/pdfParser.java +++ b/source/de/anomic/plasma/parser/pdf/pdfParser.java @@ -57,8 +57,15 @@ public class pdfParser extends AbstractParser implements Parser { * @see #getSupportedMimeTypes() */ public static final Hashtable SUPPORTED_MIME_TYPES = new Hashtable(); - 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() diff --git a/source/de/anomic/plasma/parser/ppt/pptParser.java b/source/de/anomic/plasma/parser/ppt/pptParser.java index f76cb6440..2a7f054eb 100644 --- a/source/de/anomic/plasma/parser/ppt/pptParser.java +++ b/source/de/anomic/plasma/parser/ppt/pptParser.java @@ -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 SUPPORTED_MIME_TYPES = new Hashtable(); + public static final Hashtable SUPPORTED_MIME_TYPES = new Hashtable(); + 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); } /** diff --git a/source/de/anomic/plasma/parser/ps/psParser.java b/source/de/anomic/plasma/parser/ps/psParser.java index 9cefb96b4..da803444f 100644 --- a/source/de/anomic/plasma/parser/ps/psParser.java +++ b/source/de/anomic/plasma/parser/ps/psParser.java @@ -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"); } /** diff --git a/source/de/anomic/plasma/parser/rss/rssParser.java b/source/de/anomic/plasma/parser/rss/rssParser.java index 8a05c3a93..15cbc2eda 100644 --- a/source/de/anomic/plasma/parser/rss/rssParser.java +++ b/source/de/anomic/plasma/parser/rss/rssParser.java @@ -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 SUPPORTED_MIME_TYPES = new Hashtable(); + public static final Hashtable SUPPORTED_MIME_TYPES = new Hashtable(); + 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); } /** diff --git a/source/de/anomic/plasma/parser/rtf/rtfParser.java b/source/de/anomic/plasma/parser/rtf/rtfParser.java index cd111dbd1..128353d34 100644 --- a/source/de/anomic/plasma/parser/rtf/rtfParser.java +++ b/source/de/anomic/plasma/parser/rtf/rtfParser.java @@ -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"); } /** diff --git a/source/de/anomic/plasma/parser/swf/swfParser.java b/source/de/anomic/plasma/parser/swf/swfParser.java index cfc4765bf..fb1dbbd60 100644 --- a/source/de/anomic/plasma/parser/swf/swfParser.java +++ b/source/de/anomic/plasma/parser/swf/swfParser.java @@ -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"); } /** diff --git a/source/de/anomic/plasma/parser/tar/tarParser.java b/source/de/anomic/plasma/parser/tar/tarParser.java index b86fece0a..8f529b432 100644 --- a/source/de/anomic/plasma/parser/tar/tarParser.java +++ b/source/de/anomic/plasma/parser/tar/tarParser.java @@ -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"); } /** diff --git a/source/de/anomic/plasma/parser/vcf/vcfParser.java b/source/de/anomic/plasma/parser/vcf/vcfParser.java index baf266df4..075b3c23d 100644 --- a/source/de/anomic/plasma/parser/vcf/vcfParser.java +++ b/source/de/anomic/plasma/parser/vcf/vcfParser.java @@ -64,8 +64,13 @@ public class vcfParser extends AbstractParser implements Parser { public static final Hashtable SUPPORTED_MIME_TYPES = new Hashtable(); 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 diff --git a/source/de/anomic/plasma/parser/xls/xlsParser.java b/source/de/anomic/plasma/parser/xls/xlsParser.java index f592d3883..4cda9b4bb 100644 --- a/source/de/anomic/plasma/parser/xls/xlsParser.java +++ b/source/de/anomic/plasma/parser/xls/xlsParser.java @@ -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"); } /** diff --git a/source/de/anomic/plasma/parser/zip/zipParser.java b/source/de/anomic/plasma/parser/zip/zipParser.java index 7af35608b..6f2be03c9 100644 --- a/source/de/anomic/plasma/parser/zip/zipParser.java +++ b/source/de/anomic/plasma/parser/zip/zipParser.java @@ -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"); }