From: <my...@us...> - 2010-08-19 18:31:20
|
Revision: 2412 http://aperture.svn.sourceforge.net/aperture/?rev=2412&view=rev Author: mylka Date: 2010-08-19 18:31:11 +0000 (Thu, 19 Aug 2010) Log Message: ----------- [3043080] a prototype tika mime type identifier with a detailed unit test Modified Paths: -------------- aperture-addons/trunk/pom.xml Added Paths: ----------- aperture-addons/trunk/src/main/java/org/apache/ aperture-addons/trunk/src/main/java/org/apache/tika/ aperture-addons/trunk/src/main/java/org/apache/tika/mime/ aperture-addons/trunk/src/main/java/org/apache/tika/mime/MimeTypesEnhancer.java aperture-addons/trunk/src/main/java/org/semanticdesktop/aperture/tika/ aperture-addons/trunk/src/main/java/org/semanticdesktop/aperture/tika/TikaMimeTypeIdentifier.java aperture-addons/trunk/src/main/resources/org/semanticdesktop/aperture/tika/diff-mimetypes.xml aperture-addons/trunk/src/main/resources/org/semanticdesktop/aperture/tika/full-mimetypes.xml aperture-addons/trunk/src/test/java/org/apache/ aperture-addons/trunk/src/test/java/org/apache/tika/ aperture-addons/trunk/src/test/java/org/apache/tika/mime/ aperture-addons/trunk/src/test/java/org/apache/tika/mime/MimeTypesEnhancerTests.java aperture-addons/trunk/src/test/java/org/semanticdesktop/aperture/tika/ aperture-addons/trunk/src/test/java/org/semanticdesktop/aperture/tika/ApertureDocumentsIdentificationTest.java aperture-addons/trunk/src/test/java/org/semanticdesktop/aperture/tika/GetFileNameTest.java aperture-addons/trunk/src/test/resources/ aperture-addons/trunk/src/test/resources/org/ aperture-addons/trunk/src/test/resources/org/apache/ aperture-addons/trunk/src/test/resources/org/apache/tika/ aperture-addons/trunk/src/test/resources/org/apache/tika/mime/ aperture-addons/trunk/src/test/resources/org/apache/tika/mime/mimetypes-newalias.xml aperture-addons/trunk/src/test/resources/org/apache/tika/mime/mimetypes-newmagic.xml aperture-addons/trunk/src/test/resources/org/apache/tika/mime/mimetypes-newmimetype.xml aperture-addons/trunk/src/test/resources/org/apache/tika/mime/mimetypes-newpattern.xml aperture-addons/trunk/src/test/resources/org/apache/tika/mime/mimetypes-newrootxml.xml aperture-addons/trunk/src/test/resources/org/apache/tika/mime/mimetypes-newsuperclass.xml aperture-addons/trunk/src/test/resources/org/apache/tika/mime/mimetypes-replacesuperclass.xml Modified: aperture-addons/trunk/pom.xml =================================================================== --- aperture-addons/trunk/pom.xml 2010-08-19 16:34:11 UTC (rev 2411) +++ aperture-addons/trunk/pom.xml 2010-08-19 18:31:11 UTC (rev 2412) @@ -49,6 +49,21 @@ <version>2.1</version> </dependency> <dependency> + <groupId>org.apache.tika</groupId> + <artifactId>tika-parsers</artifactId> + <version>0.8-SNAPSHOT</version> + <exclusions> + <exclusion> + <artifactId>bcmail-jdk15</artifactId> + <groupId>org.bouncycastle</groupId> + </exclusion> + <exclusion> + <artifactId>bcprov-jdk15</artifactId> + <groupId>org.bouncycastle</groupId> + </exclusion> + </exclusions> + </dependency> + <dependency> <groupId>org.osgi</groupId> <artifactId>osgi_R4_core</artifactId> <version>1.0</version> @@ -170,6 +185,17 @@ <name>Aperture repository</name> <url>http://aperture.sf.net/maven</url> </repository> + <repository> + <releases> + <enabled>true</enabled> + </releases> + <snapshots> + <enabled>true</enabled> + </snapshots> + <id>apache-snapshots</id> + <name>Apache Snapshots Repository</name> + <url>http://repository.apache.org/snapshots</url> + </repository> </repositories> <pluginRepositories> <pluginRepository> Added: aperture-addons/trunk/src/main/java/org/apache/tika/mime/MimeTypesEnhancer.java =================================================================== --- aperture-addons/trunk/src/main/java/org/apache/tika/mime/MimeTypesEnhancer.java (rev 0) +++ aperture-addons/trunk/src/main/java/org/apache/tika/mime/MimeTypesEnhancer.java 2010-08-19 18:31:11 UTC (rev 2412) @@ -0,0 +1,71 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.tika.mime; + +import java.io.InputStream; +import java.io.IOException; +import java.net.URL; + +import org.w3c.dom.Document; + + +public class MimeTypesEnhancer { + + /** + * Enhances the MimeTypes instance with mime type definitions from the + * specified file path, as interpreted by the class loader in getResource(); + * + * @throws IOException if the file can not be accessed + * @throws MimeTypeException if the type configuration is invalid + */ + public static void enhance(MimeTypes mimeTypes, String filePath) + throws IOException, MimeTypeException { + enhance(mimeTypes, MimeTypesReader.class.getResource(filePath)); + } + + /** + * Enhances the MimeTypes instance with mime type definitions from the + * resource at the location specified by the URL. Opens and closes the + * InputStream from the URL. + * + * @throws IOException if the URL can not be accessed + * @throws MimeTypeException if the type configuration is invalid + */ + public static void enhance(MimeTypes mimeTypes, URL url) + throws IOException, MimeTypeException { + InputStream stream = url.openStream(); + try { + enhance(mimeTypes, stream); + } finally { + stream.close(); + } + } + + /** + * Enhances the MimeTypes instance with mime type definitions from the + * specified input stream. Does not close the input stream. + * + * @throws IOException if the stream can not be read + * @throws MimeTypeException if the type configuration is invalid + */ + public static void enhance(MimeTypes mimeTypes, InputStream inputStream) + throws IOException, MimeTypeException { + new MimeTypesReader(mimeTypes).read(inputStream); + } + + +} Property changes on: aperture-addons/trunk/src/main/java/org/apache/tika/mime/MimeTypesEnhancer.java ___________________________________________________________________ Added: svn:mime-type + text/plain Added: aperture-addons/trunk/src/main/java/org/semanticdesktop/aperture/tika/TikaMimeTypeIdentifier.java =================================================================== --- aperture-addons/trunk/src/main/java/org/semanticdesktop/aperture/tika/TikaMimeTypeIdentifier.java (rev 0) +++ aperture-addons/trunk/src/main/java/org/semanticdesktop/aperture/tika/TikaMimeTypeIdentifier.java 2010-08-19 18:31:11 UTC (rev 2412) @@ -0,0 +1,125 @@ +/* + * Copyright (c) 2010 Aduna. + * All rights reserved. + * + * Licensed under the Aperture BSD-style license. + */ +package org.semanticdesktop.aperture.tika; + +import java.io.ByteArrayInputStream; +import java.io.IOException; + +import org.apache.tika.detect.ContainerAwareDetector; +import org.apache.tika.detect.Detector; +import org.apache.tika.metadata.Metadata; +import org.apache.tika.mime.MediaType; +import org.apache.tika.mime.MimeTypes; +import org.apache.tika.mime.MimeTypesEnhancer; +import org.apache.tika.mime.MimeTypesFactory; +import org.ontoware.rdf2go.model.node.URI; +import org.semanticdesktop.aperture.mime.identifier.MimeTypeIdentifier; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class TikaMimeTypeIdentifier implements MimeTypeIdentifier { + + private Logger logger = LoggerFactory.getLogger(getClass()); + + private MimeTypes mimeTypes; + private Detector detector; + private int minLength; + + public TikaMimeTypeIdentifier() { + try { + this.mimeTypes = MimeTypesFactory.create("tika-mimetypes.xml"); + MimeTypesEnhancer.enhance(this.mimeTypes, getClass().getResource("diff-mimetypes.xml")); + this.minLength = mimeTypes.getMinLength(); + this.detector = new ContainerAwareDetector(mimeTypes); + } catch (Exception e) { + logger.error("Couldn't initialize tika MimeTypes",e); + throw new RuntimeException(e); // this will not happen + } + } + + public int getMinArrayLength() { + return minLength; + } + + public String identify(byte[] firstBytes, String fileName, URI uri) { + Metadata metadata = new Metadata(); + String name = getFileName(fileName, uri); + metadata.add(Metadata.RESOURCE_NAME_KEY, name); + try { + MediaType type = detector.detect(new ByteArrayInputStream(firstBytes), metadata); + if (type != null) { + return type.toString(); + } + } catch (IOException e) { + logger.warn("Couldn't determine the mime type",e); + } + return null; + } + + + /** + * Tries to extract the file name from the supplied parameters. + * + * Some sanity assumptions: the filename doesn't contain slashes or backslashes. + * + * @param fileName can be the name of the file, or the path, or an uri. If it is not-null, + * the uri parameter is disregarded. + * @param uri the uri of the file + * @return + */ + public static String getFileName(String fileName, URI uri) { + if (fileName == null && uri == null) { + return null; + } + + String result = fileName; + if (result == null && uri != null) { + result = uri.toString(); + } + + if (!result.contains("!/") && !result.contains("?/")) { + // don't remove the query on a subcrawled uri + // the ?/ occurs in uris produced by some crawlers + // even though it is against the convention + result = removeFragment('?', result); + result = removeFragment('#', result); + } + + if (result.endsWith("/")) { + result = result.substring(0, result.length() - 1); + } + + + if (result != null) { + int lastSlashIndex = result.lastIndexOf('/'); + if (lastSlashIndex < 0) { + lastSlashIndex = result.lastIndexOf('\\'); + } + + if (lastSlashIndex > 0 && lastSlashIndex < result.length() - 1) { + result = result.substring(lastSlashIndex + 1); + } + } + + + return result; + } + + private static String removeFragment(char separatorChar, String input) { + String result = input; + + if (input != null) { + int index = input.indexOf(separatorChar); + if (index >= 0 && index < input.length() - 1) { + return input.substring(0, index); + } + } + + return result; + } + +} Property changes on: aperture-addons/trunk/src/main/java/org/semanticdesktop/aperture/tika/TikaMimeTypeIdentifier.java ___________________________________________________________________ Added: svn:mime-type + text/plain Added: aperture-addons/trunk/src/main/resources/org/semanticdesktop/aperture/tika/diff-mimetypes.xml =================================================================== --- aperture-addons/trunk/src/main/resources/org/semanticdesktop/aperture/tika/diff-mimetypes.xml (rev 0) +++ aperture-addons/trunk/src/main/resources/org/semanticdesktop/aperture/tika/diff-mimetypes.xml 2010-08-19 18:31:11 UTC (rev 2412) @@ -0,0 +1,571 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +/* + * Copyright (c) 2010 Aduna. + * All rights reserved. + * + * Licensed under the Aperture BSD-style license. + */ +--> + +<mime-info> + <mime-type type="application/javascript"> + <!-- both application/javascript and text/javascript are IANA-listed but text/javascript is marked as obsolete --> + <!-- it's still a good alias though --> + <alias type="text/javascript" /> + </mime-type> + <mime-type type="application/mbox"> + <magic priority="50"> + <!-- every mbox-like format is separated by FROM-lines (say I Antoni Mylka) --> + <match value="From " type="string" offset="0"/> + </magic> + </mime-type> + <mime-type type="application/pgp-signature"> + <magic priority="50"> + <!-- noticed this line in .asc file on repo1.maven.org, dunno if this string is standardized somewhere --> + <match value="-----BEGIN PGP SIGNATURE-----" type="string" offset="0"/> + </magic> + </mime-type> + <mime-type type="application/pkcs7-signature"> + <!-- the version without x has been standardized only in January 2010 --> + <!-- http://www.rfc-editor.org/rfc/rfc5751.txt --> + <!-- before, we (Aperture) used this --> + <alias type="application/x-pkcs7-signature"/> + </mime-type> + <mime-type type="application/smil+xml"> + <!-- source: http://www.autopenhosting.org/SMIL/draft-hoschka-smil-media-type-11.html --> + <!-- File extension(s): .smil, .smi, .sml --> + <glob pattern="*.sml"/> + </mime-type> + <mime-type type="application/trix"> + <!-- source: http://www.hpl.hp.com/techreports/2004/HPL-2004-56.html --> + <root-XML localName="feed" namespaceURI="http://www.w3.org/2004/03/trix/trix-1"/> + <glob pattern="*.trix"/> + <sub-class-of type="application/xml"/> + </mime-type> + <mime-type type="application/vnd.adobe.air-application-installer-package+zip"> + <!-- these are zips http://blogs.adobe.com/ashutosh/2009/02/setting_the_correct_mime_type.html --> + <sub-class-of type="application/zip"/> + </mime-type> + <mime-type type="application/vnd.corel-draw"> + <magic priority="50"> + <!-- this is actually incomplete - to be fixed --> + <!-- http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=305236 --> + <match value="CDRA" type="string" offset="8" /> + </magic> + <glob pattern="*.cdr"/> + </mime-type> + <mime-type type="application/vnd.framemaker"> + <magic priority="50"> + <match value="<MakerFile" type="string" offset="0" /> + <match value="<MIFFile" type="string" offset="0" /> + <match value="<MakerDictionary" type="string" offset="0" /> + <match value="<MakerScreenFont" type="string" offset="0" /> + <match value="<MML" type="string" offset="0" /> + <match value="<BookFile" type="string" offset="0" /> + <match value="<Maker" type="string" offset="0" /> + </magic> + <!-- in Aperture there were also the following --> + <!-- i decided not to add them to tika, to be fixed --> + <!-- <glob pattern="*.mif"/> --> + <!-- <glob pattern="*.mf"/> --> + </mime-type> + <mime-type type="application/vnd.lotus-notes"> + <!-- http://www.garykessler.net/library/file_sigs.html --> + <magic priority="50"> + <match value="0x1a0000040000" type="string" offset="0"/> + </magic> + </mime-type> + <mime-type type="application/vnd.ms-cab-compressed"> + <magic priority="50"> + <match value="MSCF" type="string" offset="0" /> + </magic> + </mime-type> + <mime-type type="application/vnd.ms-htmlhelp"> + <alias type="application/x-chm" /> + <magic priority="50"> + <match value="ITSF" type="string" offset="0"/> + </magic> + </mime-type> + <mime-type type="application/vnd.ms-outlookexpress"> + <comment>Microsoft Outlook Express 6 DBX File</comment> + <magic priority="50"> + <match value="0x4a4d463603001000" type="string" offset="0"/> + <match value="0xcfad12fec5fd746f66e3d1119a4e00c0" type="string" offset="0"/> + </magic> + <glob pattern="*.dbx" /> + </mime-type> + <mime-type type="application/vnd.ms-outlook-pst"> + <comment>Microsoft Outlook PST File</comment> + <magic priority="50"> + <match value="0x2142444e" type="string" offset="0"/> + </magic> + <glob pattern="*.pst" /> + </mime-type> + <!-- + works spreadsheets are really weird + those from 3.0 use a Quattro Pro 6 magic number: 00 00 02 00 and extension wks + those from 4.0 use their own magic number: ff 00 02 00 04 04 05 54 02 00 and extension wks + those from 7.0 use the msoffice magic number: d0 cf 11 e0 a1 b1 1a e1 and extension xlr + in tika this is not possible to express + + word processor files all use the msoffice magic number, in versions 3.0, 4.0, 7.0, 2000 + --> + <mime-type type="application/vnd.ms-works"> + <sub-class-of type="application/x-tika-msoffice" /> + <magic priority="50"> + + <match value="0xff000200040405540200" type="string" offset="0" /> + </magic> + <glob pattern="*.wps" /> <!-- word processor documents --> + <glob pattern="*.xlr" /> <!-- newer works spreadsheets --> + <glob pattern="*.wks" /> <!-- older spreadsheets --> + </mime-type> + <mime-type type="application/vnd.ms-wpl"> + <magic priority="50"> + <match value="<?wpl" type="string" offset="0" /> + </magic> + </mime-type> + <mime-type type="application/vnd.ms-xpsdocument"> + <sub-class-of type="application/zip" /> + </mime-type> + <mime-type type="application/vnd.oasis.opendocument.formula"> + <sub-class-of type="application/zip" /> + </mime-type> + <mime-type type="application/vnd.oasis.opendocument.graphics"> + <sub-class-of type="application/zip" /> + </mime-type> + <mime-type type="application/vnd.oasis.opendocument.graphics-template"> + <sub-class-of type="application/zip" /> + </mime-type> + <mime-type type="application/vnd.oasis.opendocument.presentation"> + <sub-class-of type="application/zip" /> + </mime-type> + <mime-type type="application/vnd.oasis.opendocument.presentation-template"> + <sub-class-of type="application/zip" /> + </mime-type> + <mime-type type="application/vnd.oasis.opendocument.spreadsheet"> + <sub-class-of type="application/zip" /> + </mime-type> + <mime-type type="application/vnd.oasis.opendocument.spreadsheet-template"> + <sub-class-of type="application/zip" /> + </mime-type> + <mime-type type="application/vnd.oasis.opendocument.text"> + <sub-class-of type="application/zip" /> + </mime-type> + <mime-type type="application/vnd.oasis.opendocument.text-template"> + <sub-class-of type="application/zip" /> + </mime-type> + <mime-type type="application/vnd.rn-realmedia"> + <magic priority="50"> + <match value="rtsp://" type="string" offset="0" /> + </magic> + </mime-type> + <mime-type type="application/vnd.sun.xml.calc"> + <sub-class-of type="application/zip" /> + </mime-type> + <mime-type type="application/vnd.sun.xml.calc.template"> + <sub-class-of type="application/zip" /> + </mime-type> + <mime-type type="application/vnd.sun.xml.draw"> + <sub-class-of type="application/zip" /> + </mime-type> + <mime-type type="application/vnd.sun.xml.draw.template"> + <sub-class-of type="application/zip" /> + </mime-type> + <mime-type type="application/vnd.sun.xml.impress"> + <sub-class-of type="application/zip" /> + </mime-type> + <mime-type type="application/vnd.sun.xml.impress.template"> + <sub-class-of type="application/zip" /> + </mime-type> + <mime-type type="application/vnd.sun.xml.math"> + <sub-class-of type="application/zip" /> + </mime-type> + <mime-type type="application/vnd.sun.xml.writer"> + <sub-class-of type="application/zip" /> + </mime-type> + <mime-type type="application/vnd.sun.xml.writer.template"> + <sub-class-of type="application/zip" /> + </mime-type> + <mime-type type="application/vnd.wordperfect"> + <magic priority="50"> + <match value="\377\127\120\103" type="string" offset="0" /> + </magic> + <glob pattern="*.wp"/> + <glob pattern="*.wpf"/> + <glob pattern="*.wpt"/> + <glob pattern="*.wpw"/> + <glob pattern="*.wp5"/> + <glob pattern="*.wp51"/> + <glob pattern="*.wp6"/> + <glob pattern="*.w60"/> + <glob pattern="*.w61"/> + </mime-type> + <mime-type type="application/winhlp"> + <magic priority="50"> + <match value="?_" type="string" offset="0" /> + </magic> + </mime-type> + <mime-type type="application/x-7z-compressed"> + <magic priority="50"> + <match value="7z" type="string" offset="0" /> + </magic> + </mime-type> + <mime-type type="application/x-alz"> + <magic priority="50"> + <match value="ALZ" type="string" offset="0"/> + </magic> + <glob pattern="*.alz"/> + </mime-type> + <mime-type type="application/x-applescript"> + <glob pattern="*.scpt"/> + </mime-type> + <mime-type type="application/x-axcrypt"> + <magic priority="50"> + <match value="0xc0b9072e4f93f146a015792ca1d9e8211500000002" type="string" offset="0" /> + </magic> + <glob pattern="*.axx"/> + </mime-type> + <mime-type type="application/x-compress"> + <magic priority="50"> + <magic value="\037\235\220" type="string" offset="0"/> + </magic> + </mime-type> +<!-- in aperture this was covered by the application/presentations file, this doesn't officially exist --> +<!-- I took the idea for application/x-corelpresentations from http://www.file-extensions.org/shw-file-extension --> +<!-- Presentations files either have the MS Office or WordPerfect magic number --> +<!-- in aperture this file had two parents, in tika it's impossible, that's why I put sub-class-of tika-msoffice --> +<!-- there are two limitations: one mime-type can have a single superclass --> +<!-- one glob pattern can appear inside a single mime-type --> +<!-- older presentations file will not be recognized properly --> +<!-- and lower the priority --> + <mime-type type="application/x-corelpresentations"> + <glob pattern="*.shw"/> + <sub-class-of type="application/x-tika-msoffice"/> + </mime-type> + <mime-type type="application/x-freemind"> + <magic priority="50"> + <match value="<map version" type="string" offset="0"/> + </magic> + <glob pattern="*.mm"/> + </mime-type> + <mime-type type="application/x-installshield-compressedfile"> + <magic priority="50"> + <match value="ISc(" type="string" offset="0" /> + </magic> + </mime-type> + <mime-type type="application/x-java-enterprisearchive"> + <glob pattern="*.ear"/> + <sub-class-of type="application/zip"/> + </mime-type> + <mime-type type="application/x-java-manifest"> + <magic priority="50"> + <match value="Manifest-Version:" type="string" offset="0" /> + </magic> + <sub-class-of type="text/plain"/> + </mime-type> + <mime-type type="application/x-java-webarchive"> + <glob pattern="*.war"/> + <sub-class-of type="application/zip"/> + </mime-type> + <mime-type type="application/x-md5"> + <magic priority="50"> + <match value="MD5" type="string" offset="0" /> + </magic> + <glob pattern="*.md5"/> + </mime-type> + <mime-type type="application/x-mozilla-addressbook"> + <!-- this has to be here because name-based detection trumps magic-based one only if --> + <!-- the name-based type is a subtype of the magic-based one --> + <sub-class-of type="text/plain" /> + <glob pattern="*.mab"/> + </mime-type> + + <!-- in Aperture we used this for exe files (for the MZ magic) --> + <!-- in tika there was only the application/x-msdownload file --> +<!-- <mime-type type="application/x-ms-dos-executable">--> +<!-- <magic priority="50">--> +<!-- <match value="MZ" type="string" offset="0"/>--> +<!-- </magic>--> +<!-- <glob pattern="*.exe" />--> +<!-- <sub-class-of type="application/x-msdownload" />--> +<!-- </mime-type>--> + + <mime-type type="application/x-ms-registry"> + <magic priority="50"> + <match value="regf" type="string" offset="0"/> + </magic> + <glob pattern="*.reg" /> + </mime-type> + + <mime-type type="application/x-ms-scr"> + <glob pattern="*.scr" /> + <sub-class-of type="application/x-ms-dos-executable" /> + </mime-type> + + <mime-type type="application/x-ms-shortcut"> + <magic priority="50"> + <match value="0x4c0000000114020000000000c000000000000046" type="string" offset="0"/> + </magic> + <glob pattern="*.lnk" /> + </mime-type> + + <mime-type type="application/x-ms-wm"> + <!-- This MIME type was invented to let the video wmv and audio wma media types + share the magic number. Differentiation between these two files + is only possible based on file name extension. --> + <magic priority="50"> + <match value="0x3026b2758e66cf11a6d900aa0062ce6c" type="string" offset="0"/> + </magic> + <!-- we intended to delete the glob pattern below, but this is impossible without --> + <!-- the modification of the tika-mimetypes files. This has to be clarified --> + <!-- x-ms-wm, x-ms-wma and x-ms-wmv --> + <!-- <glob pattern="*.wm"/>--> + </mime-type> + <mime-type type="application/x-ms-wmd"> + <sub-class-of type="application/zip" /> + </mime-type> + <!-- in aperture x-ms-wmz was a subtype of zip, in Tika of gzip, this has to be clarified --> +<!-- <mime-type type="application/x-ms-wmz">--> +<!-- <sub-class-of type="application/x-gzip"/>--> +<!-- <sub-class-of type="application/zip"/>--> +<!-- <glob pattern="*.wmz"/>--> +<!-- </mime-type>--> +<!-- in Aperture there were separate mime types for exe and bat - this has to be clarified --> +<!--<mime-type type="application/x-msdownload">--> +<!-- <glob pattern="*.exe"/>--> +<!-- <glob pattern="*.dll"/>--> +<!-- <glob pattern="*.com"/>--> +<!-- <glob pattern="*.bat"/>--> +<!-- <glob pattern="*.msi"/>--> +<!-- </mime-type>--> + <mime-type type="application/x-msmetafile"> +<!-- in Aperture this magic was attached to image/emf, but there is officially no such thing as image/emf --> +<!-- that's why we attached this magic here --> + <magic priority="50"> + <match value="0x01000000" type="string" offset="0"/> <!-- for emf --> + <match value="0xd7cdc69a0000" type="string" offset="0"/> <!-- for wmf --> + <match value="0x010009000003" type="string" offset="0"/> <!-- for wmf --> + </magic> + </mime-type> + <!-- MS publisher uses the same magic number as old binary MSOffice files --> + <mime-type type="application/x-mspublisher"> + <sub-class-of type="application/x-tika-msoffice" /> + </mime-type> + <!-- Quattro Pro 7 and higher --> + <!-- uses the same magic number as ms office --> + <mime-type type="application/x-quattropro"> + <glob pattern="*.qpw"/> + <glob pattern="*.wb3"/> + <sub-class-of type="application/x-tika-msoffice" /> + </mime-type> + <mime-type type="application/x-sha"> + <glob pattern="*.sha"/> + <glob pattern="*.sha0"/> + <glob pattern="*.sha1"/> + <glob pattern="*.sha2"/> + <glob pattern="*.sha256"/> + <glob pattern="*.sha512"/> + </mime-type> + <mime-type type="application/x-stuffit"> + <magic priority="50"> + <match value="SIT!" type="string" offset="0"/> + </magic> + </mime-type> +<!-- there is no such thing as vnd.ms-office, we introduced it in Aperture as a supertype for all office formats --> +<!-- it is not IANA-approved though, so what tika did (an x-) is better --> +<!-- <mime-type type="application/x-tika-msoffice">--> +<!-- <alias type="application/vnd.ms-office" />--> +<!-- </mime-type>--> + <mime-type type="application/x-turtle"> + <glob pattern="*.ttl"/> + </mime-type> + <mime-type type="application/x-slk"> + <glob pattern="*.slk"/> + <glob pattern="*.sylk"/> + </mime-type> + <mime-type type="application/x-ustar"> + <magic value="[InternetShortcut]" type="string" offset="0" /> + <glob pattern="*.url"/> + </mime-type> + <!-- Quattro Pro 6 (among others) --> + <!-- in Aperture this was application/wb2, but this file doesn't officially exist --> + <!-- I looked on the net, but couldn't find any such file, that's why I invented x-wb2 --> + <mime-type type="application/x-wb2"> + <magic priority="50"> + <match value="\000\000\002\000" type="string" offset="0" /> + </magic> + <glob pattern="*.wb2"/> + </mime-type> + <mime-type type="application/x-xfig"> + <magic priority="50"> + <match value="#FIG" type="string" offset="0" /> + </magic> + </mime-type> + <mime-type type="application/xspf+xml"> + <sub-class-of type="text/xml" /> + </mime-type> + <mime-type type="audio/midi"> + <magic priority ="20"> + <match type="string" value="MThd" offset="0"/> <!-- regular midi files --> + <match type="string" value="RMI" offset="8"/> <!-- .rmi files --> + </magic> + </mime-type> + <mime-type type="audio/mp4"> + <glob pattern="*.m4a"/> + <glob pattern="*.m4p"/> + </mime-type> + <mime-type type="audio/x-b4s"> + <glob pattern="*.b4s" /> + <sub-class-of type="text/xml" /> + </mime-type> + <mime-type type="audio/x-kapsule"> + <glob pattern="*.p2p" /> + <sub-class-of type="text/xml" /> + </mime-type> + <mime-type type="audio/x-kpl"> + <magic priority="50"> + <match value="[Metadata] artist=" type="string" offset="0" /> + </magic> + <glob pattern="*.kpl"/> + </mime-type> + <mime-type type="audio/x-magma"> + <magic priority="50"> + <match value="#MAGMA" type="string" offset="0" /> + </magic> + <glob pattern="*.magma"/> + </mime-type> + <mime-type type="audio/x-mpegurl"> + <alias type="application/x-winamp-playlist"/> + <magic priority="50"> + <match value="#EXTM3U" type="string" offset="0" /> + </magic> + </mime-type> + <!-- this should be clarified --> +<!-- <mime-type type="audio/x-ms-wma">--> +<!-- <sub-class-of type="application/x-ms-wm" />--> +<!-- </mime-type>--> + <mime-type type="audio/x-scpls"> + <magic priority="50"> + <match value="[playlist]" type="string" offset="0"/> + </magic> +<!-- in tika *.pls is reserved for the application/pls+xml mime type --> +<!-- <glob pattern="*.pls"/> --> + </mime-type> +<!-- in tika *.dng is reserved for image/x-raw-adobe, there is officially no such thing as image/dng--> +<!-- <mime-type type="image/dng">--> +<!-- <glob pattern="*.dng"/>--> +<!-- <sub-class-of type="image/tiff"/>--> +<!-- </mime-type>--> + +<!-- in tika *.emf is covered by application/x-msmetafile, there is officially no such thing as image/emf--> +<!-- <mime-type type="image/emf">--> +<!-- <magic priority="50">--> +<!-- <match value="0x01000000" type="string" offset="0"/>--> +<!-- </magic>--> +<!-- <glob pattern="*.emf"/>--> +<!-- </mime-type>--> + <mime-type type="image/vnd.adobe.photoshop"> + <magic priority="50"> + <match value="8BPS" type="string" offset="0" /> + </magic> + </mime-type> + <!-- this seems wrong - to clarify --> +<!-- <mime-type type="image/vnd.dxf">--> +<!-- <alias type="image/x-dwg"/>--> +<!-- </mime-type>--> +<!-- in tika *.wmf is covered by application/x-msmetafile, there is officially no such thing as image/wmf--> +<!-- <mime-type type="image/wmf">--> +<!-- <magic priority="50">--> +<!-- <match value="0xd7cdc69a0000" type="string" offset="0"/>--> +<!-- <match value="0x010009000003" type="string" offset="0"/>--> +<!-- </magic>--> +<!-- <glob pattern="*.wmf"/>--> +<!-- </mime-type>--> + <mime-type type="image/x-itunes-albumartwork"> + <magic priority="50"> + <match value="itch" type="string" offset="4"/> + </magic> + <glob pattern="*.itc"/> + </mime-type> + <mime-type type="image/x-paintshoppro"> + <magic priority="50"> + <match value="Paint Shop Pro Image File" type="string" offset="0" /> + </magic> + <glob pattern="*.psp"/> + </mime-type> + <mime-type type="image/x-tga"> + <glob pattern="*.tga"/> + </mime-type> + <mime-type type="message/rfc822"> + <!-- this is necessary, otherwise if we stumble upon an .eml file without any the recognized magic headers --> + <!-- the magic-based identification will detect text/plain, the name-based will detect message/rfc822, but --> + <!-- the identifier only choses name-based over magic-based type if the former is a specialization of the latter --> + <sub-class-of type="text/plain" /> + </mime-type> + <mime-type type="model/vnd.dwf"> + <alias type="image/x-dwf"/> <!-- Aperture --> + <magic priority="50"> + <match value="(DWF" type="string" offset="0"/> + </magic> + </mime-type> + <mime-type type="text/calendar"> + <magic priority="50"> + <match value="BEGIN:VCALENDAR" type="string" offset="0"/> + </magic> + </mime-type> +<!-- in tika this is covered by application/javascript, both are IANA-listed but text/javascript is marked as obsolete--> +<!-- <mime-type type="text/javascript">--> +<!-- <glob pattern="*.js"/>--> +<!-- </mime-type>--> + <mime-type type="text/rdf+n3"> + <glob pattern="*.n3"/> + <sub-class-of type="text/plain"/> + </mime-type> + <mime-type type="text/x-vcalendar"> + <magic priority="50"> + <match value="BEGIN:VCALENDAR" type="string" offset="0"/> + </magic> + </mime-type> + <mime-type type="text/x-vcard"> + <magic priority="50"> + <match value="BEGIN:VCARD" type="string" offset="0"/> + </magic> + <glob pattern="*.vcard"/> + </mime-type> + <mime-type type="video/mp4"> + <glob pattern="*.divx"/> + <glob pattern="*.xvid"/> + <glob pattern="*.264"/> + </mime-type> + <mime-type type="video/mpeg"> + <magic priority="50"> + <match value="\000\000\001\272" type="string" offset="0"/> + </magic> + </mime-type> + <mime-type type="video/x-ms-asf"> + <magic priority="50"> + <match value="0x3026b2758e66cf11a6d900aa0062ce6c" type="string" offset="0"/> + </magic> + </mime-type> + <!-- this is included in x-ms-asf but should be separate (different magics) --> + <!-- this should be clarified --> +<!-- <mime-type type="video/x-ms-asx">--> +<!-- <magic priority="50">--> +<!-- <match value="<asx" type="string" offset="0"/>--> +<!-- <match value="<ASX" type="string" offset="0"/>--> +<!-- </magic>--> +<!-- <glob pattern="*.asx"/> --> +<!-- </mime-type>--> +<!-- in tika *.wax is covered by audio/x-ms-wax - to be clarified--> +<!-- <mime-type type="video/x-ms-wax">--> +<!-- <glob pattern="*.wax"/>--> +<!-- </mime-type>--> +<!-- this should be clarified together with application/x-ms-wm--> +<!-- <mime-type type="video/x-ms-wmv">--> +<!-- <glob pattern="*.wmv"/>--> +<!-- <glob pattern="*.wm"/>--> +<!-- <sub-class-of type="application/x-ms-wm" />--> +<!-- </mime-type>--> +</mime-info> Property changes on: aperture-addons/trunk/src/main/resources/org/semanticdesktop/aperture/tika/diff-mimetypes.xml ___________________________________________________________________ Added: svn:mime-type + text/plain Added: aperture-addons/trunk/src/main/resources/org/semanticdesktop/aperture/tika/full-mimetypes.xml =================================================================== --- aperture-addons/trunk/src/main/resources/org/semanticdesktop/aperture/tika/full-mimetypes.xml (rev 0) +++ aperture-addons/trunk/src/main/resources/org/semanticdesktop/aperture/tika/full-mimetypes.xml 2010-08-19 18:31:11 UTC (rev 2412) @@ -0,0 +1,4470 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +/* + * Copyright (c) 2010 Aduna. + * All rights reserved. + * + * Licensed under the Aperture BSD-style license. + */ +--> +<mime-info> + + <mime-type type="application/activemessage"/> + <mime-type type="application/andrew-inset"> + <glob pattern="*.ez"/> + </mime-type> + <mime-type type="application/applefile"/> + <mime-type type="application/applixware"> + <glob pattern="*.aw"/> + </mime-type> + + <mime-type type="application/atom+xml"> + <root-XML localName="feed" namespaceURI="http://purl.org/atom/ns#"/> + <glob pattern="*.atom"/> + </mime-type> + + <mime-type type="application/atomcat+xml"> + <glob pattern="*.atomcat"/> + </mime-type> + <mime-type type="application/atomicmail"/> + <mime-type type="application/atomsvc+xml"> + <glob pattern="*.atomsvc"/> + </mime-type> + <mime-type type="application/auth-policy+xml"/> + + <mime-type type="application/bat"> + <glob pattern="*.bat" /> + </mime-type> + + <mime-type type="application/batch-smtp"/> + <mime-type type="application/beep+xml"/> + <mime-type type="application/cals-1840"/> + <mime-type type="application/ccxml+xml"> + <glob pattern="*.ccxml"/> + </mime-type> + <mime-type type="application/cea-2018+xml"/> + <mime-type type="application/cellml+xml"/> + <mime-type type="application/cnrp+xml"/> + <mime-type type="application/commonground"/> + <mime-type type="application/conference-info+xml"/> + <mime-type type="application/cpl+xml"/> + <mime-type type="application/csta+xml"/> + <mime-type type="application/cstadata+xml"/> + <mime-type type="application/cu-seeme"> + <glob pattern="*.cu"/> + </mime-type> + <mime-type type="application/cybercash"/> + <mime-type type="application/davmount+xml"> + <glob pattern="*.davmount"/> + </mime-type> + <mime-type type="application/dca-rft"/> + <mime-type type="application/dec-dx"/> + <mime-type type="application/dialog-info+xml"/> + <mime-type type="application/dicom"/> + <mime-type type="application/dns"/> + <mime-type type="application/dvcs"/> + <mime-type type="application/ecmascript"> + <glob pattern="*.ecma"/> + </mime-type> + <mime-type type="application/edi-consent"/> + <mime-type type="application/edi-x12"/> + <mime-type type="application/edifact"/> + <mime-type type="application/emma+xml"> + <glob pattern="*.emma"/> + </mime-type> + <mime-type type="application/epp+xml"/> + + <mime-type type="application/epub+zip"> + <acronym>EPUB</acronym> + <comment>Electronic Publication</comment> + <magic priority="50"> + <match value="PK\003\004" type="string" offset="0"> + <match value="mimetypeapplication/epub+zip" type="string" offset="30"/> + </match> + </magic> + <glob pattern="*.epub"/> + </mime-type> + + <mime-type type="application/eshop"/> + <mime-type type="application/example"/> + <mime-type type="application/fastinfoset"/> + <mime-type type="application/fastsoap"/> + <mime-type type="application/fits"/> + <mime-type type="application/font-tdpfr"> + <glob pattern="*.pfr"/> + </mime-type> + <mime-type type="application/h224"/> + <mime-type type="application/http"/> + <mime-type type="application/hyperstudio"> + <glob pattern="*.stk"/> + </mime-type> + <mime-type type="application/ibe-key-request+xml"/> + <mime-type type="application/ibe-pkg-reply+xml"/> + <mime-type type="application/ibe-pp-data"/> + <mime-type type="application/iges"/> + <mime-type type="application/im-iscomposing+xml"/> + <mime-type type="application/index"/> + <mime-type type="application/index.cmd"/> + <mime-type type="application/index.obj"/> + <mime-type type="application/index.response"/> + <mime-type type="application/index.vnd"/> + <mime-type type="application/iotp"/> + <mime-type type="application/ipp"/> + <mime-type type="application/isup"/> + + <mime-type type="application/java-archive"> + <sub-class-of type="application/zip"/> + <glob pattern="*.jar"/> + </mime-type> + + <mime-type type="application/java-serialized-object"> + <glob pattern="*.ser"/> + </mime-type> + + <mime-type type="application/javascript"> + <sub-class-of type="text/plain"/> + <glob pattern="*.js"/> + </mime-type> + + <mime-type type="application/json"> + <sub-class-of type="application/javascript"/> + <glob pattern="*.json"/> + </mime-type> + + <mime-type type="application/java-vm"> + <magic priority="40"> + <match value="0xcafebabe" type="string" offset="0" /> + </magic> + <glob pattern="*.class"/> + </mime-type> + + <mime-type type="application/kpml-request+xml"/> + <mime-type type="application/kpml-response+xml"/> + <mime-type type="application/lost+xml"> + <glob pattern="*.lostxml"/> + </mime-type> + + <mime-type type="application/mac-binhex40"> + <alias type="application/mac-binhex"/> + <alias type="application/binhex"/> + <magic priority="50"> + <match value="must\ be\ converted\ with\ BinHex" type="string" offset="11"/> + </magic> + <glob pattern="*.hqx"/> + </mime-type> + + <mime-type type="application/mac-compactpro"> + <glob pattern="*.cpt"/> + </mime-type> + + <mime-type type="application/macwriteii"/> + <mime-type type="application/marc"> + <glob pattern="*.mrc"/> + </mime-type> + <mime-type type="application/mathematica"> + <glob pattern="*.ma"/> + <glob pattern="*.nb"/> + <glob pattern="*.mb"/> + </mime-type> + <mime-type type="application/mathml+xml"> + <glob pattern="*.mathml"/> + </mime-type> + <mime-type type="application/mbms-associated-procedure-description+xml"/> + <mime-type type="application/mbms-deregister+xml"/> + <mime-type type="application/mbms-envelope+xml"/> + <mime-type type="application/mbms-msk+xml"/> + <mime-type type="application/mbms-msk-response+xml"/> + <mime-type type="application/mbms-protection-description+xml"/> + <mime-type type="application/mbms-reception-report+xml"/> + <mime-type type="application/mbms-register+xml"/> + <mime-type type="application/mbms-register-response+xml"/> + <mime-type type="application/mbms-user-service-description+xml"/> + <mime-type type="application/mbox"> + <sub-class-of type="text/plain"/> + <magic priority="50"> + <match value="From " type="string" offset="0"/> + </magic> + <glob pattern="*.mbox"/> + </mime-type> + <mime-type type="application/media_control+xml"/> + <mime-type type="application/mediaservercontrol+xml"> + <glob pattern="*.mscml"/> + </mime-type> + <mime-type type="application/mikey"/> + <mime-type type="application/moss-keys"/> + <mime-type type="application/moss-signature"/> + <mime-type type="application/mosskey-data"/> + <mime-type type="application/mosskey-request"/> + <mime-type type="application/mp4"> + <glob pattern="*.mp4s"/> + </mime-type> + <mime-type type="application/mpeg4-generic"/> + <mime-type type="application/mpeg4-iod"/> + <mime-type type="application/mpeg4-iod-xmt"/> + + <!-- http://www.iana.org/assignments/media-types/application/msword --> + <mime-type type="application/msword"> + <!-- Use org.apache.tika.detect.ContainerAwareDetector for more reliable detection of OLE2 documents --> + <alias type="application/vnd.ms-word"/> + <comment>Microsoft Word Document</comment> + <magic priority="50"> + <match value="Microsoft\ Word\ 6.0\ Document" type="string" offset="2080"/> + <match value="Documento\ Microsoft\ Word\ 6" type="string" offset="2080"/> + <match value="MSWordDoc" type="string" offset="2112"/> + <match value="0x31be0000" type="big32" offset="0"/> + <match value="PO^Q`" type="string" offset="0"/> + <match value="\376\067\0\043" type="string" offset="0"/> + <match value="\333\245-\0\0\0" type="string" offset="0"/> + <match value="\354\245\301" type="string" offset="512"/> + <match value="\320\317\021\340\241\261\032\341" type="string" offset="0"/> + <match value="\224\246\056" type="string" offset="0"/> + <match value="0xd0cf11e0a1b11ae1" type="string" offset="0:8"> + <match value="W\x00o\x00r\x00d\x00D\x00o\x00c\x00u\x00m\x00e\x00n\x00t" type="string" offset="1152:4096" /> + </match> + </magic> + <glob pattern="*.doc"/> + <glob pattern="*.dot"/> + <sub-class-of type="application/x-tika-msoffice"/> + </mime-type> + + <mime-type type="application/mxf"> + <glob pattern="*.mxf"/> + </mime-type> + <mime-type type="application/nasdata"/> + <mime-type type="application/news-checkgroups"/> + <mime-type type="application/news-groupinfo"/> + <mime-type type="application/news-transmission"/> + <mime-type type="application/nss"/> + <mime-type type="application/ocsp-request"/> + <mime-type type="application/ocsp-response"/> + + <mime-type type="application/octet-stream"> + <magic priority="50"> + <match value="#\ This\ is\ a\ shell\ archive" type="string" offset="10"/> + <match value="\037\036" type="string" offset="0"/> + <match value="017437" type="host16" offset="0"/> + <match value="0x1fff" type="host16" offset="0"/> + <match value="\377\037" type="string" offset="0"/> + <match value="0145405" type="host16" offset="0"/> + </magic> + <glob pattern="*.bin"/> + <glob pattern="*.dms"/> + <glob pattern="*.lha"/> + <glob pattern="*.lrf"/> + <glob pattern="*.lzh"/> + <glob pattern="*.so"/> + <glob pattern="*.iso"/> + <glob pattern="*.dmg"/> + <glob pattern="*.dist"/> + <glob pattern="*.distz"/> + <glob pattern="*.pkg"/> + <glob pattern="*.bpk"/> + <glob pattern="*.dump"/> + <glob pattern="*.elc"/> + <glob pattern="*.deploy"/> + </mime-type> + + <mime-type type="application/oda"> + <glob pattern="*.oda"/> + </mime-type> + <mime-type type="application/oebps-package+xml"> + <glob pattern="*.opf"/> + </mime-type> + + <mime-type type="application/ogg"> + <alias type="application/x-ogg"/> + <magic priority="50"> + <match value="OggS" type="string" offset="0"/> + </magic> + <glob pattern="*.ogx"/> + </mime-type> + + <mime-type type="application/onenote"> + <glob pattern="*.onetoc"/> + <glob pattern="*.onetoc2"/> + <glob pattern="*.onetmp"/> + <glob pattern="*.onepkg"/> + </mime-type> + <mime-type type="application/parityfec"/> + <mime-type type="application/patch-ops-error+xml"> + <glob pattern="*.xer"/> + </mime-type> + + <mime-type type="application/pdf"> + <alias type="application/x-pdf"/> + <acronym>PDF</acronym> + <comment>Portable Document Format</comment> + <magic priority="50"> + <match value="%PDF-" type="string" offset="0"/> + </magic> + <glob pattern="*.pdf"/> + </mime-type> + + <mime-type type="application/pgp-encrypted"> + <glob pattern="*.pgp"/> + </mime-type> + <mime-type type="application/pgp-keys"/> + <mime-type type="application/pgp-signature"> + <magic priority="50"> + <match value="-----BEGIN PGP SIGNATURE-----" type="string" offset="0"/> + </magic> + <glob pattern="*.asc"/> + <glob pattern="*.sig"/> + </mime-type> + <mime-type type="application/pics-rules"> + <glob pattern="*.prf"/> + </mime-type> + <mime-type type="application/pidf+xml"/> + <mime-type type="application/pidf-diff+xml"/> + <mime-type type="application/pkcs10"> + <glob pattern="*.p10"/> + </mime-type> + <mime-type type="application/pkcs7-mime"> + <glob pattern="*.p7m"/> + <glob pattern="*.p7c"/> + </mime-type> + <mime-type type="application/pkcs7-signature"> + <alias type="application/x-pkcs7-signature"/> + <glob pattern="*.p7s"/> + </mime-type> + <mime-type type="application/pkix-cert"> + <glob pattern="*.cer"/> + </mime-type> + <mime-type type="application/pkix-crl"> + <glob pattern="*.crl"/> + </mime-type> + <mime-type type="application/pkix-pkipath"> + <glob pattern="*.pkipath"/> + </mime-type> + <mime-type type="application/pkixcmp"> + <glob pattern="*.pki"/> + </mime-type> + <mime-type type="application/pls+xml"> + <glob pattern="*.pls"/> + </mime-type> + <mime-type type="application/poc-settings+xml"/> + + <mime-type type="application/postscript"> + <comment>PostScript</comment> + <magic priority="50"> + <match value="%!" type="string" offset="0" /> + <match value="\004%!" type="string" offset="0" /> + <!-- Windows format EPS --> + <match value="0xc5d0d3c6" type="string" offset="0"/> + </magic> + <glob pattern="*.ai"/> + <glob pattern="*.ps"/> + <glob pattern="*.eps"/> + <glob pattern="*.epsf"/> + <glob pattern="*.epsi"/> + </mime-type> + + <mime-type type="application/prs.alvestrand.titrax-sheet"/> + <mime-type type="application/prs.cww"> + <glob pattern="*.cww"/> + </mime-type> + <mime-type type="application/prs.nprend"/> + <mime-type type="application/prs.plucker"/> + <mime-type type="application/qsig"/> + + <mime-type type="application/rdf+xml"> + <root-XML localName="RDF"/> + <root-XML localName="RDF" namespaceURI="http://www.w3.org/1999/02/22-rdf-syntax-ns#"/> + <sub-class-of type="application/xml"/> + <acronym>RDF/XML</acronym> + <comment>XML syntax for RDF graphs</comment> + <glob pattern="*.rdf"/> + <glob pattern="*.owl"/> + <glob pattern="^rdf$" isregex="true"/> + <glob pattern="^owl$" isregex="true"/> + </mime-type> + + <mime-type type="application/reginfo+xml"> + <glob pattern="*.rif"/> + </mime-type> + <mime-type type="application/relax-ng-compact-syntax"> + <sub-class-of type="text/plain"/> + <glob pattern="*.rnc"/> + </mime-type> + <mime-type type="application/remote-printing"/> + <mime-type type="application/resource-lists+xml"> + <glob pattern="*.rl"/> + </mime-type> + <mime-type type="application/resource-lists-diff+xml"> + <glob pattern="*.rld"/> + </mime-type> + <mime-type type="application/riscos"/> + <mime-type type="application/rlmi+xml"/> + <mime-type type="application/rls-services+xml"> + <glob pattern="*.rs"/> + </mime-type> + <mime-type type="application/rsd+xml"> + <glob pattern="*.rsd"/> + </mime-type> + + <mime-type type="application/rss+xml"> + <alias type="text/rss"/> + <root-XML localName="rss"/> + <root-XML namespaceURI="http://purl.org/rss/1.0/"/> + <glob pattern="*.rss"/> + </mime-type> + + <mime-type type="application/rtf"> + <alias type="text/rtf"/> + <magic priority="50"> + <match value="{\\rtf" type="string" offset="0"/> + </magic> + <glob pattern="*.rtf"/> + <sub-class-of type="text/plain"/> + </mime-type> + + <mime-type type="application/rtx"/> + <mime-type type="application/samlassertion+xml"/> + <mime-type type="application/samlmetadata+xml"/> + <mime-type type="application/sbml+xml"> + <glob pattern="*.sbml"/> + </mime-type> + <mime-type type="application/scvp-cv-request"> + <glob pattern="*.scq"/> + </mime-type> + <mime-type type="application/scvp-cv-response"> + <glob pattern="*.scs"/> + </mime-type> + <mime-type type="application/scvp-vp-request"> + <glob pattern="*.spq"/> + </mime-type> + <mime-type type="application/scvp-vp-response"> + <glob pattern="*.spp"/> + </mime-type> + <mime-type type="application/sdp"> + <glob pattern="*.sdp"/> + </mime-type> + <mime-type type="application/set-payment"/> + <mime-type type="application/set-payment-initiation"> + <glob pattern="*.setpay"/> + </mime-type> + <mime-type type="application/set-registration"/> + <mime-type type="application/set-registration-initiation"> + <glob pattern="*.setreg"/> + </mime-type> + <mime-type type="application/sgml"/> + <mime-type type="application/sgml-open-catalog"/> + <mime-type type="application/shf+xml"> + <glob pattern="*.shf"/> + </mime-type> + <mime-type type="application/sieve"/> + <mime-type type="application/simple-filter+xml"/> + <mime-type type="application/simple-message-summary"/> + <mime-type type="application/simplesymbolcontainer"/> + <mime-type type="application/slate"/> + <mime-type type="application/smil"> + <glob pattern="*.smi"/> + <glob pattern="*.smil" /> + </mime-type> + <mime-type type="application/smil+xml"> + <glob pattern="*.smi"/> + <glob pattern="*.smil"/> + </mime-type> + <mime-type type="application/soap+fastinfoset"/> + <mime-type type="application/soap+xml"/> + <mime-type type="application/sparql-query"> + <glob pattern="*.rq"/> + </mime-type> + <mime-type type="application/sparql-results+xml"> + <glob pattern="*.srx"/> + </mime-type> + <mime-type type="application/spirits-event+xml"/> + <mime-type type="application/srgs"> + <glob pattern="*.gram"/> + </mime-type> + <mime-type type="application/srgs+xml"> + <glob pattern="*.grxml"/> + </mime-type> + <mime-type type="application/ssml+xml"> + <glob pattern="*.ssml"/> + </mime-type> + <mime-type type="application/timestamp-query"/> + <mime-type type="application/timestamp-reply"/> + + <mime-type type="application/trix"> + <root-XML localName="feed" namespaceURI="http://www.w3.org/2004/03/trix/trix-1"/> + <glob pattern="*.trix"/> + <sub-class-of type="application/xml"/> + </mime-type> + + <mime-type type="application/tve-trigger"/> + <mime-type type="application/ulpfec"/> + <mime-type type="application/vemmi"/> + <mime-type type="application/vividence.scriptfile"/> + <mime-type type="application/vnd.3gpp.bsf+xml"/> + <mime-type type="application/vnd.3gpp.pic-bw-large"> + <glob pattern="*.plb"/> + </mime-type> + <mime-type type="application/vnd.3gpp.pic-bw-small"> + <glob pattern="*.psb"/> + </mime-type> + <mime-type type="application/vnd.3gpp.pic-bw-var"> + <glob pattern="*.pvb"/> + </mime-type> + <mime-type type="application/vnd.3gpp.sms"/> + <mime-type type="application/vnd.3gpp2.bcmcsinfo+xml"/> + <mime-type type="application/vnd.3gpp2.sms"/> + <mime-type type="application/vnd.3gpp2.tcap"> + <glob pattern="*.tcap"/> + </mime-type> + <mime-type type="application/vnd.3m.post-it-notes"> + <glob pattern="*.pwn"/> + </mime-type> + <mime-type type="application/vnd.accpac.simply.aso"> + <glob pattern="*.aso"/> + </mime-type> + <mime-type type="application/vnd.accpac.simply.imp"> + <glob pattern="*.imp"/> + </mime-type> + <mime-type type="application/vnd.acucobol"> + <glob pattern="*.acu"/> + </mime-type> + <mime-type type="application/vnd.acucorp"> + <glob pattern="*.atc"/> + <glob pattern="*.acutc"/> + </mime-type> + <mime-type type="application/vnd.adobe.air-application-installer-package+zip"> + <glob pattern="*.air"/> + <sub-class-of type="application/zip"/> + </mime-type> + <mime-type type="application/vnd.adobe.xdp+xml"> + <glob pattern="*.xdp"/> + </mime-type> + <mime-type type="application/vnd.adobe.xfdf"> + <glob pattern="*.xfdf"/> + </mime-type> + <mime-type type="application/vnd.aether.imp"/> + <mime-type type="application/vnd.airzip.filesecure.azf"> + <glob pattern="*.azf"/> + </mime-type> + <mime-type type="application/vnd.airzip.filesecure.azs"> + <glob pattern="*.azs"/> + </mime-type> + <mime-type type="application/vnd.amazon.ebook"> + <glob pattern="*.azw"/> + </mime-type> + <mime-type type="application/vnd.americandynamics.acc"> + <glob pattern="*.acc"/> + </mime-type> + <mime-type type="application/vnd.amiga.ami"> + <glob pattern="*.ami"/> + </mime-type> + <mime-type type="application/vnd.android.package-archive"> + <glob pattern="*.apk"/> + </mime-type> + <mime-type type="application/vnd.anser-web-certificate-issue-initiation"> + <glob pattern="*.cii"/> + </mime-type> + <mime-type type="application/vnd.anser-web-funds-transfer-initiation"> + <glob pattern="*.fti"/> + </mime-type> + <mime-type type="application/vnd.antix.game-component"> + <glob pattern="*.atx"/> + </mime-type> + <mime-type type="application/vnd.apple.installer+xml"> + <glob pattern="*.mpkg"/> + </mime-type> + <mime-type type="application/vnd.apple.iwork"> + <sub-class-of type="application/zip"/> + <magic priority="40"> + <match value="0x504b0304140000000000" type="string" offset="0"/> + </magic> + <glob pattern="*.key"/> + <glob pattern="*.pages"/> + <glob pattern="*.numbers"/> + </mime-type> + <mime-type type="application/vnd.apple.keynote"> + <root-XML localName="presentation" namespaceURI="http://developer.apple.com/namespaces/keynote2" /> + </mime-type> + <mime-type type="application/vnd.apple.pages"> + <root-XML localName="document" namespaceURI="http://developer.apple.com/namespaces/sl" /> + </mime-type> + <mime-type type="application/vnd.apple.numbers"> + <root-XML localName="document" namespaceURI="http://developer.apple.com/namespaces/ls" /> + </mime-type> + <mime-type type="application/vnd.arastra.swi"> + <glob pattern="*.swi"/> + </mime-type> + <mime-type type="application/vnd.audiograph"> + <glob pattern="*.aep"/> + </mime-type> + <mime-type type="application/vnd.autopackage"/> + <mime-type type="application/vnd.avistar+xml"/> + <mime-type type="application/vnd.blueice.multipass"> + <glob pattern="*.mpm"/> + </mime-type> + <mime-type type="application/vnd.bluetooth.ep.oob"/> + <mime-type type="application/vnd.bmi"> + <glob pattern="*.bmi"/> + </mime-type> + <mime-type type="application/vnd.businessobjects"> + <glob pattern="*.rep"/> + </mime-type> + <mime-type type="application/vnd.cab-jscript"/> + <mime-type type="application/vnd.canon-cpdl"/> + <mime-type type="application/vnd.canon-lips"/> + <mime-type type="application/vnd.cendio.thinlinc.clientconf"/> + <mime-type type="application/vnd.chemdraw+xml"> + <glob pattern="*.cdxml"/> + </mime-type> + <mime-type type="application/vnd.chipnuts.karaoke-mmd"> + <glob pattern="*.mmd"/> + </mime-type> + <mime-type type="application/vnd.cinderella"> + <glob pattern="*.cdy"/> + </mime-type> + <mime-type type="application/vnd.cirpack.isdn-ext"/> + <mime-type type="application/vnd.claymore"> + <glob pattern="*.cla"/> + </mime-type> + <mime-type type="application/vnd.clonk.c4group"> + <glob pattern="*.c4g"/> + <glob pattern="*.c4d"/> + <glob pattern="*.c4f"/> + <glob pattern="*.c4p"/> + <glob pattern="*.c4u"/> + </mime-type> + <mime-type type="application/vnd.commerce-battelle"/> + <mime-type type="application/vnd.commonspace"> + <glob pattern="*.csp"/> + </mime-type> + <mime-type type="application/vnd.contact.cmsg"> + <glob pattern="*.cdbcmsg"/> + </mime-type> + <mime-type type="application/vnd.corel-draw"> + <magic priority="50"> + <match value="CDRA" type="string" offset="8" /> + </magic> + <glob pattern="*.cdr"/> + </mime-type> + <mime-type type="application/vnd.cosmocaller"> + <glob pattern="*.cmc"/> + </mime-type> + <mime-type type="application/vnd.crick.clicker"> + <glob pattern="*.clkx"/> + </mime-type> + <mime-type type="application/vnd.crick.clicker.keyboard"> + <glob pattern="*.clkk"/> + </mime-type> + <mime-type type="application/vnd.crick.clicker.palette"> + <glob pattern="*.clkp"/> + </mime-type> + <mime-type type="application/vnd.crick.clicker.template"> + <glob pattern="*.clkt"/> + </mime-type> + <mime-type type="application/vnd.crick.clicker.wordbank"> + <glob pattern="*.clkw"/> + </mime-type> + <mime-type type="application/vnd.criticaltools.wbs+xml"> + <glob pattern="*.wbs"/> + </mime-type> + <mime-type type="application/vnd.ctc-posml"> + <glob pattern="*.pml"/> + </mime-type> + <mime-type type="application/vnd.ctct.ws+xml"/> + <mime-type type="application/vnd.cups-pdf"/> + <mime-type type="application/vnd.cups-postscript"/> + <mime-type type="application/vnd.cups-ppd"> + <glob pattern="*.ppd"/> + </mime-type> + <mime-type type="application/vnd.cups-raster"/> + <mime-type type="application/vnd.cups-raw"/> + <mime-type type="application/vnd.curl.car"> + <glob pattern="*.car"/> + </mime-type> + <mime-type type="application/vnd.curl.pcurl"> + <glob pattern="*.pcurl"/> + </mime-type> + <mime-type type="application/vnd.cybank"/> + <mime-type type="application/vnd.data-vision.rdz"> + <glob pattern="*.rdz"/> + </mime-type> + <mime-type type="application/vnd.denovo.fcselayout-link"> + <glob pattern="*.fe_launch"/> + </mime-type> + <mime-type type="application/vnd.dir-bi.plate-dl-nosuffix"/> + <mime-type type="application/vnd.dna"> + <glob pattern="*.dna"/> + </mime-type> + <mime-type type="application/vnd.dolby.mlp"> + <glob pattern="*.mlp"/> + </mime-type> + <mime-type type="application/vnd.dolby.mobile.1"/> + <mime-type type="application/vnd.dolby.mobile.2"/> + <mime-type type="application/vnd.dpgraph"> + <glob pattern="*.dpg"/> + </mime-type> + <mime-type type="application/vnd.dreamfactory"> + <glob pattern="*.dfac"/> + </mime-type> + <mime-type type="application/vnd.dvb.esgcontainer"/> + <mime-type type="application/vnd.dvb.ipdcdftnotifaccess"/> + <mime-type type="application/vnd.dvb.ipdcesgaccess"/> + <mime-type ty... [truncated message content] |