exo-jcr SVN: r3056 - in core/branches/2.3.x: exo.core.component.database and 10 other directories.
by do-not-reply@jboss.org
Author: aheritier
Date: 2010-09-05 19:11:47 -0400 (Sun, 05 Sep 2010)
New Revision: 3056
Modified:
core/branches/2.3.x/
core/branches/2.3.x/exo.core.component.database/
core/branches/2.3.x/exo.core.component.document/
core/branches/2.3.x/exo.core.component.ldap/
core/branches/2.3.x/exo.core.component.organization.api/
core/branches/2.3.x/exo.core.component.organization.jdbc/
core/branches/2.3.x/exo.core.component.organization.ldap/
core/branches/2.3.x/exo.core.component.script.groovy/
core/branches/2.3.x/exo.core.component.security.core/
core/branches/2.3.x/exo.core.component.web.css/
core/branches/2.3.x/exo.core.component.xml-processing/
core/branches/2.3.x/packaging/module/
Log:
Add/Update svn:ignore property to not commit IDEs/Maven generated files and directories
Property changes on: core/branches/2.3.x
___________________________________________________________________
Name: svn:ignore
+ .settings
.project
.classpath
.idea
*.iml
*.ipr
*.iws
temp
bin
target
Property changes on: core/branches/2.3.x/exo.core.component.database
___________________________________________________________________
Name: svn:ignore
+ .settings
.project
.classpath
.idea
*.iml
*.ipr
*.iws
temp
bin
target
Property changes on: core/branches/2.3.x/exo.core.component.document
___________________________________________________________________
Name: svn:ignore
+ .settings
.project
.classpath
.idea
*.iml
*.ipr
*.iws
temp
bin
target
Property changes on: core/branches/2.3.x/exo.core.component.ldap
___________________________________________________________________
Name: svn:ignore
+ .settings
.project
.classpath
.idea
*.iml
*.ipr
*.iws
temp
bin
target
Property changes on: core/branches/2.3.x/exo.core.component.organization.api
___________________________________________________________________
Name: svn:ignore
+ .settings
.project
.classpath
.idea
*.iml
*.ipr
*.iws
temp
bin
target
Property changes on: core/branches/2.3.x/exo.core.component.organization.jdbc
___________________________________________________________________
Name: svn:ignore
+ .settings
.project
.classpath
.idea
*.iml
*.ipr
*.iws
temp
bin
target
Property changes on: core/branches/2.3.x/exo.core.component.organization.ldap
___________________________________________________________________
Name: svn:ignore
+ .settings
.project
.classpath
.idea
*.iml
*.ipr
*.iws
temp
bin
target
Property changes on: core/branches/2.3.x/exo.core.component.script.groovy
___________________________________________________________________
Name: svn:ignore
+ .settings
.project
.classpath
.idea
*.iml
*.ipr
*.iws
temp
bin
target
Property changes on: core/branches/2.3.x/exo.core.component.security.core
___________________________________________________________________
Name: svn:ignore
+ .settings
.project
.classpath
.idea
*.iml
*.ipr
*.iws
temp
bin
target
Property changes on: core/branches/2.3.x/exo.core.component.web.css
___________________________________________________________________
Name: svn:ignore
+ .settings
.project
.classpath
.idea
*.iml
*.ipr
*.iws
temp
bin
target
Property changes on: core/branches/2.3.x/exo.core.component.xml-processing
___________________________________________________________________
Name: svn:ignore
+ .settings
.project
.classpath
.idea
*.iml
*.ipr
*.iws
temp
bin
target
Property changes on: core/branches/2.3.x/packaging/module
___________________________________________________________________
Name: svn:ignore
- target
+ .settings
.project
.classpath
.idea
*.iml
*.ipr
*.iws
temp
bin
target
13 years, 8 months
exo-jcr SVN: r3055 - in kernel/branches/2.2.x: exo.kernel.commons and 12 other directories.
by do-not-reply@jboss.org
Author: aheritier
Date: 2010-09-05 19:11:16 -0400 (Sun, 05 Sep 2010)
New Revision: 3055
Modified:
kernel/branches/2.2.x/
kernel/branches/2.2.x/exo.kernel.commons/
kernel/branches/2.2.x/exo.kernel.component.cache/
kernel/branches/2.2.x/exo.kernel.component.command/
kernel/branches/2.2.x/exo.kernel.component.common/
kernel/branches/2.2.x/exo.kernel.component.ext.cache.impl.jboss.v3/
kernel/branches/2.2.x/exo.kernel.component.remote/
kernel/branches/2.2.x/exo.kernel.container/
kernel/branches/2.2.x/exo.kernel.mc-integration/
kernel/branches/2.2.x/exo.kernel.mc-integration/exo.kernel.mc-int-demo/
kernel/branches/2.2.x/exo.kernel.mc-integration/exo.kernel.mc-int-tests/
kernel/branches/2.2.x/exo.kernel.mc-integration/exo.kernel.mc-int/
kernel/branches/2.2.x/exo.kernel.mc-integration/exo.kernel.mc-kernel-extras/
kernel/branches/2.2.x/packaging/module/
Log:
Add/Update svn:ignore property to not commit IDEs/Maven generated files and directories
Property changes on: kernel/branches/2.2.x
___________________________________________________________________
Name: svn:ignore
+ .settings
.project
.classpath
.idea
*.iml
*.ipr
*.iws
temp
bin
target
Property changes on: kernel/branches/2.2.x/exo.kernel.commons
___________________________________________________________________
Name: svn:ignore
+ .settings
.project
.classpath
.idea
*.iml
*.ipr
*.iws
temp
bin
target
Property changes on: kernel/branches/2.2.x/exo.kernel.component.cache
___________________________________________________________________
Name: svn:ignore
+ .settings
.project
.classpath
.idea
*.iml
*.ipr
*.iws
temp
bin
target
Property changes on: kernel/branches/2.2.x/exo.kernel.component.command
___________________________________________________________________
Name: svn:ignore
+ .settings
.project
.classpath
.idea
*.iml
*.ipr
*.iws
temp
bin
target
Property changes on: kernel/branches/2.2.x/exo.kernel.component.common
___________________________________________________________________
Name: svn:ignore
+ .settings
.project
.classpath
.idea
*.iml
*.ipr
*.iws
temp
bin
target
Property changes on: kernel/branches/2.2.x/exo.kernel.component.ext.cache.impl.jboss.v3
___________________________________________________________________
Name: svn:ignore
+ .settings
.project
.classpath
.idea
*.iml
*.ipr
*.iws
temp
bin
target
Property changes on: kernel/branches/2.2.x/exo.kernel.component.remote
___________________________________________________________________
Name: svn:ignore
+ .settings
.project
.classpath
.idea
*.iml
*.ipr
*.iws
temp
bin
target
Property changes on: kernel/branches/2.2.x/exo.kernel.container
___________________________________________________________________
Name: svn:ignore
+ .settings
.project
.classpath
.idea
*.iml
*.ipr
*.iws
temp
bin
target
Property changes on: kernel/branches/2.2.x/exo.kernel.mc-integration
___________________________________________________________________
Name: svn:ignore
+ .settings
.project
.classpath
.idea
*.iml
*.ipr
*.iws
temp
bin
target
Property changes on: kernel/branches/2.2.x/exo.kernel.mc-integration/exo.kernel.mc-int
___________________________________________________________________
Name: svn:ignore
+ .settings
.project
.classpath
.idea
*.iml
*.ipr
*.iws
temp
bin
target
Property changes on: kernel/branches/2.2.x/exo.kernel.mc-integration/exo.kernel.mc-int-demo
___________________________________________________________________
Name: svn:ignore
+ .settings
.project
.classpath
.idea
*.iml
*.ipr
*.iws
temp
bin
target
Property changes on: kernel/branches/2.2.x/exo.kernel.mc-integration/exo.kernel.mc-int-tests
___________________________________________________________________
Name: svn:ignore
+ .settings
.project
.classpath
.idea
*.iml
*.ipr
*.iws
temp
bin
target
Property changes on: kernel/branches/2.2.x/exo.kernel.mc-integration/exo.kernel.mc-kernel-extras
___________________________________________________________________
Name: svn:ignore
+ .settings
.project
.classpath
.idea
*.iml
*.ipr
*.iws
temp
bin
target
Property changes on: kernel/branches/2.2.x/packaging/module
___________________________________________________________________
Name: svn:ignore
- target
+ .settings
.project
.classpath
.idea
*.iml
*.ipr
*.iws
temp
bin
target
13 years, 8 months
exo-jcr SVN: r3054 - in core/trunk/exo.core.component.document/src: main/java/org/exoplatform/services/document/impl/tika and 2 other directories.
by do-not-reply@jboss.org
Author: sergiykarpenko
Date: 2010-09-03 11:45:28 -0400 (Fri, 03 Sep 2010)
New Revision: 3054
Removed:
core/trunk/exo.core.component.document/src/main/java/org/exoplatform/services/document/impl/tika/BaseAdvancedDocumentReader.java
core/trunk/exo.core.component.document/src/main/resources/conf/portal/tika-mimetype.xml
core/trunk/exo.core.component.document/src/test/resources/conf/portal/tika-mimetype.xml
Modified:
core/trunk/exo.core.component.document/src/main/java/org/exoplatform/services/document/impl/DocumentReaderServiceImpl.java
core/trunk/exo.core.component.document/src/main/java/org/exoplatform/services/document/impl/tika/TikaDocumentReader.java
core/trunk/exo.core.component.document/src/main/java/org/exoplatform/services/document/impl/tika/TikaDocumentReaderServiceImpl.java
core/trunk/exo.core.component.document/src/test/resources/conf/portal/test-configuration.xml
Log:
EXOJCR-749: TikaDocumentReaderService and TikaDocumentReader updated
Modified: core/trunk/exo.core.component.document/src/main/java/org/exoplatform/services/document/impl/DocumentReaderServiceImpl.java
===================================================================
--- core/trunk/exo.core.component.document/src/main/java/org/exoplatform/services/document/impl/DocumentReaderServiceImpl.java 2010-09-03 13:07:59 UTC (rev 3053)
+++ core/trunk/exo.core.component.document/src/main/java/org/exoplatform/services/document/impl/DocumentReaderServiceImpl.java 2010-09-03 15:45:28 UTC (rev 3054)
@@ -37,17 +37,17 @@
*/
public class DocumentReaderServiceImpl implements DocumentReaderService
{
- private Map<String, BaseDocumentReader> readers_;
+ protected Map<String, DocumentReader> readers_;
public DocumentReaderServiceImpl(InitParams params)
{
- readers_ = new HashMap<String, BaseDocumentReader>();
+ readers_ = new HashMap<String, DocumentReader>();
}
@Deprecated
public String getContentAsText(String mimeType, InputStream is) throws Exception
{
- BaseDocumentReader reader = readers_.get(mimeType.toLowerCase());
+ DocumentReader reader = readers_.get(mimeType.toLowerCase());
if (reader != null)
return reader.getContentAsText(is);
throw new Exception("Cannot handle the document type: " + mimeType);
@@ -71,7 +71,7 @@
*/
public DocumentReader getDocumentReader(String mimeType) throws HandlerNotFoundException
{
- BaseDocumentReader reader = readers_.get(mimeType.toLowerCase());
+ DocumentReader reader = readers_.get(mimeType.toLowerCase());
if (reader != null)
return reader;
else
Deleted: core/trunk/exo.core.component.document/src/main/java/org/exoplatform/services/document/impl/tika/BaseAdvancedDocumentReader.java
===================================================================
--- core/trunk/exo.core.component.document/src/main/java/org/exoplatform/services/document/impl/tika/BaseAdvancedDocumentReader.java 2010-09-03 13:07:59 UTC (rev 3053)
+++ core/trunk/exo.core.component.document/src/main/java/org/exoplatform/services/document/impl/tika/BaseAdvancedDocumentReader.java 2010-09-03 15:45:28 UTC (rev 3054)
@@ -1,32 +0,0 @@
-/*
- * Copyright (C) 2003-2010 eXo Platform SAS.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Affero General Public License
- * as published by the Free Software Foundation; either version 3
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, see<http://www.gnu.org/licenses/>.
- */
-package org.exoplatform.services.document.impl.tika;
-
-import org.exoplatform.services.document.AdvancedDocumentReader;
-import org.exoplatform.services.document.impl.BaseDocumentReader;
-
-/**
- * Created by The eXo Platform SAS.
- *
- * <br/>Date:
- *
- * @author <a href="karpenko.sergiy(a)gmail.com">Karpenko Sergiy</a>
- * @version $Id: AdvancedBaseDockumentReader.java 111 2008-11-11 11:11:11Z serg $
- */
-public abstract class BaseAdvancedDocumentReader extends BaseDocumentReader implements AdvancedDocumentReader
-{
-}
Modified: core/trunk/exo.core.component.document/src/main/java/org/exoplatform/services/document/impl/tika/TikaDocumentReader.java
===================================================================
--- core/trunk/exo.core.component.document/src/main/java/org/exoplatform/services/document/impl/tika/TikaDocumentReader.java 2010-09-03 13:07:59 UTC (rev 3053)
+++ core/trunk/exo.core.component.document/src/main/java/org/exoplatform/services/document/impl/tika/TikaDocumentReader.java 2010-09-03 15:45:28 UTC (rev 3054)
@@ -16,7 +16,6 @@
*/
package org.exoplatform.services.document.impl.tika;
-import org.apache.tika.config.TikaConfig;
import org.apache.tika.exception.TikaException;
import org.apache.tika.metadata.DublinCore;
import org.apache.tika.metadata.MSOffice;
@@ -27,6 +26,7 @@
import org.apache.tika.sax.BodyContentHandler;
import org.apache.tika.sax.WriteOutContentHandler;
import org.exoplatform.commons.utils.QName;
+import org.exoplatform.services.document.AdvancedDocumentReader;
import org.exoplatform.services.document.DCMetaData;
import org.exoplatform.services.document.DocumentReadException;
import org.exoplatform.services.document.HandlerNotFoundException;
@@ -45,7 +45,7 @@
* @author <a href="karpenko.sergiy(a)gmail.com">Karpenko Sergiy</a>
* @version $Id: TikaDocumentReader.java 111 2008-11-11 11:11:11Z serg $
*/
-public class TikaDocumentReader extends BaseAdvancedDocumentReader
+public class TikaDocumentReader implements AdvancedDocumentReader
{
/**
* Since Tika can not extract metadata without extracting document content,
@@ -53,13 +53,13 @@
*/
private final int MAX_READED_SIZE = 10 * 1024;
- final String mimeType;
+ private final String mimeType;
- final TikaConfig conf;
+ private final Parser parser;
- public TikaDocumentReader(TikaConfig conf, String mimeType) throws HandlerNotFoundException
+ public TikaDocumentReader(Parser tikaParser, String mimeType) throws HandlerNotFoundException
{
- this.conf = conf;
+ this.parser = tikaParser;
this.mimeType = mimeType;
}
@@ -68,7 +68,6 @@
Metadata metadata = new Metadata();
metadata.set(Metadata.CONTENT_TYPE, mimeType);
metadata.set(Metadata.CONTENT_ENCODING, encoding);
- Parser parser = conf.getParser(mimeType);
ParseContext context = new ParseContext();
context.set(Parser.class, parser);
return new ParsingReader(parser, is, metadata, context);
@@ -78,7 +77,6 @@
{
Metadata metadata = new Metadata();
metadata.set(Metadata.CONTENT_TYPE, mimeType);
- Parser parser = conf.getParser(mimeType);
ParseContext context = new ParseContext();
context.set(Parser.class, parser);
return new ParsingReader(parser, is, metadata, context);
@@ -86,108 +84,122 @@
public String getContentAsText(InputStream is) throws IOException, DocumentReadException
{
- Metadata metadata = new Metadata();
- metadata.set(Metadata.CONTENT_TYPE, mimeType);
-
- Parser parser = conf.getParser(mimeType);
-
- ContentHandler handler = new BodyContentHandler();
- ParseContext context = new ParseContext();
- context.set(Parser.class, parser);
try
{
- parser.parse(is, handler, metadata, context);
- return handler.toString();
+ Metadata metadata = new Metadata();
+ metadata.set(Metadata.CONTENT_TYPE, mimeType);
+
+ ContentHandler handler = new BodyContentHandler();
+ ParseContext context = new ParseContext();
+ context.set(Parser.class, parser);
+ try
+ {
+ parser.parse(is, handler, metadata, context);
+ return handler.toString();
+ }
+ catch (SAXException e)
+ {
+ throw new DocumentReadException(e.getMessage(), e);
+ }
+ catch (TikaException e)
+ {
+ throw new DocumentReadException(e.getMessage(), e);
+ }
}
- catch (SAXException e)
+ finally
{
- throw new DocumentReadException(e.getMessage(), e);
+ is.close();
}
- catch (TikaException e)
- {
- throw new DocumentReadException(e.getMessage(), e);
- }
}
public String getContentAsText(InputStream is, String encoding) throws IOException, DocumentReadException
{
- Metadata metadata = new Metadata();
- metadata.set(Metadata.CONTENT_TYPE, mimeType);
- metadata.set(Metadata.CONTENT_ENCODING, encoding);
-
- Parser parser = conf.getParser(mimeType);
-
- ContentHandler handler = new BodyContentHandler();
- ParseContext context = new ParseContext();
- context.set(Parser.class, parser);
try
{
- parser.parse(is, handler, metadata, context);
- return handler.toString();
+ Metadata metadata = new Metadata();
+ metadata.set(Metadata.CONTENT_TYPE, mimeType);
+ metadata.set(Metadata.CONTENT_ENCODING, encoding);
+
+ ContentHandler handler = new BodyContentHandler();
+ ParseContext context = new ParseContext();
+ context.set(Parser.class, parser);
+ try
+ {
+ parser.parse(is, handler, metadata, context);
+ return handler.toString();
+ }
+ catch (SAXException e)
+ {
+ throw new DocumentReadException(e.getMessage(), e);
+ }
+ catch (TikaException e)
+ {
+ throw new DocumentReadException(e.getMessage(), e);
+ }
}
- catch (SAXException e)
+ finally
{
- throw new DocumentReadException(e.getMessage(), e);
+ is.close();
}
- catch (TikaException e)
- {
- throw new DocumentReadException(e.getMessage(), e);
- }
}
public String[] getMimeTypes()
{
- String[] allMimeTypes = new String[conf.getParsers().keySet().size()];
- conf.getParsers().keySet().toArray(allMimeTypes);
- return allMimeTypes;
+ return new String[]{mimeType};
}
public Properties getProperties(InputStream is) throws IOException, DocumentReadException
{
- Metadata metadata = new Metadata();
- metadata.set(Metadata.CONTENT_TYPE, mimeType);
+ try
+ {
+ Metadata metadata = new Metadata();
+ metadata.set(Metadata.CONTENT_TYPE, mimeType);
- Parser parser = conf.getParser(mimeType);
+ ContentHandler handler = new WriteOutContentHandler(MAX_READED_SIZE);
+ ParseContext context = new ParseContext();
+ context.set(Parser.class, parser);
+ try
+ {
+ parser.parse(is, handler, metadata, context);
+ }
+ catch (SAXException e)
+ {
+ throw new DocumentReadException(e.getMessage(), e);
+ }
+ catch (TikaException e)
+ {
+ throw new DocumentReadException(e.getMessage(), e);
+ }
- ContentHandler handler = new WriteOutContentHandler(MAX_READED_SIZE);
- ParseContext context = new ParseContext();
- context.set(Parser.class, parser);
- try
- {
- parser.parse(is, handler, metadata, context);
+ // construct Properties set
+ Properties props = new Properties();
+ convertProperty(metadata, props, DCMetaData.CONTRIBUTOR, new String[]{DublinCore.CONTRIBUTOR,
+ MSOffice.LAST_AUTHOR});
+ convertProperty(metadata, props, DCMetaData.COVERAGE, DublinCore.COVERAGE);
+ convertProperty(metadata, props, DCMetaData.CREATOR, new String[]{MSOffice.AUTHOR, DublinCore.CREATOR});
+ //TODO different parsers return date in different formats, so keep it as String
+ convertProperty(metadata, props, DCMetaData.DATE, new String[]{DublinCore.DATE, MSOffice.LAST_SAVED,
+ MSOffice.CREATION_DATE});
+ convertProperty(metadata, props, DCMetaData.DESCRIPTION, new String[]{DublinCore.DESCRIPTION,
+ MSOffice.COMMENTS});
+ convertProperty(metadata, props, DCMetaData.FORMAT, DublinCore.FORMAT);
+ convertProperty(metadata, props, DCMetaData.IDENTIFIER, DublinCore.IDENTIFIER);
+ convertProperty(metadata, props, DCMetaData.LANGUAGE, DublinCore.LANGUAGE);
+ //convertProperty(metadata, props, DCMetaData.?, DublinCore.MODIFIED);
+ convertProperty(metadata, props, DCMetaData.PUBLISHER, DublinCore.PUBLISHER);
+ convertProperty(metadata, props, DCMetaData.RELATION, DublinCore.RELATION);
+ convertProperty(metadata, props, DCMetaData.RESOURCE, DublinCore.SOURCE);
+ convertProperty(metadata, props, DCMetaData.RIGHTS, DublinCore.RIGHTS);
+ convertProperty(metadata, props, DCMetaData.SUBJECT, new String[]{DublinCore.SUBJECT, MSOffice.KEYWORDS});
+ convertProperty(metadata, props, DCMetaData.TITLE, DublinCore.TITLE);
+ convertProperty(metadata, props, DCMetaData.TYPE, DublinCore.TYPE);
+
+ return props;
}
- catch (SAXException e)
+ finally
{
- throw new DocumentReadException(e.getMessage(), e);
+ is.close();
}
- catch (TikaException e)
- {
- throw new DocumentReadException(e.getMessage(), e);
- }
-
- // construct Properties set
- Properties props = new Properties();
- convertProperty(metadata, props, DCMetaData.CONTRIBUTOR, new String[]{DublinCore.CONTRIBUTOR,
- MSOffice.LAST_AUTHOR});
- convertProperty(metadata, props, DCMetaData.COVERAGE, DublinCore.COVERAGE);
- convertProperty(metadata, props, DCMetaData.CREATOR, new String[]{MSOffice.AUTHOR, DublinCore.CREATOR});
- //TODO different parsers return date in different formats, so keep it as String
- convertProperty(metadata, props, DCMetaData.DATE, new String[]{DublinCore.DATE, MSOffice.LAST_SAVED,
- MSOffice.CREATION_DATE});
- convertProperty(metadata, props, DCMetaData.DESCRIPTION, new String[]{DublinCore.DESCRIPTION, MSOffice.COMMENTS});
- convertProperty(metadata, props, DCMetaData.FORMAT, DublinCore.FORMAT);
- convertProperty(metadata, props, DCMetaData.IDENTIFIER, DublinCore.IDENTIFIER);
- convertProperty(metadata, props, DCMetaData.LANGUAGE, DublinCore.LANGUAGE);
- //convertProperty(metadata, props, DCMetaData.?, DublinCore.MODIFIED);
- convertProperty(metadata, props, DCMetaData.PUBLISHER, DublinCore.PUBLISHER);
- convertProperty(metadata, props, DCMetaData.RELATION, DublinCore.RELATION);
- convertProperty(metadata, props, DCMetaData.RESOURCE, DublinCore.SOURCE);
- convertProperty(metadata, props, DCMetaData.RIGHTS, DublinCore.RIGHTS);
- convertProperty(metadata, props, DCMetaData.SUBJECT, new String[]{DublinCore.SUBJECT, MSOffice.KEYWORDS});
- convertProperty(metadata, props, DCMetaData.TITLE, DublinCore.TITLE);
- convertProperty(metadata, props, DCMetaData.TYPE, DublinCore.TYPE);
-
- return props;
}
private void convertProperty(Metadata metadata, Properties props, QName jcrDCProp, String tikaDCProp)
Modified: core/trunk/exo.core.component.document/src/main/java/org/exoplatform/services/document/impl/tika/TikaDocumentReaderServiceImpl.java
===================================================================
--- core/trunk/exo.core.component.document/src/main/java/org/exoplatform/services/document/impl/tika/TikaDocumentReaderServiceImpl.java 2010-09-03 13:07:59 UTC (rev 3053)
+++ core/trunk/exo.core.component.document/src/main/java/org/exoplatform/services/document/impl/tika/TikaDocumentReaderServiceImpl.java 2010-09-03 15:45:28 UTC (rev 3054)
@@ -17,17 +17,14 @@
package org.exoplatform.services.document.impl.tika;
import org.apache.tika.config.TikaConfig;
-import org.exoplatform.container.component.ComponentPlugin;
+import org.apache.tika.parser.Parser;
+import org.exoplatform.container.configuration.ConfigurationManager;
import org.exoplatform.container.xml.InitParams;
-import org.exoplatform.container.xml.PropertiesParam;
import org.exoplatform.services.document.DocumentReader;
-import org.exoplatform.services.document.DocumentReaderService;
import org.exoplatform.services.document.HandlerNotFoundException;
-import org.exoplatform.services.document.impl.BaseDocumentReader;
+import org.exoplatform.services.document.impl.DocumentReaderServiceImpl;
import java.io.InputStream;
-import java.util.HashMap;
-import java.util.Map;
/**
* Created by The eXo Platform SAS.
@@ -37,33 +34,24 @@
* @author <a href="karpenko.sergiy(a)gmail.com">Karpenko Sergiy</a>
* @version $Id: TikaDocumentReaderServiceImpl.java 111 2008-11-11 11:11:11Z serg $
*/
-public class TikaDocumentReaderServiceImpl implements DocumentReaderService
+public class TikaDocumentReaderServiceImpl extends DocumentReaderServiceImpl
{
- public static final String TIKA_CONFIG = "tika-config";
+ public static final String TIKA_CONFIG_PATH = "tika-configuration";
- public static final String TIKA_CONFIG_PATH = "tika-configuration-path";
-
/**
- * User defined readers. Used to support previously created users DocumentReaders.
- */
- private final Map<String, BaseDocumentReader> userReaders;
-
- /**
* Tika configuration - configured from tika-conf.xml, otherwise default used.
*/
private final TikaConfig conf;
- public TikaDocumentReaderServiceImpl(InitParams params) throws Exception
+ public TikaDocumentReaderServiceImpl(ConfigurationManager configManager, InitParams params) throws Exception
{
- userReaders = new HashMap<String, BaseDocumentReader>();
+ super(params);
// get tika configuration
- PropertiesParam param = params.getPropertiesParam(TIKA_CONFIG);
- if (param != null && param.getProperty(TIKA_CONFIG_PATH) != null)
+ if (params != null && params.getValueParam(TIKA_CONFIG_PATH) != null)
{
- InputStream stream =
- TikaDocumentReaderServiceImpl.class.getResourceAsStream(param.getProperty(TIKA_CONFIG_PATH));
- conf = new TikaConfig(stream);
+ InputStream is = configManager.getInputStream(params.getValueParam(TIKA_CONFIG_PATH).getValue());
+ conf = new TikaConfig(is);
}
else
{
@@ -71,28 +59,9 @@
}
}
- @Deprecated
- public String getContentAsText(String mimeType, InputStream is) throws Exception
- {
- DocumentReader reader = getDocumentReader(mimeType);
- if (reader != null)
- return reader.getContentAsText(is);
- throw new Exception("Cannot handle the document type: " + mimeType);
- }
-
/**
- * This plugin registers and redefines default document reader with new one.
+ * Returns document reader by mimeType. DocumentReaders are registered only by first user call.
*
- * @param plugin
- */
- public void addDocumentReader(ComponentPlugin plugin)
- {
- BaseDocumentReader reader = (BaseDocumentReader)plugin;
- for (String mimeType : reader.getMimeTypes())
- userReaders.put(mimeType.toLowerCase(), reader);
- }
-
- /**
* (non-Javadoc)
* @see
* org.exoplatform.services.document.DocumentReaderService#getDocumentReader
@@ -100,14 +69,23 @@
*/
public DocumentReader getDocumentReader(String mimeType) throws HandlerNotFoundException
{
- BaseDocumentReader reader = userReaders.get(mimeType.toLowerCase());
- if (reader != null)
- return reader;
- else
+ try
{
- if (conf.getParsers().containsKey(mimeType))
+ // first check user defined old-style and previously registered TikaDocumentReaders
+ return super.getDocumentReader(mimeType);
+ }
+ catch (HandlerNotFoundException e)
+ {
+ // tika-config may contain really big amount of mimetypes, but used only few,
+ // so to avoid load in memory many copies of DocumentReader, we will register it
+ // only if someone need it
+ Parser tikaParser = conf.getParser(mimeType);
+ if (tikaParser != null)
{
- return new TikaDocumentReader(conf, mimeType);
+ TikaDocumentReader reader = new TikaDocumentReader(tikaParser, mimeType);
+ //register new document reader
+ super.readers_.put(mimeType, reader);
+ return reader;
}
else
{
@@ -115,5 +93,4 @@
}
}
}
-
}
Deleted: core/trunk/exo.core.component.document/src/main/resources/conf/portal/tika-mimetype.xml
===================================================================
--- core/trunk/exo.core.component.document/src/main/resources/conf/portal/tika-mimetype.xml 2010-09-03 13:07:59 UTC (rev 3053)
+++ core/trunk/exo.core.component.document/src/main/resources/conf/portal/tika-mimetype.xml 2010-09-03 15:45:28 UTC (rev 3054)
@@ -1,4099 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- 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.
--->
-<!--
- Description: This xml file defines the valid mime types used by Tika.
- The mime type data within this file is based on information from various
- sources like Apache Nutch, Apache HTTP Server, the file(1) command, etc.
--->
-<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/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"/>
- <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">
- <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">
- <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"/>
- <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/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"/>
- </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.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 type="application/vnd.dvb.ipdcroaming"/>
- <mime-type type="application/vnd.dvb.iptv.alfec-base"/>
- <mime-type type="application/vnd.dvb.iptv.alfec-enhancement"/>
- <mime-type type="application/vnd.dvb.notif-aggregate-root+xml"/>
- <mime-type type="application/vnd.dvb.notif-container+xml"/>
- <mime-type type="application/vnd.dvb.notif-generic+xml"/>
- <mime-type type="application/vnd.dvb.notif-ia-msglist+xml"/>
- <mime-type type="application/vnd.dvb.notif-ia-registration-request+xml"/>
- <mime-type type="application/vnd.dvb.notif-ia-registration-response+xml"/>
- <mime-type type="application/vnd.dvb.notif-init+xml"/>
- <mime-type type="application/vnd.dxr"/>
- <mime-type type="application/vnd.dynageo">
- <glob pattern="*.geo"/>
- </mime-type>
- <mime-type type="application/vnd.ecdis-update"/>
- <mime-type type="application/vnd.ecowin.chart">
- <glob pattern="*.mag"/>
- </mime-type>
- <mime-type type="application/vnd.ecowin.filerequest"/>
- <mime-type type="application/vnd.ecowin.fileupdate"/>
- <mime-type type="application/vnd.ecowin.series"/>
- <mime-type type="application/vnd.ecowin.seriesrequest"/>
- <mime-type type="application/vnd.ecowin.seriesupdate"/>
- <mime-type type="application/vnd.emclient.accessrequest+xml"/>
- <mime-type type="application/vnd.enliven">
- <glob pattern="*.nml"/>
- </mime-type>
- <mime-type type="application/vnd.epson.esf">
- <glob pattern="*.esf"/>
- </mime-type>
- <mime-type type="application/vnd.epson.msf">
- <glob pattern="*.msf"/>
- </mime-type>
- <mime-type type="application/vnd.epson.quickanime">
- <glob pattern="*.qam"/>
- </mime-type>
- <mime-type type="application/vnd.epson.salt">
- <glob pattern="*.slt"/>
- </mime-type>
- <mime-type type="application/vnd.epson.ssf">
- <glob pattern="*.ssf"/>
- </mime-type>
- <mime-type type="application/vnd.ericsson.quickcall"/>
- <mime-type type="application/vnd.eszigno3+xml">
- <glob pattern="*.es3"/>
- <glob pattern="*.et3"/>
- </mime-type>
- <mime-type type="application/vnd.etsi.aoc+xml"/>
- <mime-type type="application/vnd.etsi.cug+xml"/>
- <mime-type type="application/vnd.etsi.iptvcommand+xml"/>
- <mime-type type="application/vnd.etsi.iptvdiscovery+xml"/>
- <mime-type type="application/vnd.etsi.iptvprofile+xml"/>
- <mime-type type="application/vnd.etsi.iptvsad-bc+xml"/>
- <mime-type type="application/vnd.etsi.iptvsad-cod+xml"/>
- <mime-type type="application/vnd.etsi.iptvsad-npvr+xml"/>
- <mime-type type="application/vnd.etsi.iptvueprofile+xml"/>
- <mime-type type="application/vnd.etsi.mcid+xml"/>
- <mime-type type="application/vnd.etsi.sci+xml"/>
- <mime-type type="application/vnd.etsi.simservs+xml"/>
- <mime-type type="application/vnd.eudora.data"/>
- <mime-type type="application/vnd.ezpix-album">
- <glob pattern="*.ez2"/>
- </mime-type>
- <mime-type type="application/vnd.ezpix-package">
- <glob pattern="*.ez3"/>
- </mime-type>
- <mime-type type="application/vnd.f-secure.mobile"/>
- <mime-type type="application/vnd.fdf">
- <glob pattern="*.fdf"/>
- </mime-type>
- <mime-type type="application/vnd.fdsn.mseed">
- <glob pattern="*.mseed"/>
- </mime-type>
- <mime-type type="application/vnd.fdsn.seed">
- <glob pattern="*.seed"/>
- <glob pattern="*.dataless"/>
- </mime-type>
- <mime-type type="application/vnd.ffsns"/>
- <mime-type type="application/vnd.fints"/>
- <mime-type type="application/vnd.flographit">
- <glob pattern="*.gph"/>
- </mime-type>
- <mime-type type="application/vnd.fluxtime.clip">
- <glob pattern="*.ftc"/>
- </mime-type>
- <mime-type type="application/vnd.font-fontforge-sfd"/>
- <mime-type type="application/vnd.framemaker">
- <glob pattern="*.fm"/>
- <glob pattern="*.frame"/>
- <glob pattern="*.maker"/>
- <glob pattern="*.book"/>
- </mime-type>
- <mime-type type="application/vnd.frogans.fnc">
- <glob pattern="*.fnc"/>
- </mime-type>
- <mime-type type="application/vnd.frogans.ltf">
- <glob pattern="*.ltf"/>
- </mime-type>
- <mime-type type="application/vnd.fsc.weblaunch">
- <glob pattern="*.fsc"/>
- </mime-type>
- <mime-type type="application/vnd.fujitsu.oasys">
- <glob pattern="*.oas"/>
- </mime-type>
- <mime-type type="application/vnd.fujitsu.oasys2">
- <glob pattern="*.oa2"/>
- </mime-type>
- <mime-type type="application/vnd.fujitsu.oasys3">
- <glob pattern="*.oa3"/>
- </mime-type>
- <mime-type type="application/vnd.fujitsu.oasysgp">
- <glob pattern="*.fg5"/>
- </mime-type>
- <mime-type type="application/vnd.fujitsu.oasysprs">
- <glob pattern="*.bh2"/>
- </mime-type>
- <mime-type type="application/vnd.fujixerox.art-ex"/>
- <mime-type type="application/vnd.fujixerox.art4"/>
- <mime-type type="application/vnd.fujixerox.hbpl"/>
- <mime-type type="application/vnd.fujixerox.ddd">
- <glob pattern="*.ddd"/>
- </mime-type>
- <mime-type type="application/vnd.fujixerox.docuworks">
- <glob pattern="*.xdw"/>
- </mime-type>
- <mime-type type="application/vnd.fujixerox.docuworks.binder">
- <glob pattern="*.xbd"/>
- </mime-type>
- <mime-type type="application/vnd.fut-misnet"/>
- <mime-type type="application/vnd.fuzzysheet">
- <glob pattern="*.fzs"/>
- </mime-type>
- <mime-type type="application/vnd.genomatix.tuxedo">
- <glob pattern="*.txd"/>
- </mime-type>
- <mime-type type="application/vnd.geogebra.file">
- <glob pattern="*.ggb"/>
- </mime-type>
- <mime-type type="application/vnd.geogebra.tool">
- <glob pattern="*.ggt"/>
- </mime-type>
- <mime-type type="application/vnd.geometry-explorer">
- <glob pattern="*.gex"/>
- <glob pattern="*.gre"/>
- </mime-type>
- <mime-type type="application/vnd.gmx">
- <glob pattern="*.gmx"/>
- </mime-type>
- <mime-type type="application/vnd.google-earth.kml+xml">
- <glob pattern="*.kml"/>
- </mime-type>
- <mime-type type="application/vnd.google-earth.kmz">
- <glob pattern="*.kmz"/>
- </mime-type>
- <mime-type type="application/vnd.grafeq">
- <glob pattern="*.gqf"/>
- <glob pattern="*.gqs"/>
- </mime-type>
- <mime-type type="application/vnd.gridmp"/>
- <mime-type type="application/vnd.groove-account">
- <glob pattern="*.gac"/>
- </mime-type>
- <mime-type type="application/vnd.groove-help">
- <glob pattern="*.ghf"/>
- </mime-type>
- <mime-type type="application/vnd.groove-identity-message">
- <glob pattern="*.gim"/>
- </mime-type>
- <mime-type type="application/vnd.groove-injector">
- <glob pattern="*.grv"/>
- </mime-type>
- <mime-type type="application/vnd.groove-tool-message">
- <glob pattern="*.gtm"/>
- </mime-type>
- <mime-type type="application/vnd.groove-tool-template">
- <glob pattern="*.tpl"/>
- </mime-type>
- <mime-type type="application/vnd.groove-vcard">
- <glob pattern="*.vcg"/>
- </mime-type>
- <mime-type type="application/vnd.handheld-entertainment+xml">
- <glob pattern="*.zmm"/>
- </mime-type>
- <mime-type type="application/vnd.hbci">
- <glob pattern="*.hbci"/>
- </mime-type>
- <mime-type type="application/vnd.hcl-bireports"/>
- <mime-type type="application/vnd.hhe.lesson-player">
- <glob pattern="*.les"/>
- </mime-type>
- <mime-type type="application/vnd.hp-hpgl">
- <glob pattern="*.hpgl"/>
- </mime-type>
- <mime-type type="application/vnd.hp-hpid">
- <glob pattern="*.hpid"/>
- </mime-type>
- <mime-type type="application/vnd.hp-hps">
- <glob pattern="*.hps"/>
- </mime-type>
- <mime-type type="application/vnd.hp-jlyt">
- <glob pattern="*.jlt"/>
- </mime-type>
- <mime-type type="application/vnd.hp-pcl">
- <glob pattern="*.pcl"/>
- </mime-type>
- <mime-type type="application/vnd.hp-pclxl">
- <glob pattern="*.pclxl"/>
- </mime-type>
- <mime-type type="application/vnd.httphone"/>
- <mime-type type="application/vnd.hydrostatix.sof-data">
- <glob pattern="*.sfd-hdstx"/>
- </mime-type>
- <mime-type type="application/vnd.hzn-3d-crossword">
- <glob pattern="*.x3d"/>
- </mime-type>
- <mime-type type="application/vnd.ibm.afplinedata"/>
- <mime-type type="application/vnd.ibm.electronic-media"/>
- <mime-type type="application/vnd.ibm.minipay">
- <glob pattern="*.mpy"/>
- </mime-type>
- <mime-type type="application/vnd.ibm.modcap">
- <glob pattern="*.afp"/>
- <glob pattern="*.listafp"/>
- <glob pattern="*.list3820"/>
- </mime-type>
- <mime-type type="application/vnd.ibm.rights-management">
- <glob pattern="*.irm"/>
- </mime-type>
- <mime-type type="application/vnd.ibm.secure-container">
- <glob pattern="*.sc"/>
- </mime-type>
- <mime-type type="application/vnd.iccprofile">
- <glob pattern="*.icc"/>
- <glob pattern="*.icm"/>
- </mime-type>
- <mime-type type="application/vnd.igloader">
- <glob pattern="*.igl"/>
- </mime-type>
- <mime-type type="application/vnd.immervision-ivp">
- <glob pattern="*.ivp"/>
- </mime-type>
- <mime-type type="application/vnd.immervision-ivu">
- <glob pattern="*.ivu"/>
- </mime-type>
- <mime-type type="application/vnd.informedcontrol.rms+xml"/>
- <mime-type type="application/vnd.informix-visionary"/>
- <mime-type type="application/vnd.intercon.formnet">
- <glob pattern="*.xpw"/>
- <glob pattern="*.xpx"/>
- </mime-type>
- <mime-type type="application/vnd.intertrust.digibox"/>
- <mime-type type="application/vnd.intertrust.nncp"/>
- <mime-type type="application/vnd.intu.qbo">
- <glob pattern="*.qbo"/>
- </mime-type>
- <mime-type type="application/vnd.intu.qfx">
- <glob pattern="*.qfx"/>
- </mime-type>
- <mime-type type="application/vnd.iptc.g2.conceptitem+xml"/>
- <mime-type type="application/vnd.iptc.g2.knowledgeitem+xml"/>
- <mime-type type="application/vnd.iptc.g2.newsitem+xml"/>
- <mime-type type="application/vnd.iptc.g2.packageitem+xml"/>
- <mime-type type="application/vnd.ipunplugged.rcprofile">
- <glob pattern="*.rcprofile"/>
- </mime-type>
- <mime-type type="application/vnd.irepository.package+xml">
- <glob pattern="*.irp"/>
- </mime-type>
- <mime-type type="application/vnd.is-xpr">
- <glob pattern="*.xpr"/>
- </mime-type>
- <mime-type type="application/vnd.jam">
- <glob pattern="*.jam"/>
- </mime-type>
- <mime-type type="application/vnd.japannet-directory-service"/>
- <mime-type type="application/vnd.japannet-jpnstore-wakeup"/>
- <mime-type type="application/vnd.japannet-payment-wakeup"/>
- <mime-type type="application/vnd.japannet-registration"/>
- <mime-type type="application/vnd.japannet-registration-wakeup"/>
- <mime-type type="application/vnd.japannet-setstore-wakeup"/>
- <mime-type type="application/vnd.japannet-verification"/>
- <mime-type type="application/vnd.japannet-verification-wakeup"/>
- <mime-type type="application/vnd.jcp.javame.midlet-rms">
- <glob pattern="*.rms"/>
- </mime-type>
- <mime-type type="application/vnd.jisp">
- <glob pattern="*.jisp"/>
- </mime-type>
- <mime-type type="application/vnd.joost.joda-archive">
- <glob pattern="*.joda"/>
- </mime-type>
- <mime-type type="application/vnd.kahootz">
- <glob pattern="*.ktz"/>
- <glob pattern="*.ktr"/>
- </mime-type>
- <mime-type type="application/vnd.kde.karbon">
- <glob pattern="*.karbon"/>
- </mime-type>
- <mime-type type="application/vnd.kde.kchart">
- <glob pattern="*.chrt"/>
- </mime-type>
- <mime-type type="application/vnd.kde.kformula">
- <glob pattern="*.kfo"/>
- </mime-type>
- <mime-type type="application/vnd.kde.kivio">
- <glob pattern="*.flw"/>
- </mime-type>
- <mime-type type="application/vnd.kde.kontour">
- <glob pattern="*.kon"/>
- </mime-type>
- <mime-type type="application/vnd.kde.kpresenter">
- <glob pattern="*.kpr"/>
- <glob pattern="*.kpt"/>
- </mime-type>
- <mime-type type="application/vnd.kde.kspread">
- <glob pattern="*.ksp"/>
- </mime-type>
- <mime-type type="application/vnd.kde.kword">
- <glob pattern="*.kwd"/>
- <glob pattern="*.kwt"/>
- </mime-type>
- <mime-type type="application/vnd.kenameaapp">
- <glob pattern="*.htke"/>
- </mime-type>
- <mime-type type="application/vnd.kidspiration">
- <glob pattern="*.kia"/>
- </mime-type>
- <mime-type type="application/vnd.kinar">
- <glob pattern="*.kne"/>
- <glob pattern="*.knp"/>
- </mime-type>
- <mime-type type="application/vnd.koan">
- <alias type="application/x-koan"/>
- <_comment>SSEYO Koan File</_comment>
- <glob pattern="*.skp"/>
- <glob pattern="*.skd"/>
- <glob pattern="*.skt"/>
- <glob pattern="*.skm"/>
- </mime-type>
- <mime-type type="application/vnd.kodak-descriptor">
- <glob pattern="*.sse"/>
- </mime-type>
- <mime-type type="application/vnd.liberty-request+xml"/>
- <mime-type type="application/vnd.llamagraphics.life-balance.desktop">
- <glob pattern="*.lbd"/>
- </mime-type>
- <mime-type type="application/vnd.llamagraphics.life-balance.exchange+xml">
- <glob pattern="*.lbe"/>
- </mime-type>
- <mime-type type="application/vnd.lotus-1-2-3">
- <glob pattern="*.123"/>
- </mime-type>
- <mime-type type="application/vnd.lotus-approach">
- <glob pattern="*.apr"/>
- </mime-type>
- <mime-type type="application/vnd.lotus-freelance">
- <glob pattern="*.pre"/>
- </mime-type>
- <mime-type type="application/vnd.lotus-notes">
- <glob pattern="*.nsf"/>
- </mime-type>
- <mime-type type="application/vnd.lotus-organizer">
- <glob pattern="*.org"/>
- </mime-type>
- <mime-type type="application/vnd.lotus-screencam">
- <glob pattern="*.scm"/>
- </mime-type>
-
- <mime-type type="application/vnd.lotus-wordpro">
- <magic priority="50">
- <match value="WordPro\0" type="string" offset="0" />
- <match value="WordPro\r\373" type="string" offset="0" />
- </magic>
- <glob pattern="*.lwp"/>
- </mime-type>
-
- <mime-type type="application/vnd.macports.portpkg">
- <glob pattern="*.portpkg"/>
- </mime-type>
- <mime-type type="application/vnd.marlin.drm.actiontoken+xml"/>
- <mime-type type="application/vnd.marlin.drm.conftoken+xml"/>
- <mime-type type="application/vnd.marlin.drm.license+xml"/>
- <mime-type type="application/vnd.marlin.drm.mdcf"/>
- <mime-type type="application/vnd.mcd">
- <glob pattern="*.mcd"/>
- </mime-type>
- <mime-type type="application/vnd.medcalcdata">
- <glob pattern="*.mc1"/>
- </mime-type>
- <mime-type type="application/vnd.mediastation.cdkey">
- <glob pattern="*.cdkey"/>
- </mime-type>
- <mime-type type="application/vnd.meridian-slingshot"/>
- <mime-type type="application/vnd.mfer">
- <glob pattern="*.mwf"/>
- </mime-type>
- <mime-type type="application/vnd.mfmp">
- <glob pattern="*.mfm"/>
- </mime-type>
- <mime-type type="application/vnd.micrografx.flo">
- <glob pattern="*.flo"/>
- </mime-type>
- <mime-type type="application/vnd.micrografx.igx">
- <glob pattern="*.igx"/>
- </mime-type>
-
- <mime-type type="application/vnd.mif">
- <comment>FrameMaker MIF document</comment>
- <alias type="application/x-mif"/>
- <alias type="application/x-frame"/>
- <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="\<Book" type="string" offset="0" />
- <match value="\<Maker" type="string" offset="0" />
- </magic>
- <glob pattern="*.mif"/>
- </mime-type>
-
- <mime-type type="application/vnd.minisoft-hp3000-save"/>
- <mime-type type="application/vnd.mitsubishi.misty-guard.trustweb"/>
- <mime-type type="application/vnd.mobius.daf">
- <glob pattern="*.daf"/>
- </mime-type>
- <mime-type type="application/vnd.mobius.dis">
- <glob pattern="*.dis"/>
- </mime-type>
- <mime-type type="application/vnd.mobius.mbk">
- <glob pattern="*.mbk"/>
- </mime-type>
- <mime-type type="application/vnd.mobius.mqy">
- <glob pattern="*.mqy"/>
- </mime-type>
- <mime-type type="application/vnd.mobius.msl">
- <glob pattern="*.msl"/>
- </mime-type>
- <mime-type type="application/vnd.mobius.plc">
- <glob pattern="*.plc"/>
- </mime-type>
- <mime-type type="application/vnd.mobius.txf">
- <glob pattern="*.txf"/>
- </mime-type>
- <mime-type type="application/vnd.mophun.application">
- <glob pattern="*.mpn"/>
- </mime-type>
- <mime-type type="application/vnd.mophun.certificate">
- <glob pattern="*.mpc"/>
- </mime-type>
- <mime-type type="application/vnd.motorola.flexsuite"/>
- <mime-type type="application/vnd.motorola.flexsuite.adsi"/>
- <mime-type type="application/vnd.motorola.flexsuite.fis"/>
- <mime-type type="application/vnd.motorola.flexsuite.gotap"/>
- <mime-type type="application/vnd.motorola.flexsuite.kmr"/>
- <mime-type type="application/vnd.motorola.flexsuite.ttc"/>
- <mime-type type="application/vnd.motorola.flexsuite.wem"/>
- <mime-type type="application/vnd.motorola.iprm"/>
- <mime-type type="application/vnd.mozilla.xul+xml">
- <glob pattern="*.xul"/>
- </mime-type>
- <mime-type type="application/vnd.ms-artgalry">
- <glob pattern="*.cil"/>
- </mime-type>
- <mime-type type="application/vnd.ms-asf"/>
- <mime-type type="application/vnd.ms-cab-compressed">
- <glob pattern="*.cab"/>
- </mime-type>
-
-
- <mime-type type="application/excel"/>
- <mime-type type="application/xls"/>
-
- <!-- http://www.iana.org/assignments/media-types/application/vnd.ms-excel -->
- <!--mime-type type="application/xls"-->
- <mime-type type="application/vnd.ms-excel">
- <!-- Use org.apache.tika.detect.ContainerAwareDetector for more reliable detection of OLE2 documents -->
- <alias type="application/msexcel" />
- <comment>Microsoft Excel Spreadsheet</comment>
- <magic priority="50">
- <match value="Microsoft\ Excel\ 5.0\ Worksheet" type="string" offset="2080"/>
- <match value="Foglio\ di\ lavoro\ Microsoft\ Exce" type="string" offset="2080"/>
- <match value="Biff5" type="string" offset="2114"/>
- <match value="Biff5" type="string" offset="2121"/>
- <match value="\x09\x04\x06\x00\x00\x00\x10\x00" type="string" offset="0"/>
- <match value="0xd0cf11e0a1b11ae1" type="string" offset="0:8">
- <match value="W\x00o\x00r\x00k\x00b\x00o\x00o\x00k" type="string" offset="1152:4096" />
- </match>
- </magic>
- <glob pattern="*.xls"/>
- <glob pattern="*.xlm"/>
- <glob pattern="*.xla"/>
- <glob pattern="*.xlc"/>
- <glob pattern="*.xlt"/>
- <glob pattern="*.xlw"/>
- <glob pattern="*.xll"/>
- <glob pattern="*.xld"/>
- <sub-class-of type="application/x-tika-msoffice"/>
- </mime-type>
-
-
-
- <mime-type type="application/vnd.ms-excel.addin.macroenabled.12">
- <comment>Office Open XML Workbook Add-in (macro-enabled)</comment>
- <glob pattern="*.xlam"/>
- <sub-class-of type="application/x-tika-ooxml"/>
- </mime-type>
-
- <mime-type type="application/vnd.ms-excel.sheet.macroenabled.12">
- <comment>Office Open XML Workbook (macro-enabled)</comment>
- <glob pattern="*.xlsm"/>
- <sub-class-of type="application/x-tika-ooxml"/>
- </mime-type>
-
- <mime-type type="application/vnd.ms-excel.sheet.binary.macroenabled.12">
- <comment>Microsoft Excel 2007 Binary Spreadsheet</comment>
- <glob pattern="*.xlsb"/>
- <sub-class-of type="application/vnd.ms-excel"/>
- </mime-type>
-
- <mime-type type="application/vnd.ms-excel.template.macroenabled.12">
- <glob pattern="*.xltm"/>
- <sub-class-of type="application/x-tika-ooxml"/>
- </mime-type>
-
- <mime-type type="application/vnd.ms-fontobject">
- <glob pattern="*.eot"/>
- </mime-type>
- <mime-type type="application/vnd.ms-htmlhelp">
- <glob pattern="*.chm"/>
- </mime-type>
- <mime-type type="application/vnd.ms-ims">
- <glob pattern="*.ims"/>
- </mime-type>
- <mime-type type="application/vnd.ms-lrm">
- <glob pattern="*.lrm"/>
- </mime-type>
-
- <mime-type type="application/vnd.ms-outlook">
- <comment>Microsoft Outlook Message</comment>
- <glob pattern="*.msg" />
- <sub-class-of type="application/x-tika-msoffice"/>
- </mime-type>
-
- <mime-type type="application/vnd.ms-pki.seccat">
- <glob pattern="*.cat"/>
- </mime-type>
- <mime-type type="application/vnd.ms-pki.stl">
- <glob pattern="*.stl"/>
- </mime-type>
- <mime-type type="application/vnd.ms-playready.initiator+xml"/>
-
- <!-- http://www.iana.org/assignments/media-types/application/vnd.ms-powerpoint -->
- <mime-type type="application/vnd.ms-powerpoint">
- <!-- Use org.apache.tika.detect.ContainerAwareDetector for more reliable detection of OLE2 documents -->
- <alias type="application/mspowerpoint"/>
- <comment>Microsoft Powerpoint Presentation</comment>
- <magic priority="50">
- <match value="0xd0cf11e0a1b11ae1" type="string" offset="0:8">
- <match value="P\x00o\x00w\x00e\x00r\x00P\x00o\x00i\x00n\x00t\x00 D\x00o\x00c\x00u\x00m\x00e\x00n\x00t" type="string" offset="1152:4096" />
- </match>
- </magic>
- <glob pattern="*.ppz"/>
- <glob pattern="*.ppt"/>
- <glob pattern="*.pps"/>
- <glob pattern="*.pot"/>
- <glob pattern="*.ppa"/>
- <sub-class-of type="application/x-tika-msoffice"/>
- </mime-type>
-
- <mime-type type="application/vnd.ms-powerpoint.addin.macroenabled.12">
- <comment>Office Open XML Presentation Add-in (macro-enabled)</comment>
- <glob pattern="*.ppam"/>
- <sub-class-of type="application/x-tika-msoffice"/>
- </mime-type>
-
- <mime-type type="application/vnd.ms-powerpoint.presentation.macroenabled.12">
- <comment>Office Open XML Presentation (macro-enabled)</comment>
- <glob pattern="*.pptm"/>
- <sub-class-of type="application/x-tika-msoffice"/>
- </mime-type>
-
- <mime-type type="application/vnd.ms-powerpoint.slide.macroenabled.12">
- <glob pattern="*.sldm"/>
- <sub-class-of type="application/x-tika-msoffice"/>
- </mime-type>
-
- <mime-type type="application/vnd.ms-powerpoint.slideshow.macroenabled.12">
- <comment>Office Open XML Presentation Slideshow (macro-enabled)</comment>
- <glob pattern="*.ppsm"/>
- <sub-class-of type="application/x-tika-msoffice"/>
- </mime-type>
-
- <mime-type type="application/vnd.ms-powerpoint.template.macroenabled.12">
- <glob pattern="*.potm"/>
- <sub-class-of type="application/x-tika-msoffice"/>
- </mime-type>
-
- <mime-type type="application/vnd.ms-project">
- <glob pattern="*.mpp"/>
- <glob pattern="*.mpt"/>
- </mime-type>
-
- <mime-type type="application/vnd.ms-tnef">
- <magic priority="50">
- <match value="0x223e9f78" type="little16" offset="0" />
- </magic>
- </mime-type>
-
- <mime-type type="application/vnd.ms-wmdrm.lic-chlg-req"/>
- <mime-type type="application/vnd.ms-wmdrm.lic-resp"/>
- <mime-type type="application/vnd.ms-wmdrm.meter-chlg-req"/>
- <mime-type type="application/vnd.ms-wmdrm.meter-resp"/>
-
- <mime-type type="application/vnd.ms-word.document.macroenabled.12">
- <comment>Office Open XML Document (macro-enabled)</comment>
- <glob pattern="*.docm"/>
- <sub-class-of type="application/x-tika-ooxml"/>
- </mime-type>
-
- <mime-type type="application/vnd.ms-word.template.macroenabled.12">
- <comment>Office Open XML Document Template (macro-enabled)</comment>
- <glob pattern="*.dotm"/>
- <sub-class-of type="application/x-tika-ooxml"/>
- </mime-type>
-
- <mime-type type="application/vnd.ms-works">
- <glob pattern="*.wps"/>
- <glob pattern="*.wks"/>
- <glob pattern="*.wcm"/>
- <glob pattern="*.wdb"/>
- </mime-type>
- <mime-type type="application/vnd.ms-wpl">
- <glob pattern="*.wpl"/>
- </mime-type>
- <mime-type type="application/vnd.ms-xpsdocument">
- <glob pattern="*.xps"/>
- </mime-type>
- <mime-type type="application/vnd.mseq">
- <glob pattern="*.mseq"/>
- </mime-type>
- <mime-type type="application/vnd.msign"/>
- <mime-type type="application/vnd.multiad.creator"/>
- <mime-type type="application/vnd.multiad.creator.cif"/>
- <mime-type type="application/vnd.music-niff"/>
- <mime-type type="application/vnd.musician">
- <glob pattern="*.mus"/>
- </mime-type>
- <mime-type type="application/vnd.muvee.style">
- <glob pattern="*.msty"/>
- </mime-type>
- <mime-type type="application/vnd.ncd.control"/>
- <mime-type type="application/vnd.ncd.reference"/>
- <mime-type type="application/vnd.nervana"/>
- <mime-type type="application/vnd.netfpx"/>
- <mime-type type="application/vnd.neurolanguage.nlu">
- <glob pattern="*.nlu"/>
- </mime-type>
- <mime-type type="application/vnd.noblenet-directory">
- <glob pattern="*.nnd"/>
- </mime-type>
- <mime-type type="application/vnd.noblenet-sealer">
- <glob pattern="*.nns"/>
- </mime-type>
- <mime-type type="application/vnd.noblenet-web">
- <glob pattern="*.nnw"/>
- </mime-type>
- <mime-type type="application/vnd.nokia.catalogs"/>
- <mime-type type="application/vnd.nokia.conml+wbxml"/>
- <mime-type type="application/vnd.nokia.conml+xml"/>
- <mime-type type="application/vnd.nokia.isds-radio-presets"/>
- <mime-type type="application/vnd.nokia.iptv.config+xml"/>
- <mime-type type="application/vnd.nokia.landmark+wbxml"/>
- <mime-type type="application/vnd.nokia.landmark+xml"/>
- <mime-type type="application/vnd.nokia.landmarkcollection+xml"/>
- <mime-type type="application/vnd.nokia.n-gage.ac+xml"/>
- <mime-type type="application/vnd.nokia.n-gage.data">
- <glob pattern="*.ngdat"/>
- </mime-type>
- <mime-type type="application/vnd.nokia.n-gage.symbian.install">
- <glob pattern="*.n-gage"/>
- </mime-type>
- <mime-type type="application/vnd.nokia.ncd"/>
- <mime-type type="application/vnd.nokia.pcd+wbxml"/>
- <mime-type type="application/vnd.nokia.pcd+xml"/>
- <mime-type type="application/vnd.nokia.radio-preset">
- <glob pattern="*.rpst"/>
- </mime-type>
- <mime-type type="application/vnd.nokia.radio-presets">
- <glob pattern="*.rpss"/>
- </mime-type>
- <mime-type type="application/vnd.novadigm.edm">
- <glob pattern="*.edm"/>
- </mime-type>
- <mime-type type="application/vnd.novadigm.edx">
- <glob pattern="*.edx"/>
- </mime-type>
- <mime-type type="application/vnd.novadigm.ext">
- <glob pattern="*.ext"/>
- </mime-type>
-
- <!-- =================================================================== -->
- <!-- Open Document Format for Office Applications (OpenDocument) v1.0 -->
- <!-- http://www.oasis-open.org/specs/index.php#opendocumentv1.0 -->
- <!-- =================================================================== -->
-
- <mime-type type="application/vnd.oasis.opendocument.chart">
- <alias type="application/x-vnd.oasis.opendocument.chart"/>
- <comment>OpenDocument v1.0: Chart document</comment>
- <magic>
- <match type="string" offset="0" value="PK">
- <match type="string" offset="30"
- value="mimetypeapplication/vnd.oasis.opendocument.chart"/>
- </match>
- </magic>
- <glob pattern="*.odc"/>
- </mime-type>
-
- <mime-type type="application/vnd.oasis.opendocument.chart-template">
- <alias type="application/x-vnd.oasis.opendocument.chart-template"/>
- <comment>OpenDocument v1.0: Chart document used as template</comment>
- <magic>
- <match type="string" offset="0" value="PK">
- <match type="string" offset="30"
- value="mimetypeapplication/vnd.oasis.opendocument.chart-template"/>
- </match>
- </magic>
- <glob pattern="*.otc"/>
- </mime-type>
-
- <mime-type type="application/vnd.oasis.opendocument.database">
- <glob pattern="*.odb"/>
- </mime-type>
-
- <mime-type type="application/vnd.oasis.opendocument.formula">
- <alias type="application/x-vnd.oasis.opendocument.formula"/>
- <comment>OpenDocument v1.0: Formula document</comment>
- <magic>
- <match type="string" offset="0" value="PK">
- <match type="string" offset="30"
- value="mimetypeapplication/vnd.oasis.opendocument.formula" />
- </match>
- </magic>
- <glob pattern="*.odf"/>
- </mime-type>
-
- <mime-type type="application/vnd.oasis.opendocument.formula-template">
- <alias type="application/x-vnd.oasis.opendocument.formula-template"/>
- <comment>OpenDocument v1.0: Formula document used as template</comment>
- <magic>
- <match type="string" offset="0" value="PK">
- <match type="string" offset="30"
- value="mimetypeapplication/vnd.oasis.opendocument.formula-template"/>
- </match>
- </magic>
- <glob pattern="*.odft"/>
- </mime-type>
-
- <mime-type type="application/vnd.oasis.opendocument.graphics">
- <alias type="application/x-vnd.oasis.opendocument.graphics"/>
- <comment>OpenDocument v1.0: Graphics document (Drawing)</comment>
- <magic>
- <match type="string" offset="0" value="PK">
- <match type="string" offset="30"
- value="mimetypeapplication/vnd.oasis.opendocument.graphics"/>
- </match>
- </magic>
- <glob pattern="*.odg"/>
- </mime-type>
-
- <mime-type type="application/vnd.oasis.opendocument.graphics-template">
- <alias type="application/x-vnd.oasis.opendocument.graphics-template"/>
- <comment>OpenDocument v1.0: Graphics document used as template</comment>
- <magic>
- <match type="string" offset="0" value="PK">
- <match type="string" offset="30"
- value="mimetypeapplication/vnd.oasis.opendocument.graphics-template"/>
- </match>
- </magic>
- <glob pattern="*.otg"/>
- </mime-type>
-
- <mime-type type="application/vnd.oasis.opendocument.image">
- <alias type="application/x-vnd.oasis.opendocument.image"/>
- <comment>OpenDocument v1.0: Image document</comment>
- <magic>
- <match type="string" offset="0" value="PK">
- <match type="string" offset="30"
- value="mimetypeapplication/vnd.oasis.opendocument.image"/>
- </match>
- </magic>
- <glob pattern="*.odi"/>
- </mime-type>
-
- <mime-type type="application/vnd.oasis.opendocument.image-template">
- <alias type="application/x-vnd.oasis.opendocument.image-template"/>
- <comment>OpenDocument v1.0: Image document used as template</comment>
- <magic>
- <match type="string" offset="0" value="PK">
- <match type="string" offset="30"
- value="mimetypeapplication/vnd.oasis.opendocument.image-template"/>
- </match>
- </magic>
- <glob pattern="*.oti"/>
- </mime-type>
-
- <mime-type type="application/vnd.oasis.opendocument.presentation">
- <alias type="application/x-vnd.oasis.opendocument.presentation"/>
- <comment>OpenDocument v1.0: Presentation document</comment>
- <magic>
- <match type="string" offset="0" value="PK">
- <match type="string" offset="30"
- value="mimetypeapplication/vnd.oasis.opendocument.presentation"/>
- </match>
- </magic>
- <glob pattern="*.odp"/>
- </mime-type>
-
- <mime-type type="application/vnd.oasis.opendocument.presentation-template">
- <alias type="application/x-vnd.oasis.opendocument.presentation-template"/>
- <comment>OpenDocument v1.0: Presentation document used as template</comment>
- <magic>
- <match type="string" offset="0" value="PK">
- <match type="string" offset="30"
- value="mimetypeapplication/vnd.oasis.opendocument.presentation-template"/>
- </match>
- </magic>
- <glob pattern="*.otp"/>
- </mime-type>
-
- <mime-type type="application/vnd.oasis.opendocument.spreadsheet">
- <alias type="application/x-vnd.oasis.opendocument.spreadsheet"/>
- <comment>OpenDocument v1.0: Spreadsheet document</comment>
- <magic>
- <match type="string" offset="0" value="PK">
- <match type="string" offset="30"
- value="mimetypeapplication/vnd.oasis.opendocument.spreadsheet"/>
- </match>
- </magic>
- <glob pattern="*.ods"/>
- </mime-type>
-
- <mime-type type="application/vnd.oasis.opendocument.spreadsheet-template">
- <alias type="application/x-vnd.oasis.opendocument.spreadsheet-template"/>
- <comment>OpenDocument v1.0: Spreadsheet document used as template</comment>
- <magic>
- <match type="string" offset="0" value="PK">
- <match type="string" offset="30"
- value="mimetypeapplication/vnd.oasis.opendocument.spreadsheet-template"/>
- </match>
- </magic>
- <glob pattern="*.ots"/>
- </mime-type>
-
- <mime-type type="application/vnd.oasis.opendocument.text">
- <alias type="application/x-vnd.oasis.opendocument.text"/>
- <comment>OpenDocument v1.0: Text document</comment>
- <magic>
- <match type="string" offset="0" value="PK">
- <match type="string" offset="30"
- value="mimetypeapplication/vnd.oasis.opendocument.text"/>
- </match>
- </magic>
- <glob pattern="*.odt"/>
- </mime-type>
-
- <mime-type type="application/vnd.oasis.opendocument.text-master">
- <alias type="application/x-vnd.oasis.opendocument.text-master"/>
- <comment>OpenDocument v1.0: Global Text document</comment>
- <magic>
- <match type="string" offset="0" value="PK">
- <match type="string" offset="30"
- value="mimetypeapplication/vnd.oasis.opendocument.text-master"/>
- </match>
- </magic>
- <glob pattern="*.otm"/>
- </mime-type>
-
- <mime-type type="application/vnd.oasis.opendocument.text-template">
- <alias type="application/x-vnd.oasis.opendocument.text-template"/>
- <comment>OpenDocument v1.0: Text document used as template</comment>
- <magic>
- <match type="string" offset="0" value="PK">
- <match type="string" offset="30"
- value="mimetypeapplication/vnd.oasis.opendocument.text-template"/>
- </match>
- </magic>
- <glob pattern="*.ott"/>
- </mime-type>
-
- <mime-type type="application/vnd.oasis.opendocument.text-web">
- <alias type="application/x-vnd.oasis.opendocument.text-web"/>
- <comment>OpenDocument v1.0: Text document used as template for HTML documents</comment>
- <magic>
- <match type="string" offset="0" value="PK">
- <match type="string" offset="30"
- value="mimetypeapplication/vnd.oasis.opendocument.text-web"/>
- </match>
- </magic>
- <glob pattern="*.oth"/>
- </mime-type>
-
- <mime-type type="application/vnd.obn"/>
- <mime-type type="application/vnd.olpc-sugar">
- <glob pattern="*.xo"/>
- </mime-type>
- <mime-type type="application/vnd.oma-scws-config"/>
- <mime-type type="application/vnd.oma-scws-http-request"/>
- <mime-type type="application/vnd.oma-scws-http-response"/>
- <mime-type type="application/vnd.oma.bcast.associated-procedure-parameter+xml"/>
- <mime-type type="application/vnd.oma.bcast.drm-trigger+xml"/>
- <mime-type type="application/vnd.oma.bcast.imd+xml"/>
- <mime-type type="application/vnd.oma.bcast.ltkm"/>
- <mime-type type="application/vnd.oma.bcast.notification+xml"/>
- <mime-type type="application/vnd.oma.bcast.provisioningtrigger"/>
- <mime-type type="application/vnd.oma.bcast.sgboot"/>
- <mime-type type="application/vnd.oma.bcast.sgdd+xml"/>
- <mime-type type="application/vnd.oma.bcast.sgdu"/>
- <mime-type type="application/vnd.oma.bcast.simple-symbol-container"/>
- <mime-type type="application/vnd.oma.bcast.smartcard-trigger+xml"/>
- <mime-type type="application/vnd.oma.bcast.sprov+xml"/>
- <mime-type type="application/vnd.oma.bcast.stkm"/>
- <mime-type type="application/vnd.oma.dcd"/>
- <mime-type type="application/vnd.oma.dcdc"/>
- <mime-type type="application/vnd.oma.dd2+xml">
- <glob pattern="*.dd2"/>
- </mime-type>
- <mime-type type="application/vnd.oma.drm.risd+xml"/>
- <mime-type type="application/vnd.oma.group-usage-list+xml"/>
- <mime-type type="application/vnd.oma.poc.detailed-progress-report+xml"/>
- <mime-type type="application/vnd.oma.poc.final-report+xml"/>
- <mime-type type="application/vnd.oma.poc.groups+xml"/>
- <mime-type type="application/vnd.oma.poc.invocation-descriptor+xml"/>
- <mime-type type="application/vnd.oma.poc.optimized-progress-report+xml"/>
- <mime-type type="application/vnd.oma.xcap-directory+xml"/>
- <mime-type type="application/vnd.omads-email+xml"/>
- <mime-type type="application/vnd.omads-file+xml"/>
- <mime-type type="application/vnd.omads-folder+xml"/>
- <mime-type type="application/vnd.omaloc-supl-init"/>
-
- <mime-type type="application/vnd.openofficeorg.extension">
- <glob pattern="*.oxt"/>
- </mime-type>
-
- <mime-type type="application/vnd.openxmlformats-officedocument.presentationml.presentation">
- <comment>Office Open XML Presentation</comment>
- <glob pattern="*.pptx"/>
- <glob pattern="*.thmx"/>
- <sub-class-of type="application/x-tika-ooxml"/>
- </mime-type>
-
- <mime-type type="application/vnd.openxmlformats-officedocument.presentationml.slide">
- <glob pattern="*.sldx"/>
- <sub-class-of type="application/x-tika-ooxml"/>
- </mime-type>
-
- <mime-type type="application/vnd.openxmlformats-officedocument.presentationml.slideshow">
- <glob pattern="*.ppsx"/>
- <sub-class-of type="application/x-tika-ooxml"/>
- </mime-type>
-
- <mime-type type="application/vnd.openxmlformats-officedocument.presentationml.template">
- <comment>Office Open XML Presentation Template</comment>
- <glob pattern="*.potx"/>
- <sub-class-of type="application/x-tika-ooxml"/>
- </mime-type>
-
- <mime-type type="application/vnd.openxmlformats-officedocument.presentationml.slideshow">
- <comment>Office Open XML Presentation Slideshow</comment>
- <glob pattern="*.ppsx"/>
- <sub-class-of type="application/x-tika-ooxml"/>
- </mime-type>
-
- <mime-type type="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet">
- <comment>Office Open XML Workbook</comment>
- <glob pattern="*.xlsx"/>
- <sub-class-of type="application/x-tika-ooxml"/>
- </mime-type>
-
- <mime-type type="application/vnd.openxmlformats-officedocument.spreadsheetml.template">
- <comment>Office Open XML Workbook Template</comment>
- <glob pattern="*.xltx"/>
- <sub-class-of type="application/x-tika-ooxml"/>
- </mime-type>
-
- <mime-type type="application/vnd.ms-excel.template.macroenabled.12">
- <comment>Office Open XML Workbook Template (macro-enabled)</comment>
- <glob pattern="*.xltm"/>
- <sub-class-of type="application/x-tika-ooxml"/>
- </mime-type>
-
- <mime-type type="application/vnd.openxmlformats-officedocument.wordprocessingml.document">
- <comment>Office Open XML Document</comment>
- <glob pattern="*.docx"/>
- <sub-class-of type="application/x-tika-ooxml"/>
- </mime-type>
-
- <mime-type type="application/vnd.openxmlformats-officedocument.wordprocessingml.template">
- <comment>Office Open XML Document Template</comment>
- <glob pattern="*.dotx"/>
- <sub-class-of type="application/x-tika-ooxml"/>
- </mime-type>
-
- <mime-type type="application/vnd.osa.netdeploy"/>
- <mime-type type="application/vnd.osgi.bundle"/>
- <mime-type type="application/vnd.osgi.dp">
- <glob pattern="*.dp"/>
- </mime-type>
- <mime-type type="application/vnd.otps.ct-kip+xml"/>
- <mime-type type="application/vnd.palm">
- <glob pattern="*.pdb"/>
- <glob pattern="*.pqa"/>
- <glob pattern="*.oprc"/>
- </mime-type>
- <mime-type type="application/vnd.paos.xml"/>
- <mime-type type="application/vnd.pg.format">
- <glob pattern="*.str"/>
- </mime-type>
- <mime-type type="application/vnd.pg.osasli">
- <glob pattern="*.ei6"/>
- </mime-type>
- <mime-type type="application/vnd.piaccess.application-licence"/>
- <mime-type type="application/vnd.picsel">
- <glob pattern="*.efif"/>
- </mime-type>
- <mime-type type="application/vnd.poc.group-advertisement+xml"/>
- <mime-type type="application/vnd.pocketlearn">
- <glob pattern="*.plf"/>
- </mime-type>
- <mime-type type="application/vnd.powerbuilder6">
- <glob pattern="*.pbd"/>
- </mime-type>
- <mime-type type="application/vnd.powerbuilder6-s"/>
- <mime-type type="application/vnd.powerbuilder7"/>
- <mime-type type="application/vnd.powerbuilder7-s"/>
- <mime-type type="application/vnd.powerbuilder75"/>
- <mime-type type="application/vnd.powerbuilder75-s"/>
- <mime-type type="application/vnd.preminet"/>
- <mime-type type="application/vnd.previewsystems.box">
- <glob pattern="*.box"/>
- </mime-type>
- <mime-type type="application/vnd.proteus.magazine">
- <glob pattern="*.mgz"/>
- </mime-type>
- <mime-type type="application/vnd.publishare-delta-tree">
- <glob pattern="*.qps"/>
- </mime-type>
- <mime-type type="application/vnd.pvi.ptid1">
- <glob pattern="*.ptid"/>
- </mime-type>
- <mime-type type="application/vnd.pwg-multiplexed"/>
- <mime-type type="application/vnd.pwg-xhtml-print+xml"/>
- <mime-type type="application/vnd.qualcomm.brew-app-res"/>
- <mime-type type="application/vnd.quark.quarkxpress">
- <glob pattern="*.qxd"/>
- <glob pattern="*.qxt"/>
- <glob pattern="*.qwd"/>
- <glob pattern="*.qwt"/>
- <glob pattern="*.qxl"/>
- <glob pattern="*.qxb"/>
- </mime-type>
- <mime-type type="application/vnd.rapid"/>
- <mime-type type="application/vnd.recordare.musicxml">
- <glob pattern="*.mxl"/>
- </mime-type>
- <mime-type type="application/vnd.recordare.musicxml+xml">
- <glob pattern="*.musicxml"/>
- </mime-type>
- <mime-type type="application/vnd.renlearn.rlprint"/>
- <mime-type type="application/vnd.rim.cod">
- <glob pattern="*.cod"/>
- </mime-type>
-
- <mime-type type="application/vnd.rn-realmedia">
- <magic priority="50">
- <match value=".RMF" type="string" offset="0" />
- </magic>
- <glob pattern="*.rm"/>
- </mime-type>
-
- <mime-type type="application/vnd.route66.link66+xml">
- <glob pattern="*.link66"/>
- </mime-type>
- <mime-type type="application/vnd.ruckus.download"/>
- <mime-type type="application/vnd.s3sms"/>
- <mime-type type="application/vnd.sbm.cid"/>
- <mime-type type="application/vnd.sbm.mid2"/>
- <mime-type type="application/vnd.scribus"/>
- <mime-type type="application/vnd.sealed.3df"/>
- <mime-type type="application/vnd.sealed.csf"/>
- <mime-type type="application/vnd.sealed.doc"/>
- <mime-type type="application/vnd.sealed.eml"/>
- <mime-type type="application/vnd.sealed.mht"/>
- <mime-type type="application/vnd.sealed.net"/>
- <mime-type type="application/vnd.sealed.ppt"/>
- <mime-type type="application/vnd.sealed.tiff"/>
- <mime-type type="application/vnd.sealed.xls"/>
- <mime-type type="application/vnd.sealedmedia.softseal.html"/>
- <mime-type type="application/vnd.sealedmedia.softseal.pdf"/>
- <mime-type type="application/vnd.seemail">
- <glob pattern="*.see"/>
- </mime-type>
- <mime-type type="application/vnd.sema">
- <glob pattern="*.sema"/>
- </mime-type>
- <mime-type type="application/vnd.semd">
- <glob pattern="*.semd"/>
- </mime-type>
- <mime-type type="application/vnd.semf">
- <glob pattern="*.semf"/>
- </mime-type>
- <mime-type type="application/vnd.shana.informed.formdata">
- <glob pattern="*.ifm"/>
- </mime-type>
- <mime-type type="application/vnd.shana.informed.formtemplate">
- <glob pattern="*.itp"/>
- </mime-type>
- <mime-type type="application/vnd.shana.informed.interchange">
- <glob pattern="*.iif"/>
- </mime-type>
- <mime-type type="application/vnd.shana.informed.package">
- <glob pattern="*.ipk"/>
- </mime-type>
- <mime-type type="application/vnd.simtech-mindmapper">
- <glob pattern="*.twd"/>
- <glob pattern="*.twds"/>
- </mime-type>
- <mime-type type="application/vnd.smaf">
- <glob pattern="*.mmf"/>
- </mime-type>
- <mime-type type="application/vnd.smart.teacher">
- <glob pattern="*.teacher"/>
- </mime-type>
- <mime-type type="application/vnd.software602.filler.form+xml"/>
- <mime-type type="application/vnd.software602.filler.form-xml-zip"/>
- <mime-type type="application/vnd.solent.sdkm+xml">
- <glob pattern="*.sdkm"/>
- <glob pattern="*.sdkd"/>
- </mime-type>
- <mime-type type="application/vnd.spotfire.dxp">
- <glob pattern="*.dxp"/>
- </mime-type>
- <mime-type type="application/vnd.spotfire.sfs">
- <glob pattern="*.sfs"/>
- </mime-type>
- <mime-type type="application/vnd.sss-cod"/>
- <mime-type type="application/vnd.sss-dtf"/>
- <mime-type type="application/vnd.sss-ntf"/>
- <mime-type type="application/vnd.stardivision.calc">
- <glob pattern="*.sdc"/>
- </mime-type>
- <mime-type type="application/vnd.stardivision.draw">
- <glob pattern="*.sda"/>
- </mime-type>
- <mime-type type="application/vnd.stardivision.impress">
- <glob pattern="*.sdd"/>
- </mime-type>
- <mime-type type="application/vnd.stardivision.math">
- <glob pattern="*.smf"/>
- </mime-type>
- <mime-type type="application/vnd.stardivision.writer">
- <glob pattern="*.sdw"/>
- </mime-type>
- <mime-type type="application/vnd.stardivision.writer">
- <glob pattern="*.vor"/>
- </mime-type>
- <mime-type type="application/vnd.stardivision.writer-global">
- <glob pattern="*.sgl"/>
- </mime-type>
- <mime-type type="application/vnd.street-stream"/>
- <mime-type type="application/vnd.sun.xml.calc">
- <glob pattern="*.sxc"/>
- </mime-type>
- <mime-type type="application/vnd.sun.xml.calc.template">
- <glob pattern="*.stc"/>
- </mime-type>
- <mime-type type="application/vnd.sun.xml.draw">
- <glob pattern="*.sxd"/>
- </mime-type>
- <mime-type type="application/vnd.sun.xml.draw.template">
- <glob pattern="*.std"/>
- </mime-type>
- <mime-type type="application/vnd.sun.xml.impress">
- <glob pattern="*.sxi"/>
- </mime-type>
- <mime-type type="application/vnd.sun.xml.impress.template">
- <glob pattern="*.sti"/>
- </mime-type>
- <mime-type type="application/vnd.sun.xml.math">
- <glob pattern="*.sxm"/>
- </mime-type>
-
- <mime-type type="application/vnd.sun.xml.writer">
- <alias type="application/x-vnd.sun.xml.writer"/>
- <comment>OpenOffice v1.0: Writer Document</comment>
- <magic>
- <match type="string" offset="0" value="PK">
- <match type="string" offset="30"
- value="mimetypeapplication/vnd.sun.xml.writer"/>
- </match>
- </magic>
- <glob pattern="*.sxw"/>
- </mime-type>
-
- <mime-type type="application/vnd.sun.xml.writer.global">
- <glob pattern="*.sxg"/>
- </mime-type>
- <mime-type type="application/vnd.sun.xml.writer.template">
- <glob pattern="*.stw"/>
- </mime-type>
- <mime-type type="application/vnd.sun.wadl+xml"/>
- <mime-type type="application/vnd.sus-calendar">
- <glob pattern="*.sus"/>
- <glob pattern="*.susp"/>
- </mime-type>
- <mime-type type="application/vnd.svd">
- <glob pattern="*.svd"/>
- </mime-type>
- <mime-type type="application/vnd.swiftview-ics"/>
-
- <mime-type type="application/vnd.symbian.install">
- <magic priority="50">
- <match value="0x10000419" type="little32" offset="8" />
- </magic>
- <glob pattern="*.sis"/>
- <glob pattern="*.sisx"/>
- </mime-type>
-
- <mime-type type="application/vnd.syncml+xml">
- <glob pattern="*.xsm"/>
- </mime-type>
- <mime-type type="application/vnd.syncml.dm+wbxml">
- <glob pattern="*.bdm"/>
- </mime-type>
- <mime-type type="application/vnd.syncml.dm+xml">
- <glob pattern="*.xdm"/>
- </mime-type>
- <mime-type type="application/vnd.syncml.dm.notification"/>
- <mime-type type="application/vnd.syncml.ds.notification"/>
- <mime-type type="application/vnd.tao.intent-module-archive">
- <glob pattern="*.tao"/>
- </mime-type>
- <mime-type type="application/vnd.tmobile-livetv">
- <glob pattern="*.tmo"/>
- </mime-type>
- <mime-type type="application/vnd.trid.tpt">
- <glob pattern="*.tpt"/>
- </mime-type>
- <mime-type type="application/vnd.triscape.mxs">
- <glob pattern="*.mxs"/>
- </mime-type>
- <mime-type type="application/vnd.trueapp">
- <glob pattern="*.tra"/>
- </mime-type>
- <mime-type type="application/vnd.truedoc"/>
- <mime-type type="application/vnd.ufdl">
- <glob pattern="*.ufd"/>
- <glob pattern="*.ufdl"/>
- </mime-type>
- <mime-type type="application/vnd.uiq.theme">
- <glob pattern="*.utz"/>
- </mime-type>
- <mime-type type="application/vnd.umajin">
- <glob pattern="*.umj"/>
- </mime-type>
- <mime-type type="application/vnd.unity">
- <glob pattern="*.unityweb"/>
- </mime-type>
- <mime-type type="application/vnd.uoml+xml">
- <glob pattern="*.uoml"/>
- </mime-type>
- <mime-type type="application/vnd.uplanet.alert"/>
- <mime-type type="application/vnd.uplanet.alert-wbxml"/>
- <mime-type type="application/vnd.uplanet.bearer-choice"/>
- <mime-type type="application/vnd.uplanet.bearer-choice-wbxml"/>
- <mime-type type="application/vnd.uplanet.cacheop"/>
- <mime-type type="application/vnd.uplanet.cacheop-wbxml"/>
- <mime-type type="application/vnd.uplanet.channel"/>
- <mime-type type="application/vnd.uplanet.channel-wbxml"/>
- <mime-type type="application/vnd.uplanet.list"/>
- <mime-type type="application/vnd.uplanet.list-wbxml"/>
- <mime-type type="application/vnd.uplanet.listcmd"/>
- <mime-type type="application/vnd.uplanet.listcmd-wbxml"/>
- <mime-type type="application/vnd.uplanet.signal"/>
- <mime-type type="application/vnd.vcx">
- <glob pattern="*.vcx"/>
- </mime-type>
- <mime-type type="application/vnd.vd-study"/>
- <mime-type type="application/vnd.vectorworks"/>
- <mime-type type="application/vnd.vidsoft.vidconference"/>
-
- <!-- http://www.iana.org/assignments/media-types/application/vnd.visio -->
- <mime-type type="application/vnd.visio">
- <comment>Microsoft Visio Diagram</comment>
- <glob pattern="*.vsd"/>
- <glob pattern="*.vst"/>
- <glob pattern="*.vss"/>
- <glob pattern="*.vsw"/>
- <sub-class-of type="application/x-tika-msoffice"/>
- </mime-type>
-
- <mime-type type="application/vnd.visionary">
- <glob pattern="*.vis"/>
- </mime-type>
- <mime-type type="application/vnd.vividence.scriptfile"/>
- <mime-type type="application/vnd.vsf">
- <glob pattern="*.vsf"/>
- </mime-type>
- <mime-type type="application/vnd.wap.sic"/>
- <mime-type type="application/vnd.wap.slc"/>
-
- <mime-type type="application/vnd.wap.wbxml">
- <glob pattern="*.wbxml"/>
- </mime-type>
-
- <mime-type type="application/vnd.wap.wmlc">
- <_comment>Compiled WML Document</_comment>
- <glob pattern="*.wmlc"/>
- </mime-type>
-
- <mime-type type="application/vnd.wap.wmlscriptc">
- <_comment>Compiled WML Script</_comment>
- <glob pattern="*.wmlsc"/>
- </mime-type>
-
- <mime-type type="application/vnd.webturbo">
- <glob pattern="*.wtb"/>
- </mime-type>
- <mime-type type="application/vnd.wfa.wsc"/>
- <mime-type type="application/vnd.wmc"/>
- <mime-type type="application/vnd.wmf.bootstrap"/>
- <mime-type type="application/vnd.wordperfect">
- <glob pattern="*.wpd"/>
- </mime-type>
- <mime-type type="application/vnd.wqd">
- <glob pattern="*.wqd"/>
- </mime-type>
- <mime-type type="application/vnd.wrq-hp3000-labelled"/>
- <mime-type type="application/vnd.wt.stf">
- <glob pattern="*.stf"/>
- </mime-type>
- <mime-type type="application/vnd.wv.csp+wbxml"/>
- <mime-type type="application/vnd.wv.csp+xml"/>
- <mime-type type="application/vnd.wv.ssp+xml"/>
- <mime-type type="application/vnd.xara">
- <glob pattern="*.xar"/>
- </mime-type>
- <mime-type type="application/vnd.xfdl">
- <glob pattern="*.xfdl"/>
- </mime-type>
- <mime-type type="application/vnd.xfdl.webform"/>
- <mime-type type="application/vnd.xmi+xml"/>
- <mime-type type="application/vnd.xmpie.cpkg"/>
- <mime-type type="application/vnd.xmpie.dpkg"/>
- <mime-type type="application/vnd.xmpie.plan"/>
- <mime-type type="application/vnd.xmpie.ppkg"/>
- <mime-type type="application/vnd.xmpie.xlim"/>
- <mime-type type="application/vnd.yamaha.hv-dic">
- <glob pattern="*.hvd"/>
- </mime-type>
- <mime-type type="application/vnd.yamaha.hv-script">
- <glob pattern="*.hvs"/>
- </mime-type>
- <mime-type type="application/vnd.yamaha.hv-voice">
- <glob pattern="*.hvp"/>
- </mime-type>
- <mime-type type="application/vnd.yamaha.openscoreformat">
- <glob pattern="*.osf"/>
- </mime-type>
- <mime-type type="application/vnd.yamaha.openscoreformat.osfpvg+xml">
- <glob pattern="*.osfpvg"/>
- </mime-type>
- <mime-type type="application/vnd.yamaha.smaf-audio">
- <glob pattern="*.saf"/>
- </mime-type>
- <mime-type type="application/vnd.yamaha.smaf-phrase">
- <glob pattern="*.spf"/>
- </mime-type>
- <mime-type type="application/vnd.yellowriver-custom-menu">
- <glob pattern="*.cmp"/>
- </mime-type>
- <mime-type type="application/vnd.zul">
- <glob pattern="*.zir"/>
- <glob pattern="*.zirz"/>
- </mime-type>
- <mime-type type="application/vnd.zzazz.deck+xml">
- <glob pattern="*.zaz"/>
- </mime-type>
- <mime-type type="application/voicexml+xml">
- <glob pattern="*.vxml"/>
- </mime-type>
- <mime-type type="application/watcherinfo+xml"/>
- <mime-type type="application/whoispp-query"/>
- <mime-type type="application/whoispp-response"/>
- <mime-type type="application/winhlp">
- <glob pattern="*.hlp"/>
- </mime-type>
- <mime-type type="application/wita"/>
- <mime-type type="application/wordperfect5.1"/>
- <mime-type type="application/wsdl+xml">
- <glob pattern="*.wsdl"/>
- </mime-type>
- <mime-type type="application/wspolicy+xml">
- <glob pattern="*.wspolicy"/>
- </mime-type>
-
- <mime-type type="application/x-123">
- <magic priority="50">
- <match value="0x00001a00" type="big32" offset="0" />
- <match value="0x00000200" type="big32" offset="0" />
- </magic>
- </mime-type>
-
- <mime-type type="application/x-abiword">
- <glob pattern="*.abw"/>
- </mime-type>
- <mime-type type="application/x-ace-compressed">
- <glob pattern="*.ace"/>
- </mime-type>
-
- <mime-type type="application/x-adobe-indesign">
- <acronym>INDD</acronym>
- <comment>Adobe InDesign document</comment>
- <glob pattern="*.indd"/>
- </mime-type>
-
- <mime-type type="application/x-adobe-indesign-interchange">
- <acronym>INX</acronym>
- <comment>Adobe InDesign Interchange format</comment>
- <magic priority="50">
- <match value="<?aid" type="string" offset="0:100"/>
- </magic>
- <glob pattern="*.inx"/>
- <sub-class-of type="application/xml"/>
- </mime-type>
-
- <mime-type type="application/x-archive">
- <magic priority="50">
- <match value="=<ar>" type="string" offset="0"/>
- <match value="=!<arch>" type="string" offset="0"/>
- </magic>
- <glob patter="*.ar"/>
- </mime-type>
-
- <mime-type type="application/x-authorware-bin">
- <glob pattern="*.aab"/>
- <glob pattern="*.x32"/>
- <glob pattern="*.u32"/>
- <glob pattern="*.vox"/>
- </mime-type>
- <mime-type type="application/x-authorware-map">
- <glob pattern="*.aam"/>
- </mime-type>
- <mime-type type="application/x-authorware-seg">
- <glob pattern="*.aas"/>
- </mime-type>
- <mime-type type="application/x-bcpio">
- <glob pattern="*.bcpio"/>
- </mime-type>
-
- <mime-type type="application/x-berkeley-db">
- <magic priority="50">
- <match value="0x00061561" type="big32" offset="0"/>
- <match value="0x00061561" type="host32" offset="12"/>
- <match value="0x00061561" type="big32" offset="12"/>
- <match value="0x00061561" type="little32" offset="12"/>
- <match value="0x00053162" type="host32" offset="12"/>
- <match value="0x00053162" type="big32" offset="12"/>
- <match value="0x00053162" type="little32" offset="12"/>
- <match value="0x00042253" type="host32" offset="12"/>
- <match value="0x00042253" type="big32" offset="12"/>
- <match value="0x00042253" type="little32" offset="12"/>
- <match value="0x00040988" type="host32" offset="12"/>
- <match value="0x00040988" type="little32" offset="12"/>
- <match value="0x00040988" type="big32" offset="12"/>
- <match value="0x00053162" type="host32" offset="0"/>
- <match value="0x00053162" type="big32" offset="0"/>
- <match value="0x00053162" type="little32" offset="0"/>
- </magic>
- </mime-type>
-
- <mime-type type="application/x-bibtex-text-file">
- <magic priority="50">
- <match value="%\ BibTeX\ `" type="string" offset="0"/>
- <match value="%%%\ \ " type="string" offset="73"/>
- <match value="%\ BibTeX\ standard\ bibliography\ " type="string" offset="0"/>
- <match value="%%%\ \ @BibTeX-style-file{" type="string" offset="73"/>
- <match value="@article{" type="string" offset="0"/>
- <match value="@book{" type="string" offset="0"/>
- <match value="@inbook{" type="string" offset="0"/>
- <match value="@incollection{" type="string" offset="0"/>
- <match value="@inproceedings{" type="string" offset="0"/>
- <match value="@manual{" type="string" offset="0"/>
- <match value="@misc{" type="string" offset="0"/>
- <match value="@preamble{" type="string" offset="0"/>
- <match value="@phdthesis{" type="string" offset="0"/>
- <match value="@techreport{" type="string" offset="0"/>
- <match value="@unpublished{" type="string" offset="0"/>
- </magic>
- <glob pattern="*.bib"/>
- <glob pattern="*.bibtex"/>
- </mime-type>
-
- <mime-type type="application/x-bittorrent">
- <magic priority="50">
- <match value="d8:announce" type="string" offset="0"/>
- </magic>
- <glob pattern="*.torrent"/>
- </mime-type>
-
- <mime-type type="application/x-bzip">
- <magic priority="40">
- <match value="BZh" type="string" offset="0"/>
- </magic>
- <glob pattern="*.bz"/>
- <glob pattern="*.tbz"/>
- </mime-type>
-
- <mime-type type="application/x-bzip2">
- <glob pattern="*.bz2"/>
- <glob pattern="*.tbz2"/>
- <glob pattern="*.boz"/>
- <sub-class-of type="application/x-bzip"/>
- </mime-type>
-
- <mime-type type="application/x-cdlink">
- <_comment>Virtual CD-ROM CD Image File</_comment>
- <glob pattern="*.vcd"/>
- </mime-type>
-
- <mime-type type="application/x-chat">
- <glob pattern="*.chat"/>
- </mime-type>
- <mime-type type="application/x-chess-pgn">
- <glob pattern="*.pgn"/>
- </mime-type>
-
- <mime-type type="application/x-compress">
- <magic priority="50">
- <match value="\037\235" type="string" offset="0"/>
- </magic>
- <glob pattern="*.z"/>
- </mime-type>
-
- <mime-type type="application/x-cpio">
- <magic priority="50">
- <match value="070707" type="little16" offset="0"/>
- <match value="070707" type="big16" offset="0"/>
- <match value="070707" type="string" offset="0"/>
- <match value="070701" type="string" offset="0"/>
- <match value="070702" type="string" offset="0"/>
- </magic>
- <glob pattern="*.cpio"/>
- </mime-type>
-
- <mime-type type="application/x-csh">
- <glob pattern="*.csh"/>
- </mime-type>
-
- <mime-type type="application/x-debian-package">
- <glob pattern="*.deb"/>
- <glob pattern="*.udeb"/>
- </mime-type>
-
- <mime-type type="application/x-director">
- <_comment>Shockwave Movie</_comment>
- <glob pattern="*.dir"/>
- <glob pattern="*.dcr"/>
- <glob pattern="*.dxr"/>
- <glob pattern="*.cst"/>
- <glob pattern="*.cct"/>
- <glob pattern="*.cxt"/>
- <glob pattern="*.w3d"/>
- <glob pattern="*.fgd"/>
- <glob pattern="*.swa"/>
- </mime-type>
-
- <mime-type type="application/x-doom">
- <glob pattern="*.wad"/>
- </mime-type>
- <mime-type type="application/x-dtbncx+xml">
- <glob pattern="*.ncx"/>
- </mime-type>
- <mime-type type="application/x-dtbook+xml">
- <glob pattern="*.dtb"/>
- </mime-type>
- <mime-type type="application/x-dtbresource+xml">
- <glob pattern="*.res"/>
- </mime-type>
-
- <mime-type type="application/x-dvi">
- <magic priority="50">
- <match value="\367\002" type="string" offset="0"/>
- <match value="0x02f7" type="little16" offset="0"/>
- </magic>
- <glob pattern="*.dvi"/>
- </mime-type>
-
- <mime-type type="application/x-elc">
- <comment>Emacs Lisp bytecode</comment>
- <magic priority="50">
- <!-- Emacs 18 -->
- <match value="\012(" type="string" offset="0" />
- <!-- Emacs 19 -->
- <match value=";ELC\023\000\000\000" type="string" offset="0" />
- </magic>
- <glob pattern="*.elc"/>
- </mime-type>
-
- <mime-type type="application/x-font-bdf">
- <glob pattern="*.bdf"/>
- </mime-type>
- <mime-type type="application/x-font-dos"/>
- <mime-type type="application/x-font-framemaker"/>
- <mime-type type="application/x-font-ghostscript">
- <glob pattern="*.gsf"/>
- </mime-type>
- <mime-type type="application/x-font-libgrx"/>
- <mime-type type="application/x-font-linux-psf">
- <glob pattern="*.psf"/>
- </mime-type>
- <mime-type type="application/x-font-otf">
- <glob pattern="*.otf"/>
- </mime-type>
- <mime-type type="application/x-font-pcf">
- <glob pattern="*.pcf"/>
- </mime-type>
- <mime-type type="application/x-font-snf">
- <glob pattern="*.snf"/>
- </mime-type>
- <mime-type type="application/x-font-speedo"/>
- <mime-type type="application/x-font-sunos-news"/>
- <mime-type type="application/x-font-ttf">
- <glob pattern="*.ttf"/>
- <glob pattern="*.ttc"/>
- </mime-type>
- <mime-type type="application/x-font-type1">
- <glob pattern="*.pfa"/>
- <glob pattern="*.pfb"/>
- <glob pattern="*.pfm"/>
- <glob pattern="*.afm"/>
- </mime-type>
- <mime-type type="application/x-font-vfont"/>
-
- <mime-type type="application/x-futuresplash">
- <_comment>Macromedia FutureSplash File</_comment>
- <glob pattern="*.spl"/>
- </mime-type>
-
- <mime-type type="application/x-gnucash">
- <glob pattern="*.gnucash" />
- </mime-type>
-
- <mime-type type="application/x-gnumeric">
- <alias type="application/x-Gnumeric-spreadsheet"/>
- <magic priority="50">
- <match value="=<gmr:Workbook" type="string" offset="39" />
- </magic>
- <glob pattern="*.gnumeric"/>
- </mime-type>
-
- <mime-type type="application/x-gtar">
- <magic priority="40">
- <!-- GNU tar archive -->
- <match value="ustar \0" type="string" offset="257" />
- </magic>
- <glob pattern="*.gtar"/>
- <sub-class-of type="application/x-tar"/>
- </mime-type>
-
- <mime-type type="application/x-gzip">
- <magic priority="40">
- <match value="\037\213" type="string" offset="0" />
- </magic>
- <glob pattern="*.tgz" />
- <glob pattern="*.gz" />
- <glob pattern="*-gz" />
- <glob pattern="*.emz" />
- </mime-type>
-
- <mime-type type="application/x-hdf">
- <magic priority="50">
- <match value="0x0e031301" type="big32" offset="0"/>
- <match value="\211HDF\r\n\032" type="string" offset="0"/>
- </magic>
- <glob pattern="*.hdf"/>
- </mime-type>
-
- <mime-type type="application/x-hwp">
- <magic priority="50">
- <!--
- TIKA-330: Detection pattern based on signature strings from
- the hwpfilter/source/hwpfile.cpp file in OpenOffice.org.
- -->
- <match value="HWP Document File V" type="string" offset="0"/>
- </magic>
- </mime-type>
-
- <mime-type type="application/x-iso9660-image">
- <magic priority="50">
- <match value="CD001" type="string" offset="37633"/>
- </magic>
- <glob pattern="*.iso" />
- </mime-type>
-
- <mime-type type="application/x-java-jnlp-file">
- <glob pattern="*.jnlp"/>
- </mime-type>
-
- <mime-type type="application/x-kdelnk">
- <magic priority="50">
- <match value="[KDE\ Desktop\ Entry]" type="string" offset="0"/>
- <match value="#\ KDE\ Config\ File" type="string" offset="0"/>
- </magic>
- </mime-type>
-
- <mime-type type="application/x-latex">
- <_comment>LaTeX Source Document</_comment>
- <magic priority="50">
- <match value="%\ -*-latex-*-" type="string" offset="0"/>
- </magic>
- <glob pattern="*.latex"/>
- </mime-type>
-
- <mime-type type="application/x-lha">
- <magic priority="50">
- <match value="-lzs-" type="string" offset="2"/>
- <match value="-lh\40-" type="string" offset="2"/>
- <match value="-lhd-" type="string" offset="2"/>
- <match value="-lh2-" type="string" offset="2"/>
- <match value="-lh3-" type="string" offset="2"/>
- <match value="-lh4-" type="string" offset="2"/>
- <match value="-lh5-" type="string" offset="2"/>
- <match value="-lh6-" type="string" offset="2"/>
- <match value="-lh7-" type="string" offset="2"/>
- </magic>
- </mime-type>
-
- <mime-type type="application/x-lharc">
- <magic priority="50">
- <match value="-lh0-" type="string" offset="2"/>
- <match value="-lh1-" type="string" offset="2"/>
- <match value="-lz4-" type="string" offset="2"/>
- <match value="-lz5-" type="string" offset="2"/>
- </magic>
- </mime-type>
-
- <mime-type type="application/x-mobipocket-ebook">
- <glob pattern="*.prc"/>
- <glob pattern="*.mobi"/>
- </mime-type>
- <mime-type type="application/x-ms-application">
- <glob pattern="*.application"/>
- </mime-type>
- <mime-type type="application/x-ms-wmd">
- <glob pattern="*.wmd"/>
- </mime-type>
- <mime-type type="application/x-ms-wmz">
- <sub-class-of type="application/x-gzip"/>
- <glob pattern="*.wmz"/>
- </mime-type>
- <mime-type type="application/x-ms-xbap">
- <glob pattern="*.xbap"/>
- </mime-type>
- <mime-type type="application/x-msaccess">
- <glob pattern="*.mdb"/>
- </mime-type>
- <mime-type type="application/x-msbinder">
- <glob pattern="*.obd"/>
- </mime-type>
- <mime-type type="application/x-mscardfile">
- <glob pattern="*.crd"/>
- </mime-type>
- <mime-type type="application/x-msclip">
- <glob pattern="*.clp"/>
- </mime-type>
- <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-msmediaview">
- <glob pattern="*.mvb"/>
- <glob pattern="*.m13"/>
- <glob pattern="*.m14"/>
- </mime-type>
- <mime-type type="application/x-msmetafile">
- <acronym>WMF</acronym>
- <comment>Windows Metafile</comment>
- <glob pattern="*.wmf"/>
- <glob pattern="*.emf"/>
- </mime-type>
- <mime-type type="application/x-msmoney">
- <glob pattern="*.mny"/>
- </mime-type>
- <mime-type type="application/x-mspublisher">
- <glob pattern="*.pub"/>
- </mime-type>
- <mime-type type="application/x-msschedule">
- <glob pattern="*.scd"/>
- </mime-type>
- <mime-type type="application/x-msterminal">
- <glob pattern="*.trm"/>
- </mime-type>
- <mime-type type="application/x-mswrite">
- <glob pattern="*.wri"/>
- </mime-type>
- <mime-type type="application/x-netcdf">
- <glob pattern="*.nc"/>
- <glob pattern="*.cdf"/>
- </mime-type>
- <mime-type type="application/x-pkcs12">
- <glob pattern="*.p12"/>
- <glob pattern="*.pfx"/>
- </mime-type>
- <mime-type type="application/x-pkcs7-certificates">
- <glob pattern="*.p7b"/>
- <glob pattern="*.spc"/>
- </mime-type>
- <mime-type type="application/x-pkcs7-certreqresp">
- <glob pattern="*.p7r"/>
- </mime-type>
-
- <mime-type type="application/x-rar-compressed">
- <alias type="application/x-rar"/>
- <magic priority="50">
- <match value="Rar!" type="string" offset="0"/>
- </magic>
- <glob pattern="*.rar"/>
- </mime-type>
-
- <mime-type type="application/x-rpm">
- <glob pattern="*.rpm"/>
- </mime-type>
-
- <mime-type type="application/x-sc">
- <magic priority="50">
- <match value="Spreadsheet" type="string" offset="38"/>
- </magic>
- </mime-type>
-
- <mime-type type="application/x-sh">
- <magic priority="50">
- <match value="#!/" type="string" offset="0"/>
- <match value="#!\ /" type="string" offset="0"/>
- <match value="#!\t/" type="string" offset="0"/>
- </magic>
- <glob pattern="*.sh"/>
- <sub-class-of type="text/plain"/>
- </mime-type>
-
- <mime-type type="application/x-shar">
- <glob pattern="*.shar"/>
- </mime-type>
-
- <mime-type type="application/x-shockwave-flash">
- <acronym>Flash</acronym>
- <comment>Adobe Flash</comment>
- <magic priority="50">
- <match value="FWS" type="string" offset="0"/> <!-- F = Uncompressed -->
- <match value="CWS" type="string" offset="0"/> <!-- C = Compressed -->
- </magic>
- <glob pattern="*.swf"/>
- </mime-type>
-
- <mime-type type="application/x-silverlight-app">
- <glob pattern="*.xap"/>
- </mime-type>
-
- <mime-type type="application/x-stuffit">
- <magic priority="50">
- <match value="StuffIt" type="string" offset="0"/>
- </magic>
- <glob pattern="*.sit"/>
- </mime-type>
-
- <mime-type type="application/x-stuffitx">
- <glob pattern="*.sitx"/>
- </mime-type>
- <mime-type type="application/x-sv4cpio">
- <glob pattern="*.sv4cpio"/>
- </mime-type>
- <mime-type type="application/x-sv4crc">
- <glob pattern="*.sv4crc"/>
- </mime-type>
-
- <mime-type type="application/x-tar">
- <magic priority="40">
- <!-- POSIX tar archive -->
- <match value="ustar\0" type="string" offset="257" />
- </magic>
- <glob pattern="*.tar"/>
- </mime-type>
-
- <mime-type type="application/x-tcl">
- <alias type="text/x-tcl"/>
- <glob pattern="*.tcl"/>
- <sub-class-of type="text/plain"/>
- </mime-type>
-
- <mime-type type="application/x-tex">
- <alias type="text/x-tex"/>
- <magic priority="50">
- <match value="\\input" type="string" offset="0"/>
- <match value="\\section" type="string" offset="0"/>
- <match value="\\setlength" type="string" offset="0"/>
- <match value="\\documentstyle" type="string" offset="0"/>
- <match value="\\chapter" type="string" offset="0"/>
- <match value="\\documentclass" type="string" offset="0"/>
- <match value="\\relax" type="string" offset="0"/>
- <match value="\\contentsline" type="string" offset="0"/>
- </magic>
- <glob pattern="*.tex"/>
- </mime-type>
-
- <mime-type type="application/x-tex-tfm">
- <glob pattern="*.tfm"/>
- </mime-type>
-
- <mime-type type="application/x-texinfo">
- <alias type="text/x-texinfo" />
- <magic priority="50">
- <match value="\\input\ texinfo" type="string" offset="0"/>
- </magic>
- <glob pattern="*.texinfo"/>
- <glob pattern="*.texi"/>
- </mime-type>
-
- <!-- =================================================================== -->
- <!-- Microsoft Office binary file formats -->
- <!-- http://www.microsoft.com/interop/docs/OfficeBinaryFormats.mspx -->
- <!-- =================================================================== -->
- <mime-type type="application/x-tika-msoffice">
- <magic>
- <match value="0xd0cf11e0a1b11ae1" type="string" offset="0:8"/>
- </magic>
- </mime-type>
-
- <!-- =================================================================== -->
- <!-- Office Open XML file formats -->
- <!-- http://www.ecma-international.org/publications/standards/Ecma-376.htm -->
- <!-- =================================================================== -->
- <mime-type type="application/x-tika-ooxml">
- <sub-class-of type="application/zip"/>
- <magic priority="50">
- <match value="PK\003\004" type="string" offset="0">
- <match value="[Content_Types].xml" type="string" offset="30"/>
- </match>
- </magic>
- </mime-type>
-
- <mime-type type="application/x-ustar">
- <glob pattern="*.ustar"/>
- </mime-type>
- <mime-type type="application/x-wais-source">
- <glob pattern="*.src"/>
- </mime-type>
- <mime-type type="application/x-x509-ca-cert">
- <glob pattern="*.der"/>
- <glob pattern="*.crt"/>
- </mime-type>
- <mime-type type="application/x-xfig">
- <glob pattern="*.fig"/>
- </mime-type>
- <mime-type type="application/x-xpinstall">
- <glob pattern="*.xpi"/>
- </mime-type>
-
- <mime-type type="application/x-zoo">
- <magic priority="50">
- <match value="0xfdc4a7dc" type="little32" offset="20"/>
- </magic>
- <glob pattern="*.zoo"/>
- </mime-type>
-
- <mime-type type="application/x400-bp"/>
- <mime-type type="application/xcap-att+xml"/>
- <mime-type type="application/xcap-caps+xml"/>
- <mime-type type="application/xcap-el+xml"/>
- <mime-type type="application/xcap-error+xml"/>
- <mime-type type="application/xcap-ns+xml"/>
- <mime-type type="application/xcon-conference-info-diff+xml"/>
- <mime-type type="application/xcon-conference-info+xml"/>
- <mime-type type="application/xenc+xml">
- <glob pattern="*.xenc"/>
- </mime-type>
-
- <mime-type type="application/xhtml+xml">
- <magic priority="50">
- <match value="<html xmlns=" type="string" offset="0:8192"/>
- </magic>
- <root-XML namespaceURI="http://www.w3.org/1999/xhtml" localName="html"/>
- <glob pattern="*.xhtml"/>
- <glob pattern="*.xht"/>
- </mime-type>
-
- <mime-type type="application/xhtml-voice+xml"/>
-
- <mime-type type="application/xml">
- <alias type="text/xml"/>
- <magic priority="50">
- <match value="<?xml" type="string" offset="0"/>
- <match value="<?XML" type="string" offset="0"/>
- <match value="<!--" type="string" offset="0"/>
- <match value="0xFFFE3C003F0078006D006C00" type="string" offset="0"/>
- <match value="0xFEFF003C003F0078006D006C" type="string" offset="0"/>
- <!-- TODO: Add matches for the other possible XML encoding schemes -->
- </magic>
- <glob pattern="*.xml"/>
- <glob pattern="*.xsl"/>
- <glob pattern="*.xsd"/>
- <sub-class-of type="text/plain" />
- </mime-type>
-
- <mime-type type="application/xml-dtd">
- <sub-class-of type="text/plain"/>
- <glob pattern="*.dtd"/>
- </mime-type>
- <mime-type type="application/xml-external-parsed-entity"/>
- <mime-type type="application/xmpp+xml"/>
- <mime-type type="application/xop+xml">
- <glob pattern="*.xop"/>
- </mime-type>
-
- <mime-type type="application/xslt+xml">
- <alias type="text/xsl"/>
- <acronym>XSLT</acronym>
- <comment>XSL Transformations</comment>
- <root-XML localName="stylesheet"
- namespaceURI="http://www.w3.org/1999/XSL/Transform"/>
- <glob pattern="*.xslt"/>
- </mime-type>
-
- <mime-type type="application/xspf+xml">
- <glob pattern="*.xspf"/>
- </mime-type>
- <mime-type type="application/xv+xml">
- <glob pattern="*.mxml"/>
- <glob pattern="*.xhvml"/>
- <glob pattern="*.xvml"/>
- <glob pattern="*.xvm"/>
- </mime-type>
-
- <mime-type type="application/zip">
- <alias type="application/x-zip-compressed"/>
- <magic priority="40">
- <match value="PK\003\004" type="string" offset="0"/>
- </magic>
- <glob pattern="*.zip"/>
- </mime-type>
-
- <mime-type type="audio/32kadpcm"/>
- <mime-type type="audio/3gpp"/>
- <mime-type type="audio/3gpp2"/>
- <mime-type type="audio/ac3"/>
- <mime-type type="audio/adpcm">
- <glob pattern="*.adp"/>
- </mime-type>
- <mime-type type="audio/amr"/>
- <mime-type type="audio/amr-wb"/>
- <mime-type type="audio/amr-wb+"/>
- <mime-type type="audio/asc"/>
-
- <mime-type type="audio/basic">
- <magic priority="20">
- <match value=".snd" type="string" offset="0">
- <match value="1" type="big32" offset="12"/>
- <match value="2" type="big32" offset="12"/>
- <match value="3" type="big32" offset="12"/>
- <match value="4" type="big32" offset="12"/>
- <match value="5" type="big32" offset="12"/>
- <match value="6" type="big32" offset="12"/>
- <match value="7" type="big32" offset="12"/>
- </match>
- </magic>
- <glob pattern="*.au"/>
- <glob pattern="*.snd"/>
- </mime-type>
-
- <mime-type type="audio/bv16"/>
- <mime-type type="audio/bv32"/>
- <mime-type type="audio/clearmode"/>
- <mime-type type="audio/cn"/>
- <mime-type type="audio/dat12"/>
- <mime-type type="audio/dls"/>
- <mime-type type="audio/dsr-es201108"/>
- <mime-type type="audio/dsr-es202050"/>
- <mime-type type="audio/dsr-es202211"/>
- <mime-type type="audio/dsr-es202212"/>
- <mime-type type="audio/dvi4"/>
- <mime-type type="audio/eac3"/>
- <mime-type type="audio/evrc"/>
- <mime-type type="audio/evrc-qcp"/>
- <mime-type type="audio/evrc0"/>
- <mime-type type="audio/evrc1"/>
- <mime-type type="audio/evrcb"/>
- <mime-type type="audio/evrcb0"/>
- <mime-type type="audio/evrcb1"/>
- <mime-type type="audio/evrcwb"/>
- <mime-type type="audio/evrcwb0"/>
- <mime-type type="audio/evrcwb1"/>
- <mime-type type="audio/example"/>
- <mime-type type="audio/g719"/>
- <mime-type type="audio/g722"/>
- <mime-type type="audio/g7221"/>
- <mime-type type="audio/g723"/>
- <mime-type type="audio/g726-16"/>
- <mime-type type="audio/g726-24"/>
- <mime-type type="audio/g726-32"/>
- <mime-type type="audio/g726-40"/>
- <mime-type type="audio/g728"/>
- <mime-type type="audio/g729"/>
- <mime-type type="audio/g7291"/>
- <mime-type type="audio/g729d"/>
- <mime-type type="audio/g729e"/>
- <mime-type type="audio/gsm"/>
- <mime-type type="audio/gsm-efr"/>
- <mime-type type="audio/ilbc"/>
- <mime-type type="audio/l16"/>
- <mime-type type="audio/l20"/>
- <mime-type type="audio/l24"/>
- <mime-type type="audio/l8"/>
- <mime-type type="audio/lpc"/>
-
- <mime-type type="audio/midi">
- <acronym>MIDI</acronym>
- <comment>Musical Instrument Digital Interface</comment>
- <magic priority ="20">
- <match type="string" value="MThd" offset="0"/>
- </magic>
- <glob pattern="*.mid"/>
- <glob pattern="*.midi"/>
- <glob pattern="*.kar"/>
- <glob pattern="*.rmi"/>
- </mime-type>
-
- <mime-type type="audio/mobile-xmf"/>
- <mime-type type="audio/mp4">
- <alias type="audio/x-mp4a"/>
- <glob pattern="*.mp4a"/>
- </mime-type>
- <mime-type type="audio/mp4a-latm"/>
- <mime-type type="audio/mpa"/>
- <mime-type type="audio/mpa-robust"/>
-
- <mime-type type="audio/mpeg">
- <acronym>MP3</acronym>
- <comment>MPEG-1 Audio Layer 3</comment>
- <magic priority="20">
- <!-- http://mpgedit.org/mpgedit/mpeg_format/MP3Format.html -->
- <!-- Bit pattern for first two bytes: 11111111 111VVLLC -->
- <!-- VV = MPEG Audio Version ID; 10 = V2, 11 = V1 -->
- <!-- LL = Layer description; 01 = L3, 10 = L2, 11 = L1 -->
- <!-- C = Protection bit; 0 = CRC, 1 = no CRC -->
- <match value="0xfff2" type="string" offset="0"/> <!-- V2, L3, CRC -->
- <match value="0xfff3" type="string" offset="0"/> <!-- V2, L3 -->
- <match value="0xfff4" type="string" offset="0"/> <!-- V2, L2, CRC -->
- <match value="0xfff5" type="string" offset="0"/> <!-- V2, L2 -->
- <match value="0xfff6" type="string" offset="0"/> <!-- V2, L1, CRC -->
- <match value="0xfff7" type="string" offset="0"/> <!-- V2, L1 -->
- <match value="0xfffa" type="string" offset="0"/> <!-- V1, L3, CRC -->
- <match value="0xfffb" type="string" offset="0"/> <!-- V1, L3 -->
- <match value="0xfffc" type="string" offset="0"/> <!-- V1, L2, CRC -->
- <match value="0xfffd" type="string" offset="0"/> <!-- V1, L2 -->
- <!-- TIKA-417: This is the UTF-16 LE byte order mark! -->
- <!-- match value="0xfffe" type="string" offset="0"/ --> <!-- V1, L1, CRC -->
- <match value="0xffff" type="string" offset="0"/> <!-- V1, L1 -->
- <match value="ID3" type="string" offset="0"/>
- </magic>
- <glob pattern="*.mpga"/>
- <glob pattern="*.mp2"/>
- <glob pattern="*.mp2a"/>
- <glob pattern="*.mp3"/>
- <glob pattern="*.m2a"/>
- <glob pattern="*.m3a"/>
- </mime-type>
-
- <mime-type type="audio/mpeg4-generic"/>
-
- <mime-type type="audio/ogg">
- <glob pattern="*.oga"/>
- <glob pattern="*.ogg"/>
- <glob pattern="*.spx"/>
- <sub-class-of type="application/ogg"/>
- </mime-type>
-
- <mime-type type="audio/parityfec"/>
- <mime-type type="audio/pcma"/>
- <mime-type type="audio/pcma-wb"/>
- <mime-type type="audio/pcmu-wb"/>
- <mime-type type="audio/pcmu"/>
-
- <mime-type type="audio/prs.sid">
- <magic priority="50">
- <match value="PSID" type="string" offset="0"/>
- </magic>
- </mime-type>
-
- <mime-type type="audio/qcelp"/>
- <mime-type type="audio/red"/>
- <mime-type type="audio/rtp-enc-aescm128"/>
- <mime-type type="audio/rtp-midi"/>
- <mime-type type="audio/rtx"/>
- <mime-type type="audio/smv"/>
- <mime-type type="audio/smv0"/>
- <mime-type type="audio/smv-qcp"/>
- <mime-type type="audio/sp-midi"/>
- <mime-type type="audio/t140c"/>
- <mime-type type="audio/t38"/>
- <mime-type type="audio/telephone-event"/>
- <mime-type type="audio/tone"/>
- <mime-type type="audio/ulpfec"/>
- <mime-type type="audio/vdvi"/>
- <mime-type type="audio/vmr-wb"/>
- <mime-type type="audio/vnd.3gpp.iufp"/>
- <mime-type type="audio/vnd.4sb"/>
- <mime-type type="audio/vnd.audiokoz"/>
- <mime-type type="audio/vnd.celp"/>
- <mime-type type="audio/vnd.cisco.nse"/>
- <mime-type type="audio/vnd.cmles.radio-events"/>
- <mime-type type="audio/vnd.cns.anp1"/>
- <mime-type type="audio/vnd.cns.inf1"/>
- <mime-type type="audio/vnd.digital-winds">
- <glob pattern="*.eol"/>
- </mime-type>
- <mime-type type="audio/vnd.dlna.adts"/>
- <mime-type type="audio/vnd.dolby.heaac.1"/>
- <mime-type type="audio/vnd.dolby.heaac.2"/>
- <mime-type type="audio/vnd.dolby.mlp"/>
- <mime-type type="audio/vnd.dolby.mps"/>
- <mime-type type="audio/vnd.dolby.pl2"/>
- <mime-type type="audio/vnd.dolby.pl2x"/>
- <mime-type type="audio/vnd.dolby.pl2z"/>
- <mime-type type="audio/vnd.dts">
- <glob pattern="*.dts"/>
- </mime-type>
- <mime-type type="audio/vnd.dts.hd">
- <glob pattern="*.dtshd"/>
- </mime-type>
- <mime-type type="audio/vnd.everad.plj"/>
- <mime-type type="audio/vnd.hns.audio"/>
- <mime-type type="audio/vnd.lucent.voice">
- <glob pattern="*.lvp"/>
- </mime-type>
- <mime-type type="audio/vnd.ms-playready.media.pya">
- <glob pattern="*.pya"/>
- </mime-type>
- <mime-type type="audio/vnd.nokia.mobile-xmf"/>
- <mime-type type="audio/vnd.nortel.vbk"/>
- <mime-type type="audio/vnd.nuera.ecelp4800">
- <glob pattern="*.ecelp4800"/>
- </mime-type>
- <mime-type type="audio/vnd.nuera.ecelp7470">
- <glob pattern="*.ecelp7470"/>
- </mime-type>
- <mime-type type="audio/vnd.nuera.ecelp9600">
- <glob pattern="*.ecelp9600"/>
- </mime-type>
- <mime-type type="audio/vnd.octel.sbc"/>
- <mime-type type="audio/vnd.qcelp"/>
- <mime-type type="audio/vnd.rhetorex.32kadpcm"/>
- <mime-type type="audio/vnd.sealedmedia.softseal.mpeg"/>
- <mime-type type="audio/vnd.vmx.cvsd"/>
- <mime-type type="audio/vorbis"/>
- <mime-type type="audio/vorbis-config"/>
- <mime-type type="audio/x-aac">
- <glob pattern="*.aac"/>
- </mime-type>
-
- <mime-type type="audio/x-adbcm">
- <magic priority="20">
- <match value=".snd" type="string" offset="0">
- <match value="23" type="big32" offset="12"/>
- </match>
- </magic>
- </mime-type>
-
- <mime-type type="audio/x-aiff">
- <alias type="audio/aiff"/>
- <acronym>AIFF</acronym>
- <comment>Audio Interchange File Format</comment>
- <magic priority="20">
- <match value="FORM....AIFF" type="string" offset="0"
- mask="0xFFFFFFFF00000000FFFFFFFF"/>
- <match value="FORM....AIFC" type="string" offset="0"
- mask="0xFFFFFFFF00000000FFFFFFFF"/>
- <!-- Amiga IFF sound sample, somewhat like the more modern AIFF -->
- <match value="FORM....8SVX" type="string" offset="0"
- mask="0xFFFFFFFF00000000FFFFFFFF"/>
- </magic>
- <glob pattern="*.aif"/>
- <glob pattern="*.aiff"/>
- <glob pattern="*.aifc"/>
- </mime-type>
-
- <mime-type type="audio/x-dec-basic">
- <magic priority="20">
- <match value="0x0064732E" type="big32" offset="0">
- <match value="1" type="big32" offset="12"/>
- <match value="2" type="big32" offset="12"/>
- <match value="3" type="big32" offset="12"/>
- <match value="4" type="big32" offset="12"/>
- <match value="5" type="big32" offset="12"/>
- <match value="6" type="big32" offset="12"/>
- <match value="7" type="big32" offset="12"/>
- </match>
- </magic>
- </mime-type>
-
- <mime-type type="audio/x-dec-adbcm">
- <magic priority="20">
- <match value="0x0064732E" type="big32" offset="0">
- <match value="23" type="big32" offset="12"/>
- </match>
- </magic>
- </mime-type>
-
- <mime-type type="audio/x-flac">
- <acronym>FLAC</acronym>
- <comment>Free Lossless Audio Codec</comment>
- <magic priority="50">
- <match value="fLaC" type="string" offset="0"/>
- </magic>
- <glob pattern="*.flac"/>
- </mime-type>
-
- <mime-type type="audio/x-mod">
- <acronym>MOD</acronym>
- <magic priority="50">
- <match value="Extended\ Module:" type="string" offset="0"/>
- <match value="BMOD2STM" type="string" offset="21"/>
- <match value="M.K." type="string" offset="1080"/>
- <match value="M!K!" type="string" offset="1080"/>
- <match value="FLT4" type="string" offset="1080"/>
- <match value="FLT8" type="string" offset="1080"/>
- <match value="4CHN" type="string" offset="1080"/>
- <match value="6CHN" type="string" offset="1080"/>
- <match value="8CHN" type="string" offset="1080"/>
- <match value="CD81" type="string" offset="1080"/>
- <match value="OKTA" type="string" offset="1080"/>
- <match value="16CN" type="string" offset="1080"/>
- <match value="32CN" type="string" offset="1080"/>
- <match value="IMPM" type="string" offset="0"/>
- </magic>
- <glob pattern="*.mod"/>
- </mime-type>
-
- <mime-type type="audio/x-mpegurl">
- <glob pattern="*.m3u"/>
- </mime-type>
- <mime-type type="audio/x-ms-wax">
- <glob pattern="*.wax"/>
- </mime-type>
- <mime-type type="audio/x-ms-wma">
- <glob pattern="*.wma"/>
- </mime-type>
-
- <mime-type type="audio/x-pn-realaudio">
- <comment>Real Audio</comment>
- <alias type="audio/x-realaudio" />
- <magic priority="50">
- <match value="0x2e7261fd" type="big32" offset="0"/>
- </magic>
- <glob pattern="*.ram"/>
- <glob pattern="*.ra"/>
- </mime-type>
-
- <mime-type type="audio/x-pn-realaudio-plugin">
- <glob pattern="*.rmp"/>
- </mime-type>
-
- <mime-type type="audio/x-wav">
- <acronym>WAV</acronym>
- <magic priority="20">
- <match value="RIFF....WAVE" type="string" offset="0"
- mask="0xFFFFFFFF00000000FFFFFFFF"/>
- </magic>
- <glob pattern="*.wav"/>
- </mime-type>
-
- <mime-type type="chemical/x-cdx">
- <glob pattern="*.cdx"/>
- </mime-type>
- <mime-type type="chemical/x-cif">
- <glob pattern="*.cif"/>
- </mime-type>
- <mime-type type="chemical/x-cmdf">
- <glob pattern="*.cmdf"/>
- </mime-type>
- <mime-type type="chemical/x-cml">
- <glob pattern="*.cml"/>
- </mime-type>
- <mime-type type="chemical/x-csml">
- <glob pattern="*.csml"/>
- </mime-type>
- <mime-type type="chemical/x-pdb"/>
- <mime-type type="chemical/x-xyz">
- <glob pattern="*.xyz"/>
- </mime-type>
-
- <mime-type type="image/bmp">
- <alias type="image/x-ms-bmp"/>
- <acronym>BMP</acronym>
- <comment>Windows bitmap</comment>
- <magic priority="50">
- <match value="BM" type="string" offset="0" />
- </magic>
- <glob pattern="*.bmp"/>
- <glob pattern="*.dib"/>
- </mime-type>
-
- <mime-type type="image/cgm">
- <acronym>CGM</acronym>
- <comment>Computer Graphics Metafile</comment>
- <magic priority="50">
- <match value="BEGMF" type="string" offset="0"/>
- <match value="0x0020" mask="0xffe0" type="string" offset="0"/>
- </magic>
- <glob pattern="*.cgm"/>
- </mime-type>
-
- <mime-type type="image/example"/>
- <mime-type type="image/fits"/>
- <mime-type type="image/g3fax">
- <glob pattern="*.g3"/>
- </mime-type>
-
- <mime-type type="image/gif">
- <acronym>GIF</acronym>
- <comment>Graphics Interchange Format</comment>
- <magic priority="50">
- <match value="GIF87a" type="string" offset="0"/>
- <match value="GIF89a" type="string" offset="0"/>
- </magic>
- <glob pattern="*.gif"/>
- </mime-type>
-
- <mime-type type="image/ief">
- <glob pattern="*.ief"/>
- </mime-type>
- <mime-type type="image/jp2"/>
-
- <mime-type type="image/jpeg">
- <acronym>JPEG</acronym>
- <comment>Joint Photographic Experts Group</comment>
- <magic priority="50">
- <!-- FFD8 is the SOI (Start Of Image) marker. -->
- <!-- It is followed by another marker that starts with FF. -->
- <match value="0xffd8ff" type="string" offset="0"/>
- </magic>
- <glob pattern="*.jpg"/>
- <glob pattern="*.jpeg"/>
- <glob pattern="*.jpe"/>
- <glob pattern="*.jif"/>
- <glob pattern="*.jfif"/>
- <glob pattern="*.jfi"/>
- </mime-type>
-
- <mime-type type="image/jpm"/>
- <mime-type type="image/jpx"/>
- <mime-type type="image/naplps"/>
-
- <mime-type type="image/png">
- <acronym>PNG</acronym>
- <comment>Portable Network Graphics</comment>
- <magic priority="50">
- <match value="\x89PNG\x0d\x0a\x1a\x0a" type="string" offset="0"/>
- </magic>
- <glob pattern="*.png"/>
- </mime-type>
-
- <mime-type type="image/prs.btif">
- <glob pattern="*.btif"/>
- </mime-type>
- <mime-type type="image/prs.pti"/>
-
- <mime-type type="image/svg+xml">
- <sub-class-of type="application/xml"/>
- <acronym>SVG</acronym>
- <comment>Scalable Vector Graphics</comment>
- <root-XML localName="svg" namespaceURI="http://www.w3.org/2000/svg"/>
- <glob pattern="*.svg"/>
- <glob pattern="*.svgz"/>
- </mime-type>
-
- <mime-type type="image/t38"/>
-
- <mime-type type="image/tiff">
- <acronym>TIFF</acronym>
- <comment>Tagged Image File Format</comment>
- <magic priority="50">
- <!-- MM.* = Big endian (M=Motorola) and 0x002a in big endian -->
- <match value="MM\x00\x2a" type="string" offset="0"/>
- <!-- II*. = Little endian (I=Intel) and 0x002a in little endian -->
- <match value="II\x2a\x00" type="string" offset="0"/>
- </magic>
- <glob pattern="*.tiff"/>
- <glob pattern="*.tif"/>
- </mime-type>
-
- <mime-type type="image/tiff-fx"/>
-
- <mime-type type="image/vnd.adobe.photoshop">
- <alias type="image/x-psd"/>
- <glob pattern="*.psd"/>
- </mime-type>
-
- <mime-type type="image/vnd.cns.inf2"/>
- <mime-type type="image/vnd.djvu">
- <glob pattern="*.djvu"/>
- <glob pattern="*.djv"/>
- </mime-type>
-
- <mime-type type="image/vnd.dwg">
- <acronym>DWG</acronym>
- <comment>AutoCad Drawing</comment>
- <alias type="image/x-dwg"/>
- <alias type="application/acad"/>
- <alias type="application/x-acad"/>
- <alias type="application/autocad_dwg"/>
- <alias type="application/dwg"/>
- <alias type="application/x-dwg"/>
- <alias type="application/x-autocad"/>
- <glob pattern="*.dwg"/>
- <magic priority="50">
- <!-- "AC" followed by four numbers -->
- <match value="AC0000" type="string" offset="0"
- mask="0xFFFFF0F0F0F0"/>
- </magic>
- </mime-type>
-
- <mime-type type="image/vnd.dxf">
- <glob pattern="*.dxf"/>
- </mime-type>
- <mime-type type="image/vnd.fastbidsheet">
- <glob pattern="*.fbs"/>
- </mime-type>
- <mime-type type="image/vnd.fpx">
- <glob pattern="*.fpx"/>
- </mime-type>
- <mime-type type="image/vnd.fst">
- <glob pattern="*.fst"/>
- </mime-type>
- <mime-type type="image/vnd.fujixerox.edmics-mmr">
- <glob pattern="*.mmr"/>
- </mime-type>
- <mime-type type="image/vnd.fujixerox.edmics-rlc">
- <glob pattern="*.rlc"/>
- </mime-type>
- <mime-type type="image/vnd.globalgraphics.pgb"/>
- <mime-type type="image/vnd.microsoft.icon"/>
- <mime-type type="image/vnd.mix"/>
- <mime-type type="image/vnd.ms-modi">
- <glob pattern="*.mdi"/>
- </mime-type>
- <mime-type type="image/vnd.net-fpx">
- <glob pattern="*.npx"/>
- </mime-type>
- <mime-type type="image/vnd.radiance"/>
- <mime-type type="image/vnd.sealed.png"/>
- <mime-type type="image/vnd.sealedmedia.softseal.gif"/>
- <mime-type type="image/vnd.sealedmedia.softseal.jpg"/>
- <mime-type type="image/vnd.svf"/>
-
- <mime-type type="image/vnd.wap.wbmp">
- <_comment>Wireless Bitmap File Format</_comment>
- <glob pattern="*.wbmp"/>
- </mime-type>
-
- <mime-type type="image/vnd.xiff">
- <glob pattern="*.xif"/>
- </mime-type>
- <mime-type type="image/x-cmu-raster">
- <glob pattern="*.ras"/>
- </mime-type>
- <mime-type type="image/x-cmx">
- <glob pattern="*.cmx"/>
- </mime-type>
- <mime-type type="image/x-freehand">
- <glob pattern="*.fh"/>
- <glob pattern="*.fhc"/>
- <glob pattern="*.fh4"/>
- <glob pattern="*.fh5"/>
- <glob pattern="*.fh7"/>
- </mime-type>
-
- <mime-type type="image/x-icon">
- <magic priority="50">
- <match value="\102\101\050\000\000\000\056\000\000\000\000\000\000\000"
- type="string" offset="0"/>
- <match value="\000\000\001\000" type="string" offset="0"/>
- </magic>
- <glob pattern="*.ico"/>
- </mime-type>
-
- <mime-type type="image/x-niff">
- <comment>Navy Interchange File Format</comment>
- <magic priority="50">
- <match value="IIN1" type="string" offset="0"/>
- </magic>
- </mime-type>
-
- <mime-type type="image/x-pcx">
- <glob pattern="*.pcx"/>
- </mime-type>
- <mime-type type="image/x-pict">
- <glob pattern="*.pic"/>
- <glob pattern="*.pct"/>
- </mime-type>
-
- <mime-type type="image/x-portable-anymap">
- <acronym>PNM</acronym>
- <comment>Portable Any Map</comment>
- <glob pattern="*.pnm" />
- </mime-type>
-
- <mime-type type="image/x-portable-bitmap">
- <sub-class-of type="image/x-portable-anymap"/>
- <acronym>PBM</acronym>
- <comment>Portable Bit Map</comment>
- <magic priority="50">
- <match value="P1" type="string" offset="0"/>
- <match value="P4" type="string" offset="0"/>
- </magic>
- <glob pattern="*.pbm"/>
- </mime-type>
-
- <mime-type type="image/x-portable-graymap">
- <sub-class-of type="image/x-portable-anymap"/>
- <acronym>PGM</acronym>
- <comment>Portable Gray Map</comment>
- <magic priority="50">
- <match value="P2" type="string" offset="0"/>
- <match value="P5" type="string" offset="0"/>
- </magic>
- <glob pattern="*.pgm"/>
- </mime-type>
-
- <mime-type type="image/x-portable-pixmap">
- <sub-class-of type="image/x-portable-anymap"/>
- <acronym>PXM</acronym>
- <comment>Portable Pixel Map</comment>
- <magic priority="50">
- <match value="P3" type="string" offset="0"/>
- <match value="P6" type="string" offset="0"/>
- <match value="P7" type="string" offset="0"/>
- </magic>
- <glob pattern="*.ppm"/>
- </mime-type>
-
- <mime-type type="image/x-raw-adobe">
- <acronym>DNG</acronym>
- <comment>Adobe Digital Negative</comment>
- <glob pattern="*.dng"/>
- </mime-type>
-
- <mime-type type="image/x-raw-hasselblad">
- <comment>Hasselblad raw image</comment>
- <glob pattern="*.3fr"/>
- </mime-type>
-
- <mime-type type="image/x-raw-fuji">
- <comment>Fuji raw image</comment>
- <glob pattern="*.raf"/>
- </mime-type>
-
- <mime-type type="image/x-raw-canon">
- <comment>Canon raw image</comment>
- <glob pattern="*.crw"/>
- <glob pattern="*.cr2"/>
- </mime-type>
-
- <mime-type type="image/x-raw-kodak">
- <comment>Kodak raw image</comment>
- <glob pattern="*.k25"/>
- <glob pattern="*.kdc"/>
- <glob pattern="*.dcs"/>
- <glob pattern="*.drf"/>
- </mime-type>
-
- <mime-type type="image/x-raw-minolta">
- <comment>Minolta raw image</comment>
- <glob pattern="*.mrw"/>
- </mime-type>
-
- <mime-type type="image/x-raw-nikon">
- <comment>Nikon raw image</comment>
- <glob pattern="*.nef"/>
- <glob pattern="*.nrw"/>
- </mime-type>
-
- <mime-type type="image/x-raw-olympus">
- <comment>Olympus raw image</comment>
- <glob pattern="*.orf"/>
- </mime-type>
-
- <mime-type type="image/x-raw-pentax">
- <comment>Pentax raw image</comment>
- <glob pattern="*.ptx"/>
- <glob pattern="*.pef"/>
- </mime-type>
-
- <mime-type type="image/x-raw-sony">
- <comment>Sony raw image</comment>
- <glob pattern="*.arw"/>
- <glob pattern="*.srf"/>
- <glob pattern="*.sr2"/>
- </mime-type>
-
- <mime-type type="image/x-raw-sigma">
- <comment>Sigma raw image</comment>
- <glob pattern="*.x3f"/>
- </mime-type>
-
- <mime-type type="image/x-raw-epson">
- <comment>Epson raw image</comment>
- <glob pattern="*.erf"/>
- </mime-type>
-
- <mime-type type="image/x-raw-mamiya">
- <comment>Mamiya raw image</comment>
- <glob pattern="*.mef"/>
- </mime-type>
-
- <mime-type type="image/x-raw-leaf">
- <comment>Leaf raw image</comment>
- <glob pattern="*.mos"/>
- </mime-type>
-
- <mime-type type="image/x-raw-panasonic">
- <comment>Panasonic raw image</comment>
- <glob pattern="*.raw"/>
- <glob pattern="*.rw2"/>
- </mime-type>
-
- <mime-type type="image/x-raw-phaseone">
- <comment>Phase One raw image</comment>
- <glob pattern="*.cap"/>
- <glob pattern="*.iiq"/>
- </mime-type>
-
- <mime-type type="image/x-raw-red">
- <comment>Red raw image</comment>
- <glob pattern="*.r3d"/>
- </mime-type>
-
- <mime-type type="image/x-raw-imacon">
- <comment>Imacon raw image</comment>
- <glob pattern="*.fff"/>
- </mime-type>
-
- <mime-type type="image/x-raw-logitech">
- <comment>Logitech raw image</comment>
- <glob pattern="*.pxn"/>
- </mime-type>
-
- <mime-type type="image/x-raw-casio">
- <comment>Casio raw image</comment>
- <glob pattern="*.bay"/>
- </mime-type>
-
- <mime-type type="image/x-raw-rawzor">
- <comment>Rawzor raw image</comment>
- <glob pattern="*.rwz"/>
- </mime-type>
-
- <mime-type type="image/x-rgb">
- <glob pattern="*.rgb"/>
- </mime-type>
-
- <mime-type type="image/x-xbitmap">
- <magic priority="50">
- <match value="/* XPM" type="string" offset="0"/>
- </magic>
- <glob pattern="*.xbm"/>
- <sub-class-of type="text/x-c"/>
- </mime-type>
-
- <mime-type type="image/x-xcf">
- <alias type="image/xcf"/>
- <magic priority="50">
- <match type="string" value="gimp xcf " offset="0"/>
- </magic>
- </mime-type>
-
- <mime-type type="image/x-xpixmap">
- <glob pattern="*.xpm"/>
- </mime-type>
- <mime-type type="image/x-xwindowdump">
- <glob pattern="*.xwd"/>
- </mime-type>
-
- <mime-type type="message/cpim"/>
- <mime-type type="message/delivery-status"/>
- <mime-type type="message/disposition-notification"/>
- <mime-type type="message/example"/>
- <mime-type type="message/external-body"/>
- <mime-type type="message/global"/>
- <mime-type type="message/global-delivery-status"/>
- <mime-type type="message/global-disposition-notification"/>
- <mime-type type="message/global-headers"/>
- <mime-type type="message/http"/>
- <mime-type type="message/imdn+xml"/>
-
- <mime-type type="message/news">
- <magic priority="50">
- <match value="Path:" type="string" offset="0" />
- <match value="Xref:" type="string" offset="0" />
- <match value="Article" type="string" offset="0" />
- </magic>
- </mime-type>
-
- <mime-type type="message/partial"/>
-
- <mime-type type="message/rfc822">
- <magic priority="50">
- <match value="Relay-Version:" type="string" offset="0"/>
- <match value="#!\ rnews" type="string" offset="0"/>
- <match value="N#!\ rnews" type="string" offset="0"/>
- <match value="Forward\ to" type="string" offset="0"/>
- <match value="Pipe\ to" type="string" offset="0"/>
- <match value="Return-Path:" type="string" offset="0"/>
- <match value="From:" type="string" offset="0"/>
- <match value="Received:" type="string" offset="0"/>
- <match type="string" value="Message-ID:" offset="0"/>
- <match type="string" value="Date:" offset="0"/>
- </magic>
- <glob pattern="*.eml"/>
- <glob pattern="*.mime"/>
- </mime-type>
-
- <mime-type type="message/s-http"/>
- <mime-type type="message/sip"/>
- <mime-type type="message/sipfrag"/>
- <mime-type type="message/tracking-status"/>
- <mime-type type="message/vnd.si.simp"/>
-
- <mime-type type="model/example"/>
-
- <mime-type type="model/iges">
- <_comment>Initial Graphics Exchange Specification Format</_comment>
- <glob pattern="*.igs"/>
- <glob pattern="*.iges"/>
- </mime-type>
-
- <mime-type type="model/mesh">
- <glob pattern="*.msh"/>
- <glob pattern="*.mesh"/>
- <glob pattern="*.silo"/>
- </mime-type>
-
- <mime-type type="model/vnd.dwf">
- <glob pattern="*.dwf"/>
- </mime-type>
- <mime-type type="model/vnd.flatland.3dml"/>
- <mime-type type="model/vnd.gdl">
- <glob pattern="*.gdl"/>
- </mime-type>
- <mime-type type="model/vnd.gs-gdl"/>
- <mime-type type="model/vnd.gs.gdl"/>
- <mime-type type="model/vnd.gtw">
- <glob pattern="*.gtw"/>
- </mime-type>
- <mime-type type="model/vnd.moml+xml"/>
- <mime-type type="model/vnd.mts">
- <glob pattern="*.mts"/>
- </mime-type>
- <mime-type type="model/vnd.parasolid.transmit.binary"/>
- <mime-type type="model/vnd.parasolid.transmit.text"/>
- <mime-type type="model/vnd.vtu">
- <glob pattern="*.vtu"/>
- </mime-type>
-
- <mime-type type="model/vrml">
- <glob pattern="*.wrl"/>
- <glob pattern="*.vrml"/>
- </mime-type>
-
- <mime-type type="multipart/alternative"/>
- <mime-type type="multipart/appledouble"/>
- <mime-type type="multipart/byteranges"/>
- <mime-type type="multipart/digest"/>
- <mime-type type="multipart/encrypted"/>
- <mime-type type="multipart/example"/>
- <mime-type type="multipart/form-data"/>
- <mime-type type="multipart/header-set"/>
- <mime-type type="multipart/mixed"/>
- <mime-type type="multipart/parallel"/>
- <mime-type type="multipart/related"/>
- <mime-type type="multipart/report"/>
- <mime-type type="multipart/signed"/>
- <mime-type type="multipart/voice-message"/>
- <mime-type type="text/calendar">
- <glob pattern="*.ics"/>
- <glob pattern="*.ifb"/>
- </mime-type>
-
- <mime-type type="text/css">
- <comment>Cascading Style Sheet</comment>
- <glob pattern="*.css"/>
- <sub-class-of type="text/plain"/>
- </mime-type>
-
- <mime-type type="text/csv">
- <glob pattern="*.csv"/>
- </mime-type>
- <mime-type type="text/directory"/>
- <mime-type type="text/dns"/>
- <mime-type type="text/ecmascript"/>
- <mime-type type="text/enriched"/>
- <mime-type type="text/example"/>
-
- <mime-type type="text/html">
- <!-- TIKA-327: if you encounter tags in the HTML
- with no declared namespace, it's not XHTML, it's just
- bad HTML, unfortunately.
- -->
- <root-XML localName="html"/>
- <root-XML localName="HTML"/>
- <root-XML localName="link"/>
- <root-XML localName="LINK"/>
- <root-XML localName="body"/>
- <root-XML localName="BODY"/>
- <root-XML localName="p"/>
- <root-XML localName="P"/>
- <root-XML localName="script"/>
- <root-XML localName="SCRIPT"/>
- <root-XML localName="frameset"/>
- <root-XML localName="FRAMESET"/>
- <magic priority="50">
- <match value="<!DOCTYPE HTML" type="string" offset="0:64"/>
- <match value="<!doctype html" type="string" offset="0:64"/>
- <match value="<HEAD" type="string" offset="0:64"/>
- <match value="<head" type="string" offset="0:64"/>
- <match value="<TITLE" type="string" offset="0:64"/>
- <match value="<title" type="string" offset="0:64"/>
- <!-- note on the offset value here: this can only be as big as
- MimeTypes#getMinLength(). If you set the offset value to larger
- than that size, the magic will only be compared to up to
- MimeTypes#getMinLength() bytes.
- -->
- <match value="<html" type="string" offset="0:8192"/>
- <match value="<HTML" type="string" offset="0:64"/>
- <match value="<BODY" type="string" offset="0"/>
- <match value="<body" type="string" offset="0"/>
- <match value="<TITLE" type="string" offset="0"/>
- <match value="<title" type="string" offset="0"/>
- <match value="<h1" type="string" offset="0"/>
- <match value="<H1" type="string" offset="0"/>
- <match value="<!doctype HTML" type="string" offset="0"/>
- <match value="<!DOCTYPE html" type="string" offset="0"/>
- </magic>
- <glob pattern="*.html"/>
- <glob pattern="*.htm"/>
- </mime-type>
-
- <mime-type type="text/javascript"/>
- <mime-type type="text/parityfec"/>
-
- <mime-type type="text/plain">
- <magic priority="20">
- <match value="This is TeX," type="string" offset="0"/>
- <match value="This is METAFONT," type="string" offset="0"/>
- <match value="/*" type="string" offset="0"/>
- <match value="//" type="string" offset="0"/>
- <match value=";;" type="string" offset="0"/>
- <!-- UTF-16BE BOM -->
- <match value="0xfeff" type="string" offset="0"/>
- <!-- UTF-16LE BOM -->
- <match value="0xfffe" type="string" offset="0"/>
- <!-- UTF-8 BOM -->
- <match value="0xefbbbf" type="string" offset="0"/>
- </magic>
-
- <glob pattern="*.txt"/>
- <glob pattern="*.text"/>
- <glob pattern="*.conf"/>
- <glob pattern="*.def"/>
- <glob pattern="*.list"/>
- <glob pattern="*.log"/>
- <glob pattern="*.in"/>
-
- <!-- TIKA-85: http://www.apache.org/dev/svn-eol-style.txt -->
- <glob pattern="INSTALL"/>
- <glob pattern="KEYS"/>
- <glob pattern="Makefile"/>
- <glob pattern="README"/>
- <glob pattern="abs-linkmap"/>
- <glob pattern="abs-menulinks"/>
- <glob pattern="*.aart"/>
- <glob pattern="*.ac"/>
- <glob pattern="*.am"/>
- <glob pattern="*.cgi"/>
- <glob pattern="*.classpath"/>
- <glob pattern="*.cmd"/>
- <glob pattern="*.config"/>
- <glob pattern="*.cwiki"/>
- <glob pattern="*.data"/>
- <glob pattern="*.dcl"/>
- <glob pattern="*.egrm"/>
- <glob pattern="*.ent"/>
- <glob pattern="*.ft"/>
- <glob pattern="*.fn"/>
- <glob pattern="*.fv"/>
- <glob pattern="*.grm"/>
- <glob pattern="*.g"/>
- <glob pattern=".htaccess"/>
- <glob pattern="*.ihtml"/>
- <glob pattern="*.jmx"/>
- <glob pattern="*.jsp"/>
- <glob pattern="*.junit"/>
- <glob pattern="*.jx"/>
- <glob pattern="*.manifest"/>
- <glob pattern="*.m4"/>
- <glob pattern="*.mf"/>
- <glob pattern="*.MF"/>
- <glob pattern="*.meta"/>
- <glob pattern="*.n3"/>
- <glob pattern="*.pen"/>
- <glob pattern="*.pl"/>
- <glob pattern="*.pm"/>
- <glob pattern="*.pod"/>
- <glob pattern="*.pom"/>
- <glob pattern="*.project"/>
- <glob pattern="*.properties"/>
- <glob pattern="*.py"/>
- <glob pattern="*.rb"/>
- <glob pattern="*.rng"/>
- <glob pattern="*.rnx"/>
- <glob pattern="*.roles"/>
- <glob pattern="*.sql"/>
- <glob pattern="*.tld"/>
- <glob pattern="*.types"/>
- <glob pattern="*.vm"/>
- <glob pattern="*.vsl"/>
- <glob pattern="*.wsdd"/>
- <glob pattern="*.xargs"/>
- <glob pattern="*.xcat"/>
- <glob pattern="*.xconf"/>
- <glob pattern="*.xegrm"/>
- <glob pattern="*.xgrm"/>
- <glob pattern="*.xlex"/>
- <glob pattern="*.xlog"/>
- <glob pattern="*.xmap"/>
- <glob pattern="*.xroles"/>
- <glob pattern="*.xsamples"/>
- <glob pattern="*.xsp"/>
- <glob pattern="*.xweb"/>
- <glob pattern="*.xwelcome"/>
- </mime-type>
-
- <mime-type type="text/prs.fallenstein.rst"/>
- <mime-type type="text/prs.lines.tag">
- <glob pattern="*.dsc"/>
- </mime-type>
- <mime-type type="text/red"/>
- <mime-type type="text/rfc822-headers"/>
- <mime-type type="text/richtext">
- <glob pattern="*.rtx"/>
- </mime-type>
- <mime-type type="text/rtf"/>
- <mime-type type="text/rtp-enc-aescm128"/>
- <mime-type type="text/rtx"/>
- <mime-type type="text/sgml">
- <glob pattern="*.sgml"/>
- <glob pattern="*.sgm"/>
- </mime-type>
- <mime-type type="text/t140"/>
- <mime-type type="text/tab-separated-values">
- <glob pattern="*.tsv"/>
- </mime-type>
-
- <mime-type type="text/troff">
- <alias type="application/x-troff"/>
- <alias type="application/x-troff-man"/>
- <alias type="application/x-troff-me"/>
- <alias type="application/x-troff-ms"/>
- <magic priority="50">
- <match value=".\\"" type="string" offset="0"/>
- <match value="'\\"" type="string" offset="0"/>
- <match value="'.\\"" type="string" offset="0"/>
- <match value="\\"" type="string" offset="0"/>
- <match value="'''" type="string" offset="0"/>
- </magic>
- <glob pattern="*.t"/>
- <glob pattern="*.tr"/>
- <glob pattern="*.roff"/>
- <glob pattern="*.man"/>
- <glob pattern="*.me"/>
- <glob pattern="*.ms"/>
- </mime-type>
-
- <mime-type type="text/ulpfec"/>
- <mime-type type="text/uri-list">
- <glob pattern="*.uri"/>
- <glob pattern="*.uris"/>
- <glob pattern="*.urls"/>
- </mime-type>
- <mime-type type="text/vnd.abc"/>
- <mime-type type="text/vnd.curl">
- <glob pattern="*.curl"/>
- </mime-type>
- <mime-type type="text/vnd.curl.dcurl">
- <glob pattern="*.dcurl"/>
- </mime-type>
- <mime-type type="text/vnd.curl.scurl">
- <glob pattern="*.scurl"/>
- </mime-type>
- <mime-type type="text/vnd.curl.mcurl">
- <glob pattern="*.mcurl"/>
- </mime-type>
- <mime-type type="text/vnd.dmclientscript"/>
- <mime-type type="text/vnd.esmertec.theme-descriptor"/>
- <mime-type type="text/vnd.fly">
- <glob pattern="*.fly"/>
- </mime-type>
- <mime-type type="text/vnd.fmi.flexstor">
- <glob pattern="*.flx"/>
- </mime-type>
- <mime-type type="text/vnd.graphviz">
- <glob pattern="*.gv"/>
- </mime-type>
- <mime-type type="text/vnd.in3d.3dml">
- <glob pattern="*.3dml"/>
- </mime-type>
- <mime-type type="text/vnd.in3d.spot">
- <glob pattern="*.spot"/>
- </mime-type>
- <mime-type type="text/vnd.iptc.newsml"/>
- <mime-type type="text/vnd.iptc.nitf"/>
- <mime-type type="text/vnd.latex-z"/>
- <mime-type type="text/vnd.motorola.reflex"/>
- <mime-type type="text/vnd.ms-mediapackage"/>
- <mime-type type="text/vnd.net2phone.commcenter.command"/>
- <mime-type type="text/vnd.si.uricatalogue"/>
- <mime-type type="text/vnd.sun.j2me.app-descriptor">
- <glob pattern="*.jad"/>
- </mime-type>
- <mime-type type="text/vnd.trolltech.linguist"/>
- <mime-type type="text/vnd.wap.si"/>
- <mime-type type="text/vnd.wap.sl"/>
- <mime-type type="text/vnd.wap.wml">
- <glob pattern="*.wml"/>
- </mime-type>
-
- <mime-type type="text/vnd.wap.wmlscript">
- <_comment>WML Script</_comment>
- <glob pattern="*.wmls"/>
- </mime-type>
-
- <mime-type type="text/x-asm">
- <glob pattern="*.s"/>
- <glob pattern="*.asm"/>
- </mime-type>
-
- <mime-type type="text/x-c">
- <glob pattern="*.c"/>
- <glob pattern="*.cc"/>
- <glob pattern="*.cxx"/>
- <glob pattern="*.cpp"/>
- <glob pattern="*.h"/>
- <glob pattern="*.hh"/>
- <glob pattern="*.dic"/>
- <sub-class-of type="text/plain"/>
- </mime-type>
-
- <mime-type type="text/x-diff">
- <magic priority="50">
- <match value="diff\ " type="string" offset="0"/>
- <match value="***\ " type="string" offset="0"/>
- <match value="Only\ in\ " type="string" offset="0"/>
- <match value="Common\ subdirectories:\ " type="string" offset="0"/>
- <match value="Index:" type="string" offset="0"/>
- </magic>
- <glob pattern="*.diff"/>
- <glob pattern="*.patch"/>
- </mime-type>
-
- <mime-type type="text/x-fortran">
- <glob pattern="*.f"/>
- <glob pattern="*.for"/>
- <glob pattern="*.f77"/>
- <glob pattern="*.f90"/>
- </mime-type>
- <mime-type type="text/x-pascal">
- <glob pattern="*.p"/>
- <glob pattern="*.pas"/>
- </mime-type>
-
- <mime-type type="text/x-java-source">
- <glob pattern="*.java"/>
- <sub-class-of type="text/plain"/>
- </mime-type>
-
- <mime-type type="text/x-setext">
- <glob pattern="*.etx"/>
- </mime-type>
-
- <mime-type type="text/x-uuencode">
- <glob pattern="*.uu"/>
- </mime-type>
- <mime-type type="text/x-vcalendar">
- <glob pattern="*.vcs"/>
- </mime-type>
- <mime-type type="text/x-vcard">
- <glob pattern="*.vcf"/>
- </mime-type>
- <mime-type type="text/xml"/>
- <mime-type type="text/xml-external-parsed-entity"/>
- <mime-type type="video/3gpp">
- <glob pattern="*.3gp"/>
- </mime-type>
- <mime-type type="video/3gpp-tt"/>
- <mime-type type="video/3gpp2">
- <glob pattern="*.3g2"/>
- </mime-type>
- <mime-type type="video/bmpeg"/>
- <mime-type type="video/bt656"/>
- <mime-type type="video/celb"/>
- <mime-type type="video/dv"/>
- <mime-type type="video/example"/>
- <mime-type type="video/h261">
- <glob pattern="*.h261"/>
- </mime-type>
- <mime-type type="video/h263">
- <glob pattern="*.h263"/>
- </mime-type>
- <mime-type type="video/h263-1998"/>
- <mime-type type="video/h263-2000"/>
- <mime-type type="video/h264">
- <glob pattern="*.h264"/>
- </mime-type>
- <mime-type type="video/jpeg">
- <glob pattern="*.jpgv"/>
- </mime-type>
- <mime-type type="video/jpeg2000"/>
- <mime-type type="video/jpm">
- <glob pattern="*.jpm"/>
- <glob pattern="*.jpgm"/>
- </mime-type>
- <mime-type type="video/mj2">
- <glob pattern="*.mj2"/>
- <glob pattern="*.mjp2"/>
- </mime-type>
- <mime-type type="video/mp1s"/>
- <mime-type type="video/mp2p"/>
- <mime-type type="video/mp2t"/>
- <mime-type type="video/mp4">
- <glob pattern="*.mp4"/>
- <glob pattern="*.mp4v"/>
- <glob pattern="*.mpg4"/>
- </mime-type>
- <mime-type type="video/mp4v-es"/>
-
- <mime-type type="video/mpeg">
- <magic priority="50">
- <match value="\000\000\001\263" type="string" offset="0"/>
- </magic>
- <glob pattern="*.mpeg"/>
- <glob pattern="*.mpg"/>
- <glob pattern="*.mpe"/>
- <glob pattern="*.m1v"/>
- <glob pattern="*.m2v"/>
- </mime-type>
-
- <mime-type type="video/vnd.mpegurl">
- <glob pattern="*.mxu"/>
- </mime-type>
-
- <mime-type type="video/mpeg4-generic"/>
- <mime-type type="video/mpv"/>
- <mime-type type="video/nv"/>
-
- <mime-type type="video/ogg">
- <glob pattern="*.ogv"/>
- <sub-class-of type="application/ogg"/>
- </mime-type>
-
- <mime-type type="video/parityfec"/>
- <mime-type type="video/pointer"/>
-
- <mime-type type="video/quicktime">
- <magic priority="50">
- <match value="moov" type="string" offset="4"/>
- <match value="mdat" type="string" offset="4"/>
- <match value="ftyp" type="string" offset="4"/>
- </magic>
- <glob pattern="*.qt"/>
- <glob pattern="*.mov"/>
- </mime-type>
-
- <mime-type type="video/raw"/>
- <mime-type type="video/rtp-enc-aescm128"/>
- <mime-type type="video/rtx"/>
- <mime-type type="video/smpte292m"/>
- <mime-type type="video/ulpfec"/>
- <mime-type type="video/vc1"/>
- <mime-type type="video/vnd.cctv"/>
- <mime-type type="video/vnd.dlna.mpeg-tts"/>
- <mime-type type="video/vnd.fvt">
- <glob pattern="*.fvt"/>
- </mime-type>
- <mime-type type="video/vnd.hns.video"/>
- <mime-type type="video/vnd.iptvforum.1dparityfec-1010"/>
- <mime-type type="video/vnd.iptvforum.1dparityfec-2005"/>
- <mime-type type="video/vnd.iptvforum.2dparityfec-1010"/>
- <mime-type type="video/vnd.iptvforum.2dparityfec-2005"/>
- <mime-type type="video/vnd.iptvforum.ttsavc"/>
- <mime-type type="video/vnd.iptvforum.ttsmpeg2"/>
- <mime-type type="video/vnd.motorola.video"/>
- <mime-type type="video/vnd.motorola.videop"/>
- <mime-type type="video/vnd.mpegurl">
- <glob pattern="*.mxu"/>
- <glob pattern="*.m4u"/>
- </mime-type>
- <mime-type type="video/vnd.ms-playready.media.pyv">
- <glob pattern="*.pyv"/>
- </mime-type>
- <mime-type type="video/vnd.nokia.interleaved-multimedia"/>
- <mime-type type="video/vnd.nokia.videovoip"/>
- <mime-type type="video/vnd.objectvideo"/>
- <mime-type type="video/vnd.sealed.mpeg1"/>
- <mime-type type="video/vnd.sealed.mpeg4"/>
- <mime-type type="video/vnd.sealed.swf"/>
- <mime-type type="video/vnd.sealedmedia.softseal.mov"/>
- <mime-type type="video/vnd.vivo">
- <glob pattern="*.viv"/>
- </mime-type>
- <mime-type type="video/x-f4v">
- <glob pattern="*.f4v"/>
- </mime-type>
-
- <mime-type type="video/x-flc">
- <glob pattern="*.flc"/>
- </mime-type>
-
- <mime-type type="video/x-fli">
- <glob pattern="*.fli"/>
- </mime-type>
-
- <mime-type type="video/x-flv">
- <magic priority="50">
- <match value="FLV" type="string" offset="0"/>
- </magic>
- <glob pattern="*.flv"/>
- </mime-type>
-
- <mime-type type="video/x-jng">
- <magic priority="50">
- <match value="\x8bJNG" type="string" offset="0"/>
- </magic>
- <glob pattern="*.jng"/>
- </mime-type>
-
- <mime-type type="video/x-m4v">
- <glob pattern="*.m4v"/>
- </mime-type>
-
- <mime-type type="video/x-mng">
- <magic priority="50">
- <match value="\x8aMNG" type="string" offset="0"/>
- </magic>
- <glob pattern="*.mng"/>
- </mime-type>
-
- <mime-type type="video/x-ms-asf">
- <glob pattern="*.asf"/>
- <glob pattern="*.asx"/>
- </mime-type>
- <mime-type type="video/x-ms-wm">
- <glob pattern="*.wm"/>
- </mime-type>
- <mime-type type="video/x-ms-wmv">
- <glob pattern="*.wmv"/>
- </mime-type>
- <mime-type type="video/x-ms-wmx">
- <glob pattern="*.wmx"/>
- </mime-type>
- <mime-type type="video/x-ms-wvx">
- <glob pattern="*.wvx"/>
- </mime-type>
-
- <mime-type type="video/x-msvideo">
- <alias type="video/avi"/>
- <alias type="video/msvideo"/>
- <magic priority="50">
- <match value="RIFF....AVI " type="string" offset="0"
- mask="0xFFFFFFFF00000000FFFFFFFF"/>
- </magic>
- <glob pattern="*.avi"/>
- </mime-type>
-
- <mime-type type="video/x-sgi-movie">
- <magic priority="50">
- <match value="MOVI" type="string" offset="0"/>
- </magic>
- <glob pattern="*.movie"/>
- </mime-type>
-
- <mime-type type="x-conference/x-cooltalk">
- <_comment>Cooltalk Audio</_comment>
- <glob pattern="*.ice"/>
- </mime-type>
-
-</mime-info>
Modified: core/trunk/exo.core.component.document/src/test/resources/conf/portal/test-configuration.xml
===================================================================
--- core/trunk/exo.core.component.document/src/test/resources/conf/portal/test-configuration.xml 2010-09-03 13:07:59 UTC (rev 3053)
+++ core/trunk/exo.core.component.document/src/test/resources/conf/portal/test-configuration.xml 2010-09-03 15:45:28 UTC (rev 3054)
@@ -26,11 +26,10 @@
<key>org.exoplatform.services.document.DocumentReaderService</key>
<type>org.exoplatform.services.document.impl.tika.TikaDocumentReaderServiceImpl</type>
<init-params>
- <properties-param>
- <name>tika-config</name>
- <description>Tika configuration</description>
- <property name="tika-configuration-path" value="/conf/portal/tika-config.xml" />
- </properties-param>
+ <value-param>
+ <name>tika-configuration</name>
+ <value>jar:/conf/portal/tika-config.xml</value>
+ </value-param>
</init-params>
</component>
</configuration>
Deleted: core/trunk/exo.core.component.document/src/test/resources/conf/portal/tika-mimetype.xml
===================================================================
--- core/trunk/exo.core.component.document/src/test/resources/conf/portal/tika-mimetype.xml 2010-09-03 13:07:59 UTC (rev 3053)
+++ core/trunk/exo.core.component.document/src/test/resources/conf/portal/tika-mimetype.xml 2010-09-03 15:45:28 UTC (rev 3054)
@@ -1,4099 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- 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.
--->
-<!--
- Description: This xml file defines the valid mime types used by Tika.
- The mime type data within this file is based on information from various
- sources like Apache Nutch, Apache HTTP Server, the file(1) command, etc.
--->
-<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/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"/>
- <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">
- <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">
- <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"/>
- <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/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"/>
- </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.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 type="application/vnd.dvb.ipdcroaming"/>
- <mime-type type="application/vnd.dvb.iptv.alfec-base"/>
- <mime-type type="application/vnd.dvb.iptv.alfec-enhancement"/>
- <mime-type type="application/vnd.dvb.notif-aggregate-root+xml"/>
- <mime-type type="application/vnd.dvb.notif-container+xml"/>
- <mime-type type="application/vnd.dvb.notif-generic+xml"/>
- <mime-type type="application/vnd.dvb.notif-ia-msglist+xml"/>
- <mime-type type="application/vnd.dvb.notif-ia-registration-request+xml"/>
- <mime-type type="application/vnd.dvb.notif-ia-registration-response+xml"/>
- <mime-type type="application/vnd.dvb.notif-init+xml"/>
- <mime-type type="application/vnd.dxr"/>
- <mime-type type="application/vnd.dynageo">
- <glob pattern="*.geo"/>
- </mime-type>
- <mime-type type="application/vnd.ecdis-update"/>
- <mime-type type="application/vnd.ecowin.chart">
- <glob pattern="*.mag"/>
- </mime-type>
- <mime-type type="application/vnd.ecowin.filerequest"/>
- <mime-type type="application/vnd.ecowin.fileupdate"/>
- <mime-type type="application/vnd.ecowin.series"/>
- <mime-type type="application/vnd.ecowin.seriesrequest"/>
- <mime-type type="application/vnd.ecowin.seriesupdate"/>
- <mime-type type="application/vnd.emclient.accessrequest+xml"/>
- <mime-type type="application/vnd.enliven">
- <glob pattern="*.nml"/>
- </mime-type>
- <mime-type type="application/vnd.epson.esf">
- <glob pattern="*.esf"/>
- </mime-type>
- <mime-type type="application/vnd.epson.msf">
- <glob pattern="*.msf"/>
- </mime-type>
- <mime-type type="application/vnd.epson.quickanime">
- <glob pattern="*.qam"/>
- </mime-type>
- <mime-type type="application/vnd.epson.salt">
- <glob pattern="*.slt"/>
- </mime-type>
- <mime-type type="application/vnd.epson.ssf">
- <glob pattern="*.ssf"/>
- </mime-type>
- <mime-type type="application/vnd.ericsson.quickcall"/>
- <mime-type type="application/vnd.eszigno3+xml">
- <glob pattern="*.es3"/>
- <glob pattern="*.et3"/>
- </mime-type>
- <mime-type type="application/vnd.etsi.aoc+xml"/>
- <mime-type type="application/vnd.etsi.cug+xml"/>
- <mime-type type="application/vnd.etsi.iptvcommand+xml"/>
- <mime-type type="application/vnd.etsi.iptvdiscovery+xml"/>
- <mime-type type="application/vnd.etsi.iptvprofile+xml"/>
- <mime-type type="application/vnd.etsi.iptvsad-bc+xml"/>
- <mime-type type="application/vnd.etsi.iptvsad-cod+xml"/>
- <mime-type type="application/vnd.etsi.iptvsad-npvr+xml"/>
- <mime-type type="application/vnd.etsi.iptvueprofile+xml"/>
- <mime-type type="application/vnd.etsi.mcid+xml"/>
- <mime-type type="application/vnd.etsi.sci+xml"/>
- <mime-type type="application/vnd.etsi.simservs+xml"/>
- <mime-type type="application/vnd.eudora.data"/>
- <mime-type type="application/vnd.ezpix-album">
- <glob pattern="*.ez2"/>
- </mime-type>
- <mime-type type="application/vnd.ezpix-package">
- <glob pattern="*.ez3"/>
- </mime-type>
- <mime-type type="application/vnd.f-secure.mobile"/>
- <mime-type type="application/vnd.fdf">
- <glob pattern="*.fdf"/>
- </mime-type>
- <mime-type type="application/vnd.fdsn.mseed">
- <glob pattern="*.mseed"/>
- </mime-type>
- <mime-type type="application/vnd.fdsn.seed">
- <glob pattern="*.seed"/>
- <glob pattern="*.dataless"/>
- </mime-type>
- <mime-type type="application/vnd.ffsns"/>
- <mime-type type="application/vnd.fints"/>
- <mime-type type="application/vnd.flographit">
- <glob pattern="*.gph"/>
- </mime-type>
- <mime-type type="application/vnd.fluxtime.clip">
- <glob pattern="*.ftc"/>
- </mime-type>
- <mime-type type="application/vnd.font-fontforge-sfd"/>
- <mime-type type="application/vnd.framemaker">
- <glob pattern="*.fm"/>
- <glob pattern="*.frame"/>
- <glob pattern="*.maker"/>
- <glob pattern="*.book"/>
- </mime-type>
- <mime-type type="application/vnd.frogans.fnc">
- <glob pattern="*.fnc"/>
- </mime-type>
- <mime-type type="application/vnd.frogans.ltf">
- <glob pattern="*.ltf"/>
- </mime-type>
- <mime-type type="application/vnd.fsc.weblaunch">
- <glob pattern="*.fsc"/>
- </mime-type>
- <mime-type type="application/vnd.fujitsu.oasys">
- <glob pattern="*.oas"/>
- </mime-type>
- <mime-type type="application/vnd.fujitsu.oasys2">
- <glob pattern="*.oa2"/>
- </mime-type>
- <mime-type type="application/vnd.fujitsu.oasys3">
- <glob pattern="*.oa3"/>
- </mime-type>
- <mime-type type="application/vnd.fujitsu.oasysgp">
- <glob pattern="*.fg5"/>
- </mime-type>
- <mime-type type="application/vnd.fujitsu.oasysprs">
- <glob pattern="*.bh2"/>
- </mime-type>
- <mime-type type="application/vnd.fujixerox.art-ex"/>
- <mime-type type="application/vnd.fujixerox.art4"/>
- <mime-type type="application/vnd.fujixerox.hbpl"/>
- <mime-type type="application/vnd.fujixerox.ddd">
- <glob pattern="*.ddd"/>
- </mime-type>
- <mime-type type="application/vnd.fujixerox.docuworks">
- <glob pattern="*.xdw"/>
- </mime-type>
- <mime-type type="application/vnd.fujixerox.docuworks.binder">
- <glob pattern="*.xbd"/>
- </mime-type>
- <mime-type type="application/vnd.fut-misnet"/>
- <mime-type type="application/vnd.fuzzysheet">
- <glob pattern="*.fzs"/>
- </mime-type>
- <mime-type type="application/vnd.genomatix.tuxedo">
- <glob pattern="*.txd"/>
- </mime-type>
- <mime-type type="application/vnd.geogebra.file">
- <glob pattern="*.ggb"/>
- </mime-type>
- <mime-type type="application/vnd.geogebra.tool">
- <glob pattern="*.ggt"/>
- </mime-type>
- <mime-type type="application/vnd.geometry-explorer">
- <glob pattern="*.gex"/>
- <glob pattern="*.gre"/>
- </mime-type>
- <mime-type type="application/vnd.gmx">
- <glob pattern="*.gmx"/>
- </mime-type>
- <mime-type type="application/vnd.google-earth.kml+xml">
- <glob pattern="*.kml"/>
- </mime-type>
- <mime-type type="application/vnd.google-earth.kmz">
- <glob pattern="*.kmz"/>
- </mime-type>
- <mime-type type="application/vnd.grafeq">
- <glob pattern="*.gqf"/>
- <glob pattern="*.gqs"/>
- </mime-type>
- <mime-type type="application/vnd.gridmp"/>
- <mime-type type="application/vnd.groove-account">
- <glob pattern="*.gac"/>
- </mime-type>
- <mime-type type="application/vnd.groove-help">
- <glob pattern="*.ghf"/>
- </mime-type>
- <mime-type type="application/vnd.groove-identity-message">
- <glob pattern="*.gim"/>
- </mime-type>
- <mime-type type="application/vnd.groove-injector">
- <glob pattern="*.grv"/>
- </mime-type>
- <mime-type type="application/vnd.groove-tool-message">
- <glob pattern="*.gtm"/>
- </mime-type>
- <mime-type type="application/vnd.groove-tool-template">
- <glob pattern="*.tpl"/>
- </mime-type>
- <mime-type type="application/vnd.groove-vcard">
- <glob pattern="*.vcg"/>
- </mime-type>
- <mime-type type="application/vnd.handheld-entertainment+xml">
- <glob pattern="*.zmm"/>
- </mime-type>
- <mime-type type="application/vnd.hbci">
- <glob pattern="*.hbci"/>
- </mime-type>
- <mime-type type="application/vnd.hcl-bireports"/>
- <mime-type type="application/vnd.hhe.lesson-player">
- <glob pattern="*.les"/>
- </mime-type>
- <mime-type type="application/vnd.hp-hpgl">
- <glob pattern="*.hpgl"/>
- </mime-type>
- <mime-type type="application/vnd.hp-hpid">
- <glob pattern="*.hpid"/>
- </mime-type>
- <mime-type type="application/vnd.hp-hps">
- <glob pattern="*.hps"/>
- </mime-type>
- <mime-type type="application/vnd.hp-jlyt">
- <glob pattern="*.jlt"/>
- </mime-type>
- <mime-type type="application/vnd.hp-pcl">
- <glob pattern="*.pcl"/>
- </mime-type>
- <mime-type type="application/vnd.hp-pclxl">
- <glob pattern="*.pclxl"/>
- </mime-type>
- <mime-type type="application/vnd.httphone"/>
- <mime-type type="application/vnd.hydrostatix.sof-data">
- <glob pattern="*.sfd-hdstx"/>
- </mime-type>
- <mime-type type="application/vnd.hzn-3d-crossword">
- <glob pattern="*.x3d"/>
- </mime-type>
- <mime-type type="application/vnd.ibm.afplinedata"/>
- <mime-type type="application/vnd.ibm.electronic-media"/>
- <mime-type type="application/vnd.ibm.minipay">
- <glob pattern="*.mpy"/>
- </mime-type>
- <mime-type type="application/vnd.ibm.modcap">
- <glob pattern="*.afp"/>
- <glob pattern="*.listafp"/>
- <glob pattern="*.list3820"/>
- </mime-type>
- <mime-type type="application/vnd.ibm.rights-management">
- <glob pattern="*.irm"/>
- </mime-type>
- <mime-type type="application/vnd.ibm.secure-container">
- <glob pattern="*.sc"/>
- </mime-type>
- <mime-type type="application/vnd.iccprofile">
- <glob pattern="*.icc"/>
- <glob pattern="*.icm"/>
- </mime-type>
- <mime-type type="application/vnd.igloader">
- <glob pattern="*.igl"/>
- </mime-type>
- <mime-type type="application/vnd.immervision-ivp">
- <glob pattern="*.ivp"/>
- </mime-type>
- <mime-type type="application/vnd.immervision-ivu">
- <glob pattern="*.ivu"/>
- </mime-type>
- <mime-type type="application/vnd.informedcontrol.rms+xml"/>
- <mime-type type="application/vnd.informix-visionary"/>
- <mime-type type="application/vnd.intercon.formnet">
- <glob pattern="*.xpw"/>
- <glob pattern="*.xpx"/>
- </mime-type>
- <mime-type type="application/vnd.intertrust.digibox"/>
- <mime-type type="application/vnd.intertrust.nncp"/>
- <mime-type type="application/vnd.intu.qbo">
- <glob pattern="*.qbo"/>
- </mime-type>
- <mime-type type="application/vnd.intu.qfx">
- <glob pattern="*.qfx"/>
- </mime-type>
- <mime-type type="application/vnd.iptc.g2.conceptitem+xml"/>
- <mime-type type="application/vnd.iptc.g2.knowledgeitem+xml"/>
- <mime-type type="application/vnd.iptc.g2.newsitem+xml"/>
- <mime-type type="application/vnd.iptc.g2.packageitem+xml"/>
- <mime-type type="application/vnd.ipunplugged.rcprofile">
- <glob pattern="*.rcprofile"/>
- </mime-type>
- <mime-type type="application/vnd.irepository.package+xml">
- <glob pattern="*.irp"/>
- </mime-type>
- <mime-type type="application/vnd.is-xpr">
- <glob pattern="*.xpr"/>
- </mime-type>
- <mime-type type="application/vnd.jam">
- <glob pattern="*.jam"/>
- </mime-type>
- <mime-type type="application/vnd.japannet-directory-service"/>
- <mime-type type="application/vnd.japannet-jpnstore-wakeup"/>
- <mime-type type="application/vnd.japannet-payment-wakeup"/>
- <mime-type type="application/vnd.japannet-registration"/>
- <mime-type type="application/vnd.japannet-registration-wakeup"/>
- <mime-type type="application/vnd.japannet-setstore-wakeup"/>
- <mime-type type="application/vnd.japannet-verification"/>
- <mime-type type="application/vnd.japannet-verification-wakeup"/>
- <mime-type type="application/vnd.jcp.javame.midlet-rms">
- <glob pattern="*.rms"/>
- </mime-type>
- <mime-type type="application/vnd.jisp">
- <glob pattern="*.jisp"/>
- </mime-type>
- <mime-type type="application/vnd.joost.joda-archive">
- <glob pattern="*.joda"/>
- </mime-type>
- <mime-type type="application/vnd.kahootz">
- <glob pattern="*.ktz"/>
- <glob pattern="*.ktr"/>
- </mime-type>
- <mime-type type="application/vnd.kde.karbon">
- <glob pattern="*.karbon"/>
- </mime-type>
- <mime-type type="application/vnd.kde.kchart">
- <glob pattern="*.chrt"/>
- </mime-type>
- <mime-type type="application/vnd.kde.kformula">
- <glob pattern="*.kfo"/>
- </mime-type>
- <mime-type type="application/vnd.kde.kivio">
- <glob pattern="*.flw"/>
- </mime-type>
- <mime-type type="application/vnd.kde.kontour">
- <glob pattern="*.kon"/>
- </mime-type>
- <mime-type type="application/vnd.kde.kpresenter">
- <glob pattern="*.kpr"/>
- <glob pattern="*.kpt"/>
- </mime-type>
- <mime-type type="application/vnd.kde.kspread">
- <glob pattern="*.ksp"/>
- </mime-type>
- <mime-type type="application/vnd.kde.kword">
- <glob pattern="*.kwd"/>
- <glob pattern="*.kwt"/>
- </mime-type>
- <mime-type type="application/vnd.kenameaapp">
- <glob pattern="*.htke"/>
- </mime-type>
- <mime-type type="application/vnd.kidspiration">
- <glob pattern="*.kia"/>
- </mime-type>
- <mime-type type="application/vnd.kinar">
- <glob pattern="*.kne"/>
- <glob pattern="*.knp"/>
- </mime-type>
- <mime-type type="application/vnd.koan">
- <alias type="application/x-koan"/>
- <_comment>SSEYO Koan File</_comment>
- <glob pattern="*.skp"/>
- <glob pattern="*.skd"/>
- <glob pattern="*.skt"/>
- <glob pattern="*.skm"/>
- </mime-type>
- <mime-type type="application/vnd.kodak-descriptor">
- <glob pattern="*.sse"/>
- </mime-type>
- <mime-type type="application/vnd.liberty-request+xml"/>
- <mime-type type="application/vnd.llamagraphics.life-balance.desktop">
- <glob pattern="*.lbd"/>
- </mime-type>
- <mime-type type="application/vnd.llamagraphics.life-balance.exchange+xml">
- <glob pattern="*.lbe"/>
- </mime-type>
- <mime-type type="application/vnd.lotus-1-2-3">
- <glob pattern="*.123"/>
- </mime-type>
- <mime-type type="application/vnd.lotus-approach">
- <glob pattern="*.apr"/>
- </mime-type>
- <mime-type type="application/vnd.lotus-freelance">
- <glob pattern="*.pre"/>
- </mime-type>
- <mime-type type="application/vnd.lotus-notes">
- <glob pattern="*.nsf"/>
- </mime-type>
- <mime-type type="application/vnd.lotus-organizer">
- <glob pattern="*.org"/>
- </mime-type>
- <mime-type type="application/vnd.lotus-screencam">
- <glob pattern="*.scm"/>
- </mime-type>
-
- <mime-type type="application/vnd.lotus-wordpro">
- <magic priority="50">
- <match value="WordPro\0" type="string" offset="0" />
- <match value="WordPro\r\373" type="string" offset="0" />
- </magic>
- <glob pattern="*.lwp"/>
- </mime-type>
-
- <mime-type type="application/vnd.macports.portpkg">
- <glob pattern="*.portpkg"/>
- </mime-type>
- <mime-type type="application/vnd.marlin.drm.actiontoken+xml"/>
- <mime-type type="application/vnd.marlin.drm.conftoken+xml"/>
- <mime-type type="application/vnd.marlin.drm.license+xml"/>
- <mime-type type="application/vnd.marlin.drm.mdcf"/>
- <mime-type type="application/vnd.mcd">
- <glob pattern="*.mcd"/>
- </mime-type>
- <mime-type type="application/vnd.medcalcdata">
- <glob pattern="*.mc1"/>
- </mime-type>
- <mime-type type="application/vnd.mediastation.cdkey">
- <glob pattern="*.cdkey"/>
- </mime-type>
- <mime-type type="application/vnd.meridian-slingshot"/>
- <mime-type type="application/vnd.mfer">
- <glob pattern="*.mwf"/>
- </mime-type>
- <mime-type type="application/vnd.mfmp">
- <glob pattern="*.mfm"/>
- </mime-type>
- <mime-type type="application/vnd.micrografx.flo">
- <glob pattern="*.flo"/>
- </mime-type>
- <mime-type type="application/vnd.micrografx.igx">
- <glob pattern="*.igx"/>
- </mime-type>
-
- <mime-type type="application/vnd.mif">
- <comment>FrameMaker MIF document</comment>
- <alias type="application/x-mif"/>
- <alias type="application/x-frame"/>
- <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="\<Book" type="string" offset="0" />
- <match value="\<Maker" type="string" offset="0" />
- </magic>
- <glob pattern="*.mif"/>
- </mime-type>
-
- <mime-type type="application/vnd.minisoft-hp3000-save"/>
- <mime-type type="application/vnd.mitsubishi.misty-guard.trustweb"/>
- <mime-type type="application/vnd.mobius.daf">
- <glob pattern="*.daf"/>
- </mime-type>
- <mime-type type="application/vnd.mobius.dis">
- <glob pattern="*.dis"/>
- </mime-type>
- <mime-type type="application/vnd.mobius.mbk">
- <glob pattern="*.mbk"/>
- </mime-type>
- <mime-type type="application/vnd.mobius.mqy">
- <glob pattern="*.mqy"/>
- </mime-type>
- <mime-type type="application/vnd.mobius.msl">
- <glob pattern="*.msl"/>
- </mime-type>
- <mime-type type="application/vnd.mobius.plc">
- <glob pattern="*.plc"/>
- </mime-type>
- <mime-type type="application/vnd.mobius.txf">
- <glob pattern="*.txf"/>
- </mime-type>
- <mime-type type="application/vnd.mophun.application">
- <glob pattern="*.mpn"/>
- </mime-type>
- <mime-type type="application/vnd.mophun.certificate">
- <glob pattern="*.mpc"/>
- </mime-type>
- <mime-type type="application/vnd.motorola.flexsuite"/>
- <mime-type type="application/vnd.motorola.flexsuite.adsi"/>
- <mime-type type="application/vnd.motorola.flexsuite.fis"/>
- <mime-type type="application/vnd.motorola.flexsuite.gotap"/>
- <mime-type type="application/vnd.motorola.flexsuite.kmr"/>
- <mime-type type="application/vnd.motorola.flexsuite.ttc"/>
- <mime-type type="application/vnd.motorola.flexsuite.wem"/>
- <mime-type type="application/vnd.motorola.iprm"/>
- <mime-type type="application/vnd.mozilla.xul+xml">
- <glob pattern="*.xul"/>
- </mime-type>
- <mime-type type="application/vnd.ms-artgalry">
- <glob pattern="*.cil"/>
- </mime-type>
- <mime-type type="application/vnd.ms-asf"/>
- <mime-type type="application/vnd.ms-cab-compressed">
- <glob pattern="*.cab"/>
- </mime-type>
-
-
- <mime-type type="application/excel"/>
- <mime-type type="application/xls"/>
-
- <!-- http://www.iana.org/assignments/media-types/application/vnd.ms-excel -->
- <!--mime-type type="application/xls"-->
- <mime-type type="application/vnd.ms-excel">
- <!-- Use org.apache.tika.detect.ContainerAwareDetector for more reliable detection of OLE2 documents -->
- <alias type="application/msexcel" />
- <comment>Microsoft Excel Spreadsheet</comment>
- <magic priority="50">
- <match value="Microsoft\ Excel\ 5.0\ Worksheet" type="string" offset="2080"/>
- <match value="Foglio\ di\ lavoro\ Microsoft\ Exce" type="string" offset="2080"/>
- <match value="Biff5" type="string" offset="2114"/>
- <match value="Biff5" type="string" offset="2121"/>
- <match value="\x09\x04\x06\x00\x00\x00\x10\x00" type="string" offset="0"/>
- <match value="0xd0cf11e0a1b11ae1" type="string" offset="0:8">
- <match value="W\x00o\x00r\x00k\x00b\x00o\x00o\x00k" type="string" offset="1152:4096" />
- </match>
- </magic>
- <glob pattern="*.xls"/>
- <glob pattern="*.xlm"/>
- <glob pattern="*.xla"/>
- <glob pattern="*.xlc"/>
- <glob pattern="*.xlt"/>
- <glob pattern="*.xlw"/>
- <glob pattern="*.xll"/>
- <glob pattern="*.xld"/>
- <sub-class-of type="application/x-tika-msoffice"/>
- </mime-type>
-
-
-
- <mime-type type="application/vnd.ms-excel.addin.macroenabled.12">
- <comment>Office Open XML Workbook Add-in (macro-enabled)</comment>
- <glob pattern="*.xlam"/>
- <sub-class-of type="application/x-tika-ooxml"/>
- </mime-type>
-
- <mime-type type="application/vnd.ms-excel.sheet.macroenabled.12">
- <comment>Office Open XML Workbook (macro-enabled)</comment>
- <glob pattern="*.xlsm"/>
- <sub-class-of type="application/x-tika-ooxml"/>
- </mime-type>
-
- <mime-type type="application/vnd.ms-excel.sheet.binary.macroenabled.12">
- <comment>Microsoft Excel 2007 Binary Spreadsheet</comment>
- <glob pattern="*.xlsb"/>
- <sub-class-of type="application/vnd.ms-excel"/>
- </mime-type>
-
- <mime-type type="application/vnd.ms-excel.template.macroenabled.12">
- <glob pattern="*.xltm"/>
- <sub-class-of type="application/x-tika-ooxml"/>
- </mime-type>
-
- <mime-type type="application/vnd.ms-fontobject">
- <glob pattern="*.eot"/>
- </mime-type>
- <mime-type type="application/vnd.ms-htmlhelp">
- <glob pattern="*.chm"/>
- </mime-type>
- <mime-type type="application/vnd.ms-ims">
- <glob pattern="*.ims"/>
- </mime-type>
- <mime-type type="application/vnd.ms-lrm">
- <glob pattern="*.lrm"/>
- </mime-type>
-
- <mime-type type="application/vnd.ms-outlook">
- <comment>Microsoft Outlook Message</comment>
- <glob pattern="*.msg" />
- <sub-class-of type="application/x-tika-msoffice"/>
- </mime-type>
-
- <mime-type type="application/vnd.ms-pki.seccat">
- <glob pattern="*.cat"/>
- </mime-type>
- <mime-type type="application/vnd.ms-pki.stl">
- <glob pattern="*.stl"/>
- </mime-type>
- <mime-type type="application/vnd.ms-playready.initiator+xml"/>
-
- <!-- http://www.iana.org/assignments/media-types/application/vnd.ms-powerpoint -->
- <mime-type type="application/vnd.ms-powerpoint">
- <!-- Use org.apache.tika.detect.ContainerAwareDetector for more reliable detection of OLE2 documents -->
- <alias type="application/mspowerpoint"/>
- <comment>Microsoft Powerpoint Presentation</comment>
- <magic priority="50">
- <match value="0xd0cf11e0a1b11ae1" type="string" offset="0:8">
- <match value="P\x00o\x00w\x00e\x00r\x00P\x00o\x00i\x00n\x00t\x00 D\x00o\x00c\x00u\x00m\x00e\x00n\x00t" type="string" offset="1152:4096" />
- </match>
- </magic>
- <glob pattern="*.ppz"/>
- <glob pattern="*.ppt"/>
- <glob pattern="*.pps"/>
- <glob pattern="*.pot"/>
- <glob pattern="*.ppa"/>
- <sub-class-of type="application/x-tika-msoffice"/>
- </mime-type>
-
- <mime-type type="application/vnd.ms-powerpoint.addin.macroenabled.12">
- <comment>Office Open XML Presentation Add-in (macro-enabled)</comment>
- <glob pattern="*.ppam"/>
- <sub-class-of type="application/x-tika-msoffice"/>
- </mime-type>
-
- <mime-type type="application/vnd.ms-powerpoint.presentation.macroenabled.12">
- <comment>Office Open XML Presentation (macro-enabled)</comment>
- <glob pattern="*.pptm"/>
- <sub-class-of type="application/x-tika-msoffice"/>
- </mime-type>
-
- <mime-type type="application/vnd.ms-powerpoint.slide.macroenabled.12">
- <glob pattern="*.sldm"/>
- <sub-class-of type="application/x-tika-msoffice"/>
- </mime-type>
-
- <mime-type type="application/vnd.ms-powerpoint.slideshow.macroenabled.12">
- <comment>Office Open XML Presentation Slideshow (macro-enabled)</comment>
- <glob pattern="*.ppsm"/>
- <sub-class-of type="application/x-tika-msoffice"/>
- </mime-type>
-
- <mime-type type="application/vnd.ms-powerpoint.template.macroenabled.12">
- <glob pattern="*.potm"/>
- <sub-class-of type="application/x-tika-msoffice"/>
- </mime-type>
-
- <mime-type type="application/vnd.ms-project">
- <glob pattern="*.mpp"/>
- <glob pattern="*.mpt"/>
- </mime-type>
-
- <mime-type type="application/vnd.ms-tnef">
- <magic priority="50">
- <match value="0x223e9f78" type="little16" offset="0" />
- </magic>
- </mime-type>
-
- <mime-type type="application/vnd.ms-wmdrm.lic-chlg-req"/>
- <mime-type type="application/vnd.ms-wmdrm.lic-resp"/>
- <mime-type type="application/vnd.ms-wmdrm.meter-chlg-req"/>
- <mime-type type="application/vnd.ms-wmdrm.meter-resp"/>
-
- <mime-type type="application/vnd.ms-word.document.macroenabled.12">
- <comment>Office Open XML Document (macro-enabled)</comment>
- <glob pattern="*.docm"/>
- <sub-class-of type="application/x-tika-ooxml"/>
- </mime-type>
-
- <mime-type type="application/vnd.ms-word.template.macroenabled.12">
- <comment>Office Open XML Document Template (macro-enabled)</comment>
- <glob pattern="*.dotm"/>
- <sub-class-of type="application/x-tika-ooxml"/>
- </mime-type>
-
- <mime-type type="application/vnd.ms-works">
- <glob pattern="*.wps"/>
- <glob pattern="*.wks"/>
- <glob pattern="*.wcm"/>
- <glob pattern="*.wdb"/>
- </mime-type>
- <mime-type type="application/vnd.ms-wpl">
- <glob pattern="*.wpl"/>
- </mime-type>
- <mime-type type="application/vnd.ms-xpsdocument">
- <glob pattern="*.xps"/>
- </mime-type>
- <mime-type type="application/vnd.mseq">
- <glob pattern="*.mseq"/>
- </mime-type>
- <mime-type type="application/vnd.msign"/>
- <mime-type type="application/vnd.multiad.creator"/>
- <mime-type type="application/vnd.multiad.creator.cif"/>
- <mime-type type="application/vnd.music-niff"/>
- <mime-type type="application/vnd.musician">
- <glob pattern="*.mus"/>
- </mime-type>
- <mime-type type="application/vnd.muvee.style">
- <glob pattern="*.msty"/>
- </mime-type>
- <mime-type type="application/vnd.ncd.control"/>
- <mime-type type="application/vnd.ncd.reference"/>
- <mime-type type="application/vnd.nervana"/>
- <mime-type type="application/vnd.netfpx"/>
- <mime-type type="application/vnd.neurolanguage.nlu">
- <glob pattern="*.nlu"/>
- </mime-type>
- <mime-type type="application/vnd.noblenet-directory">
- <glob pattern="*.nnd"/>
- </mime-type>
- <mime-type type="application/vnd.noblenet-sealer">
- <glob pattern="*.nns"/>
- </mime-type>
- <mime-type type="application/vnd.noblenet-web">
- <glob pattern="*.nnw"/>
- </mime-type>
- <mime-type type="application/vnd.nokia.catalogs"/>
- <mime-type type="application/vnd.nokia.conml+wbxml"/>
- <mime-type type="application/vnd.nokia.conml+xml"/>
- <mime-type type="application/vnd.nokia.isds-radio-presets"/>
- <mime-type type="application/vnd.nokia.iptv.config+xml"/>
- <mime-type type="application/vnd.nokia.landmark+wbxml"/>
- <mime-type type="application/vnd.nokia.landmark+xml"/>
- <mime-type type="application/vnd.nokia.landmarkcollection+xml"/>
- <mime-type type="application/vnd.nokia.n-gage.ac+xml"/>
- <mime-type type="application/vnd.nokia.n-gage.data">
- <glob pattern="*.ngdat"/>
- </mime-type>
- <mime-type type="application/vnd.nokia.n-gage.symbian.install">
- <glob pattern="*.n-gage"/>
- </mime-type>
- <mime-type type="application/vnd.nokia.ncd"/>
- <mime-type type="application/vnd.nokia.pcd+wbxml"/>
- <mime-type type="application/vnd.nokia.pcd+xml"/>
- <mime-type type="application/vnd.nokia.radio-preset">
- <glob pattern="*.rpst"/>
- </mime-type>
- <mime-type type="application/vnd.nokia.radio-presets">
- <glob pattern="*.rpss"/>
- </mime-type>
- <mime-type type="application/vnd.novadigm.edm">
- <glob pattern="*.edm"/>
- </mime-type>
- <mime-type type="application/vnd.novadigm.edx">
- <glob pattern="*.edx"/>
- </mime-type>
- <mime-type type="application/vnd.novadigm.ext">
- <glob pattern="*.ext"/>
- </mime-type>
-
- <!-- =================================================================== -->
- <!-- Open Document Format for Office Applications (OpenDocument) v1.0 -->
- <!-- http://www.oasis-open.org/specs/index.php#opendocumentv1.0 -->
- <!-- =================================================================== -->
-
- <mime-type type="application/vnd.oasis.opendocument.chart">
- <alias type="application/x-vnd.oasis.opendocument.chart"/>
- <comment>OpenDocument v1.0: Chart document</comment>
- <magic>
- <match type="string" offset="0" value="PK">
- <match type="string" offset="30"
- value="mimetypeapplication/vnd.oasis.opendocument.chart"/>
- </match>
- </magic>
- <glob pattern="*.odc"/>
- </mime-type>
-
- <mime-type type="application/vnd.oasis.opendocument.chart-template">
- <alias type="application/x-vnd.oasis.opendocument.chart-template"/>
- <comment>OpenDocument v1.0: Chart document used as template</comment>
- <magic>
- <match type="string" offset="0" value="PK">
- <match type="string" offset="30"
- value="mimetypeapplication/vnd.oasis.opendocument.chart-template"/>
- </match>
- </magic>
- <glob pattern="*.otc"/>
- </mime-type>
-
- <mime-type type="application/vnd.oasis.opendocument.database">
- <glob pattern="*.odb"/>
- </mime-type>
-
- <mime-type type="application/vnd.oasis.opendocument.formula">
- <alias type="application/x-vnd.oasis.opendocument.formula"/>
- <comment>OpenDocument v1.0: Formula document</comment>
- <magic>
- <match type="string" offset="0" value="PK">
- <match type="string" offset="30"
- value="mimetypeapplication/vnd.oasis.opendocument.formula" />
- </match>
- </magic>
- <glob pattern="*.odf"/>
- </mime-type>
-
- <mime-type type="application/vnd.oasis.opendocument.formula-template">
- <alias type="application/x-vnd.oasis.opendocument.formula-template"/>
- <comment>OpenDocument v1.0: Formula document used as template</comment>
- <magic>
- <match type="string" offset="0" value="PK">
- <match type="string" offset="30"
- value="mimetypeapplication/vnd.oasis.opendocument.formula-template"/>
- </match>
- </magic>
- <glob pattern="*.odft"/>
- </mime-type>
-
- <mime-type type="application/vnd.oasis.opendocument.graphics">
- <alias type="application/x-vnd.oasis.opendocument.graphics"/>
- <comment>OpenDocument v1.0: Graphics document (Drawing)</comment>
- <magic>
- <match type="string" offset="0" value="PK">
- <match type="string" offset="30"
- value="mimetypeapplication/vnd.oasis.opendocument.graphics"/>
- </match>
- </magic>
- <glob pattern="*.odg"/>
- </mime-type>
-
- <mime-type type="application/vnd.oasis.opendocument.graphics-template">
- <alias type="application/x-vnd.oasis.opendocument.graphics-template"/>
- <comment>OpenDocument v1.0: Graphics document used as template</comment>
- <magic>
- <match type="string" offset="0" value="PK">
- <match type="string" offset="30"
- value="mimetypeapplication/vnd.oasis.opendocument.graphics-template"/>
- </match>
- </magic>
- <glob pattern="*.otg"/>
- </mime-type>
-
- <mime-type type="application/vnd.oasis.opendocument.image">
- <alias type="application/x-vnd.oasis.opendocument.image"/>
- <comment>OpenDocument v1.0: Image document</comment>
- <magic>
- <match type="string" offset="0" value="PK">
- <match type="string" offset="30"
- value="mimetypeapplication/vnd.oasis.opendocument.image"/>
- </match>
- </magic>
- <glob pattern="*.odi"/>
- </mime-type>
-
- <mime-type type="application/vnd.oasis.opendocument.image-template">
- <alias type="application/x-vnd.oasis.opendocument.image-template"/>
- <comment>OpenDocument v1.0: Image document used as template</comment>
- <magic>
- <match type="string" offset="0" value="PK">
- <match type="string" offset="30"
- value="mimetypeapplication/vnd.oasis.opendocument.image-template"/>
- </match>
- </magic>
- <glob pattern="*.oti"/>
- </mime-type>
-
- <mime-type type="application/vnd.oasis.opendocument.presentation">
- <alias type="application/x-vnd.oasis.opendocument.presentation"/>
- <comment>OpenDocument v1.0: Presentation document</comment>
- <magic>
- <match type="string" offset="0" value="PK">
- <match type="string" offset="30"
- value="mimetypeapplication/vnd.oasis.opendocument.presentation"/>
- </match>
- </magic>
- <glob pattern="*.odp"/>
- </mime-type>
-
- <mime-type type="application/vnd.oasis.opendocument.presentation-template">
- <alias type="application/x-vnd.oasis.opendocument.presentation-template"/>
- <comment>OpenDocument v1.0: Presentation document used as template</comment>
- <magic>
- <match type="string" offset="0" value="PK">
- <match type="string" offset="30"
- value="mimetypeapplication/vnd.oasis.opendocument.presentation-template"/>
- </match>
- </magic>
- <glob pattern="*.otp"/>
- </mime-type>
-
- <mime-type type="application/vnd.oasis.opendocument.spreadsheet">
- <alias type="application/x-vnd.oasis.opendocument.spreadsheet"/>
- <comment>OpenDocument v1.0: Spreadsheet document</comment>
- <magic>
- <match type="string" offset="0" value="PK">
- <match type="string" offset="30"
- value="mimetypeapplication/vnd.oasis.opendocument.spreadsheet"/>
- </match>
- </magic>
- <glob pattern="*.ods"/>
- </mime-type>
-
- <mime-type type="application/vnd.oasis.opendocument.spreadsheet-template">
- <alias type="application/x-vnd.oasis.opendocument.spreadsheet-template"/>
- <comment>OpenDocument v1.0: Spreadsheet document used as template</comment>
- <magic>
- <match type="string" offset="0" value="PK">
- <match type="string" offset="30"
- value="mimetypeapplication/vnd.oasis.opendocument.spreadsheet-template"/>
- </match>
- </magic>
- <glob pattern="*.ots"/>
- </mime-type>
-
- <mime-type type="application/vnd.oasis.opendocument.text">
- <alias type="application/x-vnd.oasis.opendocument.text"/>
- <comment>OpenDocument v1.0: Text document</comment>
- <magic>
- <match type="string" offset="0" value="PK">
- <match type="string" offset="30"
- value="mimetypeapplication/vnd.oasis.opendocument.text"/>
- </match>
- </magic>
- <glob pattern="*.odt"/>
- </mime-type>
-
- <mime-type type="application/vnd.oasis.opendocument.text-master">
- <alias type="application/x-vnd.oasis.opendocument.text-master"/>
- <comment>OpenDocument v1.0: Global Text document</comment>
- <magic>
- <match type="string" offset="0" value="PK">
- <match type="string" offset="30"
- value="mimetypeapplication/vnd.oasis.opendocument.text-master"/>
- </match>
- </magic>
- <glob pattern="*.otm"/>
- </mime-type>
-
- <mime-type type="application/vnd.oasis.opendocument.text-template">
- <alias type="application/x-vnd.oasis.opendocument.text-template"/>
- <comment>OpenDocument v1.0: Text document used as template</comment>
- <magic>
- <match type="string" offset="0" value="PK">
- <match type="string" offset="30"
- value="mimetypeapplication/vnd.oasis.opendocument.text-template"/>
- </match>
- </magic>
- <glob pattern="*.ott"/>
- </mime-type>
-
- <mime-type type="application/vnd.oasis.opendocument.text-web">
- <alias type="application/x-vnd.oasis.opendocument.text-web"/>
- <comment>OpenDocument v1.0: Text document used as template for HTML documents</comment>
- <magic>
- <match type="string" offset="0" value="PK">
- <match type="string" offset="30"
- value="mimetypeapplication/vnd.oasis.opendocument.text-web"/>
- </match>
- </magic>
- <glob pattern="*.oth"/>
- </mime-type>
-
- <mime-type type="application/vnd.obn"/>
- <mime-type type="application/vnd.olpc-sugar">
- <glob pattern="*.xo"/>
- </mime-type>
- <mime-type type="application/vnd.oma-scws-config"/>
- <mime-type type="application/vnd.oma-scws-http-request"/>
- <mime-type type="application/vnd.oma-scws-http-response"/>
- <mime-type type="application/vnd.oma.bcast.associated-procedure-parameter+xml"/>
- <mime-type type="application/vnd.oma.bcast.drm-trigger+xml"/>
- <mime-type type="application/vnd.oma.bcast.imd+xml"/>
- <mime-type type="application/vnd.oma.bcast.ltkm"/>
- <mime-type type="application/vnd.oma.bcast.notification+xml"/>
- <mime-type type="application/vnd.oma.bcast.provisioningtrigger"/>
- <mime-type type="application/vnd.oma.bcast.sgboot"/>
- <mime-type type="application/vnd.oma.bcast.sgdd+xml"/>
- <mime-type type="application/vnd.oma.bcast.sgdu"/>
- <mime-type type="application/vnd.oma.bcast.simple-symbol-container"/>
- <mime-type type="application/vnd.oma.bcast.smartcard-trigger+xml"/>
- <mime-type type="application/vnd.oma.bcast.sprov+xml"/>
- <mime-type type="application/vnd.oma.bcast.stkm"/>
- <mime-type type="application/vnd.oma.dcd"/>
- <mime-type type="application/vnd.oma.dcdc"/>
- <mime-type type="application/vnd.oma.dd2+xml">
- <glob pattern="*.dd2"/>
- </mime-type>
- <mime-type type="application/vnd.oma.drm.risd+xml"/>
- <mime-type type="application/vnd.oma.group-usage-list+xml"/>
- <mime-type type="application/vnd.oma.poc.detailed-progress-report+xml"/>
- <mime-type type="application/vnd.oma.poc.final-report+xml"/>
- <mime-type type="application/vnd.oma.poc.groups+xml"/>
- <mime-type type="application/vnd.oma.poc.invocation-descriptor+xml"/>
- <mime-type type="application/vnd.oma.poc.optimized-progress-report+xml"/>
- <mime-type type="application/vnd.oma.xcap-directory+xml"/>
- <mime-type type="application/vnd.omads-email+xml"/>
- <mime-type type="application/vnd.omads-file+xml"/>
- <mime-type type="application/vnd.omads-folder+xml"/>
- <mime-type type="application/vnd.omaloc-supl-init"/>
-
- <mime-type type="application/vnd.openofficeorg.extension">
- <glob pattern="*.oxt"/>
- </mime-type>
-
- <mime-type type="application/vnd.openxmlformats-officedocument.presentationml.presentation">
- <comment>Office Open XML Presentation</comment>
- <glob pattern="*.pptx"/>
- <glob pattern="*.thmx"/>
- <sub-class-of type="application/x-tika-ooxml"/>
- </mime-type>
-
- <mime-type type="application/vnd.openxmlformats-officedocument.presentationml.slide">
- <glob pattern="*.sldx"/>
- <sub-class-of type="application/x-tika-ooxml"/>
- </mime-type>
-
- <mime-type type="application/vnd.openxmlformats-officedocument.presentationml.slideshow">
- <glob pattern="*.ppsx"/>
- <sub-class-of type="application/x-tika-ooxml"/>
- </mime-type>
-
- <mime-type type="application/vnd.openxmlformats-officedocument.presentationml.template">
- <comment>Office Open XML Presentation Template</comment>
- <glob pattern="*.potx"/>
- <sub-class-of type="application/x-tika-ooxml"/>
- </mime-type>
-
- <mime-type type="application/vnd.openxmlformats-officedocument.presentationml.slideshow">
- <comment>Office Open XML Presentation Slideshow</comment>
- <glob pattern="*.ppsx"/>
- <sub-class-of type="application/x-tika-ooxml"/>
- </mime-type>
-
- <mime-type type="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet">
- <comment>Office Open XML Workbook</comment>
- <glob pattern="*.xlsx"/>
- <sub-class-of type="application/x-tika-ooxml"/>
- </mime-type>
-
- <mime-type type="application/vnd.openxmlformats-officedocument.spreadsheetml.template">
- <comment>Office Open XML Workbook Template</comment>
- <glob pattern="*.xltx"/>
- <sub-class-of type="application/x-tika-ooxml"/>
- </mime-type>
-
- <mime-type type="application/vnd.ms-excel.template.macroenabled.12">
- <comment>Office Open XML Workbook Template (macro-enabled)</comment>
- <glob pattern="*.xltm"/>
- <sub-class-of type="application/x-tika-ooxml"/>
- </mime-type>
-
- <mime-type type="application/vnd.openxmlformats-officedocument.wordprocessingml.document">
- <comment>Office Open XML Document</comment>
- <glob pattern="*.docx"/>
- <sub-class-of type="application/x-tika-ooxml"/>
- </mime-type>
-
- <mime-type type="application/vnd.openxmlformats-officedocument.wordprocessingml.template">
- <comment>Office Open XML Document Template</comment>
- <glob pattern="*.dotx"/>
- <sub-class-of type="application/x-tika-ooxml"/>
- </mime-type>
-
- <mime-type type="application/vnd.osa.netdeploy"/>
- <mime-type type="application/vnd.osgi.bundle"/>
- <mime-type type="application/vnd.osgi.dp">
- <glob pattern="*.dp"/>
- </mime-type>
- <mime-type type="application/vnd.otps.ct-kip+xml"/>
- <mime-type type="application/vnd.palm">
- <glob pattern="*.pdb"/>
- <glob pattern="*.pqa"/>
- <glob pattern="*.oprc"/>
- </mime-type>
- <mime-type type="application/vnd.paos.xml"/>
- <mime-type type="application/vnd.pg.format">
- <glob pattern="*.str"/>
- </mime-type>
- <mime-type type="application/vnd.pg.osasli">
- <glob pattern="*.ei6"/>
- </mime-type>
- <mime-type type="application/vnd.piaccess.application-licence"/>
- <mime-type type="application/vnd.picsel">
- <glob pattern="*.efif"/>
- </mime-type>
- <mime-type type="application/vnd.poc.group-advertisement+xml"/>
- <mime-type type="application/vnd.pocketlearn">
- <glob pattern="*.plf"/>
- </mime-type>
- <mime-type type="application/vnd.powerbuilder6">
- <glob pattern="*.pbd"/>
- </mime-type>
- <mime-type type="application/vnd.powerbuilder6-s"/>
- <mime-type type="application/vnd.powerbuilder7"/>
- <mime-type type="application/vnd.powerbuilder7-s"/>
- <mime-type type="application/vnd.powerbuilder75"/>
- <mime-type type="application/vnd.powerbuilder75-s"/>
- <mime-type type="application/vnd.preminet"/>
- <mime-type type="application/vnd.previewsystems.box">
- <glob pattern="*.box"/>
- </mime-type>
- <mime-type type="application/vnd.proteus.magazine">
- <glob pattern="*.mgz"/>
- </mime-type>
- <mime-type type="application/vnd.publishare-delta-tree">
- <glob pattern="*.qps"/>
- </mime-type>
- <mime-type type="application/vnd.pvi.ptid1">
- <glob pattern="*.ptid"/>
- </mime-type>
- <mime-type type="application/vnd.pwg-multiplexed"/>
- <mime-type type="application/vnd.pwg-xhtml-print+xml"/>
- <mime-type type="application/vnd.qualcomm.brew-app-res"/>
- <mime-type type="application/vnd.quark.quarkxpress">
- <glob pattern="*.qxd"/>
- <glob pattern="*.qxt"/>
- <glob pattern="*.qwd"/>
- <glob pattern="*.qwt"/>
- <glob pattern="*.qxl"/>
- <glob pattern="*.qxb"/>
- </mime-type>
- <mime-type type="application/vnd.rapid"/>
- <mime-type type="application/vnd.recordare.musicxml">
- <glob pattern="*.mxl"/>
- </mime-type>
- <mime-type type="application/vnd.recordare.musicxml+xml">
- <glob pattern="*.musicxml"/>
- </mime-type>
- <mime-type type="application/vnd.renlearn.rlprint"/>
- <mime-type type="application/vnd.rim.cod">
- <glob pattern="*.cod"/>
- </mime-type>
-
- <mime-type type="application/vnd.rn-realmedia">
- <magic priority="50">
- <match value=".RMF" type="string" offset="0" />
- </magic>
- <glob pattern="*.rm"/>
- </mime-type>
-
- <mime-type type="application/vnd.route66.link66+xml">
- <glob pattern="*.link66"/>
- </mime-type>
- <mime-type type="application/vnd.ruckus.download"/>
- <mime-type type="application/vnd.s3sms"/>
- <mime-type type="application/vnd.sbm.cid"/>
- <mime-type type="application/vnd.sbm.mid2"/>
- <mime-type type="application/vnd.scribus"/>
- <mime-type type="application/vnd.sealed.3df"/>
- <mime-type type="application/vnd.sealed.csf"/>
- <mime-type type="application/vnd.sealed.doc"/>
- <mime-type type="application/vnd.sealed.eml"/>
- <mime-type type="application/vnd.sealed.mht"/>
- <mime-type type="application/vnd.sealed.net"/>
- <mime-type type="application/vnd.sealed.ppt"/>
- <mime-type type="application/vnd.sealed.tiff"/>
- <mime-type type="application/vnd.sealed.xls"/>
- <mime-type type="application/vnd.sealedmedia.softseal.html"/>
- <mime-type type="application/vnd.sealedmedia.softseal.pdf"/>
- <mime-type type="application/vnd.seemail">
- <glob pattern="*.see"/>
- </mime-type>
- <mime-type type="application/vnd.sema">
- <glob pattern="*.sema"/>
- </mime-type>
- <mime-type type="application/vnd.semd">
- <glob pattern="*.semd"/>
- </mime-type>
- <mime-type type="application/vnd.semf">
- <glob pattern="*.semf"/>
- </mime-type>
- <mime-type type="application/vnd.shana.informed.formdata">
- <glob pattern="*.ifm"/>
- </mime-type>
- <mime-type type="application/vnd.shana.informed.formtemplate">
- <glob pattern="*.itp"/>
- </mime-type>
- <mime-type type="application/vnd.shana.informed.interchange">
- <glob pattern="*.iif"/>
- </mime-type>
- <mime-type type="application/vnd.shana.informed.package">
- <glob pattern="*.ipk"/>
- </mime-type>
- <mime-type type="application/vnd.simtech-mindmapper">
- <glob pattern="*.twd"/>
- <glob pattern="*.twds"/>
- </mime-type>
- <mime-type type="application/vnd.smaf">
- <glob pattern="*.mmf"/>
- </mime-type>
- <mime-type type="application/vnd.smart.teacher">
- <glob pattern="*.teacher"/>
- </mime-type>
- <mime-type type="application/vnd.software602.filler.form+xml"/>
- <mime-type type="application/vnd.software602.filler.form-xml-zip"/>
- <mime-type type="application/vnd.solent.sdkm+xml">
- <glob pattern="*.sdkm"/>
- <glob pattern="*.sdkd"/>
- </mime-type>
- <mime-type type="application/vnd.spotfire.dxp">
- <glob pattern="*.dxp"/>
- </mime-type>
- <mime-type type="application/vnd.spotfire.sfs">
- <glob pattern="*.sfs"/>
- </mime-type>
- <mime-type type="application/vnd.sss-cod"/>
- <mime-type type="application/vnd.sss-dtf"/>
- <mime-type type="application/vnd.sss-ntf"/>
- <mime-type type="application/vnd.stardivision.calc">
- <glob pattern="*.sdc"/>
- </mime-type>
- <mime-type type="application/vnd.stardivision.draw">
- <glob pattern="*.sda"/>
- </mime-type>
- <mime-type type="application/vnd.stardivision.impress">
- <glob pattern="*.sdd"/>
- </mime-type>
- <mime-type type="application/vnd.stardivision.math">
- <glob pattern="*.smf"/>
- </mime-type>
- <mime-type type="application/vnd.stardivision.writer">
- <glob pattern="*.sdw"/>
- </mime-type>
- <mime-type type="application/vnd.stardivision.writer">
- <glob pattern="*.vor"/>
- </mime-type>
- <mime-type type="application/vnd.stardivision.writer-global">
- <glob pattern="*.sgl"/>
- </mime-type>
- <mime-type type="application/vnd.street-stream"/>
- <mime-type type="application/vnd.sun.xml.calc">
- <glob pattern="*.sxc"/>
- </mime-type>
- <mime-type type="application/vnd.sun.xml.calc.template">
- <glob pattern="*.stc"/>
- </mime-type>
- <mime-type type="application/vnd.sun.xml.draw">
- <glob pattern="*.sxd"/>
- </mime-type>
- <mime-type type="application/vnd.sun.xml.draw.template">
- <glob pattern="*.std"/>
- </mime-type>
- <mime-type type="application/vnd.sun.xml.impress">
- <glob pattern="*.sxi"/>
- </mime-type>
- <mime-type type="application/vnd.sun.xml.impress.template">
- <glob pattern="*.sti"/>
- </mime-type>
- <mime-type type="application/vnd.sun.xml.math">
- <glob pattern="*.sxm"/>
- </mime-type>
-
- <mime-type type="application/vnd.sun.xml.writer">
- <alias type="application/x-vnd.sun.xml.writer"/>
- <comment>OpenOffice v1.0: Writer Document</comment>
- <magic>
- <match type="string" offset="0" value="PK">
- <match type="string" offset="30"
- value="mimetypeapplication/vnd.sun.xml.writer"/>
- </match>
- </magic>
- <glob pattern="*.sxw"/>
- </mime-type>
-
- <mime-type type="application/vnd.sun.xml.writer.global">
- <glob pattern="*.sxg"/>
- </mime-type>
- <mime-type type="application/vnd.sun.xml.writer.template">
- <glob pattern="*.stw"/>
- </mime-type>
- <mime-type type="application/vnd.sun.wadl+xml"/>
- <mime-type type="application/vnd.sus-calendar">
- <glob pattern="*.sus"/>
- <glob pattern="*.susp"/>
- </mime-type>
- <mime-type type="application/vnd.svd">
- <glob pattern="*.svd"/>
- </mime-type>
- <mime-type type="application/vnd.swiftview-ics"/>
-
- <mime-type type="application/vnd.symbian.install">
- <magic priority="50">
- <match value="0x10000419" type="little32" offset="8" />
- </magic>
- <glob pattern="*.sis"/>
- <glob pattern="*.sisx"/>
- </mime-type>
-
- <mime-type type="application/vnd.syncml+xml">
- <glob pattern="*.xsm"/>
- </mime-type>
- <mime-type type="application/vnd.syncml.dm+wbxml">
- <glob pattern="*.bdm"/>
- </mime-type>
- <mime-type type="application/vnd.syncml.dm+xml">
- <glob pattern="*.xdm"/>
- </mime-type>
- <mime-type type="application/vnd.syncml.dm.notification"/>
- <mime-type type="application/vnd.syncml.ds.notification"/>
- <mime-type type="application/vnd.tao.intent-module-archive">
- <glob pattern="*.tao"/>
- </mime-type>
- <mime-type type="application/vnd.tmobile-livetv">
- <glob pattern="*.tmo"/>
- </mime-type>
- <mime-type type="application/vnd.trid.tpt">
- <glob pattern="*.tpt"/>
- </mime-type>
- <mime-type type="application/vnd.triscape.mxs">
- <glob pattern="*.mxs"/>
- </mime-type>
- <mime-type type="application/vnd.trueapp">
- <glob pattern="*.tra"/>
- </mime-type>
- <mime-type type="application/vnd.truedoc"/>
- <mime-type type="application/vnd.ufdl">
- <glob pattern="*.ufd"/>
- <glob pattern="*.ufdl"/>
- </mime-type>
- <mime-type type="application/vnd.uiq.theme">
- <glob pattern="*.utz"/>
- </mime-type>
- <mime-type type="application/vnd.umajin">
- <glob pattern="*.umj"/>
- </mime-type>
- <mime-type type="application/vnd.unity">
- <glob pattern="*.unityweb"/>
- </mime-type>
- <mime-type type="application/vnd.uoml+xml">
- <glob pattern="*.uoml"/>
- </mime-type>
- <mime-type type="application/vnd.uplanet.alert"/>
- <mime-type type="application/vnd.uplanet.alert-wbxml"/>
- <mime-type type="application/vnd.uplanet.bearer-choice"/>
- <mime-type type="application/vnd.uplanet.bearer-choice-wbxml"/>
- <mime-type type="application/vnd.uplanet.cacheop"/>
- <mime-type type="application/vnd.uplanet.cacheop-wbxml"/>
- <mime-type type="application/vnd.uplanet.channel"/>
- <mime-type type="application/vnd.uplanet.channel-wbxml"/>
- <mime-type type="application/vnd.uplanet.list"/>
- <mime-type type="application/vnd.uplanet.list-wbxml"/>
- <mime-type type="application/vnd.uplanet.listcmd"/>
- <mime-type type="application/vnd.uplanet.listcmd-wbxml"/>
- <mime-type type="application/vnd.uplanet.signal"/>
- <mime-type type="application/vnd.vcx">
- <glob pattern="*.vcx"/>
- </mime-type>
- <mime-type type="application/vnd.vd-study"/>
- <mime-type type="application/vnd.vectorworks"/>
- <mime-type type="application/vnd.vidsoft.vidconference"/>
-
- <!-- http://www.iana.org/assignments/media-types/application/vnd.visio -->
- <mime-type type="application/vnd.visio">
- <comment>Microsoft Visio Diagram</comment>
- <glob pattern="*.vsd"/>
- <glob pattern="*.vst"/>
- <glob pattern="*.vss"/>
- <glob pattern="*.vsw"/>
- <sub-class-of type="application/x-tika-msoffice"/>
- </mime-type>
-
- <mime-type type="application/vnd.visionary">
- <glob pattern="*.vis"/>
- </mime-type>
- <mime-type type="application/vnd.vividence.scriptfile"/>
- <mime-type type="application/vnd.vsf">
- <glob pattern="*.vsf"/>
- </mime-type>
- <mime-type type="application/vnd.wap.sic"/>
- <mime-type type="application/vnd.wap.slc"/>
-
- <mime-type type="application/vnd.wap.wbxml">
- <glob pattern="*.wbxml"/>
- </mime-type>
-
- <mime-type type="application/vnd.wap.wmlc">
- <_comment>Compiled WML Document</_comment>
- <glob pattern="*.wmlc"/>
- </mime-type>
-
- <mime-type type="application/vnd.wap.wmlscriptc">
- <_comment>Compiled WML Script</_comment>
- <glob pattern="*.wmlsc"/>
- </mime-type>
-
- <mime-type type="application/vnd.webturbo">
- <glob pattern="*.wtb"/>
- </mime-type>
- <mime-type type="application/vnd.wfa.wsc"/>
- <mime-type type="application/vnd.wmc"/>
- <mime-type type="application/vnd.wmf.bootstrap"/>
- <mime-type type="application/vnd.wordperfect">
- <glob pattern="*.wpd"/>
- </mime-type>
- <mime-type type="application/vnd.wqd">
- <glob pattern="*.wqd"/>
- </mime-type>
- <mime-type type="application/vnd.wrq-hp3000-labelled"/>
- <mime-type type="application/vnd.wt.stf">
- <glob pattern="*.stf"/>
- </mime-type>
- <mime-type type="application/vnd.wv.csp+wbxml"/>
- <mime-type type="application/vnd.wv.csp+xml"/>
- <mime-type type="application/vnd.wv.ssp+xml"/>
- <mime-type type="application/vnd.xara">
- <glob pattern="*.xar"/>
- </mime-type>
- <mime-type type="application/vnd.xfdl">
- <glob pattern="*.xfdl"/>
- </mime-type>
- <mime-type type="application/vnd.xfdl.webform"/>
- <mime-type type="application/vnd.xmi+xml"/>
- <mime-type type="application/vnd.xmpie.cpkg"/>
- <mime-type type="application/vnd.xmpie.dpkg"/>
- <mime-type type="application/vnd.xmpie.plan"/>
- <mime-type type="application/vnd.xmpie.ppkg"/>
- <mime-type type="application/vnd.xmpie.xlim"/>
- <mime-type type="application/vnd.yamaha.hv-dic">
- <glob pattern="*.hvd"/>
- </mime-type>
- <mime-type type="application/vnd.yamaha.hv-script">
- <glob pattern="*.hvs"/>
- </mime-type>
- <mime-type type="application/vnd.yamaha.hv-voice">
- <glob pattern="*.hvp"/>
- </mime-type>
- <mime-type type="application/vnd.yamaha.openscoreformat">
- <glob pattern="*.osf"/>
- </mime-type>
- <mime-type type="application/vnd.yamaha.openscoreformat.osfpvg+xml">
- <glob pattern="*.osfpvg"/>
- </mime-type>
- <mime-type type="application/vnd.yamaha.smaf-audio">
- <glob pattern="*.saf"/>
- </mime-type>
- <mime-type type="application/vnd.yamaha.smaf-phrase">
- <glob pattern="*.spf"/>
- </mime-type>
- <mime-type type="application/vnd.yellowriver-custom-menu">
- <glob pattern="*.cmp"/>
- </mime-type>
- <mime-type type="application/vnd.zul">
- <glob pattern="*.zir"/>
- <glob pattern="*.zirz"/>
- </mime-type>
- <mime-type type="application/vnd.zzazz.deck+xml">
- <glob pattern="*.zaz"/>
- </mime-type>
- <mime-type type="application/voicexml+xml">
- <glob pattern="*.vxml"/>
- </mime-type>
- <mime-type type="application/watcherinfo+xml"/>
- <mime-type type="application/whoispp-query"/>
- <mime-type type="application/whoispp-response"/>
- <mime-type type="application/winhlp">
- <glob pattern="*.hlp"/>
- </mime-type>
- <mime-type type="application/wita"/>
- <mime-type type="application/wordperfect5.1"/>
- <mime-type type="application/wsdl+xml">
- <glob pattern="*.wsdl"/>
- </mime-type>
- <mime-type type="application/wspolicy+xml">
- <glob pattern="*.wspolicy"/>
- </mime-type>
-
- <mime-type type="application/x-123">
- <magic priority="50">
- <match value="0x00001a00" type="big32" offset="0" />
- <match value="0x00000200" type="big32" offset="0" />
- </magic>
- </mime-type>
-
- <mime-type type="application/x-abiword">
- <glob pattern="*.abw"/>
- </mime-type>
- <mime-type type="application/x-ace-compressed">
- <glob pattern="*.ace"/>
- </mime-type>
-
- <mime-type type="application/x-adobe-indesign">
- <acronym>INDD</acronym>
- <comment>Adobe InDesign document</comment>
- <glob pattern="*.indd"/>
- </mime-type>
-
- <mime-type type="application/x-adobe-indesign-interchange">
- <acronym>INX</acronym>
- <comment>Adobe InDesign Interchange format</comment>
- <magic priority="50">
- <match value="<?aid" type="string" offset="0:100"/>
- </magic>
- <glob pattern="*.inx"/>
- <sub-class-of type="application/xml"/>
- </mime-type>
-
- <mime-type type="application/x-archive">
- <magic priority="50">
- <match value="=<ar>" type="string" offset="0"/>
- <match value="=!<arch>" type="string" offset="0"/>
- </magic>
- <glob patter="*.ar"/>
- </mime-type>
-
- <mime-type type="application/x-authorware-bin">
- <glob pattern="*.aab"/>
- <glob pattern="*.x32"/>
- <glob pattern="*.u32"/>
- <glob pattern="*.vox"/>
- </mime-type>
- <mime-type type="application/x-authorware-map">
- <glob pattern="*.aam"/>
- </mime-type>
- <mime-type type="application/x-authorware-seg">
- <glob pattern="*.aas"/>
- </mime-type>
- <mime-type type="application/x-bcpio">
- <glob pattern="*.bcpio"/>
- </mime-type>
-
- <mime-type type="application/x-berkeley-db">
- <magic priority="50">
- <match value="0x00061561" type="big32" offset="0"/>
- <match value="0x00061561" type="host32" offset="12"/>
- <match value="0x00061561" type="big32" offset="12"/>
- <match value="0x00061561" type="little32" offset="12"/>
- <match value="0x00053162" type="host32" offset="12"/>
- <match value="0x00053162" type="big32" offset="12"/>
- <match value="0x00053162" type="little32" offset="12"/>
- <match value="0x00042253" type="host32" offset="12"/>
- <match value="0x00042253" type="big32" offset="12"/>
- <match value="0x00042253" type="little32" offset="12"/>
- <match value="0x00040988" type="host32" offset="12"/>
- <match value="0x00040988" type="little32" offset="12"/>
- <match value="0x00040988" type="big32" offset="12"/>
- <match value="0x00053162" type="host32" offset="0"/>
- <match value="0x00053162" type="big32" offset="0"/>
- <match value="0x00053162" type="little32" offset="0"/>
- </magic>
- </mime-type>
-
- <mime-type type="application/x-bibtex-text-file">
- <magic priority="50">
- <match value="%\ BibTeX\ `" type="string" offset="0"/>
- <match value="%%%\ \ " type="string" offset="73"/>
- <match value="%\ BibTeX\ standard\ bibliography\ " type="string" offset="0"/>
- <match value="%%%\ \ @BibTeX-style-file{" type="string" offset="73"/>
- <match value="@article{" type="string" offset="0"/>
- <match value="@book{" type="string" offset="0"/>
- <match value="@inbook{" type="string" offset="0"/>
- <match value="@incollection{" type="string" offset="0"/>
- <match value="@inproceedings{" type="string" offset="0"/>
- <match value="@manual{" type="string" offset="0"/>
- <match value="@misc{" type="string" offset="0"/>
- <match value="@preamble{" type="string" offset="0"/>
- <match value="@phdthesis{" type="string" offset="0"/>
- <match value="@techreport{" type="string" offset="0"/>
- <match value="@unpublished{" type="string" offset="0"/>
- </magic>
- <glob pattern="*.bib"/>
- <glob pattern="*.bibtex"/>
- </mime-type>
-
- <mime-type type="application/x-bittorrent">
- <magic priority="50">
- <match value="d8:announce" type="string" offset="0"/>
- </magic>
- <glob pattern="*.torrent"/>
- </mime-type>
-
- <mime-type type="application/x-bzip">
- <magic priority="40">
- <match value="BZh" type="string" offset="0"/>
- </magic>
- <glob pattern="*.bz"/>
- <glob pattern="*.tbz"/>
- </mime-type>
-
- <mime-type type="application/x-bzip2">
- <glob pattern="*.bz2"/>
- <glob pattern="*.tbz2"/>
- <glob pattern="*.boz"/>
- <sub-class-of type="application/x-bzip"/>
- </mime-type>
-
- <mime-type type="application/x-cdlink">
- <_comment>Virtual CD-ROM CD Image File</_comment>
- <glob pattern="*.vcd"/>
- </mime-type>
-
- <mime-type type="application/x-chat">
- <glob pattern="*.chat"/>
- </mime-type>
- <mime-type type="application/x-chess-pgn">
- <glob pattern="*.pgn"/>
- </mime-type>
-
- <mime-type type="application/x-compress">
- <magic priority="50">
- <match value="\037\235" type="string" offset="0"/>
- </magic>
- <glob pattern="*.z"/>
- </mime-type>
-
- <mime-type type="application/x-cpio">
- <magic priority="50">
- <match value="070707" type="little16" offset="0"/>
- <match value="070707" type="big16" offset="0"/>
- <match value="070707" type="string" offset="0"/>
- <match value="070701" type="string" offset="0"/>
- <match value="070702" type="string" offset="0"/>
- </magic>
- <glob pattern="*.cpio"/>
- </mime-type>
-
- <mime-type type="application/x-csh">
- <glob pattern="*.csh"/>
- </mime-type>
-
- <mime-type type="application/x-debian-package">
- <glob pattern="*.deb"/>
- <glob pattern="*.udeb"/>
- </mime-type>
-
- <mime-type type="application/x-director">
- <_comment>Shockwave Movie</_comment>
- <glob pattern="*.dir"/>
- <glob pattern="*.dcr"/>
- <glob pattern="*.dxr"/>
- <glob pattern="*.cst"/>
- <glob pattern="*.cct"/>
- <glob pattern="*.cxt"/>
- <glob pattern="*.w3d"/>
- <glob pattern="*.fgd"/>
- <glob pattern="*.swa"/>
- </mime-type>
-
- <mime-type type="application/x-doom">
- <glob pattern="*.wad"/>
- </mime-type>
- <mime-type type="application/x-dtbncx+xml">
- <glob pattern="*.ncx"/>
- </mime-type>
- <mime-type type="application/x-dtbook+xml">
- <glob pattern="*.dtb"/>
- </mime-type>
- <mime-type type="application/x-dtbresource+xml">
- <glob pattern="*.res"/>
- </mime-type>
-
- <mime-type type="application/x-dvi">
- <magic priority="50">
- <match value="\367\002" type="string" offset="0"/>
- <match value="0x02f7" type="little16" offset="0"/>
- </magic>
- <glob pattern="*.dvi"/>
- </mime-type>
-
- <mime-type type="application/x-elc">
- <comment>Emacs Lisp bytecode</comment>
- <magic priority="50">
- <!-- Emacs 18 -->
- <match value="\012(" type="string" offset="0" />
- <!-- Emacs 19 -->
- <match value=";ELC\023\000\000\000" type="string" offset="0" />
- </magic>
- <glob pattern="*.elc"/>
- </mime-type>
-
- <mime-type type="application/x-font-bdf">
- <glob pattern="*.bdf"/>
- </mime-type>
- <mime-type type="application/x-font-dos"/>
- <mime-type type="application/x-font-framemaker"/>
- <mime-type type="application/x-font-ghostscript">
- <glob pattern="*.gsf"/>
- </mime-type>
- <mime-type type="application/x-font-libgrx"/>
- <mime-type type="application/x-font-linux-psf">
- <glob pattern="*.psf"/>
- </mime-type>
- <mime-type type="application/x-font-otf">
- <glob pattern="*.otf"/>
- </mime-type>
- <mime-type type="application/x-font-pcf">
- <glob pattern="*.pcf"/>
- </mime-type>
- <mime-type type="application/x-font-snf">
- <glob pattern="*.snf"/>
- </mime-type>
- <mime-type type="application/x-font-speedo"/>
- <mime-type type="application/x-font-sunos-news"/>
- <mime-type type="application/x-font-ttf">
- <glob pattern="*.ttf"/>
- <glob pattern="*.ttc"/>
- </mime-type>
- <mime-type type="application/x-font-type1">
- <glob pattern="*.pfa"/>
- <glob pattern="*.pfb"/>
- <glob pattern="*.pfm"/>
- <glob pattern="*.afm"/>
- </mime-type>
- <mime-type type="application/x-font-vfont"/>
-
- <mime-type type="application/x-futuresplash">
- <_comment>Macromedia FutureSplash File</_comment>
- <glob pattern="*.spl"/>
- </mime-type>
-
- <mime-type type="application/x-gnucash">
- <glob pattern="*.gnucash" />
- </mime-type>
-
- <mime-type type="application/x-gnumeric">
- <alias type="application/x-Gnumeric-spreadsheet"/>
- <magic priority="50">
- <match value="=<gmr:Workbook" type="string" offset="39" />
- </magic>
- <glob pattern="*.gnumeric"/>
- </mime-type>
-
- <mime-type type="application/x-gtar">
- <magic priority="40">
- <!-- GNU tar archive -->
- <match value="ustar \0" type="string" offset="257" />
- </magic>
- <glob pattern="*.gtar"/>
- <sub-class-of type="application/x-tar"/>
- </mime-type>
-
- <mime-type type="application/x-gzip">
- <magic priority="40">
- <match value="\037\213" type="string" offset="0" />
- </magic>
- <glob pattern="*.tgz" />
- <glob pattern="*.gz" />
- <glob pattern="*-gz" />
- <glob pattern="*.emz" />
- </mime-type>
-
- <mime-type type="application/x-hdf">
- <magic priority="50">
- <match value="0x0e031301" type="big32" offset="0"/>
- <match value="\211HDF\r\n\032" type="string" offset="0"/>
- </magic>
- <glob pattern="*.hdf"/>
- </mime-type>
-
- <mime-type type="application/x-hwp">
- <magic priority="50">
- <!--
- TIKA-330: Detection pattern based on signature strings from
- the hwpfilter/source/hwpfile.cpp file in OpenOffice.org.
- -->
- <match value="HWP Document File V" type="string" offset="0"/>
- </magic>
- </mime-type>
-
- <mime-type type="application/x-iso9660-image">
- <magic priority="50">
- <match value="CD001" type="string" offset="37633"/>
- </magic>
- <glob pattern="*.iso" />
- </mime-type>
-
- <mime-type type="application/x-java-jnlp-file">
- <glob pattern="*.jnlp"/>
- </mime-type>
-
- <mime-type type="application/x-kdelnk">
- <magic priority="50">
- <match value="[KDE\ Desktop\ Entry]" type="string" offset="0"/>
- <match value="#\ KDE\ Config\ File" type="string" offset="0"/>
- </magic>
- </mime-type>
-
- <mime-type type="application/x-latex">
- <_comment>LaTeX Source Document</_comment>
- <magic priority="50">
- <match value="%\ -*-latex-*-" type="string" offset="0"/>
- </magic>
- <glob pattern="*.latex"/>
- </mime-type>
-
- <mime-type type="application/x-lha">
- <magic priority="50">
- <match value="-lzs-" type="string" offset="2"/>
- <match value="-lh\40-" type="string" offset="2"/>
- <match value="-lhd-" type="string" offset="2"/>
- <match value="-lh2-" type="string" offset="2"/>
- <match value="-lh3-" type="string" offset="2"/>
- <match value="-lh4-" type="string" offset="2"/>
- <match value="-lh5-" type="string" offset="2"/>
- <match value="-lh6-" type="string" offset="2"/>
- <match value="-lh7-" type="string" offset="2"/>
- </magic>
- </mime-type>
-
- <mime-type type="application/x-lharc">
- <magic priority="50">
- <match value="-lh0-" type="string" offset="2"/>
- <match value="-lh1-" type="string" offset="2"/>
- <match value="-lz4-" type="string" offset="2"/>
- <match value="-lz5-" type="string" offset="2"/>
- </magic>
- </mime-type>
-
- <mime-type type="application/x-mobipocket-ebook">
- <glob pattern="*.prc"/>
- <glob pattern="*.mobi"/>
- </mime-type>
- <mime-type type="application/x-ms-application">
- <glob pattern="*.application"/>
- </mime-type>
- <mime-type type="application/x-ms-wmd">
- <glob pattern="*.wmd"/>
- </mime-type>
- <mime-type type="application/x-ms-wmz">
- <sub-class-of type="application/x-gzip"/>
- <glob pattern="*.wmz"/>
- </mime-type>
- <mime-type type="application/x-ms-xbap">
- <glob pattern="*.xbap"/>
- </mime-type>
- <mime-type type="application/x-msaccess">
- <glob pattern="*.mdb"/>
- </mime-type>
- <mime-type type="application/x-msbinder">
- <glob pattern="*.obd"/>
- </mime-type>
- <mime-type type="application/x-mscardfile">
- <glob pattern="*.crd"/>
- </mime-type>
- <mime-type type="application/x-msclip">
- <glob pattern="*.clp"/>
- </mime-type>
- <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-msmediaview">
- <glob pattern="*.mvb"/>
- <glob pattern="*.m13"/>
- <glob pattern="*.m14"/>
- </mime-type>
- <mime-type type="application/x-msmetafile">
- <acronym>WMF</acronym>
- <comment>Windows Metafile</comment>
- <glob pattern="*.wmf"/>
- <glob pattern="*.emf"/>
- </mime-type>
- <mime-type type="application/x-msmoney">
- <glob pattern="*.mny"/>
- </mime-type>
- <mime-type type="application/x-mspublisher">
- <glob pattern="*.pub"/>
- </mime-type>
- <mime-type type="application/x-msschedule">
- <glob pattern="*.scd"/>
- </mime-type>
- <mime-type type="application/x-msterminal">
- <glob pattern="*.trm"/>
- </mime-type>
- <mime-type type="application/x-mswrite">
- <glob pattern="*.wri"/>
- </mime-type>
- <mime-type type="application/x-netcdf">
- <glob pattern="*.nc"/>
- <glob pattern="*.cdf"/>
- </mime-type>
- <mime-type type="application/x-pkcs12">
- <glob pattern="*.p12"/>
- <glob pattern="*.pfx"/>
- </mime-type>
- <mime-type type="application/x-pkcs7-certificates">
- <glob pattern="*.p7b"/>
- <glob pattern="*.spc"/>
- </mime-type>
- <mime-type type="application/x-pkcs7-certreqresp">
- <glob pattern="*.p7r"/>
- </mime-type>
-
- <mime-type type="application/x-rar-compressed">
- <alias type="application/x-rar"/>
- <magic priority="50">
- <match value="Rar!" type="string" offset="0"/>
- </magic>
- <glob pattern="*.rar"/>
- </mime-type>
-
- <mime-type type="application/x-rpm">
- <glob pattern="*.rpm"/>
- </mime-type>
-
- <mime-type type="application/x-sc">
- <magic priority="50">
- <match value="Spreadsheet" type="string" offset="38"/>
- </magic>
- </mime-type>
-
- <mime-type type="application/x-sh">
- <magic priority="50">
- <match value="#!/" type="string" offset="0"/>
- <match value="#!\ /" type="string" offset="0"/>
- <match value="#!\t/" type="string" offset="0"/>
- </magic>
- <glob pattern="*.sh"/>
- <sub-class-of type="text/plain"/>
- </mime-type>
-
- <mime-type type="application/x-shar">
- <glob pattern="*.shar"/>
- </mime-type>
-
- <mime-type type="application/x-shockwave-flash">
- <acronym>Flash</acronym>
- <comment>Adobe Flash</comment>
- <magic priority="50">
- <match value="FWS" type="string" offset="0"/> <!-- F = Uncompressed -->
- <match value="CWS" type="string" offset="0"/> <!-- C = Compressed -->
- </magic>
- <glob pattern="*.swf"/>
- </mime-type>
-
- <mime-type type="application/x-silverlight-app">
- <glob pattern="*.xap"/>
- </mime-type>
-
- <mime-type type="application/x-stuffit">
- <magic priority="50">
- <match value="StuffIt" type="string" offset="0"/>
- </magic>
- <glob pattern="*.sit"/>
- </mime-type>
-
- <mime-type type="application/x-stuffitx">
- <glob pattern="*.sitx"/>
- </mime-type>
- <mime-type type="application/x-sv4cpio">
- <glob pattern="*.sv4cpio"/>
- </mime-type>
- <mime-type type="application/x-sv4crc">
- <glob pattern="*.sv4crc"/>
- </mime-type>
-
- <mime-type type="application/x-tar">
- <magic priority="40">
- <!-- POSIX tar archive -->
- <match value="ustar\0" type="string" offset="257" />
- </magic>
- <glob pattern="*.tar"/>
- </mime-type>
-
- <mime-type type="application/x-tcl">
- <alias type="text/x-tcl"/>
- <glob pattern="*.tcl"/>
- <sub-class-of type="text/plain"/>
- </mime-type>
-
- <mime-type type="application/x-tex">
- <alias type="text/x-tex"/>
- <magic priority="50">
- <match value="\\input" type="string" offset="0"/>
- <match value="\\section" type="string" offset="0"/>
- <match value="\\setlength" type="string" offset="0"/>
- <match value="\\documentstyle" type="string" offset="0"/>
- <match value="\\chapter" type="string" offset="0"/>
- <match value="\\documentclass" type="string" offset="0"/>
- <match value="\\relax" type="string" offset="0"/>
- <match value="\\contentsline" type="string" offset="0"/>
- </magic>
- <glob pattern="*.tex"/>
- </mime-type>
-
- <mime-type type="application/x-tex-tfm">
- <glob pattern="*.tfm"/>
- </mime-type>
-
- <mime-type type="application/x-texinfo">
- <alias type="text/x-texinfo" />
- <magic priority="50">
- <match value="\\input\ texinfo" type="string" offset="0"/>
- </magic>
- <glob pattern="*.texinfo"/>
- <glob pattern="*.texi"/>
- </mime-type>
-
- <!-- =================================================================== -->
- <!-- Microsoft Office binary file formats -->
- <!-- http://www.microsoft.com/interop/docs/OfficeBinaryFormats.mspx -->
- <!-- =================================================================== -->
- <mime-type type="application/x-tika-msoffice">
- <magic>
- <match value="0xd0cf11e0a1b11ae1" type="string" offset="0:8"/>
- </magic>
- </mime-type>
-
- <!-- =================================================================== -->
- <!-- Office Open XML file formats -->
- <!-- http://www.ecma-international.org/publications/standards/Ecma-376.htm -->
- <!-- =================================================================== -->
- <mime-type type="application/x-tika-ooxml">
- <sub-class-of type="application/zip"/>
- <magic priority="50">
- <match value="PK\003\004" type="string" offset="0">
- <match value="[Content_Types].xml" type="string" offset="30"/>
- </match>
- </magic>
- </mime-type>
-
- <mime-type type="application/x-ustar">
- <glob pattern="*.ustar"/>
- </mime-type>
- <mime-type type="application/x-wais-source">
- <glob pattern="*.src"/>
- </mime-type>
- <mime-type type="application/x-x509-ca-cert">
- <glob pattern="*.der"/>
- <glob pattern="*.crt"/>
- </mime-type>
- <mime-type type="application/x-xfig">
- <glob pattern="*.fig"/>
- </mime-type>
- <mime-type type="application/x-xpinstall">
- <glob pattern="*.xpi"/>
- </mime-type>
-
- <mime-type type="application/x-zoo">
- <magic priority="50">
- <match value="0xfdc4a7dc" type="little32" offset="20"/>
- </magic>
- <glob pattern="*.zoo"/>
- </mime-type>
-
- <mime-type type="application/x400-bp"/>
- <mime-type type="application/xcap-att+xml"/>
- <mime-type type="application/xcap-caps+xml"/>
- <mime-type type="application/xcap-el+xml"/>
- <mime-type type="application/xcap-error+xml"/>
- <mime-type type="application/xcap-ns+xml"/>
- <mime-type type="application/xcon-conference-info-diff+xml"/>
- <mime-type type="application/xcon-conference-info+xml"/>
- <mime-type type="application/xenc+xml">
- <glob pattern="*.xenc"/>
- </mime-type>
-
- <mime-type type="application/xhtml+xml">
- <magic priority="50">
- <match value="<html xmlns=" type="string" offset="0:8192"/>
- </magic>
- <root-XML namespaceURI="http://www.w3.org/1999/xhtml" localName="html"/>
- <glob pattern="*.xhtml"/>
- <glob pattern="*.xht"/>
- </mime-type>
-
- <mime-type type="application/xhtml-voice+xml"/>
-
- <mime-type type="application/xml">
- <alias type="text/xml"/>
- <magic priority="50">
- <match value="<?xml" type="string" offset="0"/>
- <match value="<?XML" type="string" offset="0"/>
- <match value="<!--" type="string" offset="0"/>
- <match value="0xFFFE3C003F0078006D006C00" type="string" offset="0"/>
- <match value="0xFEFF003C003F0078006D006C" type="string" offset="0"/>
- <!-- TODO: Add matches for the other possible XML encoding schemes -->
- </magic>
- <glob pattern="*.xml"/>
- <glob pattern="*.xsl"/>
- <glob pattern="*.xsd"/>
- <sub-class-of type="text/plain" />
- </mime-type>
-
- <mime-type type="application/xml-dtd">
- <sub-class-of type="text/plain"/>
- <glob pattern="*.dtd"/>
- </mime-type>
- <mime-type type="application/xml-external-parsed-entity"/>
- <mime-type type="application/xmpp+xml"/>
- <mime-type type="application/xop+xml">
- <glob pattern="*.xop"/>
- </mime-type>
-
- <mime-type type="application/xslt+xml">
- <alias type="text/xsl"/>
- <acronym>XSLT</acronym>
- <comment>XSL Transformations</comment>
- <root-XML localName="stylesheet"
- namespaceURI="http://www.w3.org/1999/XSL/Transform"/>
- <glob pattern="*.xslt"/>
- </mime-type>
-
- <mime-type type="application/xspf+xml">
- <glob pattern="*.xspf"/>
- </mime-type>
- <mime-type type="application/xv+xml">
- <glob pattern="*.mxml"/>
- <glob pattern="*.xhvml"/>
- <glob pattern="*.xvml"/>
- <glob pattern="*.xvm"/>
- </mime-type>
-
- <mime-type type="application/zip">
- <alias type="application/x-zip-compressed"/>
- <magic priority="40">
- <match value="PK\003\004" type="string" offset="0"/>
- </magic>
- <glob pattern="*.zip"/>
- </mime-type>
-
- <mime-type type="audio/32kadpcm"/>
- <mime-type type="audio/3gpp"/>
- <mime-type type="audio/3gpp2"/>
- <mime-type type="audio/ac3"/>
- <mime-type type="audio/adpcm">
- <glob pattern="*.adp"/>
- </mime-type>
- <mime-type type="audio/amr"/>
- <mime-type type="audio/amr-wb"/>
- <mime-type type="audio/amr-wb+"/>
- <mime-type type="audio/asc"/>
-
- <mime-type type="audio/basic">
- <magic priority="20">
- <match value=".snd" type="string" offset="0">
- <match value="1" type="big32" offset="12"/>
- <match value="2" type="big32" offset="12"/>
- <match value="3" type="big32" offset="12"/>
- <match value="4" type="big32" offset="12"/>
- <match value="5" type="big32" offset="12"/>
- <match value="6" type="big32" offset="12"/>
- <match value="7" type="big32" offset="12"/>
- </match>
- </magic>
- <glob pattern="*.au"/>
- <glob pattern="*.snd"/>
- </mime-type>
-
- <mime-type type="audio/bv16"/>
- <mime-type type="audio/bv32"/>
- <mime-type type="audio/clearmode"/>
- <mime-type type="audio/cn"/>
- <mime-type type="audio/dat12"/>
- <mime-type type="audio/dls"/>
- <mime-type type="audio/dsr-es201108"/>
- <mime-type type="audio/dsr-es202050"/>
- <mime-type type="audio/dsr-es202211"/>
- <mime-type type="audio/dsr-es202212"/>
- <mime-type type="audio/dvi4"/>
- <mime-type type="audio/eac3"/>
- <mime-type type="audio/evrc"/>
- <mime-type type="audio/evrc-qcp"/>
- <mime-type type="audio/evrc0"/>
- <mime-type type="audio/evrc1"/>
- <mime-type type="audio/evrcb"/>
- <mime-type type="audio/evrcb0"/>
- <mime-type type="audio/evrcb1"/>
- <mime-type type="audio/evrcwb"/>
- <mime-type type="audio/evrcwb0"/>
- <mime-type type="audio/evrcwb1"/>
- <mime-type type="audio/example"/>
- <mime-type type="audio/g719"/>
- <mime-type type="audio/g722"/>
- <mime-type type="audio/g7221"/>
- <mime-type type="audio/g723"/>
- <mime-type type="audio/g726-16"/>
- <mime-type type="audio/g726-24"/>
- <mime-type type="audio/g726-32"/>
- <mime-type type="audio/g726-40"/>
- <mime-type type="audio/g728"/>
- <mime-type type="audio/g729"/>
- <mime-type type="audio/g7291"/>
- <mime-type type="audio/g729d"/>
- <mime-type type="audio/g729e"/>
- <mime-type type="audio/gsm"/>
- <mime-type type="audio/gsm-efr"/>
- <mime-type type="audio/ilbc"/>
- <mime-type type="audio/l16"/>
- <mime-type type="audio/l20"/>
- <mime-type type="audio/l24"/>
- <mime-type type="audio/l8"/>
- <mime-type type="audio/lpc"/>
-
- <mime-type type="audio/midi">
- <acronym>MIDI</acronym>
- <comment>Musical Instrument Digital Interface</comment>
- <magic priority ="20">
- <match type="string" value="MThd" offset="0"/>
- </magic>
- <glob pattern="*.mid"/>
- <glob pattern="*.midi"/>
- <glob pattern="*.kar"/>
- <glob pattern="*.rmi"/>
- </mime-type>
-
- <mime-type type="audio/mobile-xmf"/>
- <mime-type type="audio/mp4">
- <alias type="audio/x-mp4a"/>
- <glob pattern="*.mp4a"/>
- </mime-type>
- <mime-type type="audio/mp4a-latm"/>
- <mime-type type="audio/mpa"/>
- <mime-type type="audio/mpa-robust"/>
-
- <mime-type type="audio/mpeg">
- <acronym>MP3</acronym>
- <comment>MPEG-1 Audio Layer 3</comment>
- <magic priority="20">
- <!-- http://mpgedit.org/mpgedit/mpeg_format/MP3Format.html -->
- <!-- Bit pattern for first two bytes: 11111111 111VVLLC -->
- <!-- VV = MPEG Audio Version ID; 10 = V2, 11 = V1 -->
- <!-- LL = Layer description; 01 = L3, 10 = L2, 11 = L1 -->
- <!-- C = Protection bit; 0 = CRC, 1 = no CRC -->
- <match value="0xfff2" type="string" offset="0"/> <!-- V2, L3, CRC -->
- <match value="0xfff3" type="string" offset="0"/> <!-- V2, L3 -->
- <match value="0xfff4" type="string" offset="0"/> <!-- V2, L2, CRC -->
- <match value="0xfff5" type="string" offset="0"/> <!-- V2, L2 -->
- <match value="0xfff6" type="string" offset="0"/> <!-- V2, L1, CRC -->
- <match value="0xfff7" type="string" offset="0"/> <!-- V2, L1 -->
- <match value="0xfffa" type="string" offset="0"/> <!-- V1, L3, CRC -->
- <match value="0xfffb" type="string" offset="0"/> <!-- V1, L3 -->
- <match value="0xfffc" type="string" offset="0"/> <!-- V1, L2, CRC -->
- <match value="0xfffd" type="string" offset="0"/> <!-- V1, L2 -->
- <!-- TIKA-417: This is the UTF-16 LE byte order mark! -->
- <!-- match value="0xfffe" type="string" offset="0"/ --> <!-- V1, L1, CRC -->
- <match value="0xffff" type="string" offset="0"/> <!-- V1, L1 -->
- <match value="ID3" type="string" offset="0"/>
- </magic>
- <glob pattern="*.mpga"/>
- <glob pattern="*.mp2"/>
- <glob pattern="*.mp2a"/>
- <glob pattern="*.mp3"/>
- <glob pattern="*.m2a"/>
- <glob pattern="*.m3a"/>
- </mime-type>
-
- <mime-type type="audio/mpeg4-generic"/>
-
- <mime-type type="audio/ogg">
- <glob pattern="*.oga"/>
- <glob pattern="*.ogg"/>
- <glob pattern="*.spx"/>
- <sub-class-of type="application/ogg"/>
- </mime-type>
-
- <mime-type type="audio/parityfec"/>
- <mime-type type="audio/pcma"/>
- <mime-type type="audio/pcma-wb"/>
- <mime-type type="audio/pcmu-wb"/>
- <mime-type type="audio/pcmu"/>
-
- <mime-type type="audio/prs.sid">
- <magic priority="50">
- <match value="PSID" type="string" offset="0"/>
- </magic>
- </mime-type>
-
- <mime-type type="audio/qcelp"/>
- <mime-type type="audio/red"/>
- <mime-type type="audio/rtp-enc-aescm128"/>
- <mime-type type="audio/rtp-midi"/>
- <mime-type type="audio/rtx"/>
- <mime-type type="audio/smv"/>
- <mime-type type="audio/smv0"/>
- <mime-type type="audio/smv-qcp"/>
- <mime-type type="audio/sp-midi"/>
- <mime-type type="audio/t140c"/>
- <mime-type type="audio/t38"/>
- <mime-type type="audio/telephone-event"/>
- <mime-type type="audio/tone"/>
- <mime-type type="audio/ulpfec"/>
- <mime-type type="audio/vdvi"/>
- <mime-type type="audio/vmr-wb"/>
- <mime-type type="audio/vnd.3gpp.iufp"/>
- <mime-type type="audio/vnd.4sb"/>
- <mime-type type="audio/vnd.audiokoz"/>
- <mime-type type="audio/vnd.celp"/>
- <mime-type type="audio/vnd.cisco.nse"/>
- <mime-type type="audio/vnd.cmles.radio-events"/>
- <mime-type type="audio/vnd.cns.anp1"/>
- <mime-type type="audio/vnd.cns.inf1"/>
- <mime-type type="audio/vnd.digital-winds">
- <glob pattern="*.eol"/>
- </mime-type>
- <mime-type type="audio/vnd.dlna.adts"/>
- <mime-type type="audio/vnd.dolby.heaac.1"/>
- <mime-type type="audio/vnd.dolby.heaac.2"/>
- <mime-type type="audio/vnd.dolby.mlp"/>
- <mime-type type="audio/vnd.dolby.mps"/>
- <mime-type type="audio/vnd.dolby.pl2"/>
- <mime-type type="audio/vnd.dolby.pl2x"/>
- <mime-type type="audio/vnd.dolby.pl2z"/>
- <mime-type type="audio/vnd.dts">
- <glob pattern="*.dts"/>
- </mime-type>
- <mime-type type="audio/vnd.dts.hd">
- <glob pattern="*.dtshd"/>
- </mime-type>
- <mime-type type="audio/vnd.everad.plj"/>
- <mime-type type="audio/vnd.hns.audio"/>
- <mime-type type="audio/vnd.lucent.voice">
- <glob pattern="*.lvp"/>
- </mime-type>
- <mime-type type="audio/vnd.ms-playready.media.pya">
- <glob pattern="*.pya"/>
- </mime-type>
- <mime-type type="audio/vnd.nokia.mobile-xmf"/>
- <mime-type type="audio/vnd.nortel.vbk"/>
- <mime-type type="audio/vnd.nuera.ecelp4800">
- <glob pattern="*.ecelp4800"/>
- </mime-type>
- <mime-type type="audio/vnd.nuera.ecelp7470">
- <glob pattern="*.ecelp7470"/>
- </mime-type>
- <mime-type type="audio/vnd.nuera.ecelp9600">
- <glob pattern="*.ecelp9600"/>
- </mime-type>
- <mime-type type="audio/vnd.octel.sbc"/>
- <mime-type type="audio/vnd.qcelp"/>
- <mime-type type="audio/vnd.rhetorex.32kadpcm"/>
- <mime-type type="audio/vnd.sealedmedia.softseal.mpeg"/>
- <mime-type type="audio/vnd.vmx.cvsd"/>
- <mime-type type="audio/vorbis"/>
- <mime-type type="audio/vorbis-config"/>
- <mime-type type="audio/x-aac">
- <glob pattern="*.aac"/>
- </mime-type>
-
- <mime-type type="audio/x-adbcm">
- <magic priority="20">
- <match value=".snd" type="string" offset="0">
- <match value="23" type="big32" offset="12"/>
- </match>
- </magic>
- </mime-type>
-
- <mime-type type="audio/x-aiff">
- <alias type="audio/aiff"/>
- <acronym>AIFF</acronym>
- <comment>Audio Interchange File Format</comment>
- <magic priority="20">
- <match value="FORM....AIFF" type="string" offset="0"
- mask="0xFFFFFFFF00000000FFFFFFFF"/>
- <match value="FORM....AIFC" type="string" offset="0"
- mask="0xFFFFFFFF00000000FFFFFFFF"/>
- <!-- Amiga IFF sound sample, somewhat like the more modern AIFF -->
- <match value="FORM....8SVX" type="string" offset="0"
- mask="0xFFFFFFFF00000000FFFFFFFF"/>
- </magic>
- <glob pattern="*.aif"/>
- <glob pattern="*.aiff"/>
- <glob pattern="*.aifc"/>
- </mime-type>
-
- <mime-type type="audio/x-dec-basic">
- <magic priority="20">
- <match value="0x0064732E" type="big32" offset="0">
- <match value="1" type="big32" offset="12"/>
- <match value="2" type="big32" offset="12"/>
- <match value="3" type="big32" offset="12"/>
- <match value="4" type="big32" offset="12"/>
- <match value="5" type="big32" offset="12"/>
- <match value="6" type="big32" offset="12"/>
- <match value="7" type="big32" offset="12"/>
- </match>
- </magic>
- </mime-type>
-
- <mime-type type="audio/x-dec-adbcm">
- <magic priority="20">
- <match value="0x0064732E" type="big32" offset="0">
- <match value="23" type="big32" offset="12"/>
- </match>
- </magic>
- </mime-type>
-
- <mime-type type="audio/x-flac">
- <acronym>FLAC</acronym>
- <comment>Free Lossless Audio Codec</comment>
- <magic priority="50">
- <match value="fLaC" type="string" offset="0"/>
- </magic>
- <glob pattern="*.flac"/>
- </mime-type>
-
- <mime-type type="audio/x-mod">
- <acronym>MOD</acronym>
- <magic priority="50">
- <match value="Extended\ Module:" type="string" offset="0"/>
- <match value="BMOD2STM" type="string" offset="21"/>
- <match value="M.K." type="string" offset="1080"/>
- <match value="M!K!" type="string" offset="1080"/>
- <match value="FLT4" type="string" offset="1080"/>
- <match value="FLT8" type="string" offset="1080"/>
- <match value="4CHN" type="string" offset="1080"/>
- <match value="6CHN" type="string" offset="1080"/>
- <match value="8CHN" type="string" offset="1080"/>
- <match value="CD81" type="string" offset="1080"/>
- <match value="OKTA" type="string" offset="1080"/>
- <match value="16CN" type="string" offset="1080"/>
- <match value="32CN" type="string" offset="1080"/>
- <match value="IMPM" type="string" offset="0"/>
- </magic>
- <glob pattern="*.mod"/>
- </mime-type>
-
- <mime-type type="audio/x-mpegurl">
- <glob pattern="*.m3u"/>
- </mime-type>
- <mime-type type="audio/x-ms-wax">
- <glob pattern="*.wax"/>
- </mime-type>
- <mime-type type="audio/x-ms-wma">
- <glob pattern="*.wma"/>
- </mime-type>
-
- <mime-type type="audio/x-pn-realaudio">
- <comment>Real Audio</comment>
- <alias type="audio/x-realaudio" />
- <magic priority="50">
- <match value="0x2e7261fd" type="big32" offset="0"/>
- </magic>
- <glob pattern="*.ram"/>
- <glob pattern="*.ra"/>
- </mime-type>
-
- <mime-type type="audio/x-pn-realaudio-plugin">
- <glob pattern="*.rmp"/>
- </mime-type>
-
- <mime-type type="audio/x-wav">
- <acronym>WAV</acronym>
- <magic priority="20">
- <match value="RIFF....WAVE" type="string" offset="0"
- mask="0xFFFFFFFF00000000FFFFFFFF"/>
- </magic>
- <glob pattern="*.wav"/>
- </mime-type>
-
- <mime-type type="chemical/x-cdx">
- <glob pattern="*.cdx"/>
- </mime-type>
- <mime-type type="chemical/x-cif">
- <glob pattern="*.cif"/>
- </mime-type>
- <mime-type type="chemical/x-cmdf">
- <glob pattern="*.cmdf"/>
- </mime-type>
- <mime-type type="chemical/x-cml">
- <glob pattern="*.cml"/>
- </mime-type>
- <mime-type type="chemical/x-csml">
- <glob pattern="*.csml"/>
- </mime-type>
- <mime-type type="chemical/x-pdb"/>
- <mime-type type="chemical/x-xyz">
- <glob pattern="*.xyz"/>
- </mime-type>
-
- <mime-type type="image/bmp">
- <alias type="image/x-ms-bmp"/>
- <acronym>BMP</acronym>
- <comment>Windows bitmap</comment>
- <magic priority="50">
- <match value="BM" type="string" offset="0" />
- </magic>
- <glob pattern="*.bmp"/>
- <glob pattern="*.dib"/>
- </mime-type>
-
- <mime-type type="image/cgm">
- <acronym>CGM</acronym>
- <comment>Computer Graphics Metafile</comment>
- <magic priority="50">
- <match value="BEGMF" type="string" offset="0"/>
- <match value="0x0020" mask="0xffe0" type="string" offset="0"/>
- </magic>
- <glob pattern="*.cgm"/>
- </mime-type>
-
- <mime-type type="image/example"/>
- <mime-type type="image/fits"/>
- <mime-type type="image/g3fax">
- <glob pattern="*.g3"/>
- </mime-type>
-
- <mime-type type="image/gif">
- <acronym>GIF</acronym>
- <comment>Graphics Interchange Format</comment>
- <magic priority="50">
- <match value="GIF87a" type="string" offset="0"/>
- <match value="GIF89a" type="string" offset="0"/>
- </magic>
- <glob pattern="*.gif"/>
- </mime-type>
-
- <mime-type type="image/ief">
- <glob pattern="*.ief"/>
- </mime-type>
- <mime-type type="image/jp2"/>
-
- <mime-type type="image/jpeg">
- <acronym>JPEG</acronym>
- <comment>Joint Photographic Experts Group</comment>
- <magic priority="50">
- <!-- FFD8 is the SOI (Start Of Image) marker. -->
- <!-- It is followed by another marker that starts with FF. -->
- <match value="0xffd8ff" type="string" offset="0"/>
- </magic>
- <glob pattern="*.jpg"/>
- <glob pattern="*.jpeg"/>
- <glob pattern="*.jpe"/>
- <glob pattern="*.jif"/>
- <glob pattern="*.jfif"/>
- <glob pattern="*.jfi"/>
- </mime-type>
-
- <mime-type type="image/jpm"/>
- <mime-type type="image/jpx"/>
- <mime-type type="image/naplps"/>
-
- <mime-type type="image/png">
- <acronym>PNG</acronym>
- <comment>Portable Network Graphics</comment>
- <magic priority="50">
- <match value="\x89PNG\x0d\x0a\x1a\x0a" type="string" offset="0"/>
- </magic>
- <glob pattern="*.png"/>
- </mime-type>
-
- <mime-type type="image/prs.btif">
- <glob pattern="*.btif"/>
- </mime-type>
- <mime-type type="image/prs.pti"/>
-
- <mime-type type="image/svg+xml">
- <sub-class-of type="application/xml"/>
- <acronym>SVG</acronym>
- <comment>Scalable Vector Graphics</comment>
- <root-XML localName="svg" namespaceURI="http://www.w3.org/2000/svg"/>
- <glob pattern="*.svg"/>
- <glob pattern="*.svgz"/>
- </mime-type>
-
- <mime-type type="image/t38"/>
-
- <mime-type type="image/tiff">
- <acronym>TIFF</acronym>
- <comment>Tagged Image File Format</comment>
- <magic priority="50">
- <!-- MM.* = Big endian (M=Motorola) and 0x002a in big endian -->
- <match value="MM\x00\x2a" type="string" offset="0"/>
- <!-- II*. = Little endian (I=Intel) and 0x002a in little endian -->
- <match value="II\x2a\x00" type="string" offset="0"/>
- </magic>
- <glob pattern="*.tiff"/>
- <glob pattern="*.tif"/>
- </mime-type>
-
- <mime-type type="image/tiff-fx"/>
-
- <mime-type type="image/vnd.adobe.photoshop">
- <alias type="image/x-psd"/>
- <glob pattern="*.psd"/>
- </mime-type>
-
- <mime-type type="image/vnd.cns.inf2"/>
- <mime-type type="image/vnd.djvu">
- <glob pattern="*.djvu"/>
- <glob pattern="*.djv"/>
- </mime-type>
-
- <mime-type type="image/vnd.dwg">
- <acronym>DWG</acronym>
- <comment>AutoCad Drawing</comment>
- <alias type="image/x-dwg"/>
- <alias type="application/acad"/>
- <alias type="application/x-acad"/>
- <alias type="application/autocad_dwg"/>
- <alias type="application/dwg"/>
- <alias type="application/x-dwg"/>
- <alias type="application/x-autocad"/>
- <glob pattern="*.dwg"/>
- <magic priority="50">
- <!-- "AC" followed by four numbers -->
- <match value="AC0000" type="string" offset="0"
- mask="0xFFFFF0F0F0F0"/>
- </magic>
- </mime-type>
-
- <mime-type type="image/vnd.dxf">
- <glob pattern="*.dxf"/>
- </mime-type>
- <mime-type type="image/vnd.fastbidsheet">
- <glob pattern="*.fbs"/>
- </mime-type>
- <mime-type type="image/vnd.fpx">
- <glob pattern="*.fpx"/>
- </mime-type>
- <mime-type type="image/vnd.fst">
- <glob pattern="*.fst"/>
- </mime-type>
- <mime-type type="image/vnd.fujixerox.edmics-mmr">
- <glob pattern="*.mmr"/>
- </mime-type>
- <mime-type type="image/vnd.fujixerox.edmics-rlc">
- <glob pattern="*.rlc"/>
- </mime-type>
- <mime-type type="image/vnd.globalgraphics.pgb"/>
- <mime-type type="image/vnd.microsoft.icon"/>
- <mime-type type="image/vnd.mix"/>
- <mime-type type="image/vnd.ms-modi">
- <glob pattern="*.mdi"/>
- </mime-type>
- <mime-type type="image/vnd.net-fpx">
- <glob pattern="*.npx"/>
- </mime-type>
- <mime-type type="image/vnd.radiance"/>
- <mime-type type="image/vnd.sealed.png"/>
- <mime-type type="image/vnd.sealedmedia.softseal.gif"/>
- <mime-type type="image/vnd.sealedmedia.softseal.jpg"/>
- <mime-type type="image/vnd.svf"/>
-
- <mime-type type="image/vnd.wap.wbmp">
- <_comment>Wireless Bitmap File Format</_comment>
- <glob pattern="*.wbmp"/>
- </mime-type>
-
- <mime-type type="image/vnd.xiff">
- <glob pattern="*.xif"/>
- </mime-type>
- <mime-type type="image/x-cmu-raster">
- <glob pattern="*.ras"/>
- </mime-type>
- <mime-type type="image/x-cmx">
- <glob pattern="*.cmx"/>
- </mime-type>
- <mime-type type="image/x-freehand">
- <glob pattern="*.fh"/>
- <glob pattern="*.fhc"/>
- <glob pattern="*.fh4"/>
- <glob pattern="*.fh5"/>
- <glob pattern="*.fh7"/>
- </mime-type>
-
- <mime-type type="image/x-icon">
- <magic priority="50">
- <match value="\102\101\050\000\000\000\056\000\000\000\000\000\000\000"
- type="string" offset="0"/>
- <match value="\000\000\001\000" type="string" offset="0"/>
- </magic>
- <glob pattern="*.ico"/>
- </mime-type>
-
- <mime-type type="image/x-niff">
- <comment>Navy Interchange File Format</comment>
- <magic priority="50">
- <match value="IIN1" type="string" offset="0"/>
- </magic>
- </mime-type>
-
- <mime-type type="image/x-pcx">
- <glob pattern="*.pcx"/>
- </mime-type>
- <mime-type type="image/x-pict">
- <glob pattern="*.pic"/>
- <glob pattern="*.pct"/>
- </mime-type>
-
- <mime-type type="image/x-portable-anymap">
- <acronym>PNM</acronym>
- <comment>Portable Any Map</comment>
- <glob pattern="*.pnm" />
- </mime-type>
-
- <mime-type type="image/x-portable-bitmap">
- <sub-class-of type="image/x-portable-anymap"/>
- <acronym>PBM</acronym>
- <comment>Portable Bit Map</comment>
- <magic priority="50">
- <match value="P1" type="string" offset="0"/>
- <match value="P4" type="string" offset="0"/>
- </magic>
- <glob pattern="*.pbm"/>
- </mime-type>
-
- <mime-type type="image/x-portable-graymap">
- <sub-class-of type="image/x-portable-anymap"/>
- <acronym>PGM</acronym>
- <comment>Portable Gray Map</comment>
- <magic priority="50">
- <match value="P2" type="string" offset="0"/>
- <match value="P5" type="string" offset="0"/>
- </magic>
- <glob pattern="*.pgm"/>
- </mime-type>
-
- <mime-type type="image/x-portable-pixmap">
- <sub-class-of type="image/x-portable-anymap"/>
- <acronym>PXM</acronym>
- <comment>Portable Pixel Map</comment>
- <magic priority="50">
- <match value="P3" type="string" offset="0"/>
- <match value="P6" type="string" offset="0"/>
- <match value="P7" type="string" offset="0"/>
- </magic>
- <glob pattern="*.ppm"/>
- </mime-type>
-
- <mime-type type="image/x-raw-adobe">
- <acronym>DNG</acronym>
- <comment>Adobe Digital Negative</comment>
- <glob pattern="*.dng"/>
- </mime-type>
-
- <mime-type type="image/x-raw-hasselblad">
- <comment>Hasselblad raw image</comment>
- <glob pattern="*.3fr"/>
- </mime-type>
-
- <mime-type type="image/x-raw-fuji">
- <comment>Fuji raw image</comment>
- <glob pattern="*.raf"/>
- </mime-type>
-
- <mime-type type="image/x-raw-canon">
- <comment>Canon raw image</comment>
- <glob pattern="*.crw"/>
- <glob pattern="*.cr2"/>
- </mime-type>
-
- <mime-type type="image/x-raw-kodak">
- <comment>Kodak raw image</comment>
- <glob pattern="*.k25"/>
- <glob pattern="*.kdc"/>
- <glob pattern="*.dcs"/>
- <glob pattern="*.drf"/>
- </mime-type>
-
- <mime-type type="image/x-raw-minolta">
- <comment>Minolta raw image</comment>
- <glob pattern="*.mrw"/>
- </mime-type>
-
- <mime-type type="image/x-raw-nikon">
- <comment>Nikon raw image</comment>
- <glob pattern="*.nef"/>
- <glob pattern="*.nrw"/>
- </mime-type>
-
- <mime-type type="image/x-raw-olympus">
- <comment>Olympus raw image</comment>
- <glob pattern="*.orf"/>
- </mime-type>
-
- <mime-type type="image/x-raw-pentax">
- <comment>Pentax raw image</comment>
- <glob pattern="*.ptx"/>
- <glob pattern="*.pef"/>
- </mime-type>
-
- <mime-type type="image/x-raw-sony">
- <comment>Sony raw image</comment>
- <glob pattern="*.arw"/>
- <glob pattern="*.srf"/>
- <glob pattern="*.sr2"/>
- </mime-type>
-
- <mime-type type="image/x-raw-sigma">
- <comment>Sigma raw image</comment>
- <glob pattern="*.x3f"/>
- </mime-type>
-
- <mime-type type="image/x-raw-epson">
- <comment>Epson raw image</comment>
- <glob pattern="*.erf"/>
- </mime-type>
-
- <mime-type type="image/x-raw-mamiya">
- <comment>Mamiya raw image</comment>
- <glob pattern="*.mef"/>
- </mime-type>
-
- <mime-type type="image/x-raw-leaf">
- <comment>Leaf raw image</comment>
- <glob pattern="*.mos"/>
- </mime-type>
-
- <mime-type type="image/x-raw-panasonic">
- <comment>Panasonic raw image</comment>
- <glob pattern="*.raw"/>
- <glob pattern="*.rw2"/>
- </mime-type>
-
- <mime-type type="image/x-raw-phaseone">
- <comment>Phase One raw image</comment>
- <glob pattern="*.cap"/>
- <glob pattern="*.iiq"/>
- </mime-type>
-
- <mime-type type="image/x-raw-red">
- <comment>Red raw image</comment>
- <glob pattern="*.r3d"/>
- </mime-type>
-
- <mime-type type="image/x-raw-imacon">
- <comment>Imacon raw image</comment>
- <glob pattern="*.fff"/>
- </mime-type>
-
- <mime-type type="image/x-raw-logitech">
- <comment>Logitech raw image</comment>
- <glob pattern="*.pxn"/>
- </mime-type>
-
- <mime-type type="image/x-raw-casio">
- <comment>Casio raw image</comment>
- <glob pattern="*.bay"/>
- </mime-type>
-
- <mime-type type="image/x-raw-rawzor">
- <comment>Rawzor raw image</comment>
- <glob pattern="*.rwz"/>
- </mime-type>
-
- <mime-type type="image/x-rgb">
- <glob pattern="*.rgb"/>
- </mime-type>
-
- <mime-type type="image/x-xbitmap">
- <magic priority="50">
- <match value="/* XPM" type="string" offset="0"/>
- </magic>
- <glob pattern="*.xbm"/>
- <sub-class-of type="text/x-c"/>
- </mime-type>
-
- <mime-type type="image/x-xcf">
- <alias type="image/xcf"/>
- <magic priority="50">
- <match type="string" value="gimp xcf " offset="0"/>
- </magic>
- </mime-type>
-
- <mime-type type="image/x-xpixmap">
- <glob pattern="*.xpm"/>
- </mime-type>
- <mime-type type="image/x-xwindowdump">
- <glob pattern="*.xwd"/>
- </mime-type>
-
- <mime-type type="message/cpim"/>
- <mime-type type="message/delivery-status"/>
- <mime-type type="message/disposition-notification"/>
- <mime-type type="message/example"/>
- <mime-type type="message/external-body"/>
- <mime-type type="message/global"/>
- <mime-type type="message/global-delivery-status"/>
- <mime-type type="message/global-disposition-notification"/>
- <mime-type type="message/global-headers"/>
- <mime-type type="message/http"/>
- <mime-type type="message/imdn+xml"/>
-
- <mime-type type="message/news">
- <magic priority="50">
- <match value="Path:" type="string" offset="0" />
- <match value="Xref:" type="string" offset="0" />
- <match value="Article" type="string" offset="0" />
- </magic>
- </mime-type>
-
- <mime-type type="message/partial"/>
-
- <mime-type type="message/rfc822">
- <magic priority="50">
- <match value="Relay-Version:" type="string" offset="0"/>
- <match value="#!\ rnews" type="string" offset="0"/>
- <match value="N#!\ rnews" type="string" offset="0"/>
- <match value="Forward\ to" type="string" offset="0"/>
- <match value="Pipe\ to" type="string" offset="0"/>
- <match value="Return-Path:" type="string" offset="0"/>
- <match value="From:" type="string" offset="0"/>
- <match value="Received:" type="string" offset="0"/>
- <match type="string" value="Message-ID:" offset="0"/>
- <match type="string" value="Date:" offset="0"/>
- </magic>
- <glob pattern="*.eml"/>
- <glob pattern="*.mime"/>
- </mime-type>
-
- <mime-type type="message/s-http"/>
- <mime-type type="message/sip"/>
- <mime-type type="message/sipfrag"/>
- <mime-type type="message/tracking-status"/>
- <mime-type type="message/vnd.si.simp"/>
-
- <mime-type type="model/example"/>
-
- <mime-type type="model/iges">
- <_comment>Initial Graphics Exchange Specification Format</_comment>
- <glob pattern="*.igs"/>
- <glob pattern="*.iges"/>
- </mime-type>
-
- <mime-type type="model/mesh">
- <glob pattern="*.msh"/>
- <glob pattern="*.mesh"/>
- <glob pattern="*.silo"/>
- </mime-type>
-
- <mime-type type="model/vnd.dwf">
- <glob pattern="*.dwf"/>
- </mime-type>
- <mime-type type="model/vnd.flatland.3dml"/>
- <mime-type type="model/vnd.gdl">
- <glob pattern="*.gdl"/>
- </mime-type>
- <mime-type type="model/vnd.gs-gdl"/>
- <mime-type type="model/vnd.gs.gdl"/>
- <mime-type type="model/vnd.gtw">
- <glob pattern="*.gtw"/>
- </mime-type>
- <mime-type type="model/vnd.moml+xml"/>
- <mime-type type="model/vnd.mts">
- <glob pattern="*.mts"/>
- </mime-type>
- <mime-type type="model/vnd.parasolid.transmit.binary"/>
- <mime-type type="model/vnd.parasolid.transmit.text"/>
- <mime-type type="model/vnd.vtu">
- <glob pattern="*.vtu"/>
- </mime-type>
-
- <mime-type type="model/vrml">
- <glob pattern="*.wrl"/>
- <glob pattern="*.vrml"/>
- </mime-type>
-
- <mime-type type="multipart/alternative"/>
- <mime-type type="multipart/appledouble"/>
- <mime-type type="multipart/byteranges"/>
- <mime-type type="multipart/digest"/>
- <mime-type type="multipart/encrypted"/>
- <mime-type type="multipart/example"/>
- <mime-type type="multipart/form-data"/>
- <mime-type type="multipart/header-set"/>
- <mime-type type="multipart/mixed"/>
- <mime-type type="multipart/parallel"/>
- <mime-type type="multipart/related"/>
- <mime-type type="multipart/report"/>
- <mime-type type="multipart/signed"/>
- <mime-type type="multipart/voice-message"/>
- <mime-type type="text/calendar">
- <glob pattern="*.ics"/>
- <glob pattern="*.ifb"/>
- </mime-type>
-
- <mime-type type="text/css">
- <comment>Cascading Style Sheet</comment>
- <glob pattern="*.css"/>
- <sub-class-of type="text/plain"/>
- </mime-type>
-
- <mime-type type="text/csv">
- <glob pattern="*.csv"/>
- </mime-type>
- <mime-type type="text/directory"/>
- <mime-type type="text/dns"/>
- <mime-type type="text/ecmascript"/>
- <mime-type type="text/enriched"/>
- <mime-type type="text/example"/>
-
- <mime-type type="text/html">
- <!-- TIKA-327: if you encounter tags in the HTML
- with no declared namespace, it's not XHTML, it's just
- bad HTML, unfortunately.
- -->
- <root-XML localName="html"/>
- <root-XML localName="HTML"/>
- <root-XML localName="link"/>
- <root-XML localName="LINK"/>
- <root-XML localName="body"/>
- <root-XML localName="BODY"/>
- <root-XML localName="p"/>
- <root-XML localName="P"/>
- <root-XML localName="script"/>
- <root-XML localName="SCRIPT"/>
- <root-XML localName="frameset"/>
- <root-XML localName="FRAMESET"/>
- <magic priority="50">
- <match value="<!DOCTYPE HTML" type="string" offset="0:64"/>
- <match value="<!doctype html" type="string" offset="0:64"/>
- <match value="<HEAD" type="string" offset="0:64"/>
- <match value="<head" type="string" offset="0:64"/>
- <match value="<TITLE" type="string" offset="0:64"/>
- <match value="<title" type="string" offset="0:64"/>
- <!-- note on the offset value here: this can only be as big as
- MimeTypes#getMinLength(). If you set the offset value to larger
- than that size, the magic will only be compared to up to
- MimeTypes#getMinLength() bytes.
- -->
- <match value="<html" type="string" offset="0:8192"/>
- <match value="<HTML" type="string" offset="0:64"/>
- <match value="<BODY" type="string" offset="0"/>
- <match value="<body" type="string" offset="0"/>
- <match value="<TITLE" type="string" offset="0"/>
- <match value="<title" type="string" offset="0"/>
- <match value="<h1" type="string" offset="0"/>
- <match value="<H1" type="string" offset="0"/>
- <match value="<!doctype HTML" type="string" offset="0"/>
- <match value="<!DOCTYPE html" type="string" offset="0"/>
- </magic>
- <glob pattern="*.html"/>
- <glob pattern="*.htm"/>
- </mime-type>
-
- <mime-type type="text/javascript"/>
- <mime-type type="text/parityfec"/>
-
- <mime-type type="text/plain">
- <magic priority="20">
- <match value="This is TeX," type="string" offset="0"/>
- <match value="This is METAFONT," type="string" offset="0"/>
- <match value="/*" type="string" offset="0"/>
- <match value="//" type="string" offset="0"/>
- <match value=";;" type="string" offset="0"/>
- <!-- UTF-16BE BOM -->
- <match value="0xfeff" type="string" offset="0"/>
- <!-- UTF-16LE BOM -->
- <match value="0xfffe" type="string" offset="0"/>
- <!-- UTF-8 BOM -->
- <match value="0xefbbbf" type="string" offset="0"/>
- </magic>
-
- <glob pattern="*.txt"/>
- <glob pattern="*.text"/>
- <glob pattern="*.conf"/>
- <glob pattern="*.def"/>
- <glob pattern="*.list"/>
- <glob pattern="*.log"/>
- <glob pattern="*.in"/>
-
- <!-- TIKA-85: http://www.apache.org/dev/svn-eol-style.txt -->
- <glob pattern="INSTALL"/>
- <glob pattern="KEYS"/>
- <glob pattern="Makefile"/>
- <glob pattern="README"/>
- <glob pattern="abs-linkmap"/>
- <glob pattern="abs-menulinks"/>
- <glob pattern="*.aart"/>
- <glob pattern="*.ac"/>
- <glob pattern="*.am"/>
- <glob pattern="*.cgi"/>
- <glob pattern="*.classpath"/>
- <glob pattern="*.cmd"/>
- <glob pattern="*.config"/>
- <glob pattern="*.cwiki"/>
- <glob pattern="*.data"/>
- <glob pattern="*.dcl"/>
- <glob pattern="*.egrm"/>
- <glob pattern="*.ent"/>
- <glob pattern="*.ft"/>
- <glob pattern="*.fn"/>
- <glob pattern="*.fv"/>
- <glob pattern="*.grm"/>
- <glob pattern="*.g"/>
- <glob pattern=".htaccess"/>
- <glob pattern="*.ihtml"/>
- <glob pattern="*.jmx"/>
- <glob pattern="*.jsp"/>
- <glob pattern="*.junit"/>
- <glob pattern="*.jx"/>
- <glob pattern="*.manifest"/>
- <glob pattern="*.m4"/>
- <glob pattern="*.mf"/>
- <glob pattern="*.MF"/>
- <glob pattern="*.meta"/>
- <glob pattern="*.n3"/>
- <glob pattern="*.pen"/>
- <glob pattern="*.pl"/>
- <glob pattern="*.pm"/>
- <glob pattern="*.pod"/>
- <glob pattern="*.pom"/>
- <glob pattern="*.project"/>
- <glob pattern="*.properties"/>
- <glob pattern="*.py"/>
- <glob pattern="*.rb"/>
- <glob pattern="*.rng"/>
- <glob pattern="*.rnx"/>
- <glob pattern="*.roles"/>
- <glob pattern="*.sql"/>
- <glob pattern="*.tld"/>
- <glob pattern="*.types"/>
- <glob pattern="*.vm"/>
- <glob pattern="*.vsl"/>
- <glob pattern="*.wsdd"/>
- <glob pattern="*.xargs"/>
- <glob pattern="*.xcat"/>
- <glob pattern="*.xconf"/>
- <glob pattern="*.xegrm"/>
- <glob pattern="*.xgrm"/>
- <glob pattern="*.xlex"/>
- <glob pattern="*.xlog"/>
- <glob pattern="*.xmap"/>
- <glob pattern="*.xroles"/>
- <glob pattern="*.xsamples"/>
- <glob pattern="*.xsp"/>
- <glob pattern="*.xweb"/>
- <glob pattern="*.xwelcome"/>
- </mime-type>
-
- <mime-type type="text/prs.fallenstein.rst"/>
- <mime-type type="text/prs.lines.tag">
- <glob pattern="*.dsc"/>
- </mime-type>
- <mime-type type="text/red"/>
- <mime-type type="text/rfc822-headers"/>
- <mime-type type="text/richtext">
- <glob pattern="*.rtx"/>
- </mime-type>
- <mime-type type="text/rtf"/>
- <mime-type type="text/rtp-enc-aescm128"/>
- <mime-type type="text/rtx"/>
- <mime-type type="text/sgml">
- <glob pattern="*.sgml"/>
- <glob pattern="*.sgm"/>
- </mime-type>
- <mime-type type="text/t140"/>
- <mime-type type="text/tab-separated-values">
- <glob pattern="*.tsv"/>
- </mime-type>
-
- <mime-type type="text/troff">
- <alias type="application/x-troff"/>
- <alias type="application/x-troff-man"/>
- <alias type="application/x-troff-me"/>
- <alias type="application/x-troff-ms"/>
- <magic priority="50">
- <match value=".\\"" type="string" offset="0"/>
- <match value="'\\"" type="string" offset="0"/>
- <match value="'.\\"" type="string" offset="0"/>
- <match value="\\"" type="string" offset="0"/>
- <match value="'''" type="string" offset="0"/>
- </magic>
- <glob pattern="*.t"/>
- <glob pattern="*.tr"/>
- <glob pattern="*.roff"/>
- <glob pattern="*.man"/>
- <glob pattern="*.me"/>
- <glob pattern="*.ms"/>
- </mime-type>
-
- <mime-type type="text/ulpfec"/>
- <mime-type type="text/uri-list">
- <glob pattern="*.uri"/>
- <glob pattern="*.uris"/>
- <glob pattern="*.urls"/>
- </mime-type>
- <mime-type type="text/vnd.abc"/>
- <mime-type type="text/vnd.curl">
- <glob pattern="*.curl"/>
- </mime-type>
- <mime-type type="text/vnd.curl.dcurl">
- <glob pattern="*.dcurl"/>
- </mime-type>
- <mime-type type="text/vnd.curl.scurl">
- <glob pattern="*.scurl"/>
- </mime-type>
- <mime-type type="text/vnd.curl.mcurl">
- <glob pattern="*.mcurl"/>
- </mime-type>
- <mime-type type="text/vnd.dmclientscript"/>
- <mime-type type="text/vnd.esmertec.theme-descriptor"/>
- <mime-type type="text/vnd.fly">
- <glob pattern="*.fly"/>
- </mime-type>
- <mime-type type="text/vnd.fmi.flexstor">
- <glob pattern="*.flx"/>
- </mime-type>
- <mime-type type="text/vnd.graphviz">
- <glob pattern="*.gv"/>
- </mime-type>
- <mime-type type="text/vnd.in3d.3dml">
- <glob pattern="*.3dml"/>
- </mime-type>
- <mime-type type="text/vnd.in3d.spot">
- <glob pattern="*.spot"/>
- </mime-type>
- <mime-type type="text/vnd.iptc.newsml"/>
- <mime-type type="text/vnd.iptc.nitf"/>
- <mime-type type="text/vnd.latex-z"/>
- <mime-type type="text/vnd.motorola.reflex"/>
- <mime-type type="text/vnd.ms-mediapackage"/>
- <mime-type type="text/vnd.net2phone.commcenter.command"/>
- <mime-type type="text/vnd.si.uricatalogue"/>
- <mime-type type="text/vnd.sun.j2me.app-descriptor">
- <glob pattern="*.jad"/>
- </mime-type>
- <mime-type type="text/vnd.trolltech.linguist"/>
- <mime-type type="text/vnd.wap.si"/>
- <mime-type type="text/vnd.wap.sl"/>
- <mime-type type="text/vnd.wap.wml">
- <glob pattern="*.wml"/>
- </mime-type>
-
- <mime-type type="text/vnd.wap.wmlscript">
- <_comment>WML Script</_comment>
- <glob pattern="*.wmls"/>
- </mime-type>
-
- <mime-type type="text/x-asm">
- <glob pattern="*.s"/>
- <glob pattern="*.asm"/>
- </mime-type>
-
- <mime-type type="text/x-c">
- <glob pattern="*.c"/>
- <glob pattern="*.cc"/>
- <glob pattern="*.cxx"/>
- <glob pattern="*.cpp"/>
- <glob pattern="*.h"/>
- <glob pattern="*.hh"/>
- <glob pattern="*.dic"/>
- <sub-class-of type="text/plain"/>
- </mime-type>
-
- <mime-type type="text/x-diff">
- <magic priority="50">
- <match value="diff\ " type="string" offset="0"/>
- <match value="***\ " type="string" offset="0"/>
- <match value="Only\ in\ " type="string" offset="0"/>
- <match value="Common\ subdirectories:\ " type="string" offset="0"/>
- <match value="Index:" type="string" offset="0"/>
- </magic>
- <glob pattern="*.diff"/>
- <glob pattern="*.patch"/>
- </mime-type>
-
- <mime-type type="text/x-fortran">
- <glob pattern="*.f"/>
- <glob pattern="*.for"/>
- <glob pattern="*.f77"/>
- <glob pattern="*.f90"/>
- </mime-type>
- <mime-type type="text/x-pascal">
- <glob pattern="*.p"/>
- <glob pattern="*.pas"/>
- </mime-type>
-
- <mime-type type="text/x-java-source">
- <glob pattern="*.java"/>
- <sub-class-of type="text/plain"/>
- </mime-type>
-
- <mime-type type="text/x-setext">
- <glob pattern="*.etx"/>
- </mime-type>
-
- <mime-type type="text/x-uuencode">
- <glob pattern="*.uu"/>
- </mime-type>
- <mime-type type="text/x-vcalendar">
- <glob pattern="*.vcs"/>
- </mime-type>
- <mime-type type="text/x-vcard">
- <glob pattern="*.vcf"/>
- </mime-type>
- <mime-type type="text/xml"/>
- <mime-type type="text/xml-external-parsed-entity"/>
- <mime-type type="video/3gpp">
- <glob pattern="*.3gp"/>
- </mime-type>
- <mime-type type="video/3gpp-tt"/>
- <mime-type type="video/3gpp2">
- <glob pattern="*.3g2"/>
- </mime-type>
- <mime-type type="video/bmpeg"/>
- <mime-type type="video/bt656"/>
- <mime-type type="video/celb"/>
- <mime-type type="video/dv"/>
- <mime-type type="video/example"/>
- <mime-type type="video/h261">
- <glob pattern="*.h261"/>
- </mime-type>
- <mime-type type="video/h263">
- <glob pattern="*.h263"/>
- </mime-type>
- <mime-type type="video/h263-1998"/>
- <mime-type type="video/h263-2000"/>
- <mime-type type="video/h264">
- <glob pattern="*.h264"/>
- </mime-type>
- <mime-type type="video/jpeg">
- <glob pattern="*.jpgv"/>
- </mime-type>
- <mime-type type="video/jpeg2000"/>
- <mime-type type="video/jpm">
- <glob pattern="*.jpm"/>
- <glob pattern="*.jpgm"/>
- </mime-type>
- <mime-type type="video/mj2">
- <glob pattern="*.mj2"/>
- <glob pattern="*.mjp2"/>
- </mime-type>
- <mime-type type="video/mp1s"/>
- <mime-type type="video/mp2p"/>
- <mime-type type="video/mp2t"/>
- <mime-type type="video/mp4">
- <glob pattern="*.mp4"/>
- <glob pattern="*.mp4v"/>
- <glob pattern="*.mpg4"/>
- </mime-type>
- <mime-type type="video/mp4v-es"/>
-
- <mime-type type="video/mpeg">
- <magic priority="50">
- <match value="\000\000\001\263" type="string" offset="0"/>
- </magic>
- <glob pattern="*.mpeg"/>
- <glob pattern="*.mpg"/>
- <glob pattern="*.mpe"/>
- <glob pattern="*.m1v"/>
- <glob pattern="*.m2v"/>
- </mime-type>
-
- <mime-type type="video/vnd.mpegurl">
- <glob pattern="*.mxu"/>
- </mime-type>
-
- <mime-type type="video/mpeg4-generic"/>
- <mime-type type="video/mpv"/>
- <mime-type type="video/nv"/>
-
- <mime-type type="video/ogg">
- <glob pattern="*.ogv"/>
- <sub-class-of type="application/ogg"/>
- </mime-type>
-
- <mime-type type="video/parityfec"/>
- <mime-type type="video/pointer"/>
-
- <mime-type type="video/quicktime">
- <magic priority="50">
- <match value="moov" type="string" offset="4"/>
- <match value="mdat" type="string" offset="4"/>
- <match value="ftyp" type="string" offset="4"/>
- </magic>
- <glob pattern="*.qt"/>
- <glob pattern="*.mov"/>
- </mime-type>
-
- <mime-type type="video/raw"/>
- <mime-type type="video/rtp-enc-aescm128"/>
- <mime-type type="video/rtx"/>
- <mime-type type="video/smpte292m"/>
- <mime-type type="video/ulpfec"/>
- <mime-type type="video/vc1"/>
- <mime-type type="video/vnd.cctv"/>
- <mime-type type="video/vnd.dlna.mpeg-tts"/>
- <mime-type type="video/vnd.fvt">
- <glob pattern="*.fvt"/>
- </mime-type>
- <mime-type type="video/vnd.hns.video"/>
- <mime-type type="video/vnd.iptvforum.1dparityfec-1010"/>
- <mime-type type="video/vnd.iptvforum.1dparityfec-2005"/>
- <mime-type type="video/vnd.iptvforum.2dparityfec-1010"/>
- <mime-type type="video/vnd.iptvforum.2dparityfec-2005"/>
- <mime-type type="video/vnd.iptvforum.ttsavc"/>
- <mime-type type="video/vnd.iptvforum.ttsmpeg2"/>
- <mime-type type="video/vnd.motorola.video"/>
- <mime-type type="video/vnd.motorola.videop"/>
- <mime-type type="video/vnd.mpegurl">
- <glob pattern="*.mxu"/>
- <glob pattern="*.m4u"/>
- </mime-type>
- <mime-type type="video/vnd.ms-playready.media.pyv">
- <glob pattern="*.pyv"/>
- </mime-type>
- <mime-type type="video/vnd.nokia.interleaved-multimedia"/>
- <mime-type type="video/vnd.nokia.videovoip"/>
- <mime-type type="video/vnd.objectvideo"/>
- <mime-type type="video/vnd.sealed.mpeg1"/>
- <mime-type type="video/vnd.sealed.mpeg4"/>
- <mime-type type="video/vnd.sealed.swf"/>
- <mime-type type="video/vnd.sealedmedia.softseal.mov"/>
- <mime-type type="video/vnd.vivo">
- <glob pattern="*.viv"/>
- </mime-type>
- <mime-type type="video/x-f4v">
- <glob pattern="*.f4v"/>
- </mime-type>
-
- <mime-type type="video/x-flc">
- <glob pattern="*.flc"/>
- </mime-type>
-
- <mime-type type="video/x-fli">
- <glob pattern="*.fli"/>
- </mime-type>
-
- <mime-type type="video/x-flv">
- <magic priority="50">
- <match value="FLV" type="string" offset="0"/>
- </magic>
- <glob pattern="*.flv"/>
- </mime-type>
-
- <mime-type type="video/x-jng">
- <magic priority="50">
- <match value="\x8bJNG" type="string" offset="0"/>
- </magic>
- <glob pattern="*.jng"/>
- </mime-type>
-
- <mime-type type="video/x-m4v">
- <glob pattern="*.m4v"/>
- </mime-type>
-
- <mime-type type="video/x-mng">
- <magic priority="50">
- <match value="\x8aMNG" type="string" offset="0"/>
- </magic>
- <glob pattern="*.mng"/>
- </mime-type>
-
- <mime-type type="video/x-ms-asf">
- <glob pattern="*.asf"/>
- <glob pattern="*.asx"/>
- </mime-type>
- <mime-type type="video/x-ms-wm">
- <glob pattern="*.wm"/>
- </mime-type>
- <mime-type type="video/x-ms-wmv">
- <glob pattern="*.wmv"/>
- </mime-type>
- <mime-type type="video/x-ms-wmx">
- <glob pattern="*.wmx"/>
- </mime-type>
- <mime-type type="video/x-ms-wvx">
- <glob pattern="*.wvx"/>
- </mime-type>
-
- <mime-type type="video/x-msvideo">
- <alias type="video/avi"/>
- <alias type="video/msvideo"/>
- <magic priority="50">
- <match value="RIFF....AVI " type="string" offset="0"
- mask="0xFFFFFFFF00000000FFFFFFFF"/>
- </magic>
- <glob pattern="*.avi"/>
- </mime-type>
-
- <mime-type type="video/x-sgi-movie">
- <magic priority="50">
- <match value="MOVI" type="string" offset="0"/>
- </magic>
- <glob pattern="*.movie"/>
- </mime-type>
-
- <mime-type type="x-conference/x-cooltalk">
- <_comment>Cooltalk Audio</_comment>
- <glob pattern="*.ice"/>
- </mime-type>
-
-</mime-info>
13 years, 9 months
exo-jcr SVN: r3053 - in core/trunk/exo.core.component.document/src/test: java/org/exoplatform/services/document/tika and 1 other directories.
by do-not-reply@jboss.org
Author: sergiykarpenko
Date: 2010-09-03 09:07:59 -0400 (Fri, 03 Sep 2010)
New Revision: 3053
Modified:
core/trunk/exo.core.component.document/src/test/java/org/exoplatform/services/document/test/TestOpenOfficeDocumentReader.java
core/trunk/exo.core.component.document/src/test/java/org/exoplatform/services/document/test/TestPropertiesExtracting.java
core/trunk/exo.core.component.document/src/test/java/org/exoplatform/services/document/tika/TestHtmlOnTikaDocumentReader.java
core/trunk/exo.core.component.document/src/test/java/org/exoplatform/services/document/tika/TestOpenOfficeOnTikaDocumentReader.java
core/trunk/exo.core.component.document/src/test/java/org/exoplatform/services/document/tika/TestPropertiesExtractionOnTika.java
core/trunk/exo.core.component.document/src/test/resources/test.odt
Log:
EXOJCR-749: tests fixed
Modified: core/trunk/exo.core.component.document/src/test/java/org/exoplatform/services/document/test/TestOpenOfficeDocumentReader.java
===================================================================
--- core/trunk/exo.core.component.document/src/test/java/org/exoplatform/services/document/test/TestOpenOfficeDocumentReader.java 2010-09-03 11:19:03 UTC (rev 3052)
+++ core/trunk/exo.core.component.document/src/test/java/org/exoplatform/services/document/test/TestOpenOfficeDocumentReader.java 2010-09-03 13:07:59 UTC (rev 3053)
@@ -49,7 +49,7 @@
{
String text = service.getDocumentReader("application/vnd.oasis.opendocument.text").getContentAsText(is);
- String expected = "This is a test Open Office document `1234567890-= !@#$%^ & *()_+~|�:? > < |\\,./[]{}";
+ String expected = "This is a test Open Office document `1234567890-= !@#$%^ & *()_+~|:? > < |\\,./[]{}";
assertEquals("Wrong string returned", normalizeWhitespaces(expected), normalizeWhitespaces(text));
}
Modified: core/trunk/exo.core.component.document/src/test/java/org/exoplatform/services/document/test/TestPropertiesExtracting.java
===================================================================
--- core/trunk/exo.core.component.document/src/test/java/org/exoplatform/services/document/test/TestPropertiesExtracting.java 2010-09-03 11:19:03 UTC (rev 3052)
+++ core/trunk/exo.core.component.document/src/test/java/org/exoplatform/services/document/test/TestPropertiesExtracting.java 2010-09-03 13:07:59 UTC (rev 3053)
@@ -249,7 +249,7 @@
etalon.put(DCMetaData.TITLE, "test-Title");
etalon.put(DCMetaData.LANGUAGE, "ru-RU");
- etalon.put(DCMetaData.DATE, "2010-08-31T14:53:42.68");
+ etalon.put(DCMetaData.DATE, "2010-09-03T14:37:59.10");
etalon.put(DCMetaData.SUBJECT, "test-Subject");
etalon.put(DCMetaData.CREATOR, "Sergiy Karpenko");
etalon.put(DCMetaData.DESCRIPTION, "test-Comments");
Modified: core/trunk/exo.core.component.document/src/test/java/org/exoplatform/services/document/tika/TestHtmlOnTikaDocumentReader.java
===================================================================
--- core/trunk/exo.core.component.document/src/test/java/org/exoplatform/services/document/tika/TestHtmlOnTikaDocumentReader.java 2010-09-03 11:19:03 UTC (rev 3052)
+++ core/trunk/exo.core.component.document/src/test/java/org/exoplatform/services/document/tika/TestHtmlOnTikaDocumentReader.java 2010-09-03 13:07:59 UTC (rev 3053)
@@ -68,14 +68,8 @@
DocumentReader dr = service.getDocumentReader(mimeType);
String text = dr.getContentAsText(is);
- String expected =
- "JBoss.orgCommunity Documentation Prev Next Chapter�58.�eXo Core 58.1. eXo Core "
- + "introduction 58.1.�eXo Core introduction The eXo Core is a set of common services "
- + "that are used by eXo products and modules, it also can be used in the business logic. "
- + "It's Authentication and Security, Organization, Database, Logging, JNDI, LDAP,"
- + " Document reader and other services. PrevPart�III.�eXoCore Top of page Front page"
- + " NextChapter�59.�Database Creator";
- assertEquals("Wrong string returned", normalizeWhitespaces(expected), normalizeWhitespaces(text));
+ assertTrue((normalizeWhitespaces(text))
+ .contains("The eXo Core is a set of common services that are used by eXo products and modules, it also can be used in the business logic. It's Authentication and Security, Organization, Database, Logging, JNDI, LDAP, Document reader and other services."));
}
}
Modified: core/trunk/exo.core.component.document/src/test/java/org/exoplatform/services/document/tika/TestOpenOfficeOnTikaDocumentReader.java
===================================================================
--- core/trunk/exo.core.component.document/src/test/java/org/exoplatform/services/document/tika/TestOpenOfficeOnTikaDocumentReader.java 2010-09-03 11:19:03 UTC (rev 3052)
+++ core/trunk/exo.core.component.document/src/test/java/org/exoplatform/services/document/tika/TestOpenOfficeOnTikaDocumentReader.java 2010-09-03 13:07:59 UTC (rev 3053)
@@ -49,7 +49,7 @@
{
String text = service.getDocumentReader("application/vnd.oasis.opendocument.text").getContentAsText(is);
- String expected = "This is a test Open Office document `1234567890-= !@#$%^&*()_+~|�:?><|\\,./[]{}";
+ String expected = "This is a test Open Office document `1234567890-= !@#$%^&*()_+~|:?><|\\,./[]{}";
assertEquals("Wrong string returned", normalizeWhitespaces(expected), normalizeWhitespaces(text));
}
finally
@@ -77,7 +77,7 @@
}
String text = buf.toString();
- String expected = "This is a test Open Office document `1234567890-= !@#$%^&*()_+~|�:?><|\\,./[]{}";
+ String expected = "This is a test Open Office document `1234567890-= !@#$%^&*()_+~|:?><|\\,./[]{}";
assertEquals("Wrong string returned", normalizeWhitespaces(expected), normalizeWhitespaces(text));
}
finally
Modified: core/trunk/exo.core.component.document/src/test/java/org/exoplatform/services/document/tika/TestPropertiesExtractionOnTika.java
===================================================================
--- core/trunk/exo.core.component.document/src/test/java/org/exoplatform/services/document/tika/TestPropertiesExtractionOnTika.java 2010-09-03 11:19:03 UTC (rev 3052)
+++ core/trunk/exo.core.component.document/src/test/java/org/exoplatform/services/document/tika/TestPropertiesExtractionOnTika.java 2010-09-03 13:07:59 UTC (rev 3053)
@@ -261,7 +261,7 @@
etalon.put(DCMetaData.TITLE, "test-Title");
etalon.put(DCMetaData.LANGUAGE, "ru-RU");
- etalon.put(DCMetaData.DATE, "2010-08-31T14:53:42.68");
+ etalon.put(DCMetaData.DATE, "2010-09-03T14:37:59.10");
etalon.put(DCMetaData.SUBJECT, "test-Subject");
etalon.put(DCMetaData.CREATOR, "Sergiy Karpenko");
etalon.put(DCMetaData.DESCRIPTION, "test-Comments");
Modified: core/trunk/exo.core.component.document/src/test/resources/test.odt
===================================================================
(Binary files differ)
13 years, 9 months
exo-jcr SVN: r3051 - in core/trunk/exo.core.component.document/src/main/java/org/exoplatform/services/document: impl and 1 other directories.
by do-not-reply@jboss.org
Author: sergiykarpenko
Date: 2010-09-03 07:12:14 -0400 (Fri, 03 Sep 2010)
New Revision: 3051
Added:
core/trunk/exo.core.component.document/src/main/java/org/exoplatform/services/document/AdvancedDocumentReader.java
core/trunk/exo.core.component.document/src/main/java/org/exoplatform/services/document/impl/tika/
core/trunk/exo.core.component.document/src/main/java/org/exoplatform/services/document/impl/tika/BaseAdvancedDocumentReader.java
Log:
EXOJCR-752: AdvancedDocumentReader interface added
Added: core/trunk/exo.core.component.document/src/main/java/org/exoplatform/services/document/AdvancedDocumentReader.java
===================================================================
--- core/trunk/exo.core.component.document/src/main/java/org/exoplatform/services/document/AdvancedDocumentReader.java (rev 0)
+++ core/trunk/exo.core.component.document/src/main/java/org/exoplatform/services/document/AdvancedDocumentReader.java 2010-09-03 11:12:14 UTC (rev 3051)
@@ -0,0 +1,54 @@
+/*
+ * Copyright (C) 2003-2010 eXo Platform SAS.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Affero General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, see<http://www.gnu.org/licenses/>.
+ */
+package org.exoplatform.services.document;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.Reader;
+
+/**
+ * This Interface extends DocumentReader with two getContentAsReader methods.
+ *
+ * Created by The eXo Platform SAS.
+ *
+ * <br/>Date:
+ * * @author <a href="karpenko.sergiy(a)gmail.com">Karpenko Sergiy</a>
+ * @version $Id: AdvancedDocumentReader.java 111 2008-11-11 11:11:11Z serg $
+ */
+public interface AdvancedDocumentReader extends DocumentReader
+{
+ /**
+ * Return text content from stream as reader.
+ *
+ * @param is - input stream
+ * @param encoding - encoding of text content
+ * @return
+ * @throws IOException
+ * @throws DocumentReadException
+ */
+ Reader getContentAsReader(InputStream is, String encoding) throws IOException, DocumentReadException;
+
+ /**
+ * Return text content from stream as reader.
+ *
+ * @param is - input stream
+ * @return
+ * @throws IOException
+ * @throws DocumentReadException
+ */
+ Reader getContentAsReader(InputStream is) throws IOException, DocumentReadException;
+}
Added: core/trunk/exo.core.component.document/src/main/java/org/exoplatform/services/document/impl/tika/BaseAdvancedDocumentReader.java
===================================================================
--- core/trunk/exo.core.component.document/src/main/java/org/exoplatform/services/document/impl/tika/BaseAdvancedDocumentReader.java (rev 0)
+++ core/trunk/exo.core.component.document/src/main/java/org/exoplatform/services/document/impl/tika/BaseAdvancedDocumentReader.java 2010-09-03 11:12:14 UTC (rev 3051)
@@ -0,0 +1,32 @@
+/*
+ * Copyright (C) 2003-2010 eXo Platform SAS.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Affero General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, see<http://www.gnu.org/licenses/>.
+ */
+package org.exoplatform.services.document.impl.tika;
+
+import org.exoplatform.services.document.AdvancedDocumentReader;
+import org.exoplatform.services.document.impl.BaseDocumentReader;
+
+/**
+ * Created by The eXo Platform SAS.
+ *
+ * <br/>Date:
+ *
+ * @author <a href="karpenko.sergiy(a)gmail.com">Karpenko Sergiy</a>
+ * @version $Id: AdvancedBaseDockumentReader.java 111 2008-11-11 11:11:11Z serg $
+ */
+public abstract class BaseAdvancedDocumentReader extends BaseDocumentReader implements AdvancedDocumentReader
+{
+}
13 years, 9 months
exo-jcr SVN: r3050 - in kernel/branches/2.3-ISPN: exo.kernel.component.ext.cache.impl.infinispan.v4/src/main/java/org/exoplatform/services/cache/impl/infinispan and 2 other directories.
by do-not-reply@jboss.org
Author: nfilotto
Date: 2010-09-03 06:42:11 -0400 (Fri, 03 Sep 2010)
New Revision: 3050
Modified:
kernel/branches/2.3-ISPN/exo.kernel.component.ext.cache.impl.infinispan.v4/src/main/java/org/exoplatform/services/cache/impl/infinispan/ExoCacheFactoryImpl.java
kernel/branches/2.3-ISPN/exo.kernel.component.ext.cache.impl.infinispan.v4/src/test/java/org/exoplatform/services/cache/impl/infinispan/TestExoCacheFactoryImpl.java
kernel/branches/2.3-ISPN/exo.kernel.component.ext.cache.impl.infinispan.v4/src/test/resources/conf/portal/distributed-cache-configuration-template.xml
kernel/branches/2.3-ISPN/exo.kernel.component.ext.cache.impl.infinispan.v4/src/test/resources/conf/portal/test-configuration.xml
kernel/branches/2.3-ISPN/pom.xml
Log:
EXOJCR-802: ISPN has been upgraded to 4.1.0.FINAL and the code has been reviewed to ensure that the same CacheManager will be used if the GlobalConfig is the same
Modified: kernel/branches/2.3-ISPN/exo.kernel.component.ext.cache.impl.infinispan.v4/src/main/java/org/exoplatform/services/cache/impl/infinispan/ExoCacheFactoryImpl.java
===================================================================
--- kernel/branches/2.3-ISPN/exo.kernel.component.ext.cache.impl.infinispan.v4/src/main/java/org/exoplatform/services/cache/impl/infinispan/ExoCacheFactoryImpl.java 2010-09-02 14:17:14 UTC (rev 3049)
+++ kernel/branches/2.3-ISPN/exo.kernel.component.ext.cache.impl.infinispan.v4/src/main/java/org/exoplatform/services/cache/impl/infinispan/ExoCacheFactoryImpl.java 2010-09-03 10:42:11 UTC (rev 3050)
@@ -70,6 +70,11 @@
private static final String CACHE_CONFIG_TEMPLATE_KEY = "cache.config.template";
/**
+ * The current {@link ExoContainerContext}
+ */
+ private final ExoContainerContext ctx;
+
+ /**
* The configuration manager that allows us to retrieve a configuration file in several different
* manners
*/
@@ -97,9 +102,9 @@
private final Map<String, String> mappingCacheNameConfig = new HashMap<String, String>();
/**
- * The mapping between the configuration paths and the cache managers
+ * The mapping between the global configuration and the cache managers
*/
- private final Map<String, DefaultCacheManager> mappingConfigPathCacheManager = new HashMap<String, DefaultCacheManager>();
+ private final Map<GlobalConfiguration, DefaultCacheManager> mappingGlobalConfigCacheManager = new HashMap<GlobalConfiguration, DefaultCacheManager>();
/**
* The default creator
@@ -115,20 +120,23 @@
ExoCacheFactoryImpl(ExoContainerContext ctx, String cacheConfigTemplate, ConfigurationManager configManager)
throws ExoCacheInitException
{
+ this.ctx = ctx;
this.configManager = configManager;
if (cacheConfigTemplate == null)
{
throw new RuntimeException("The parameter '" + CACHE_CONFIG_TEMPLATE_KEY + "' must be set");
}
-
- this.cacheManager = initCacheManager(ctx, cacheConfigTemplate);
+ // Initialize the main cache manager
+ this.cacheManager = initCacheManager(cacheConfigTemplate);
+ // Register the main cache manager
+ mappingGlobalConfigCacheManager.put(cacheManager.getGlobalConfiguration(), cacheManager);
}
/**
* Initializes the {@link DefaultCacheManager}
* @throws ExoCacheInitException if the cache manager cannot be initialized
*/
- private DefaultCacheManager initCacheManager(ExoContainerContext ctx, String cacheConfigTemplate)
+ private DefaultCacheManager initCacheManager(String cacheConfigTemplate)
throws ExoCacheInitException
{
InputStream is = null;
@@ -160,11 +168,42 @@
}
GlobalConfiguration config = cacheManager.getGlobalConfiguration();
+
+ configureJGroups(config);
+ return cacheManager;
+ }
+
+ /**
+ * If some JGoups properties has been set, it will load the configuration and set
+ * the cluster name by adding as suffix the name of the {@link ExoContainerContext}
+ *
+ * @param config the global configuration from which the JGroups config will be extracted
+ * @throws ExoCacheInitException if any exception occurs while configuring JGroups
+ */
+ private void configureJGroups(GlobalConfiguration config) throws ExoCacheInitException
+ {
+ if (loadJGroupsConfig(config))
+ {
+ // The JGroups Config could be loaded which means that the configuration is for a cluster
+ config.setClusterName(config.getClusterName() + "-" + ctx.getName());
+ }
+ }
+
+ /**
+ * Load the JGroups configuration file thanks to the {@link ConfigurationManager}
+ * @param config the global configuration from which the JGroups config will be extracted
+ * @return <code>true</code> if the JGoups config could be loaded successfully,
+ * <code>false</code> if there were no JGroups config to load
+ * @throws ExoCacheInitException if the JGroups config could not be loaded
+ */
+ private boolean loadJGroupsConfig(GlobalConfiguration config) throws ExoCacheInitException
+ {
Properties properties = config.getTransportProperties();
if (properties == null || !properties.containsKey(JGroupsTransport.CONFIGURATION_FILE))
{
- return cacheManager;
+ return false;
}
+ InputStream is;
String jgroupsFileLocation = properties.getProperty(JGroupsTransport.CONFIGURATION_FILE);
try
{
@@ -192,9 +231,7 @@
// Remove the property corresponding to the configuration file
properties.remove(JGroupsTransport.CONFIGURATION_FILE);
}
- // Set the cluster name
- config.setClusterName(ctx.getName() + "-cluster");
- return cacheManager;
+ return true;
}
/**
@@ -242,6 +279,7 @@
final String region = config.getName();
final String customConfig = mappingCacheNameConfig.get(region);
final ExoCache<Serializable, Object> eXoCache;
+ final DefaultCacheManager cacheManager;
try
{
final Configuration conf;
@@ -250,18 +288,26 @@
// A custom configuration has been set
if (LOG.isInfoEnabled())
LOG.info("A custom configuration has been set for the cache '" + region + "'.");
- DefaultCacheManager cacheManager = mappingConfigPathCacheManager.get(customConfig);
- if (cacheManager == null)
+ // Create the CacheManager by loading the configuration
+ DefaultCacheManager customCacheManager = new DefaultCacheManager(configManager.getInputStream(customConfig), false);
+ GlobalConfiguration gc = customCacheManager.getGlobalConfiguration();
+ // Configure JGroups since it could affect the state of the Global Config
+ configureJGroups(gc);
+ // Check if a CacheManager with the same GlobalConfiguration exists
+ DefaultCacheManager currentCacheManager = mappingGlobalConfigCacheManager.get(gc);
+ if (currentCacheManager == null)
{
- // No cache manager has been defined so far for this configuration file
- cacheManager = new DefaultCacheManager(configManager.getInputStream(customConfig), false);
+ // No cache manager has been defined so far for this Cache Configuration
+ currentCacheManager = customCacheManager;
// We register this new cache manager
- mappingConfigPathCacheManager.put(customConfig, cacheManager);
+ mappingGlobalConfigCacheManager.put(gc, customCacheManager);
}
- conf = cacheManager.getDefaultConfiguration().clone();
+ conf = currentCacheManager.getDefaultConfiguration().clone();
+ cacheManager = currentCacheManager;
}
else
{
+ cacheManager = this.cacheManager;
// No custom configuration has been found, a configuration template will be used
if (LOG.isInfoEnabled())
LOG.info("The configuration template will be used for the the cache '" + region + "'.");
Modified: kernel/branches/2.3-ISPN/exo.kernel.component.ext.cache.impl.infinispan.v4/src/test/java/org/exoplatform/services/cache/impl/infinispan/TestExoCacheFactoryImpl.java
===================================================================
--- kernel/branches/2.3-ISPN/exo.kernel.component.ext.cache.impl.infinispan.v4/src/test/java/org/exoplatform/services/cache/impl/infinispan/TestExoCacheFactoryImpl.java 2010-09-02 14:17:14 UTC (rev 3049)
+++ kernel/branches/2.3-ISPN/exo.kernel.component.ext.cache.impl.infinispan.v4/src/test/java/org/exoplatform/services/cache/impl/infinispan/TestExoCacheFactoryImpl.java 2010-09-03 10:42:11 UTC (rev 3050)
@@ -24,6 +24,7 @@
import org.exoplatform.services.cache.impl.infinispan.TestExoCacheCreator.TestExoCache;
import org.exoplatform.test.BasicTestCase;
import org.infinispan.config.Configuration.CacheMode;
+import org.infinispan.manager.CacheContainer;
/**
* @author <a href="mailto:nicolas.filotto@exoplatform.com">Nicolas Filotto</a>
@@ -75,4 +76,27 @@
cache = service_.getCacheInstance("test-custom-impl-with-new-config");
assertTrue("expect an instance of TestExoCache", cache instanceof TestExoCache);
}
+
+ public void testSameCacheManager()
+ {
+ ExoCache cache1 = service_.getCacheInstance("myCustomCache");
+ assertTrue("expect an instance of AbstractExoCache", cache1 instanceof AbstractExoCache);
+ AbstractExoCache aCache1 = (AbstractExoCache)cache1;
+ CacheContainer cacheContainer1 = aCache1.cache.getCacheManager();
+
+ ExoCache cache2 = service_.getCacheInstance("myCustomCache-Bis");
+ assertTrue("expect an instance of AbstractExoCache", cache2 instanceof AbstractExoCache);
+ AbstractExoCache aCache2 = (AbstractExoCache)cache2;
+ CacheContainer cacheContainer2 = aCache2.cache.getCacheManager();
+ assertTrue("The CacheContainer should be the same", cacheContainer1 == cacheContainer2);
+
+ ExoCache cache3 = service_.getCacheInstance("myCustomCache-Bis2");
+ assertTrue("expect an instance of AbstractExoCache", cache3 instanceof AbstractExoCache);
+ AbstractExoCache aCache3 = (AbstractExoCache)cache3;
+ CacheContainer cacheContainer3 = aCache3.cache.getCacheManager();
+ assertTrue("The CacheContainer should be the same", cacheContainer1 == cacheContainer3);
+
+ aCache1.cache.stop();
+ aCache2.cache.stop();
+ }
}
Modified: kernel/branches/2.3-ISPN/exo.kernel.component.ext.cache.impl.infinispan.v4/src/test/resources/conf/portal/distributed-cache-configuration-template.xml
===================================================================
--- kernel/branches/2.3-ISPN/exo.kernel.component.ext.cache.impl.infinispan.v4/src/test/resources/conf/portal/distributed-cache-configuration-template.xml 2010-09-02 14:17:14 UTC (rev 3049)
+++ kernel/branches/2.3-ISPN/exo.kernel.component.ext.cache.impl.infinispan.v4/src/test/resources/conf/portal/distributed-cache-configuration-template.xml 2010-09-03 10:42:11 UTC (rev 3050)
@@ -44,7 +44,7 @@
<property name="threadNamePrefix" value="ReplicationQueueThread"/>
</properties>
</replicationQueueScheduledExecutor>
- <globalJmxStatistics jmxDomain="infinispan" enabled="true"/>
+ <globalJmxStatistics jmxDomain="infinispan" enabled="false"/>
<transport transportClass="org.infinispan.remoting.transport.jgroups.JGroupsTransport" clusterName="Infinispan-cluster" distributedSyncTimeout="20000">
<properties>
<property name="configurationFile" value="flush-udp.xml"/>
Modified: kernel/branches/2.3-ISPN/exo.kernel.component.ext.cache.impl.infinispan.v4/src/test/resources/conf/portal/test-configuration.xml
===================================================================
--- kernel/branches/2.3-ISPN/exo.kernel.component.ext.cache.impl.infinispan.v4/src/test/resources/conf/portal/test-configuration.xml 2010-09-02 14:17:14 UTC (rev 3049)
+++ kernel/branches/2.3-ISPN/exo.kernel.component.ext.cache.impl.infinispan.v4/src/test/resources/conf/portal/test-configuration.xml 2010-09-03 10:42:11 UTC (rev 3050)
@@ -172,6 +172,10 @@
<name>myCustomCache</name>
<value>jar:/conf/portal/distributed-cache-configuration-template.xml</value>
</value-param>
+ <value-param>
+ <name>myCustomCache-Bis</name>
+ <value>classpath:/conf/portal/distributed-cache-configuration-template.xml</value>
+ </value-param>
</init-params>
</component-plugin>
<component-plugin>
Modified: kernel/branches/2.3-ISPN/pom.xml
===================================================================
--- kernel/branches/2.3-ISPN/pom.xml 2010-09-02 14:17:14 UTC (rev 3049)
+++ kernel/branches/2.3-ISPN/pom.xml 2010-09-03 10:42:11 UTC (rev 3050)
@@ -190,7 +190,7 @@
<dependency>
<groupId>org.infinispan</groupId>
<artifactId>infinispan-core</artifactId>
- <version>4.1.0.CR2</version>
+ <version>4.1.0.FINAL</version>
</dependency>
<dependency>
<groupId>org.jibx</groupId>
13 years, 9 months
exo-jcr SVN: r3049 - in jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav: command/dasl and 3 other directories.
by do-not-reply@jboss.org
Author: dkatayev
Date: 2010-09-02 10:17:14 -0400 (Thu, 02 Sep 2010)
New Revision: 3049
Modified:
jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/PropFindCommand.java
jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/dasl/SearchResultResponseEntity.java
jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/deltav/report/VersionTreeResponseEntity.java
jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/propfind/PropFindResponseEntity.java
jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/xml/PropstatGroupedRepresentation.java
Log:
EXOJCR-935 constructor with no session added for backward compatibility
Modified: jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/PropFindCommand.java
===================================================================
--- jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/PropFindCommand.java 2010-09-02 14:07:53 UTC (rev 3048)
+++ jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/PropFindCommand.java 2010-09-02 14:17:14 UTC (rev 3049)
@@ -142,11 +142,11 @@
if (request.getType().equalsIgnoreCase("allprop"))
{
- response = new PropFindResponseEntity(depth, resource, null, false, session);
+ response = new PropFindResponseEntity(depth, resource, null, false);
}
else if (request.getType().equalsIgnoreCase("propname"))
{
- response = new PropFindResponseEntity(depth, resource, null, true, session);
+ response = new PropFindResponseEntity(depth, resource, null, true);
}
else if (request.getType().equalsIgnoreCase("prop"))
{
Modified: jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/dasl/SearchResultResponseEntity.java
===================================================================
--- jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/dasl/SearchResultResponseEntity.java 2010-09-02 14:07:53 UTC (rev 3048)
+++ jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/dasl/SearchResultResponseEntity.java 2010-09-02 14:17:14 UTC (rev 3049)
@@ -176,7 +176,7 @@
xmlStreamWriter.writeCharacters(URLDecoder.decode(resource.getIdentifier().toASCIIString(), "UTF-8"));
xmlStreamWriter.writeEndElement();
- PropstatGroupedRepresentation propstat = new PropstatGroupedRepresentation(resource, properties, false, null);
+ PropstatGroupedRepresentation propstat = new PropstatGroupedRepresentation(resource, properties, false);
PropertyWriteUtil.writePropStats(xmlStreamWriter, propstat.getPropStats());
Modified: jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/deltav/report/VersionTreeResponseEntity.java
===================================================================
--- jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/deltav/report/VersionTreeResponseEntity.java 2010-09-02 14:07:53 UTC (rev 3048)
+++ jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/deltav/report/VersionTreeResponseEntity.java 2010-09-02 14:17:14 UTC (rev 3049)
@@ -120,7 +120,7 @@
xmlStreamWriter.writeEndElement();
PropstatGroupedRepresentation propstat =
- new PropstatGroupedRepresentation(versionResource, properties, false, null);
+ new PropstatGroupedRepresentation(versionResource, properties, false);
PropertyWriteUtil.writePropStats(xmlStreamWriter, propstat.getPropStats());
xmlStreamWriter.writeEndElement();
Modified: jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/propfind/PropFindResponseEntity.java
===================================================================
--- jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/propfind/PropFindResponseEntity.java 2010-09-02 14:07:53 UTC (rev 3048)
+++ jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/propfind/PropFindResponseEntity.java 2010-09-02 14:17:14 UTC (rev 3049)
@@ -116,6 +116,11 @@
this.session = session;
}
+ public PropFindResponseEntity(int depth, Resource rootResource, Set<QName> propertyNames, boolean propertyNamesOnly)
+ {
+ this(depth, rootResource, propertyNames, propertyNamesOnly, null);
+ }
+
/**
* {@inheritDoc}
*/
Modified: jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/xml/PropstatGroupedRepresentation.java
===================================================================
--- jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/xml/PropstatGroupedRepresentation.java 2010-09-02 14:07:53 UTC (rev 3048)
+++ jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/xml/PropstatGroupedRepresentation.java 2010-09-02 14:17:14 UTC (rev 3049)
@@ -111,6 +111,11 @@
}
}
+ public PropstatGroupedRepresentation(Resource resource, Set<QName> propNames, boolean namesOnly) throws RepositoryException
+ {
+ this(resource, propNames, namesOnly, null);
+ }
+
/**
* Returns properties statuses.
*
@@ -132,7 +137,7 @@
HierarchicalProperty prop = new HierarchicalProperty(propName);
try
{
- if (propName.equals(PropertyConstants.IS_READ_ONLY))
+ if (propName.equals(PropertyConstants.IS_READ_ONLY) && session != null)
{
if (isReadOnly())
{
13 years, 9 months
exo-jcr SVN: r3048 - in jcr/branches/1.12.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav: command/dasl and 3 other directories.
by do-not-reply@jboss.org
Author: dkatayev
Date: 2010-09-02 10:07:53 -0400 (Thu, 02 Sep 2010)
New Revision: 3048
Modified:
jcr/branches/1.12.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/PropFindCommand.java
jcr/branches/1.12.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/dasl/SearchResultResponseEntity.java
jcr/branches/1.12.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/deltav/report/VersionTreeResponseEntity.java
jcr/branches/1.12.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/propfind/PropFindResponseEntity.java
jcr/branches/1.12.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/xml/PropstatGroupedRepresentation.java
Log:
EXOJCR-935 constructor with no session added for backward compatibility
Modified: jcr/branches/1.12.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/PropFindCommand.java
===================================================================
--- jcr/branches/1.12.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/PropFindCommand.java 2010-09-02 11:19:11 UTC (rev 3047)
+++ jcr/branches/1.12.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/PropFindCommand.java 2010-09-02 14:07:53 UTC (rev 3048)
@@ -142,11 +142,11 @@
if (request.getType().equalsIgnoreCase("allprop"))
{
- response = new PropFindResponseEntity(depth, resource, null, false, session);
+ response = new PropFindResponseEntity(depth, resource, null, false);
}
else if (request.getType().equalsIgnoreCase("propname"))
{
- response = new PropFindResponseEntity(depth, resource, null, true, session);
+ response = new PropFindResponseEntity(depth, resource, null, true);
}
else if (request.getType().equalsIgnoreCase("prop"))
{
Modified: jcr/branches/1.12.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/dasl/SearchResultResponseEntity.java
===================================================================
--- jcr/branches/1.12.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/dasl/SearchResultResponseEntity.java 2010-09-02 11:19:11 UTC (rev 3047)
+++ jcr/branches/1.12.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/dasl/SearchResultResponseEntity.java 2010-09-02 14:07:53 UTC (rev 3048)
@@ -176,7 +176,7 @@
xmlStreamWriter.writeCharacters(URLDecoder.decode(resource.getIdentifier().toASCIIString(), "UTF-8"));
xmlStreamWriter.writeEndElement();
- PropstatGroupedRepresentation propstat = new PropstatGroupedRepresentation(resource, properties, false, null);
+ PropstatGroupedRepresentation propstat = new PropstatGroupedRepresentation(resource, properties, false);
PropertyWriteUtil.writePropStats(xmlStreamWriter, propstat.getPropStats());
Modified: jcr/branches/1.12.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/deltav/report/VersionTreeResponseEntity.java
===================================================================
--- jcr/branches/1.12.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/deltav/report/VersionTreeResponseEntity.java 2010-09-02 11:19:11 UTC (rev 3047)
+++ jcr/branches/1.12.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/deltav/report/VersionTreeResponseEntity.java 2010-09-02 14:07:53 UTC (rev 3048)
@@ -120,7 +120,7 @@
xmlStreamWriter.writeEndElement();
PropstatGroupedRepresentation propstat =
- new PropstatGroupedRepresentation(versionResource, properties, false, null);
+ new PropstatGroupedRepresentation(versionResource, properties, false);
PropertyWriteUtil.writePropStats(xmlStreamWriter, propstat.getPropStats());
xmlStreamWriter.writeEndElement();
Modified: jcr/branches/1.12.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/propfind/PropFindResponseEntity.java
===================================================================
--- jcr/branches/1.12.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/propfind/PropFindResponseEntity.java 2010-09-02 11:19:11 UTC (rev 3047)
+++ jcr/branches/1.12.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/propfind/PropFindResponseEntity.java 2010-09-02 14:07:53 UTC (rev 3048)
@@ -116,6 +116,11 @@
this.session = session;
}
+ public PropFindResponseEntity(int depth, Resource rootResource, Set<QName> propertyNames, boolean propertyNamesOnly)
+ {
+ this(depth, rootResource, propertyNames, propertyNamesOnly, null);
+ }
+
/**
* {@inheritDoc}
*/
Modified: jcr/branches/1.12.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/xml/PropstatGroupedRepresentation.java
===================================================================
--- jcr/branches/1.12.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/xml/PropstatGroupedRepresentation.java 2010-09-02 11:19:11 UTC (rev 3047)
+++ jcr/branches/1.12.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/xml/PropstatGroupedRepresentation.java 2010-09-02 14:07:53 UTC (rev 3048)
@@ -111,6 +111,11 @@
}
}
+ public PropstatGroupedRepresentation(Resource resource, Set<QName> propNames, boolean namesOnly) throws RepositoryException
+ {
+ this(resource, propNames, namesOnly, null);
+ }
+
/**
* Returns properties statuses.
*
@@ -132,7 +137,7 @@
HierarchicalProperty prop = new HierarchicalProperty(propName);
try
{
- if (propName.equals(PropertyConstants.IS_READ_ONLY))
+ if (propName.equals(PropertyConstants.IS_READ_ONLY) && session != null)
{
if (isReadOnly())
{
13 years, 9 months
exo-jcr SVN: r3047 - jcr/branches/1.14-ISPN/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/cacheable.
by do-not-reply@jboss.org
Author: tolusha
Date: 2010-09-02 07:19:11 -0400 (Thu, 02 Sep 2010)
New Revision: 3047
Added:
jcr/branches/1.14-ISPN/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/cacheable/AbstractCacheableLockManager.java
jcr/branches/1.14-ISPN/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/cacheable/CacheLockImpl.java
jcr/branches/1.14-ISPN/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/cacheable/CacheableLockManager.java
jcr/branches/1.14-ISPN/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/cacheable/CacheableSessionLockManager.java
jcr/branches/1.14-ISPN/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/cacheable/LockData.java
Log:
EXOJCR-831: move classes to dedicated packages
Added: jcr/branches/1.14-ISPN/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/cacheable/AbstractCacheableLockManager.java
===================================================================
--- jcr/branches/1.14-ISPN/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/cacheable/AbstractCacheableLockManager.java (rev 0)
+++ jcr/branches/1.14-ISPN/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/cacheable/AbstractCacheableLockManager.java 2010-09-02 11:19:11 UTC (rev 3047)
@@ -0,0 +1,774 @@
+/*
+ * Copyright (C) 2003-2010 eXo Platform SAS.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Affero General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, see<http://www.gnu.org/licenses/>.
+ */
+package org.exoplatform.services.jcr.impl.core.lock.cacheable;
+
+import org.exoplatform.management.annotations.Managed;
+import org.exoplatform.management.annotations.ManagedDescription;
+import org.exoplatform.services.jcr.config.RepositoryConfigurationException;
+import org.exoplatform.services.jcr.config.WorkspaceEntry;
+import org.exoplatform.services.jcr.dataflow.ChangesLogIterator;
+import org.exoplatform.services.jcr.dataflow.CompositeChangesLog;
+import org.exoplatform.services.jcr.dataflow.DataManager;
+import org.exoplatform.services.jcr.dataflow.ItemState;
+import org.exoplatform.services.jcr.dataflow.ItemStateChangesLog;
+import org.exoplatform.services.jcr.dataflow.PlainChangesLog;
+import org.exoplatform.services.jcr.dataflow.PlainChangesLogImpl;
+import org.exoplatform.services.jcr.dataflow.TransactionChangesLog;
+import org.exoplatform.services.jcr.dataflow.persistent.ItemsPersistenceListener;
+import org.exoplatform.services.jcr.datamodel.ItemData;
+import org.exoplatform.services.jcr.datamodel.NodeData;
+import org.exoplatform.services.jcr.datamodel.PropertyData;
+import org.exoplatform.services.jcr.datamodel.QPathEntry;
+import org.exoplatform.services.jcr.impl.Constants;
+import org.exoplatform.services.jcr.impl.core.SessionDataManager;
+import org.exoplatform.services.jcr.impl.core.lock.LockRemover;
+import org.exoplatform.services.jcr.impl.core.lock.SessionLockManager;
+import org.exoplatform.services.jcr.impl.dataflow.TransientItemData;
+import org.exoplatform.services.jcr.impl.dataflow.TransientPropertyData;
+import org.exoplatform.services.jcr.impl.dataflow.persistent.WorkspacePersistentDataManager;
+import org.exoplatform.services.jcr.impl.storage.JCRInvalidItemStateException;
+import org.exoplatform.services.jcr.observation.ExtendedEvent;
+import org.exoplatform.services.log.ExoLogger;
+import org.exoplatform.services.log.Log;
+import org.exoplatform.services.security.IdentityConstants;
+import org.picocontainer.Startable;
+
+import java.math.BigInteger;
+import java.security.MessageDigest;
+import java.security.NoSuchAlgorithmException;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+
+import javax.jcr.RepositoryException;
+import javax.jcr.lock.LockException;
+import javax.transaction.Transaction;
+import javax.transaction.TransactionManager;
+
+/**
+ * Created by The eXo Platform SAS.
+ *
+ * <br/>Date:
+ *
+ * @author <a href="karpenko.sergiy(a)gmail.com">Karpenko Sergiy</a>
+ * @version $Id: AbstractCacheableLockManagerImpl.java 2806 2010-07-21 08:00:15Z tolusha $
+ */
+public abstract class AbstractCacheableLockManager implements CacheableLockManager, ItemsPersistenceListener, Startable
+{
+ /**
+ * The name to property time out.
+ */
+ public static final String TIME_OUT = "time-out";
+
+ /**
+ * Default lock time out. 30min
+ */
+ public static final long DEFAULT_LOCK_TIMEOUT = 1000 * 60 * 30;
+
+ /**
+ * Data manager.
+ */
+ protected final DataManager dataManager;
+
+ /**
+ * Run time lock time out.
+ */
+ protected long lockTimeOut;
+
+ /**
+ * Lock remover thread.
+ */
+ protected LockRemover lockRemover;
+
+ /**
+ * SessionLockManagers that uses this LockManager.
+ */
+ protected Map<String, CacheableSessionLockManager> sessionLockManagers;
+
+ /**
+ * The current Transaction Manager
+ */
+ protected TransactionManager tm;
+
+ /**
+ * Logger
+ */
+ private final Log LOG = ExoLogger.getLogger("exo.jcr.component.core.AbstractCacheableLockManager");
+
+ protected LockActionNonTxAware<Integer, Object> getNumLocks;
+
+ protected LockActionNonTxAware<Boolean, Object> hasLocks;
+
+ protected LockActionNonTxAware<Boolean, String> isLockLive;
+
+ protected LockActionNonTxAware<Object, LockData> refresh;
+
+ protected LockActionNonTxAware<Boolean, String> lockExist;
+
+ protected LockActionNonTxAware<LockData, String> getLockDataById;
+
+ protected LockActionNonTxAware<List<LockData>, Object> getLockList;
+
+ /**
+ * Constructor.
+ *
+ * @param dataManager - workspace persistent data manager
+ * @param config - workspace entry
+ * @param transactionManager
+ * the transaction manager
+ * @throws RepositoryConfigurationException
+ */
+ public AbstractCacheableLockManager(WorkspacePersistentDataManager dataManager, WorkspaceEntry config,
+ TransactionManager transactionManager) throws RepositoryConfigurationException
+ {
+ if (config.getLockManager() != null)
+ {
+ if (config.getLockManager().getParameters() != null
+ && config.getLockManager().getParameterValue(TIME_OUT, null) != null)
+ {
+ long timeOut = config.getLockManager().getParameterTime(TIME_OUT);
+ lockTimeOut = timeOut > 0 ? timeOut : DEFAULT_LOCK_TIMEOUT;
+ }
+ else
+ {
+ lockTimeOut =
+ config.getLockManager().getTimeout() > 0 ? config.getLockManager().getTimeout() : DEFAULT_LOCK_TIMEOUT;
+ }
+ }
+ else
+ {
+ lockTimeOut = DEFAULT_LOCK_TIMEOUT;
+ }
+
+ this.dataManager = dataManager;
+ this.sessionLockManagers = new ConcurrentHashMap<String, CacheableSessionLockManager>();
+ this.tm = transactionManager;
+
+ dataManager.addItemPersistenceListener(this);
+ }
+
+ @Managed
+ @ManagedDescription("Remove the expired locks")
+ public void cleanExpiredLocks()
+ {
+ removeExpired();
+ }
+
+ public long getDefaultLockTimeOut()
+ {
+ return lockTimeOut;
+ }
+
+ @Managed
+ @ManagedDescription("The number of active locks")
+ public int getNumLocks()
+ {
+ try
+ {
+ return executeLockActionNonTxAware(getNumLocks, null);
+ }
+ catch (LockException e)
+ {
+ // ignore me will never occur
+ }
+ return -1;
+ }
+
+ /**
+ * Indicates if some locks have already been created
+ */
+ protected boolean hasLocks()
+ {
+ try
+ {
+ return executeLockActionNonTxAware(hasLocks, null);
+ }
+ catch (LockException e)
+ {
+ // ignore me will never occur
+ }
+ return true;
+ }
+
+ /**
+ * Return new instance of session lock manager.
+ */
+ public SessionLockManager getSessionLockManager(String sessionId, SessionDataManager transientManager)
+ {
+ CacheableSessionLockManager sessionManager = new CacheableSessionLockManager(sessionId, this, transientManager);
+ sessionLockManagers.put(sessionId, sessionManager);
+ return sessionManager;
+ }
+
+ /**
+ * Check is LockManager contains lock. No matter it is in pending or persistent state.
+ *
+ * @param nodeId - locked node id
+ * @return
+ */
+ public boolean isLockLive(String nodeId) throws LockException
+ {
+ try
+ {
+ return executeLockActionNonTxAware(isLockLive, nodeId);
+ }
+ catch (LockException e)
+ {
+ // ignore me will never occur
+ }
+ return false;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean isTXAware()
+ {
+ return true;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void onSaveItems(ItemStateChangesLog changesLog)
+ {
+ List<PlainChangesLog> chengesLogList = new ArrayList<PlainChangesLog>();
+ if (changesLog instanceof TransactionChangesLog)
+ {
+ ChangesLogIterator logIterator = ((TransactionChangesLog)changesLog).getLogIterator();
+
+ while (logIterator.hasNextLog())
+ {
+ chengesLogList.add(logIterator.nextLog());
+ }
+ }
+ else if (changesLog instanceof PlainChangesLog)
+ {
+ chengesLogList.add((PlainChangesLog)changesLog);
+ }
+ else if (changesLog instanceof CompositeChangesLog)
+ {
+ for (ChangesLogIterator iter = ((CompositeChangesLog)changesLog).getLogIterator(); iter.hasNextLog();)
+ {
+ chengesLogList.add(iter.nextLog());
+ }
+ }
+
+ List<LockOperationContainer> containers = new ArrayList<LockOperationContainer>();
+
+ for (PlainChangesLog currChangesLog : chengesLogList)
+ {
+ String sessionId = currChangesLog.getSessionId();
+
+ String nodeIdentifier;
+ try
+ {
+ switch (currChangesLog.getEventType())
+ {
+ case ExtendedEvent.LOCK :
+ if (currChangesLog.getSize() < 2)
+ {
+ LOG.error("Incorrect changes log of type ExtendedEvent.LOCK size=" + currChangesLog.getSize()
+ + "<2 \n" + currChangesLog.dump());
+ break;
+ }
+ nodeIdentifier = currChangesLog.getAllStates().get(0).getData().getParentIdentifier();
+
+ CacheableSessionLockManager session = sessionLockManagers.get(sessionId);
+ if (session != null && session.containsPendingLock(nodeIdentifier))
+ {
+ containers.add(new LockOperationContainer(nodeIdentifier, currChangesLog.getSessionId(),
+ ExtendedEvent.LOCK));
+ }
+ else
+ {
+ LOG.error("Lock must exist in pending locks.");
+ }
+ break;
+ case ExtendedEvent.UNLOCK :
+ if (currChangesLog.getSize() < 2)
+ {
+ LOG.error("Incorrect changes log of type ExtendedEvent.UNLOCK size=" + currChangesLog.getSize()
+ + "<2 \n" + currChangesLog.dump());
+ break;
+ }
+
+ containers.add(new LockOperationContainer(currChangesLog.getAllStates().get(0).getData()
+ .getParentIdentifier(), currChangesLog.getSessionId(), ExtendedEvent.UNLOCK));
+ break;
+ default :
+ HashSet<String> removedLock = new HashSet<String>();
+ for (ItemState itemState : currChangesLog.getAllStates())
+ {
+ // this is a node and node is locked
+ if (itemState.getData().isNode() && lockExist(itemState.getData().getIdentifier()))
+ {
+ nodeIdentifier = itemState.getData().getIdentifier();
+ if (itemState.isDeleted())
+ {
+ removedLock.add(nodeIdentifier);
+ }
+ else if (itemState.isAdded() || itemState.isRenamed() || itemState.isUpdated())
+ {
+ removedLock.remove(nodeIdentifier);
+ }
+ }
+ }
+ for (String identifier : removedLock)
+ {
+ containers.add(new LockOperationContainer(identifier, currChangesLog.getSessionId(),
+ ExtendedEvent.UNLOCK));
+ }
+ break;
+ }
+ }
+ catch (IllegalStateException e)
+ {
+ LOG.error(e.getLocalizedMessage(), e);
+ }
+ }
+
+ // sort locking and unlocking operations to avoid deadlocks
+ Collections.sort(containers);
+ for (LockOperationContainer container : containers)
+ {
+ try
+ {
+ container.apply();
+ }
+ catch (LockException e)
+ {
+ LOG.error(e.getMessage(), e);
+ }
+ }
+ }
+
+ /**
+ * Class containing operation type (LOCK or UNLOCK) and all the needed information like node uuid and session id.
+ */
+ private class LockOperationContainer implements Comparable<LockOperationContainer>
+ {
+
+ private String identifier;
+
+ private String sessionId;
+
+ private int type;
+
+ /**
+ * @param identifier node identifier
+ * @param sessionId id of session
+ * @param type ExtendedEvent type specifying the operation (LOCK or UNLOCK)
+ */
+ public LockOperationContainer(String identifier, String sessionId, int type)
+ {
+ super();
+ this.identifier = identifier;
+ this.sessionId = sessionId;
+ this.type = type;
+ }
+
+ /**
+ * @return node identifier
+ */
+ public String getIdentifier()
+ {
+ return identifier;
+ }
+
+ public void apply() throws LockException
+ {
+ // invoke internalLock in LOCK operation
+ if (type == ExtendedEvent.LOCK)
+ {
+ internalLock(sessionId, identifier);
+ }
+ // invoke internalUnLock in UNLOCK operation
+ else if (type == ExtendedEvent.UNLOCK)
+ {
+ internalUnLock(sessionId, identifier);
+ }
+ }
+
+ /**
+ * @see java.lang.Comparable#compareTo(java.lang.Object)
+ */
+ public int compareTo(LockOperationContainer o)
+ {
+ return identifier.compareTo(o.getIdentifier());
+ }
+ }
+
+ /**
+ * Refreshed lock data in cache
+ *
+ * @param newLockData
+ */
+ public void refreshLockData(LockData newLockData) throws LockException
+ {
+ executeLockActionNonTxAware(refresh, newLockData);
+ }
+
+ /**
+ * Remove expired locks. Used from LockRemover.
+ */
+ public synchronized void removeExpired()
+ {
+ final List<String> removeLockList = new ArrayList<String>();
+
+ for (LockData lock : getLockList())
+ {
+ if (!lock.isSessionScoped() && lock.getTimeToDeath() < 0)
+ {
+ removeLockList.add(lock.getNodeIdentifier());
+ }
+ }
+
+ Collections.sort(removeLockList);
+
+ for (String rLock : removeLockList)
+ {
+ removeLock(rLock);
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void start()
+ {
+ lockRemover = new LockRemover(this);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void stop()
+ {
+ lockRemover.halt();
+ lockRemover.interrupt();
+ sessionLockManagers.clear();
+ }
+
+ /**
+ * Copy <code>PropertyData prop<code> to new TransientItemData
+ *
+ * @param prop
+ * @return
+ * @throws RepositoryException
+ */
+ protected TransientItemData copyItemData(PropertyData prop) throws RepositoryException
+ {
+ if (prop == null)
+ {
+ return null;
+ }
+
+ // make a copy, value may be null for deleting items
+ TransientPropertyData newData =
+ new TransientPropertyData(prop.getQPath(), prop.getIdentifier(), prop.getPersistedVersion(), prop.getType(),
+ prop.getParentIdentifier(), prop.isMultiValued(), prop.getValues());
+
+ return newData;
+ }
+
+ /**
+ * Internal lock
+ *
+ * @param nodeIdentifier
+ * @throws LockException
+ */
+ protected abstract void internalLock(String sessionId, String nodeIdentifier) throws LockException;
+
+ /**
+ * Internal unlock.
+ *
+ * @param sessionId
+ * @param nodeIdentifier
+ * @throws LockException
+ */
+ protected abstract void internalUnLock(String sessionId, String nodeIdentifier) throws LockException;
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean lockExist(String nodeId)
+ {
+ try
+ {
+ return executeLockActionNonTxAware(lockExist, nodeId);
+ }
+ catch (LockException e)
+ {
+ // ignore me will never occur
+ }
+ return false;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public String getLockTokenHash(String token)
+ {
+ String hash = "";
+ try
+ {
+ MessageDigest m = MessageDigest.getInstance("MD5");
+ m.update(token.getBytes(), 0, token.length());
+ hash = new BigInteger(1, m.digest()).toString(16);
+ }
+ catch (NoSuchAlgorithmException e)
+ {
+ LOG.error("Can't get instanse of MD5 MessageDigest!", e);
+ }
+ return hash;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public LockData getExactNodeOrCloseParentLock(NodeData node) throws RepositoryException
+ {
+ return getExactNodeOrCloseParentLock(node, true);
+ }
+
+ private LockData getExactNodeOrCloseParentLock(NodeData node, boolean checkHasLocks) throws RepositoryException
+ {
+
+ if (node == null || (checkHasLocks && !hasLocks()))
+ {
+ return null;
+ }
+ LockData retval = null;
+ retval = getLockDataById(node.getIdentifier());
+ if (retval == null)
+ {
+ NodeData parentData = (NodeData)dataManager.getItemData(node.getParentIdentifier());
+ if (parentData != null)
+ {
+ retval = getExactNodeOrCloseParentLock(parentData, false);
+ }
+ }
+ return retval;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public LockData getExactNodeLock(NodeData node) throws RepositoryException
+ {
+ if (node == null || !hasLocks())
+ {
+ return null;
+ }
+
+ return getLockDataById(node.getIdentifier());
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public LockData getClosedChild(NodeData node) throws RepositoryException
+ {
+ return getClosedChild(node, true);
+ }
+
+ private LockData getClosedChild(NodeData node, boolean checkHasLocks) throws RepositoryException
+ {
+
+ if (node == null || (checkHasLocks && !hasLocks()))
+ {
+ return null;
+ }
+ LockData retval = null;
+
+ List<NodeData> childData = dataManager.getChildNodesData(node);
+ for (NodeData nodeData : childData)
+ {
+ retval = getLockDataById(nodeData.getIdentifier());
+ if (retval != null)
+ return retval;
+ }
+ // child not found try to find dipper
+ for (NodeData nodeData : childData)
+ {
+ retval = getClosedChild(nodeData, false);
+ if (retval != null)
+ return retval;
+ }
+ return retval;
+ }
+
+ protected LockData getLockDataById(String nodeId)
+ {
+ try
+ {
+ return executeLockActionNonTxAware(getLockDataById, nodeId);
+ }
+ catch (LockException e)
+ {
+ // ignore me will never occur
+ }
+ return null;
+ }
+
+ protected synchronized List<LockData> getLockList()
+ {
+ try
+ {
+ return executeLockActionNonTxAware(getLockList, null);
+ }
+ catch (LockException e)
+ {
+ // ignore me will never occur
+ }
+ return null;
+ }
+
+ /**
+ * Remove lock, used by Lock remover.
+ *
+ * @param nodeIdentifier String
+ */
+ protected void removeLock(String nodeIdentifier)
+ {
+ try
+ {
+ NodeData nData = (NodeData)dataManager.getItemData(nodeIdentifier);
+
+ //TODO EXOJCR-412, should be refactored in future.
+ //Skip removing, because that node was removed in other node of cluster.
+ if (nData == null)
+ {
+ return;
+ }
+
+ PlainChangesLog changesLog =
+ new PlainChangesLogImpl(new ArrayList<ItemState>(), IdentityConstants.SYSTEM, ExtendedEvent.UNLOCK);
+
+ ItemData lockOwner =
+ copyItemData((PropertyData)dataManager.getItemData(nData, new QPathEntry(Constants.JCR_LOCKOWNER, 1)));
+
+ //TODO EXOJCR-412, should be refactored in future.
+ //Skip removing, because that lock was removed in other node of cluster.
+ if (lockOwner == null)
+ {
+ return;
+ }
+
+ changesLog.add(ItemState.createDeletedState(lockOwner));
+
+ ItemData lockIsDeep =
+ copyItemData((PropertyData)dataManager.getItemData(nData, new QPathEntry(Constants.JCR_LOCKISDEEP, 1)));
+
+ //TODO EXOJCR-412, should be refactored in future.
+ //Skip removing, because that lock was removed in other node of cluster.
+ if (lockIsDeep == null)
+ {
+ return;
+ }
+
+ changesLog.add(ItemState.createDeletedState(lockIsDeep));
+
+ // lock probably removed by other thread
+ if (lockOwner == null && lockIsDeep == null)
+ {
+ return;
+ }
+
+ dataManager.save(new TransactionChangesLog(changesLog));
+ }
+ catch (JCRInvalidItemStateException e)
+ {
+ //TODO EXOJCR-412, should be refactored in future.
+ //Skip property not found in DB, because that lock property was removed in other node of cluster.
+ if (LOG.isDebugEnabled())
+ {
+ LOG.debug("The propperty was removed in other node of cluster.", e);
+ }
+
+ }
+ catch (RepositoryException e)
+ {
+ LOG.error("Error occur during removing lock" + e.getLocalizedMessage(), e);
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void closeSessionLockManager(String sessionID)
+ {
+ sessionLockManagers.remove(sessionID);
+ }
+
+ /**
+ * Execute the given action outside a transaction. This is needed since the {@link Cache} used by implementation of {@link CacheableLockManager}
+ * to manage the persistence of its locks thanks to a {@link CacheLoader} and a {@link CacheLoader} lock the cache {@link Node}
+ * even for read operations which cause deadlock issue when a XA {@link Transaction} is already opened
+ * @throws LockException when a exception occurs
+ */
+ private <R, A> R executeLockActionNonTxAware(LockActionNonTxAware<R, A> action, A arg) throws LockException
+ {
+ Transaction tx = null;
+ try
+ {
+ if (tm != null)
+ {
+ try
+ {
+ tx = tm.suspend();
+ }
+ catch (Exception e)
+ {
+ LOG.warn("Cannot suspend the current transaction", e);
+ }
+ }
+ return action.execute(arg);
+ }
+ finally
+ {
+ if (tx != null)
+ {
+ try
+ {
+ tm.resume(tx);
+ }
+ catch (Exception e)
+ {
+ LOG.warn("Cannot resume the current transaction", e);
+ }
+ }
+ }
+ }
+
+ /**
+ * Actions that are not supposed to be called within a transaction
+ *
+ * Created by The eXo Platform SAS
+ * Author : Nicolas Filotto
+ * nicolas.filotto(a)exoplatform.com
+ * 21 janv. 2010
+ */
+ protected static interface LockActionNonTxAware<R, A>
+ {
+ R execute(A arg) throws LockException;
+ }
+}
Added: jcr/branches/1.14-ISPN/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/cacheable/CacheLockImpl.java
===================================================================
--- jcr/branches/1.14-ISPN/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/cacheable/CacheLockImpl.java (rev 0)
+++ jcr/branches/1.14-ISPN/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/cacheable/CacheLockImpl.java 2010-09-02 11:19:11 UTC (rev 3047)
@@ -0,0 +1,157 @@
+/*
+ * Copyright (C) 2003-2010 eXo Platform SAS.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Affero General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, see<http://www.gnu.org/licenses/>.
+ */
+package org.exoplatform.services.jcr.impl.core.lock.cacheable;
+
+import org.exoplatform.services.jcr.impl.core.SessionImpl;
+import org.exoplatform.services.jcr.impl.core.lock.LockImpl;
+
+import javax.jcr.Node;
+import javax.jcr.RepositoryException;
+import javax.jcr.lock.LockException;
+
+/**
+ * Created by The eXo Platform SAS.
+ *
+ * <br/>Date:
+ *
+ * @author <a href="karpenko.sergiy(a)gmail.com">Karpenko Sergiy</a>
+ * @version $Id: CacheLockImpl.java 111 2008-11-11 11:11:11Z serg $
+ */
+public class CacheLockImpl extends LockImpl
+{
+ private boolean live;
+
+ private LockData lockData;
+
+ private SessionImpl session;
+
+ private CacheableSessionLockManager lockManager;
+
+ /**
+ * Constructor.
+ *
+ * @param session - session owner
+ * @param lockData - LockData
+ * @param lockManager - CacheableLockManager
+ */
+ public CacheLockImpl(SessionImpl session, LockData lockData, CacheableSessionLockManager lockManager)
+ {
+ this.lockData = lockData;
+ this.session = session;
+ this.lockManager = lockManager;
+ this.live = true;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public String getLockOwner()
+ {
+ return lockData.getOwner();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public String getLockToken()
+ {
+ return lockManager.getLockToken(lockData.getTokenHash());
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean isLive() throws LockException
+ {
+ if (!live)
+ {
+ // it is already not alive
+ return false;
+ }
+ live = lockManager.isLockLive(lockData.getNodeIdentifier());
+ return live;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void refresh() throws LockException, RepositoryException
+ {
+ if (!isLive())
+ throw new LockException("Lock is not live");
+
+ LockData newLockData =
+ new LockData(lockData.getNodeIdentifier(), lockData.getTokenHash(), lockData.isDeep(), lockData
+ .isSessionScoped(), lockData.getOwner(), lockData.getTimeOut());
+
+ lockManager.refresh(newLockData);
+ lockData = newLockData;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Node getNode()
+ {
+ try
+ {
+ return (Node)session.getTransientNodesManager().getItemByIdentifier(lockData.getNodeIdentifier(), true);
+ }
+ catch (RepositoryException e)
+ {
+ //TODO
+ e.printStackTrace();
+ }
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean isDeep()
+ {
+
+ return lockData.isDeep();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean isSessionScoped()
+ {
+ return lockData.isSessionScoped();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public long getTimeToDeath()
+ {
+ return lockData.getTimeToDeath();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ protected void setTimeOut(long timeOut) throws LockException
+ {
+ lockData.setTimeOut(timeOut);
+
+ //reset lock data
+ lockManager.refresh(lockData);
+ }
+}
Added: jcr/branches/1.14-ISPN/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/cacheable/CacheableLockManager.java
===================================================================
--- jcr/branches/1.14-ISPN/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/cacheable/CacheableLockManager.java (rev 0)
+++ jcr/branches/1.14-ISPN/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/cacheable/CacheableLockManager.java 2010-09-02 11:19:11 UTC (rev 3047)
@@ -0,0 +1,88 @@
+/*
+ * Copyright (C) 2003-2010 eXo Platform SAS.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Affero General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, see<http://www.gnu.org/licenses/>.
+ */
+package org.exoplatform.services.jcr.impl.core.lock.cacheable;
+
+import org.exoplatform.services.jcr.datamodel.NodeData;
+import org.exoplatform.services.jcr.impl.core.lock.WorkspaceLockManager;
+
+import javax.jcr.RepositoryException;
+import javax.jcr.lock.LockException;
+
+/**
+ * Created by The eXo Platform SAS.
+ *
+ * <br/>Date:
+ *
+ * @author <a href="karpenko.sergiy(a)gmail.com">Karpenko Sergiy</a>
+ * @version $Id: CacheableLockManager.java 111 2008-11-11 11:11:11Z serg $
+ */
+public interface CacheableLockManager extends WorkspaceLockManager
+{
+ /**
+ * Is lock live for node by nodeIdentifier.
+ *
+ * @param nodeIdentifier
+ *
+ * @return boolean
+ * @throws LockException
+ */
+ boolean isLockLive(String nodeIdentifier) throws LockException;
+
+ /**
+ * Replace old lockData with new one. Node ID, token can't be replaced.
+ *
+ * @param newLockData
+ * @throws LockException
+ */
+ void refreshLockData(LockData newLockData) throws LockException;
+
+ /**
+ * Get default lock timeout.
+ *
+ * @return long value of timeout
+ */
+ long getDefaultLockTimeOut();
+
+ /**
+ * Return hash for lock token.
+ *
+ * @param lockToken - lock token string
+ * @return - hash string
+ */
+ String getLockTokenHash(String lockToken);
+
+ /**
+ * Return Lock holding node or its parent.
+ *
+ * @param node - NodeData
+ * @return LockData for node or null;
+ * @throws RepositoryException
+ */
+ LockData getExactNodeOrCloseParentLock(NodeData node) throws RepositoryException;
+
+ /**
+ * Return Lock holding any nodes child.
+ *
+ * @param node - NodeData
+ * @return LockData for node or null;
+ * @throws RepositoryException
+ */
+ LockData getClosedChild(NodeData node) throws RepositoryException;
+
+ boolean lockExist(String nodeId) throws RepositoryException;
+
+}
Added: jcr/branches/1.14-ISPN/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/cacheable/CacheableSessionLockManager.java
===================================================================
--- jcr/branches/1.14-ISPN/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/cacheable/CacheableSessionLockManager.java (rev 0)
+++ jcr/branches/1.14-ISPN/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/cacheable/CacheableSessionLockManager.java 2010-09-02 11:19:11 UTC (rev 3047)
@@ -0,0 +1,403 @@
+/*
+ * Copyright (C) 2003-2010 eXo Platform SAS.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Affero General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, see<http://www.gnu.org/licenses/>.
+ */
+package org.exoplatform.services.jcr.impl.core.lock.cacheable;
+
+import org.exoplatform.services.jcr.core.ExtendedSession;
+import org.exoplatform.services.jcr.datamodel.NodeData;
+import org.exoplatform.services.jcr.impl.core.NodeImpl;
+import org.exoplatform.services.jcr.impl.core.SessionDataManager;
+import org.exoplatform.services.jcr.impl.core.SessionImpl;
+import org.exoplatform.services.jcr.impl.core.lock.AbstractSessionLockManager;
+import org.exoplatform.services.jcr.impl.core.lock.LockImpl;
+import org.exoplatform.services.jcr.util.IdGenerator;
+import org.exoplatform.services.log.ExoLogger;
+import org.exoplatform.services.log.Log;
+
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+
+import javax.jcr.AccessDeniedException;
+import javax.jcr.RepositoryException;
+import javax.jcr.UnsupportedRepositoryOperationException;
+import javax.jcr.lock.Lock;
+import javax.jcr.lock.LockException;
+
+/**
+ * Created by The eXo Platform SAS.
+ *
+ * <br/>Date:
+ *
+ * @author <a href="karpenko.sergiy(a)gmail.com">Karpenko Sergiy</a>
+ * @version $Id: CacheableSessionLockManager.java 2137 2010-03-25 15:31:56Z sergiykarpenko $
+ */
+public class CacheableSessionLockManager extends AbstractSessionLockManager
+{
+ /**
+ * Logger
+ */
+ private final Log log = ExoLogger.getLogger("exo.jcr.component.core.CacheableSessionLockManager");
+
+ /**
+ * Session identifier.
+ */
+ private final String sessionID;
+
+ /**
+ * Lock tokens held by this session.
+ * [token name, tokens hash]
+ */
+ private final Map<String, String> tokens;
+
+ /**
+ * Map of nodes locked in this session. Need to remove session scoped lock on session close.
+ * [node identifier, lock data]
+ */
+ private final Map<String, LockData> lockedNodes;
+
+ /**
+ * Set of pending locked nodes identifiers.
+ */
+ private final Set<String> pendingLocks;
+
+ /**
+ * Workspace lock manager
+ */
+ private final CacheableLockManager lockManager;
+
+ /**
+ * Constructor.
+ *
+ * @param sessionID - session identifier
+ * @param lockManager - workspace lock manager
+ */
+ public CacheableSessionLockManager(String sessionID, CacheableLockManager lockManager,
+ SessionDataManager transientManager)
+ {
+ super(transientManager);
+ this.sessionID = sessionID;
+ this.tokens = new HashMap<String, String>();
+ this.lockedNodes = new HashMap<String, LockData>();
+ this.pendingLocks = new HashSet<String>();
+ this.lockManager = lockManager;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Lock addLock(NodeImpl node, boolean isDeep, boolean isSessionScoped, long timeOut) throws LockException,
+ RepositoryException
+ {
+
+ String lockToken = IdGenerator.generate();
+
+ NodeData data = (NodeData)node.getData();
+
+ LockData lData = lockManager.getExactNodeOrCloseParentLock(data);
+ if (lData != null)
+ {
+ if (lData.getNodeIdentifier().equals(node.getIdentifier()))
+ {
+ throw new LockException("Node already locked: " + data.getQPath());
+ }
+ else if (lData.isDeep())
+ {
+ throw new LockException("Parent node has deep lock.");
+ }
+ }
+
+ if (isDeep && lockManager.getClosedChild(data) != null)
+ {
+ throw new LockException("Some child node is locked.");
+ }
+
+ String lockTokenHash = lockManager.getLockTokenHash(lockToken);
+
+ lData =
+ new LockData(node.getIdentifier(), lockTokenHash, isDeep, isSessionScoped, node.getSession().getUserID(),
+ timeOut > 0 ? timeOut : lockManager.getDefaultLockTimeOut());
+
+ lockedNodes.put(node.getInternalIdentifier(), lData);
+ pendingLocks.add(node.getInternalIdentifier());
+ tokens.put(lockToken, lData.getTokenHash());
+
+ LockImpl lock = new CacheLockImpl(node.getSession(), lData, this);
+
+ return lock;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void addLockToken(String lt)
+ {
+ tokens.put(lt, lockManager.getLockTokenHash(lt));
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public LockImpl getLock(NodeImpl node) throws LockException, RepositoryException
+ {
+ LockData lData = lockManager.getExactNodeOrCloseParentLock((NodeData)node.getData());
+
+ if (lData == null || (!node.getInternalIdentifier().equals(lData.getNodeIdentifier()) && !lData.isDeep()))
+ {
+ throw new LockException("Node not locked: " + node.getData().getQPath());
+ }
+ return new CacheLockImpl(node.getSession(), lData, this);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public String[] getLockTokens()
+ {
+ String[] arr = new String[tokens.size()];
+ tokens.keySet().toArray(arr);
+ return arr;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean holdsLock(NodeData node) throws RepositoryException
+ {
+ return lockManager.lockExist(node.getIdentifier());//.getExactNodeLock(node) != null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ protected boolean isLockedPersisted(NodeData node) throws LockException
+ {
+ LockData lData = null;
+ try
+ {
+ lData = lockManager.getExactNodeOrCloseParentLock(node);
+ }
+ catch (RepositoryException e)
+ {
+ throw new LockException(e.getMessage(), e);
+ }
+
+ if (lData == null || (!node.getIdentifier().equals(lData.getNodeIdentifier()) && !lData.isDeep()))
+ {
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ protected boolean isPersistedLockHolder(NodeData node) throws RepositoryException
+ {
+ LockData lData = lockManager.getExactNodeOrCloseParentLock(node);
+ return lData != null && isLockHolder(lData);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void onCloseSession(ExtendedSession session)
+ {
+ SessionImpl sessionImpl = (SessionImpl)session;
+
+ String[] nodeIds = new String[lockedNodes.size()];
+ lockedNodes.keySet().toArray(nodeIds);
+
+ for (String nodeId : nodeIds)
+ {
+ LockData lock = lockedNodes.remove(nodeId);
+
+ if (lock.isSessionScoped() && !pendingLocks.contains(nodeId))
+ {
+ try
+ {
+ NodeImpl node =
+ ((NodeImpl)sessionImpl.getTransientNodesManager()
+ .getItemByIdentifier(lock.getNodeIdentifier(), false));
+
+ if (node != null)
+ {
+ node.unlock();
+ }
+
+ }
+ catch (UnsupportedRepositoryOperationException e)
+ {
+ log.error(e.getLocalizedMessage());
+ }
+ catch (LockException e)
+ {
+ log.error(e.getLocalizedMessage());
+ }
+ catch (AccessDeniedException e)
+ {
+ log.error(e.getLocalizedMessage());
+ }
+ catch (RepositoryException e)
+ {
+ log.error(e.getLocalizedMessage());
+ }
+ }
+ }
+
+ pendingLocks.clear();
+ tokens.clear();
+ lockedNodes.clear();
+
+ lockManager.closeSessionLockManager(sessionID);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void removeLockToken(String lt)
+ {
+ tokens.remove(lt);
+ }
+
+ /**
+ * Checks if session has token to this lock data or session is System.
+ *
+ * @param lockData
+ * @return
+ */
+ private boolean isLockHolder(LockData lockData)
+ {
+ return tokens.containsValue(lockData.getTokenHash());
+ }
+
+ /**
+ * Is session contains pending lock for node by nodeId.
+ * @param nodeId - node ID string
+ * @return boolean
+ */
+ public boolean containsPendingLock(String nodeId)
+ {
+ return pendingLocks.contains(nodeId);
+ }
+
+ /**
+ * Returns real token, if session has it.
+ *
+ * @param tokenHash - token hash string
+ * @return lock token string
+ */
+ protected String getLockToken(String tokenHash)
+ {
+ for (String token : tokens.keySet())
+ {
+ if (tokens.get(token).equals(tokenHash))
+ {
+ return token;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Return pending lock.
+ *
+ * @param nodeId - ID of locked node
+ * @return pending lock or null
+ */
+ public LockData getPendingLock(String nodeId)
+ {
+ if (pendingLocks.contains(nodeId))
+ {
+ return lockedNodes.get(nodeId);
+ }
+ else
+ {
+ return null;
+ }
+ }
+
+ /**
+ * Check is lock alive. That means lock must exist in LockManager storage (cache or map, etc).
+ *
+ * @param nodeIdentifier - locked node id
+ * @return
+ */
+ protected boolean isLockLive(String nodeIdentifier) throws LockException
+ {
+
+ if (lockManager.isLockLive(nodeIdentifier))
+ {
+ return true;
+ }
+ else
+ {
+ return pendingLocks.contains(nodeIdentifier);
+ }
+ }
+
+ public void notifyLockPersisted(String nodeIdentifier)
+ {
+ pendingLocks.remove(nodeIdentifier);
+ }
+
+ /**
+ * Notify SessionLockManager that node is unlocked.
+ *
+ * @param nodeIdentifier - unlocked node identifier
+ */
+ public void notifyLockRemoved(String nodeIdentifier)
+ {
+ lockedNodes.remove(nodeIdentifier);
+ }
+
+ /**
+ * Refresh lockData.
+ *
+ * @param newLockData
+ * @throws LockException
+ */
+ protected void refresh(LockData newLockData) throws LockException
+ {
+ lockManager.refreshLockData(newLockData);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ protected boolean checkPersistedLocks(NodeData node) throws LockException
+ {
+ LockData lData = null;
+ try
+ {
+ lData = lockManager.getExactNodeOrCloseParentLock(node);
+ }
+ catch (RepositoryException e)
+ {
+ throw new LockException(e.getMessage(), e);
+ }
+
+ if (lData == null || (!node.getIdentifier().equals(lData.getNodeIdentifier()) && !lData.isDeep()))
+ {
+ return true;
+ }
+
+ // lock exist, so lets check is current session is LockHolder
+ return isLockHolder(lData);
+ }
+
+}
Added: jcr/branches/1.14-ISPN/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/cacheable/LockData.java
===================================================================
--- jcr/branches/1.14-ISPN/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/cacheable/LockData.java (rev 0)
+++ jcr/branches/1.14-ISPN/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/cacheable/LockData.java 2010-09-02 11:19:11 UTC (rev 3047)
@@ -0,0 +1,264 @@
+/*
+ * Copyright (C) 2009 eXo Platform SAS.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.exoplatform.services.jcr.impl.core.lock.cacheable;
+
+import org.exoplatform.services.jcr.impl.Constants;
+
+import java.io.Externalizable;
+import java.io.IOException;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
+
+/**
+ * Created by The eXo Platform SAS.
+ *
+ * @author <a href="mailto:gennady.azarenkov@exoplatform.com">Gennady Azarenkov</a>
+ * @version $Id: LockData.java 787 2009-11-20 11:36:15Z nzamosenchuk $
+ */
+
+public class LockData implements Externalizable
+{
+ /**
+ * The time of birth. From this time we start count the time of death. death = birthday+TIME_OUT;
+ */
+ private long birthday;
+
+ /**
+ * If isDeep is true then the lock applies to this node and all its descendant nodes; if false,
+ * the lock applies only to this, the holding node.
+ */
+ private boolean deep;
+
+ /**
+ * A lock token is a string that uniquely identifies a particular lock and acts as a “key”
+ * allowing a user to alter a locked node. LockData stores only token hash.
+ */
+ private String tokenHash;
+
+ /**
+ * Identifier of locked node.
+ */
+ private String nodeIdentifier;
+
+ /**
+ * The owner of the locked node.
+ */
+ private String owner;
+
+ /**
+ * If isSessionScoped is true then this lock will expire upon the expiration of the current
+ * session (either through an automatic or explicit Session.logout); if false, this lock does not
+ * expire until explicitly unlocked or automatically unlocked due to a implementation-specific
+ * limitation, such as a timeout.
+ */
+ private boolean sessionScoped;
+
+ /**
+ * <B>8.4.9 Timing Out</B> An implementation may unlock any lock at any time due to
+ * implementation-specific criteria, such as time limits on locks.
+ */
+ private long timeOut;
+
+ // Need for Externalizable
+ public LockData()
+ {
+ this.sessionScoped = false;
+ this.deep = false;
+ }
+
+ /**
+ * @param nodeIdentifier
+ * @param lockToken
+ * @param deep
+ * @param sessionScoped
+ * @param owner
+ * @param timeOut
+ * is seconds!
+ */
+ public LockData(String nodeIdentifier, String lockTokenHash, boolean deep, boolean sessionScoped, String owner,
+ long timeOut)
+ {
+ this(nodeIdentifier, lockTokenHash, deep, sessionScoped, owner, timeOut, System.currentTimeMillis());
+ }
+
+ /**
+ * @param nodeIdentifier
+ * @param lockToken
+ * @param deep
+ * @param sessionScoped
+ * @param owner
+ * @param timeOut
+ * is seconds!
+ * @param birthday
+ */
+ public LockData(String nodeIdentifier, String lockTokenHash, boolean deep, boolean sessionScoped, String owner,
+ long timeOut, long birthday)
+ {
+ this.nodeIdentifier = nodeIdentifier;
+ this.tokenHash = lockTokenHash;
+ this.deep = deep;
+ this.sessionScoped = sessionScoped;
+ this.owner = owner;
+ this.timeOut = timeOut;
+ this.birthday = birthday;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
+ @Override
+ public boolean equals(Object obj)
+ {
+ if (super.equals(obj))
+ {
+ return true;
+ }
+ if (obj instanceof LockData)
+ {
+ return hashCode() == obj.hashCode();
+ }
+ return false;
+ }
+
+ /**
+ * @return the nodeIdentifier
+ */
+ public String getNodeIdentifier()
+ {
+ return nodeIdentifier;
+ }
+
+ /**
+ * @return
+ */
+ public String getOwner()
+ {
+ return owner;
+ }
+
+ /**
+ * @return The time to death in millis
+ */
+ public long getTimeToDeath()
+ {
+ return birthday + timeOut - System.currentTimeMillis();
+ }
+
+ public String getTokenHash()
+ {
+ return tokenHash;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see java.lang.Object#hashCode()
+ */
+ @Override
+ public int hashCode()
+ {
+ return tokenHash.hashCode();
+ }
+
+ public boolean isDeep()
+ {
+ return deep;
+ }
+
+ /**
+ * @return
+ */
+ public boolean isSessionScoped()
+ {
+ return sessionScoped;
+ }
+
+ /**
+ * @see java.io.Externalizable#readExternal(java.io.ObjectInput)
+ */
+ public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
+ {
+ // read boolean
+ this.deep = in.readBoolean();
+ this.sessionScoped = in.readBoolean();
+ // read long
+ this.birthday = in.readLong();
+ this.timeOut = in.readLong();
+ //read strings
+ // read uuid
+ byte[] buf;
+ buf = new byte[in.readInt()];
+ in.readFully(buf);
+ this.nodeIdentifier = new String(buf, Constants.DEFAULT_ENCODING);
+ // read owner
+ buf = new byte[in.readInt()];
+ in.readFully(buf);
+ this.owner = new String(buf, Constants.DEFAULT_ENCODING);
+ // read token
+ buf = new byte[in.readInt()];
+ in.readFully(buf);
+ this.tokenHash = new String(buf, Constants.DEFAULT_ENCODING);
+ }
+
+ /**
+ * @see java.io.Externalizable#writeExternal(java.io.ObjectOutput)
+ */
+ public void writeExternal(ObjectOutput out) throws IOException
+ {
+ // write boolean
+ out.writeBoolean(deep);
+ out.writeBoolean(sessionScoped);
+ // write long
+ out.writeLong(birthday);
+ out.writeLong(timeOut);
+ // write string
+ // node uuid
+ byte[] ptbuf = nodeIdentifier.getBytes(Constants.DEFAULT_ENCODING);
+ out.writeInt(ptbuf.length);
+ out.write(ptbuf);
+ // node owner
+ ptbuf = owner.getBytes(Constants.DEFAULT_ENCODING);
+ out.writeInt(ptbuf.length);
+ out.write(ptbuf);
+ // node token
+ ptbuf = tokenHash.getBytes(Constants.DEFAULT_ENCODING);
+ out.writeInt(ptbuf.length);
+ out.write(ptbuf);
+
+ }
+
+ /**
+ * @return
+ */
+ public long getTimeOut()
+ {
+ return timeOut;
+ }
+
+ public long getBirthDay()
+ {
+ return birthday;
+ }
+
+ public void setTimeOut(long timeOut)
+ {
+ this.timeOut = timeOut;
+ }
+
+}
13 years, 9 months
exo-jcr SVN: r3046 - in jcr/branches/1.14-ISPN/exo.jcr.component.core/src: main/java/org/exoplatform/services/jcr/impl/core/lock/infinispan and 8 other directories.
by do-not-reply@jboss.org
Author: tolusha
Date: 2010-09-02 07:18:22 -0400 (Thu, 02 Sep 2010)
New Revision: 3046
Added:
jcr/branches/1.14-ISPN/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/cacheable/
jcr/branches/1.14-ISPN/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/infinispan/ISPNCacheFactory.java
jcr/branches/1.14-ISPN/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/infinispan/PrivilegedISPNCacheHelper.java
jcr/branches/1.14-ISPN/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/jbosscache/PrivilegedJBossCacheHelper.java
Removed:
jcr/branches/1.14-ISPN/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/AbstractCacheableLockManager.java
jcr/branches/1.14-ISPN/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/CacheLockImpl.java
jcr/branches/1.14-ISPN/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/CacheableLockManager.java
jcr/branches/1.14-ISPN/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/CacheableSessionLockManager.java
jcr/branches/1.14-ISPN/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/LockData.java
jcr/branches/1.14-ISPN/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/util/io/PrivilegedCacheHelper.java
jcr/branches/1.14-ISPN/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/util/io/PrivilegedISPNCacheHelper.java
jcr/branches/1.14-ISPN/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/infinispan/InfinispanCacheFactory.java
Modified:
jcr/branches/1.14-ISPN/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/infinispan/ISPNCacheableLockManagerImpl.java
jcr/branches/1.14-ISPN/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/CacheableLockManagerImpl.java
jcr/branches/1.14-ISPN/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/jdbc/CacheableJDBCLockManagerImpl.java
jcr/branches/1.14-ISPN/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/jdbc/LockJDBCConnection.java
jcr/branches/1.14-ISPN/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/JBossCacheIndexChangesFilter.java
jcr/branches/1.14-ISPN/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/JBossCacheIndexInfos.java
jcr/branches/1.14-ISPN/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/JBossCacheIndexUpdateMonitor.java
jcr/branches/1.14-ISPN/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/ISPNCacheWorkspaceStorageCache.java
jcr/branches/1.14-ISPN/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/infinispan/ISPNCacheHelper.java
jcr/branches/1.14-ISPN/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/core/lock/TestLockPerstistentDataManager.java
Log:
EXOJCR-831: move classes to dedicated packages
Deleted: jcr/branches/1.14-ISPN/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/AbstractCacheableLockManager.java
===================================================================
--- jcr/branches/1.14-ISPN/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/AbstractCacheableLockManager.java 2010-09-01 16:56:51 UTC (rev 3045)
+++ jcr/branches/1.14-ISPN/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/AbstractCacheableLockManager.java 2010-09-02 11:18:22 UTC (rev 3046)
@@ -1,776 +0,0 @@
-/*
- * Copyright (C) 2003-2010 eXo Platform SAS.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Affero General Public License
- * as published by the Free Software Foundation; either version 3
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, see<http://www.gnu.org/licenses/>.
- */
-package org.exoplatform.services.jcr.impl.core.lock;
-
-import org.exoplatform.management.annotations.Managed;
-import org.exoplatform.management.annotations.ManagedDescription;
-import org.exoplatform.services.jcr.config.RepositoryConfigurationException;
-import org.exoplatform.services.jcr.config.WorkspaceEntry;
-import org.exoplatform.services.jcr.dataflow.ChangesLogIterator;
-import org.exoplatform.services.jcr.dataflow.CompositeChangesLog;
-import org.exoplatform.services.jcr.dataflow.DataManager;
-import org.exoplatform.services.jcr.dataflow.ItemState;
-import org.exoplatform.services.jcr.dataflow.ItemStateChangesLog;
-import org.exoplatform.services.jcr.dataflow.PlainChangesLog;
-import org.exoplatform.services.jcr.dataflow.PlainChangesLogImpl;
-import org.exoplatform.services.jcr.dataflow.TransactionChangesLog;
-import org.exoplatform.services.jcr.dataflow.persistent.ItemsPersistenceListener;
-import org.exoplatform.services.jcr.datamodel.ItemData;
-import org.exoplatform.services.jcr.datamodel.NodeData;
-import org.exoplatform.services.jcr.datamodel.PropertyData;
-import org.exoplatform.services.jcr.datamodel.QPathEntry;
-import org.exoplatform.services.jcr.impl.Constants;
-import org.exoplatform.services.jcr.impl.core.SessionDataManager;
-import org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManager;
-import org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManagerImpl;
-import org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableSessionLockManager;
-import org.exoplatform.services.jcr.impl.core.lock.jbosscache.LockData;
-import org.exoplatform.services.jcr.impl.dataflow.TransientItemData;
-import org.exoplatform.services.jcr.impl.dataflow.TransientPropertyData;
-import org.exoplatform.services.jcr.impl.dataflow.persistent.WorkspacePersistentDataManager;
-import org.exoplatform.services.jcr.impl.storage.JCRInvalidItemStateException;
-import org.exoplatform.services.jcr.observation.ExtendedEvent;
-import org.exoplatform.services.log.ExoLogger;
-import org.exoplatform.services.log.Log;
-import org.exoplatform.services.security.IdentityConstants;
-import org.picocontainer.Startable;
-
-import java.math.BigInteger;
-import java.security.MessageDigest;
-import java.security.NoSuchAlgorithmException;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-
-import javax.jcr.RepositoryException;
-import javax.jcr.lock.LockException;
-import javax.transaction.Transaction;
-import javax.transaction.TransactionManager;
-
-/**
- * Created by The eXo Platform SAS.
- *
- * <br/>Date:
- *
- * @author <a href="karpenko.sergiy(a)gmail.com">Karpenko Sergiy</a>
- * @version $Id: AbstractCacheableLockManagerImpl.java 2806 2010-07-21 08:00:15Z tolusha $
- */
-public abstract class AbstractCacheableLockManager implements CacheableLockManager, ItemsPersistenceListener, Startable
-{
- /**
- * The name to property time out.
- */
- public static final String TIME_OUT = "time-out";
-
- /**
- * Default lock time out. 30min
- */
- public static final long DEFAULT_LOCK_TIMEOUT = 1000 * 60 * 30;
-
- /**
- * Data manager.
- */
- protected final DataManager dataManager;
-
- /**
- * Run time lock time out.
- */
- protected long lockTimeOut;
-
- /**
- * Lock remover thread.
- */
- protected LockRemover lockRemover;
-
- /**
- * SessionLockManagers that uses this LockManager.
- */
- protected Map<String, CacheableSessionLockManager> sessionLockManagers;
-
- /**
- * The current Transaction Manager
- */
- protected TransactionManager tm;
-
- /**
- * Logger
- */
- private final Log LOG = ExoLogger.getLogger("exo.jcr.component.core.AbstractCacheableLockManager");
-
- protected LockActionNonTxAware<Integer, Object> getNumLocks;
-
- protected LockActionNonTxAware<Boolean, Object> hasLocks;
-
- protected LockActionNonTxAware<Boolean, String> isLockLive;
-
- protected LockActionNonTxAware<Object, LockData> refresh;
-
- protected LockActionNonTxAware<Boolean, String> lockExist;
-
- protected LockActionNonTxAware<LockData, String> getLockDataById;
-
- protected LockActionNonTxAware<List<LockData>, Object> getLockList;
-
- /**
- * Constructor.
- *
- * @param dataManager - workspace persistent data manager
- * @param config - workspace entry
- * @param transactionManager
- * the transaction manager
- * @throws RepositoryConfigurationException
- */
- public AbstractCacheableLockManager(WorkspacePersistentDataManager dataManager, WorkspaceEntry config,
- TransactionManager transactionManager) throws RepositoryConfigurationException
- {
- if (config.getLockManager() != null)
- {
- if (config.getLockManager().getParameters() != null
- && config.getLockManager().getParameterValue(TIME_OUT, null) != null)
- {
- long timeOut = config.getLockManager().getParameterTime(TIME_OUT);
- lockTimeOut = timeOut > 0 ? timeOut : DEFAULT_LOCK_TIMEOUT;
- }
- else
- {
- lockTimeOut =
- config.getLockManager().getTimeout() > 0 ? config.getLockManager().getTimeout() : DEFAULT_LOCK_TIMEOUT;
- }
- }
- else
- {
- lockTimeOut = DEFAULT_LOCK_TIMEOUT;
- }
-
- this.dataManager = dataManager;
- this.sessionLockManagers = new ConcurrentHashMap<String, CacheableSessionLockManager>();
- this.tm = transactionManager;
-
- dataManager.addItemPersistenceListener(this);
- }
-
- @Managed
- @ManagedDescription("Remove the expired locks")
- public void cleanExpiredLocks()
- {
- removeExpired();
- }
-
- public long getDefaultLockTimeOut()
- {
- return lockTimeOut;
- }
-
- @Managed
- @ManagedDescription("The number of active locks")
- public int getNumLocks()
- {
- try
- {
- return executeLockActionNonTxAware(getNumLocks, null);
- }
- catch (LockException e)
- {
- // ignore me will never occur
- }
- return -1;
- }
-
- /**
- * Indicates if some locks have already been created
- */
- protected boolean hasLocks()
- {
- try
- {
- return executeLockActionNonTxAware(hasLocks, null);
- }
- catch (LockException e)
- {
- // ignore me will never occur
- }
- return true;
- }
-
- /**
- * Return new instance of session lock manager.
- */
- public SessionLockManager getSessionLockManager(String sessionId, SessionDataManager transientManager)
- {
- CacheableSessionLockManager sessionManager = new CacheableSessionLockManager(sessionId, this, transientManager);
- sessionLockManagers.put(sessionId, sessionManager);
- return sessionManager;
- }
-
- /**
- * Check is LockManager contains lock. No matter it is in pending or persistent state.
- *
- * @param nodeId - locked node id
- * @return
- */
- public boolean isLockLive(String nodeId) throws LockException
- {
- try
- {
- return executeLockActionNonTxAware(isLockLive, nodeId);
- }
- catch (LockException e)
- {
- // ignore me will never occur
- }
- return false;
- }
-
- /**
- * {@inheritDoc}
- */
- public boolean isTXAware()
- {
- return true;
- }
-
- /**
- * {@inheritDoc}
- */
- public void onSaveItems(ItemStateChangesLog changesLog)
- {
- List<PlainChangesLog> chengesLogList = new ArrayList<PlainChangesLog>();
- if (changesLog instanceof TransactionChangesLog)
- {
- ChangesLogIterator logIterator = ((TransactionChangesLog)changesLog).getLogIterator();
-
- while (logIterator.hasNextLog())
- {
- chengesLogList.add(logIterator.nextLog());
- }
- }
- else if (changesLog instanceof PlainChangesLog)
- {
- chengesLogList.add((PlainChangesLog)changesLog);
- }
- else if (changesLog instanceof CompositeChangesLog)
- {
- for (ChangesLogIterator iter = ((CompositeChangesLog)changesLog).getLogIterator(); iter.hasNextLog();)
- {
- chengesLogList.add(iter.nextLog());
- }
- }
-
- List<LockOperationContainer> containers = new ArrayList<LockOperationContainer>();
-
- for (PlainChangesLog currChangesLog : chengesLogList)
- {
- String sessionId = currChangesLog.getSessionId();
-
- String nodeIdentifier;
- try
- {
- switch (currChangesLog.getEventType())
- {
- case ExtendedEvent.LOCK :
- if (currChangesLog.getSize() < 2)
- {
- LOG.error("Incorrect changes log of type ExtendedEvent.LOCK size=" + currChangesLog.getSize()
- + "<2 \n" + currChangesLog.dump());
- break;
- }
- nodeIdentifier = currChangesLog.getAllStates().get(0).getData().getParentIdentifier();
-
- CacheableSessionLockManager session = sessionLockManagers.get(sessionId);
- if (session != null && session.containsPendingLock(nodeIdentifier))
- {
- containers.add(new LockOperationContainer(nodeIdentifier, currChangesLog.getSessionId(),
- ExtendedEvent.LOCK));
- }
- else
- {
- LOG.error("Lock must exist in pending locks.");
- }
- break;
- case ExtendedEvent.UNLOCK :
- if (currChangesLog.getSize() < 2)
- {
- LOG.error("Incorrect changes log of type ExtendedEvent.UNLOCK size=" + currChangesLog.getSize()
- + "<2 \n" + currChangesLog.dump());
- break;
- }
-
- containers.add(new LockOperationContainer(currChangesLog.getAllStates().get(0).getData()
- .getParentIdentifier(), currChangesLog.getSessionId(), ExtendedEvent.UNLOCK));
- break;
- default :
- HashSet<String> removedLock = new HashSet<String>();
- for (ItemState itemState : currChangesLog.getAllStates())
- {
- // this is a node and node is locked
- if (itemState.getData().isNode() && lockExist(itemState.getData().getIdentifier()))
- {
- nodeIdentifier = itemState.getData().getIdentifier();
- if (itemState.isDeleted())
- {
- removedLock.add(nodeIdentifier);
- }
- else if (itemState.isAdded() || itemState.isRenamed() || itemState.isUpdated())
- {
- removedLock.remove(nodeIdentifier);
- }
- }
- }
- for (String identifier : removedLock)
- {
- containers.add(new LockOperationContainer(identifier, currChangesLog.getSessionId(),
- ExtendedEvent.UNLOCK));
- }
- break;
- }
- }
- catch (IllegalStateException e)
- {
- LOG.error(e.getLocalizedMessage(), e);
- }
- }
-
- // sort locking and unlocking operations to avoid deadlocks
- Collections.sort(containers);
- for (LockOperationContainer container : containers)
- {
- try
- {
- container.apply();
- }
- catch (LockException e)
- {
- LOG.error(e.getMessage(), e);
- }
- }
- }
-
- /**
- * Class containing operation type (LOCK or UNLOCK) and all the needed information like node uuid and session id.
- */
- private class LockOperationContainer implements Comparable<LockOperationContainer>
- {
-
- private String identifier;
-
- private String sessionId;
-
- private int type;
-
- /**
- * @param identifier node identifier
- * @param sessionId id of session
- * @param type ExtendedEvent type specifying the operation (LOCK or UNLOCK)
- */
- public LockOperationContainer(String identifier, String sessionId, int type)
- {
- super();
- this.identifier = identifier;
- this.sessionId = sessionId;
- this.type = type;
- }
-
- /**
- * @return node identifier
- */
- public String getIdentifier()
- {
- return identifier;
- }
-
- public void apply() throws LockException
- {
- // invoke internalLock in LOCK operation
- if (type == ExtendedEvent.LOCK)
- {
- internalLock(sessionId, identifier);
- }
- // invoke internalUnLock in UNLOCK operation
- else if (type == ExtendedEvent.UNLOCK)
- {
- internalUnLock(sessionId, identifier);
- }
- }
-
- /**
- * @see java.lang.Comparable#compareTo(java.lang.Object)
- */
- public int compareTo(LockOperationContainer o)
- {
- return identifier.compareTo(o.getIdentifier());
- }
- }
-
- /**
- * Refreshed lock data in cache
- *
- * @param newLockData
- */
- public void refreshLockData(LockData newLockData) throws LockException
- {
- executeLockActionNonTxAware(refresh, newLockData);
- }
-
- /**
- * Remove expired locks. Used from LockRemover.
- */
- public synchronized void removeExpired()
- {
- final List<String> removeLockList = new ArrayList<String>();
-
- for (LockData lock : getLockList())
- {
- if (!lock.isSessionScoped() && lock.getTimeToDeath() < 0)
- {
- removeLockList.add(lock.getNodeIdentifier());
- }
- }
-
- Collections.sort(removeLockList);
-
- for (String rLock : removeLockList)
- {
- removeLock(rLock);
- }
- }
-
- /**
- * {@inheritDoc}
- */
- public void start()
- {
- lockRemover = new LockRemover(this);
- }
-
- /**
- * {@inheritDoc}
- */
- public void stop()
- {
- lockRemover.halt();
- lockRemover.interrupt();
- sessionLockManagers.clear();
- }
-
- /**
- * Copy <code>PropertyData prop<code> to new TransientItemData
- *
- * @param prop
- * @return
- * @throws RepositoryException
- */
- protected TransientItemData copyItemData(PropertyData prop) throws RepositoryException
- {
- if (prop == null)
- {
- return null;
- }
-
- // make a copy, value may be null for deleting items
- TransientPropertyData newData =
- new TransientPropertyData(prop.getQPath(), prop.getIdentifier(), prop.getPersistedVersion(), prop.getType(),
- prop.getParentIdentifier(), prop.isMultiValued(), prop.getValues());
-
- return newData;
- }
-
- /**
- * Internal lock
- *
- * @param nodeIdentifier
- * @throws LockException
- */
- protected abstract void internalLock(String sessionId, String nodeIdentifier) throws LockException;
-
- /**
- * Internal unlock.
- *
- * @param sessionId
- * @param nodeIdentifier
- * @throws LockException
- */
- protected abstract void internalUnLock(String sessionId, String nodeIdentifier) throws LockException;
-
- /**
- * {@inheritDoc}
- */
- public boolean lockExist(String nodeId)
- {
- try
- {
- return executeLockActionNonTxAware(lockExist, nodeId);
- }
- catch (LockException e)
- {
- // ignore me will never occur
- }
- return false;
- }
-
- /**
- * {@inheritDoc}
- */
- public String getLockTokenHash(String token)
- {
- String hash = "";
- try
- {
- MessageDigest m = MessageDigest.getInstance("MD5");
- m.update(token.getBytes(), 0, token.length());
- hash = new BigInteger(1, m.digest()).toString(16);
- }
- catch (NoSuchAlgorithmException e)
- {
- LOG.error("Can't get instanse of MD5 MessageDigest!", e);
- }
- return hash;
- }
-
- /**
- * {@inheritDoc}
- */
- public LockData getExactNodeOrCloseParentLock(NodeData node) throws RepositoryException
- {
- return getExactNodeOrCloseParentLock(node, true);
- }
-
- private LockData getExactNodeOrCloseParentLock(NodeData node, boolean checkHasLocks) throws RepositoryException
- {
-
- if (node == null || (checkHasLocks && !hasLocks()))
- {
- return null;
- }
- LockData retval = null;
- retval = getLockDataById(node.getIdentifier());
- if (retval == null)
- {
- NodeData parentData = (NodeData)dataManager.getItemData(node.getParentIdentifier());
- if (parentData != null)
- {
- retval = getExactNodeOrCloseParentLock(parentData, false);
- }
- }
- return retval;
- }
-
- /**
- * {@inheritDoc}
- */
- public LockData getExactNodeLock(NodeData node) throws RepositoryException
- {
- if (node == null || !hasLocks())
- {
- return null;
- }
-
- return getLockDataById(node.getIdentifier());
- }
-
- /**
- * {@inheritDoc}
- */
- public LockData getClosedChild(NodeData node) throws RepositoryException
- {
- return getClosedChild(node, true);
- }
-
- private LockData getClosedChild(NodeData node, boolean checkHasLocks) throws RepositoryException
- {
-
- if (node == null || (checkHasLocks && !hasLocks()))
- {
- return null;
- }
- LockData retval = null;
-
- List<NodeData> childData = dataManager.getChildNodesData(node);
- for (NodeData nodeData : childData)
- {
- retval = getLockDataById(nodeData.getIdentifier());
- if (retval != null)
- return retval;
- }
- // child not found try to find dipper
- for (NodeData nodeData : childData)
- {
- retval = getClosedChild(nodeData, false);
- if (retval != null)
- return retval;
- }
- return retval;
- }
-
- protected LockData getLockDataById(String nodeId)
- {
- try
- {
- return executeLockActionNonTxAware(getLockDataById, nodeId);
- }
- catch (LockException e)
- {
- // ignore me will never occur
- }
- return null;
- }
-
- protected synchronized List<LockData> getLockList()
- {
- try
- {
- return executeLockActionNonTxAware(getLockList, null);
- }
- catch (LockException e)
- {
- // ignore me will never occur
- }
- return null;
- }
-
- /**
- * Remove lock, used by Lock remover.
- *
- * @param nodeIdentifier String
- */
- protected void removeLock(String nodeIdentifier)
- {
- try
- {
- NodeData nData = (NodeData)dataManager.getItemData(nodeIdentifier);
-
- //TODO EXOJCR-412, should be refactored in future.
- //Skip removing, because that node was removed in other node of cluster.
- if (nData == null)
- {
- return;
- }
-
- PlainChangesLog changesLog =
- new PlainChangesLogImpl(new ArrayList<ItemState>(), IdentityConstants.SYSTEM, ExtendedEvent.UNLOCK);
-
- ItemData lockOwner =
- copyItemData((PropertyData)dataManager.getItemData(nData, new QPathEntry(Constants.JCR_LOCKOWNER, 1)));
-
- //TODO EXOJCR-412, should be refactored in future.
- //Skip removing, because that lock was removed in other node of cluster.
- if (lockOwner == null)
- {
- return;
- }
-
- changesLog.add(ItemState.createDeletedState(lockOwner));
-
- ItemData lockIsDeep =
- copyItemData((PropertyData)dataManager.getItemData(nData, new QPathEntry(Constants.JCR_LOCKISDEEP, 1)));
-
- //TODO EXOJCR-412, should be refactored in future.
- //Skip removing, because that lock was removed in other node of cluster.
- if (lockIsDeep == null)
- {
- return;
- }
-
- changesLog.add(ItemState.createDeletedState(lockIsDeep));
-
- // lock probably removed by other thread
- if (lockOwner == null && lockIsDeep == null)
- {
- return;
- }
-
- dataManager.save(new TransactionChangesLog(changesLog));
- }
- catch (JCRInvalidItemStateException e)
- {
- //TODO EXOJCR-412, should be refactored in future.
- //Skip property not found in DB, because that lock property was removed in other node of cluster.
- if (LOG.isDebugEnabled())
- {
- LOG.debug("The propperty was removed in other node of cluster.", e);
- }
-
- }
- catch (RepositoryException e)
- {
- LOG.error("Error occur during removing lock" + e.getLocalizedMessage(), e);
- }
- }
-
- /**
- * {@inheritDoc}
- */
- public void closeSessionLockManager(String sessionID)
- {
- sessionLockManagers.remove(sessionID);
- }
-
- /**
- * Execute the given action outside a transaction. This is needed since the {@link Cache} used by {@link CacheableLockManagerImpl}
- * manages the persistence of its locks thanks to a {@link CacheLoader} and a {@link CacheLoader} lock the JBoss cache {@link Node}
- * even for read operations which cause deadlock issue when a XA {@link Transaction} is already opened
- * @throws LockException when a exception occurs
- */
- private <R, A> R executeLockActionNonTxAware(LockActionNonTxAware<R, A> action, A arg) throws LockException
- {
- Transaction tx = null;
- try
- {
- if (tm != null)
- {
- try
- {
- tx = tm.suspend();
- }
- catch (Exception e)
- {
- LOG.warn("Cannot suspend the current transaction", e);
- }
- }
- return action.execute(arg);
- }
- finally
- {
- if (tx != null)
- {
- try
- {
- tm.resume(tx);
- }
- catch (Exception e)
- {
- LOG.warn("Cannot resume the current transaction", e);
- }
- }
- }
- }
-
- /**
- * Actions that are not supposed to be called within a transaction
- *
- * Created by The eXo Platform SAS
- * Author : Nicolas Filotto
- * nicolas.filotto(a)exoplatform.com
- * 21 janv. 2010
- */
- protected static interface LockActionNonTxAware<R, A>
- {
- R execute(A arg) throws LockException;
- }
-}
Modified: jcr/branches/1.14-ISPN/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/infinispan/ISPNCacheableLockManagerImpl.java
===================================================================
--- jcr/branches/1.14-ISPN/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/infinispan/ISPNCacheableLockManagerImpl.java 2010-09-01 16:56:51 UTC (rev 3045)
+++ jcr/branches/1.14-ISPN/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/infinispan/ISPNCacheableLockManagerImpl.java 2010-09-02 11:18:22 UTC (rev 3046)
@@ -24,14 +24,14 @@
import org.exoplatform.services.jcr.config.MappedParametrizedObjectEntry;
import org.exoplatform.services.jcr.config.RepositoryConfigurationException;
import org.exoplatform.services.jcr.config.WorkspaceEntry;
-import org.exoplatform.services.jcr.impl.core.lock.AbstractCacheableLockManager;
-import org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableSessionLockManager;
-import org.exoplatform.services.jcr.impl.core.lock.jbosscache.LockData;
+import org.exoplatform.services.jcr.impl.core.lock.cacheable.AbstractCacheableLockManager;
+import org.exoplatform.services.jcr.impl.core.lock.cacheable.CacheableSessionLockManager;
+import org.exoplatform.services.jcr.impl.core.lock.cacheable.LockData;
import org.exoplatform.services.jcr.impl.dataflow.persistent.WorkspacePersistentDataManager;
import org.exoplatform.services.jcr.impl.storage.jdbc.DBConstants;
import org.exoplatform.services.jcr.impl.storage.jdbc.DialectDetecter;
-import org.exoplatform.services.jcr.impl.util.io.PrivilegedISPNCacheHelper;
-import org.exoplatform.services.jcr.infinispan.InfinispanCacheFactory;
+import org.exoplatform.services.jcr.infinispan.ISPNCacheFactory;
+import org.exoplatform.services.jcr.infinispan.PrivilegedISPNCacheHelper;
import org.exoplatform.services.log.ExoLogger;
import org.exoplatform.services.log.Log;
import org.exoplatform.services.naming.InitialContextInitializer;
@@ -107,7 +107,7 @@
if (config.getLockManager() != null)
{
// create cache using custom factory
- InfinispanCacheFactory<Serializable, Object> factory = new InfinispanCacheFactory<Serializable, Object>(cfm);
+ ISPNCacheFactory<Serializable, Object> factory = new ISPNCacheFactory<Serializable, Object>(cfm);
// configure cache loader parameters with correct DB data-types
configureJDBCCacheLoader(config.getLockManager());
Deleted: jcr/branches/1.14-ISPN/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/CacheLockImpl.java
===================================================================
--- jcr/branches/1.14-ISPN/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/CacheLockImpl.java 2010-09-01 16:56:51 UTC (rev 3045)
+++ jcr/branches/1.14-ISPN/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/CacheLockImpl.java 2010-09-02 11:18:22 UTC (rev 3046)
@@ -1,157 +0,0 @@
-/*
- * Copyright (C) 2003-2010 eXo Platform SAS.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Affero General Public License
- * as published by the Free Software Foundation; either version 3
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, see<http://www.gnu.org/licenses/>.
- */
-package org.exoplatform.services.jcr.impl.core.lock.jbosscache;
-
-import org.exoplatform.services.jcr.impl.core.SessionImpl;
-import org.exoplatform.services.jcr.impl.core.lock.LockImpl;
-
-import javax.jcr.Node;
-import javax.jcr.RepositoryException;
-import javax.jcr.lock.LockException;
-
-/**
- * Created by The eXo Platform SAS.
- *
- * <br/>Date:
- *
- * @author <a href="karpenko.sergiy(a)gmail.com">Karpenko Sergiy</a>
- * @version $Id: CacheLockImpl.java 111 2008-11-11 11:11:11Z serg $
- */
-public class CacheLockImpl extends LockImpl
-{
- private boolean live;
-
- private LockData lockData;
-
- private SessionImpl session;
-
- private CacheableSessionLockManager lockManager;
-
- /**
- * Constructor.
- *
- * @param session - session owner
- * @param lockData - LockData
- * @param lockManager - CacheableLockManager
- */
- public CacheLockImpl(SessionImpl session, LockData lockData, CacheableSessionLockManager lockManager)
- {
- this.lockData = lockData;
- this.session = session;
- this.lockManager = lockManager;
- this.live = true;
- }
-
- /**
- * {@inheritDoc}
- */
- public String getLockOwner()
- {
- return lockData.getOwner();
- }
-
- /**
- * {@inheritDoc}
- */
- public String getLockToken()
- {
- return lockManager.getLockToken(lockData.getTokenHash());
- }
-
- /**
- * {@inheritDoc}
- */
- public boolean isLive() throws LockException
- {
- if (!live)
- {
- // it is already not alive
- return false;
- }
- live = lockManager.isLockLive(lockData.getNodeIdentifier());
- return live;
- }
-
- /**
- * {@inheritDoc}
- */
- public void refresh() throws LockException, RepositoryException
- {
- if (!isLive())
- throw new LockException("Lock is not live");
-
- LockData newLockData =
- new LockData(lockData.getNodeIdentifier(), lockData.getTokenHash(), lockData.isDeep(), lockData
- .isSessionScoped(), lockData.getOwner(), lockData.getTimeOut());
-
- lockManager.refresh(newLockData);
- lockData = newLockData;
- }
-
- /**
- * {@inheritDoc}
- */
- public Node getNode()
- {
- try
- {
- return (Node)session.getTransientNodesManager().getItemByIdentifier(lockData.getNodeIdentifier(), true);
- }
- catch (RepositoryException e)
- {
- //TODO
- e.printStackTrace();
- }
- return null;
- }
-
- /**
- * {@inheritDoc}
- */
- public boolean isDeep()
- {
-
- return lockData.isDeep();
- }
-
- /**
- * {@inheritDoc}
- */
- public boolean isSessionScoped()
- {
- return lockData.isSessionScoped();
- }
-
- /**
- * {@inheritDoc}
- */
- public long getTimeToDeath()
- {
- return lockData.getTimeToDeath();
- }
-
- /**
- * {@inheritDoc}
- */
- protected void setTimeOut(long timeOut) throws LockException
- {
- lockData.setTimeOut(timeOut);
-
- //reset lock data
- lockManager.refresh(lockData);
- }
-}
Deleted: jcr/branches/1.14-ISPN/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/CacheableLockManager.java
===================================================================
--- jcr/branches/1.14-ISPN/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/CacheableLockManager.java 2010-09-01 16:56:51 UTC (rev 3045)
+++ jcr/branches/1.14-ISPN/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/CacheableLockManager.java 2010-09-02 11:18:22 UTC (rev 3046)
@@ -1,88 +0,0 @@
-/*
- * Copyright (C) 2003-2010 eXo Platform SAS.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Affero General Public License
- * as published by the Free Software Foundation; either version 3
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, see<http://www.gnu.org/licenses/>.
- */
-package org.exoplatform.services.jcr.impl.core.lock.jbosscache;
-
-import org.exoplatform.services.jcr.datamodel.NodeData;
-import org.exoplatform.services.jcr.impl.core.lock.WorkspaceLockManager;
-
-import javax.jcr.RepositoryException;
-import javax.jcr.lock.LockException;
-
-/**
- * Created by The eXo Platform SAS.
- *
- * <br/>Date:
- *
- * @author <a href="karpenko.sergiy(a)gmail.com">Karpenko Sergiy</a>
- * @version $Id: CacheableLockManager.java 111 2008-11-11 11:11:11Z serg $
- */
-public interface CacheableLockManager extends WorkspaceLockManager
-{
- /**
- * Is lock live for node by nodeIdentifier.
- *
- * @param nodeIdentifier
- *
- * @return boolean
- * @throws LockException
- */
- boolean isLockLive(String nodeIdentifier) throws LockException;
-
- /**
- * Replace old lockData with new one. Node ID, token can't be replaced.
- *
- * @param newLockData
- * @throws LockException
- */
- void refreshLockData(LockData newLockData) throws LockException;
-
- /**
- * Get default lock timeout.
- *
- * @return long value of timeout
- */
- long getDefaultLockTimeOut();
-
- /**
- * Return hash for lock token.
- *
- * @param lockToken - lock token string
- * @return - hash string
- */
- String getLockTokenHash(String lockToken);
-
- /**
- * Return Lock holding node or its parent.
- *
- * @param node - NodeData
- * @return LockData for node or null;
- * @throws RepositoryException
- */
- LockData getExactNodeOrCloseParentLock(NodeData node) throws RepositoryException;
-
- /**
- * Return Lock holding any nodes child.
- *
- * @param node - NodeData
- * @return LockData for node or null;
- * @throws RepositoryException
- */
- LockData getClosedChild(NodeData node) throws RepositoryException;
-
- boolean lockExist(String nodeId) throws RepositoryException;
-
-}
Modified: jcr/branches/1.14-ISPN/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/CacheableLockManagerImpl.java
===================================================================
--- jcr/branches/1.14-ISPN/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/CacheableLockManagerImpl.java 2010-09-01 16:56:51 UTC (rev 3045)
+++ jcr/branches/1.14-ISPN/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/CacheableLockManagerImpl.java 2010-09-02 11:18:22 UTC (rev 3046)
@@ -23,12 +23,14 @@
import org.exoplatform.services.jcr.config.MappedParametrizedObjectEntry;
import org.exoplatform.services.jcr.config.RepositoryConfigurationException;
import org.exoplatform.services.jcr.config.WorkspaceEntry;
-import org.exoplatform.services.jcr.impl.core.lock.AbstractCacheableLockManager;
+import org.exoplatform.services.jcr.impl.core.lock.cacheable.AbstractCacheableLockManager;
+import org.exoplatform.services.jcr.impl.core.lock.cacheable.CacheableSessionLockManager;
+import org.exoplatform.services.jcr.impl.core.lock.cacheable.LockData;
import org.exoplatform.services.jcr.impl.dataflow.persistent.WorkspacePersistentDataManager;
import org.exoplatform.services.jcr.impl.storage.jdbc.DBConstants;
import org.exoplatform.services.jcr.impl.storage.jdbc.DialectDetecter;
-import org.exoplatform.services.jcr.impl.util.io.PrivilegedCacheHelper;
import org.exoplatform.services.jcr.jbosscache.ExoJBossCacheFactory;
+import org.exoplatform.services.jcr.jbosscache.PrivilegedJBossCacheHelper;
import org.exoplatform.services.log.ExoLogger;
import org.exoplatform.services.log.Log;
import org.exoplatform.services.naming.InitialContextInitializer;
@@ -161,12 +163,12 @@
cache = factory.createCache(config.getLockManager());
- PrivilegedCacheHelper.create(cache);
+ PrivilegedJBossCacheHelper.create(cache);
// Add the cache loader needed to prevent TimeoutException
addCacheLoader();
- PrivilegedCacheHelper.start(cache);
+ PrivilegedJBossCacheHelper.start(cache);
createStructuredNode(lockRoot);
@@ -212,7 +214,7 @@
public Object execute(LockData newLockData) throws LockException
{
Fqn<String> fqn = makeLockFqn(newLockData.getNodeIdentifier());
- Object oldValue = PrivilegedCacheHelper.put(cache, fqn, LOCK_DATA, newLockData);
+ Object oldValue = PrivilegedJBossCacheHelper.put(cache, fqn, LOCK_DATA, newLockData);
if (oldValue == null)
{
throw new LockException("Can't refresh lock for node " + newLockData.getNodeIdentifier()
@@ -456,7 +458,7 @@
lockRemover.interrupt();
sessionLockManagers.clear();
- PrivilegedCacheHelper.stop(cache);
+ PrivilegedJBossCacheHelper.stop(cache);
}
/**
Deleted: jcr/branches/1.14-ISPN/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/CacheableSessionLockManager.java
===================================================================
--- jcr/branches/1.14-ISPN/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/CacheableSessionLockManager.java 2010-09-01 16:56:51 UTC (rev 3045)
+++ jcr/branches/1.14-ISPN/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/CacheableSessionLockManager.java 2010-09-02 11:18:22 UTC (rev 3046)
@@ -1,403 +0,0 @@
-/*
- * Copyright (C) 2003-2010 eXo Platform SAS.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Affero General Public License
- * as published by the Free Software Foundation; either version 3
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, see<http://www.gnu.org/licenses/>.
- */
-package org.exoplatform.services.jcr.impl.core.lock.jbosscache;
-
-import org.exoplatform.services.jcr.core.ExtendedSession;
-import org.exoplatform.services.jcr.datamodel.NodeData;
-import org.exoplatform.services.jcr.impl.core.NodeImpl;
-import org.exoplatform.services.jcr.impl.core.SessionDataManager;
-import org.exoplatform.services.jcr.impl.core.SessionImpl;
-import org.exoplatform.services.jcr.impl.core.lock.AbstractSessionLockManager;
-import org.exoplatform.services.jcr.impl.core.lock.LockImpl;
-import org.exoplatform.services.jcr.util.IdGenerator;
-import org.exoplatform.services.log.ExoLogger;
-import org.exoplatform.services.log.Log;
-
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-
-import javax.jcr.AccessDeniedException;
-import javax.jcr.RepositoryException;
-import javax.jcr.UnsupportedRepositoryOperationException;
-import javax.jcr.lock.Lock;
-import javax.jcr.lock.LockException;
-
-/**
- * Created by The eXo Platform SAS.
- *
- * <br/>Date:
- *
- * @author <a href="karpenko.sergiy(a)gmail.com">Karpenko Sergiy</a>
- * @version $Id$
- */
-public class CacheableSessionLockManager extends AbstractSessionLockManager
-{
- /**
- * Logger
- */
- private final Log log = ExoLogger.getLogger("exo.jcr.component.core.CacheableSessionLockManager");
-
- /**
- * Session identifier.
- */
- private final String sessionID;
-
- /**
- * Lock tokens held by this session.
- * [token name, tokens hash]
- */
- private final Map<String, String> tokens;
-
- /**
- * Map of nodes locked in this session. Need to remove session scoped lock on session close.
- * [node identifier, lock data]
- */
- private final Map<String, LockData> lockedNodes;
-
- /**
- * Set of pending locked nodes identifiers.
- */
- private final Set<String> pendingLocks;
-
- /**
- * Workspace lock manager
- */
- private final CacheableLockManager lockManager;
-
- /**
- * Constructor.
- *
- * @param sessionID - session identifier
- * @param lockManager - workspace lock manager
- */
- public CacheableSessionLockManager(String sessionID, CacheableLockManager lockManager,
- SessionDataManager transientManager)
- {
- super(transientManager);
- this.sessionID = sessionID;
- this.tokens = new HashMap<String, String>();
- this.lockedNodes = new HashMap<String, LockData>();
- this.pendingLocks = new HashSet<String>();
- this.lockManager = lockManager;
- }
-
- /**
- * {@inheritDoc}
- */
- public Lock addLock(NodeImpl node, boolean isDeep, boolean isSessionScoped, long timeOut) throws LockException,
- RepositoryException
- {
-
- String lockToken = IdGenerator.generate();
-
- NodeData data = (NodeData)node.getData();
-
- LockData lData = lockManager.getExactNodeOrCloseParentLock(data);
- if (lData != null)
- {
- if (lData.getNodeIdentifier().equals(node.getIdentifier()))
- {
- throw new LockException("Node already locked: " + data.getQPath());
- }
- else if (lData.isDeep())
- {
- throw new LockException("Parent node has deep lock.");
- }
- }
-
- if (isDeep && lockManager.getClosedChild(data) != null)
- {
- throw new LockException("Some child node is locked.");
- }
-
- String lockTokenHash = lockManager.getLockTokenHash(lockToken);
-
- lData =
- new LockData(node.getIdentifier(), lockTokenHash, isDeep, isSessionScoped, node.getSession().getUserID(),
- timeOut > 0 ? timeOut : lockManager.getDefaultLockTimeOut());
-
- lockedNodes.put(node.getInternalIdentifier(), lData);
- pendingLocks.add(node.getInternalIdentifier());
- tokens.put(lockToken, lData.getTokenHash());
-
- LockImpl lock = new CacheLockImpl(node.getSession(), lData, this);
-
- return lock;
- }
-
- /**
- * {@inheritDoc}
- */
- public void addLockToken(String lt)
- {
- tokens.put(lt, lockManager.getLockTokenHash(lt));
- }
-
- /**
- * {@inheritDoc}
- */
- public LockImpl getLock(NodeImpl node) throws LockException, RepositoryException
- {
- LockData lData = lockManager.getExactNodeOrCloseParentLock((NodeData)node.getData());
-
- if (lData == null || (!node.getInternalIdentifier().equals(lData.getNodeIdentifier()) && !lData.isDeep()))
- {
- throw new LockException("Node not locked: " + node.getData().getQPath());
- }
- return new CacheLockImpl(node.getSession(), lData, this);
- }
-
- /**
- * {@inheritDoc}
- */
- public String[] getLockTokens()
- {
- String[] arr = new String[tokens.size()];
- tokens.keySet().toArray(arr);
- return arr;
- }
-
- /**
- * {@inheritDoc}
- */
- public boolean holdsLock(NodeData node) throws RepositoryException
- {
- return lockManager.lockExist(node.getIdentifier());//.getExactNodeLock(node) != null;
- }
-
- /**
- * {@inheritDoc}
- */
- protected boolean isLockedPersisted(NodeData node) throws LockException
- {
- LockData lData = null;
- try
- {
- lData = lockManager.getExactNodeOrCloseParentLock(node);
- }
- catch (RepositoryException e)
- {
- throw new LockException(e.getMessage(), e);
- }
-
- if (lData == null || (!node.getIdentifier().equals(lData.getNodeIdentifier()) && !lData.isDeep()))
- {
- return false;
- }
- return true;
- }
-
- /**
- * {@inheritDoc}
- */
- protected boolean isPersistedLockHolder(NodeData node) throws RepositoryException
- {
- LockData lData = lockManager.getExactNodeOrCloseParentLock(node);
- return lData != null && isLockHolder(lData);
- }
-
- /**
- * {@inheritDoc}
- */
- public void onCloseSession(ExtendedSession session)
- {
- SessionImpl sessionImpl = (SessionImpl)session;
-
- String[] nodeIds = new String[lockedNodes.size()];
- lockedNodes.keySet().toArray(nodeIds);
-
- for (String nodeId : nodeIds)
- {
- LockData lock = lockedNodes.remove(nodeId);
-
- if (lock.isSessionScoped() && !pendingLocks.contains(nodeId))
- {
- try
- {
- NodeImpl node =
- ((NodeImpl)sessionImpl.getTransientNodesManager()
- .getItemByIdentifier(lock.getNodeIdentifier(), false));
-
- if (node != null)
- {
- node.unlock();
- }
-
- }
- catch (UnsupportedRepositoryOperationException e)
- {
- log.error(e.getLocalizedMessage());
- }
- catch (LockException e)
- {
- log.error(e.getLocalizedMessage());
- }
- catch (AccessDeniedException e)
- {
- log.error(e.getLocalizedMessage());
- }
- catch (RepositoryException e)
- {
- log.error(e.getLocalizedMessage());
- }
- }
- }
-
- pendingLocks.clear();
- tokens.clear();
- lockedNodes.clear();
-
- lockManager.closeSessionLockManager(sessionID);
- }
-
- /**
- * {@inheritDoc}
- */
- public void removeLockToken(String lt)
- {
- tokens.remove(lt);
- }
-
- /**
- * Checks if session has token to this lock data or session is System.
- *
- * @param lockData
- * @return
- */
- private boolean isLockHolder(LockData lockData)
- {
- return tokens.containsValue(lockData.getTokenHash());
- }
-
- /**
- * Is session contains pending lock for node by nodeId.
- * @param nodeId - node ID string
- * @return boolean
- */
- public boolean containsPendingLock(String nodeId)
- {
- return pendingLocks.contains(nodeId);
- }
-
- /**
- * Returns real token, if session has it.
- *
- * @param tokenHash - token hash string
- * @return lock token string
- */
- protected String getLockToken(String tokenHash)
- {
- for (String token : tokens.keySet())
- {
- if (tokens.get(token).equals(tokenHash))
- {
- return token;
- }
- }
- return null;
- }
-
- /**
- * Return pending lock.
- *
- * @param nodeId - ID of locked node
- * @return pending lock or null
- */
- public LockData getPendingLock(String nodeId)
- {
- if (pendingLocks.contains(nodeId))
- {
- return lockedNodes.get(nodeId);
- }
- else
- {
- return null;
- }
- }
-
- /**
- * Check is lock alive. That means lock must exist in LockManager storage (cache or map, etc).
- *
- * @param nodeIdentifier - locked node id
- * @return
- */
- protected boolean isLockLive(String nodeIdentifier) throws LockException
- {
-
- if (lockManager.isLockLive(nodeIdentifier))
- {
- return true;
- }
- else
- {
- return pendingLocks.contains(nodeIdentifier);
- }
- }
-
- public void notifyLockPersisted(String nodeIdentifier)
- {
- pendingLocks.remove(nodeIdentifier);
- }
-
- /**
- * Notify SessionLockManager that node is unlocked.
- *
- * @param nodeIdentifier - unlocked node identifier
- */
- public void notifyLockRemoved(String nodeIdentifier)
- {
- lockedNodes.remove(nodeIdentifier);
- }
-
- /**
- * Refresh lockData.
- *
- * @param newLockData
- * @throws LockException
- */
- protected void refresh(LockData newLockData) throws LockException
- {
- lockManager.refreshLockData(newLockData);
- }
-
- /**
- * {@inheritDoc}
- */
- protected boolean checkPersistedLocks(NodeData node) throws LockException
- {
- LockData lData = null;
- try
- {
- lData = lockManager.getExactNodeOrCloseParentLock(node);
- }
- catch (RepositoryException e)
- {
- throw new LockException(e.getMessage(), e);
- }
-
- if (lData == null || (!node.getIdentifier().equals(lData.getNodeIdentifier()) && !lData.isDeep()))
- {
- return true;
- }
-
- // lock exist, so lets check is current session is LockHolder
- return isLockHolder(lData);
- }
-
-}
Deleted: jcr/branches/1.14-ISPN/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/LockData.java
===================================================================
--- jcr/branches/1.14-ISPN/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/LockData.java 2010-09-01 16:56:51 UTC (rev 3045)
+++ jcr/branches/1.14-ISPN/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/LockData.java 2010-09-02 11:18:22 UTC (rev 3046)
@@ -1,264 +0,0 @@
-/*
- * Copyright (C) 2009 eXo Platform SAS.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.exoplatform.services.jcr.impl.core.lock.jbosscache;
-
-import org.exoplatform.services.jcr.impl.Constants;
-
-import java.io.Externalizable;
-import java.io.IOException;
-import java.io.ObjectInput;
-import java.io.ObjectOutput;
-
-/**
- * Created by The eXo Platform SAS.
- *
- * @author <a href="mailto:gennady.azarenkov@exoplatform.com">Gennady Azarenkov</a>
- * @version $Id: LockData.java 787 2009-11-20 11:36:15Z nzamosenchuk $
- */
-
-public class LockData implements Externalizable
-{
- /**
- * The time of birth. From this time we start count the time of death. death = birthday+TIME_OUT;
- */
- private long birthday;
-
- /**
- * If isDeep is true then the lock applies to this node and all its descendant nodes; if false,
- * the lock applies only to this, the holding node.
- */
- private boolean deep;
-
- /**
- * A lock token is a string that uniquely identifies a particular lock and acts as a “key”
- * allowing a user to alter a locked node. LockData stores only token hash.
- */
- private String tokenHash;
-
- /**
- * Identifier of locked node.
- */
- private String nodeIdentifier;
-
- /**
- * The owner of the locked node.
- */
- private String owner;
-
- /**
- * If isSessionScoped is true then this lock will expire upon the expiration of the current
- * session (either through an automatic or explicit Session.logout); if false, this lock does not
- * expire until explicitly unlocked or automatically unlocked due to a implementation-specific
- * limitation, such as a timeout.
- */
- private boolean sessionScoped;
-
- /**
- * <B>8.4.9 Timing Out</B> An implementation may unlock any lock at any time due to
- * implementation-specific criteria, such as time limits on locks.
- */
- private long timeOut;
-
- // Need for Externalizable
- public LockData()
- {
- this.sessionScoped = false;
- this.deep = false;
- }
-
- /**
- * @param nodeIdentifier
- * @param lockToken
- * @param deep
- * @param sessionScoped
- * @param owner
- * @param timeOut
- * is seconds!
- */
- public LockData(String nodeIdentifier, String lockTokenHash, boolean deep, boolean sessionScoped, String owner,
- long timeOut)
- {
- this(nodeIdentifier, lockTokenHash, deep, sessionScoped, owner, timeOut, System.currentTimeMillis());
- }
-
- /**
- * @param nodeIdentifier
- * @param lockToken
- * @param deep
- * @param sessionScoped
- * @param owner
- * @param timeOut
- * is seconds!
- * @param birthday
- */
- public LockData(String nodeIdentifier, String lockTokenHash, boolean deep, boolean sessionScoped, String owner,
- long timeOut, long birthday)
- {
- this.nodeIdentifier = nodeIdentifier;
- this.tokenHash = lockTokenHash;
- this.deep = deep;
- this.sessionScoped = sessionScoped;
- this.owner = owner;
- this.timeOut = timeOut;
- this.birthday = birthday;
- }
-
- /*
- * (non-Javadoc)
- * @see java.lang.Object#equals(java.lang.Object)
- */
- @Override
- public boolean equals(Object obj)
- {
- if (super.equals(obj))
- {
- return true;
- }
- if (obj instanceof LockData)
- {
- return hashCode() == obj.hashCode();
- }
- return false;
- }
-
- /**
- * @return the nodeIdentifier
- */
- public String getNodeIdentifier()
- {
- return nodeIdentifier;
- }
-
- /**
- * @return
- */
- public String getOwner()
- {
- return owner;
- }
-
- /**
- * @return The time to death in millis
- */
- public long getTimeToDeath()
- {
- return birthday + timeOut - System.currentTimeMillis();
- }
-
- public String getTokenHash()
- {
- return tokenHash;
- }
-
- /*
- * (non-Javadoc)
- * @see java.lang.Object#hashCode()
- */
- @Override
- public int hashCode()
- {
- return tokenHash.hashCode();
- }
-
- public boolean isDeep()
- {
- return deep;
- }
-
- /**
- * @return
- */
- public boolean isSessionScoped()
- {
- return sessionScoped;
- }
-
- /**
- * @see java.io.Externalizable#readExternal(java.io.ObjectInput)
- */
- public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
- {
- // read boolean
- this.deep = in.readBoolean();
- this.sessionScoped = in.readBoolean();
- // read long
- this.birthday = in.readLong();
- this.timeOut = in.readLong();
- //read strings
- // read uuid
- byte[] buf;
- buf = new byte[in.readInt()];
- in.readFully(buf);
- this.nodeIdentifier = new String(buf, Constants.DEFAULT_ENCODING);
- // read owner
- buf = new byte[in.readInt()];
- in.readFully(buf);
- this.owner = new String(buf, Constants.DEFAULT_ENCODING);
- // read token
- buf = new byte[in.readInt()];
- in.readFully(buf);
- this.tokenHash = new String(buf, Constants.DEFAULT_ENCODING);
- }
-
- /**
- * @see java.io.Externalizable#writeExternal(java.io.ObjectOutput)
- */
- public void writeExternal(ObjectOutput out) throws IOException
- {
- // write boolean
- out.writeBoolean(deep);
- out.writeBoolean(sessionScoped);
- // write long
- out.writeLong(birthday);
- out.writeLong(timeOut);
- // write string
- // node uuid
- byte[] ptbuf = nodeIdentifier.getBytes(Constants.DEFAULT_ENCODING);
- out.writeInt(ptbuf.length);
- out.write(ptbuf);
- // node owner
- ptbuf = owner.getBytes(Constants.DEFAULT_ENCODING);
- out.writeInt(ptbuf.length);
- out.write(ptbuf);
- // node token
- ptbuf = tokenHash.getBytes(Constants.DEFAULT_ENCODING);
- out.writeInt(ptbuf.length);
- out.write(ptbuf);
-
- }
-
- /**
- * @return
- */
- public long getTimeOut()
- {
- return timeOut;
- }
-
- public long getBirthDay()
- {
- return birthday;
- }
-
- public void setTimeOut(long timeOut)
- {
- this.timeOut = timeOut;
- }
-
-}
Modified: jcr/branches/1.14-ISPN/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/jdbc/CacheableJDBCLockManagerImpl.java
===================================================================
--- jcr/branches/1.14-ISPN/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/jdbc/CacheableJDBCLockManagerImpl.java 2010-09-01 16:56:51 UTC (rev 3045)
+++ jcr/branches/1.14-ISPN/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/jdbc/CacheableJDBCLockManagerImpl.java 2010-09-02 11:18:22 UTC (rev 3046)
@@ -42,9 +42,9 @@
import org.exoplatform.services.jcr.impl.core.SessionDataManager;
import org.exoplatform.services.jcr.impl.core.lock.LockRemover;
import org.exoplatform.services.jcr.impl.core.lock.SessionLockManager;
-import org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManager;
-import org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableSessionLockManager;
-import org.exoplatform.services.jcr.impl.core.lock.jbosscache.LockData;
+import org.exoplatform.services.jcr.impl.core.lock.cacheable.CacheableLockManager;
+import org.exoplatform.services.jcr.impl.core.lock.cacheable.CacheableSessionLockManager;
+import org.exoplatform.services.jcr.impl.core.lock.cacheable.LockData;
import org.exoplatform.services.jcr.impl.dataflow.TransientItemData;
import org.exoplatform.services.jcr.impl.dataflow.TransientPropertyData;
import org.exoplatform.services.jcr.impl.dataflow.persistent.WorkspacePersistentDataManager;
Modified: jcr/branches/1.14-ISPN/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/jdbc/LockJDBCConnection.java
===================================================================
--- jcr/branches/1.14-ISPN/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/jdbc/LockJDBCConnection.java 2010-09-01 16:56:51 UTC (rev 3045)
+++ jcr/branches/1.14-ISPN/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/jdbc/LockJDBCConnection.java 2010-09-02 11:18:22 UTC (rev 3046)
@@ -16,7 +16,7 @@
*/
package org.exoplatform.services.jcr.impl.core.lock.jbosscache.jdbc;
-import org.exoplatform.services.jcr.impl.core.lock.jbosscache.LockData;
+import org.exoplatform.services.jcr.impl.core.lock.cacheable.LockData;
import org.exoplatform.services.log.ExoLogger;
import org.exoplatform.services.log.Log;
Modified: jcr/branches/1.14-ISPN/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/JBossCacheIndexChangesFilter.java
===================================================================
--- jcr/branches/1.14-ISPN/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/JBossCacheIndexChangesFilter.java 2010-09-01 16:56:51 UTC (rev 3045)
+++ jcr/branches/1.14-ISPN/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/JBossCacheIndexChangesFilter.java 2010-09-02 11:18:22 UTC (rev 3046)
@@ -28,8 +28,8 @@
import org.exoplatform.services.jcr.impl.core.query.IndexingTree;
import org.exoplatform.services.jcr.impl.core.query.QueryHandler;
import org.exoplatform.services.jcr.impl.core.query.SearchManager;
-import org.exoplatform.services.jcr.impl.util.io.PrivilegedCacheHelper;
import org.exoplatform.services.jcr.jbosscache.ExoJBossCacheFactory;
+import org.exoplatform.services.jcr.jbosscache.PrivilegedJBossCacheHelper;
import org.exoplatform.services.jcr.util.IdGenerator;
import org.exoplatform.services.log.ExoLogger;
import org.exoplatform.services.log.Log;
@@ -116,8 +116,8 @@
// insert CacheLoaderConfig
this.cache.getConfiguration().setCacheLoaderConfig(cacheLoaderConfig);
- PrivilegedCacheHelper.create(cache);
- PrivilegedCacheHelper.start(cache);
+ PrivilegedJBossCacheHelper.create(cache);
+ PrivilegedJBossCacheHelper.start(cache);
// start will invoke cache listener which will notify handler that mode is changed
IndexerIoMode ioMode =
@@ -151,7 +151,7 @@
String id = IdGenerator.generate();
try
{
- PrivilegedCacheHelper.put(cache, id, LISTWRAPPER, new ChangesFilterListsWrapper(addedNodes, removedNodes,
+ PrivilegedJBossCacheHelper.put(cache, id, LISTWRAPPER, new ChangesFilterListsWrapper(addedNodes, removedNodes,
parentAddedNodes, parentRemovedNodes));
}
catch (CacheException e)
Modified: jcr/branches/1.14-ISPN/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/JBossCacheIndexInfos.java
===================================================================
--- jcr/branches/1.14-ISPN/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/JBossCacheIndexInfos.java 2010-09-01 16:56:51 UTC (rev 3045)
+++ jcr/branches/1.14-ISPN/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/JBossCacheIndexInfos.java 2010-09-02 11:18:22 UTC (rev 3046)
@@ -23,7 +23,7 @@
import org.exoplatform.services.jcr.impl.core.query.IndexerIoModeListener;
import org.exoplatform.services.jcr.impl.core.query.lucene.IndexInfos;
import org.exoplatform.services.jcr.impl.core.query.lucene.MultiIndex;
-import org.exoplatform.services.jcr.impl.util.io.PrivilegedCacheHelper;
+import org.exoplatform.services.jcr.jbosscache.PrivilegedJBossCacheHelper;
import org.exoplatform.services.log.ExoLogger;
import org.exoplatform.services.log.Log;
import org.jboss.cache.Cache;
@@ -159,7 +159,7 @@
// write to FS
super.write();
// write to cache
- PrivilegedCacheHelper.put(cache, namesFqn, LIST_KEY, getNames());
+ PrivilegedJBossCacheHelper.put(cache, namesFqn, LIST_KEY, getNames());
}
}
Modified: jcr/branches/1.14-ISPN/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/JBossCacheIndexUpdateMonitor.java
===================================================================
--- jcr/branches/1.14-ISPN/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/JBossCacheIndexUpdateMonitor.java 2010-09-01 16:56:51 UTC (rev 3045)
+++ jcr/branches/1.14-ISPN/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/JBossCacheIndexUpdateMonitor.java 2010-09-02 11:18:22 UTC (rev 3046)
@@ -24,7 +24,7 @@
import org.exoplatform.services.jcr.impl.core.query.lucene.IndexInfos;
import org.exoplatform.services.jcr.impl.core.query.lucene.IndexUpdateMonitor;
import org.exoplatform.services.jcr.impl.core.query.lucene.IndexUpdateMonitorListener;
-import org.exoplatform.services.jcr.impl.util.io.PrivilegedCacheHelper;
+import org.exoplatform.services.jcr.jbosscache.PrivilegedJBossCacheHelper;
import org.exoplatform.services.log.ExoLogger;
import org.exoplatform.services.log.Log;
import org.jboss.cache.Cache;
@@ -157,7 +157,7 @@
localUpdateInProgress = updateInProgress;
if (persitentUpdate)
{
- PrivilegedCacheHelper.put(cache, parametersFqn, PARAMETER_NAME, new Boolean(updateInProgress));
+ PrivilegedJBossCacheHelper.put(cache, parametersFqn, PARAMETER_NAME, new Boolean(updateInProgress));
}
for (IndexUpdateMonitorListener listener : listeners)
Modified: jcr/branches/1.14-ISPN/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/ISPNCacheWorkspaceStorageCache.java
===================================================================
--- jcr/branches/1.14-ISPN/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/ISPNCacheWorkspaceStorageCache.java 2010-09-01 16:56:51 UTC (rev 3045)
+++ jcr/branches/1.14-ISPN/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/ISPNCacheWorkspaceStorageCache.java 2010-09-02 11:18:22 UTC (rev 3046)
@@ -35,7 +35,7 @@
import org.exoplatform.services.jcr.impl.Constants;
import org.exoplatform.services.jcr.impl.dataflow.TransientNodeData;
import org.exoplatform.services.jcr.impl.dataflow.TransientPropertyData;
-import org.exoplatform.services.jcr.infinispan.InfinispanCacheFactory;
+import org.exoplatform.services.jcr.infinispan.ISPNCacheFactory;
import org.exoplatform.services.log.ExoLogger;
import org.exoplatform.services.log.Log;
import org.exoplatform.services.transaction.TransactionService;
@@ -208,7 +208,7 @@
}
// create cache using custom factory
- InfinispanCacheFactory<Serializable, Object> factory = new InfinispanCacheFactory<Serializable, Object>(cfm);
+ ISPNCacheFactory<Serializable, Object> factory = new ISPNCacheFactory<Serializable, Object>(cfm);
// create parent JBossCache instance
Cache<Serializable, Object> parentCache = factory.createCache(wsConfig.getCache());
Deleted: jcr/branches/1.14-ISPN/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/util/io/PrivilegedCacheHelper.java
===================================================================
--- jcr/branches/1.14-ISPN/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/util/io/PrivilegedCacheHelper.java 2010-09-01 16:56:51 UTC (rev 3045)
+++ jcr/branches/1.14-ISPN/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/util/io/PrivilegedCacheHelper.java 2010-09-02 11:18:22 UTC (rev 3046)
@@ -1,167 +0,0 @@
-/*
- * Copyright (C) 2010 eXo Platform SAS.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.exoplatform.services.jcr.impl.util.io;
-
-import org.jboss.cache.Cache;
-import org.jboss.cache.CacheException;
-import org.jboss.cache.Fqn;
-
-import java.io.Serializable;
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-import java.security.PrivilegedActionException;
-import java.security.PrivilegedExceptionAction;
-
-/**
- * @author <a href="anatoliy.bazko(a)exoplatform.org">Anatoliy Bazko</a>
- * @version $Id: PrivilegedCacheHelper.java 111 2010-11-11 11:11:11Z tolusha $
- *
- */
-public class PrivilegedCacheHelper
-{
- /**
- * Start JBoss cache in privileged mode.
- *
- * @param cache
- */
- public static void start(final Cache<Serializable, Object> cache)
- {
- PrivilegedAction<Object> action = new PrivilegedAction<Object>()
- {
- public Object run()
- {
- cache.start();
- return null;
- }
- };
- AccessController.doPrivileged(action);
- }
-
- /**
- * Stop JBoss cache in privileged mode.
- *
- * @param cache
- */
- public static void stop(final Cache<Serializable, Object> cache)
- {
- PrivilegedAction<Object> action = new PrivilegedAction<Object>()
- {
- public Object run()
- {
- cache.stop();
- return null;
- }
- };
- AccessController.doPrivileged(action);
- }
-
- /**
- * Create JBoss cache in privileged mode.
- *
- * @param cache
- */
- public static void create(final Cache<Serializable, Object> cache)
- {
- PrivilegedAction<Object> action = new PrivilegedAction<Object>()
- {
- public Object run()
- {
- cache.create();
- return null;
- }
- };
- AccessController.doPrivileged(action);
- }
-
- /**
- * Put in JBoss cache in privileged mode.
- *
- * @param cache
- */
- public static Object put(final Cache<Serializable, Object> cache, final String fqn, final Serializable key,
- final Object value) throws CacheException
- {
- PrivilegedExceptionAction<Object> action = new PrivilegedExceptionAction<Object>()
- {
- public Object run() throws Exception
- {
- return cache.put(fqn, key, value);
-
- }
- };
- try
- {
- return AccessController.doPrivileged(action);
- }
- catch (PrivilegedActionException pae)
- {
- Throwable cause = pae.getCause();
- if (cause instanceof CacheException)
- {
- throw (CacheException)cause;
- }
- else if (cause instanceof RuntimeException)
- {
- throw (RuntimeException)cause;
- }
- else
- {
- throw new RuntimeException(cause);
- }
- }
- }
-
- /**
- * Put in JBoss cache in privileged mode.
- *
- * @param cache
- */
- public static Object put(final Cache<Serializable, Object> cache, final Fqn fqn, final Serializable key,
- final Object value) throws CacheException
- {
- PrivilegedExceptionAction<Object> action = new PrivilegedExceptionAction<Object>()
- {
- public Object run() throws Exception
- {
- return cache.put(fqn, key, value);
- }
- };
- try
- {
- return AccessController.doPrivileged(action);
- }
- catch (PrivilegedActionException pae)
- {
- Throwable cause = pae.getCause();
- if (cause instanceof CacheException)
- {
- throw (CacheException)cause;
- }
- else if (cause instanceof RuntimeException)
- {
- throw (RuntimeException)cause;
- }
- else
- {
- throw new RuntimeException(cause);
- }
- }
- }
-
-}
Deleted: jcr/branches/1.14-ISPN/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/util/io/PrivilegedISPNCacheHelper.java
===================================================================
--- jcr/branches/1.14-ISPN/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/util/io/PrivilegedISPNCacheHelper.java 2010-09-01 16:56:51 UTC (rev 3045)
+++ jcr/branches/1.14-ISPN/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/util/io/PrivilegedISPNCacheHelper.java 2010-09-02 11:18:22 UTC (rev 3046)
@@ -1,105 +0,0 @@
-/*
- * Copyright (C) 2010 eXo Platform SAS.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.exoplatform.services.jcr.impl.util.io;
-
-import org.infinispan.Cache;
-
-import java.io.Serializable;
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-
-/**
- * @author <a href="anatoliy.bazko(a)exoplatform.org">Anatoliy Bazko</a>
- * @version $Id: PrivilegedCacheHelper.java 111 2010-11-11 11:11:11Z tolusha $
- *
- */
-public class PrivilegedISPNCacheHelper
-{
-
- /**
- * Start Infinispan cache in privileged mode.
- *
- * @param cache
- */
- public static void start(final org.infinispan.Cache<Serializable, Object> cache)
- {
- PrivilegedAction<Object> action = new PrivilegedAction<Object>()
- {
- public Object run()
- {
- cache.start();
- return null;
- }
- };
- AccessController.doPrivileged(action);
- }
-
- /**
- * Stop Infinispan cache in privileged mode.
- *
- * @param cache
- */
- public static void stop(final Cache<Serializable, Object> cache)
- {
- PrivilegedAction<Object> action = new PrivilegedAction<Object>()
- {
- public Object run()
- {
- cache.stop();
- return null;
- }
- };
- AccessController.doPrivileged(action);
- }
-
- /**
- * Put in Infinispan cache in privileged mode.
- *
- * @param cache
- */
- public static Object putIfAbsent(final Cache<Serializable, Object> cache, final Serializable key, final Object value)
- {
- PrivilegedAction<Object> action = new PrivilegedAction<Object>()
- {
- public Object run()
- {
- return cache.putIfAbsent(key, value);
- }
- };
- return AccessController.doPrivileged(action);
- }
-
- /**
- * Put in Infinispan cache in privileged mode.
- *
- * @param cache
- */
- public static Object put(final Cache<Serializable, Object> cache, final Serializable key, final Object value)
- {
- PrivilegedAction<Object> action = new PrivilegedAction<Object>()
- {
- public Object run()
- {
- return cache.put(key, value);
- }
- };
- return AccessController.doPrivileged(action);
- }
-
-}
Added: jcr/branches/1.14-ISPN/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/infinispan/ISPNCacheFactory.java
===================================================================
--- jcr/branches/1.14-ISPN/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/infinispan/ISPNCacheFactory.java (rev 0)
+++ jcr/branches/1.14-ISPN/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/infinispan/ISPNCacheFactory.java 2010-09-02 11:18:22 UTC (rev 3046)
@@ -0,0 +1,118 @@
+/*
+ * Copyright (C) 2010 eXo Platform SAS.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.exoplatform.services.jcr.infinispan;
+
+import org.exoplatform.container.configuration.ConfigurationManager;
+import org.exoplatform.services.jcr.config.MappedParametrizedObjectEntry;
+import org.exoplatform.services.jcr.config.RepositoryConfigurationException;
+import org.exoplatform.services.jcr.config.TemplateConfigurationHelper;
+import org.exoplatform.services.log.ExoLogger;
+import org.exoplatform.services.log.Log;
+import org.infinispan.Cache;
+import org.infinispan.manager.DefaultCacheManager;
+import org.infinispan.manager.EmbeddedCacheManager;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+
+/**
+ * Factory that creates and starts pre-configured instances of Infinispan.
+ * Path to Infinispan configuration or template and cache name should be
+ * provided as "infinispan-configuration" and "infinispan-cache-name" properties
+ * in parameterEntry instance respectively.
+ *
+ * @author <a href="mailto:nikolazius@gmail.com">Nikolay Zamosenchuk</a>
+ * @version $Id: InfinispanCacheFactory.java 3001 2010-08-30 06:56:05Z tolusha $
+ *
+ */
+public class ISPNCacheFactory<K, V>
+{
+
+ public static final String INFINISPAN_CONFIG = "infinispan-configuration";
+
+ public static final String JGROUPS_CONFIG = "jgroups-configuration";
+
+ private final TemplateConfigurationHelper configurationHelper;
+
+ private final Log log = ExoLogger.getLogger("exo.jcr.component.core.InfinispanCacheFactory");
+
+ /**
+ * Creates InfinispanCacheFactory with provided configuration transaction managers.
+ * Transaction manager will later be injected to cache instance.
+ *
+ * @param configurationManager
+ */
+ public ISPNCacheFactory(ConfigurationManager configurationManager)
+ {
+ this.configurationHelper = new ISPNCacheHelper(configurationManager);
+ }
+
+ /**
+ * Factory that creates and starts pre-configured instances of Infinispan.
+ * Path to Infinispan configuration or template should be provided as
+ * "infinispan-configuration" property in parameterEntry instance.
+ * <br>
+ *
+ * @param parameterEntry
+ * @return
+ * @throws RepositoryConfigurationException
+ */
+ public Cache<K, V> createCache(MappedParametrizedObjectEntry parameterEntry) throws RepositoryConfigurationException
+ {
+ // get Infinispan configuration file path
+ final String configurationPath = parameterEntry.getParameterValue(INFINISPAN_CONFIG);
+ log.info("Infinispan Cache configuration used: " + configurationPath);
+
+ // prepare configuration
+ InputStream configStream;
+ try
+ {
+ // fill template
+ configStream = configurationHelper.fillTemplate(configurationPath, parameterEntry.getParameters());
+ }
+ catch (IOException e)
+ {
+ throw new RepositoryConfigurationException(e);
+ }
+
+ // create cache
+ final EmbeddedCacheManager manager;
+ try
+ {
+ manager = new DefaultCacheManager(configStream);
+ }
+ catch (IOException e)
+ {
+ throw new RepositoryConfigurationException(e);
+ }
+
+ PrivilegedAction<Cache<K, V>> action = new PrivilegedAction<Cache<K, V>>()
+ {
+ public Cache<K, V> run()
+ {
+ return manager.getCache();
+ }
+ };
+ Cache<K, V> cache = AccessController.doPrivileged(action);
+
+ return cache;
+ }
+}
Modified: jcr/branches/1.14-ISPN/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/infinispan/ISPNCacheHelper.java
===================================================================
--- jcr/branches/1.14-ISPN/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/infinispan/ISPNCacheHelper.java 2010-09-01 16:56:51 UTC (rev 3045)
+++ jcr/branches/1.14-ISPN/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/infinispan/ISPNCacheHelper.java 2010-09-02 11:18:22 UTC (rev 3046)
@@ -40,4 +40,5 @@
{
super(new String[]{"^jgroups-configuration", "^infinispan-.*"}, new String[]{"^infinispan-configuration"}, cfm);
}
+
}
Deleted: jcr/branches/1.14-ISPN/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/infinispan/InfinispanCacheFactory.java
===================================================================
--- jcr/branches/1.14-ISPN/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/infinispan/InfinispanCacheFactory.java 2010-09-01 16:56:51 UTC (rev 3045)
+++ jcr/branches/1.14-ISPN/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/infinispan/InfinispanCacheFactory.java 2010-09-02 11:18:22 UTC (rev 3046)
@@ -1,118 +0,0 @@
-/*
- * Copyright (C) 2010 eXo Platform SAS.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.exoplatform.services.jcr.infinispan;
-
-import org.exoplatform.container.configuration.ConfigurationManager;
-import org.exoplatform.services.jcr.config.MappedParametrizedObjectEntry;
-import org.exoplatform.services.jcr.config.RepositoryConfigurationException;
-import org.exoplatform.services.jcr.config.TemplateConfigurationHelper;
-import org.exoplatform.services.log.ExoLogger;
-import org.exoplatform.services.log.Log;
-import org.infinispan.Cache;
-import org.infinispan.manager.DefaultCacheManager;
-import org.infinispan.manager.EmbeddedCacheManager;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-
-/**
- * Factory that creates and starts pre-configured instances of Infinispan.
- * Path to Infinispan configuration or template and cache name should be
- * provided as "infinispan-configuration" and "infinispan-cache-name" properties
- * in parameterEntry instance respectively.
- *
- * @author <a href="mailto:nikolazius@gmail.com">Nikolay Zamosenchuk</a>
- * @version $Id$
- *
- */
-public class InfinispanCacheFactory<K, V>
-{
-
- public static final String INFINISPAN_CONFIG = "infinispan-configuration";
-
- public static final String JGROUPS_CONFIG = "jgroups-configuration";
-
- private final TemplateConfigurationHelper configurationHelper;
-
- private final Log log = ExoLogger.getLogger("exo.jcr.component.core.InfinispanCacheFactory");
-
- /**
- * Creates InfinispanCacheFactory with provided configuration transaction managers.
- * Transaction manager will later be injected to cache instance.
- *
- * @param configurationManager
- */
- public InfinispanCacheFactory(ConfigurationManager configurationManager)
- {
- this.configurationHelper = new ISPNCacheHelper(configurationManager);
- }
-
- /**
- * Factory that creates and starts pre-configured instances of Infinispan.
- * Path to Infinispan configuration or template should be provided as
- * "infinispan-configuration" property in parameterEntry instance.
- * <br>
- *
- * @param parameterEntry
- * @return
- * @throws RepositoryConfigurationException
- */
- public Cache<K, V> createCache(MappedParametrizedObjectEntry parameterEntry) throws RepositoryConfigurationException
- {
- // get Infinispan configuration file path
- final String configurationPath = parameterEntry.getParameterValue(INFINISPAN_CONFIG);
- log.info("Infinispan Cache configuration used: " + configurationPath);
-
- // prepare configuration
- InputStream configStream;
- try
- {
- // fill template
- configStream = configurationHelper.fillTemplate(configurationPath, parameterEntry.getParameters());
- }
- catch (IOException e)
- {
- throw new RepositoryConfigurationException(e);
- }
-
- // create cache
- final EmbeddedCacheManager manager;
- try
- {
- manager = new DefaultCacheManager(configStream);
- }
- catch (IOException e)
- {
- throw new RepositoryConfigurationException(e);
- }
-
- PrivilegedAction<Cache<K, V>> action = new PrivilegedAction<Cache<K, V>>()
- {
- public Cache<K, V> run()
- {
- return manager.getCache();
- }
- };
- Cache<K, V> cache = AccessController.doPrivileged(action);
-
- return cache;
- }
-}
Added: jcr/branches/1.14-ISPN/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/infinispan/PrivilegedISPNCacheHelper.java
===================================================================
--- jcr/branches/1.14-ISPN/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/infinispan/PrivilegedISPNCacheHelper.java (rev 0)
+++ jcr/branches/1.14-ISPN/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/infinispan/PrivilegedISPNCacheHelper.java 2010-09-02 11:18:22 UTC (rev 3046)
@@ -0,0 +1,105 @@
+/*
+ * Copyright (C) 2010 eXo Platform SAS.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.exoplatform.services.jcr.infinispan;
+
+import org.infinispan.Cache;
+
+import java.io.Serializable;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+
+/**
+ * @author <a href="anatoliy.bazko(a)exoplatform.org">Anatoliy Bazko</a>
+ * @version $Id: PrivilegedCacheHelper.java 111 2010-11-11 11:11:11Z tolusha $
+ *
+ */
+public class PrivilegedISPNCacheHelper
+{
+
+ /**
+ * Start Infinispan cache in privileged mode.
+ *
+ * @param cache
+ */
+ public static void start(final org.infinispan.Cache<Serializable, Object> cache)
+ {
+ PrivilegedAction<Object> action = new PrivilegedAction<Object>()
+ {
+ public Object run()
+ {
+ cache.start();
+ return null;
+ }
+ };
+ AccessController.doPrivileged(action);
+ }
+
+ /**
+ * Stop Infinispan cache in privileged mode.
+ *
+ * @param cache
+ */
+ public static void stop(final Cache<Serializable, Object> cache)
+ {
+ PrivilegedAction<Object> action = new PrivilegedAction<Object>()
+ {
+ public Object run()
+ {
+ cache.stop();
+ return null;
+ }
+ };
+ AccessController.doPrivileged(action);
+ }
+
+ /**
+ * Put in Infinispan cache in privileged mode.
+ *
+ * @param cache
+ */
+ public static Object putIfAbsent(final Cache<Serializable, Object> cache, final Serializable key, final Object value)
+ {
+ PrivilegedAction<Object> action = new PrivilegedAction<Object>()
+ {
+ public Object run()
+ {
+ return cache.putIfAbsent(key, value);
+ }
+ };
+ return AccessController.doPrivileged(action);
+ }
+
+ /**
+ * Put in Infinispan cache in privileged mode.
+ *
+ * @param cache
+ */
+ public static Object put(final Cache<Serializable, Object> cache, final Serializable key, final Object value)
+ {
+ PrivilegedAction<Object> action = new PrivilegedAction<Object>()
+ {
+ public Object run()
+ {
+ return cache.put(key, value);
+ }
+ };
+ return AccessController.doPrivileged(action);
+ }
+
+}
Added: jcr/branches/1.14-ISPN/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/jbosscache/PrivilegedJBossCacheHelper.java
===================================================================
--- jcr/branches/1.14-ISPN/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/jbosscache/PrivilegedJBossCacheHelper.java (rev 0)
+++ jcr/branches/1.14-ISPN/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/jbosscache/PrivilegedJBossCacheHelper.java 2010-09-02 11:18:22 UTC (rev 3046)
@@ -0,0 +1,167 @@
+/*
+ * Copyright (C) 2010 eXo Platform SAS.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.exoplatform.services.jcr.jbosscache;
+
+import org.jboss.cache.Cache;
+import org.jboss.cache.CacheException;
+import org.jboss.cache.Fqn;
+
+import java.io.Serializable;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+import java.security.PrivilegedActionException;
+import java.security.PrivilegedExceptionAction;
+
+/**
+ * @author <a href="anatoliy.bazko(a)exoplatform.org">Anatoliy Bazko</a>
+ * @version $Id: PrivilegedCacheHelper.java 111 2010-11-11 11:11:11Z tolusha $
+ *
+ */
+public class PrivilegedJBossCacheHelper
+{
+ /**
+ * Start JBoss cache in privileged mode.
+ *
+ * @param cache
+ */
+ public static void start(final Cache<Serializable, Object> cache)
+ {
+ PrivilegedAction<Object> action = new PrivilegedAction<Object>()
+ {
+ public Object run()
+ {
+ cache.start();
+ return null;
+ }
+ };
+ AccessController.doPrivileged(action);
+ }
+
+ /**
+ * Stop JBoss cache in privileged mode.
+ *
+ * @param cache
+ */
+ public static void stop(final Cache<Serializable, Object> cache)
+ {
+ PrivilegedAction<Object> action = new PrivilegedAction<Object>()
+ {
+ public Object run()
+ {
+ cache.stop();
+ return null;
+ }
+ };
+ AccessController.doPrivileged(action);
+ }
+
+ /**
+ * Create JBoss cache in privileged mode.
+ *
+ * @param cache
+ */
+ public static void create(final Cache<Serializable, Object> cache)
+ {
+ PrivilegedAction<Object> action = new PrivilegedAction<Object>()
+ {
+ public Object run()
+ {
+ cache.create();
+ return null;
+ }
+ };
+ AccessController.doPrivileged(action);
+ }
+
+ /**
+ * Put in JBoss cache in privileged mode.
+ *
+ * @param cache
+ */
+ public static Object put(final Cache<Serializable, Object> cache, final String fqn, final Serializable key,
+ final Object value) throws CacheException
+ {
+ PrivilegedExceptionAction<Object> action = new PrivilegedExceptionAction<Object>()
+ {
+ public Object run() throws Exception
+ {
+ return cache.put(fqn, key, value);
+
+ }
+ };
+ try
+ {
+ return AccessController.doPrivileged(action);
+ }
+ catch (PrivilegedActionException pae)
+ {
+ Throwable cause = pae.getCause();
+ if (cause instanceof CacheException)
+ {
+ throw (CacheException)cause;
+ }
+ else if (cause instanceof RuntimeException)
+ {
+ throw (RuntimeException)cause;
+ }
+ else
+ {
+ throw new RuntimeException(cause);
+ }
+ }
+ }
+
+ /**
+ * Put in JBoss cache in privileged mode.
+ *
+ * @param cache
+ */
+ public static Object put(final Cache<Serializable, Object> cache, final Fqn fqn, final Serializable key,
+ final Object value) throws CacheException
+ {
+ PrivilegedExceptionAction<Object> action = new PrivilegedExceptionAction<Object>()
+ {
+ public Object run() throws Exception
+ {
+ return cache.put(fqn, key, value);
+ }
+ };
+ try
+ {
+ return AccessController.doPrivileged(action);
+ }
+ catch (PrivilegedActionException pae)
+ {
+ Throwable cause = pae.getCause();
+ if (cause instanceof CacheException)
+ {
+ throw (CacheException)cause;
+ }
+ else if (cause instanceof RuntimeException)
+ {
+ throw (RuntimeException)cause;
+ }
+ else
+ {
+ throw new RuntimeException(cause);
+ }
+ }
+ }
+
+}
Modified: jcr/branches/1.14-ISPN/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/core/lock/TestLockPerstistentDataManager.java
===================================================================
--- jcr/branches/1.14-ISPN/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/core/lock/TestLockPerstistentDataManager.java 2010-09-01 16:56:51 UTC (rev 3045)
+++ jcr/branches/1.14-ISPN/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/core/lock/TestLockPerstistentDataManager.java 2010-09-02 11:18:22 UTC (rev 3046)
@@ -19,7 +19,7 @@
package org.exoplatform.services.jcr.impl.core.lock;
import org.exoplatform.services.jcr.JcrImplBaseTest;
-import org.exoplatform.services.jcr.impl.core.lock.jbosscache.LockData;
+import org.exoplatform.services.jcr.impl.core.lock.cacheable.LockData;
import org.exoplatform.services.jcr.impl.core.lock.jbosscache.jdbc.LockJDBCConnection;
import org.exoplatform.services.jcr.impl.core.lock.jbosscache.jdbc.LockJDBCContainer;
13 years, 9 months