You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@oodt.apache.org by ma...@apache.org on 2017/07/15 03:46:43 UTC
[01/35] oodt git commit: Fix for OODT-847 contributed by adhulipa &
rverma
Repository: oodt
Updated Branches:
refs/heads/feature/zookeeper-config ec5b20133 -> 3fb76606a
Fix for OODT-847 contributed by adhulipa & rverma
Implemented FileAttributesExtractor which leverages the Java 7 API to
get file system attributes.
Project: http://git-wip-us.apache.org/repos/asf/oodt/repo
Commit: http://git-wip-us.apache.org/repos/asf/oodt/commit/ce690461
Tree: http://git-wip-us.apache.org/repos/asf/oodt/tree/ce690461
Diff: http://git-wip-us.apache.org/repos/asf/oodt/diff/ce690461
Branch: refs/heads/feature/zookeeper-config
Commit: ce690461b05da324ce1cb5d480409adec6737737
Parents: 0eacdfe
Author: Aditya Dhulipala <ad...@usc.edu>
Authored: Fri Oct 28 05:36:13 2016 -0400
Committer: Aditya Dhulipala <ad...@usc.edu>
Committed: Fri Oct 28 05:36:13 2016 -0400
----------------------------------------------------------------------
.../filemgr/metadata/FileAttributesMetKeys.java | 53 ++++++
.../examples/FileAttributesExtractor.java | 82 +++++++++
.../examples/TestFileAttributesExtractor.java | 167 +++++++++++++++++++
3 files changed, 302 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/oodt/blob/ce690461/filemgr/src/main/java/org/apache/oodt/cas/filemgr/metadata/FileAttributesMetKeys.java
----------------------------------------------------------------------
diff --git a/filemgr/src/main/java/org/apache/oodt/cas/filemgr/metadata/FileAttributesMetKeys.java b/filemgr/src/main/java/org/apache/oodt/cas/filemgr/metadata/FileAttributesMetKeys.java
new file mode 100644
index 0000000..30ca080
--- /dev/null
+++ b/filemgr/src/main/java/org/apache/oodt/cas/filemgr/metadata/FileAttributesMetKeys.java
@@ -0,0 +1,53 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.oodt.cas.filemgr.metadata;
+
+/**
+ * Met key field names used to augment {@link Product} {@link Metadata}.
+ * @author adhulipala
+ * @version $Revision$
+ * @since OODT-847
+ */
+public interface FileAttributesMetKeys {
+
+ // Basic file attributes
+ String IS_SYMBOLIC_LINK = "isSymbolicLink";
+
+ String CREATION_TIME = "creationTime";
+
+ String LAST_MODIFIED_TIME = "lastModifiedTime";
+
+ String IS_OTHER = "isOther";
+
+ String IS_DIRECTORY = "isDirectory";
+
+ String FILE_KEY = "fileKey";
+
+ String LAST_ACCESS_TIME = "lastAccessTime";
+
+ String IS_REGULAR_FILE = "isRegularFile";
+
+ String SIZE = "size";
+
+ // POSIX File attributes
+ String OWNER = "owner";
+
+ String PERMISSIONS = "permissions";
+
+ String GROUP = "group";
+}
http://git-wip-us.apache.org/repos/asf/oodt/blob/ce690461/filemgr/src/main/java/org/apache/oodt/cas/filemgr/metadata/extractors/examples/FileAttributesExtractor.java
----------------------------------------------------------------------
diff --git a/filemgr/src/main/java/org/apache/oodt/cas/filemgr/metadata/extractors/examples/FileAttributesExtractor.java b/filemgr/src/main/java/org/apache/oodt/cas/filemgr/metadata/extractors/examples/FileAttributesExtractor.java
new file mode 100644
index 0000000..f6a0490
--- /dev/null
+++ b/filemgr/src/main/java/org/apache/oodt/cas/filemgr/metadata/extractors/examples/FileAttributesExtractor.java
@@ -0,0 +1,82 @@
+package org.apache.oodt.cas.filemgr.metadata.extractors.examples;
+
+import org.apache.oodt.cas.filemgr.metadata.extractors.AbstractFilemgrMetExtractor;
+import org.apache.oodt.cas.filemgr.structs.Product;
+import org.apache.oodt.cas.metadata.Metadata;
+import org.apache.oodt.cas.metadata.exceptions.MetExtractionException;
+
+import java.io.File;
+import java.io.IOException;
+import java.nio.file.Files;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.logging.Logger;
+
+/**
+ * @author rverma
+ * @author adhulipala
+ */
+public class FileAttributesExtractor extends AbstractFilemgrMetExtractor {
+
+ public static final String BASIC_FILE_ATTRIBUTES = "*";
+ public static final String POSIX_FILE_ATTRIBUTES = "posix:*";
+
+ private String attributes;
+
+ Logger LOG = Logger.getLogger(FileAttributesExtractor.class.getName());
+
+ public FileAttributesExtractor() {
+ attributes = BASIC_FILE_ATTRIBUTES;
+ }
+
+ public FileAttributesExtractor(String attributes) {
+ this.attributes = attributes;
+ }
+
+ @Override
+ public Metadata doExtract(Product product, Metadata metadata) throws MetExtractionException {
+ Metadata outMetadata = new Metadata();
+
+ merge(metadata, outMetadata);
+ Metadata fileAttributesMetadata = getMetadataFromFileAttributes(product);
+
+ LOG.fine(fileAttributesMetadata.toString());
+
+ merge(fileAttributesMetadata, outMetadata);
+
+ return outMetadata;
+ }
+
+ @Override
+ public void doConfigure() {
+ if (this.configuration != null) {
+ this.attributes = this.configuration.getProperty("attributes");
+ }
+ }
+
+
+ private Metadata getMetadataFromFileAttributes(Product product) {
+ Metadata met = new Metadata();
+
+ File file = null;
+ try {
+ file = getProductFile(product);
+ } catch (MetExtractionException e) {
+ LOG.severe(e.getMessage());
+ }
+
+ if (file != null) {
+ Map<String, Object> attrMap = new HashMap<String, Object>();
+ try {
+ attrMap = Files.readAttributes(file.toPath(), attributes);
+ } catch (IOException e) {
+ LOG.severe(e.getMessage());
+ }
+
+ for (Map.Entry<String, Object> entry : attrMap.entrySet()) {
+ met.addMetadata(entry.getKey(), String.valueOf(entry.getValue()));
+ }
+ }
+ return met;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/oodt/blob/ce690461/filemgr/src/test/java/org/apache/oodt/cas/filemgr/metadata/extractors/examples/TestFileAttributesExtractor.java
----------------------------------------------------------------------
diff --git a/filemgr/src/test/java/org/apache/oodt/cas/filemgr/metadata/extractors/examples/TestFileAttributesExtractor.java b/filemgr/src/test/java/org/apache/oodt/cas/filemgr/metadata/extractors/examples/TestFileAttributesExtractor.java
new file mode 100644
index 0000000..e425c23
--- /dev/null
+++ b/filemgr/src/test/java/org/apache/oodt/cas/filemgr/metadata/extractors/examples/TestFileAttributesExtractor.java
@@ -0,0 +1,167 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.oodt.cas.filemgr.metadata.extractors.examples;
+
+//JDK imports
+import java.net.URL;
+import java.util.Properties;
+
+//OODT imports
+import org.apache.oodt.cas.filemgr.metadata.FileAttributesMetKeys;
+import org.apache.oodt.cas.filemgr.structs.Product;
+import org.apache.oodt.cas.filemgr.structs.Reference;
+import org.apache.oodt.cas.metadata.Metadata;
+import org.apache.oodt.cas.metadata.exceptions.MetExtractionException;
+
+//Junit imports
+import junit.framework.TestCase;
+
+/**
+ * @author adhulipala
+ * @version $Revision$
+ * @since OODT-847
+ * <p>
+ * Test suite for the {@link FileAttributesExtractor}.
+ * </p>.
+ */
+public class TestFileAttributesExtractor extends TestCase implements FileAttributesMetKeys {
+
+ private final FileAttributesExtractor fileAttributesExtractor = new FileAttributesExtractor();
+
+ public void testExtractBasicFileAttributes() {
+ // Define Reference & Product
+ URL refUrl = this.getClass().getResource("/ingest/test.txt");
+ Reference ref = new Reference();
+ ref.setOrigReference(refUrl.toString());
+ ref.setDataStoreReference(refUrl.toString());
+
+ Product product = new Product();
+ product.getProductReferences().add(ref);
+ product.setProductStructure(Product.STRUCTURE_FLAT);
+
+ // Define configuration to extract basic file attributes
+ Properties config = new Properties();
+ config.setProperty("attributes", "*");
+
+ // Configure Extractor
+ fileAttributesExtractor.configure(config);
+
+ // Extract file attributes metadata
+ Metadata metadata = new Metadata();
+
+ try {
+ metadata = fileAttributesExtractor.doExtract(product, metadata);
+
+ } catch (MetExtractionException e) {
+ fail(e.getMessage());
+ }
+
+ // Test
+ assertNotNull(metadata);
+ assertTrue(metadata.containsKey(IS_SYMBOLIC_LINK));
+ assertTrue(metadata.containsKey(CREATION_TIME));
+ assertTrue(metadata.containsKey(LAST_MODIFIED_TIME));
+ assertTrue(metadata.containsKey(IS_OTHER));
+ assertTrue(metadata.containsKey(IS_DIRECTORY));
+ assertTrue(metadata.containsKey(FILE_KEY));
+ assertTrue(metadata.containsKey(LAST_ACCESS_TIME));
+ assertTrue(metadata.containsKey(IS_REGULAR_FILE));
+ assertTrue(metadata.containsKey(SIZE));
+ }
+
+ public void testExtractPosixFileAttributes() {
+ // Define Reference & Product
+ URL refUrl = this.getClass().getResource("/ingest/test.txt");
+ Reference ref = new Reference();
+ ref.setOrigReference(refUrl.toString());
+ ref.setDataStoreReference(refUrl.toString());
+
+ Product product = new Product();
+ product.getProductReferences().add(ref);
+ product.setProductStructure(Product.STRUCTURE_FLAT);
+
+ // Define configuration to extract basic file attributes
+ Properties config = new Properties();
+ config.setProperty("attributes", "posix:*");
+
+ // Configure Extractor
+ fileAttributesExtractor.configure(config);
+
+ // Extract file attributes metadata
+ Metadata metadata = new Metadata();
+
+ try {
+ metadata = fileAttributesExtractor.doExtract(product, metadata);
+ } catch (MetExtractionException e) {
+ fail(e.getMessage());
+ }
+
+ // Test
+ assertNotNull(metadata);
+ assertTrue(metadata.containsKey(OWNER));
+ assertTrue(metadata.containsKey(PERMISSIONS));
+ assertTrue(metadata.containsKey(GROUP));
+ }
+
+ public void testExtractSpecificFileAttributes() {
+ // Define Reference & Product
+ URL refUrl = this.getClass().getResource("/ingest/test.txt");
+ Reference ref = new Reference();
+ ref.setOrigReference(refUrl.toString());
+ ref.setDataStoreReference(refUrl.toString());
+
+ Product product = new Product();
+ product.getProductReferences().add(ref);
+ product.setProductStructure(Product.STRUCTURE_FLAT);
+
+ // Define configuration to extract basic file attributes
+ Properties config = new Properties();
+ config.setProperty("attributes", "posix:size,owner,creationTime");
+
+ // Configure Extractor
+ fileAttributesExtractor.configure(config);
+
+ // Extract file attributes metadata
+ Metadata metadata = new Metadata();
+
+ try {
+ metadata = fileAttributesExtractor.doExtract(product, metadata);
+ } catch (MetExtractionException e) {
+ fail(e.getMessage());
+ }
+
+ System.out.println(metadata.getAllKeys());
+ System.out.println(metadata.containsKey(OWNER));
+ System.out.println(metadata.containsKey(IS_SYMBOLIC_LINK));
+
+ // Test presence of expected attributes
+ assertNotNull(metadata);
+ assertTrue(metadata.containsKey(OWNER));
+ assertTrue(metadata.containsKey(SIZE));
+ assertTrue(metadata.containsKey(CREATION_TIME));
+
+ // Test absence of other attributes
+ assertFalse(metadata.containsKey(IS_SYMBOLIC_LINK));
+ assertFalse(metadata.containsKey(LAST_MODIFIED_TIME));
+ assertFalse(metadata.containsKey(IS_OTHER));
+ assertFalse(metadata.containsKey(IS_DIRECTORY));
+ assertFalse(metadata.containsKey(FILE_KEY));
+ assertFalse(metadata.containsKey(LAST_ACCESS_TIME));
+ assertFalse(metadata.containsKey(IS_REGULAR_FILE));
+
+ }
+}
[35/35] oodt git commit: Update log4j config.
Posted by ma...@apache.org.
Update log4j config.
Project: http://git-wip-us.apache.org/repos/asf/oodt/repo
Commit: http://git-wip-us.apache.org/repos/asf/oodt/commit/3fb76606
Tree: http://git-wip-us.apache.org/repos/asf/oodt/tree/3fb76606
Diff: http://git-wip-us.apache.org/repos/asf/oodt/diff/3fb76606
Branch: refs/heads/feature/zookeeper-config
Commit: 3fb76606a7f03e29626644ace73a0520f0deeaad
Parents: b357f4b
Author: Chris Mattmann <ma...@apache.org>
Authored: Fri Jul 14 20:46:27 2017 -0700
Committer: Chris Mattmann <ma...@apache.org>
Committed: Fri Jul 14 20:46:27 2017 -0700
----------------------------------------------------------------------
config/src/main/resources/etc/log4j.xml | 11 +++++++++++
1 file changed, 11 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/oodt/blob/3fb76606/config/src/main/resources/etc/log4j.xml
----------------------------------------------------------------------
diff --git a/config/src/main/resources/etc/log4j.xml b/config/src/main/resources/etc/log4j.xml
index 1b3dbdf..17d6e8e 100644
--- a/config/src/main/resources/etc/log4j.xml
+++ b/config/src/main/resources/etc/log4j.xml
@@ -26,9 +26,20 @@
</layout>
</appender>
+ <appender name="file" class="org.apache.log4j.FileAppender">
+ <param name="file" value="logs/log.out"/>
+ <param name="immediateFlush" value="true"/>
+ <param name="threshold" value="debug"/>
+ <param name="append" value="false"/>
+ <layout class="org.apache.log4j.PatternLayout">
+ <param name="ConversionPattern" value="%-5p %c{1} - %m%n"/>
+ </layout>
+ </appender>
+
<root>
<priority value="DEBUG"/>
<appender-ref ref="console"/>
+ <appender-ref ref="file"/>
</root>
<logger name="org.apache.zookeeper">
[19/35] oodt git commit: Improvements to file downloading from
zookeeper and tests
Posted by ma...@apache.org.
Improvements to file downloading from zookeeper and tests
Project: http://git-wip-us.apache.org/repos/asf/oodt/repo
Commit: http://git-wip-us.apache.org/repos/asf/oodt/commit/99b086b9
Tree: http://git-wip-us.apache.org/repos/asf/oodt/tree/99b086b9
Diff: http://git-wip-us.apache.org/repos/asf/oodt/diff/99b086b9
Branch: refs/heads/feature/zookeeper-config
Commit: 99b086b9887cafc8b89de3ff65fa61d3f80cc56c
Parents: e697405
Author: Imesha Sudasingha <im...@gmail.com>
Authored: Mon Jul 10 17:21:51 2017 +0530
Committer: Imesha Sudasingha <im...@gmail.com>
Committed: Mon Jul 10 17:21:51 2017 +0530
----------------------------------------------------------------------
.../oodt/config/ConfigurationManager.java | 6 +--
.../config/ConfigurationManagerFactory.java | 12 +++--
.../java/org/apache/oodt/config/Constants.java | 22 +++++++--
.../DistributedConfigurationManager.java | 40 +++++++++++-----
.../oodt/config/distributed/ZNodePaths.java | 4 ++
.../cli/DistributedConfigurationPublisher.java | 28 +++++------
.../StandaloneConfigurationManager.java | 3 +-
.../src/main/resources/etc/config-publisher.xml | 2 +-
.../DistributedConfigurationManagerTest.java | 11 +++--
.../src/test/resources/etc/config-publisher.xml | 4 +-
filemgr/src/main/assembly/assembly.xml | 49 ++++++++++----------
filemgr/src/main/bin/filemgr | 26 +++++++++--
.../cas/filemgr/system/XmlRpcFileManager.java | 8 +---
filemgr/src/main/resources/log4j.xml | 40 ++++++++++++++++
14 files changed, 177 insertions(+), 78 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/oodt/blob/99b086b9/config/src/main/java/org/apache/oodt/config/ConfigurationManager.java
----------------------------------------------------------------------
diff --git a/config/src/main/java/org/apache/oodt/config/ConfigurationManager.java b/config/src/main/java/org/apache/oodt/config/ConfigurationManager.java
index d65c4ae..d4706a2 100644
--- a/config/src/main/java/org/apache/oodt/config/ConfigurationManager.java
+++ b/config/src/main/java/org/apache/oodt/config/ConfigurationManager.java
@@ -24,15 +24,15 @@ package org.apache.oodt.config;
*/
public abstract class ConfigurationManager {
- protected String component;
+ protected Constants.Component component;
- public ConfigurationManager(String component) {
+ public ConfigurationManager(Constants.Component component) {
this.component = component;
}
public abstract void loadConfiguration() throws Exception;
- public String getComponent() {
+ public Constants.Component getComponent() {
return component;
}
}
http://git-wip-us.apache.org/repos/asf/oodt/blob/99b086b9/config/src/main/java/org/apache/oodt/config/ConfigurationManagerFactory.java
----------------------------------------------------------------------
diff --git a/config/src/main/java/org/apache/oodt/config/ConfigurationManagerFactory.java b/config/src/main/java/org/apache/oodt/config/ConfigurationManagerFactory.java
index 4d01e35..e616f96 100644
--- a/config/src/main/java/org/apache/oodt/config/ConfigurationManagerFactory.java
+++ b/config/src/main/java/org/apache/oodt/config/ConfigurationManagerFactory.java
@@ -19,9 +19,10 @@ package org.apache.oodt.config;
import org.apache.oodt.config.distributed.DistributedConfigurationManager;
import org.apache.oodt.config.standalone.StandaloneConfigurationManager;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import java.util.List;
-import java.util.logging.Logger;
import static org.apache.oodt.config.Constants.Properties.ENABLE_DISTRIBUTED_CONFIGURATION;
@@ -33,7 +34,7 @@ import static org.apache.oodt.config.Constants.Properties.ENABLE_DISTRIBUTED_CON
public class ConfigurationManagerFactory {
/** Logger instance for this class */
- private static final Logger logger = Logger.getLogger(ConfigurationManagerFactory.class.getName());
+ private static final Logger logger = LoggerFactory.getLogger(ConfigurationManagerFactory.class);
private ConfigurationManagerFactory() {
}
@@ -49,10 +50,13 @@ public class ConfigurationManagerFactory {
* management
* @return ConfigurationManager instance to used by the corresponding component.
*/
- public static ConfigurationManager getConfigurationManager(String component, List<String> propertiesFiles) {
- if (System.getProperty(ENABLE_DISTRIBUTED_CONFIGURATION) != null) {
+ public static ConfigurationManager getConfigurationManager(Constants.Component component, List<String> propertiesFiles) {
+ if (Boolean.getBoolean(ENABLE_DISTRIBUTED_CONFIGURATION)) {
+ logger.info("Using distributed configuration management for {}", component);
return new DistributedConfigurationManager(component);
}
+
+ logger.info("Using standalone configuration management for {}", component);
return new StandaloneConfigurationManager(component, propertiesFiles);
}
}
http://git-wip-us.apache.org/repos/asf/oodt/blob/99b086b9/config/src/main/java/org/apache/oodt/config/Constants.java
----------------------------------------------------------------------
diff --git a/config/src/main/java/org/apache/oodt/config/Constants.java b/config/src/main/java/org/apache/oodt/config/Constants.java
index 8c6f624..5fb62ed 100644
--- a/config/src/main/java/org/apache/oodt/config/Constants.java
+++ b/config/src/main/java/org/apache/oodt/config/Constants.java
@@ -61,9 +61,25 @@ public class Constants {
public static final String ZK_PASSWORD = "org.apache.oodt.config.zk.password";
}
- public static class Components {
- public static final String FILE_MANAGER = "filemgr";
- public static final String RESOURCE_MANAGER = "resmgr";
+ public enum Component {
+ FILE_MANAGER("filemgr", "FILEMGR_HOME"),
+ RESOURCE_MANAGER("resmgr", "RESMGR_HOME");
+
+ String name;
+ String home;
+
+ Component(String name, String home) {
+ this.name = name;
+ this.home = home;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public String getHome() {
+ return home;
+ }
}
public static class ZPaths {
http://git-wip-us.apache.org/repos/asf/oodt/blob/99b086b9/config/src/main/java/org/apache/oodt/config/distributed/DistributedConfigurationManager.java
----------------------------------------------------------------------
diff --git a/config/src/main/java/org/apache/oodt/config/distributed/DistributedConfigurationManager.java b/config/src/main/java/org/apache/oodt/config/distributed/DistributedConfigurationManager.java
index 67589fe..a5f1ef6 100644
--- a/config/src/main/java/org/apache/oodt/config/distributed/DistributedConfigurationManager.java
+++ b/config/src/main/java/org/apache/oodt/config/distributed/DistributedConfigurationManager.java
@@ -35,6 +35,7 @@ import java.util.concurrent.TimeUnit;
import static org.apache.oodt.config.Constants.Properties.ZK_CONNECT_STRING;
import static org.apache.oodt.config.Constants.Properties.ZK_PROPERTIES_FILE;
+import static org.apache.oodt.config.Constants.SEPARATOR;
/**
* Distributed configuration manager implementation. This class make use of a {@link CuratorFramework} instance to connect
@@ -50,13 +51,13 @@ public class DistributedConfigurationManager extends ConfigurationManager {
private String connectString;
private CuratorFramework client;
/** Name of the OODT component, to which this class is providing configuration support */
- private String componentName;
+ private Constants.Component component;
private ZNodePaths zNodePaths;
- public DistributedConfigurationManager(String component) {
+ public DistributedConfigurationManager(Constants.Component component) {
super(component);
- this.componentName = component;
- this.zNodePaths = new ZNodePaths(component);
+ this.component = component;
+ this.zNodePaths = new ZNodePaths(this.component.getName());
if (System.getProperty(ZK_PROPERTIES_FILE) == null && System.getProperty(Constants.Properties.ZK_CONNECT_STRING) == null) {
throw new IllegalArgumentException("Zookeeper requires system properties " + ZK_PROPERTIES_FILE + " or " + ZK_CONNECT_STRING + " to be set");
@@ -107,13 +108,13 @@ public class DistributedConfigurationManager extends ConfigurationManager {
@Override
public void loadConfiguration() throws Exception {
- logger.debug("Loading properties for : {}", componentName);
+ logger.debug("Loading properties for : {}", component);
loadProperties();
- logger.info("Properties loaded for : {}", componentName);
+ logger.info("Properties loaded for : {}", component);
- logger.debug("Saving configuration files for : {}", componentName);
+ logger.debug("Saving configuration files for : {}", component);
saveConfigFiles();
- logger.info("Configuration files saved for : {}", componentName);
+ logger.info("Configuration files saved for : {}", component);
}
/**
@@ -136,8 +137,12 @@ public class DistributedConfigurationManager extends ConfigurationManager {
try (InputStream in = new ByteArrayInputStream(bytes)) {
System.getProperties().load(in);
}
-
logger.info("Properties loaded from ZNode at : {}", propertiesFileZNodePath);
+
+ String localFilePath = zNodePaths.getLocalPropertiesFilePath(propertiesFileZNodePath);
+ localFilePath = fixForComponentHome(localFilePath);
+ FileUtils.writeByteArrayToFile(new File(localFilePath), bytes);
+ logger.info("Properties file from ZNode at {} saved to {}", propertiesFileZNodePath, localFilePath);
}
}
@@ -161,13 +166,24 @@ public class DistributedConfigurationManager extends ConfigurationManager {
byte[] bytes = client.getData().forPath(configFileZNodePath);
String localFilePath = zNodePaths.getLocalConfigFilePath(configFileZNodePath);
+ localFilePath = fixForComponentHome(localFilePath);
FileUtils.writeByteArrayToFile(new File(localFilePath), bytes);
- logger.info("Config file from ZNode at {} saved to {}", configFileZNodePath);
+ logger.info("Config file from ZNode at {} saved to {}", configFileZNodePath, localFilePath);
+ }
+ }
+
+ private String fixForComponentHome(String suffixPath) {
+ String prefix = System.getenv().get(component.getHome());
+ StringBuilder path = new StringBuilder();
+ if (prefix != null) {
+ path.append(prefix.endsWith(SEPARATOR) ? prefix : prefix + SEPARATOR);
}
+ path.append(suffixPath.startsWith(SEPARATOR) ? suffixPath.substring(1) : suffixPath);
+ return path.toString();
}
- public String getComponentName() {
- return componentName;
+ public Constants.Component getComponent() {
+ return component;
}
public ZNodePaths getzNodePaths() {
http://git-wip-us.apache.org/repos/asf/oodt/blob/99b086b9/config/src/main/java/org/apache/oodt/config/distributed/ZNodePaths.java
----------------------------------------------------------------------
diff --git a/config/src/main/java/org/apache/oodt/config/distributed/ZNodePaths.java b/config/src/main/java/org/apache/oodt/config/distributed/ZNodePaths.java
index 90fa9a5..eb40fa4 100644
--- a/config/src/main/java/org/apache/oodt/config/distributed/ZNodePaths.java
+++ b/config/src/main/java/org/apache/oodt/config/distributed/ZNodePaths.java
@@ -81,4 +81,8 @@ public class ZNodePaths {
public String getLocalConfigFilePath(String zNodePath) {
return zNodePath.substring(configurationZNodeRoot.length());
}
+
+ public String getLocalPropertiesFilePath(String zNodePath) {
+ return zNodePath.substring(propertiesZNodeRoot.length());
+ }
}
http://git-wip-us.apache.org/repos/asf/oodt/blob/99b086b9/config/src/main/java/org/apache/oodt/config/distributed/cli/DistributedConfigurationPublisher.java
----------------------------------------------------------------------
diff --git a/config/src/main/java/org/apache/oodt/config/distributed/cli/DistributedConfigurationPublisher.java b/config/src/main/java/org/apache/oodt/config/distributed/cli/DistributedConfigurationPublisher.java
index 8cdc6c6..0036664 100644
--- a/config/src/main/java/org/apache/oodt/config/distributed/cli/DistributedConfigurationPublisher.java
+++ b/config/src/main/java/org/apache/oodt/config/distributed/cli/DistributedConfigurationPublisher.java
@@ -54,11 +54,11 @@ public class DistributedConfigurationPublisher {
private String connectString;
private CuratorFramework client;
private ZNodePaths zNodePaths;
- private String componentName;
+ private Constants.Component component;
- public DistributedConfigurationPublisher(String componentName) {
- this.componentName = componentName;
- this.zNodePaths = new ZNodePaths(componentName);
+ public DistributedConfigurationPublisher(Constants.Component component) {
+ this.component = component;
+ this.zNodePaths = new ZNodePaths(this.component.getName());
if (System.getProperty(ZK_PROPERTIES_FILE) == null && System.getProperty(ZK_CONNECT_STRING) == null) {
throw new IllegalArgumentException("Zookeeper requires system properties " + ZK_PROPERTIES_FILE + " or " + ZK_CONNECT_STRING + " to be set");
@@ -150,7 +150,7 @@ public class DistributedConfigurationPublisher {
}
/**
- * Removes all the nodes from zookeeper where the configuration corresponding to component {@link #componentName} is
+ * Removes all the nodes from zookeeper where the configuration corresponding to component {@link #component} is
* stored
*
* @throws Exception zookeeper errors
@@ -284,20 +284,20 @@ public class DistributedConfigurationPublisher {
for (Object bean : distributedConfigurationPublisher.values()) {
DistributedConfigurationPublisher publisher = (DistributedConfigurationPublisher) bean;
- System.out.println(String.format("\nProcessing commands for component : %s", publisher.getComponentName()));
+ System.out.println(String.format("\nProcessing commands for component : %s", publisher.getComponent()));
if (cmdLineOptions.isPublish()) {
- System.out.println(String.format("Publishing configuration for : %s", publisher.getComponentName()));
+ System.out.println(String.format("Publishing configuration for : %s", publisher.getComponent()));
publisher.publishConfiguration();
- System.out.println(String.format("Published configuration for : %s", publisher.getComponentName()));
+ System.out.println(String.format("Published configuration for : %s", publisher.getComponent()));
System.out.println();
}
if (cmdLineOptions.isVerify()) {
- System.out.println(String.format("Verifying configuration for : %s", publisher.getComponentName()));
+ System.out.println(String.format("Verifying configuration for : %s", publisher.getComponent()));
if (publisher.verifyPublishedConfiguration()) {
System.out.println("OK... Configuration verified");
- System.out.println(String.format("Verified configuration for : %s", publisher.getComponentName()));
+ System.out.println(String.format("Verified configuration for : %s", publisher.getComponent()));
} else {
System.err.println("ERROR... Published configuration doesn't match the local files. Please check above logs");
}
@@ -305,9 +305,9 @@ public class DistributedConfigurationPublisher {
}
if (cmdLineOptions.isClear()) {
- System.out.println(String.format("Clearing configuration for : %s", publisher.getComponentName()));
+ System.out.println(String.format("Clearing configuration for : %s", publisher.getComponent()));
publisher.clearConfiguration();
- System.out.println(String.format("Cleared configuration for : %s", publisher.getComponentName()));
+ System.out.println(String.format("Cleared configuration for : %s", publisher.getComponent()));
System.out.println();
}
@@ -324,7 +324,7 @@ public class DistributedConfigurationPublisher {
logger.info("Exiting CLI ...");
}
- public String getComponentName() {
- return componentName;
+ public Constants.Component getComponent() {
+ return component;
}
}
http://git-wip-us.apache.org/repos/asf/oodt/blob/99b086b9/config/src/main/java/org/apache/oodt/config/standalone/StandaloneConfigurationManager.java
----------------------------------------------------------------------
diff --git a/config/src/main/java/org/apache/oodt/config/standalone/StandaloneConfigurationManager.java b/config/src/main/java/org/apache/oodt/config/standalone/StandaloneConfigurationManager.java
index 8d932fb..3e82580 100644
--- a/config/src/main/java/org/apache/oodt/config/standalone/StandaloneConfigurationManager.java
+++ b/config/src/main/java/org/apache/oodt/config/standalone/StandaloneConfigurationManager.java
@@ -18,6 +18,7 @@
package org.apache.oodt.config.standalone;
import org.apache.oodt.config.ConfigurationManager;
+import org.apache.oodt.config.Constants;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -37,7 +38,7 @@ public class StandaloneConfigurationManager extends ConfigurationManager {
private List<String> propertiesFiles;
- public StandaloneConfigurationManager(String component, List<String> propertiesFiles) {
+ public StandaloneConfigurationManager(Constants.Component component, List<String> propertiesFiles) {
super(component);
this.propertiesFiles = propertiesFiles != null ? propertiesFiles : new ArrayList<String>();
}
http://git-wip-us.apache.org/repos/asf/oodt/blob/99b086b9/config/src/main/resources/etc/config-publisher.xml
----------------------------------------------------------------------
diff --git a/config/src/main/resources/etc/config-publisher.xml b/config/src/main/resources/etc/config-publisher.xml
index dab33c3..443a7a5 100644
--- a/config/src/main/resources/etc/config-publisher.xml
+++ b/config/src/main/resources/etc/config-publisher.xml
@@ -21,7 +21,7 @@
<!-- Configuration publisher for File Manager OODT Component -->
<bean id="filemgr-config-publisher" class="org.apache.oodt.config.distributed.cli.DistributedConfigurationPublisher">
- <constructor-arg value="filemgr"/>
+ <constructor-arg value="FILE_MANAGER"/>
<property name="propertiesFiles">
<map key-type="java.lang.String" value-type="java.lang.String">
<entry key="../examples/filemgr/filemgr.properties" value="/etc/filemgr.properties"/>
http://git-wip-us.apache.org/repos/asf/oodt/blob/99b086b9/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationManagerTest.java
----------------------------------------------------------------------
diff --git a/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationManagerTest.java b/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationManagerTest.java
index 2aa855c..1d8c716 100644
--- a/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationManagerTest.java
+++ b/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationManagerTest.java
@@ -70,20 +70,25 @@ public class DistributedConfigurationManagerTest extends AbstractDistributedConf
@Test
public void loadConfigurationTest() throws Exception {
for (DistributedConfigurationPublisher publisher : publishers) {
- ConfigurationManager configurationManager = new DistributedConfigurationManager(publisher.getComponentName());
+ ConfigurationManager configurationManager = new DistributedConfigurationManager(publisher.getComponent());
configurationManager.loadConfiguration();
// Checking for configuration files
for (Map.Entry<String, String> entry : publisher.getPropertiesFiles().entrySet()) {
- File file = new File(entry.getKey());
+ File originalFile = new File(entry.getKey());
Properties properties = new Properties();
- try (InputStream in = new FileInputStream(file)) {
+ try (InputStream in = new FileInputStream(originalFile)) {
properties.load(in);
}
for (String key : properties.stringPropertyNames()) {
Assert.assertEquals(properties.getProperty(key), System.getProperty(key));
}
+
+ String fileName = entry.getValue();
+ fileName = fileName.startsWith(SEPARATOR) ? fileName.substring(1) : fileName;
+ File downloadedFile = new File(fileName);
+ Assert.assertTrue(downloadedFile.exists());
}
// Checking for configuration files
http://git-wip-us.apache.org/repos/asf/oodt/blob/99b086b9/config/src/test/resources/etc/config-publisher.xml
----------------------------------------------------------------------
diff --git a/config/src/test/resources/etc/config-publisher.xml b/config/src/test/resources/etc/config-publisher.xml
index f779f14..89e16f3 100644
--- a/config/src/test/resources/etc/config-publisher.xml
+++ b/config/src/test/resources/etc/config-publisher.xml
@@ -20,7 +20,7 @@
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
<bean id="filemgr-config-publisher" class="org.apache.oodt.config.distributed.cli.DistributedConfigurationPublisher">
- <constructor-arg value="filemgr"/>
+ <constructor-arg value="FILE_MANAGER"/>
<property name="propertiesFiles">
<map key-type="java.lang.String" value-type="java.lang.String">
<entry key="src/main/resources/examples/filemgr/filemgr.properties" value="/etc/filemgr.properties"/>
@@ -39,7 +39,7 @@
</bean>
<bean id="resmgr-config-publisher" class="org.apache.oodt.config.distributed.cli.DistributedConfigurationPublisher">
- <constructor-arg value="resmgr"/>
+ <constructor-arg value="RESOURCE_MANAGER"/>
<property name="propertiesFiles">
<map key-type="java.lang.String" value-type="java.lang.String">
<entry key="src/main/resources/examples/resmgr/resource.properties" value="/etc/resource.properties"/>
http://git-wip-us.apache.org/repos/asf/oodt/blob/99b086b9/filemgr/src/main/assembly/assembly.xml
----------------------------------------------------------------------
diff --git a/filemgr/src/main/assembly/assembly.xml b/filemgr/src/main/assembly/assembly.xml
index db50901..07a8a9c 100644
--- a/filemgr/src/main/assembly/assembly.xml
+++ b/filemgr/src/main/assembly/assembly.xml
@@ -17,24 +17,24 @@
*/
$Id$
--->
-<assembly>
- <id>dist</id>
- <formats>
+-->
+<assembly>
+ <id>dist</id>
+ <formats>
<format>tar.gz</format>
- <format>zip</format>
+ <format>zip</format>
</formats>
<includeBaseDirectory>true</includeBaseDirectory>
<baseDirectory>${project.artifactId}-${project.version}</baseDirectory>
- <includeSiteDirectory>false</includeSiteDirectory>
- <fileSets>
- <fileSet>
- <directory>${basedir}</directory>
- <outputDirectory>.</outputDirectory>
- <includes>
- <include>LICENSE.txt</include>
- <include>CHANGES.txt</include>
- </includes>
+ <includeSiteDirectory>false</includeSiteDirectory>
+ <fileSets>
+ <fileSet>
+ <directory>${basedir}</directory>
+ <outputDirectory>.</outputDirectory>
+ <includes>
+ <include>LICENSE.txt</include>
+ <include>CHANGES.txt</include>
+ </includes>
</fileSet>
<fileSet>
<directory>${basedir}/src/main/bin</directory>
@@ -55,6 +55,7 @@ $Id$
<includes>
<include>filemgr.properties</include>
<include>logging.properties</include>
+ <include>log4j.xml</include>
</includes>
</fileSet>
<fileSet>
@@ -83,15 +84,15 @@ $Id$
<filtered>false</filtered>
<outputDirectory>doc</outputDirectory>
<excludes/>
- </fileSet>
- </fileSets>
- <dependencySets>
- <dependencySet>
- <outputDirectory>lib</outputDirectory>
+ </fileSet>
+ </fileSets>
+ <dependencySets>
+ <dependencySet>
+ <outputDirectory>lib</outputDirectory>
<unpack>false</unpack>
<useProjectArtifact>true</useProjectArtifact>
- <useTransitiveDependencies>true</useTransitiveDependencies>
- <unpackOptions/>
- </dependencySet>
- </dependencySets>
-</assembly>
+ <useTransitiveDependencies>true</useTransitiveDependencies>
+ <unpackOptions/>
+ </dependencySet>
+ </dependencySets>
+</assembly>
http://git-wip-us.apache.org/repos/asf/oodt/blob/99b086b9/filemgr/src/main/bin/filemgr
----------------------------------------------------------------------
diff --git a/filemgr/src/main/bin/filemgr b/filemgr/src/main/bin/filemgr
index 2049ded..1a4af47 100644
--- a/filemgr/src/main/bin/filemgr
+++ b/filemgr/src/main/bin/filemgr
@@ -34,14 +34,14 @@ else
fi
export JAVA_HOME
-CAS_FILEMGR_HOME=..
-export CAS_FILEMGR_HOME
-RUN_HOME=${CAS_FILEMGR_HOME}/../run
+FILEMGR_HOME=..
+export FILEMGR_HOME
+RUN_HOME=${FILEMGR_HOME}/../run
export RUN_HOME
CAS_FILEMGR_PROPS=../etc/filemgr.properties
export CAS_FILEMGR_PROPS
-PATH=${JAVA_HOME}/bin:${CAS_FILEMGR_HOME}/bin:/usr/bin:/bin:/usr/sbin:/sbin
+PATH=${JAVA_HOME}/bin:${FILEMGR_HOME}/bin:/usr/bin:/bin:/usr/sbin:/sbin
export PATH
## make sure that casfile manager has a run directory
@@ -52,13 +52,29 @@ for file in `find ../lib/*.jar`; do
LIB_DEPS="${file}:${LIB_DEPS}"
done
+if [ ! -z $OODT_DISTRIBUTED_CONF ]
+ then
+ if [ ! -z $ZK_CONNECT_STRING ]
+ then
+ echo "Using distributed configuration management"
+ DISTRIBUTED_CONF_PROPERTIES="-Dorg.apache.oodt.config.zk.connectString=${ZK_CONNECT_STRING} -Dorg.apache.oodt.config.distributed=true"
+ else
+ echo "Zookeeper connect string (ZK_CONNECT_STRING) is not set while OODT_DISTRIBUTED_CONF is set"
+ exit 1
+ fi
+else
+ echo "Using standalone configuration management"
+fi
+
# See how we were called.
case "$1" in
start)
echo -n "Starting cas file manager: "
$JAVA_HOME/bin/java \
-cp ${LIB_DEPS} \
- -Djava.util.logging.config.file=${CAS_FILEMGR_HOME}/etc/logging.properties \
+ ${DISTRIBUTED_CONF_PROPERTIES} \
+ -Dlog4j.configuration=./${FILEMGR_HOME}/etc/log4j.xml \
+ -Djava.util.logging.config.file=${FILEMGR_HOME}/etc/logging.properties \
-Dorg.apache.oodt.cas.filemgr.properties=${CAS_FILEMGR_PROPS} \
org.apache.oodt.cas.filemgr.system.XmlRpcFileManager \
--portNum $SERVER_PORT &
http://git-wip-us.apache.org/repos/asf/oodt/blob/99b086b9/filemgr/src/main/java/org/apache/oodt/cas/filemgr/system/XmlRpcFileManager.java
----------------------------------------------------------------------
diff --git a/filemgr/src/main/java/org/apache/oodt/cas/filemgr/system/XmlRpcFileManager.java b/filemgr/src/main/java/org/apache/oodt/cas/filemgr/system/XmlRpcFileManager.java
index 0b9501e..60ee1bf 100644
--- a/filemgr/src/main/java/org/apache/oodt/cas/filemgr/system/XmlRpcFileManager.java
+++ b/filemgr/src/main/java/org/apache/oodt/cas/filemgr/system/XmlRpcFileManager.java
@@ -43,6 +43,7 @@ import org.apache.oodt.cas.metadata.exceptions.MetExtractionException;
import org.apache.oodt.commons.date.DateUtils;
import org.apache.oodt.config.ConfigurationManager;
import org.apache.oodt.config.ConfigurationManagerFactory;
+import org.apache.oodt.config.Constants;
import org.apache.xmlrpc.WebServer;
import java.io.*;
@@ -54,9 +55,6 @@ import java.util.concurrent.ConcurrentHashMap;
import java.util.logging.Level;
import java.util.logging.Logger;
-import static org.apache.oodt.config.Constants.Components.FILE_MANAGER;
-
-
/**
* @author mattmann
* @author bfoster
@@ -111,12 +109,10 @@ public class XmlRpcFileManager {
// set up the configuration, if there is any
if (System.getProperty("org.apache.oodt.cas.filemgr.properties") != null) {
- String propertiesFile = System.getProperty("org.apache.oodt.cas.filemgr.properties");
- LOG.log(Level.INFO, "Using File Manager Configuration Properties file : [" + propertiesFile + "]");
propertiesFiles.add(System.getProperty("org.apache.oodt.cas.filemgr.properties"));
}
- configurationManager = ConfigurationManagerFactory.getConfigurationManager(FILE_MANAGER, propertiesFiles);
+ configurationManager = ConfigurationManagerFactory.getConfigurationManager(Constants.Component.FILE_MANAGER, propertiesFiles);
this.loadConfiguration();
LOG.log(Level.INFO, "File Manager started by " + System.getProperty("user.name", "unknown"));
http://git-wip-us.apache.org/repos/asf/oodt/blob/99b086b9/filemgr/src/main/resources/log4j.xml
----------------------------------------------------------------------
diff --git a/filemgr/src/main/resources/log4j.xml b/filemgr/src/main/resources/log4j.xml
new file mode 100644
index 0000000..0421de2
--- /dev/null
+++ b/filemgr/src/main/resources/log4j.xml
@@ -0,0 +1,40 @@
+<?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.
+ -->
+
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
+ <appender name="console" class="org.apache.log4j.ConsoleAppender">
+ <param name="Target" value="System.out"/>
+ <layout class="org.apache.log4j.PatternLayout">
+ <param name="ConversionPattern" value="%-5p %c{1} - %m%n"/>
+ </layout>
+ </appender>
+
+ <root>
+ <priority value="INFO"/>
+ <appender-ref ref="console"/>
+ </root>
+
+ <logger name="org.apache.zookeeper">
+ <level value="ERROR"/>
+ </logger>
+ <logger name="org.apache.curator">
+ <level value="ERROR"/>
+ </logger>
+</log4j:configuration>
\ No newline at end of file
[25/35] oodt git commit: Removed * imports. Improved code formatting
and refactored code.
Posted by ma...@apache.org.
Removed * imports. Improved code formatting and refactored code.
Project: http://git-wip-us.apache.org/repos/asf/oodt/repo
Commit: http://git-wip-us.apache.org/repos/asf/oodt/commit/041cc678
Tree: http://git-wip-us.apache.org/repos/asf/oodt/tree/041cc678
Diff: http://git-wip-us.apache.org/repos/asf/oodt/diff/041cc678
Branch: refs/heads/feature/zookeeper-config
Commit: 041cc678333834fcd9a5d3fe263f4b3cf8a29bd7
Parents: d63d91f
Author: Imesha Sudasingha <im...@gmail.com>
Authored: Tue Jul 11 08:30:18 2017 +0530
Committer: Imesha Sudasingha <im...@gmail.com>
Committed: Tue Jul 11 08:30:18 2017 +0530
----------------------------------------------------------------------
README.md | 26 ++++++----
.../java/org/apache/oodt/config/Component.java | 50 ++++++++++++++++++++
.../oodt/config/ConfigurationManager.java | 6 +--
.../config/ConfigurationManagerFactory.java | 2 +-
.../java/org/apache/oodt/config/Constants.java | 21 --------
.../DistributedConfigurationManager.java | 11 +++--
.../oodt/config/distributed/ZNodePaths.java | 8 +++-
.../config/distributed/cli/CmdLineOptions.java | 3 +-
.../cli/DistributedConfigurationPublisher.java | 15 +++---
.../config/distributed/utils/CuratorUtils.java | 13 ++---
.../StandaloneConfigurationManager.java | 4 +-
.../cas/filemgr/system/XmlRpcFileManager.java | 34 ++++++++++---
12 files changed, 130 insertions(+), 63 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/oodt/blob/041cc678/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index 2337b92..46e7fd5 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,6 @@
-# Welcome to Apache OODT <http://oodt.apache.org/>
+=============================================================
+ Welcome to Apache OODT <http://oodt.apache.org/>
+=============================================================
OODT is a grid middleware framework used on a number of successful projects at
NASA's Jet Propulsion Laboratory/California Institute of Technology, and many
@@ -17,7 +19,8 @@ other research institutions and universities, specifically those part of the:
OODT is a Top Level project of the Apache Software Foundation
<http://www.apache.org/>.
-## Getting Started
+Getting Started
+===============
OODT is primarily written in Java, with some components available in Python.
It requires Java 5 and uses the Maven 2 <http://maven.apache.org/> build
@@ -28,8 +31,8 @@ this directory:
For the Python components, see the "agility" subdirectory.
-## Contributing
-
+Contributing
+============
To contribute a patch, follow these instructions (note that installing
[Hub](http://hub.github.com) is not strictly required, but is recommended).
@@ -50,7 +53,8 @@ To contribute a patch, follow these instructions (note that installing
```
-## License (see also LICENSE.txt)
+License (see also LICENSE.txt)
+==============================
Collective work: Copyright 2010-2012 The Apache Software Foundation.
@@ -73,7 +77,8 @@ Apache OODT includes a number of subcomponents with separate copyright
notices and license terms. Your use of these subcomponents is subject to
the terms and conditions of the licenses listed in the LICENSE.txt file.
-## Export control
+Export control
+==============
This distribution includes cryptographic software. The country in which you
currently reside may have restrictions on the import, possession, use, and/or
@@ -99,7 +104,8 @@ The following provides more details on the included cryptographic software:
encrypted PDF files. See http://www.bouncycastle.org/ for more details on
Bouncy Castle.
-## Documentation
+Documentation
+=============
You can build a local copy of the OODT documentation including JavaDocs using
the following Maven 2 command in the OODT source directory:
@@ -119,7 +125,8 @@ than likely you'll need to add to the MAVEN_OPTS environment variable in order
to set the Java heap maximum size with "-Xmx512m" or larger before attempting
to run "mvn site".
-## Mailing Lists
+Mailing Lists
+=============
Discussion about OODT takes place on the following mailing lists:
@@ -137,7 +144,8 @@ dev-subscribe@oodt...). To unsubscribe, send a message to
<LIST>-unsubscribe@oodt.apache.org. For more instructions, send a
message to <LIST>-help@oodt.apache.org.
-## Issue Tracker
+Issue Tracker
+=============
If you encounter errors in OODT or want to suggest an improvement or a new
feature, please visit the OODT issue tracker
http://git-wip-us.apache.org/repos/asf/oodt/blob/041cc678/config/src/main/java/org/apache/oodt/config/Component.java
----------------------------------------------------------------------
diff --git a/config/src/main/java/org/apache/oodt/config/Component.java b/config/src/main/java/org/apache/oodt/config/Component.java
new file mode 100644
index 0000000..2c7123e
--- /dev/null
+++ b/config/src/main/java/org/apache/oodt/config/Component.java
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.oodt.config;
+
+/**
+ * An enum to represent available OODT components and their corresponding names to be used when setting up configuration
+ * management.
+ *
+ * @author Imesha Sudasingha
+ */
+public enum Component {
+ FILE_MANAGER("filemgr", "FILEMGR_HOME"),
+ RESOURCE_MANAGER("resmgr", "RESMGR_HOME");
+
+ /** Shorthand name of the component. Will be used when creating ZNodes in zookeeper */
+ String name;
+ /**
+ * Environment variable of ${COMPONENT_HOME} which will be set by the executing script when running that component.
+ * For example, ${FILEMGR_HOME} will be set by the {@link #FILE_MANAGER} bash script.
+ */
+ String home;
+
+ Component(String name, String home) {
+ this.name = name;
+ this.home = home;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public String getHome() {
+ return home;
+ }
+}
http://git-wip-us.apache.org/repos/asf/oodt/blob/041cc678/config/src/main/java/org/apache/oodt/config/ConfigurationManager.java
----------------------------------------------------------------------
diff --git a/config/src/main/java/org/apache/oodt/config/ConfigurationManager.java b/config/src/main/java/org/apache/oodt/config/ConfigurationManager.java
index d4706a2..56fea0d 100644
--- a/config/src/main/java/org/apache/oodt/config/ConfigurationManager.java
+++ b/config/src/main/java/org/apache/oodt/config/ConfigurationManager.java
@@ -24,15 +24,15 @@ package org.apache.oodt.config;
*/
public abstract class ConfigurationManager {
- protected Constants.Component component;
+ protected Component component;
- public ConfigurationManager(Constants.Component component) {
+ public ConfigurationManager(Component component) {
this.component = component;
}
public abstract void loadConfiguration() throws Exception;
- public Constants.Component getComponent() {
+ public Component getComponent() {
return component;
}
}
http://git-wip-us.apache.org/repos/asf/oodt/blob/041cc678/config/src/main/java/org/apache/oodt/config/ConfigurationManagerFactory.java
----------------------------------------------------------------------
diff --git a/config/src/main/java/org/apache/oodt/config/ConfigurationManagerFactory.java b/config/src/main/java/org/apache/oodt/config/ConfigurationManagerFactory.java
index e616f96..9eecfaa 100644
--- a/config/src/main/java/org/apache/oodt/config/ConfigurationManagerFactory.java
+++ b/config/src/main/java/org/apache/oodt/config/ConfigurationManagerFactory.java
@@ -50,7 +50,7 @@ public class ConfigurationManagerFactory {
* management
* @return ConfigurationManager instance to used by the corresponding component.
*/
- public static ConfigurationManager getConfigurationManager(Constants.Component component, List<String> propertiesFiles) {
+ public static ConfigurationManager getConfigurationManager(Component component, List<String> propertiesFiles) {
if (Boolean.getBoolean(ENABLE_DISTRIBUTED_CONFIGURATION)) {
logger.info("Using distributed configuration management for {}", component);
return new DistributedConfigurationManager(component);
http://git-wip-us.apache.org/repos/asf/oodt/blob/041cc678/config/src/main/java/org/apache/oodt/config/Constants.java
----------------------------------------------------------------------
diff --git a/config/src/main/java/org/apache/oodt/config/Constants.java b/config/src/main/java/org/apache/oodt/config/Constants.java
index 5fb62ed..0453eaa 100644
--- a/config/src/main/java/org/apache/oodt/config/Constants.java
+++ b/config/src/main/java/org/apache/oodt/config/Constants.java
@@ -61,27 +61,6 @@ public class Constants {
public static final String ZK_PASSWORD = "org.apache.oodt.config.zk.password";
}
- public enum Component {
- FILE_MANAGER("filemgr", "FILEMGR_HOME"),
- RESOURCE_MANAGER("resmgr", "RESMGR_HOME");
-
- String name;
- String home;
-
- Component(String name, String home) {
- this.name = name;
- this.home = home;
- }
-
- public String getName() {
- return name;
- }
-
- public String getHome() {
- return home;
- }
- }
-
public static class ZPaths {
/** Separator for ZNode paths */
public static final String SEPARATOR = "/";
http://git-wip-us.apache.org/repos/asf/oodt/blob/041cc678/config/src/main/java/org/apache/oodt/config/distributed/DistributedConfigurationManager.java
----------------------------------------------------------------------
diff --git a/config/src/main/java/org/apache/oodt/config/distributed/DistributedConfigurationManager.java b/config/src/main/java/org/apache/oodt/config/distributed/DistributedConfigurationManager.java
index a5f1ef6..6572270 100644
--- a/config/src/main/java/org/apache/oodt/config/distributed/DistributedConfigurationManager.java
+++ b/config/src/main/java/org/apache/oodt/config/distributed/DistributedConfigurationManager.java
@@ -19,6 +19,7 @@ package org.apache.oodt.config.distributed;
import org.apache.commons.io.FileUtils;
import org.apache.curator.framework.CuratorFramework;
+import org.apache.oodt.config.Component;
import org.apache.oodt.config.ConfigurationManager;
import org.apache.oodt.config.Constants;
import org.apache.oodt.config.Constants.Properties;
@@ -38,8 +39,8 @@ import static org.apache.oodt.config.Constants.Properties.ZK_PROPERTIES_FILE;
import static org.apache.oodt.config.Constants.SEPARATOR;
/**
- * Distributed configuration manager implementation. This class make use of a {@link CuratorFramework} instance to connect
- * to zookeeper
+ * Distributed configuration manager implementation. This class make use of a {@link CuratorFramework} instance to
+ * connect to zookeeper
*
* @author Imesha Sudasingha.
*/
@@ -51,10 +52,10 @@ public class DistributedConfigurationManager extends ConfigurationManager {
private String connectString;
private CuratorFramework client;
/** Name of the OODT component, to which this class is providing configuration support */
- private Constants.Component component;
+ private Component component;
private ZNodePaths zNodePaths;
- public DistributedConfigurationManager(Constants.Component component) {
+ public DistributedConfigurationManager(Component component) {
super(component);
this.component = component;
this.zNodePaths = new ZNodePaths(this.component.getName());
@@ -182,7 +183,7 @@ public class DistributedConfigurationManager extends ConfigurationManager {
return path.toString();
}
- public Constants.Component getComponent() {
+ public Component getComponent() {
return component;
}
http://git-wip-us.apache.org/repos/asf/oodt/blob/041cc678/config/src/main/java/org/apache/oodt/config/distributed/ZNodePaths.java
----------------------------------------------------------------------
diff --git a/config/src/main/java/org/apache/oodt/config/distributed/ZNodePaths.java b/config/src/main/java/org/apache/oodt/config/distributed/ZNodePaths.java
index eb40fa4..01792ba 100644
--- a/config/src/main/java/org/apache/oodt/config/distributed/ZNodePaths.java
+++ b/config/src/main/java/org/apache/oodt/config/distributed/ZNodePaths.java
@@ -17,7 +17,10 @@
package org.apache.oodt.config.distributed;
-import static org.apache.oodt.config.Constants.ZPaths.*;
+import static org.apache.oodt.config.Constants.ZPaths.COMPONENTS_PATH_NAME;
+import static org.apache.oodt.config.Constants.ZPaths.CONFIGURATION_PATH_NAME;
+import static org.apache.oodt.config.Constants.ZPaths.PROPERTIES_PATH_NAME;
+import static org.apache.oodt.config.Constants.ZPaths.SEPARATOR;
/**
* Class responsible for handling all the Zookeeper ZNode paths related to configuration
@@ -39,7 +42,8 @@ public class ZNodePaths {
private String configurationZNodeRoot;
/**
- * Creates the ZNode path structure accordingly to the <pre>componentName</pre> and <pre>propertiesFileNames</pre> given.
+ * Creates the ZNode path structure accordingly to the <pre>componentName</pre> and <pre>propertiesFileNames</pre>
+ * given.
*
* @param componentName Name of the OODT component
*/
http://git-wip-us.apache.org/repos/asf/oodt/blob/041cc678/config/src/main/java/org/apache/oodt/config/distributed/cli/CmdLineOptions.java
----------------------------------------------------------------------
diff --git a/config/src/main/java/org/apache/oodt/config/distributed/cli/CmdLineOptions.java b/config/src/main/java/org/apache/oodt/config/distributed/cli/CmdLineOptions.java
index b6972d5..a262387 100644
--- a/config/src/main/java/org/apache/oodt/config/distributed/cli/CmdLineOptions.java
+++ b/config/src/main/java/org/apache/oodt/config/distributed/cli/CmdLineOptions.java
@@ -30,7 +30,8 @@ public class CmdLineOptions {
private String connectString;
@Option(name = "-publish", usage = "Publishes configuration specified in the spring config file to zookeeper. " +
- "Any current similar config in zookeeper will be overwritten. If not specified, command will be assumed as a publish")
+ "Any current similar config in zookeeper will be overwritten. If not specified, " +
+ "command will be assumed as a publish")
private boolean publish = false;
@Option(name = "-verify", usage = "Verifies the content in the local files and the published ones. Results will be printed.")
http://git-wip-us.apache.org/repos/asf/oodt/blob/041cc678/config/src/main/java/org/apache/oodt/config/distributed/cli/DistributedConfigurationPublisher.java
----------------------------------------------------------------------
diff --git a/config/src/main/java/org/apache/oodt/config/distributed/cli/DistributedConfigurationPublisher.java b/config/src/main/java/org/apache/oodt/config/distributed/cli/DistributedConfigurationPublisher.java
index 0036664..25a45ba 100644
--- a/config/src/main/java/org/apache/oodt/config/distributed/cli/DistributedConfigurationPublisher.java
+++ b/config/src/main/java/org/apache/oodt/config/distributed/cli/DistributedConfigurationPublisher.java
@@ -19,6 +19,7 @@ package org.apache.oodt.config.distributed.cli;
import org.apache.commons.io.FileUtils;
import org.apache.curator.framework.CuratorFramework;
+import org.apache.oodt.config.Component;
import org.apache.oodt.config.Constants;
import org.apache.oodt.config.distributed.ZNodePaths;
import org.apache.oodt.config.distributed.utils.CuratorUtils;
@@ -54,9 +55,9 @@ public class DistributedConfigurationPublisher {
private String connectString;
private CuratorFramework client;
private ZNodePaths zNodePaths;
- private Constants.Component component;
+ private Component component;
- public DistributedConfigurationPublisher(Constants.Component component) {
+ public DistributedConfigurationPublisher(Component component) {
this.component = component;
this.zNodePaths = new ZNodePaths(this.component.getName());
@@ -83,8 +84,8 @@ public class DistributedConfigurationPublisher {
}
/**
- * Creates a {@link CuratorFramework} instance and start it. This method will wait a maximum amount of
- * {@link Constants.Properties#ZK_STARTUP_TIMEOUT} milli-seconds until the client connects to the zookeeper ensemble.
+ * Creates a {@link CuratorFramework} instance and start it. This method will wait a maximum amount of {@link
+ * Constants.Properties#ZK_STARTUP_TIMEOUT} milli-seconds until the client connects to the zookeeper ensemble.
*/
private void startZookeeper() {
client = CuratorUtils.newCuratorFrameworkClient(connectString, logger);
@@ -135,8 +136,8 @@ public class DistributedConfigurationPublisher {
}
/**
- * Verified whether the actual content of the local files specified to be published are 100% similar to the ones that
- * has been published and stored in zookeeper at the moment.
+ * Verified whether the actual content of the local files specified to be published are 100% similar to the ones
+ * that has been published and stored in zookeeper at the moment.
*
* @return true | if content are up to date and similar
*/
@@ -324,7 +325,7 @@ public class DistributedConfigurationPublisher {
logger.info("Exiting CLI ...");
}
- public Constants.Component getComponent() {
+ public Component getComponent() {
return component;
}
}
http://git-wip-us.apache.org/repos/asf/oodt/blob/041cc678/config/src/main/java/org/apache/oodt/config/distributed/utils/CuratorUtils.java
----------------------------------------------------------------------
diff --git a/config/src/main/java/org/apache/oodt/config/distributed/utils/CuratorUtils.java b/config/src/main/java/org/apache/oodt/config/distributed/utils/CuratorUtils.java
index e591750..6f2ff27 100644
--- a/config/src/main/java/org/apache/oodt/config/distributed/utils/CuratorUtils.java
+++ b/config/src/main/java/org/apache/oodt/config/distributed/utils/CuratorUtils.java
@@ -35,7 +35,8 @@ import java.util.ArrayList;
import java.util.List;
import static org.apache.oodt.config.Constants.Properties.ZK_PROPERTIES_FILE;
-import static org.apache.oodt.config.Constants.ZPaths.*;
+import static org.apache.oodt.config.Constants.ZPaths.NAMESPACE;
+import static org.apache.oodt.config.Constants.ZPaths.SEPARATOR;
public class CuratorUtils {
@@ -111,11 +112,11 @@ public class CuratorUtils {
int maxRetryCount = Integer.parseInt(System.getProperty(Constants.Properties.ZK_CONNECTION_TIMEOUT, "3"));
CuratorFrameworkFactory.Builder builder = CuratorFrameworkFactory.builder()
- .namespace(NAMESPACE)
- .connectString(connectString)
- .retryPolicy(new ExponentialBackoffRetry(retryInitialWaitMs, maxRetryCount))
- .connectionTimeoutMs(connectionTimeoutMs)
- .sessionTimeoutMs(sessionTimeoutMs);
+ .namespace(NAMESPACE)
+ .connectString(connectString)
+ .retryPolicy(new ExponentialBackoffRetry(retryInitialWaitMs, maxRetryCount))
+ .connectionTimeoutMs(connectionTimeoutMs)
+ .sessionTimeoutMs(sessionTimeoutMs);
/*
* If authorization information is available, those will be added to the client. NOTE: These auth info are
http://git-wip-us.apache.org/repos/asf/oodt/blob/041cc678/config/src/main/java/org/apache/oodt/config/standalone/StandaloneConfigurationManager.java
----------------------------------------------------------------------
diff --git a/config/src/main/java/org/apache/oodt/config/standalone/StandaloneConfigurationManager.java b/config/src/main/java/org/apache/oodt/config/standalone/StandaloneConfigurationManager.java
index 3e82580..cc3fe1a 100644
--- a/config/src/main/java/org/apache/oodt/config/standalone/StandaloneConfigurationManager.java
+++ b/config/src/main/java/org/apache/oodt/config/standalone/StandaloneConfigurationManager.java
@@ -17,8 +17,8 @@
package org.apache.oodt.config.standalone;
+import org.apache.oodt.config.Component;
import org.apache.oodt.config.ConfigurationManager;
-import org.apache.oodt.config.Constants;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -38,7 +38,7 @@ public class StandaloneConfigurationManager extends ConfigurationManager {
private List<String> propertiesFiles;
- public StandaloneConfigurationManager(Constants.Component component, List<String> propertiesFiles) {
+ public StandaloneConfigurationManager(Component component, List<String> propertiesFiles) {
super(component);
this.propertiesFiles = propertiesFiles != null ? propertiesFiles : new ArrayList<String>();
}
http://git-wip-us.apache.org/repos/asf/oodt/blob/041cc678/filemgr/src/main/java/org/apache/oodt/cas/filemgr/system/XmlRpcFileManager.java
----------------------------------------------------------------------
diff --git a/filemgr/src/main/java/org/apache/oodt/cas/filemgr/system/XmlRpcFileManager.java b/filemgr/src/main/java/org/apache/oodt/cas/filemgr/system/XmlRpcFileManager.java
index 60ee1bf..aa7075c 100644
--- a/filemgr/src/main/java/org/apache/oodt/cas/filemgr/system/XmlRpcFileManager.java
+++ b/filemgr/src/main/java/org/apache/oodt/cas/filemgr/system/XmlRpcFileManager.java
@@ -25,8 +25,20 @@ import org.apache.oodt.cas.filemgr.datatransfer.TransferStatusTracker;
import org.apache.oodt.cas.filemgr.metadata.ProductMetKeys;
import org.apache.oodt.cas.filemgr.metadata.extractors.FilemgrMetExtractor;
import org.apache.oodt.cas.filemgr.repository.RepositoryManager;
-import org.apache.oodt.cas.filemgr.structs.*;
-import org.apache.oodt.cas.filemgr.structs.exceptions.*;
+import org.apache.oodt.cas.filemgr.structs.Element;
+import org.apache.oodt.cas.filemgr.structs.ExtractorSpec;
+import org.apache.oodt.cas.filemgr.structs.FileTransferStatus;
+import org.apache.oodt.cas.filemgr.structs.Product;
+import org.apache.oodt.cas.filemgr.structs.ProductPage;
+import org.apache.oodt.cas.filemgr.structs.ProductType;
+import org.apache.oodt.cas.filemgr.structs.Query;
+import org.apache.oodt.cas.filemgr.structs.Reference;
+import org.apache.oodt.cas.filemgr.structs.exceptions.CatalogException;
+import org.apache.oodt.cas.filemgr.structs.exceptions.DataTransferException;
+import org.apache.oodt.cas.filemgr.structs.exceptions.QueryFormulationException;
+import org.apache.oodt.cas.filemgr.structs.exceptions.RepositoryManagerException;
+import org.apache.oodt.cas.filemgr.structs.exceptions.ValidationLayerException;
+import org.apache.oodt.cas.filemgr.structs.exceptions.VersioningException;
import org.apache.oodt.cas.filemgr.structs.query.ComplexQuery;
import org.apache.oodt.cas.filemgr.structs.query.QueryFilter;
import org.apache.oodt.cas.filemgr.structs.query.QueryResult;
@@ -41,16 +53,26 @@ import org.apache.oodt.cas.filemgr.versioning.VersioningUtils;
import org.apache.oodt.cas.metadata.Metadata;
import org.apache.oodt.cas.metadata.exceptions.MetExtractionException;
import org.apache.oodt.commons.date.DateUtils;
+import org.apache.oodt.config.Component;
import org.apache.oodt.config.ConfigurationManager;
import org.apache.oodt.config.ConfigurationManagerFactory;
-import org.apache.oodt.config.Constants;
import org.apache.xmlrpc.WebServer;
-import java.io.*;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
import java.net.URL;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Hashtable;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.Vector;
import java.util.concurrent.ConcurrentHashMap;
import java.util.logging.Level;
import java.util.logging.Logger;
@@ -112,7 +134,7 @@ public class XmlRpcFileManager {
propertiesFiles.add(System.getProperty("org.apache.oodt.cas.filemgr.properties"));
}
- configurationManager = ConfigurationManagerFactory.getConfigurationManager(Constants.Component.FILE_MANAGER, propertiesFiles);
+ configurationManager = ConfigurationManagerFactory.getConfigurationManager(Component.FILE_MANAGER, propertiesFiles);
this.loadConfiguration();
LOG.log(Level.INFO, "File Manager started by " + System.getProperty("user.name", "unknown"));
[10/35] oodt git commit: Added zip packaging for distributed
configuration publisher
Posted by ma...@apache.org.
http://git-wip-us.apache.org/repos/asf/oodt/blob/27a28daa/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationPublisherTest.java
----------------------------------------------------------------------
diff --git a/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationPublisherTest.java b/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationPublisherTest.java
index 3a0212a..21aef23 100644
--- a/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationPublisherTest.java
+++ b/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationPublisherTest.java
@@ -17,11 +17,11 @@
package org.apache.oodt.config.distributed;
-import org.apache.commons.io.FileUtils;
import org.apache.curator.framework.CuratorFramework;
import org.apache.curator.framework.CuratorFrameworkFactory;
import org.apache.curator.retry.RetryNTimes;
import org.apache.curator.test.TestingServer;
+import org.apache.oodt.config.distributed.cli.DistributedConfigurationPublisher;
import org.junit.AfterClass;
import org.junit.Assert;
import org.junit.BeforeClass;
@@ -29,16 +29,12 @@ import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
-import java.io.File;
import java.io.IOException;
-import java.net.URI;
import java.util.Map;
-import static org.apache.oodt.config.Constants.Properties.ZK_CONNECT_STRING;
-
public class DistributedConfigurationPublisherTest {
- private static final String DISTRIBUTED_CONFIG_PUBLISHER_SPRING_CONFIG = "distributed-config-publisher.xml";
+ private static final String DISTRIBUTED_CONFIG_PUBLISHER_SPRING_CONFIG = "etc/config-publisher.xml";
private static TestingServer zookeeper;
private static CuratorFramework client;
@@ -53,52 +49,22 @@ public class DistributedConfigurationPublisherTest {
.retryPolicy(new RetryNTimes(3, 1000))
.build();
client.start();
-
- System.setProperty(ZK_CONNECT_STRING, zookeeper.getConnectString());
}
@Test
- public void publishConfiguration() throws Exception {
- DistributedConfigurationPublisher.main(new String[]{DISTRIBUTED_CONFIG_PUBLISHER_SPRING_CONFIG});
+ public void publishConfigurationTest() throws Exception {
+ DistributedConfigurationPublisher.main(new String[]{
+ "-connectString", zookeeper.getConnectString(),
+ "-publish"
+ });
ApplicationContext applicationContext = new ClassPathXmlApplicationContext(DISTRIBUTED_CONFIG_PUBLISHER_SPRING_CONFIG);
- Map distributedConfigurationPublisher = applicationContext.getBeansOfType(DistributedConfigurationPublisher.class);
+ Map distributedConfigurationPublishers = applicationContext.getBeansOfType(DistributedConfigurationPublisher.class);
- for (Object bean : distributedConfigurationPublisher.values()) {
+ for (Object bean : distributedConfigurationPublishers.values()) {
DistributedConfigurationPublisher publisher = (DistributedConfigurationPublisher) bean;
- ZNodePaths zNodePaths = publisher.getZNodePaths();
-
- // Checking for configuration files
- for (Map.Entry<String, String> entry : publisher.getPropertiesFiles().entrySet()) {
- String zNodePath = zNodePaths.getPropertiesZNodePath(entry.getValue());
-
- Assert.assertNotNull(client.checkExists().forPath(zNodePath));
-
- String storedContent = new String(client.getData().forPath(zNodePath));
-
- URI file = Thread.currentThread().getContextClassLoader().getResource(entry.getKey()).toURI();
- String fileContent = FileUtils.readFileToString(new File(file));
-
- Assert.assertEquals(fileContent, storedContent);
- }
-
- // Checking for configuration files
- for (Map.Entry<String, String> entry : publisher.getConfigFiles().entrySet()) {
- String zNodePath = zNodePaths.getConfigurationZNodePath(entry.getValue());
-
- Assert.assertNotNull(client.checkExists().forPath(zNodePath));
-
- String storedContent = new String(client.getData().forPath(zNodePath));
-
- URI file = Thread.currentThread().getContextClassLoader().getResource(entry.getKey()).toURI();
- String fileContent = FileUtils.readFileToString(new File(file));
-
- Assert.assertEquals(fileContent, storedContent);
- }
+ Assert.assertTrue(publisher.verifyPublishedConfiguration());
}
-
-// DistributedConfigurationManager configurationManager = new DistributedConfigurationManager(Constants.Components.FILE_MANAGER);
-// configurationManager.loadConfiguration();
}
@AfterClass
http://git-wip-us.apache.org/repos/asf/oodt/blob/27a28daa/config/src/test/java/org/apache/oodt/config/distributed/TestServer.java
----------------------------------------------------------------------
diff --git a/config/src/test/java/org/apache/oodt/config/distributed/TestServer.java b/config/src/test/java/org/apache/oodt/config/distributed/TestServer.java
new file mode 100644
index 0000000..fa09f3d
--- /dev/null
+++ b/config/src/test/java/org/apache/oodt/config/distributed/TestServer.java
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.oodt.config.distributed;
+
+import org.apache.curator.test.TestingServer;
+
+import java.io.IOException;
+
+public class TestServer {
+
+ public static void main(String[] args) throws Exception {
+ final TestingServer zookeeper = new TestingServer(2181);
+ zookeeper.start();
+ System.out.printf(zookeeper.getConnectString());
+
+ zookeeper.start();
+
+ Runtime.getRuntime().addShutdownHook(new Thread() {
+ public void run() {
+ try {
+ zookeeper.stop();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+ });
+
+ Thread.currentThread().join();
+ }
+}
http://git-wip-us.apache.org/repos/asf/oodt/blob/27a28daa/config/src/test/resources/distributed-config-publisher.xml
----------------------------------------------------------------------
diff --git a/config/src/test/resources/distributed-config-publisher.xml b/config/src/test/resources/distributed-config-publisher.xml
deleted file mode 100644
index d938b6d..0000000
--- a/config/src/test/resources/distributed-config-publisher.xml
+++ /dev/null
@@ -1,56 +0,0 @@
-<!--
- ~ 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.
- -->
-
-<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
-
- <bean id="filemgr-config-publisher" class="org.apache.oodt.config.distributed.DistributedConfigurationPublisher">
-
- <constructor-arg value="filemgr"/>
-
- <property name="propertiesFiles">
- <map>
- <entry key="filemgr.properties" value="/etc/filemgr.properties"/>
- </map>
- </property>
-
- <property name="configFiles">
- <map>
- <entry key="mime-types.xml" value="/etc/mime-types.xml"/>
- </map>
- </property>
- </bean>
-
- <bean id="resmgr-config-publisher" class="org.apache.oodt.config.distributed.DistributedConfigurationPublisher">
-
- <constructor-arg value="resmgr"/>
-
- <property name="propertiesFiles">
- <map>
- <entry key="filemgr.properties" value="/etc/resmgr.properties"/>
- </map>
- </property>
-
- <property name="configFiles">
- <map>
- <entry key="mime-types.xml" value="/etc/mime-types.xml"/>
- </map>
- </property>
- </bean>
-
-</beans>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/oodt/blob/27a28daa/config/src/test/resources/etc/config-publisher.xml
----------------------------------------------------------------------
diff --git a/config/src/test/resources/etc/config-publisher.xml b/config/src/test/resources/etc/config-publisher.xml
new file mode 100644
index 0000000..109f48f
--- /dev/null
+++ b/config/src/test/resources/etc/config-publisher.xml
@@ -0,0 +1,50 @@
+<!--
+ ~ 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.
+ -->
+
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
+
+ <bean id="filemgr-config-publisher" class="org.apache.oodt.config.distributed.cli.DistributedConfigurationPublisher">
+ <constructor-arg value="filemgr"/>
+ <property name="propertiesFiles">
+ <map key-type="java.lang.String" value-type="java.lang.String">
+ <entry key="src/main/resources/examples/filemgr.properties" value="/etc/filemgr.properties"/>
+ </map>
+ </property>
+ <property name="configFiles">
+ <map key-type="java.lang.String" value-type="java.lang.String">
+ <entry key="src/main/resources/examples/mime-types.xml" value="/etc/mime-types.xml"/>
+ </map>
+ </property>
+ </bean>
+
+ <bean id="resmgr-config-publisher" class="org.apache.oodt.config.distributed.cli.DistributedConfigurationPublisher">
+ <constructor-arg value="resmgr"/>
+ <property name="propertiesFiles">
+ <map key-type="java.lang.String" value-type="java.lang.String">
+ <entry key="src/main/resources/examples/filemgr.properties" value="/etc/resmgr.properties"/>
+ </map>
+ </property>
+ <property name="configFiles">
+ <map key-type="java.lang.String" value-type="java.lang.String">
+ <entry key="src/main/resources/examples/mime-types.xml" value="/etc/mime-types.xml"/>
+ </map>
+ </property>
+ </bean>
+
+</beans>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/oodt/blob/27a28daa/config/src/test/resources/filemgr.properties
----------------------------------------------------------------------
diff --git a/config/src/test/resources/filemgr.properties b/config/src/test/resources/filemgr.properties
deleted file mode 100644
index 4d8d957..0000000
--- a/config/src/test/resources/filemgr.properties
+++ /dev/null
@@ -1,114 +0,0 @@
-#
-# 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.
-#
-
-# Configuration properties for the File Manager
-
-# repository factory
-filemgr.repository.factory=org.apache.oodt.cas.filemgr.repository.XMLRepositoryManagerFactory
-
-# Lucene catalog factory
-filemgr.catalog.factory=org.apache.oodt.cas.filemgr.catalog.LuceneCatalogFactory
-
-# data transfer factory
-filemgr.datatransfer.factory=org.apache.oodt.cas.filemgr.datatransfer.LocalDataTransferFactory
-
-# validation layer factory
-filemgr.validationLayer.factory=org.apache.oodt.cas.filemgr.validation.XMLValidationLayerFactory
-
-# xml rpc client configuration
-org.apache.oodt.cas.filemgr.system.xmlrpc.connectionTimeout.minutes=20
-org.apache.oodt.cas.filemgr.system.xmlrpc.requestTimeout.minutes=60
-#org.apache.oodt.cas.filemgr.system.xmlrpc.connection.retries=0
-#org.apache.oodt.cas.filemgr.system.xmlrpc.connection.retry.interval.seconds=3
-
-# mapped data source catalog configuration
-#org.apache.oodt.cas.filemgr.catalog.mappeddatasource.mapFile=/path/to/ops.catalog.typemap.properties
-
-# lucene catalog configuration
-org.apache.oodt.cas.filemgr.catalog.lucene.idxPath=[OODT_HOME]/data/catalog
-org.apache.oodt.cas.filemgr.catalog.lucene.pageSize=20
-org.apache.oodt.cas.filemgr.catalog.lucene.commitLockTimeout.seconds=60
-org.apache.oodt.cas.filemgr.catalog.lucene.writeLockTimeout.seconds=60
-org.apache.oodt.cas.filemgr.catalog.lucene.mergeFactor=20
-
-# XML repository manager configuration
-org.apache.oodt.cas.filemgr.repositorymgr.dirs=file:[FILEMGR_HOME]/policy/oodt
-
-# XML validation layer configuration
-org.apache.oodt.cas.filemgr.validation.dirs=file:[FILEMGR_HOME]/policy/oodt
-
-# remote data transfer configuration
-org.apache.oodt.cas.filemgr.datatransfer.remote.chunkSize=1024
-
-# location of Mime-Type repository
-org.apache.oodt.cas.filemgr.mime.type.repository=[FILEMGR_HOME]/etc/mime-types.xml
-
-
-############ data source configuration ##################################
-#
-# These 3 blocks of config properties can be used to setup a catalog,
-# repository manager, and validation layer based on a RDBMS such as
-# Oracle, MySQL, PostgreSQL, or any others that support a jdbc connection.
-# Just un-comment the following blocks of properties and configure as
-# needed.
-#
-#########################################################################
-
-# datasource catalog config
-#org.apache.oodt.cas.filemgr.catalog.datasource.jdbc.url=some_jdbc_url
-#org.apache.oodt.cas.filemgr.catalog.datasource.jdbc.user=user
-#org.apache.oodt.cas.filemgr.catalog.datasource.jdbc.pass=pass
-#org.apache.oodt.cas.filemgr.catalog.datasource.jdbc.driver=driver.class.name
-#org.apache.oodt.cas.filemgr.catalog.datasource.quoteFields=false
-#org.apache.oodt.cas.filemgr.catalog.datasource.pageSize=20
-#org.apache.oodt.cas.filemgr.catalog.datasource.cacheUpdateMinutes=5
-
-# data source repository manager configuration
-#org.apache.oodt.cas.filemgr.repositorymgr.datasource.jdbc.url=some_jdbc_url
-#org.apache.oodt.cas.filemgr.repositorymgr.datasource.jdbc.user=user
-#org.apache.oodt.cas.filemgr.repositorymgr.datasource.jdbc.pass=pass
-#org.apache.oodt.cas.filemgr.repositorymgr.datasource.jdbc.driver=driver.class.name
-
-# data source validation layer configuration
-#org.apache.oodt.cas.filemgr.validation.datasource.jdbc.url=some_jdbc_url
-#org.apache.oodt.cas.filemgr.validation.datasource.jdbc.user=user
-#org.apache.oodt.cas.filemgr.validation.datasource.jdbc.pass=pass
-#org.apache.oodt.cas.filemgr.validation.datasource.jdbc.driver=driver.class.name
-#org.apache.oodt.cas.filemgr.validation.datasource.quoteFields=false
-
-
-# tells the file manager system layer to include product instance metadata
-# NOTE: here are the expected field mappings
-#
-# product.getProductId() -> ProductId
-# product.getProductName() -> ProductName
-# product.getProductStructure() -> ProductStructure
-# product.getTransferStatus() -> ProductTransferStatus
-# product.getRootRef() -> ProductRootReference
-
-# for the references returned by product.getProductReferences() the following
-# metadata fields will be added (order will be maintained, such that data store
-# ref at index 0 will map to orig ref at index 0, etc.)
-#
-# ProductDataStoreReferences (list of all data store references:
-# note already translated into path, not URI)
-# ProductOrigReferences (list of all orig references:
-# note already translated into path, not URI)
-# ProductMimeType (list of all references' mime-types)
-# ProductFileSize (list of all references' file sizes)
-
-org.apache.oodt.cas.filemgr.metadata.expandProduct=false
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/oodt/blob/27a28daa/config/src/test/resources/log4j.xml
----------------------------------------------------------------------
diff --git a/config/src/test/resources/log4j.xml b/config/src/test/resources/log4j.xml
deleted file mode 100644
index 8f49451..0000000
--- a/config/src/test/resources/log4j.xml
+++ /dev/null
@@ -1,34 +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.
- -->
-
-<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
-
-<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
- <appender name="console" class="org.apache.log4j.ConsoleAppender">
- <param name="Target" value="System.out"/>
- <layout class="org.apache.log4j.PatternLayout">
- <param name="ConversionPattern" value="%-5p %c{1} - %m%n"/>
- </layout>
- </appender>
-
- <root>
- <priority value="INFO"/>
- <appender-ref ref="console"/>
- </root>
-
-</log4j:configuration>
\ No newline at end of file
[14/35] oodt git commit: Created test cases for distributed
configuration manager and publisher
Posted by ma...@apache.org.
http://git-wip-us.apache.org/repos/asf/oodt/blob/a973c531/config/src/main/resources/examples/mime-types.xml
----------------------------------------------------------------------
diff --git a/config/src/main/resources/examples/mime-types.xml b/config/src/main/resources/examples/mime-types.xml
deleted file mode 100755
index 6b678be..0000000
--- a/config/src/main/resources/examples/mime-types.xml
+++ /dev/null
@@ -1,4119 +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"/>
- <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>
-
- <!-- http://www.iana.org/assignments/media-types/application/vnd.ms-excel -->
- <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">
- <alias type="application/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-corelpresentations">
- <glob pattern="*.shw"/>
- <sub-class-of type="application/x-tika-msoffice"/>
- </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">
- <acronym>OTF</acronym>
- <_comment>OpenType Font</_comment>
- <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">
- <acronym>TTF</acronym>
- <_comment>TrueType Font</_comment>
- <glob pattern="*.ttf"/>
- <glob pattern="*.ttc"/>
- <magic priority="40">
- <match value="0x00010000" type="string" offset="0"/>
- </magic>
- </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"/>
- <glob pattern="*.he5"/>
- </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
<TRUNCATED>
[27/35] oodt git commit: fix pom.xml
Posted by ma...@apache.org.
fix pom.xml
Project: http://git-wip-us.apache.org/repos/asf/oodt/repo
Commit: http://git-wip-us.apache.org/repos/asf/oodt/commit/82e089b6
Tree: http://git-wip-us.apache.org/repos/asf/oodt/tree/82e089b6
Diff: http://git-wip-us.apache.org/repos/asf/oodt/diff/82e089b6
Branch: refs/heads/feature/zookeeper-config
Commit: 82e089b636fd80971fef7e2ab98414046119efc8
Parents: 041cc67
Author: Chris Mattmann <ma...@apache.org>
Authored: Thu Jul 13 21:58:13 2017 -0700
Committer: Chris Mattmann <ma...@apache.org>
Committed: Thu Jul 13 21:58:13 2017 -0700
----------------------------------------------------------------------
config/pom.xml | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/oodt/blob/82e089b6/config/pom.xml
----------------------------------------------------------------------
diff --git a/config/pom.xml b/config/pom.xml
index d75e032..741caac 100644
--- a/config/pom.xml
+++ b/config/pom.xml
@@ -3,7 +3,7 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
- <artifactId>oodt</artifactId>
+ <artifactId>oodt-core</artifactId>
<groupId>org.apache.oodt</groupId>
<version>1.1-SNAPSHOT</version>
<relativePath>../core/pom.xml</relativePath>
@@ -19,6 +19,7 @@
<dependency>
<groupId>org.apache.curator</groupId>
<artifactId>curator-framework</artifactId>
+
</dependency>
<dependency>
<groupId>commons-io</groupId>
@@ -80,4 +81,4 @@
</plugin>
</plugins>
</build>
-</project>
\ No newline at end of file
+</project>
[32/35] oodt git commit: Fix for empty component home variable
Posted by ma...@apache.org.
Fix for empty component home variable
Project: http://git-wip-us.apache.org/repos/asf/oodt/repo
Commit: http://git-wip-us.apache.org/repos/asf/oodt/commit/daf555c3
Tree: http://git-wip-us.apache.org/repos/asf/oodt/tree/daf555c3
Diff: http://git-wip-us.apache.org/repos/asf/oodt/diff/daf555c3
Branch: refs/heads/feature/zookeeper-config
Commit: daf555c3803739f228ab7d0ac628bc36a9224901
Parents: 2fbd08f
Author: Imesha Sudasingha <im...@gmail.com>
Authored: Fri Jul 14 23:01:01 2017 +0530
Committer: Imesha Sudasingha <im...@gmail.com>
Committed: Fri Jul 14 23:01:01 2017 +0530
----------------------------------------------------------------------
.../main/java/org/apache/oodt/config/Component.java | 4 ++--
.../distributed/DistributedConfigurationManager.java | 1 +
.../oodt/config/distributed/utils/FilePathUtils.java | 6 ++++--
.../DistributedConfigurationManagerTest.java | 15 +++++++++------
4 files changed, 16 insertions(+), 10 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/oodt/blob/daf555c3/config/src/main/java/org/apache/oodt/config/Component.java
----------------------------------------------------------------------
diff --git a/config/src/main/java/org/apache/oodt/config/Component.java b/config/src/main/java/org/apache/oodt/config/Component.java
index 2c7123e..e2ea223 100644
--- a/config/src/main/java/org/apache/oodt/config/Component.java
+++ b/config/src/main/java/org/apache/oodt/config/Component.java
@@ -24,8 +24,8 @@ package org.apache.oodt.config;
* @author Imesha Sudasingha
*/
public enum Component {
- FILE_MANAGER("filemgr", "FILEMGR_HOME"),
- RESOURCE_MANAGER("resmgr", "RESMGR_HOME");
+ FILE_MANAGER("filemgr", "OODT_FILEMGR_HOME"),
+ RESOURCE_MANAGER("resmgr", "OODT_RESMGR_HOME");
/** Shorthand name of the component. Will be used when creating ZNodes in zookeeper */
String name;
http://git-wip-us.apache.org/repos/asf/oodt/blob/daf555c3/config/src/main/java/org/apache/oodt/config/distributed/DistributedConfigurationManager.java
----------------------------------------------------------------------
diff --git a/config/src/main/java/org/apache/oodt/config/distributed/DistributedConfigurationManager.java b/config/src/main/java/org/apache/oodt/config/distributed/DistributedConfigurationManager.java
index 530416d..da96913 100644
--- a/config/src/main/java/org/apache/oodt/config/distributed/DistributedConfigurationManager.java
+++ b/config/src/main/java/org/apache/oodt/config/distributed/DistributedConfigurationManager.java
@@ -143,6 +143,7 @@ public class DistributedConfigurationManager extends ConfigurationManager {
String localFilePath = zNodePaths.getLocalPropertiesFilePath(propertiesFileZNodePath);
localFilePath = FilePathUtils.fixForComponentHome(component, localFilePath);
+ logger.debug("Storing configuration in file: {}", localFilePath);
FileUtils.writeByteArrayToFile(new File(localFilePath), bytes);
logger.info("Properties file from ZNode at {} saved to {}", propertiesFileZNodePath, localFilePath);
}
http://git-wip-us.apache.org/repos/asf/oodt/blob/daf555c3/config/src/main/java/org/apache/oodt/config/distributed/utils/FilePathUtils.java
----------------------------------------------------------------------
diff --git a/config/src/main/java/org/apache/oodt/config/distributed/utils/FilePathUtils.java b/config/src/main/java/org/apache/oodt/config/distributed/utils/FilePathUtils.java
index 12fcff5..5b242c2 100644
--- a/config/src/main/java/org/apache/oodt/config/distributed/utils/FilePathUtils.java
+++ b/config/src/main/java/org/apache/oodt/config/distributed/utils/FilePathUtils.java
@@ -18,6 +18,7 @@
package org.apache.oodt.config.distributed.utils;
import org.apache.oodt.config.Component;
+import org.apache.oodt.config.Constants.ZPaths;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -33,11 +34,12 @@ public class FilePathUtils {
public static String fixForComponentHome(Component component, String suffixPath) {
String prefix = System.getenv().get(component.getHome());
StringBuilder path = new StringBuilder();
- if (prefix != null) {
+ if (prefix != null && !prefix.trim().isEmpty()) {
+ prefix = prefix.trim();
logger.debug("Found prefix {}:{} for suffixPath: {}", component.getHome(), prefix, suffixPath);
path.append(prefix.endsWith(SEPARATOR) ? prefix : prefix + SEPARATOR);
}
- path.append(suffixPath.startsWith(SEPARATOR) ? suffixPath.substring(1) : suffixPath);
+ path.append(suffixPath.startsWith(ZPaths.SEPARATOR) ? suffixPath.substring(ZPaths.SEPARATOR.length()) : suffixPath);
logger.debug("Fixed path for {} is {}", suffixPath, path.toString());
return path.toString();
}
http://git-wip-us.apache.org/repos/asf/oodt/blob/daf555c3/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationManagerTest.java
----------------------------------------------------------------------
diff --git a/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationManagerTest.java b/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationManagerTest.java
index fde20f8..d03f11a 100644
--- a/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationManagerTest.java
+++ b/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationManagerTest.java
@@ -88,16 +88,18 @@ public class DistributedConfigurationManagerTest extends AbstractDistributedConf
Assert.assertEquals(properties.getProperty(key), System.getProperty(key));
}
- String fileName = FilePathUtils.fixForComponentHome(publisher.getComponent(), entry.getValue());
- fileName = fileName.startsWith(SEPARATOR) ? fileName.substring(1) : fileName;
+ String fileName = entry.getValue();
+ fileName = fileName.startsWith(SEPARATOR) ? fileName.substring(SEPARATOR.length()) : fileName;
+ fileName = FilePathUtils.fixForComponentHome(publisher.getComponent(), fileName);
File downloadedFile = new File(fileName);
Assert.assertTrue(downloadedFile.exists());
}
// Checking for configuration files
for (Map.Entry<String, String> entry : publisher.getConfigFiles().entrySet()) {
- String fileName = FilePathUtils.fixForComponentHome(publisher.getComponent(), entry.getValue());
- fileName = fileName.startsWith(SEPARATOR) ? fileName.substring(1) : fileName;
+ String fileName = entry.getValue();
+ fileName = fileName.startsWith(SEPARATOR) ? fileName.substring(SEPARATOR.length()) : fileName;
+ fileName = FilePathUtils.fixForComponentHome(publisher.getComponent(), fileName);
File file = new File(fileName);
Assert.assertTrue(file.exists());
}
@@ -117,8 +119,9 @@ public class DistributedConfigurationManagerTest extends AbstractDistributedConf
String fileName = entry.getValue();
fileName = fileName.startsWith(SEPARATOR) ? fileName.substring(1) : fileName;
- String confDir = System.getenv(publisher.getComponent().getHome()) != null ?
- System.getenv(publisher.getComponent().getHome()) + SEPARATOR + fileName.split(SEPARATOR)[0] : fileName.split(SEPARATOR)[0];
+ String prefixPath = System.getenv(publisher.getComponent().getHome());
+ String confDir = prefixPath != null && !prefixPath.trim().isEmpty() ?
+ prefixPath.trim() + SEPARATOR + fileName.split(SEPARATOR)[0] : fileName.split(SEPARATOR)[0];
File dir = new File(confDir);
FileUtils.deleteDirectory(dir);
[24/35] oodt git commit: Merge branch 'master' of
https://github.com/apache/oodt into feature/zookeeper-config
Posted by ma...@apache.org.
Merge branch 'master' of https://github.com/apache/oodt into feature/zookeeper-config
Project: http://git-wip-us.apache.org/repos/asf/oodt/repo
Commit: http://git-wip-us.apache.org/repos/asf/oodt/commit/d63d91f4
Tree: http://git-wip-us.apache.org/repos/asf/oodt/tree/d63d91f4
Diff: http://git-wip-us.apache.org/repos/asf/oodt/diff/d63d91f4
Branch: refs/heads/feature/zookeeper-config
Commit: d63d91f4f22b0b106f995007f0e2d8e120a4930a
Parents: a8092af 1b42cac
Author: Imesha Sudasingha <im...@gmail.com>
Authored: Tue Jul 11 07:57:20 2017 +0530
Committer: Imesha Sudasingha <im...@gmail.com>
Committed: Tue Jul 11 07:57:20 2017 +0530
----------------------------------------------------------------------
CHANGES.txt | 2 +
.../filemgr/metadata/FileAttributesMetKeys.java | 53 ++++++
.../examples/FileAttributesExtractor.java | 82 +++++++++
.../examples/TestFileAttributesExtractor.java | 167 +++++++++++++++++++
4 files changed, 304 insertions(+)
----------------------------------------------------------------------
[33/35] oodt git commit: assert not null.
Posted by ma...@apache.org.
assert not null.
Project: http://git-wip-us.apache.org/repos/asf/oodt/repo
Commit: http://git-wip-us.apache.org/repos/asf/oodt/commit/e481b0b5
Tree: http://git-wip-us.apache.org/repos/asf/oodt/tree/e481b0b5
Diff: http://git-wip-us.apache.org/repos/asf/oodt/diff/e481b0b5
Branch: refs/heads/feature/zookeeper-config
Commit: e481b0b5d9cb9d1181ccea23df0cdca8a18e716d
Parents: b66a68d
Author: Chris Mattmann <ma...@apache.org>
Authored: Fri Jul 14 11:45:01 2017 -0700
Committer: Chris Mattmann <ma...@apache.org>
Committed: Fri Jul 14 11:45:01 2017 -0700
----------------------------------------------------------------------
.../config/distributed/DistributedConfigurationManagerTest.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/oodt/blob/e481b0b5/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationManagerTest.java
----------------------------------------------------------------------
diff --git a/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationManagerTest.java b/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationManagerTest.java
index e531caf..975a062 100644
--- a/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationManagerTest.java
+++ b/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationManagerTest.java
@@ -26,6 +26,7 @@ import org.junit.Assert;
import org.junit.BeforeClass;
import org.junit.Test;
import static org.junit.Assert.fail;
+import static org.junit.Assert.assertNotNull;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
@@ -96,7 +97,7 @@ public class DistributedConfigurationManagerTest extends AbstractDistributedConf
String fileName = FilePathUtils.fixForComponentHome(publisher.getComponent(), entry.getValue());
fileName = fileName.startsWith(SEPARATOR) ? fileName.substring(1) : fileName;
File downloadedFile = new File(fileName);
- Assert.notNull(downloadedFile);
+ Assert.assertNotNull(downloadedFile);
Assert.assertTrue(downloadedFile.exists());
}
[31/35] oodt git commit: Merge and apply robust changes for stack
trace print in tests.
Posted by ma...@apache.org.
Merge and apply robust changes for stack trace print in tests.
Project: http://git-wip-us.apache.org/repos/asf/oodt/repo
Commit: http://git-wip-us.apache.org/repos/asf/oodt/commit/b66a68dc
Tree: http://git-wip-us.apache.org/repos/asf/oodt/tree/b66a68dc
Diff: http://git-wip-us.apache.org/repos/asf/oodt/diff/b66a68dc
Branch: refs/heads/feature/zookeeper-config
Commit: b66a68dc9fda88156d3dfb06b3f063357c957510
Parents: 59d7f3c
Author: Chris Mattmann <ma...@apache.org>
Authored: Fri Jul 14 09:24:50 2017 -0700
Committer: Chris Mattmann <ma...@apache.org>
Committed: Fri Jul 14 09:24:50 2017 -0700
----------------------------------------------------------------------
.../distributed/DistributedConfigurationManagerTest.java | 6 ++++++
1 file changed, 6 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/oodt/blob/b66a68dc/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationManagerTest.java
----------------------------------------------------------------------
diff --git a/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationManagerTest.java b/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationManagerTest.java
index fde20f8..e531caf 100644
--- a/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationManagerTest.java
+++ b/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationManagerTest.java
@@ -25,6 +25,7 @@ import org.junit.AfterClass;
import org.junit.Assert;
import org.junit.BeforeClass;
import org.junit.Test;
+import static org.junit.Assert.fail;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
@@ -83,6 +84,10 @@ public class DistributedConfigurationManagerTest extends AbstractDistributedConf
try (InputStream in = new FileInputStream(originalFile)) {
properties.load(in);
}
+ catch (Exception e){
+ e.printStackTrace();
+ fail(e.getMessage());
+ }
for (String key : properties.stringPropertyNames()) {
Assert.assertEquals(properties.getProperty(key), System.getProperty(key));
@@ -91,6 +96,7 @@ public class DistributedConfigurationManagerTest extends AbstractDistributedConf
String fileName = FilePathUtils.fixForComponentHome(publisher.getComponent(), entry.getValue());
fileName = fileName.startsWith(SEPARATOR) ? fileName.substring(1) : fileName;
File downloadedFile = new File(fileName);
+ Assert.notNull(downloadedFile);
Assert.assertTrue(downloadedFile.exists());
}
[11/35] oodt git commit: Added zip packaging for distributed
configuration publisher
Posted by ma...@apache.org.
http://git-wip-us.apache.org/repos/asf/oodt/blob/27a28daa/config/src/main/resources/examples/mime-types.xml
----------------------------------------------------------------------
diff --git a/config/src/main/resources/examples/mime-types.xml b/config/src/main/resources/examples/mime-types.xml
new file mode 100755
index 0000000..6b678be
--- /dev/null
+++ b/config/src/main/resources/examples/mime-types.xml
@@ -0,0 +1,4119 @@
+<?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"/>
+ <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>
+
+ <!-- http://www.iana.org/assignments/media-types/application/vnd.ms-excel -->
+ <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">
+ <alias type="application/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-corelpresentations">
+ <glob pattern="*.shw"/>
+ <sub-class-of type="application/x-tika-msoffice"/>
+ </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">
+ <acronym>OTF</acronym>
+ <_comment>OpenType Font</_comment>
+ <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">
+ <acronym>TTF</acronym>
+ <_comment>TrueType Font</_comment>
+ <glob pattern="*.ttf"/>
+ <glob pattern="*.ttc"/>
+ <magic priority="40">
+ <match value="0x00010000" type="string" offset="0"/>
+ </magic>
+ </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"/>
+ <glob pattern="*.he5"/>
+ </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-typ
<TRUNCATED>
[26/35] oodt git commit: Fixed parent artifactId in config/pom.xml
Posted by ma...@apache.org.
Fixed parent artifactId in config/pom.xml
Project: http://git-wip-us.apache.org/repos/asf/oodt/repo
Commit: http://git-wip-us.apache.org/repos/asf/oodt/commit/22a1e59b
Tree: http://git-wip-us.apache.org/repos/asf/oodt/tree/22a1e59b
Diff: http://git-wip-us.apache.org/repos/asf/oodt/diff/22a1e59b
Branch: refs/heads/feature/zookeeper-config
Commit: 22a1e59b218aa42354116caee813e6b77ec10e48
Parents: 041cc67
Author: Imesha Sudasingha <im...@gmail.com>
Authored: Fri Jul 14 08:22:04 2017 +0530
Committer: Imesha Sudasingha <im...@gmail.com>
Committed: Fri Jul 14 08:22:04 2017 +0530
----------------------------------------------------------------------
config/pom.xml | 2 +-
core/pom.xml | 4 ----
2 files changed, 1 insertion(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/oodt/blob/22a1e59b/config/pom.xml
----------------------------------------------------------------------
diff --git a/config/pom.xml b/config/pom.xml
index d75e032..b890ade 100644
--- a/config/pom.xml
+++ b/config/pom.xml
@@ -3,7 +3,7 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
- <artifactId>oodt</artifactId>
+ <artifactId>oodt-core</artifactId>
<groupId>org.apache.oodt</groupId>
<version>1.1-SNAPSHOT</version>
<relativePath>../core/pom.xml</relativePath>
http://git-wip-us.apache.org/repos/asf/oodt/blob/22a1e59b/core/pom.xml
----------------------------------------------------------------------
diff --git a/core/pom.xml b/core/pom.xml
index f895a4b..dd8725c 100644
--- a/core/pom.xml
+++ b/core/pom.xml
@@ -247,26 +247,22 @@ the License.
<artifactId>saxon-dom</artifactId>
<version>8.7</version>
</dependency>
-
<dependency>
<groupId>org.apache.curator</groupId>
<artifactId>curator-framework</artifactId>
<version>3.3.0</version>
</dependency>
-
<dependency>
<groupId>org.apache.curator</groupId>
<artifactId>curator-test</artifactId>
<version>3.3.0</version>
<scope>test</scope>
</dependency>
-
<dependency>
<groupId>args4j</groupId>
<artifactId>args4j</artifactId>
<version>2.33</version>
</dependency>
-
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-frontend-jaxrs</artifactId>
[20/35] oodt git commit: Merge branch 'master' into
feature/zookeeper-config
Posted by ma...@apache.org.
Merge branch 'master' into feature/zookeeper-config
Project: http://git-wip-us.apache.org/repos/asf/oodt/repo
Commit: http://git-wip-us.apache.org/repos/asf/oodt/commit/a8092af5
Tree: http://git-wip-us.apache.org/repos/asf/oodt/tree/a8092af5
Diff: http://git-wip-us.apache.org/repos/asf/oodt/diff/a8092af5
Branch: refs/heads/feature/zookeeper-config
Commit: a8092af5484d066a4dda623395bf21612d696d62
Parents: ec5b201 99b086b
Author: Imesha Sudasingha <im...@gmail.com>
Authored: Mon Jul 10 19:54:28 2017 +0530
Committer: Imesha Sudasingha <im...@gmail.com>
Committed: Mon Jul 10 19:54:28 2017 +0530
----------------------------------------------------------------------
README.md | 26 +-
config/pom.xml | 83 +
config/src/main/assembly/assembly.xml | 56 +
.../oodt/config/ConfigurationManager.java | 38 +
.../config/ConfigurationManagerFactory.java | 62 +
.../java/org/apache/oodt/config/Constants.java | 101 +
.../DistributedConfigurationManager.java | 192 +
.../oodt/config/distributed/ZNodePaths.java | 88 +
.../config/distributed/cli/CmdLineOptions.java | 57 +
.../cli/DistributedConfigurationPublisher.java | 330 ++
.../config/distributed/utils/CuratorUtils.java | 192 +
.../StandaloneConfigurationManager.java | 55 +
.../src/main/resources/etc/config-publisher.xml | 42 +
config/src/main/resources/etc/log4j.xml | 40 +
.../examples/filemgr/cmd-line-actions.xml | 123 +
.../examples/filemgr/cmd-line-options.xml | 1175 +++++
.../examples/filemgr/filemgr.properties | 114 +
.../resources/examples/filemgr/mime-types.xml | 4119 ++++++++++++++++++
.../examples/filemgr/oodt/elements.xml | 77 +
.../filemgr/oodt/product-type-element-map.xml | 33 +
.../examples/filemgr/oodt/product-types.xml | 53 +
.../examples/resmgr/cmd-line-actions.xml | 92 +
.../examples/resmgr/cmd-line-options.xml | 601 +++
.../resources/examples/resmgr/jobs/exJob.xml | 30 +
.../examples/resmgr/jobs/exLongJob.xml | 30 +
.../examples/resmgr/logging.properties | 67 +
.../examples/resmgr/node-to-queue-mapping.xml | 26 +
.../main/resources/examples/resmgr/nodes.xml | 23 +
.../examples/resmgr/resource.properties | 61 +
.../AbstractDistributedConfigurationTest.java | 49 +
.../DistributedConfigurationManagerTest.java | 125 +
.../DistributedConfigurationPublisherTest.java | 112 +
.../oodt/config/distributed/TestServer.java | 45 +
.../src/test/resources/etc/config-publisher.xml | 61 +
core/pom.xml | 25 +
filemgr/pom.xml | 4 +
filemgr/src/main/assembly/assembly.xml | 49 +-
filemgr/src/main/bin/filemgr | 26 +-
.../cas/filemgr/system/XmlRpcFileManager.java | 68 +-
filemgr/src/main/resources/log4j.xml | 40 +
pom.xml | 1 +
41 files changed, 8502 insertions(+), 89 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/oodt/blob/a8092af5/README.md
----------------------------------------------------------------------
diff --cc README.md
index 46e7fd5,76c6d49..2337b92
--- a/README.md
+++ b/README.md
@@@ -144,10 -137,9 +137,9 @@@ dev-subscribe@oodt...). To unsubscribe
<LIST>-unsubscribe@oodt.apache.org. For more instructions, send a
message to <LIST>-help@oodt.apache.org.
- Issue Tracker
- =============
+ ## Issue Tracker
If you encounter errors in OODT or want to suggest an improvement or a new
-feature, please visit the OODT issue tracker at
+feature, please visit the OODT issue tracker
https://issues.apache.org/jira/browse/OODT. There you can also find the
latest information on known issues and recent bug fixes and enhancements.
[13/35] oodt git commit: Created test cases for distributed
configuration manager and publisher
Posted by ma...@apache.org.
http://git-wip-us.apache.org/repos/asf/oodt/blob/a973c531/config/src/main/resources/examples/resmgr/cmd-line-actions.xml
----------------------------------------------------------------------
diff --git a/config/src/main/resources/examples/resmgr/cmd-line-actions.xml b/config/src/main/resources/examples/resmgr/cmd-line-actions.xml
new file mode 100755
index 0000000..04919e9
--- /dev/null
+++ b/config/src/main/resources/examples/resmgr/cmd-line-actions.xml
@@ -0,0 +1,92 @@
+<?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.
+
+ Author: bfoster (Brian Foster)
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
+
+ <bean id="addNode"
+ class="org.apache.oodt.cas.resource.cli.action.AddNodeCliAction">
+ <property name="description" value="Adds a ResourceNode" />
+ </bean>
+ <bean id="addNodeToQueue"
+ class="org.apache.oodt.cas.resource.cli.action.AddNodeToQueueCliAction">
+ <property name="description" value="Adds a ResourceNode to a Queue" />
+ </bean>
+ <bean id="addQueue"
+ class="org.apache.oodt.cas.resource.cli.action.AddQueueCliAction">
+ <property name="description" value="Adds a queue" />
+ </bean>
+ <bean id="getExecNode"
+ class="org.apache.oodt.cas.resource.cli.action.GetExecNodeCliAction">
+ <property name="description" value="Get execution node for a job" />
+ </bean>
+ <bean id="getJobInfo"
+ class="org.apache.oodt.cas.resource.cli.action.GetJobInfoCliAction">
+ <property name="description" value="Gets information about a job" />
+ </bean>
+ <bean id="getNodeById"
+ class="org.apache.oodt.cas.resource.cli.action.GetNodeByIdCliAction">
+ <property name="description" value="Gets information about a node" />
+ </bean>
+ <bean id="getNodeLoad"
+ class="org.apache.oodt.cas.resource.cli.action.GetNodeLoadCliAction">
+ <property name="description" value="Gets the current job load of a node" />
+ </bean>
+ <bean id="getNodes"
+ class="org.apache.oodt.cas.resource.cli.action.GetNodesCliAction">
+ <property name="description" value="Gets a list of managed nodes" />
+ </bean>
+ <bean id="getNodesInQueue"
+ class="org.apache.oodt.cas.resource.cli.action.GetNodesInQueueCliAction">
+ <property name="description"
+ value="Gets list of nodes which belong to given queue" />
+ </bean>
+ <bean id="getQueues"
+ class="org.apache.oodt.cas.resource.cli.action.GetQueuesCliAction">
+ <property name="description" value="Gets list of queues" />
+ </bean>
+ <bean id="getQueuesWithNode"
+ class="org.apache.oodt.cas.resource.cli.action.GetQueuesWithNodeCliAction">
+ <property name="description" value="Gets list of queues which contain given node" />
+ </bean>
+ <bean id="kill" class="org.apache.oodt.cas.resource.cli.action.KillCliAction">
+ <property name="description" value="Kills a job" />
+ </bean>
+ <bean id="removeNode"
+ class="org.apache.oodt.cas.resource.cli.action.RemoveNodeCliAction">
+ <property name="description" value="Removes given node from managed nodes" />
+ </bean>
+ <bean id="removeNodeFromQueue"
+ class="org.apache.oodt.cas.resource.cli.action.RemoveNodeFromQueueCliAction">
+ <property name="description" value="Removes given node from given queue" />
+ </bean>
+ <bean id="removeQueue"
+ class="org.apache.oodt.cas.resource.cli.action.RemoveQueueCliAction">
+ <property name="description" value="Removes a queue" />
+ </bean>
+ <bean id="setNodeCapacity"
+ class="org.apache.oodt.cas.resource.cli.action.SetNodeCapacityCliAction">
+ <property name="description" value="Changes a nodes capacity" />
+ </bean>
+ <bean id="submitJob"
+ class="org.apache.oodt.cas.resource.cli.action.SubmitJobCliAction">
+ <property name="description" value="Submits a job for execution" />
+ </bean>
+</beans>
http://git-wip-us.apache.org/repos/asf/oodt/blob/a973c531/config/src/main/resources/examples/resmgr/cmd-line-options.xml
----------------------------------------------------------------------
diff --git a/config/src/main/resources/examples/resmgr/cmd-line-options.xml b/config/src/main/resources/examples/resmgr/cmd-line-options.xml
new file mode 100755
index 0000000..a7a1fde
--- /dev/null
+++ b/config/src/main/resources/examples/resmgr/cmd-line-options.xml
@@ -0,0 +1,601 @@
+<?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.
+
+ Author: bfoster (Brian Foster)
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
+
+ <bean id="url" class="org.apache.oodt.cas.cli.option.AdvancedCmdLineOption">
+ <property name="shortOption" value="u" />
+ <property name="longOption" value="url" />
+ <property name="description" value="Resource Manager URL" />
+ <property name="hasArgs" value="true" />
+ <property name="argsDescription" value="url" />
+ <property name="required" value="true" />
+ <property name="handler">
+ <bean
+ class="org.apache.oodt.cas.cli.option.handler.SetJavaPropertiesHandler">
+ <property name="propertyNames">
+ <list>
+ <value>org.apache.oodt.cas.resource.url</value>
+ </list>
+ </property>
+ </bean>
+ </property>
+ </bean>
+
+ <bean id="operation" class="org.apache.oodt.cas.cli.option.GroupCmdLineOption">
+ <property name="shortOption" value="op" />
+ <property name="longOption" value="operation" />
+ <property name="description"
+ value="Declare that you wish to present an operation" />
+ <property name="hasArgs" value="false" />
+ <property name="required" value="true" />
+ <property name="subOptions">
+ <list>
+ <bean class="org.apache.oodt.cas.cli.option.GroupSubOption"
+ p:option-ref="getNodeById" p:required="false" />
+ <bean class="org.apache.oodt.cas.cli.option.GroupSubOption"
+ p:option-ref="getNodes" p:required="false" />
+ <bean class="org.apache.oodt.cas.cli.option.GroupSubOption"
+ p:option-ref="getQueues" p:required="false" />
+ <bean class="org.apache.oodt.cas.cli.option.GroupSubOption"
+ p:option-ref="addNode" p:required="false" />
+ <bean class="org.apache.oodt.cas.cli.option.GroupSubOption"
+ p:option-ref="removeNode" p:required="false" />
+ <bean class="org.apache.oodt.cas.cli.option.GroupSubOption"
+ p:option-ref="setNodeCapacity" p:required="false" />
+ <bean class="org.apache.oodt.cas.cli.option.GroupSubOption"
+ p:option-ref="getExecNode" p:required="false" />
+ <bean class="org.apache.oodt.cas.cli.option.GroupSubOption"
+ p:option-ref="addQueue" p:required="false" />
+ <bean class="org.apache.oodt.cas.cli.option.GroupSubOption"
+ p:option-ref="removeQueue" p:required="false" />
+ <bean class="org.apache.oodt.cas.cli.option.GroupSubOption"
+ p:option-ref="addNodeToQueue" p:required="false" />
+ <bean class="org.apache.oodt.cas.cli.option.GroupSubOption"
+ p:option-ref="getNodesInQueue" p:required="false" />
+ <bean class="org.apache.oodt.cas.cli.option.GroupSubOption"
+ p:option-ref="getQueuesWithNode" p:required="false" />
+ <bean class="org.apache.oodt.cas.cli.option.GroupSubOption"
+ p:option-ref="removeNodeFromQueue" p:required="false" />
+ <bean class="org.apache.oodt.cas.cli.option.GroupSubOption"
+ p:option-ref="getNodeLoad" p:required="false" />
+ <bean class="org.apache.oodt.cas.cli.option.GroupSubOption"
+ p:option-ref="submitJob" p:required="false" />
+ <bean class="org.apache.oodt.cas.cli.option.GroupSubOption"
+ p:option-ref="getJobInfo" p:required="false" />
+ <bean class="org.apache.oodt.cas.cli.option.GroupSubOption"
+ p:option-ref="kill" p:required="false" />
+ </list>
+ </property>
+ </bean>
+
+ <!-- GetNodeById Options -->
+ <bean id="getNodeById" class="org.apache.oodt.cas.cli.option.ActionCmdLineOption"
+ p:isSubOption="true">
+ <property name="shortOption" value="nbyid" />
+ <property name="longOption" value="getNodeById" />
+ <property name="description" value="Triggers getNodeById Action" />
+ <property name="hasArgs" value="false" />
+ <property name="staticArgs">
+ <list>
+ <value>getNodeById</value>
+ </list>
+ </property>
+ <property name="requirementRules">
+ <list>
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="getNodeById" p:relation="REQUIRED" />
+ </list>
+ </property>
+ </bean>
+
+ <!-- GetNodes Options -->
+ <bean id="getNodes" class="org.apache.oodt.cas.cli.option.ActionCmdLineOption"
+ p:isSubOption="true">
+ <property name="shortOption" value="nodes" />
+ <property name="longOption" value="getNodes" />
+ <property name="description" value="Triggers getNodes Action" />
+ <property name="hasArgs" value="false" />
+ <property name="staticArgs">
+ <list>
+ <value>getNodes</value>
+ </list>
+ </property>
+ <property name="requirementRules">
+ <list>
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="getNodes" p:relation="REQUIRED" />
+ </list>
+ </property>
+ </bean>
+
+ <!-- GetQueues Options -->
+ <bean id="getQueues" class="org.apache.oodt.cas.cli.option.ActionCmdLineOption"
+ p:isSubOption="true">
+ <property name="shortOption" value="queues" />
+ <property name="longOption" value="getQueues" />
+ <property name="description" value="Triggers getQueues Action" />
+ <property name="hasArgs" value="false" />
+ <property name="staticArgs">
+ <list>
+ <value>getQueues</value>
+ </list>
+ </property>
+ <property name="requirementRules">
+ <list>
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="getQueues" p:relation="REQUIRED" />
+ </list>
+ </property>
+ </bean>
+
+ <!-- AddNode Options -->
+ <bean id="addNode" class="org.apache.oodt.cas.cli.option.ActionCmdLineOption"
+ p:isSubOption="true">
+ <property name="shortOption" value="an" />
+ <property name="longOption" value="addNode" />
+ <property name="description" value="Triggers addNode Action" />
+ <property name="hasArgs" value="false" />
+ <property name="staticArgs">
+ <list>
+ <value>addNode</value>
+ </list>
+ </property>
+ <property name="requirementRules">
+ <list>
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="addNode" p:relation="REQUIRED" />
+ </list>
+ </property>
+ </bean>
+
+ <bean id="ipAddr" class="org.apache.oodt.cas.cli.option.AdvancedCmdLineOption">
+ <property name="shortOption" value="addr" />
+ <property name="longOption" value="ipAddr" />
+ <property name="description" value="Node IP Address" />
+ <property name="type" value="java.net.URL" />
+ <property name="hasArgs" value="true" />
+ <property name="argsDescription" value="ip-addr" />
+ <property name="requirementRules">
+ <list>
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="addNode" p:relation="REQUIRED" />
+ </list>
+ </property>
+ <property name="handler">
+ <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToActionHandler">
+ <property name="applyToActions">
+ <list>
+ <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToAction"
+ p:actionName="addNode" p:methodName="setNodeUrl" />
+ </list>
+ </property>
+ </bean>
+ </property>
+ </bean>
+
+ <!-- RemoveNode Options -->
+ <bean id="removeNode" class="org.apache.oodt.cas.cli.option.ActionCmdLineOption"
+ p:isSubOption="true">
+ <property name="shortOption" value="rn" />
+ <property name="longOption" value="removeNode" />
+ <property name="description" value="Triggers removeNode Action" />
+ <property name="hasArgs" value="false" />
+ <property name="staticArgs">
+ <list>
+ <value>removeNode</value>
+ </list>
+ </property>
+ <property name="requirementRules">
+ <list>
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="removeNode" p:relation="REQUIRED" />
+ </list>
+ </property>
+ </bean>
+
+ <!-- SetNodeCapacity Options -->
+ <bean id="setNodeCapacity" class="org.apache.oodt.cas.cli.option.ActionCmdLineOption"
+ p:isSubOption="true">
+ <property name="shortOption" value="sncap" />
+ <property name="longOption" value="setNodeCapacity" />
+ <property name="description" value="Triggers setNodeCapacity Action" />
+ <property name="hasArgs" value="false" />
+ <property name="staticArgs">
+ <list>
+ <value>setNodeCapacity</value>
+ </list>
+ </property>
+ <property name="requirementRules">
+ <list>
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="setNodeCapacity" p:relation="REQUIRED" />
+ </list>
+ </property>
+ </bean>
+
+ <!-- SetNodeCapacity Options -->
+ <bean id="getExecNode" class="org.apache.oodt.cas.cli.option.ActionCmdLineOption"
+ p:isSubOption="true">
+ <property name="shortOption" value="exeNode" />
+ <property name="longOption" value="getExecNode" />
+ <property name="description" value="Triggers getExecNode Action" />
+ <property name="hasArgs" value="false" />
+ <property name="staticArgs">
+ <list>
+ <value>getExecNode</value>
+ </list>
+ </property>
+ <property name="requirementRules">
+ <list>
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="getExecNode" p:relation="REQUIRED" />
+ </list>
+ </property>
+ </bean>
+
+ <!-- AddQueue Options -->
+ <bean id="addQueue" class="org.apache.oodt.cas.cli.option.ActionCmdLineOption"
+ p:isSubOption="true">
+ <property name="shortOption" value="aq" />
+ <property name="longOption" value="addQueue" />
+ <property name="description" value="Triggers addQueue Action" />
+ <property name="hasArgs" value="false" />
+ <property name="staticArgs">
+ <list>
+ <value>addQueue</value>
+ </list>
+ </property>
+ <property name="requirementRules">
+ <list>
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="addQueue" p:relation="REQUIRED" />
+ </list>
+ </property>
+ </bean>
+
+ <!-- RemoveQueue Options -->
+ <bean id="removeQueue" class="org.apache.oodt.cas.cli.option.ActionCmdLineOption"
+ p:isSubOption="true">
+ <property name="shortOption" value="rq" />
+ <property name="longOption" value="removeQueue" />
+ <property name="description" value="Triggers removeQueue Action" />
+ <property name="hasArgs" value="false" />
+ <property name="staticArgs">
+ <list>
+ <value>removeQueue</value>
+ </list>
+ </property>
+ <property name="requirementRules">
+ <list>
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="removeQueue" p:relation="REQUIRED" />
+ </list>
+ </property>
+ </bean>
+
+ <!-- AddNodeToQueue Options -->
+ <bean id="addNodeToQueue" class="org.apache.oodt.cas.cli.option.ActionCmdLineOption"
+ p:isSubOption="true">
+ <property name="shortOption" value="antq" />
+ <property name="longOption" value="addNodeToQueue" />
+ <property name="description" value="Triggers addNodeToQueue Action" />
+ <property name="hasArgs" value="false" />
+ <property name="staticArgs">
+ <list>
+ <value>addNodeToQueue</value>
+ </list>
+ </property>
+ <property name="requirementRules">
+ <list>
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="addNodeToQueue" p:relation="REQUIRED" />
+ </list>
+ </property>
+ </bean>
+
+ <!-- GetNodesInQueue Options -->
+ <bean id="getNodesInQueue" class="org.apache.oodt.cas.cli.option.ActionCmdLineOption"
+ p:isSubOption="true">
+ <property name="shortOption" value="ninq" />
+ <property name="longOption" value="getNodesInQueue" />
+ <property name="description" value="Triggers getNodesInQueue Action" />
+ <property name="hasArgs" value="false" />
+ <property name="staticArgs">
+ <list>
+ <value>getNodesInQueue</value>
+ </list>
+ </property>
+ <property name="requirementRules">
+ <list>
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="getNodesInQueue" p:relation="REQUIRED" />
+ </list>
+ </property>
+ </bean>
+
+ <!-- GetQueuesWithNode Options -->
+ <bean id="getQueuesWithNode" class="org.apache.oodt.cas.cli.option.ActionCmdLineOption"
+ p:isSubOption="true">
+ <property name="shortOption" value="qwn" />
+ <property name="longOption" value="getQueuesWithNode" />
+ <property name="description" value="Triggers getQueuesWithNode Action" />
+ <property name="hasArgs" value="false" />
+ <property name="staticArgs">
+ <list>
+ <value>getQueuesWithNode</value>
+ </list>
+ </property>
+ <property name="requirementRules">
+ <list>
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="getQueuesWithNode" p:relation="REQUIRED" />
+ </list>
+ </property>
+ </bean>
+
+ <!-- RemoveNodeFromQueue Options -->
+ <bean id="removeNodeFromQueue" class="org.apache.oodt.cas.cli.option.ActionCmdLineOption"
+ p:isSubOption="true">
+ <property name="shortOption" value="rnfq" />
+ <property name="longOption" value="removeNodeFromQueue" />
+ <property name="description" value="Triggers removeNodeFromQueue Action" />
+ <property name="hasArgs" value="false" />
+ <property name="staticArgs">
+ <list>
+ <value>removeNodeFromQueue</value>
+ </list>
+ </property>
+ <property name="requirementRules">
+ <list>
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="removeNodeFromQueue" p:relation="REQUIRED" />
+ </list>
+ </property>
+ </bean>
+
+ <!-- GetNodeLoad Options -->
+ <bean id="getNodeLoad" class="org.apache.oodt.cas.cli.option.ActionCmdLineOption"
+ p:isSubOption="true">
+ <property name="shortOption" value="load" />
+ <property name="longOption" value="getNodeLoad" />
+ <property name="description" value="Triggers getNodeLoad Action" />
+ <property name="hasArgs" value="false" />
+ <property name="staticArgs">
+ <list>
+ <value>getNodeLoad</value>
+ </list>
+ </property>
+ <property name="requirementRules">
+ <list>
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="getNodeLoad" p:relation="REQUIRED" />
+ </list>
+ </property>
+ </bean>
+
+ <!-- SubmitJob Options -->
+ <bean id="submitJob" class="org.apache.oodt.cas.cli.option.ActionCmdLineOption"
+ p:isSubOption="true">
+ <property name="shortOption" value="submit" />
+ <property name="longOption" value="submitJob" />
+ <property name="description" value="Triggers submitJob Action" />
+ <property name="hasArgs" value="false" />
+ <property name="staticArgs">
+ <list>
+ <value>submitJob</value>
+ </list>
+ </property>
+ <property name="requirementRules">
+ <list>
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="submitJob" p:relation="REQUIRED" />
+ </list>
+ </property>
+ </bean>
+
+ <bean id="def" class="org.apache.oodt.cas.cli.option.AdvancedCmdLineOption">
+ <property name="shortOption" value="d" />
+ <property name="longOption" value="def" />
+ <property name="description" value="Job Definition File" />
+ <property name="hasArgs" value="true" />
+ <property name="argsDescription" value="xml-file" />
+ <property name="requirementRules">
+ <list>
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="submitJob" p:relation="REQUIRED" />
+ </list>
+ </property>
+ <property name="handler">
+ <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToActionHandler">
+ <property name="applyToActions">
+ <list>
+ <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToAction"
+ p:actionName="submitJob" p:methodName="setJobDefinitionFile" />
+ </list>
+ </property>
+ </bean>
+ </property>
+ </bean>
+
+ <bean id="nodeUrl" class="org.apache.oodt.cas.cli.option.AdvancedCmdLineOption">
+ <property name="shortOption" value="nu" />
+ <property name="longOption" value="nodeUrl" />
+ <property name="description" value="Node URL" />
+ <property name="type" value="java.net.URL" />
+ <property name="hasArgs" value="true" />
+ <property name="argsDescription" value="url" />
+ <property name="requirementRules">
+ <list>
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="submitJob" p:relation="OPTIONAL" />
+ </list>
+ </property>
+ <property name="handler">
+ <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToActionHandler">
+ <property name="applyToActions">
+ <list>
+ <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToAction"
+ p:actionName="submitJob" p:methodName="setUrl" />
+ </list>
+ </property>
+ </bean>
+ </property>
+ </bean>
+
+ <!-- GetJobInfo Options -->
+ <bean id="getJobInfo" class="org.apache.oodt.cas.cli.option.ActionCmdLineOption"
+ p:isSubOption="true">
+ <property name="shortOption" value="info" />
+ <property name="longOption" value="getJobInfo" />
+ <property name="description" value="Triggers getJobInfo Action" />
+ <property name="hasArgs" value="false" />
+ <property name="staticArgs">
+ <list>
+ <value>getJobInfo</value>
+ </list>
+ </property>
+ <property name="requirementRules">
+ <list>
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="getJobInfo" p:relation="REQUIRED" />
+ </list>
+ </property>
+ </bean>
+
+ <!-- Kill Options -->
+ <bean id="kill" class="org.apache.oodt.cas.cli.option.ActionCmdLineOption"
+ p:isSubOption="true">
+ <property name="shortOption" value="k" />
+ <property name="longOption" value="kill" />
+ <property name="description" value="Triggers kill Action" />
+ <property name="hasArgs" value="false" />
+ <property name="staticArgs">
+ <list>
+ <value>kill</value>
+ </list>
+ </property>
+ <property name="requirementRules">
+ <list>
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="kill" p:relation="REQUIRED" />
+ </list>
+ </property>
+ </bean>
+
+ <!-- Options used for multiple Actions -->
+ <bean id="nodeId" class="org.apache.oodt.cas.cli.option.AdvancedCmdLineOption">
+ <property name="shortOption" value="nid" />
+ <property name="longOption" value="nodeId" />
+ <property name="description" value="Node ID" />
+ <property name="hasArgs" value="true" />
+ <property name="argsDescription" value="node-id" />
+ <property name="requirementRules">
+ <list>
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="getNodeById" p:relation="REQUIRED" />
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="addNode" p:relation="REQUIRED" />
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="removeNode" p:relation="REQUIRED" />
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="setNodeCapacity" p:relation="REQUIRED" />
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="addNodeToQueue" p:relation="REQUIRED" />
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="getQueuesWithNode" p:relation="REQUIRED" />
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="removeNodeFromQueue" p:relation="REQUIRED" />
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="getNodeLoad" p:relation="REQUIRED" />
+ </list>
+ </property>
+ <property name="handler">
+ <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToActionHandler" />
+ </property>
+ </bean>
+
+ <bean id="capacity" class="org.apache.oodt.cas.cli.option.AdvancedCmdLineOption">
+ <property name="shortOption" value="cap" />
+ <property name="longOption" value="capacity" />
+ <property name="description" value="Node Capacity" />
+ <property name="type" value="int" />
+ <property name="hasArgs" value="true" />
+ <property name="argsDescription" value="capacity" />
+ <property name="requirementRules">
+ <list>
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="addNode" p:relation="REQUIRED" />
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="setNodeCapacity" p:relation="REQUIRED" />
+ </list>
+ </property>
+ <property name="handler">
+ <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToActionHandler" />
+ </property>
+ </bean>
+
+ <bean id="queueName" class="org.apache.oodt.cas.cli.option.AdvancedCmdLineOption">
+ <property name="shortOption" value="qn" />
+ <property name="longOption" value="queueName" />
+ <property name="description" value="Queue name" />
+ <property name="hasArgs" value="true" />
+ <property name="argsDescription" value="queue-name" />
+ <property name="requirementRules">
+ <list>
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="addQueue" p:relation="REQUIRED" />
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="removeQueue" p:relation="REQUIRED" />
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="addNodeToQueue" p:relation="REQUIRED" />
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="getNodesInQueue" p:relation="REQUIRED" />
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="removeNodeFromQueue" p:relation="REQUIRED" />
+ </list>
+ </property>
+ <property name="handler">
+ <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToActionHandler" />
+ </property>
+ </bean>
+
+ <bean id="jobId" class="org.apache.oodt.cas.cli.option.AdvancedCmdLineOption">
+ <property name="shortOption" value="jid" />
+ <property name="longOption" value="jobId" />
+ <property name="description" value="Job ID" />
+ <property name="hasArgs" value="true" />
+ <property name="argsDescription" value="job-id" />
+ <property name="requirementRules">
+ <list>
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="getJobInfo" p:relation="REQUIRED" />
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="getExecNode" p:relation="REQUIRED" />
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="kill" p:relation="REQUIRED" />
+ </list>
+ </property>
+ <property name="handler">
+ <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToActionHandler" />
+ </property>
+ </bean>
+</beans>
http://git-wip-us.apache.org/repos/asf/oodt/blob/a973c531/config/src/main/resources/examples/resmgr/jobs/exJob.xml
----------------------------------------------------------------------
diff --git a/config/src/main/resources/examples/resmgr/jobs/exJob.xml b/config/src/main/resources/examples/resmgr/jobs/exJob.xml
new file mode 100755
index 0000000..bbe0def
--- /dev/null
+++ b/config/src/main/resources/examples/resmgr/jobs/exJob.xml
@@ -0,0 +1,30 @@
+<?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.
+-->
+<cas:job xmlns:cas="http://oodt.jpl.nasa.gov/1.0/cas" id="abcd"
+ name="TestJob">
+ <instanceClass
+ name="org.apache.oodt.cas.resource.examples.HelloWorldJob" />
+ <inputClass
+ name="org.apache.oodt.cas.resource.structs.NameValueJobInput">
+ <properties>
+ <property name="user.name" value="Homer!" />
+ </properties>
+ </inputClass>
+ <queue>quick</queue>
+ <load>1</load>
+</cas:job>
http://git-wip-us.apache.org/repos/asf/oodt/blob/a973c531/config/src/main/resources/examples/resmgr/jobs/exLongJob.xml
----------------------------------------------------------------------
diff --git a/config/src/main/resources/examples/resmgr/jobs/exLongJob.xml b/config/src/main/resources/examples/resmgr/jobs/exLongJob.xml
new file mode 100755
index 0000000..3cbeb29
--- /dev/null
+++ b/config/src/main/resources/examples/resmgr/jobs/exLongJob.xml
@@ -0,0 +1,30 @@
+<?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.
+-->
+<cas:job xmlns:cas="http://oodt.jpl.nasa.gov/1.0/cas" id="abcd"
+ name="TestJob">
+ <instanceClass
+ name="org.apache.oodt.cas.resource.examples.LongJob" />
+ <inputClass
+ name="org.apache.oodt.cas.resource.structs.NameValueJobInput">
+ <properties>
+ <property name="wait" value="60" />
+ </properties>
+ </inputClass>
+ <queue>quick</queue>
+ <load>1</load>
+</cas:job>
http://git-wip-us.apache.org/repos/asf/oodt/blob/a973c531/config/src/main/resources/examples/resmgr/logging.properties
----------------------------------------------------------------------
diff --git a/config/src/main/resources/examples/resmgr/logging.properties b/config/src/main/resources/examples/resmgr/logging.properties
new file mode 100755
index 0000000..8785c8b
--- /dev/null
+++ b/config/src/main/resources/examples/resmgr/logging.properties
@@ -0,0 +1,67 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE.txt 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.
+#
+
+# Specify the handlers to create in the root logger
+# (all loggers are children of the root logger)
+# The following creates two handlers
+handlers = java.util.logging.ConsoleHandler, java.util.logging.FileHandler
+
+# Set the default logging level for the root logger
+.level = ALL
+
+# Set the default logging level for new ConsoleHandler instances
+java.util.logging.ConsoleHandler.level = ALL
+java.util.logging.FileHandler.level = ALL
+
+# Set the default formatter for new ConsoleHandler instances
+java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
+
+# default file output is in user's home directory.
+java.util.logging.FileHandler.pattern = ../logs/cas_resource%g.log
+java.util.logging.FileHandler.limit = 50000
+java.util.logging.FileHandler.count = 5
+java.util.logging.FileHandler.append = true
+java.util.logging.FileHandler.formatter = java.util.logging.SimpleFormatter
+
+# Set the default logging level for the subsystems
+
+# batchmgr subsystem
+org.apache.oodt.cas.resource.batchmgr.level = INFO
+
+# monitor subsystem
+org.apache.oodt.cas.resource.monitor.level = INFO
+
+# jobqueue subsystem
+org.apache.oodt.cas.resource.jobqueue.level = INFO
+
+# scheduler subsystem
+org.apache.oodt.cas.resource.scheduler.level = INFO
+
+# system subsystem
+org.apache.oodt.cas.resource.system.level = FINE
+
+# control the underlying commons-httpclient transport layer for xmlrpc
+org.apache.commons.httpclient.level = INFO
+httpclient.wire.header.level = INFO
+httpclient.wire.level = INFO
+
+# spring framework logging
+org.springframework.beans.level = SEVERE
+org.springframework.core.level = SEVERE
+org.springframework.level = SEVERE
+org.springframework.beans.factory.level = SEVERE
+org.springframework.beans.factory.config.level = SEVERE
+org.springframework.beans.factory.config.PropertyPlaceholderConfigurer.level = SEVERE
http://git-wip-us.apache.org/repos/asf/oodt/blob/a973c531/config/src/main/resources/examples/resmgr/node-to-queue-mapping.xml
----------------------------------------------------------------------
diff --git a/config/src/main/resources/examples/resmgr/node-to-queue-mapping.xml b/config/src/main/resources/examples/resmgr/node-to-queue-mapping.xml
new file mode 100755
index 0000000..73b0eba
--- /dev/null
+++ b/config/src/main/resources/examples/resmgr/node-to-queue-mapping.xml
@@ -0,0 +1,26 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more contributor
+license agreements. See the NOTICE.txt 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.
+-->
+<cas:node-to-queue-mapping xmlns:cas="http://oodt.jpl.nasa.gov/1.0/cas">
+ <node id="localhost">
+ <queues>
+ <queue name="high"/>
+ <queue name="quick"/>
+ <queue name="long"/>
+ </queues>
+ </node>
+</cas:node-to-queue-mapping>
http://git-wip-us.apache.org/repos/asf/oodt/blob/a973c531/config/src/main/resources/examples/resmgr/nodes.xml
----------------------------------------------------------------------
diff --git a/config/src/main/resources/examples/resmgr/nodes.xml b/config/src/main/resources/examples/resmgr/nodes.xml
new file mode 100755
index 0000000..d3d415d
--- /dev/null
+++ b/config/src/main/resources/examples/resmgr/nodes.xml
@@ -0,0 +1,23 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more contributor
+license agreements. See the NOTICE.txt 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.
+-->
+<cas:resourcenodes xmlns:cas="http://oodt.jpl.nasa.gov/1.0/cas">
+ <node nodeId="localhost" ip="http://localhost:2001" capacity="8"/>
+ <!-- EnvReplace Example
+ <node nodeId="somehost" ip="http://somehost:[BATCH_STUB_PORT]" capacity="8" envReplace="true"/>
+ -->
+</cas:resourcenodes>
http://git-wip-us.apache.org/repos/asf/oodt/blob/a973c531/config/src/main/resources/examples/resmgr/resource.properties
----------------------------------------------------------------------
diff --git a/config/src/main/resources/examples/resmgr/resource.properties b/config/src/main/resources/examples/resmgr/resource.properties
new file mode 100755
index 0000000..5520c7b
--- /dev/null
+++ b/config/src/main/resources/examples/resmgr/resource.properties
@@ -0,0 +1,61 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE.txt 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.
+#
+#
+# Properties required to configure the Resource Manager
+
+# resource batchmgr factory
+resource.batchmgr.factory = org.apache.oodt.cas.resource.batchmgr.XmlRpcBatchMgrFactory
+
+# resource monitor factory
+resource.monitor.factory = org.apache.oodt.cas.resource.monitor.AssignmentMonitorFactory
+
+# resource scheduler factory
+resource.scheduler.factory = org.apache.oodt.cas.resource.scheduler.LRUSchedulerFactory
+
+# resource jobqueue factory
+resource.jobqueue.factory = org.apache.oodt.cas.resource.jobqueue.JobStackJobQueueFactory
+
+# resource job repository factory
+resource.jobrepo.factory = org.apache.oodt.cas.resource.jobrepo.MemoryJobRepositoryFactory
+
+# node repository factory
+org.apache.oodt.cas.resource.nodes.repo.factory = org.apache.oodt.cas.resource.noderepo.XmlNodeRepositoryFactory
+
+# queue repository factory
+org.apache.oodt.cas.resource.queues.repo.factory = org.apache.oodt.cas.resource.queuerepo.XmlQueueRepositoryFactory
+
+# JobStack JobQueue config properties
+org.apache.oodt.cas.resource.jobqueue.jobstack.maxstacksize=1000
+
+# XML LRUScheduler config properties
+org.apache.oodt.cas.resource.scheduler.wait.seconds=20
+
+# XML-RPC configuration props
+org.apache.oodt.cas.resource.system.xmlrpc.requestTimeout.minutes=20
+org.apache.oodt.cas.resource.system.xmlrpc.connectionTimeout.minutes=60
+
+# XStream JobRepo configuration props
+org.apache.oodt.cas.resource.jobrepo.xstream.working.dir=[HOME]/job-repo
+org.apache.oodt.cas.resource.jobrepo.xstream.max.history=4000
+
+# XML Node Repository config properties
+org.apache.oodt.cas.resource.nodes.dirs=file://[RESMGR_HOME]/policy
+
+# XML Queue Repository config properties
+org.apache.oodt.cas.resource.nodetoqueues.dirs=file://[RESMGR_HOME]/policy
+
+
+
http://git-wip-us.apache.org/repos/asf/oodt/blob/a973c531/config/src/test/java/org/apache/oodt/config/distributed/AbstractTestCase.java
----------------------------------------------------------------------
diff --git a/config/src/test/java/org/apache/oodt/config/distributed/AbstractTestCase.java b/config/src/test/java/org/apache/oodt/config/distributed/AbstractTestCase.java
new file mode 100644
index 0000000..5bd0651
--- /dev/null
+++ b/config/src/test/java/org/apache/oodt/config/distributed/AbstractTestCase.java
@@ -0,0 +1,49 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.oodt.config.distributed;
+
+import org.apache.curator.framework.CuratorFramework;
+import org.apache.curator.test.TestingServer;
+import org.apache.oodt.config.distributed.utils.CuratorUtils;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+
+import static org.apache.oodt.config.Constants.Properties.ZK_CONNECT_STRING;
+
+public abstract class AbstractTestCase {
+
+ protected static TestingServer zookeeper;
+ protected static CuratorFramework client;
+
+ @BeforeClass
+ public static void setUp() throws Exception {
+ zookeeper = new TestingServer();
+ zookeeper.start();
+
+ System.setProperty(ZK_CONNECT_STRING, zookeeper.getConnectString());
+
+ client = CuratorUtils.newCuratorFrameworkClient(zookeeper.getConnectString());
+ client.start();
+ }
+
+ @AfterClass
+ public static void tearDown() throws Exception {
+ client.close();
+ zookeeper.stop();
+ }
+}
http://git-wip-us.apache.org/repos/asf/oodt/blob/a973c531/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationManagerTest.java
----------------------------------------------------------------------
diff --git a/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationManagerTest.java b/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationManagerTest.java
new file mode 100644
index 0000000..5a75ff6
--- /dev/null
+++ b/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationManagerTest.java
@@ -0,0 +1,122 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.oodt.config.distributed;
+
+import org.apache.commons.io.FileUtils;
+import org.apache.oodt.config.ConfigurationManager;
+import org.apache.oodt.config.distributed.cli.DistributedConfigurationPublisher;
+import org.junit.AfterClass;
+import org.junit.Assert;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.springframework.context.ApplicationContext;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+
+import static org.apache.oodt.config.Constants.CONFIG_PUBLISHER_XML;
+import static org.apache.oodt.config.Constants.SEPARATOR;
+
+/**
+ * Testing the {@link DistributedConfigurationManager} whether it is downloading and storing the configuration correctly
+ * in local files
+ *
+ * @author Imesha Sudasingha
+ */
+public class DistributedConfigurationManagerTest extends AbstractTestCase {
+
+ private static List<DistributedConfigurationPublisher> publishers;
+
+ @BeforeClass
+ public static void setUp() throws Exception {
+ AbstractTestCase.setUp();
+
+ DistributedConfigurationPublisher.main(new String[]{
+ "-connectString", zookeeper.getConnectString(),
+ "-publish"
+ });
+
+ ApplicationContext applicationContext = new ClassPathXmlApplicationContext(CONFIG_PUBLISHER_XML);
+ Map distributedConfigurationPublishers = applicationContext.getBeansOfType(DistributedConfigurationPublisher.class);
+
+ publishers = new ArrayList<>(distributedConfigurationPublishers.values().size());
+ for (Object bean : distributedConfigurationPublishers.values()) {
+ DistributedConfigurationPublisher publisher = (DistributedConfigurationPublisher) bean;
+ publishers.add(publisher);
+ ConfigurationManager configurationManager = new DistributedConfigurationManager(publisher.getComponentName());
+ configurationManager.loadConfiguration();
+ }
+ }
+
+ @Test
+ public void loadConfigurationTest() throws Exception {
+ for (DistributedConfigurationPublisher publisher : publishers) {
+ ConfigurationManager configurationManager = new DistributedConfigurationManager(publisher.getComponentName());
+ configurationManager.loadConfiguration();
+
+ // Checking for configuration files
+ for (Map.Entry<String, String> entry : publisher.getPropertiesFiles().entrySet()) {
+ File file = new File(entry.getKey());
+ Properties properties = new Properties();
+ try (InputStream in = new FileInputStream(file)) {
+ properties.load(in);
+ }
+
+ for (String key : properties.stringPropertyNames()) {
+ Assert.assertEquals(properties.getProperty(key), System.getProperty(key));
+ }
+ }
+
+ // Checking for configuration files
+ for (Map.Entry<String, String> entry : publisher.getConfigFiles().entrySet()) {
+ String fileName = entry.getValue();
+ fileName = fileName.startsWith(SEPARATOR) ? fileName.substring(1) : fileName;
+ File file = new File(fileName);
+ Assert.assertTrue(file.exists());
+ }
+ }
+ }
+
+ @AfterClass
+ public static void tearDown() throws Exception {
+ for (DistributedConfigurationPublisher publisher : publishers) {
+ publisher.destroy();
+
+ for (Map.Entry<String, String> entry : publisher.getConfigFiles().entrySet()) {
+ String fileName = entry.getValue();
+ fileName = fileName.startsWith(SEPARATOR) ? fileName.substring(1) : fileName;
+ String confDir = fileName.split(SEPARATOR)[0];
+ File dir = new File(confDir);
+ FileUtils.deleteDirectory(dir);
+ }
+ }
+
+ DistributedConfigurationPublisher.main(new String[]{
+ "-connectString", zookeeper.getConnectString(),
+ "-clear"
+ });
+
+ AbstractTestCase.tearDown();
+ }
+}
http://git-wip-us.apache.org/repos/asf/oodt/blob/a973c531/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationPublisherTest.java
----------------------------------------------------------------------
diff --git a/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationPublisherTest.java b/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationPublisherTest.java
index 21aef23..fbccbc7 100644
--- a/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationPublisherTest.java
+++ b/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationPublisherTest.java
@@ -17,59 +17,96 @@
package org.apache.oodt.config.distributed;
-import org.apache.curator.framework.CuratorFramework;
-import org.apache.curator.framework.CuratorFrameworkFactory;
-import org.apache.curator.retry.RetryNTimes;
-import org.apache.curator.test.TestingServer;
+import org.apache.commons.io.FileUtils;
import org.apache.oodt.config.distributed.cli.DistributedConfigurationPublisher;
-import org.junit.AfterClass;
import org.junit.Assert;
-import org.junit.BeforeClass;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
-import java.io.IOException;
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
import java.util.Map;
-public class DistributedConfigurationPublisherTest {
+import static org.apache.oodt.config.Constants.CONFIG_PUBLISHER_XML;
- private static final String DISTRIBUTED_CONFIG_PUBLISHER_SPRING_CONFIG = "etc/config-publisher.xml";
-
- private static TestingServer zookeeper;
- private static CuratorFramework client;
-
- @BeforeClass
- public static void setUp() throws Exception {
- zookeeper = new TestingServer();
- zookeeper.start();
-
- client = CuratorFrameworkFactory.builder()
- .connectString(zookeeper.getConnectString())
- .retryPolicy(new RetryNTimes(3, 1000))
- .build();
- client.start();
- }
+/**
+ * Testing the functionality of {@link DistributedConfigurationPublisher} and its CLI
+ *
+ * @author Imesha Sudasingha
+ */
+public class DistributedConfigurationPublisherTest extends AbstractTestCase{
@Test
public void publishConfigurationTest() throws Exception {
+ // Publishing configuration through CLI and verifying whether they were stored correctly
DistributedConfigurationPublisher.main(new String[]{
"-connectString", zookeeper.getConnectString(),
- "-publish"
+ "-publish",
+ "-verify"
});
- ApplicationContext applicationContext = new ClassPathXmlApplicationContext(DISTRIBUTED_CONFIG_PUBLISHER_SPRING_CONFIG);
+ ApplicationContext applicationContext = new ClassPathXmlApplicationContext(CONFIG_PUBLISHER_XML);
Map distributedConfigurationPublishers = applicationContext.getBeansOfType(DistributedConfigurationPublisher.class);
+ List<DistributedConfigurationPublisher> publishers = new ArrayList<>(distributedConfigurationPublishers.values().size());
for (Object bean : distributedConfigurationPublishers.values()) {
- DistributedConfigurationPublisher publisher = (DistributedConfigurationPublisher) bean;
+ publishers.add((DistributedConfigurationPublisher) bean);
+ }
+
+ for (DistributedConfigurationPublisher publisher : publishers) {
Assert.assertTrue(publisher.verifyPublishedConfiguration());
+
+ ZNodePaths zNodePaths = publisher.getZNodePaths();
+
+ // Checking for configuration files
+ for (Map.Entry<String, String> entry : publisher.getPropertiesFiles().entrySet()) {
+ String zNodePath = zNodePaths.getPropertiesZNodePath(entry.getValue());
+ Assert.assertNotNull(client.checkExists().forPath(zNodePath));
+
+ String storedContent = new String(client.getData().forPath(zNodePath));
+ String fileContent = FileUtils.readFileToString(new File(entry.getKey()));
+ Assert.assertEquals(fileContent, storedContent);
+ }
+
+ // Checking for configuration files
+ for (Map.Entry<String, String> entry : publisher.getConfigFiles().entrySet()) {
+ String zNodePath = zNodePaths.getConfigurationZNodePath(entry.getValue());
+ Assert.assertNotNull(client.checkExists().forPath(zNodePath));
+
+ String storedContent = new String(client.getData().forPath(zNodePath));
+ String fileContent = FileUtils.readFileToString(new File(entry.getKey()));
+ Assert.assertEquals(fileContent, storedContent);
+ }
}
- }
- @AfterClass
- public static void tearDown() throws IOException {
- client.close();
- zookeeper.stop();
+ // Clearing configuration through CLI and checking whether the configuration has actually been gone
+ DistributedConfigurationPublisher.main(new String[]{
+ "-connectString", zookeeper.getConnectString(),
+ "-clear"
+ });
+
+ for (DistributedConfigurationPublisher publisher : publishers) {
+ Assert.assertFalse(publisher.verifyPublishedConfiguration());
+
+ ZNodePaths zNodePaths = publisher.getZNodePaths();
+
+ // Checking for configuration files
+ for (Map.Entry<String, String> entry : publisher.getPropertiesFiles().entrySet()) {
+ String zNodePath = zNodePaths.getPropertiesZNodePath(entry.getValue());
+ Assert.assertNull(client.checkExists().forPath(zNodePath));
+ }
+
+ // Checking for configuration files
+ for (Map.Entry<String, String> entry : publisher.getConfigFiles().entrySet()) {
+ String zNodePath = zNodePaths.getConfigurationZNodePath(entry.getValue());
+ Assert.assertNull(client.checkExists().forPath(zNodePath));
+ }
+ }
+
+ for (DistributedConfigurationPublisher publisher : publishers) {
+ publisher.destroy();
+ }
}
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/oodt/blob/a973c531/config/src/test/resources/etc/config-publisher.xml
----------------------------------------------------------------------
diff --git a/config/src/test/resources/etc/config-publisher.xml b/config/src/test/resources/etc/config-publisher.xml
index 109f48f..f779f14 100644
--- a/config/src/test/resources/etc/config-publisher.xml
+++ b/config/src/test/resources/etc/config-publisher.xml
@@ -23,12 +23,17 @@
<constructor-arg value="filemgr"/>
<property name="propertiesFiles">
<map key-type="java.lang.String" value-type="java.lang.String">
- <entry key="src/main/resources/examples/filemgr.properties" value="/etc/filemgr.properties"/>
+ <entry key="src/main/resources/examples/filemgr/filemgr.properties" value="/etc/filemgr.properties"/>
</map>
</property>
<property name="configFiles">
<map key-type="java.lang.String" value-type="java.lang.String">
- <entry key="src/main/resources/examples/mime-types.xml" value="/etc/mime-types.xml"/>
+ <entry key="src/main/resources/examples/filemgr/mime-types.xml" value="/etc/mime-types.xml"/>
+ <entry key="src/main/resources/examples/filemgr/cmd-line-actions.xml" value="/policy/cmd-line-actions.xml"/>
+ <entry key="src/main/resources/examples/filemgr/cmd-line-options.xml" value="/policy/cmd-line-options.xml"/>
+ <entry key="src/main/resources/examples/filemgr/oodt/elements.xml" value="/policy/oodt/elements.xml"/>
+ <entry key="src/main/resources/examples/filemgr/oodt/product-types.xml" value="/policy/oodt/product-types.xml"/>
+ <entry key="src/main/resources/examples/filemgr/oodt/product-type-element-map.xml" value="/policy/oodt/product-type-element-map.xml"/>
</map>
</property>
</bean>
@@ -37,12 +42,18 @@
<constructor-arg value="resmgr"/>
<property name="propertiesFiles">
<map key-type="java.lang.String" value-type="java.lang.String">
- <entry key="src/main/resources/examples/filemgr.properties" value="/etc/resmgr.properties"/>
+ <entry key="src/main/resources/examples/resmgr/resource.properties" value="/etc/resource.properties"/>
+ <entry key="src/main/resources/examples/resmgr/logging.properties" value="/etc/logging.properties"/>
</map>
</property>
<property name="configFiles">
<map key-type="java.lang.String" value-type="java.lang.String">
- <entry key="src/main/resources/examples/mime-types.xml" value="/etc/mime-types.xml"/>
+ <entry key="src/main/resources/examples/resmgr/cmd-line-actions.xml" value="/policy/cmd-line-actions.xml"/>
+ <entry key="src/main/resources/examples/resmgr/cmd-line-options.xml" value="/policy/cmd-line-options.xml"/>
+ <entry key="src/main/resources/examples/resmgr/nodes.xml" value="/policy/nodes.xml"/>
+ <entry key="src/main/resources/examples/resmgr/node-to-queue-mapping.xml" value="/policy/node-to-queue-mapping.xml"/>
+ <entry key="src/main/resources/examples/resmgr/jobs/exJob.xml" value="/policy/jobs/exJob.xml"/>
+ <entry key="src/main/resources/examples/resmgr/jobs/exLongJob.xml" value="/policy/jobs/exLongJob.xml"/>
</map>
</property>
</bean>
[34/35] oodt git commit: Merge branch 'feature/zookeeper-config' of
https://github.com/IMS94/oodt into feature/zookeeper-config
Posted by ma...@apache.org.
Merge branch 'feature/zookeeper-config' of https://github.com/IMS94/oodt into feature/zookeeper-config
Project: http://git-wip-us.apache.org/repos/asf/oodt/repo
Commit: http://git-wip-us.apache.org/repos/asf/oodt/commit/b357f4b9
Tree: http://git-wip-us.apache.org/repos/asf/oodt/tree/b357f4b9
Diff: http://git-wip-us.apache.org/repos/asf/oodt/diff/b357f4b9
Branch: refs/heads/feature/zookeeper-config
Commit: b357f4b97cc6797ae0a2d5a6c1d06582325fdfbb
Parents: e481b0b daf555c
Author: Chris Mattmann <ma...@apache.org>
Authored: Fri Jul 14 11:45:05 2017 -0700
Committer: Chris Mattmann <ma...@apache.org>
Committed: Fri Jul 14 11:45:05 2017 -0700
----------------------------------------------------------------------
.../main/java/org/apache/oodt/config/Component.java | 4 ++--
.../distributed/DistributedConfigurationManager.java | 1 +
.../oodt/config/distributed/utils/FilePathUtils.java | 6 ++++--
.../DistributedConfigurationManagerTest.java | 15 +++++++++------
4 files changed, 16 insertions(+), 10 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/oodt/blob/b357f4b9/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationManagerTest.java
----------------------------------------------------------------------
diff --cc config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationManagerTest.java
index 975a062,d03f11a..08ecdc1
--- a/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationManagerTest.java
+++ b/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationManagerTest.java
@@@ -94,10 -88,10 +94,11 @@@ public class DistributedConfigurationMa
Assert.assertEquals(properties.getProperty(key), System.getProperty(key));
}
- String fileName = FilePathUtils.fixForComponentHome(publisher.getComponent(), entry.getValue());
- fileName = fileName.startsWith(SEPARATOR) ? fileName.substring(1) : fileName;
+ String fileName = entry.getValue();
+ fileName = fileName.startsWith(SEPARATOR) ? fileName.substring(SEPARATOR.length()) : fileName;
+ fileName = FilePathUtils.fixForComponentHome(publisher.getComponent(), fileName);
File downloadedFile = new File(fileName);
+ Assert.assertNotNull(downloadedFile);
Assert.assertTrue(downloadedFile.exists());
}
[12/35] oodt git commit: Added zip packaging for distributed
configuration publisher
Posted by ma...@apache.org.
Added zip packaging for distributed configuration publisher
Project: http://git-wip-us.apache.org/repos/asf/oodt/repo
Commit: http://git-wip-us.apache.org/repos/asf/oodt/commit/27a28daa
Tree: http://git-wip-us.apache.org/repos/asf/oodt/tree/27a28daa
Diff: http://git-wip-us.apache.org/repos/asf/oodt/diff/27a28daa
Branch: refs/heads/feature/zookeeper-config
Commit: 27a28daa3d3c448b462bd9a33eb6ac4fd859b75a
Parents: 5fcf222
Author: Imesha Sudasingha <im...@gmail.com>
Authored: Sun Jul 2 20:53:49 2017 +0530
Committer: Imesha Sudasingha <im...@gmail.com>
Committed: Sun Jul 2 20:53:49 2017 +0530
----------------------------------------------------------------------
config/pom.xml | 36 +-
config/src/main/assembly/assembly.xml | 56 +
.../java/org/apache/oodt/config/Constants.java | 7 +
.../DistributedConfigurationManager.java | 1 -
.../DistributedConfigurationPublisher.java | 208 -
.../config/distributed/cli/CmdLineOptions.java | 57 +
.../cli/DistributedConfigurationPublisher.java | 300 ++
.../config/distributed/utils/CuratorUtils.java | 1 +
.../src/main/resources/etc/config-publisher.xml | 36 +
config/src/main/resources/etc/log4j.xml | 34 +
.../main/resources/examples/filemgr.properties | 114 +
.../src/main/resources/examples/mime-types.xml | 4119 ++++++++++++++++++
.../DistributedConfigurationPublisherTest.java | 54 +-
.../oodt/config/distributed/TestServer.java | 45 +
.../resources/distributed-config-publisher.xml | 56 -
.../src/test/resources/etc/config-publisher.xml | 50 +
config/src/test/resources/filemgr.properties | 114 -
config/src/test/resources/log4j.xml | 34 -
config/src/test/resources/mime-types.xml | 4119 ------------------
core/pom.xml | 6 +
20 files changed, 4862 insertions(+), 4585 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/oodt/blob/27a28daa/config/pom.xml
----------------------------------------------------------------------
diff --git a/config/pom.xml b/config/pom.xml
index 891f520..d75e032 100644
--- a/config/pom.xml
+++ b/config/pom.xml
@@ -16,50 +16,68 @@
<description>OODT project for distributed configuration management support</description>
<dependencies>
-
<dependency>
<groupId>org.apache.curator</groupId>
<artifactId>curator-framework</artifactId>
</dependency>
-
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
</dependency>
-
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
</dependency>
-
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
</dependency>
-
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
</dependency>
-
+ <dependency>
+ <groupId>args4j</groupId>
+ <artifactId>args4j</artifactId>
+ </dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
-
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</dependency>
-
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</dependency>
-
<dependency>
<groupId>org.apache.curator</groupId>
<artifactId>curator-test</artifactId>
</dependency>
</dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <version>2.2-beta-2</version>
+ <configuration>
+ <descriptors>
+ <descriptor>src/main/assembly/assembly.xml</descriptor>
+ </descriptors>
+ </configuration>
+ <executions>
+ <execution>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ <phase>package</phase>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
</project>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/oodt/blob/27a28daa/config/src/main/assembly/assembly.xml
----------------------------------------------------------------------
diff --git a/config/src/main/assembly/assembly.xml b/config/src/main/assembly/assembly.xml
new file mode 100644
index 0000000..2743cab
--- /dev/null
+++ b/config/src/main/assembly/assembly.xml
@@ -0,0 +1,56 @@
+<!--
+ ~ 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.
+ -->
+<assembly>
+ <id>dist</id>
+ <formats>
+ <format>tar.gz</format>
+ <format>zip</format>
+ </formats>
+ <includeBaseDirectory>true</includeBaseDirectory>
+ <baseDirectory>${project.artifactId}-${project.version}</baseDirectory>
+ <includeSiteDirectory>false</includeSiteDirectory>
+ <fileSets>
+ <fileSet>
+ <directory>${basedir}</directory>
+ <outputDirectory>.</outputDirectory>
+ <includes>
+ <include>LICENSE.txt</include>
+ <include>CHANGES.txt</include>
+ </includes>
+ </fileSet>
+ <fileSet>
+ <directory>${basedir}/src/main/bin</directory>
+ <outputDirectory>bin</outputDirectory>
+ <includes/>
+ <fileMode>755</fileMode>
+ </fileSet>
+ <fileSet>
+ <directory>${basedir}/src/main/resources</directory>
+ <outputDirectory>.</outputDirectory>
+ <includes/>
+ </fileSet>
+ </fileSets>
+ <dependencySets>
+ <dependencySet>
+ <outputDirectory>lib</outputDirectory>
+ <unpack>false</unpack>
+ <useProjectArtifact>true</useProjectArtifact>
+ <useTransitiveDependencies>true</useTransitiveDependencies>
+ <unpackOptions/>
+ </dependencySet>
+ </dependencySets>
+</assembly>
http://git-wip-us.apache.org/repos/asf/oodt/blob/27a28daa/config/src/main/java/org/apache/oodt/config/Constants.java
----------------------------------------------------------------------
diff --git a/config/src/main/java/org/apache/oodt/config/Constants.java b/config/src/main/java/org/apache/oodt/config/Constants.java
index 033101b..d6969fe 100644
--- a/config/src/main/java/org/apache/oodt/config/Constants.java
+++ b/config/src/main/java/org/apache/oodt/config/Constants.java
@@ -17,6 +17,8 @@
package org.apache.oodt.config;
+import java.io.File;
+
/**
* Constants to be used by the config package
*
@@ -27,12 +29,17 @@ public class Constants {
private Constants() {
}
+ public static final String SEPARATOR = File.separator;
+
/** Node name to be used when the configuration manager is the standalone version */
public static final String STANDALONE_NODE_NAME = "local";
/** Default environment name to be used */
public static final String DEFAULT_ENVIRONMENT = "default";
+ /** The XML file name in which the configuration to be published to zookeeper is defined */
+ public static final String CONFIG_PUBLISHER_XML = "etc" + SEPARATOR + "config-publisher.xml";
+
public static class Properties {
/** The system property to be set in order to enable distributed configuration management */
public static final String ENABLE_DISTRIBUTED_CONFIGURATION = "org.apache.oodt.config.distributed";
http://git-wip-us.apache.org/repos/asf/oodt/blob/27a28daa/config/src/main/java/org/apache/oodt/config/distributed/DistributedConfigurationManager.java
----------------------------------------------------------------------
diff --git a/config/src/main/java/org/apache/oodt/config/distributed/DistributedConfigurationManager.java b/config/src/main/java/org/apache/oodt/config/distributed/DistributedConfigurationManager.java
index d16df7e..1a3f390 100644
--- a/config/src/main/java/org/apache/oodt/config/distributed/DistributedConfigurationManager.java
+++ b/config/src/main/java/org/apache/oodt/config/distributed/DistributedConfigurationManager.java
@@ -114,7 +114,6 @@ public class DistributedConfigurationManager extends ConfigurationManager {
logger.debug("Saving configuration files for : {}", componentName);
saveConfigFiles();
logger.info("Configuration files saved for : {}", componentName);
-
}
/**
http://git-wip-us.apache.org/repos/asf/oodt/blob/27a28daa/config/src/main/java/org/apache/oodt/config/distributed/DistributedConfigurationPublisher.java
----------------------------------------------------------------------
diff --git a/config/src/main/java/org/apache/oodt/config/distributed/DistributedConfigurationPublisher.java b/config/src/main/java/org/apache/oodt/config/distributed/DistributedConfigurationPublisher.java
deleted file mode 100644
index 37b57c9..0000000
--- a/config/src/main/java/org/apache/oodt/config/distributed/DistributedConfigurationPublisher.java
+++ /dev/null
@@ -1,208 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.oodt.config.distributed;
-
-import org.apache.commons.io.FileUtils;
-import org.apache.curator.framework.CuratorFramework;
-import org.apache.oodt.config.Constants;
-import org.apache.oodt.config.distributed.utils.CuratorUtils;
-import org.apache.zookeeper.data.Stat;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.BeansException;
-import org.springframework.context.ApplicationContext;
-import org.springframework.context.support.ClassPathXmlApplicationContext;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URISyntaxException;
-import java.net.URL;
-import java.util.Map;
-import java.util.concurrent.TimeUnit;
-
-import static org.apache.oodt.config.Constants.Properties.ZK_CONNECT_STRING;
-import static org.apache.oodt.config.Constants.Properties.ZK_PROPERTIES_FILE;
-
-/**
- * The class to publish configuration to Zookeeper. When using distributed configuration with OODT, configuration per
- * each component type needs to be stored in zookeeper beforehand. This class, provides the means to do that.
- *
- * @author Imesha Sudasingha
- */
-public class DistributedConfigurationPublisher {
-
- private static final Logger logger = LoggerFactory.getLogger(DistributedConfigurationPublisher.class);
-
- private Map<String, String> propertiesFiles;
- private Map<String, String> configFiles;
- private String connectString;
- private CuratorFramework client;
- private ZNodePaths zNodePaths;
- private String componentName;
-
- public DistributedConfigurationPublisher(String componentName) {
- this.componentName = componentName;
- this.zNodePaths = new ZNodePaths(componentName);
-
- if (System.getProperty(ZK_PROPERTIES_FILE) == null && System.getProperty(Constants.Properties.ZK_CONNECT_STRING) == null) {
- throw new IllegalArgumentException("Zookeeper requires system properties " + ZK_PROPERTIES_FILE + " or " + ZK_CONNECT_STRING + " to be set");
- }
-
- if (System.getProperty(ZK_PROPERTIES_FILE) != null) {
- try {
- CuratorUtils.loadZookeeperProperties();
- } catch (IOException e) {
- logger.error("Error occurred when loading properties from properties file");
- }
- }
-
- if (System.getProperty(Constants.Properties.ZK_CONNECT_STRING) == null) {
- throw new IllegalArgumentException("Zookeeper requires a proper connect string to connect to zookeeper ensemble");
- }
-
- connectString = System.getProperty(Constants.Properties.ZK_CONNECT_STRING);
- logger.info("Using zookeeper connect string : {}", connectString);
-
- startZookeeper();
- }
-
- /**
- * Creates a {@link CuratorFramework} instance and start it. This method will wait a maximum amount of
- * {@link Constants.Properties#ZK_STARTUP_TIMEOUT} milli-seconds until the client connects to the zookeeper ensemble.
- */
- private void startZookeeper() {
- client = CuratorUtils.getCuratorFrameworkClient(connectString, logger);
-
- client.start();
- logger.info("Curator framework start operation invoked");
-
- int startupTimeOutMs = Integer.parseInt(System.getProperty(Constants.Properties.ZK_STARTUP_TIMEOUT, "30000"));
- try {
- logger.info("Waiting to connect to zookeeper, startupTimeout : {}", startupTimeOutMs);
- client.blockUntilConnected(startupTimeOutMs, TimeUnit.MILLISECONDS);
- } catch (InterruptedException ex) {
- logger.error("Interrupted while waiting to connect zookeeper (connectString : {}) : {}", ex, connectString);
- }
-
- if (!client.getZookeeperClient().isConnected()) {
- throw new IllegalStateException("Could not connect to ZooKeeper : " + connectString);
- }
-
- logger.info("CuratorFramework client started successfully");
- }
-
- public void publishConfiguration() throws Exception {
- logger.debug("Publishing properties files : {}", propertiesFiles);
- publishConfiguration(propertiesFiles, true);
- logger.info("Properties files published successfully");
-
- logger.debug("Publishing config files : {}", configFiles);
- publishConfiguration(configFiles, false);
- logger.info("Config files published successfully");
-
- // TODO: 6/17/17 Verify whether the given configuration are published correctly
- }
-
- private void publishConfiguration(Map<String, String> fileMapping, boolean isProperties) throws Exception {
- for (Map.Entry<String, String> entry : fileMapping.entrySet()) {
- logger.debug("Publishing configuration {} - {}", entry.getKey(), entry.getValue());
- URL resource = Thread.currentThread().getContextClassLoader().getResource(entry.getKey());
-
- String content;
- try {
- content = FileUtils.readFileToString(new File(resource.toURI()));
- } catch (IOException | URISyntaxException e) {
- logger.error("Unable to read file : {}", entry.getKey(), e);
- continue;
- }
-
- String zNodePath = isProperties ? zNodePaths.getPropertiesZNodePath(entry.getValue()) : zNodePaths.getConfigurationZNodePath(entry.getValue());
- if (client.checkExists().forPath(zNodePath) != null) {
- byte[] bytes = client.getData().forPath(zNodePath);
- String existingData = new String(bytes);
- if (content.equals(existingData)) {
- logger.warn("{} already exists in zookeeper at {}", entry.getKey(), entry.getValue());
- } else {
- Stat stat = client.setData().forPath(zNodePath, content.getBytes());
- if (stat != null) {
- logger.info("Published configuration file {} to {}", entry.getKey(), entry.getValue());
- }
- }
- } else {
- /*
- * Creating these ZNodes with parent 'Containers' is important since containers are automatically deleted
- * when no child node is present under them.
- */
- client.create().creatingParentContainersIfNeeded().forPath(zNodePath, content.getBytes());
- }
- }
- }
-
- public Map<String, String> getPropertiesFiles() {
- return propertiesFiles;
- }
-
- public void setPropertiesFiles(Map<String, String> propertiesFiles) {
- this.propertiesFiles = propertiesFiles;
- }
-
- public Map<String, String> getConfigFiles() {
- return configFiles;
- }
-
- public void setConfigFiles(Map<String, String> configFiles) {
- this.configFiles = configFiles;
- }
-
- public ZNodePaths getZNodePaths() {
- return zNodePaths;
- }
-
- public static void main(String[] args) {
- if (args.length < 1) {
- logger.error("Spring configuration file needs to be given as an argument");
- return;
- }
-
- logger.info("Starting publishing configuration. Spring conf : {}", args[0]);
-
- try {
- ApplicationContext applicationContext = new ClassPathXmlApplicationContext(args[0]);
- Map distributedConfigurationPublisher = applicationContext.getBeansOfType(DistributedConfigurationPublisher.class);
- for (Object bean : distributedConfigurationPublisher.values()) {
- DistributedConfigurationPublisher publisher = (DistributedConfigurationPublisher) bean;
-
- logger.debug("Publishing configuration for : {}", publisher.getComponentName());
- publisher.publishConfiguration();
- logger.info("Published configuration for : {}", publisher.getComponentName());
- }
- } catch (BeansException e) {
- logger.error("Error occurred when obtaining configuration publisher beans", e);
- return;
- } catch (Exception e) {
- logger.error("Error occurred when publishing configuration to zookeeper", e);
- return;
- }
-
- logger.info("Published configuration successfully");
- }
-
- public String getComponentName() {
- return componentName;
- }
-}
http://git-wip-us.apache.org/repos/asf/oodt/blob/27a28daa/config/src/main/java/org/apache/oodt/config/distributed/cli/CmdLineOptions.java
----------------------------------------------------------------------
diff --git a/config/src/main/java/org/apache/oodt/config/distributed/cli/CmdLineOptions.java b/config/src/main/java/org/apache/oodt/config/distributed/cli/CmdLineOptions.java
new file mode 100644
index 0000000..afa6350
--- /dev/null
+++ b/config/src/main/java/org/apache/oodt/config/distributed/cli/CmdLineOptions.java
@@ -0,0 +1,57 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.oodt.config.distributed.cli;
+
+import org.kohsuke.args4j.Option;
+
+/**
+ * Bean class used to map CLI options and arguments provided by the user when publishing configuration to zookeeper
+ *
+ * @author Imesha Sudaingha
+ */
+public class CmdLineOptions {
+
+ @Option(name = "-connectString", usage = "Zookeeper connect string", required = true)
+ private String connectString;
+
+ @Option(name = "-publish", usage = "Publishes configuration specified in the spring config file to zookeeper. " +
+ "Any current similar config in zookeeper will be overwritten. If not specified, command will be assumed as a publish")
+ private boolean publish = true;
+
+ @Option(name = "-verify", usage = "Verifies the content in the local files and the published ones. Results will be printed.")
+ private boolean verify = true;
+
+ @Option(name = "-clear", usage = "Unpublish any configuration which has been published earlier using the same spring config file")
+ private boolean clear = false;
+
+ public String getConnectString() {
+ return connectString;
+ }
+
+ public boolean isPublish() {
+ return publish;
+ }
+
+ public boolean isVerify() {
+ return verify;
+ }
+
+ public boolean isClear() {
+ return clear;
+ }
+}
http://git-wip-us.apache.org/repos/asf/oodt/blob/27a28daa/config/src/main/java/org/apache/oodt/config/distributed/cli/DistributedConfigurationPublisher.java
----------------------------------------------------------------------
diff --git a/config/src/main/java/org/apache/oodt/config/distributed/cli/DistributedConfigurationPublisher.java b/config/src/main/java/org/apache/oodt/config/distributed/cli/DistributedConfigurationPublisher.java
new file mode 100644
index 0000000..03cdfc7
--- /dev/null
+++ b/config/src/main/java/org/apache/oodt/config/distributed/cli/DistributedConfigurationPublisher.java
@@ -0,0 +1,300 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.oodt.config.distributed.cli;
+
+import org.apache.commons.io.FileUtils;
+import org.apache.curator.framework.CuratorFramework;
+import org.apache.oodt.config.Constants;
+import org.apache.oodt.config.distributed.ZNodePaths;
+import org.apache.oodt.config.distributed.utils.CuratorUtils;
+import org.apache.zookeeper.data.Stat;
+import org.kohsuke.args4j.CmdLineException;
+import org.kohsuke.args4j.CmdLineParser;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.BeansException;
+import org.springframework.context.ApplicationContext;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.Map;
+import java.util.concurrent.TimeUnit;
+
+import static org.apache.oodt.config.Constants.Properties.ZK_CONNECT_STRING;
+import static org.apache.oodt.config.Constants.Properties.ZK_PROPERTIES_FILE;
+
+/**
+ * The class to publish configuration to Zookeeper. When using distributed configuration with OODT, configuration per
+ * each component type needs to be stored in zookeeper beforehand. This class, provides the means to do that.
+ *
+ * @author Imesha Sudasingha
+ */
+public class DistributedConfigurationPublisher {
+
+ private static final Logger logger = LoggerFactory.getLogger(DistributedConfigurationPublisher.class);
+
+ private Map<String, String> propertiesFiles;
+ private Map<String, String> configFiles;
+ private String connectString;
+ private CuratorFramework client;
+ private ZNodePaths zNodePaths;
+ private String componentName;
+
+ public DistributedConfigurationPublisher(String componentName) {
+ this.componentName = componentName;
+ this.zNodePaths = new ZNodePaths(componentName);
+
+ if (System.getProperty(ZK_PROPERTIES_FILE) == null && System.getProperty(ZK_CONNECT_STRING) == null) {
+ throw new IllegalArgumentException("Zookeeper requires system properties " + ZK_PROPERTIES_FILE + " or " + ZK_CONNECT_STRING + " to be set");
+ }
+
+ if (System.getProperty(ZK_PROPERTIES_FILE) != null) {
+ try {
+ CuratorUtils.loadZookeeperProperties();
+ } catch (IOException e) {
+ logger.error("Error occurred when loading properties from properties file");
+ }
+ }
+
+ if (System.getProperty(ZK_CONNECT_STRING) == null) {
+ throw new IllegalArgumentException("Zookeeper requires a proper connect string to connect to zookeeper ensemble");
+ }
+
+ connectString = System.getProperty(ZK_CONNECT_STRING);
+ logger.info("Using zookeeper connect string : {}", connectString);
+
+ startZookeeper();
+ }
+
+ /**
+ * Creates a {@link CuratorFramework} instance and start it. This method will wait a maximum amount of
+ * {@link Constants.Properties#ZK_STARTUP_TIMEOUT} milli-seconds until the client connects to the zookeeper ensemble.
+ */
+ private void startZookeeper() {
+ client = CuratorUtils.getCuratorFrameworkClient(connectString, logger);
+
+ client.start();
+ logger.info("Curator framework start operation invoked");
+
+ int startupTimeOutMs = Integer.parseInt(System.getProperty(Constants.Properties.ZK_STARTUP_TIMEOUT, "30000"));
+ try {
+ logger.info("Waiting to connect to zookeeper, startupTimeout : {}", startupTimeOutMs);
+ client.blockUntilConnected(startupTimeOutMs, TimeUnit.MILLISECONDS);
+ } catch (InterruptedException ex) {
+ logger.error("Interrupted while waiting to connect zookeeper (connectString : {}) : {}", ex, connectString);
+ }
+
+ if (!client.getZookeeperClient().isConnected()) {
+ throw new IllegalStateException("Could not connect to ZooKeeper : " + connectString);
+ }
+
+ logger.info("CuratorFramework client started successfully");
+ }
+
+ /**
+ * Publishes the configuration files specified to zookeeper. If an exception is thrown while configuration being
+ * published, no further publishing attempts will be carried on. Error will be reported to user.
+ *
+ * @throws Exception Zookeeper errors
+ */
+ public void publishConfiguration() throws Exception {
+ logger.debug("Publishing properties files : {}", propertiesFiles);
+ publishConfiguration(propertiesFiles, true);
+ logger.info("Properties files published successfully");
+
+ logger.debug("Publishing config files : {}", configFiles);
+ publishConfiguration(configFiles, false);
+ logger.info("Config files published successfully");
+ }
+
+ /**
+ * Verified whether the actual content of the local files specified to be published are 100% similar to the ones that
+ * has been published and stored in zookeeper at the moment.
+ *
+ * @return true | if content are up to date and similar
+ */
+ public boolean verifyPublishedConfiguration() {
+ try {
+ return verifyPublishedConfiguration(propertiesFiles, true) && verifyPublishedConfiguration(configFiles, false);
+ } catch (Exception e) {
+ logger.error("Error occurred when checking published config", e);
+ return false;
+ }
+ }
+
+ private void publishConfiguration(Map<String, String> fileMapping, boolean isProperties) throws Exception {
+ for (Map.Entry<String, String> entry : fileMapping.entrySet()) {
+ String filePath = entry.getKey();
+ String relativeZNodePath = entry.getValue();
+ logger.info("Publishing configuration {} - {}", filePath, relativeZNodePath);
+
+ String content = getFileContent(filePath);
+
+ String zNodePath = isProperties ? zNodePaths.getPropertiesZNodePath(relativeZNodePath) : zNodePaths.getConfigurationZNodePath(relativeZNodePath);
+ if (client.checkExists().forPath(zNodePath) != null) {
+ byte[] bytes = client.getData().forPath(zNodePath);
+ String existingData = new String(bytes);
+ if (content.equals(existingData)) {
+ logger.warn("{} already exists in zookeeper at {}", filePath, relativeZNodePath);
+ } else {
+ Stat stat = client.setData().forPath(zNodePath, content.getBytes());
+ if (stat != null) {
+ logger.info("Published configuration file {} to {}", filePath, relativeZNodePath);
+ } else {
+ logger.warn("Unable to publish configuration file {} to {}", filePath, relativeZNodePath);
+ }
+ }
+ } else {
+ /*
+ * Creating these ZNodes with parent 'Containers' is important since containers are automatically deleted
+ * when no child node is present under them.
+ */
+ client.create().creatingParentContainersIfNeeded().forPath(zNodePath, content.getBytes());
+ logger.info("Replaced old published configuration at {} with content of file : {}", relativeZNodePath, filePath);
+ }
+ }
+ }
+
+ private boolean verifyPublishedConfiguration(Map<String, String> fileMapping, boolean isProperties) throws Exception {
+ boolean noError = true;
+ for (Map.Entry<String, String> entry : fileMapping.entrySet()) {
+ String filePath = entry.getKey();
+ String relativeZNodePath = entry.getValue();
+ logger.info("Checking published configuration for {} - {}", filePath, relativeZNodePath);
+
+ String originalContent = getFileContent(filePath);
+
+ String zNodePath = isProperties ? zNodePaths.getPropertiesZNodePath(relativeZNodePath) : zNodePaths.getConfigurationZNodePath(relativeZNodePath);
+ if (client.checkExists().forPath(zNodePath) == null) {
+ logger.error("File : {} hasn't been published to ZNode : {}", filePath, relativeZNodePath);
+ noError = false;
+ continue;
+ }
+
+ String publishedContent = new String(client.getData().forPath(zNodePath));
+ if (!publishedContent.equals(originalContent)) {
+ logger.error("Content of local file : {} and content published to {} are not similar", filePath, relativeZNodePath);
+ noError = false;
+ continue;
+ }
+
+ logger.info("{} - {} configuration checked and OK", filePath, relativeZNodePath);
+ }
+
+ return noError;
+ }
+
+ private String getFileContent(String file) {
+ String content;
+ try {
+ content = FileUtils.readFileToString(new File(file));
+ } catch (IOException e) {
+ logger.error("Unable to read file : {}", file, e);
+ throw new IllegalArgumentException("Unable to read content of the file : " + file);
+ }
+
+ return content;
+ }
+
+ public Map<String, String> getPropertiesFiles() {
+ return propertiesFiles;
+ }
+
+ public void setPropertiesFiles(Map<String, String> propertiesFiles) {
+ this.propertiesFiles = propertiesFiles;
+ }
+
+ public Map<String, String> getConfigFiles() {
+ return configFiles;
+ }
+
+ public void setConfigFiles(Map<String, String> configFiles) {
+ this.configFiles = configFiles;
+ }
+
+ public ZNodePaths getZNodePaths() {
+ return zNodePaths;
+ }
+
+ public static void main(String[] args) throws Exception {
+ CmdLineOptions cmdLineOptions = new CmdLineOptions();
+ CmdLineParser parser = new CmdLineParser(cmdLineOptions);
+
+ try {
+ parser.parseArgument(args);
+ } catch (CmdLineException e) {
+ System.err.println("There's an error in your command");
+ parser.printUsage(System.err);
+ return;
+ }
+
+ if (cmdLineOptions.getConnectString() == null && System.getProperty(ZK_CONNECT_STRING) == null) {
+ System.err.println("Zookeeper connect string is not found");
+ parser.printUsage(System.err);
+ return;
+ } else {
+ System.setProperty(ZK_CONNECT_STRING, cmdLineOptions.getConnectString());
+ }
+
+ System.out.println("Starting configuration publishing");
+
+ try {
+ ApplicationContext applicationContext = new ClassPathXmlApplicationContext(Constants.CONFIG_PUBLISHER_XML);
+ Map distributedConfigurationPublisher = applicationContext.getBeansOfType(DistributedConfigurationPublisher.class);
+
+ for (Object bean : distributedConfigurationPublisher.values()) {
+ DistributedConfigurationPublisher publisher = (DistributedConfigurationPublisher) bean;
+ System.out.println(String.format("\nProcessing commands for component : %s", publisher.getComponentName()));
+
+ if (cmdLineOptions.isPublish()) {
+ System.out.println(String.format("Publishing configuration for : %s", publisher.getComponentName()));
+ publisher.publishConfiguration();
+ System.out.println(String.format("Published configuration for : %s", publisher.getComponentName()));
+ System.out.printf("\n");
+ }
+
+ if (cmdLineOptions.isVerify()) {
+ System.out.println(String.format("Verifying configuration for : %s", publisher.getComponentName()));
+ publisher.verifyPublishedConfiguration();
+ System.out.println(String.format("Verified configuration for : %s", publisher.getComponentName()));
+ System.out.printf("\n");
+ }
+
+ if (cmdLineOptions.isClear()) {
+ System.out.println(String.format("Clearing configuration for : %s", publisher.getComponentName()));
+ // TODO: 7/2/17 Implement configuration removal
+ System.out.println(String.format("Cleared configuration for : %s", publisher.getComponentName()));
+ System.out.printf("\n");
+ }
+ }
+ } catch (BeansException e) {
+ logger.error("Error occurred when obtaining configuration publisher beans", e);
+ throw e;
+ } catch (Exception e) {
+ logger.error("Error occurred when publishing configuration to zookeeper", e);
+ throw e;
+ }
+
+ logger.info("Published configuration successfully");
+ }
+
+ public String getComponentName() {
+ return componentName;
+ }
+}
http://git-wip-us.apache.org/repos/asf/oodt/blob/27a28daa/config/src/main/java/org/apache/oodt/config/distributed/utils/CuratorUtils.java
----------------------------------------------------------------------
diff --git a/config/src/main/java/org/apache/oodt/config/distributed/utils/CuratorUtils.java b/config/src/main/java/org/apache/oodt/config/distributed/utils/CuratorUtils.java
index 6f9c97f..1b10ef0 100644
--- a/config/src/main/java/org/apache/oodt/config/distributed/utils/CuratorUtils.java
+++ b/config/src/main/java/org/apache/oodt/config/distributed/utils/CuratorUtils.java
@@ -100,6 +100,7 @@ public class CuratorUtils {
int maxRetryCount = Integer.parseInt(System.getProperty(Constants.Properties.ZK_CONNECTION_TIMEOUT, "3"));
CuratorFrameworkFactory.Builder builder = CuratorFrameworkFactory.builder()
+ .namespace(NAMESPACE)
.connectString(connectString)
.retryPolicy(new ExponentialBackoffRetry(retryInitialWaitMs, maxRetryCount))
.connectionTimeoutMs(connectionTimeoutMs)
http://git-wip-us.apache.org/repos/asf/oodt/blob/27a28daa/config/src/main/resources/etc/config-publisher.xml
----------------------------------------------------------------------
diff --git a/config/src/main/resources/etc/config-publisher.xml b/config/src/main/resources/etc/config-publisher.xml
new file mode 100644
index 0000000..cc1261e
--- /dev/null
+++ b/config/src/main/resources/etc/config-publisher.xml
@@ -0,0 +1,36 @@
+<!--
+ ~ 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.
+ -->
+
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
+
+ <bean id="filemgr-config-publisher" class="org.apache.oodt.config.distributed.cli.DistributedConfigurationPublisher">
+ <constructor-arg value="filemgr"/>
+ <property name="propertiesFiles">
+ <map key-type="java.lang.String" value-type="java.lang.String">
+ <entry key="../examples/filemgr.properties" value="/etc/filemgr.properties"/>
+ </map>
+ </property>
+ <property name="configFiles">
+ <map key-type="java.lang.String" value-type="java.lang.String">
+ <entry key="../examples/mime-types.xml" value="/etc/mime-types.xml"/>
+ </map>
+ </property>
+ </bean>
+
+</beans>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/oodt/blob/27a28daa/config/src/main/resources/etc/log4j.xml
----------------------------------------------------------------------
diff --git a/config/src/main/resources/etc/log4j.xml b/config/src/main/resources/etc/log4j.xml
new file mode 100644
index 0000000..8f49451
--- /dev/null
+++ b/config/src/main/resources/etc/log4j.xml
@@ -0,0 +1,34 @@
+<?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.
+ -->
+
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
+ <appender name="console" class="org.apache.log4j.ConsoleAppender">
+ <param name="Target" value="System.out"/>
+ <layout class="org.apache.log4j.PatternLayout">
+ <param name="ConversionPattern" value="%-5p %c{1} - %m%n"/>
+ </layout>
+ </appender>
+
+ <root>
+ <priority value="INFO"/>
+ <appender-ref ref="console"/>
+ </root>
+
+</log4j:configuration>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/oodt/blob/27a28daa/config/src/main/resources/examples/filemgr.properties
----------------------------------------------------------------------
diff --git a/config/src/main/resources/examples/filemgr.properties b/config/src/main/resources/examples/filemgr.properties
new file mode 100644
index 0000000..4d8d957
--- /dev/null
+++ b/config/src/main/resources/examples/filemgr.properties
@@ -0,0 +1,114 @@
+#
+# 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.
+#
+
+# Configuration properties for the File Manager
+
+# repository factory
+filemgr.repository.factory=org.apache.oodt.cas.filemgr.repository.XMLRepositoryManagerFactory
+
+# Lucene catalog factory
+filemgr.catalog.factory=org.apache.oodt.cas.filemgr.catalog.LuceneCatalogFactory
+
+# data transfer factory
+filemgr.datatransfer.factory=org.apache.oodt.cas.filemgr.datatransfer.LocalDataTransferFactory
+
+# validation layer factory
+filemgr.validationLayer.factory=org.apache.oodt.cas.filemgr.validation.XMLValidationLayerFactory
+
+# xml rpc client configuration
+org.apache.oodt.cas.filemgr.system.xmlrpc.connectionTimeout.minutes=20
+org.apache.oodt.cas.filemgr.system.xmlrpc.requestTimeout.minutes=60
+#org.apache.oodt.cas.filemgr.system.xmlrpc.connection.retries=0
+#org.apache.oodt.cas.filemgr.system.xmlrpc.connection.retry.interval.seconds=3
+
+# mapped data source catalog configuration
+#org.apache.oodt.cas.filemgr.catalog.mappeddatasource.mapFile=/path/to/ops.catalog.typemap.properties
+
+# lucene catalog configuration
+org.apache.oodt.cas.filemgr.catalog.lucene.idxPath=[OODT_HOME]/data/catalog
+org.apache.oodt.cas.filemgr.catalog.lucene.pageSize=20
+org.apache.oodt.cas.filemgr.catalog.lucene.commitLockTimeout.seconds=60
+org.apache.oodt.cas.filemgr.catalog.lucene.writeLockTimeout.seconds=60
+org.apache.oodt.cas.filemgr.catalog.lucene.mergeFactor=20
+
+# XML repository manager configuration
+org.apache.oodt.cas.filemgr.repositorymgr.dirs=file:[FILEMGR_HOME]/policy/oodt
+
+# XML validation layer configuration
+org.apache.oodt.cas.filemgr.validation.dirs=file:[FILEMGR_HOME]/policy/oodt
+
+# remote data transfer configuration
+org.apache.oodt.cas.filemgr.datatransfer.remote.chunkSize=1024
+
+# location of Mime-Type repository
+org.apache.oodt.cas.filemgr.mime.type.repository=[FILEMGR_HOME]/etc/mime-types.xml
+
+
+############ data source configuration ##################################
+#
+# These 3 blocks of config properties can be used to setup a catalog,
+# repository manager, and validation layer based on a RDBMS such as
+# Oracle, MySQL, PostgreSQL, or any others that support a jdbc connection.
+# Just un-comment the following blocks of properties and configure as
+# needed.
+#
+#########################################################################
+
+# datasource catalog config
+#org.apache.oodt.cas.filemgr.catalog.datasource.jdbc.url=some_jdbc_url
+#org.apache.oodt.cas.filemgr.catalog.datasource.jdbc.user=user
+#org.apache.oodt.cas.filemgr.catalog.datasource.jdbc.pass=pass
+#org.apache.oodt.cas.filemgr.catalog.datasource.jdbc.driver=driver.class.name
+#org.apache.oodt.cas.filemgr.catalog.datasource.quoteFields=false
+#org.apache.oodt.cas.filemgr.catalog.datasource.pageSize=20
+#org.apache.oodt.cas.filemgr.catalog.datasource.cacheUpdateMinutes=5
+
+# data source repository manager configuration
+#org.apache.oodt.cas.filemgr.repositorymgr.datasource.jdbc.url=some_jdbc_url
+#org.apache.oodt.cas.filemgr.repositorymgr.datasource.jdbc.user=user
+#org.apache.oodt.cas.filemgr.repositorymgr.datasource.jdbc.pass=pass
+#org.apache.oodt.cas.filemgr.repositorymgr.datasource.jdbc.driver=driver.class.name
+
+# data source validation layer configuration
+#org.apache.oodt.cas.filemgr.validation.datasource.jdbc.url=some_jdbc_url
+#org.apache.oodt.cas.filemgr.validation.datasource.jdbc.user=user
+#org.apache.oodt.cas.filemgr.validation.datasource.jdbc.pass=pass
+#org.apache.oodt.cas.filemgr.validation.datasource.jdbc.driver=driver.class.name
+#org.apache.oodt.cas.filemgr.validation.datasource.quoteFields=false
+
+
+# tells the file manager system layer to include product instance metadata
+# NOTE: here are the expected field mappings
+#
+# product.getProductId() -> ProductId
+# product.getProductName() -> ProductName
+# product.getProductStructure() -> ProductStructure
+# product.getTransferStatus() -> ProductTransferStatus
+# product.getRootRef() -> ProductRootReference
+
+# for the references returned by product.getProductReferences() the following
+# metadata fields will be added (order will be maintained, such that data store
+# ref at index 0 will map to orig ref at index 0, etc.)
+#
+# ProductDataStoreReferences (list of all data store references:
+# note already translated into path, not URI)
+# ProductOrigReferences (list of all orig references:
+# note already translated into path, not URI)
+# ProductMimeType (list of all references' mime-types)
+# ProductFileSize (list of all references' file sizes)
+
+org.apache.oodt.cas.filemgr.metadata.expandProduct=false
\ No newline at end of file
[18/35] oodt git commit: Minor improvements for configuration manager
tests
Posted by ma...@apache.org.
Minor improvements for configuration manager tests
Project: http://git-wip-us.apache.org/repos/asf/oodt/repo
Commit: http://git-wip-us.apache.org/repos/asf/oodt/commit/e6974052
Tree: http://git-wip-us.apache.org/repos/asf/oodt/tree/e6974052
Diff: http://git-wip-us.apache.org/repos/asf/oodt/diff/e6974052
Branch: refs/heads/feature/zookeeper-config
Commit: e697405223fe17c96739ae8f156639a0f5ef321c
Parents: a973c53
Author: Imesha Sudasingha <im...@gmail.com>
Authored: Sun Jul 9 22:18:40 2017 +0530
Committer: Imesha Sudasingha <im...@gmail.com>
Committed: Sun Jul 9 22:18:40 2017 +0530
----------------------------------------------------------------------
.../src/main/resources/etc/config-publisher.xml | 1 +
.../AbstractDistributedConfigurationTest.java | 49 ++++++++++++++++++++
.../config/distributed/AbstractTestCase.java | 49 --------------------
.../DistributedConfigurationManagerTest.java | 10 ++--
.../DistributedConfigurationPublisherTest.java | 2 +-
.../cas/filemgr/system/XmlRpcFileManager.java | 32 +++----------
6 files changed, 62 insertions(+), 81 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/oodt/blob/e6974052/config/src/main/resources/etc/config-publisher.xml
----------------------------------------------------------------------
diff --git a/config/src/main/resources/etc/config-publisher.xml b/config/src/main/resources/etc/config-publisher.xml
index 015d1f2..dab33c3 100644
--- a/config/src/main/resources/etc/config-publisher.xml
+++ b/config/src/main/resources/etc/config-publisher.xml
@@ -19,6 +19,7 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
+ <!-- Configuration publisher for File Manager OODT Component -->
<bean id="filemgr-config-publisher" class="org.apache.oodt.config.distributed.cli.DistributedConfigurationPublisher">
<constructor-arg value="filemgr"/>
<property name="propertiesFiles">
http://git-wip-us.apache.org/repos/asf/oodt/blob/e6974052/config/src/test/java/org/apache/oodt/config/distributed/AbstractDistributedConfigurationTest.java
----------------------------------------------------------------------
diff --git a/config/src/test/java/org/apache/oodt/config/distributed/AbstractDistributedConfigurationTest.java b/config/src/test/java/org/apache/oodt/config/distributed/AbstractDistributedConfigurationTest.java
new file mode 100644
index 0000000..e14d43a
--- /dev/null
+++ b/config/src/test/java/org/apache/oodt/config/distributed/AbstractDistributedConfigurationTest.java
@@ -0,0 +1,49 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.oodt.config.distributed;
+
+import org.apache.curator.framework.CuratorFramework;
+import org.apache.curator.test.TestingServer;
+import org.apache.oodt.config.distributed.utils.CuratorUtils;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+
+import static org.apache.oodt.config.Constants.Properties.ZK_CONNECT_STRING;
+
+public abstract class AbstractDistributedConfigurationTest {
+
+ protected static TestingServer zookeeper;
+ protected static CuratorFramework client;
+
+ @BeforeClass
+ public static void setUp() throws Exception {
+ zookeeper = new TestingServer();
+ zookeeper.start();
+
+ System.setProperty(ZK_CONNECT_STRING, zookeeper.getConnectString());
+
+ client = CuratorUtils.newCuratorFrameworkClient(zookeeper.getConnectString());
+ client.start();
+ }
+
+ @AfterClass
+ public static void tearDown() throws Exception {
+ client.close();
+ zookeeper.stop();
+ }
+}
http://git-wip-us.apache.org/repos/asf/oodt/blob/e6974052/config/src/test/java/org/apache/oodt/config/distributed/AbstractTestCase.java
----------------------------------------------------------------------
diff --git a/config/src/test/java/org/apache/oodt/config/distributed/AbstractTestCase.java b/config/src/test/java/org/apache/oodt/config/distributed/AbstractTestCase.java
deleted file mode 100644
index 5bd0651..0000000
--- a/config/src/test/java/org/apache/oodt/config/distributed/AbstractTestCase.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.oodt.config.distributed;
-
-import org.apache.curator.framework.CuratorFramework;
-import org.apache.curator.test.TestingServer;
-import org.apache.oodt.config.distributed.utils.CuratorUtils;
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-
-import static org.apache.oodt.config.Constants.Properties.ZK_CONNECT_STRING;
-
-public abstract class AbstractTestCase {
-
- protected static TestingServer zookeeper;
- protected static CuratorFramework client;
-
- @BeforeClass
- public static void setUp() throws Exception {
- zookeeper = new TestingServer();
- zookeeper.start();
-
- System.setProperty(ZK_CONNECT_STRING, zookeeper.getConnectString());
-
- client = CuratorUtils.newCuratorFrameworkClient(zookeeper.getConnectString());
- client.start();
- }
-
- @AfterClass
- public static void tearDown() throws Exception {
- client.close();
- zookeeper.stop();
- }
-}
http://git-wip-us.apache.org/repos/asf/oodt/blob/e6974052/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationManagerTest.java
----------------------------------------------------------------------
diff --git a/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationManagerTest.java b/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationManagerTest.java
index 5a75ff6..2aa855c 100644
--- a/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationManagerTest.java
+++ b/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationManagerTest.java
@@ -44,13 +44,13 @@ import static org.apache.oodt.config.Constants.SEPARATOR;
*
* @author Imesha Sudasingha
*/
-public class DistributedConfigurationManagerTest extends AbstractTestCase {
+public class DistributedConfigurationManagerTest extends AbstractDistributedConfigurationTest {
- private static List<DistributedConfigurationPublisher> publishers;
+ protected static List<DistributedConfigurationPublisher> publishers;
@BeforeClass
public static void setUp() throws Exception {
- AbstractTestCase.setUp();
+ AbstractDistributedConfigurationTest.setUp();
DistributedConfigurationPublisher.main(new String[]{
"-connectString", zookeeper.getConnectString(),
@@ -64,8 +64,6 @@ public class DistributedConfigurationManagerTest extends AbstractTestCase {
for (Object bean : distributedConfigurationPublishers.values()) {
DistributedConfigurationPublisher publisher = (DistributedConfigurationPublisher) bean;
publishers.add(publisher);
- ConfigurationManager configurationManager = new DistributedConfigurationManager(publisher.getComponentName());
- configurationManager.loadConfiguration();
}
}
@@ -117,6 +115,6 @@ public class DistributedConfigurationManagerTest extends AbstractTestCase {
"-clear"
});
- AbstractTestCase.tearDown();
+ AbstractDistributedConfigurationTest.tearDown();
}
}
http://git-wip-us.apache.org/repos/asf/oodt/blob/e6974052/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationPublisherTest.java
----------------------------------------------------------------------
diff --git a/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationPublisherTest.java b/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationPublisherTest.java
index fbccbc7..4f1552b 100644
--- a/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationPublisherTest.java
+++ b/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationPublisherTest.java
@@ -36,7 +36,7 @@ import static org.apache.oodt.config.Constants.CONFIG_PUBLISHER_XML;
*
* @author Imesha Sudasingha
*/
-public class DistributedConfigurationPublisherTest extends AbstractTestCase{
+public class DistributedConfigurationPublisherTest extends AbstractDistributedConfigurationTest {
@Test
public void publishConfigurationTest() throws Exception {
http://git-wip-us.apache.org/repos/asf/oodt/blob/e6974052/filemgr/src/main/java/org/apache/oodt/cas/filemgr/system/XmlRpcFileManager.java
----------------------------------------------------------------------
diff --git a/filemgr/src/main/java/org/apache/oodt/cas/filemgr/system/XmlRpcFileManager.java b/filemgr/src/main/java/org/apache/oodt/cas/filemgr/system/XmlRpcFileManager.java
index 261e93c..0b9501e 100644
--- a/filemgr/src/main/java/org/apache/oodt/cas/filemgr/system/XmlRpcFileManager.java
+++ b/filemgr/src/main/java/org/apache/oodt/cas/filemgr/system/XmlRpcFileManager.java
@@ -18,26 +18,15 @@
package org.apache.oodt.cas.filemgr.system;
+import com.google.common.collect.Lists;
import org.apache.oodt.cas.filemgr.catalog.Catalog;
import org.apache.oodt.cas.filemgr.datatransfer.DataTransfer;
import org.apache.oodt.cas.filemgr.datatransfer.TransferStatusTracker;
import org.apache.oodt.cas.filemgr.metadata.ProductMetKeys;
import org.apache.oodt.cas.filemgr.metadata.extractors.FilemgrMetExtractor;
import org.apache.oodt.cas.filemgr.repository.RepositoryManager;
-import org.apache.oodt.cas.filemgr.structs.Element;
-import org.apache.oodt.cas.filemgr.structs.ExtractorSpec;
-import org.apache.oodt.cas.filemgr.structs.FileTransferStatus;
-import org.apache.oodt.cas.filemgr.structs.Product;
-import org.apache.oodt.cas.filemgr.structs.ProductPage;
-import org.apache.oodt.cas.filemgr.structs.ProductType;
-import org.apache.oodt.cas.filemgr.structs.Query;
-import org.apache.oodt.cas.filemgr.structs.Reference;
-import org.apache.oodt.cas.filemgr.structs.exceptions.CatalogException;
-import org.apache.oodt.cas.filemgr.structs.exceptions.DataTransferException;
-import org.apache.oodt.cas.filemgr.structs.exceptions.QueryFormulationException;
-import org.apache.oodt.cas.filemgr.structs.exceptions.RepositoryManagerException;
-import org.apache.oodt.cas.filemgr.structs.exceptions.ValidationLayerException;
-import org.apache.oodt.cas.filemgr.structs.exceptions.VersioningException;
+import org.apache.oodt.cas.filemgr.structs.*;
+import org.apache.oodt.cas.filemgr.structs.exceptions.*;
import org.apache.oodt.cas.filemgr.structs.query.ComplexQuery;
import org.apache.oodt.cas.filemgr.structs.query.QueryFilter;
import org.apache.oodt.cas.filemgr.structs.query.QueryResult;
@@ -56,13 +45,7 @@ import org.apache.oodt.config.ConfigurationManager;
import org.apache.oodt.config.ConfigurationManagerFactory;
import org.apache.xmlrpc.WebServer;
-import com.google.common.collect.Lists;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.IOException;
+import java.io.*;
import java.net.URI;
import java.net.URISyntaxException;
import java.net.URL;
@@ -71,6 +54,8 @@ import java.util.concurrent.ConcurrentHashMap;
import java.util.logging.Level;
import java.util.logging.Logger;
+import static org.apache.oodt.config.Constants.Components.FILE_MANAGER;
+
/**
* @author mattmann
@@ -81,9 +66,6 @@ import java.util.logging.Logger;
*/
public class XmlRpcFileManager {
- /** Name of this OODT component. TO be used by the configuration management */
- private static final String componentName = "file-mgr";
-
/* the port to run the XML RPC web server on, default is 1999 */
private int webServerPort = 1999;
@@ -134,7 +116,7 @@ public class XmlRpcFileManager {
propertiesFiles.add(System.getProperty("org.apache.oodt.cas.filemgr.properties"));
}
- configurationManager = ConfigurationManagerFactory.getConfigurationManager(componentName, propertiesFiles);
+ configurationManager = ConfigurationManagerFactory.getConfigurationManager(FILE_MANAGER, propertiesFiles);
this.loadConfiguration();
LOG.log(Level.INFO, "File Manager started by " + System.getProperty("user.name", "unknown"));
[02/35] oodt git commit: Defined initial API for ConfigurationManager
Posted by ma...@apache.org.
Defined initial API for ConfigurationManager
Project: http://git-wip-us.apache.org/repos/asf/oodt/repo
Commit: http://git-wip-us.apache.org/repos/asf/oodt/commit/ac7170bd
Tree: http://git-wip-us.apache.org/repos/asf/oodt/tree/ac7170bd
Diff: http://git-wip-us.apache.org/repos/asf/oodt/diff/ac7170bd
Branch: refs/heads/feature/zookeeper-config
Commit: ac7170bdf5c973374f141c6f3e031fa748e0af13
Parents: 1ae9242
Author: Imesha Sudasingha <im...@gmail.com>
Authored: Sat Apr 1 12:30:55 2017 +0530
Committer: Imesha Sudasingha <im...@gmail.com>
Committed: Sat Apr 1 12:30:55 2017 +0530
----------------------------------------------------------------------
config/pom.xml | 24 +++
.../oodt/config/ConfigurationManager.java | 57 +++++++
.../config/ConfigurationManagerFactory.java | 53 ++++++
.../java/org/apache/oodt/config/Constants.java | 56 +++++++
.../DistributedConfigurationManager.java | 163 +++++++++++++++++++
.../StandaloneConfigurationManager.java | 78 +++++++++
core/pom.xml | 10 ++
filemgr/pom.xml | 4 +
.../cas/filemgr/system/XmlRpcFileManager.java | 41 +++--
pom.xml | 1 +
10 files changed, 469 insertions(+), 18 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/oodt/blob/ac7170bd/config/pom.xml
----------------------------------------------------------------------
diff --git a/config/pom.xml b/config/pom.xml
new file mode 100644
index 0000000..64a4b03
--- /dev/null
+++ b/config/pom.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <parent>
+ <artifactId>oodt</artifactId>
+ <groupId>org.apache.oodt</groupId>
+ <version>1.1-SNAPSHOT</version>
+ <relativePath>../core/pom.xml</relativePath>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+
+ <artifactId>oodt-conf</artifactId>
+ <packaging>jar</packaging>
+ <name>OODT - Configuration Management</name>
+ <description>OODT project for distributed configuration management support</description>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.curator</groupId>
+ <artifactId>curator-framework</artifactId>
+ </dependency>
+ </dependencies>
+</project>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/oodt/blob/ac7170bd/config/src/main/java/org/apache/oodt/config/ConfigurationManager.java
----------------------------------------------------------------------
diff --git a/config/src/main/java/org/apache/oodt/config/ConfigurationManager.java b/config/src/main/java/org/apache/oodt/config/ConfigurationManager.java
new file mode 100644
index 0000000..05b33fd
--- /dev/null
+++ b/config/src/main/java/org/apache/oodt/config/ConfigurationManager.java
@@ -0,0 +1,57 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.oodt.config;
+
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * The abstract class to define functionalities of the configuration managers.
+ *
+ * @author Imesha Sudasingha
+ */
+public abstract class ConfigurationManager {
+
+ protected String component;
+ protected List<String> propertiesFiles;
+ protected List<String> otherFiles;
+
+ public ConfigurationManager(String component, List<String> propertiesFiles, List<String> otherFiles) {
+ this.component = component;
+ this.propertiesFiles = propertiesFiles != null ? propertiesFiles : new ArrayList<String>();
+ this.otherFiles = otherFiles != null ? otherFiles : new ArrayList<String>();
+ }
+
+ /**
+ * Retrieves a given property from the underlying configuration storage. For example, If we want to get the
+ * value of the property org.foo.bar, we have to call this method with <pre>org.foo.bar</pre> as the parameter.
+ *
+ * @param key Name of the property to be retrieved.
+ * @return Value of the requested property | null
+ */
+ public abstract String getProperty(String key);
+
+ public abstract void loadProperties() throws IOException;
+
+ public abstract File getPropertiesFile(String filePath) throws FileNotFoundException;
+
+ public abstract File getConfigurationFile(String filePath) throws FileNotFoundException;
+}
http://git-wip-us.apache.org/repos/asf/oodt/blob/ac7170bd/config/src/main/java/org/apache/oodt/config/ConfigurationManagerFactory.java
----------------------------------------------------------------------
diff --git a/config/src/main/java/org/apache/oodt/config/ConfigurationManagerFactory.java b/config/src/main/java/org/apache/oodt/config/ConfigurationManagerFactory.java
new file mode 100644
index 0000000..7c026b7
--- /dev/null
+++ b/config/src/main/java/org/apache/oodt/config/ConfigurationManagerFactory.java
@@ -0,0 +1,53 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.oodt.config;
+
+import org.apache.oodt.config.distributed.DistributedConfigurationManager;
+import org.apache.oodt.config.standalone.StandaloneConfigurationManager;
+
+import java.util.List;
+import java.util.logging.Logger;
+
+import static org.apache.oodt.config.Constants.Properties.ENABLE_DISTRIBUTED_CONFIGURATION;
+
+/**
+ * Factory class to be used to get the {@link ConfigurationManager} instances accordingly.
+ *
+ * @author Imesha Sudasingha
+ */
+public class ConfigurationManagerFactory {
+
+ /** Logger instance for this class */
+ private static final Logger logger = Logger.getLogger(ConfigurationManagerFactory.class.getName());
+
+ private ConfigurationManagerFactory() {}
+
+ /**
+ * Returns the {@link ConfigurationManager} to be used by the calling class. Whether to use the standalone version or
+ * the distributed version of the configuration manager will be determined by the value of the property
+ * <pre>org.apache.oodt.config.zookeeper == true</pre>
+ *
+ * @return ConfigurationManager instance to used by the corresponding component.
+ */
+ public static ConfigurationManager getConfigurationManager(String component, List<String> propertiesFiles, List<String> otherFiles) {
+ if (System.getProperty(ENABLE_DISTRIBUTED_CONFIGURATION) != null) {
+ return new DistributedConfigurationManager(component, propertiesFiles, otherFiles);
+ }
+ return new StandaloneConfigurationManager(component, propertiesFiles, otherFiles);
+ }
+}
http://git-wip-us.apache.org/repos/asf/oodt/blob/ac7170bd/config/src/main/java/org/apache/oodt/config/Constants.java
----------------------------------------------------------------------
diff --git a/config/src/main/java/org/apache/oodt/config/Constants.java b/config/src/main/java/org/apache/oodt/config/Constants.java
new file mode 100644
index 0000000..03c3e1c
--- /dev/null
+++ b/config/src/main/java/org/apache/oodt/config/Constants.java
@@ -0,0 +1,56 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.oodt.config;
+
+/**
+ * Constants to be used by the config package
+ *
+ * @author Imesha Sudasingha
+ */
+public class Constants {
+
+ private Constants() {}
+
+ /** Node name to be used when the configuration manager is the standalone version */
+ public static final String STANDALONE_NODE_NAME = "local";
+
+ /** Default environment name to be used */
+ public static final String DEFAULT_ENVIRONMENT = "default";
+
+ public static class Properties {
+
+ /** The system property to be set in order to enable distributed configuration management */
+ public static final String ENABLE_DISTRIBUTED_CONFIGURATION = "org.apache.oodt.config.distributed";
+
+ /** System property, which will holf the location of the zookeeper properties file */
+ public static final String ZK_PROPERTIES_FILE = "org.apache.oodt.config.zkProperties";
+
+ /** Property name to fetch connect string to connect to a zookeeper ensemble. */
+ public static final String ZK_CONNECT_STRING = "org.apache.oodt.config.zk.connectString";
+
+ public static final String ZK_CONNECTION_TIMEOUT = "org.apache.oodt.config.zk.connectionTimeoutMs";
+ public static final String ZK_SESSION_TIMEOUT = "org.apache.oodt.config.zk.sessionTimeoutMs";
+
+ public static final String ZK_RETRY_INITIAL_WAIT = "org.apache.oodt.config.zk.retryInitialWaitMs";
+ public static final String ZK_RETRY_MAX_RETRIES = "org.apache.oodt.config.zk.maxRetries";
+ public static final String ZK_STARTUP_TIMEOUT = "org.apache.oodt.config.zk.startupTimeoutMs";
+
+ public static final String ZK_USERNAME = "org.apache.oodt.config.zk.username";
+ public static final String ZK_PASSWORD = "org.apache.oodt.config.zk.password";
+ }
+}
http://git-wip-us.apache.org/repos/asf/oodt/blob/ac7170bd/config/src/main/java/org/apache/oodt/config/distributed/DistributedConfigurationManager.java
----------------------------------------------------------------------
diff --git a/config/src/main/java/org/apache/oodt/config/distributed/DistributedConfigurationManager.java b/config/src/main/java/org/apache/oodt/config/distributed/DistributedConfigurationManager.java
new file mode 100644
index 0000000..e7a3ed2
--- /dev/null
+++ b/config/src/main/java/org/apache/oodt/config/distributed/DistributedConfigurationManager.java
@@ -0,0 +1,163 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.oodt.config.distributed;
+
+import org.apache.curator.framework.CuratorFramework;
+import org.apache.curator.framework.CuratorFrameworkFactory;
+import org.apache.curator.framework.api.ACLProvider;
+import org.apache.curator.retry.ExponentialBackoffRetry;
+import org.apache.oodt.config.ConfigurationManager;
+import org.apache.oodt.config.Constants;
+import org.apache.oodt.config.Constants.Properties;
+import org.apache.zookeeper.ZooDefs;
+import org.apache.zookeeper.data.ACL;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.util.List;
+import java.util.concurrent.TimeUnit;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import static org.apache.oodt.config.Constants.Properties.ZK_PROPERTIES_FILE;
+
+/**
+ * Distributed configuration manager implementation. This class make use of a {@link CuratorFramework} instance to connect
+ * to zookeeper
+ *
+ * @author Imesha Sudasingha.
+ */
+public class DistributedConfigurationManager extends ConfigurationManager {
+
+ private static final Logger logger = Logger.getLogger(DistributedConfigurationManager.class.getName());
+
+ private static String environment = Constants.DEFAULT_ENVIRONMENT;
+ private static String nodeName;
+
+ /** Variables required to connect to zookeeper */
+ private String connectString;
+ private CuratorFramework client;
+
+ public DistributedConfigurationManager(String component, List<String> propertiesFiles, List<String> otherFiles) {
+ super(component, propertiesFiles, otherFiles);
+ loadZookeeperProperties();
+ startZookeeper();
+ }
+
+ /**
+ * Loads zookeeper related properties from ZK_PROPERTIES_FILE. WIll throw a {@link RuntimeException} if that file is
+ * not available or couldn't be opened.
+ */
+ private void loadZookeeperProperties() {
+ if (System.getProperty(ZK_PROPERTIES_FILE) != null) {
+ throw new IllegalArgumentException("DistributedCOnfigurationManager requires " + ZK_PROPERTIES_FILE + " to be set");
+ }
+
+ try {
+ System.getProperties().load(new FileInputStream(System.getProperty(ZK_PROPERTIES_FILE)));
+ } catch (IOException e) {
+ logger.log(Level.SEVERE, "Unable to read ZK_PROPERTIES_FILE " + System.getProperty(ZK_PROPERTIES_FILE));
+ throw new IllegalStateException("Couldn't load Zookeeper configuration");
+ }
+
+ if (System.getProperty(Properties.ZK_CONNECT_STRING) == null) {
+ throw new IllegalArgumentException("Zookeeper requires a proper connect string to connect to zookeeper ensemble");
+ }
+
+ connectString = System.getProperty(Properties.ZK_CONNECT_STRING);
+ logger.log(Level.CONFIG, String.format("Using zookeeper connect string : %s", connectString));
+ }
+
+ /**
+ * Creates a {@link CuratorFramework} instance and start it. This method will wait a maximum amount of
+ * {@link Properties#ZK_STARTUP_TIMEOUT} milli-seconds until the client connects to the zookeeper ensemble.
+ */
+ private void startZookeeper() {
+ int connectionTimeoutMs = Integer.parseInt(System.getProperty(Properties.ZK_CONNECTION_TIMEOUT, "15"));
+ int sessionTimeoutMs = Integer.parseInt(System.getProperty(Properties.ZK_CONNECTION_TIMEOUT, "60"));
+ int retryInitialWaitMs = Integer.parseInt(System.getProperty(Properties.ZK_CONNECTION_TIMEOUT, "1000"));
+ int maxRetryCount = Integer.parseInt(System.getProperty(Properties.ZK_CONNECTION_TIMEOUT, "3"));
+ int startupTimeOutMs = Integer.parseInt(System.getProperty(Properties.ZK_STARTUP_TIMEOUT, "30000"));
+
+ CuratorFrameworkFactory.Builder builder = CuratorFrameworkFactory.builder()
+ .connectString(connectString)
+ .retryPolicy(new ExponentialBackoffRetry(retryInitialWaitMs, maxRetryCount))
+ .connectionTimeoutMs(connectionTimeoutMs)
+ .sessionTimeoutMs(sessionTimeoutMs);
+
+ /*
+ * If authorization information is available, those will be added to the client. NOTE: These auth info are
+ * for access control, therefore no authentication will happen when the client is being started. These
+ * info will only be required whenever a client is accessing an already create ZNode. For another client of
+ * another node to make use of a ZNode created by this node, it should also provide the same auth info.
+ */
+ if (System.getProperty(Properties.ZK_USERNAME) != null && System.getProperty(Properties.ZK_PASSWORD) != null) {
+ String authenticationString = System.getProperty(Properties.ZK_USERNAME) + ":" + System.getProperty(Properties.ZK_PASSWORD);
+ builder.authorization("digest", authenticationString.getBytes())
+ .aclProvider(new ACLProvider() {
+ public List<ACL> getDefaultAcl() {
+ return ZooDefs.Ids.CREATOR_ALL_ACL;
+ }
+
+ public List<ACL> getAclForPath(String path) {
+ return ZooDefs.Ids.CREATOR_ALL_ACL;
+ }
+ });
+ }
+
+ client = builder.build();
+ logger.log(Level.CONFIG, String.format("CuratorFramework client built successfully with " +
+ "connectString: %s, sessionTimeout: %d and connectionTimeout: %d", connectString, sessionTimeoutMs, connectionTimeoutMs));
+
+ client.start();
+ logger.log(Level.CONFIG, "Curator framework start operation invoked");
+
+ try {
+ logger.info(String.format("Waiting to connect to zookeeper, startupTimeout : %d", startupTimeOutMs));
+ client.blockUntilConnected(startupTimeOutMs, TimeUnit.MILLISECONDS);
+ } catch (InterruptedException ex) {
+ logger.severe(String.format("Interrupted while waiting to connect zookeeper (connectString : %s) : %s", ex.getMessage(), connectString));
+ }
+
+ if (!client.getZookeeperClient().isConnected()) {
+ throw new IllegalStateException("Could not connect to ZooKeeper : " + connectString);
+ }
+
+ logger.info("CuratorFramework client started successfully");
+ }
+
+ @Override
+ public String getProperty(String key) {
+ // Todo Implement using curator
+ return null;
+ }
+
+ @Override
+ public void loadProperties() {
+ // todo Implement the logic with Curator
+ }
+
+ public File getPropertiesFile(String filePath) {
+ return null;
+ }
+
+ public File getConfigurationFile(String filePath) {
+ return null;
+ }
+}
http://git-wip-us.apache.org/repos/asf/oodt/blob/ac7170bd/config/src/main/java/org/apache/oodt/config/standalone/StandaloneConfigurationManager.java
----------------------------------------------------------------------
diff --git a/config/src/main/java/org/apache/oodt/config/standalone/StandaloneConfigurationManager.java b/config/src/main/java/org/apache/oodt/config/standalone/StandaloneConfigurationManager.java
new file mode 100644
index 0000000..0cf0c78
--- /dev/null
+++ b/config/src/main/java/org/apache/oodt/config/standalone/StandaloneConfigurationManager.java
@@ -0,0 +1,78 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.oodt.config.standalone;
+
+import org.apache.oodt.config.ConfigurationManager;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.util.List;
+import java.util.logging.Logger;
+
+/**
+ * {@link ConfigurationManager} implementation to be used with standalone configuration management.
+ *
+ * @author Imesha Sudasingha
+ */
+public class StandaloneConfigurationManager extends ConfigurationManager {
+
+ /** Logger instance for logging */
+ private static final Logger logger = Logger.getLogger(StandaloneConfigurationManager.class.getName());
+
+ public StandaloneConfigurationManager(String component, List<String> propertiesFiles, List<String> otherFiles) {
+ super(component, propertiesFiles, otherFiles);
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public String getProperty(String key) {
+ return System.getProperty(key);
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public void loadProperties() throws IOException {
+ for (String file : propertiesFiles) {
+ System.getProperties().load(new FileInputStream(new File(file)));
+ }
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public File getPropertiesFile(String filePath) throws FileNotFoundException {
+ File file = new File(filePath);
+ if (!propertiesFiles.contains(filePath) || !file.exists()) {
+ throw new FileNotFoundException("Couldn't find properties file located at: " + filePath);
+ }
+
+ return file;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public File getConfigurationFile(String filePath) throws FileNotFoundException {
+ File file = new File(filePath);
+ if (!otherFiles.contains(filePath) || !file.exists()) {
+ throw new FileNotFoundException("Couldn't find properties file located at: " + filePath);
+ }
+
+ return file;
+ }
+}
http://git-wip-us.apache.org/repos/asf/oodt/blob/ac7170bd/core/pom.xml
----------------------------------------------------------------------
diff --git a/core/pom.xml b/core/pom.xml
index 019eee2..e55d46c 100644
--- a/core/pom.xml
+++ b/core/pom.xml
@@ -248,6 +248,11 @@ the License.
<version>8.7</version>
</dependency>
<dependency>
+ <groupId>org.apache.curator</groupId>
+ <artifactId>curator-framework</artifactId>
+ <version>3.3.0</version>
+ </dependency>
+ <dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-frontend-jaxrs</artifactId>
<version>2.6.0</version>
@@ -360,6 +365,11 @@ the License.
</dependency>
<dependency>
<groupId>org.apache.oodt</groupId>
+ <artifactId>oodt-conf</artifactId>
+ <version>${project.parent.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.oodt</groupId>
<artifactId>oodt-product</artifactId>
<version>${project.parent.version}</version>
</dependency>
http://git-wip-us.apache.org/repos/asf/oodt/blob/ac7170bd/filemgr/pom.xml
----------------------------------------------------------------------
diff --git a/filemgr/pom.xml b/filemgr/pom.xml
index cfa1327..2e43f30 100644
--- a/filemgr/pom.xml
+++ b/filemgr/pom.xml
@@ -130,6 +130,10 @@
<artifactId>oodt-commons</artifactId>
</dependency>
<dependency>
+ <groupId>org.apache.oodt</groupId>
+ <artifactId>oodt-conf</artifactId>
+ </dependency>
+ <dependency>
<groupId>org.apache.solr</groupId>
<artifactId>solr-core</artifactId>
<scope>compile</scope>
http://git-wip-us.apache.org/repos/asf/oodt/blob/ac7170bd/filemgr/src/main/java/org/apache/oodt/cas/filemgr/system/XmlRpcFileManager.java
----------------------------------------------------------------------
diff --git a/filemgr/src/main/java/org/apache/oodt/cas/filemgr/system/XmlRpcFileManager.java b/filemgr/src/main/java/org/apache/oodt/cas/filemgr/system/XmlRpcFileManager.java
index beba420..996ac16 100644
--- a/filemgr/src/main/java/org/apache/oodt/cas/filemgr/system/XmlRpcFileManager.java
+++ b/filemgr/src/main/java/org/apache/oodt/cas/filemgr/system/XmlRpcFileManager.java
@@ -52,6 +52,8 @@ import org.apache.oodt.cas.filemgr.versioning.VersioningUtils;
import org.apache.oodt.cas.metadata.Metadata;
import org.apache.oodt.cas.metadata.exceptions.MetExtractionException;
import org.apache.oodt.commons.date.DateUtils;
+import org.apache.oodt.config.ConfigurationManager;
+import org.apache.oodt.config.ConfigurationManagerFactory;
import org.apache.xmlrpc.WebServer;
import com.google.common.collect.Lists;
@@ -64,12 +66,7 @@ import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
import java.net.URL;
-import java.util.Arrays;
-import java.util.Hashtable;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.Vector;
+import java.util.*;
import java.util.concurrent.ConcurrentHashMap;
import java.util.logging.Level;
import java.util.logging.Logger;
@@ -84,6 +81,9 @@ import java.util.logging.Logger;
*/
public class XmlRpcFileManager {
+ /** Name of this OODT component. TO be used by the configuration management */
+ private static final String componentName = "file-mgr";
+
/* the port to run the XML RPC web server on, default is 1999 */
private int webServerPort = 1999;
@@ -108,6 +108,9 @@ public class XmlRpcFileManager {
/* whether or not to expand a product instance into met */
private boolean expandProductMet;
+ /** Configuration Manager instance which will handle the configiration aspect in distributed/standalone manner */
+ private ConfigurationManager configurationManager;
+
/**
* <p> Creates a new XmlRpcFileManager with the given metadata store factory, and the given data store factory, on the
* given port. </p>
@@ -122,10 +125,20 @@ public class XmlRpcFileManager {
webServer.addHandler("filemgr", this);
webServer.start();
- this.loadConfiguration();
- LOG.log(Level.INFO, "File Manager started by "
- + System.getProperty("user.name", "unknown"));
+ // set up the configuration, if there is any
+ if (System.getProperty("org.apache.oodt.cas.filemgr.properties") != null) {
+ String configFile = System.getProperty("org.apache.oodt.cas.filemgr.properties");
+ LOG.log(Level.INFO, "Loading File Manager Configuration Properties from: [" + configFile + "]");
+
+ List<String> propertiesFiles = new ArrayList<String>();
+ propertiesFiles.add(System.getProperty("org.apache.oodt.cas.filemgr.properties"));
+ configurationManager = ConfigurationManagerFactory.getConfigurationManager(componentName, propertiesFiles,null);
+ } else {
+ configurationManager = ConfigurationManagerFactory.getConfigurationManager(componentName,null,null);
+ }
+ this.loadConfiguration();
+ LOG.log(Level.INFO, "File Manager started by " + System.getProperty("user.name", "unknown"));
}
public void setCatalog(Catalog catalog) {
@@ -1525,15 +1538,7 @@ public class XmlRpcFileManager {
}
private void loadConfiguration() throws IOException {
- // set up the configuration, if there is any
- if (System.getProperty("org.apache.oodt.cas.filemgr.properties") != null) {
- String configFile = System
- .getProperty("org.apache.oodt.cas.filemgr.properties");
- LOG.log(Level.INFO,
- "Loading File Manager Configuration Properties from: [" + configFile
- + "]");
- System.getProperties().load(new FileInputStream(new File(configFile)));
- }
+ configurationManager.loadProperties();
String metaFactory, dataFactory, transferFactory;
http://git-wip-us.apache.org/repos/asf/oodt/blob/ac7170bd/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index f5b1c3c..9a5bbbd 100644
--- a/pom.xml
+++ b/pom.xml
@@ -33,6 +33,7 @@ the License.
<module>core</module>
<module>commons</module>
<module>cli</module>
+ <module>config</module>
<module>pcs/input</module>
<module>metadata</module>
<module>protocol/api</module>
[22/35] oodt git commit: Merge branch 'OODT-847' of
http://github.com/adhulipa/oodt
Posted by ma...@apache.org.
Merge branch 'OODT-847' of http://github.com/adhulipa/oodt
Project: http://git-wip-us.apache.org/repos/asf/oodt/repo
Commit: http://git-wip-us.apache.org/repos/asf/oodt/commit/c3957c38
Tree: http://git-wip-us.apache.org/repos/asf/oodt/tree/c3957c38
Diff: http://git-wip-us.apache.org/repos/asf/oodt/diff/c3957c38
Branch: refs/heads/feature/zookeeper-config
Commit: c3957c388be21c7e9d1031306a37d0a43957dc87
Parents: 6daeb8f ce69046
Author: Chris Mattmann <ma...@apache.org>
Authored: Mon Jul 10 14:08:58 2017 -0400
Committer: Chris Mattmann <ma...@apache.org>
Committed: Mon Jul 10 14:08:58 2017 -0400
----------------------------------------------------------------------
.../filemgr/metadata/FileAttributesMetKeys.java | 53 ++++++
.../examples/FileAttributesExtractor.java | 82 +++++++++
.../examples/TestFileAttributesExtractor.java | 167 +++++++++++++++++++
3 files changed, 302 insertions(+)
----------------------------------------------------------------------
[09/35] oodt git commit: Added zip packaging for distributed
configuration publisher
Posted by ma...@apache.org.
http://git-wip-us.apache.org/repos/asf/oodt/blob/27a28daa/config/src/test/resources/mime-types.xml
----------------------------------------------------------------------
diff --git a/config/src/test/resources/mime-types.xml b/config/src/test/resources/mime-types.xml
deleted file mode 100755
index 6b678be..0000000
--- a/config/src/test/resources/mime-types.xml
+++ /dev/null
@@ -1,4119 +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"/>
- <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>
-
- <!-- http://www.iana.org/assignments/media-types/application/vnd.ms-excel -->
- <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">
- <alias type="application/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-corelpresentations">
- <glob pattern="*.shw"/>
- <sub-class-of type="application/x-tika-msoffice"/>
- </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">
- <acronym>OTF</acronym>
- <_comment>OpenType Font</_comment>
- <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">
- <acronym>TTF</acronym>
- <_comment>TrueType Font</_comment>
- <glob pattern="*.ttf"/>
- <glob pattern="*.ttc"/>
- <magic priority="40">
- <match value="0x00010000" type="string" offset="0"/>
- </magic>
- </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"/>
- <glob pattern="*.he5"/>
- </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="applica
<TRUNCATED>
[15/35] oodt git commit: Created test cases for distributed
configuration manager and publisher
Posted by ma...@apache.org.
http://git-wip-us.apache.org/repos/asf/oodt/blob/a973c531/config/src/main/resources/examples/filemgr/oodt/elements.xml
----------------------------------------------------------------------
diff --git a/config/src/main/resources/examples/filemgr/oodt/elements.xml b/config/src/main/resources/examples/filemgr/oodt/elements.xml
new file mode 100755
index 0000000..d56c44b
--- /dev/null
+++ b/config/src/main/resources/examples/filemgr/oodt/elements.xml
@@ -0,0 +1,77 @@
+<?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.
+-->
+<cas:elements xmlns:cas="http://oodt.jpl.nasa.gov/1.0/cas">
+<element id="urn:oodt:ProductId" name="CAS.ProductId">
+<dcElement>Identifier</dcElement>
+ <!--
+You can optionally specify a 'trim' tag to identify whether
+or not you want newlines trimmed from the element description. To
+turn off trimming (now done by default), include the following with your
+description definition: trim="false"
+-->
+<description>
+A Product's unique identifier within the CAS namespace.
+</description>
+</element>
+<element id="urn:oodt:ProductName" name="CAS.ProductName">
+<dcElement>Title</dcElement>
+<description>
+A Product's name within the CAS namespace.
+</description>
+</element>
+<element id="urn:oodt:ProductReceivedTime"
+name="CAS.ProductReceivedTime">
+<dcElement />
+<description>
+The ISO 8601 formatted time that the Product was received.
+</description>
+</element>
+<element id="urn:oodt:Filename" name="Filename">
+<description>
+The names of the files that represent this product.
+</description>
+<dcElement />
+</element>
+<element id="urn:oodt:FileLocation" name="FileLocation">
+<description>
+The locations of the files that represent this product.
+</description>
+<dcElement />
+</element>
+<element id="urn:oodt:ProductType" name="ProductType">
+<description>
+Type of product, as specified by, e.g., a data bible.
+</description>
+<dcElement />
+</element>
+<element id="urn:oodt:ProductStructure" name="ProductStructure">
+<description>
+Whether or not a product is Flat (e.g., a set of independent
+files), or hierarchical, e.g., a dir structure.
+</description>
+<dcElement />
+</element>
+<element id="urn:oodt:MimeType" name="MimeType">
+<description>The IETF mime type of this product.</description>
+<dcElement />
+</element>
+<element id="urn:test:DataVersion" name="DataVersion">
+<description>The version of the data product</description>
+<dcElement />
+</element>
+</cas:elements>
http://git-wip-us.apache.org/repos/asf/oodt/blob/a973c531/config/src/main/resources/examples/filemgr/oodt/product-type-element-map.xml
----------------------------------------------------------------------
diff --git a/config/src/main/resources/examples/filemgr/oodt/product-type-element-map.xml b/config/src/main/resources/examples/filemgr/oodt/product-type-element-map.xml
new file mode 100755
index 0000000..418c0d9
--- /dev/null
+++ b/config/src/main/resources/examples/filemgr/oodt/product-type-element-map.xml
@@ -0,0 +1,33 @@
+<?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.
+-->
+<cas:producttypemap xmlns:cas="http://oodt.jpl.nasa.gov/1.0/cas">
+ <!-- can set the "parent" attribute on types below to allow inheritance
+of elements between the types
+-->
+ <type id="urn:oodt:GenericFile">
+ <element id="urn:oodt:ProductReceivedTime"/>
+ <element id="urn:oodt:ProductName"/>
+ <element id="urn:oodt:ProductId"/>
+ <element id="urn:oodt:ProductType"/>
+ <element id="urn:oodt:ProductStructure"/>
+ <element id="urn:oodt:Filename"/>
+ <element id="urn:oodt:FileLocation"/>
+ <element id="urn:oodt:MimeType"/>
+ <element id="urn:test:DataVersion"/>
+ </type>
+</cas:producttypemap>
http://git-wip-us.apache.org/repos/asf/oodt/blob/a973c531/config/src/main/resources/examples/filemgr/oodt/product-types.xml
----------------------------------------------------------------------
diff --git a/config/src/main/resources/examples/filemgr/oodt/product-types.xml b/config/src/main/resources/examples/filemgr/oodt/product-types.xml
new file mode 100755
index 0000000..2d40847
--- /dev/null
+++ b/config/src/main/resources/examples/filemgr/oodt/product-types.xml
@@ -0,0 +1,53 @@
+<?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.
+-->
+<cas:producttypes xmlns:cas="http://oodt.jpl.nasa.gov/1.0/cas">
+ <type id="urn:oodt:GenericFile" name="GenericFile">
+ <repository path="file://[OODT_HOME]/data/archive"/>
+ <versioner class="org.apache.oodt.cas.filemgr.versioning.BasicVersioner"/>
+ <!--
+You can optionally specify a 'trim' tag to identify whether
+or not you want newlines trimmed from the product type description. To
+turn off trimming (now done by default), include the following attribute with your
+description definition: trim="false"
+-->
+ <description>The default product type for any kind of file.</description>
+ <metExtractors>
+ <extractor
+ class="org.apache.oodt.cas.filemgr.metadata.extractors.CoreMetExtractor">
+ <configuration>
+ <!-- you can optionally include the envReplace tag to turn on/off environment var replacement -->
+ <property name="nsAware" value="true" />
+ <property name="elementNs" value="CAS" />
+ <property name="elements"
+ value="ProductReceivedTime,ProductName,ProductId" />
+ </configuration>
+ </extractor>
+ <extractor class="org.apache.oodt.cas.filemgr.metadata.extractors.examples.MimeTypeExtractor" />
+ <extractor class="org.apache.oodt.cas.filemgr.metadata.extractors.examples.FinalFileLocationExtractor">
+ <configuration>
+ <!-- this property specifies whether you want the FILE_LOCATION field
+computed by this extractor to replace any other FILE_LOCATION met
+attribute.
+-->
+ <property name="replace" value="true"/>
+ </configuration>
+ </extractor>
+ </metExtractors>
+ <metadata/>
+ </type>
+</cas:producttypes>
[07/35] oodt git commit: Implemented configuration fetching for
DistributedConfigurationManager
Posted by ma...@apache.org.
Implemented configuration fetching for DistributedConfigurationManager
Project: http://git-wip-us.apache.org/repos/asf/oodt/repo
Commit: http://git-wip-us.apache.org/repos/asf/oodt/commit/5fcf2220
Tree: http://git-wip-us.apache.org/repos/asf/oodt/tree/5fcf2220
Diff: http://git-wip-us.apache.org/repos/asf/oodt/diff/5fcf2220
Branch: refs/heads/feature/zookeeper-config
Commit: 5fcf2220125b64afba080c6c9c6c5592daae2dea
Parents: fadf149
Author: Imesha Sudasingha <im...@gmail.com>
Authored: Sat Jun 17 23:21:12 2017 +0530
Committer: Imesha Sudasingha <im...@gmail.com>
Committed: Sat Jun 17 23:21:12 2017 +0530
----------------------------------------------------------------------
README.md | 26 ++--
.../oodt/config/ConfigurationManager.java | 10 +-
.../DistributedConfigurationManager.java | 83 +++++++++-
.../DistributedConfigurationPublisher.java | 9 +-
.../oodt/config/distributed/ZNodePaths.java | 4 +
.../config/distributed/utils/CuratorUtils.java | 151 +++++++++++++++++++
.../StandaloneConfigurationManager.java | 3 +-
.../apache/oodt/config/utils/CuratorUtils.java | 126 ----------------
.../DistributedConfigurationPublisherTest.java | 4 +-
.../cas/filemgr/system/XmlRpcFileManager.java | 8 +-
10 files changed, 264 insertions(+), 160 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/oodt/blob/5fcf2220/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index de11028..76c6d49 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,4 @@
-=============================================================
- Welcome to Apache OODT <http://oodt.apache.org/>
-=============================================================
+# Welcome to Apache OODT <http://oodt.apache.org/>
OODT is a grid middleware framework used on a number of successful projects at
NASA's Jet Propulsion Laboratory/California Institute of Technology, and many
@@ -19,8 +17,7 @@ other research institutions and universities, specifically those part of the:
OODT is a Top Level project of the Apache Software Foundation
<http://www.apache.org/>.
-Getting Started
-===============
+## Getting Started
OODT is primarily written in Java, with some components available in Python.
It requires Java 5 and uses the Maven 2 <http://maven.apache.org/> build
@@ -31,8 +28,8 @@ this directory:
For the Python components, see the "agility" subdirectory.
-Contributing
-============
+## Contributing
+
To contribute a patch, follow these instructions (note that installing
[Hub](http://hub.github.com) is not strictly required, but is recommended).
@@ -53,8 +50,7 @@ To contribute a patch, follow these instructions (note that installing
```
-License (see also LICENSE.txt)
-==============================
+## License (see also LICENSE.txt)
Collective work: Copyright 2010-2012 The Apache Software Foundation.
@@ -77,8 +73,7 @@ Apache OODT includes a number of subcomponents with separate copyright
notices and license terms. Your use of these subcomponents is subject to
the terms and conditions of the licenses listed in the LICENSE.txt file.
-Export control
-==============
+## Export control
This distribution includes cryptographic software. The country in which you
currently reside may have restrictions on the import, possession, use, and/or
@@ -104,8 +99,7 @@ The following provides more details on the included cryptographic software:
encrypted PDF files. See http://www.bouncycastle.org/ for more details on
Bouncy Castle.
-Documentation
-=============
+## Documentation
You can build a local copy of the OODT documentation including JavaDocs using
the following Maven 2 command in the OODT source directory:
@@ -125,8 +119,7 @@ than likely you'll need to add to the MAVEN_OPTS environment variable in order
to set the Java heap maximum size with "-Xmx512m" or larger before attempting
to run "mvn site".
-Mailing Lists
-=============
+## Mailing Lists
Discussion about OODT takes place on the following mailing lists:
@@ -144,8 +137,7 @@ dev-subscribe@oodt...). To unsubscribe, send a message to
<LIST>-unsubscribe@oodt.apache.org. For more instructions, send a
message to <LIST>-help@oodt.apache.org.
-Issue Tracker
-=============
+## Issue Tracker
If you encounter errors in OODT or want to suggest an improvement or a new
feature, please visit the OODT issue tracker at
http://git-wip-us.apache.org/repos/asf/oodt/blob/5fcf2220/config/src/main/java/org/apache/oodt/config/ConfigurationManager.java
----------------------------------------------------------------------
diff --git a/config/src/main/java/org/apache/oodt/config/ConfigurationManager.java b/config/src/main/java/org/apache/oodt/config/ConfigurationManager.java
index 1911889..d65c4ae 100644
--- a/config/src/main/java/org/apache/oodt/config/ConfigurationManager.java
+++ b/config/src/main/java/org/apache/oodt/config/ConfigurationManager.java
@@ -17,10 +17,8 @@
package org.apache.oodt.config;
-import java.io.IOException;
-
/**
- * The abstract class to define functionalities of the configuration managers.
+ * The abstract class to define functions of the configuration managers.
*
* @author Imesha Sudasingha
*/
@@ -32,5 +30,9 @@ public abstract class ConfigurationManager {
this.component = component;
}
- public abstract void loadProperties() throws IOException;
+ public abstract void loadConfiguration() throws Exception;
+
+ public String getComponent() {
+ return component;
+ }
}
http://git-wip-us.apache.org/repos/asf/oodt/blob/5fcf2220/config/src/main/java/org/apache/oodt/config/distributed/DistributedConfigurationManager.java
----------------------------------------------------------------------
diff --git a/config/src/main/java/org/apache/oodt/config/distributed/DistributedConfigurationManager.java b/config/src/main/java/org/apache/oodt/config/distributed/DistributedConfigurationManager.java
index 9ab0e32..d16df7e 100644
--- a/config/src/main/java/org/apache/oodt/config/distributed/DistributedConfigurationManager.java
+++ b/config/src/main/java/org/apache/oodt/config/distributed/DistributedConfigurationManager.java
@@ -17,15 +17,20 @@
package org.apache.oodt.config.distributed;
+import org.apache.commons.io.FileUtils;
import org.apache.curator.framework.CuratorFramework;
import org.apache.oodt.config.ConfigurationManager;
import org.apache.oodt.config.Constants;
import org.apache.oodt.config.Constants.Properties;
-import org.apache.oodt.config.utils.CuratorUtils;
+import org.apache.oodt.config.distributed.utils.CuratorUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import java.io.ByteArrayInputStream;
+import java.io.File;
import java.io.IOException;
+import java.io.InputStream;
+import java.util.List;
import java.util.concurrent.TimeUnit;
import static org.apache.oodt.config.Constants.Properties.ZK_CONNECT_STRING;
@@ -41,12 +46,17 @@ public class DistributedConfigurationManager extends ConfigurationManager {
private static final Logger logger = LoggerFactory.getLogger(DistributedConfigurationManager.class);
- /** Variables required to connect to zookeeper */
+ /** Connection string required to connect to zookeeper */
private String connectString;
private CuratorFramework client;
+ /** Name of the OODT component, to which this class is providing configuration support */
+ private String componentName;
+ private ZNodePaths zNodePaths;
public DistributedConfigurationManager(String component) {
super(component);
+ this.componentName = component;
+ this.zNodePaths = new ZNodePaths(component);
if (System.getProperty(ZK_PROPERTIES_FILE) == null && System.getProperty(Constants.Properties.ZK_CONNECT_STRING) == null) {
throw new IllegalArgumentException("Zookeeper requires system properties " + ZK_PROPERTIES_FILE + " or " + ZK_CONNECT_STRING + " to be set");
@@ -96,7 +106,72 @@ public class DistributedConfigurationManager extends ConfigurationManager {
}
@Override
- public void loadProperties() {
- // todo Implement the logic with Curator
+ public void loadConfiguration() throws Exception {
+ logger.debug("Loading properties for : {}", componentName);
+ loadProperties();
+ logger.info("Properties loaded for : {}", componentName);
+
+ logger.debug("Saving configuration files for : {}", componentName);
+ saveConfigFiles();
+ logger.info("Configuration files saved for : {}", componentName);
+
+ }
+
+ /**
+ * This method will fetch <pre>.properties</pre> files stored in zookeeper and load the properties in those files
+ * to {@link System#props}.
+ *
+ * @throws Exception Zookeeper exceptions
+ */
+ private void loadProperties() throws Exception {
+ String propertiesZNodePath = zNodePaths.getPropertiesZNodePath();
+ List<String> propertiesFilesZNodePaths = CuratorUtils.getLeafZNodePaths(client, propertiesZNodePath);
+
+ if (propertiesFilesZNodePaths.contains(propertiesZNodePath)) {
+ propertiesFilesZNodePaths.remove(propertiesZNodePath);
+ }
+
+ for (String propertiesFileZNodePath : propertiesFilesZNodePaths) {
+ logger.debug("Loading properties from ZNode at : {}", propertiesFileZNodePath);
+ byte[] bytes = client.getData().forPath(propertiesFileZNodePath);
+ try (InputStream in = new ByteArrayInputStream(bytes)) {
+ System.getProperties().load(in);
+ }
+
+ logger.info("Properties loaded from ZNode at : {}", propertiesFileZNodePath);
+ }
+ }
+
+ /**
+ * Fetch and save all the configuration files from zookeeper. Local directories are created accordingly.
+ * For example, if there is a ZNode under <pre>/components/{component}/configuration/etc/mime-types.xml</pre>, it
+ * will be fetched and stored in the local path <pre>etc/mime-types.xml</pre>
+ *
+ * @throws Exception IOException or Zookeeper exception
+ */
+ private void saveConfigFiles() throws Exception {
+ String configParentZNodePath = zNodePaths.getConfigurationZNodePath();
+ List<String> configFilesZNodePaths = CuratorUtils.getLeafZNodePaths(client, configParentZNodePath);
+
+ if (configFilesZNodePaths.contains(configParentZNodePath)) {
+ configFilesZNodePaths.remove(configParentZNodePath);
+ }
+
+ for (String configFileZNodePath : configFilesZNodePaths) {
+ logger.debug("Fetching configuration file from ZNode at : {}", configFileZNodePath);
+ byte[] bytes = client.getData().forPath(configFileZNodePath);
+
+ String localFilePath = zNodePaths.getLocalConfigFilePath(configFileZNodePath);
+ FileUtils.writeByteArrayToFile(new File(localFilePath), bytes);
+ logger.info("Config file from ZNode at {} saved to {}", configFileZNodePath);
+ }
+ }
+
+ public String getComponentName() {
+ return componentName;
+ }
+
+ public ZNodePaths getzNodePaths() {
+ return zNodePaths;
}
}
http://git-wip-us.apache.org/repos/asf/oodt/blob/5fcf2220/config/src/main/java/org/apache/oodt/config/distributed/DistributedConfigurationPublisher.java
----------------------------------------------------------------------
diff --git a/config/src/main/java/org/apache/oodt/config/distributed/DistributedConfigurationPublisher.java b/config/src/main/java/org/apache/oodt/config/distributed/DistributedConfigurationPublisher.java
index 8970641..37b57c9 100644
--- a/config/src/main/java/org/apache/oodt/config/distributed/DistributedConfigurationPublisher.java
+++ b/config/src/main/java/org/apache/oodt/config/distributed/DistributedConfigurationPublisher.java
@@ -20,7 +20,7 @@ package org.apache.oodt.config.distributed;
import org.apache.commons.io.FileUtils;
import org.apache.curator.framework.CuratorFramework;
import org.apache.oodt.config.Constants;
-import org.apache.oodt.config.utils.CuratorUtils;
+import org.apache.oodt.config.distributed.utils.CuratorUtils;
import org.apache.zookeeper.data.Stat;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -114,6 +114,8 @@ public class DistributedConfigurationPublisher {
logger.debug("Publishing config files : {}", configFiles);
publishConfiguration(configFiles, false);
logger.info("Config files published successfully");
+
+ // TODO: 6/17/17 Verify whether the given configuration are published correctly
}
private void publishConfiguration(Map<String, String> fileMapping, boolean isProperties) throws Exception {
@@ -135,7 +137,6 @@ public class DistributedConfigurationPublisher {
String existingData = new String(bytes);
if (content.equals(existingData)) {
logger.warn("{} already exists in zookeeper at {}", entry.getKey(), entry.getValue());
- continue;
} else {
Stat stat = client.setData().forPath(zNodePath, content.getBytes());
if (stat != null) {
@@ -143,6 +144,10 @@ public class DistributedConfigurationPublisher {
}
}
} else {
+ /*
+ * Creating these ZNodes with parent 'Containers' is important since containers are automatically deleted
+ * when no child node is present under them.
+ */
client.create().creatingParentContainersIfNeeded().forPath(zNodePath, content.getBytes());
}
}
http://git-wip-us.apache.org/repos/asf/oodt/blob/5fcf2220/config/src/main/java/org/apache/oodt/config/distributed/ZNodePaths.java
----------------------------------------------------------------------
diff --git a/config/src/main/java/org/apache/oodt/config/distributed/ZNodePaths.java b/config/src/main/java/org/apache/oodt/config/distributed/ZNodePaths.java
index f390838..90fa9a5 100644
--- a/config/src/main/java/org/apache/oodt/config/distributed/ZNodePaths.java
+++ b/config/src/main/java/org/apache/oodt/config/distributed/ZNodePaths.java
@@ -77,4 +77,8 @@ public class ZNodePaths {
public String getConfigurationZNodePath(String subPath) {
return configurationZNodeRoot + (subPath.startsWith(SEPARATOR) ? subPath.substring(1) : subPath);
}
+
+ public String getLocalConfigFilePath(String zNodePath) {
+ return zNodePath.substring(configurationZNodeRoot.length());
+ }
}
http://git-wip-us.apache.org/repos/asf/oodt/blob/5fcf2220/config/src/main/java/org/apache/oodt/config/distributed/utils/CuratorUtils.java
----------------------------------------------------------------------
diff --git a/config/src/main/java/org/apache/oodt/config/distributed/utils/CuratorUtils.java b/config/src/main/java/org/apache/oodt/config/distributed/utils/CuratorUtils.java
new file mode 100644
index 0000000..6f9c97f
--- /dev/null
+++ b/config/src/main/java/org/apache/oodt/config/distributed/utils/CuratorUtils.java
@@ -0,0 +1,151 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.oodt.config.distributed.utils;
+
+import org.apache.curator.framework.CuratorFramework;
+import org.apache.curator.framework.CuratorFrameworkFactory;
+import org.apache.curator.framework.api.ACLProvider;
+import org.apache.curator.retry.ExponentialBackoffRetry;
+import org.apache.oodt.config.Constants;
+import org.apache.zookeeper.CreateMode;
+import org.apache.zookeeper.KeeperException;
+import org.apache.zookeeper.ZooDefs;
+import org.apache.zookeeper.data.ACL;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+import static org.apache.oodt.config.Constants.Properties.ZK_PROPERTIES_FILE;
+import static org.apache.oodt.config.Constants.ZPaths.*;
+
+public class CuratorUtils {
+
+ private static final Logger logger = LoggerFactory.getLogger(CuratorUtils.class);
+
+ private CuratorUtils() {
+ }
+
+ /**
+ * Loads zookeeper related properties from ZK_PROPERTIES_FILE.
+ *
+ * @throws IOException if properties file could not be read
+ */
+ public static void loadZookeeperProperties() throws IOException {
+ System.getProperties().load(new FileInputStream(System.getProperty(ZK_PROPERTIES_FILE)));
+ }
+
+ /**
+ * Create a ZNode in the given path if not exists, with the given data
+ *
+ * @param curatorFramework {@link CuratorFramework} client
+ * @param zNodePath the path in which the ZNode to be created
+ */
+ public static void createZNodeIfNotExists(CuratorFramework curatorFramework, String zNodePath, CreateMode mode, byte[] content) throws Exception {
+ try {
+ String path = curatorFramework.create().creatingParentsIfNeeded().withMode(mode).forPath(zNodePath, content);
+ logger.debug("Created ZNode at path : {}", path);
+ } catch (Exception e) {
+ if (e instanceof KeeperException && KeeperException.Code.NODEEXISTS.equals(((KeeperException) e).code())) {
+ // This is a desired behaviour, trying to create an already existing znode.
+ logger.debug("Attempting to create an already existing ZNode at path {} : {}", zNodePath, e);
+ } else {
+ logger.error("Error when creating ZNode for path {} : {}", zNodePath, e.getMessage());
+ throw e;
+ }
+ }
+ }
+
+ /**
+ * Gets the <code>String</code> value of the data in the given znode path
+ *
+ * @param client {@link CuratorFramework} client
+ * @param path ZNode path to be checked
+ * @return ZNode's data as a string or null
+ * @throws Exception zookeeper errors and etc
+ */
+ public static String getIfExists(CuratorFramework client, String path) throws Exception {
+ return client.checkExists().forPath(path) != null ? new String(client.getData().forPath(path)) : null;
+ }
+
+ /**
+ * Builds a {@link CuratorFramework} instance using the given connectString.
+ *
+ * @param connectString connection string to connect to zookeeper
+ * @param logger {@link Logger} instance of the calling class
+ * @return Newly created CuratorFramework instance.
+ */
+ public static CuratorFramework getCuratorFrameworkClient(String connectString, Logger logger) {
+ int connectionTimeoutMs = Integer.parseInt(System.getProperty(Constants.Properties.ZK_CONNECTION_TIMEOUT, "15000"));
+ int sessionTimeoutMs = Integer.parseInt(System.getProperty(Constants.Properties.ZK_CONNECTION_TIMEOUT, "60000"));
+ int retryInitialWaitMs = Integer.parseInt(System.getProperty(Constants.Properties.ZK_CONNECTION_TIMEOUT, "1000"));
+ int maxRetryCount = Integer.parseInt(System.getProperty(Constants.Properties.ZK_CONNECTION_TIMEOUT, "3"));
+
+ CuratorFrameworkFactory.Builder builder = CuratorFrameworkFactory.builder()
+ .connectString(connectString)
+ .retryPolicy(new ExponentialBackoffRetry(retryInitialWaitMs, maxRetryCount))
+ .connectionTimeoutMs(connectionTimeoutMs)
+ .sessionTimeoutMs(sessionTimeoutMs);
+
+ /*
+ * If authorization information is available, those will be added to the client. NOTE: These auth info are
+ * for access control, therefore no authentication will happen when the client is being started. These
+ * info will only be required whenever a client is accessing an already create ZNode. For another client of
+ * another node to make use of a ZNode created by this node, it should also provide the same auth info.
+ */
+ if (System.getProperty(Constants.Properties.ZK_USERNAME) != null && System.getProperty(Constants.Properties.ZK_PASSWORD) != null) {
+ String authenticationString = System.getProperty(Constants.Properties.ZK_USERNAME) + ":" + System.getProperty(Constants.Properties.ZK_PASSWORD);
+ builder.authorization("digest", authenticationString.getBytes())
+ .aclProvider(new ACLProvider() {
+ public List<ACL> getDefaultAcl() {
+ return ZooDefs.Ids.CREATOR_ALL_ACL;
+ }
+
+ public List<ACL> getAclForPath(String path) {
+ return ZooDefs.Ids.CREATOR_ALL_ACL;
+ }
+ });
+ }
+
+ CuratorFramework client = builder.build();
+ logger.debug("CuratorFramework client built successfully with connectString: {}, sessionTimeout: {} and connectionTimeout: {}",
+ connectString, sessionTimeoutMs, connectionTimeoutMs);
+
+ return client;
+ }
+
+ public static List<String> getLeafZNodePaths(CuratorFramework client, String parentZNodePath) throws Exception {
+ List<String> leafZNodePaths = new ArrayList<>();
+
+ List<String> childNodes = client.getChildren().forPath(parentZNodePath);
+ if (childNodes != null && childNodes.size() > 0) {
+ for (String child : childNodes) {
+ String childZNodePath = parentZNodePath + SEPARATOR + child;
+ leafZNodePaths.addAll(getLeafZNodePaths(client, childZNodePath));
+ }
+ } else {
+ // Then, current ZNode path is a leaf node
+ leafZNodePaths.add(parentZNodePath);
+ }
+
+ return leafZNodePaths;
+ }
+}
http://git-wip-us.apache.org/repos/asf/oodt/blob/5fcf2220/config/src/main/java/org/apache/oodt/config/standalone/StandaloneConfigurationManager.java
----------------------------------------------------------------------
diff --git a/config/src/main/java/org/apache/oodt/config/standalone/StandaloneConfigurationManager.java b/config/src/main/java/org/apache/oodt/config/standalone/StandaloneConfigurationManager.java
index 6ecb1b7..8d932fb 100644
--- a/config/src/main/java/org/apache/oodt/config/standalone/StandaloneConfigurationManager.java
+++ b/config/src/main/java/org/apache/oodt/config/standalone/StandaloneConfigurationManager.java
@@ -23,7 +23,6 @@ import org.slf4j.LoggerFactory;
import java.io.File;
import java.io.FileInputStream;
-import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
@@ -45,7 +44,7 @@ public class StandaloneConfigurationManager extends ConfigurationManager {
/** {@inheritDoc} */
@Override
- public void loadProperties() throws IOException {
+ public void loadConfiguration() throws Exception {
for (String file : propertiesFiles) {
logger.debug("Loading properties from file : {}", file);
System.getProperties().load(new FileInputStream(new File(file)));
http://git-wip-us.apache.org/repos/asf/oodt/blob/5fcf2220/config/src/main/java/org/apache/oodt/config/utils/CuratorUtils.java
----------------------------------------------------------------------
diff --git a/config/src/main/java/org/apache/oodt/config/utils/CuratorUtils.java b/config/src/main/java/org/apache/oodt/config/utils/CuratorUtils.java
deleted file mode 100644
index c73d48b..0000000
--- a/config/src/main/java/org/apache/oodt/config/utils/CuratorUtils.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.oodt.config.utils;
-
-import org.apache.curator.framework.CuratorFramework;
-import org.apache.curator.framework.CuratorFrameworkFactory;
-import org.apache.curator.framework.api.ACLProvider;
-import org.apache.curator.retry.ExponentialBackoffRetry;
-import org.apache.oodt.config.Constants;
-import org.apache.zookeeper.CreateMode;
-import org.apache.zookeeper.KeeperException;
-import org.apache.zookeeper.ZooDefs;
-import org.apache.zookeeper.data.ACL;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.util.List;
-
-import static org.apache.oodt.config.Constants.Properties.ZK_PROPERTIES_FILE;
-
-public class CuratorUtils {
-
- private static final Logger logger = LoggerFactory.getLogger(CuratorUtils.class);
-
- private CuratorUtils() {
- }
-
- /**
- * Loads zookeeper related properties from ZK_PROPERTIES_FILE.
- *
- * @throws IOException if properties file could not be read
- */
- public static void loadZookeeperProperties() throws IOException {
- System.getProperties().load(new FileInputStream(System.getProperty(ZK_PROPERTIES_FILE)));
- }
-
- /**
- * Create a ZNode in the given path if not exists, with the given data
- *
- * @param curatorFramework {@link CuratorFramework} client
- * @param zNodePath the path in which the ZNode to be created
- */
- public static void createZNodeIfNotExists(CuratorFramework curatorFramework, String zNodePath, CreateMode mode, byte[] content) throws Exception {
- try {
- String path = curatorFramework.create().creatingParentsIfNeeded().withMode(mode).forPath(zNodePath, content);
- logger.debug("Created ZNode at path : {}", path);
- } catch (Exception e) {
- if (e instanceof KeeperException && KeeperException.Code.NODEEXISTS.equals(((KeeperException) e).code())) {
- // This is a desired behaviour, trying to create an already existing znode.
- logger.debug("Attempting to create an already existing ZNode at path {} : {}", zNodePath, e);
- } else {
- logger.error("Error when creating ZNode for path {} : {}", zNodePath, e.getMessage());
- throw e;
- }
- }
- }
-
- /**
- * Gets the <code>String</code> value of the data in the given znode path
- *
- * @param client {@link CuratorFramework} client
- * @param path ZNode path to be checked
- * @return ZNode's data as a string or null
- * @throws Exception zookeeper errors and etc
- */
- public static String getIfExists(CuratorFramework client, String path) throws Exception {
- return client.checkExists().forPath(path) != null ? new String(client.getData().forPath(path)) : null;
- }
-
- public static CuratorFramework getCuratorFrameworkClient(String connectString, Logger logger) {
- int connectionTimeoutMs = Integer.parseInt(System.getProperty(Constants.Properties.ZK_CONNECTION_TIMEOUT, "15000"));
- int sessionTimeoutMs = Integer.parseInt(System.getProperty(Constants.Properties.ZK_CONNECTION_TIMEOUT, "60000"));
- int retryInitialWaitMs = Integer.parseInt(System.getProperty(Constants.Properties.ZK_CONNECTION_TIMEOUT, "1000"));
- int maxRetryCount = Integer.parseInt(System.getProperty(Constants.Properties.ZK_CONNECTION_TIMEOUT, "3"));
-
- CuratorFrameworkFactory.Builder builder = CuratorFrameworkFactory.builder()
- .connectString(connectString)
- .retryPolicy(new ExponentialBackoffRetry(retryInitialWaitMs, maxRetryCount))
- .connectionTimeoutMs(connectionTimeoutMs)
- .sessionTimeoutMs(sessionTimeoutMs);
-
- /*
- * If authorization information is available, those will be added to the client. NOTE: These auth info are
- * for access control, therefore no authentication will happen when the client is being started. These
- * info will only be required whenever a client is accessing an already create ZNode. For another client of
- * another node to make use of a ZNode created by this node, it should also provide the same auth info.
- */
- if (System.getProperty(Constants.Properties.ZK_USERNAME) != null && System.getProperty(Constants.Properties.ZK_PASSWORD) != null) {
- String authenticationString = System.getProperty(Constants.Properties.ZK_USERNAME) + ":" + System.getProperty(Constants.Properties.ZK_PASSWORD);
- builder.authorization("digest", authenticationString.getBytes())
- .aclProvider(new ACLProvider() {
- public List<ACL> getDefaultAcl() {
- return ZooDefs.Ids.CREATOR_ALL_ACL;
- }
-
- public List<ACL> getAclForPath(String path) {
- return ZooDefs.Ids.CREATOR_ALL_ACL;
- }
- });
- }
-
- CuratorFramework client = builder.build();
- logger.debug("CuratorFramework client built successfully with connectString: {}, sessionTimeout: {} and connectionTimeout: {}",
- connectString, sessionTimeoutMs, connectionTimeoutMs);
-
- return client;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/oodt/blob/5fcf2220/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationPublisherTest.java
----------------------------------------------------------------------
diff --git a/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationPublisherTest.java b/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationPublisherTest.java
index 2a3c903..3a0212a 100644
--- a/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationPublisherTest.java
+++ b/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationPublisherTest.java
@@ -95,8 +95,10 @@ public class DistributedConfigurationPublisherTest {
Assert.assertEquals(fileContent, storedContent);
}
-
}
+
+// DistributedConfigurationManager configurationManager = new DistributedConfigurationManager(Constants.Components.FILE_MANAGER);
+// configurationManager.loadConfiguration();
}
@AfterClass
http://git-wip-us.apache.org/repos/asf/oodt/blob/5fcf2220/filemgr/src/main/java/org/apache/oodt/cas/filemgr/system/XmlRpcFileManager.java
----------------------------------------------------------------------
diff --git a/filemgr/src/main/java/org/apache/oodt/cas/filemgr/system/XmlRpcFileManager.java b/filemgr/src/main/java/org/apache/oodt/cas/filemgr/system/XmlRpcFileManager.java
index 9d7d740..261e93c 100644
--- a/filemgr/src/main/java/org/apache/oodt/cas/filemgr/system/XmlRpcFileManager.java
+++ b/filemgr/src/main/java/org/apache/oodt/cas/filemgr/system/XmlRpcFileManager.java
@@ -117,7 +117,7 @@ public class XmlRpcFileManager {
*
* @param port The web server port to run the XML Rpc server on, defaults to 1999.
*/
- public XmlRpcFileManager(int port) throws IOException {
+ public XmlRpcFileManager(int port) throws Exception {
webServerPort = port;
// start up the web server
@@ -1197,7 +1197,7 @@ public class XmlRpcFileManager {
}
- public static void main(String[] args) throws IOException {
+ public static void main(String[] args) throws Exception {
int portNum = -1;
String usage = "FileManager --portNum <port number for xml rpc service>\n";
@@ -1536,8 +1536,8 @@ public class XmlRpcFileManager {
return pMet;
}
- private void loadConfiguration() throws IOException {
- configurationManager.loadProperties();
+ private void loadConfiguration() throws Exception {
+ configurationManager.loadConfiguration();
String metaFactory, dataFactory, transferFactory;
[05/35] oodt git commit: Implemented global configuration publishing
mechanism.
Posted by ma...@apache.org.
Implemented global configuration publishing mechanism.
Project: http://git-wip-us.apache.org/repos/asf/oodt/repo
Commit: http://git-wip-us.apache.org/repos/asf/oodt/commit/4b88f714
Tree: http://git-wip-us.apache.org/repos/asf/oodt/tree/4b88f714
Diff: http://git-wip-us.apache.org/repos/asf/oodt/diff/4b88f714
Branch: refs/heads/feature/zookeeper-config
Commit: 4b88f71497263675bb313462075fd552696ba717
Parents: ac7170b
Author: Imesha Sudasingha <im...@gmail.com>
Authored: Fri Jun 16 15:53:43 2017 +0530
Committer: Imesha Sudasingha <im...@gmail.com>
Committed: Fri Jun 16 15:53:43 2017 +0530
----------------------------------------------------------------------
config/pom.xml | 26 +
.../oodt/config/ConfigurationManager.java | 44 +-
.../config/ConfigurationManagerFactory.java | 35 +-
.../java/org/apache/oodt/config/Constants.java | 58 +-
.../DistributedConfigurationManager.java | 199 +-
.../DistributedConfigurationPublisher.java | 200 +
.../apache/oodt/config/distributed/ZPaths.java | 67 +
.../StandaloneConfigurationManager.java | 60 +-
.../apache/oodt/config/utils/CuratorUtils.java | 80 +
.../DistributedConfigurationPublisherTest.java | 88 +
config/src/test/resources/filemgr.properties | 114 +
config/src/test/resources/log4j.xml | 34 +
config/src/test/resources/mime-types.xml | 4119 ++++++++++++++++++
core/pom.xml | 9 +
.../cas/filemgr/system/XmlRpcFileManager.java | 6 +-
15 files changed, 4940 insertions(+), 199 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/oodt/blob/4b88f714/config/pom.xml
----------------------------------------------------------------------
diff --git a/config/pom.xml b/config/pom.xml
index 64a4b03..0ab4457 100644
--- a/config/pom.xml
+++ b/config/pom.xml
@@ -16,9 +16,35 @@
<description>OODT project for distributed configuration management support</description>
<dependencies>
+
<dependency>
<groupId>org.apache.curator</groupId>
<artifactId>curator-framework</artifactId>
</dependency>
+
+ <dependency>
+ <groupId>commons-io</groupId>
+ <artifactId>commons-io</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.curator</groupId>
+ <artifactId>curator-test</artifactId>
+ </dependency>
</dependencies>
</project>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/oodt/blob/4b88f714/config/src/main/java/org/apache/oodt/config/ConfigurationManager.java
----------------------------------------------------------------------
diff --git a/config/src/main/java/org/apache/oodt/config/ConfigurationManager.java b/config/src/main/java/org/apache/oodt/config/ConfigurationManager.java
index 05b33fd..e5dc82f 100644
--- a/config/src/main/java/org/apache/oodt/config/ConfigurationManager.java
+++ b/config/src/main/java/org/apache/oodt/config/ConfigurationManager.java
@@ -30,28 +30,24 @@ import java.util.List;
*/
public abstract class ConfigurationManager {
- protected String component;
- protected List<String> propertiesFiles;
- protected List<String> otherFiles;
-
- public ConfigurationManager(String component, List<String> propertiesFiles, List<String> otherFiles) {
- this.component = component;
- this.propertiesFiles = propertiesFiles != null ? propertiesFiles : new ArrayList<String>();
- this.otherFiles = otherFiles != null ? otherFiles : new ArrayList<String>();
- }
-
- /**
- * Retrieves a given property from the underlying configuration storage. For example, If we want to get the
- * value of the property org.foo.bar, we have to call this method with <pre>org.foo.bar</pre> as the parameter.
- *
- * @param key Name of the property to be retrieved.
- * @return Value of the requested property | null
- */
- public abstract String getProperty(String key);
-
- public abstract void loadProperties() throws IOException;
-
- public abstract File getPropertiesFile(String filePath) throws FileNotFoundException;
-
- public abstract File getConfigurationFile(String filePath) throws FileNotFoundException;
+ protected String component;
+ protected List<String> propertiesFiles;
+
+ public ConfigurationManager(String component, List<String> propertiesFiles) {
+ this.component = component;
+ this.propertiesFiles = propertiesFiles != null ? propertiesFiles : new ArrayList<String>();
+ }
+
+ /**
+ * Retrieves a given property from the underlying configuration storage. For example, If we want to get the
+ * value of the property org.foo.bar, we have to call this method with <pre>org.foo.bar</pre> as the parameter.
+ *
+ * @param key Name of the property to be retrieved.
+ * @return Value of the requested property | null
+ */
+ public abstract String getProperty(String key);
+
+ public abstract void loadProperties() throws IOException;
+
+ public abstract File getPropertiesFile(String filePath) throws FileNotFoundException;
}
http://git-wip-us.apache.org/repos/asf/oodt/blob/4b88f714/config/src/main/java/org/apache/oodt/config/ConfigurationManagerFactory.java
----------------------------------------------------------------------
diff --git a/config/src/main/java/org/apache/oodt/config/ConfigurationManagerFactory.java b/config/src/main/java/org/apache/oodt/config/ConfigurationManagerFactory.java
index 7c026b7..0fd995d 100644
--- a/config/src/main/java/org/apache/oodt/config/ConfigurationManagerFactory.java
+++ b/config/src/main/java/org/apache/oodt/config/ConfigurationManagerFactory.java
@@ -32,22 +32,23 @@ import static org.apache.oodt.config.Constants.Properties.ENABLE_DISTRIBUTED_CON
*/
public class ConfigurationManagerFactory {
- /** Logger instance for this class */
- private static final Logger logger = Logger.getLogger(ConfigurationManagerFactory.class.getName());
-
- private ConfigurationManagerFactory() {}
-
- /**
- * Returns the {@link ConfigurationManager} to be used by the calling class. Whether to use the standalone version or
- * the distributed version of the configuration manager will be determined by the value of the property
- * <pre>org.apache.oodt.config.zookeeper == true</pre>
- *
- * @return ConfigurationManager instance to used by the corresponding component.
- */
- public static ConfigurationManager getConfigurationManager(String component, List<String> propertiesFiles, List<String> otherFiles) {
- if (System.getProperty(ENABLE_DISTRIBUTED_CONFIGURATION) != null) {
- return new DistributedConfigurationManager(component, propertiesFiles, otherFiles);
+ /** Logger instance for this class */
+ private static final Logger logger = Logger.getLogger(ConfigurationManagerFactory.class.getName());
+
+ private ConfigurationManagerFactory() {
+ }
+
+ /**
+ * Returns the {@link ConfigurationManager} to be used by the calling class. Whether to use the standalone version or
+ * the distributed version of the configuration manager will be determined by the value of the property
+ * <pre>org.apache.oodt.config.zookeeper == true</pre>
+ *
+ * @return ConfigurationManager instance to used by the corresponding component.
+ */
+ public static ConfigurationManager getConfigurationManager(String component, List<String> propertiesFiles) {
+ if (System.getProperty(ENABLE_DISTRIBUTED_CONFIGURATION) != null) {
+ return new DistributedConfigurationManager(component, propertiesFiles);
+ }
+ return new StandaloneConfigurationManager(component, propertiesFiles);
}
- return new StandaloneConfigurationManager(component, propertiesFiles, otherFiles);
- }
}
http://git-wip-us.apache.org/repos/asf/oodt/blob/4b88f714/config/src/main/java/org/apache/oodt/config/Constants.java
----------------------------------------------------------------------
diff --git a/config/src/main/java/org/apache/oodt/config/Constants.java b/config/src/main/java/org/apache/oodt/config/Constants.java
index 03c3e1c..6f74f97 100644
--- a/config/src/main/java/org/apache/oodt/config/Constants.java
+++ b/config/src/main/java/org/apache/oodt/config/Constants.java
@@ -24,33 +24,51 @@ package org.apache.oodt.config;
*/
public class Constants {
- private Constants() {}
+ private Constants() {
+ }
- /** Node name to be used when the configuration manager is the standalone version */
- public static final String STANDALONE_NODE_NAME = "local";
+ /** Node name to be used when the configuration manager is the standalone version */
+ public static final String STANDALONE_NODE_NAME = "local";
- /** Default environment name to be used */
- public static final String DEFAULT_ENVIRONMENT = "default";
+ /** Default environment name to be used */
+ public static final String DEFAULT_ENVIRONMENT = "default";
- public static class Properties {
+ public static class Properties {
+ /** The system property to be set in order to enable distributed configuration management */
+ public static final String ENABLE_DISTRIBUTED_CONFIGURATION = "org.apache.oodt.config.distributed";
- /** The system property to be set in order to enable distributed configuration management */
- public static final String ENABLE_DISTRIBUTED_CONFIGURATION = "org.apache.oodt.config.distributed";
+ /** System property, which will holf the location of the zookeeper properties file */
+ public static final String ZK_PROPERTIES_FILE = "org.apache.oodt.config.zkProperties";
- /** System property, which will holf the location of the zookeeper properties file */
- public static final String ZK_PROPERTIES_FILE = "org.apache.oodt.config.zkProperties";
+ /** Property name to fetch connect string to connect to a zookeeper ensemble. */
+ public static final String ZK_CONNECT_STRING = "org.apache.oodt.config.zk.connectString";
- /** Property name to fetch connect string to connect to a zookeeper ensemble. */
- public static final String ZK_CONNECT_STRING = "org.apache.oodt.config.zk.connectString";
+ public static final String ZK_CONNECTION_TIMEOUT = "org.apache.oodt.config.zk.connectionTimeoutMs";
+ public static final String ZK_SESSION_TIMEOUT = "org.apache.oodt.config.zk.sessionTimeoutMs";
- public static final String ZK_CONNECTION_TIMEOUT = "org.apache.oodt.config.zk.connectionTimeoutMs";
- public static final String ZK_SESSION_TIMEOUT = "org.apache.oodt.config.zk.sessionTimeoutMs";
+ public static final String ZK_RETRY_INITIAL_WAIT = "org.apache.oodt.config.zk.retryInitialWaitMs";
+ public static final String ZK_RETRY_MAX_RETRIES = "org.apache.oodt.config.zk.maxRetries";
+ public static final String ZK_STARTUP_TIMEOUT = "org.apache.oodt.config.zk.startupTimeoutMs";
- public static final String ZK_RETRY_INITIAL_WAIT = "org.apache.oodt.config.zk.retryInitialWaitMs";
- public static final String ZK_RETRY_MAX_RETRIES = "org.apache.oodt.config.zk.maxRetries";
- public static final String ZK_STARTUP_TIMEOUT = "org.apache.oodt.config.zk.startupTimeoutMs";
+ public static final String ZK_USERNAME = "org.apache.oodt.config.zk.username";
+ public static final String ZK_PASSWORD = "org.apache.oodt.config.zk.password";
+ }
- public static final String ZK_USERNAME = "org.apache.oodt.config.zk.username";
- public static final String ZK_PASSWORD = "org.apache.oodt.config.zk.password";
- }
+ public static class Components {
+ public static final String FILE_MANAGER = "filemgr";
+ }
+
+ public static class ZPaths {
+ /** Separator for ZNode paths */
+ public static final String SEPARATOR = "/";
+
+ /** Namespace to be used when creating ZNodes in Zookeeper */
+ public static final String NAMESPACE = "oodt";
+
+ /** Where OODT components related configuration are stored */
+ public static final String COMPONENTS_PATH_NAME = "components";
+
+ /** Where properties files are stored inside each component */
+ public static final String PROPERTIES_PATH_NAME = "properties";
+ }
}
http://git-wip-us.apache.org/repos/asf/oodt/blob/4b88f714/config/src/main/java/org/apache/oodt/config/distributed/DistributedConfigurationManager.java
----------------------------------------------------------------------
diff --git a/config/src/main/java/org/apache/oodt/config/distributed/DistributedConfigurationManager.java b/config/src/main/java/org/apache/oodt/config/distributed/DistributedConfigurationManager.java
index e7a3ed2..f6502bb 100644
--- a/config/src/main/java/org/apache/oodt/config/distributed/DistributedConfigurationManager.java
+++ b/config/src/main/java/org/apache/oodt/config/distributed/DistributedConfigurationManager.java
@@ -24,17 +24,18 @@ import org.apache.curator.retry.ExponentialBackoffRetry;
import org.apache.oodt.config.ConfigurationManager;
import org.apache.oodt.config.Constants;
import org.apache.oodt.config.Constants.Properties;
+import org.apache.oodt.config.utils.CuratorUtils;
import org.apache.zookeeper.ZooDefs;
import org.apache.zookeeper.data.ACL;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import java.io.File;
-import java.io.FileInputStream;
import java.io.IOException;
import java.util.List;
import java.util.concurrent.TimeUnit;
-import java.util.logging.Level;
-import java.util.logging.Logger;
+import static org.apache.oodt.config.Constants.Properties.ZK_CONNECT_STRING;
import static org.apache.oodt.config.Constants.Properties.ZK_PROPERTIES_FILE;
/**
@@ -45,119 +46,117 @@ import static org.apache.oodt.config.Constants.Properties.ZK_PROPERTIES_FILE;
*/
public class DistributedConfigurationManager extends ConfigurationManager {
- private static final Logger logger = Logger.getLogger(DistributedConfigurationManager.class.getName());
+ private static final Logger logger = LoggerFactory.getLogger(DistributedConfigurationManager.class);
- private static String environment = Constants.DEFAULT_ENVIRONMENT;
- private static String nodeName;
+ /** Variables required to connect to zookeeper */
+ private String connectString;
+ private CuratorFramework client;
- /** Variables required to connect to zookeeper */
- private String connectString;
- private CuratorFramework client;
+ public DistributedConfigurationManager(String component, List<String> propertiesFiles) {
+ super(component, propertiesFiles);
- public DistributedConfigurationManager(String component, List<String> propertiesFiles, List<String> otherFiles) {
- super(component, propertiesFiles, otherFiles);
- loadZookeeperProperties();
- startZookeeper();
- }
+ if (System.getProperty(ZK_PROPERTIES_FILE) == null && System.getProperty(Constants.Properties.ZK_CONNECT_STRING) == null) {
+ throw new IllegalArgumentException("Zookeeper requires system properties " + ZK_PROPERTIES_FILE + " or " + ZK_CONNECT_STRING + " to be set");
+ }
- /**
- * Loads zookeeper related properties from ZK_PROPERTIES_FILE. WIll throw a {@link RuntimeException} if that file is
- * not available or couldn't be opened.
- */
- private void loadZookeeperProperties() {
- if (System.getProperty(ZK_PROPERTIES_FILE) != null) {
- throw new IllegalArgumentException("DistributedCOnfigurationManager requires " + ZK_PROPERTIES_FILE + " to be set");
- }
+ if (System.getProperty(ZK_PROPERTIES_FILE) != null) {
+ try {
+ CuratorUtils.loadZookeeperProperties();
+ } catch (IOException e) {
+ logger.error("Error occurred when loading properties from properties file");
+ }
+ }
- try {
- System.getProperties().load(new FileInputStream(System.getProperty(ZK_PROPERTIES_FILE)));
- } catch (IOException e) {
- logger.log(Level.SEVERE, "Unable to read ZK_PROPERTIES_FILE " + System.getProperty(ZK_PROPERTIES_FILE));
- throw new IllegalStateException("Couldn't load Zookeeper configuration");
- }
+ if (System.getProperty(Constants.Properties.ZK_CONNECT_STRING) == null) {
+ throw new IllegalArgumentException("Zookeeper requires a proper connect string to connect to zookeeper ensemble");
+ }
+
+ connectString = System.getProperty(Constants.Properties.ZK_CONNECT_STRING);
+ logger.info("Using zookeeper connect string : {}", connectString);
- if (System.getProperty(Properties.ZK_CONNECT_STRING) == null) {
- throw new IllegalArgumentException("Zookeeper requires a proper connect string to connect to zookeeper ensemble");
+ startZookeeper();
}
- connectString = System.getProperty(Properties.ZK_CONNECT_STRING);
- logger.log(Level.CONFIG, String.format("Using zookeeper connect string : %s", connectString));
- }
-
- /**
- * Creates a {@link CuratorFramework} instance and start it. This method will wait a maximum amount of
- * {@link Properties#ZK_STARTUP_TIMEOUT} milli-seconds until the client connects to the zookeeper ensemble.
- */
- private void startZookeeper() {
- int connectionTimeoutMs = Integer.parseInt(System.getProperty(Properties.ZK_CONNECTION_TIMEOUT, "15"));
- int sessionTimeoutMs = Integer.parseInt(System.getProperty(Properties.ZK_CONNECTION_TIMEOUT, "60"));
- int retryInitialWaitMs = Integer.parseInt(System.getProperty(Properties.ZK_CONNECTION_TIMEOUT, "1000"));
- int maxRetryCount = Integer.parseInt(System.getProperty(Properties.ZK_CONNECTION_TIMEOUT, "3"));
- int startupTimeOutMs = Integer.parseInt(System.getProperty(Properties.ZK_STARTUP_TIMEOUT, "30000"));
-
- CuratorFrameworkFactory.Builder builder = CuratorFrameworkFactory.builder()
- .connectString(connectString)
- .retryPolicy(new ExponentialBackoffRetry(retryInitialWaitMs, maxRetryCount))
- .connectionTimeoutMs(connectionTimeoutMs)
- .sessionTimeoutMs(sessionTimeoutMs);
-
- /*
- * If authorization information is available, those will be added to the client. NOTE: These auth info are
- * for access control, therefore no authentication will happen when the client is being started. These
- * info will only be required whenever a client is accessing an already create ZNode. For another client of
- * another node to make use of a ZNode created by this node, it should also provide the same auth info.
+ /**
+ * Creates a {@link CuratorFramework} instance and start it. This method will wait a maximum amount of
+ * {@link Properties#ZK_STARTUP_TIMEOUT} milli-seconds until the client connects to the zookeeper ensemble.
*/
- if (System.getProperty(Properties.ZK_USERNAME) != null && System.getProperty(Properties.ZK_PASSWORD) != null) {
- String authenticationString = System.getProperty(Properties.ZK_USERNAME) + ":" + System.getProperty(Properties.ZK_PASSWORD);
- builder.authorization("digest", authenticationString.getBytes())
- .aclProvider(new ACLProvider() {
- public List<ACL> getDefaultAcl() {
- return ZooDefs.Ids.CREATOR_ALL_ACL;
- }
-
- public List<ACL> getAclForPath(String path) {
- return ZooDefs.Ids.CREATOR_ALL_ACL;
- }
- });
+ private void startZookeeper() {
+ int connectionTimeoutMs = Integer.parseInt(System.getProperty(Properties.ZK_CONNECTION_TIMEOUT, "15"));
+ int sessionTimeoutMs = Integer.parseInt(System.getProperty(Properties.ZK_CONNECTION_TIMEOUT, "60"));
+ int retryInitialWaitMs = Integer.parseInt(System.getProperty(Properties.ZK_CONNECTION_TIMEOUT, "1000"));
+ int maxRetryCount = Integer.parseInt(System.getProperty(Properties.ZK_CONNECTION_TIMEOUT, "3"));
+ int startupTimeOutMs = Integer.parseInt(System.getProperty(Properties.ZK_STARTUP_TIMEOUT, "30000"));
+
+ CuratorFrameworkFactory.Builder builder = CuratorFrameworkFactory.builder()
+ .connectString(connectString)
+ .retryPolicy(new ExponentialBackoffRetry(retryInitialWaitMs, maxRetryCount))
+ .connectionTimeoutMs(connectionTimeoutMs)
+ .sessionTimeoutMs(sessionTimeoutMs);
+
+ /*
+ * If authorization information is available, those will be added to the client. NOTE: These auth info are
+ * for access control, therefore no authentication will happen when the client is being started. These
+ * info will only be required whenever a client is accessing an already create ZNode. For another client of
+ * another node to make use of a ZNode created by this node, it should also provide the same auth info.
+ */
+ if (System.getProperty(Properties.ZK_USERNAME) != null && System.getProperty(Properties.ZK_PASSWORD) != null) {
+ String authenticationString = System.getProperty(Properties.ZK_USERNAME) + ":" + System.getProperty(Properties.ZK_PASSWORD);
+ builder.authorization("digest", authenticationString.getBytes())
+ .aclProvider(new ACLProvider() {
+ public List<ACL> getDefaultAcl() {
+ return ZooDefs.Ids.CREATOR_ALL_ACL;
+ }
+
+ public List<ACL> getAclForPath(String path) {
+ return ZooDefs.Ids.CREATOR_ALL_ACL;
+ }
+ });
+ }
+
+ client = builder.build();
+ logger.debug("CuratorFramework client built successfully with connectString: {}, sessionTimeout: {} and connectionTimeout: {}",
+ connectString, sessionTimeoutMs, connectionTimeoutMs);
+
+ client.start();
+ logger.info("Curator framework start operation invoked");
+
+ try {
+ logger.info("Waiting to connect to zookeeper, startupTimeout : {}", startupTimeOutMs);
+ client.blockUntilConnected(startupTimeOutMs, TimeUnit.MILLISECONDS);
+ } catch (InterruptedException ex) {
+ logger.error("Interrupted while waiting to connect zookeeper (connectString : {}) : {}", ex, connectString);
+ }
+
+ if (!client.getZookeeperClient().isConnected()) {
+ throw new IllegalStateException("Could not connect to ZooKeeper : " + connectString);
+ }
+
+ logger.info("CuratorFramework client started successfully");
}
- client = builder.build();
- logger.log(Level.CONFIG, String.format("CuratorFramework client built successfully with " +
- "connectString: %s, sessionTimeout: %d and connectionTimeout: %d", connectString, sessionTimeoutMs, connectionTimeoutMs));
-
- client.start();
- logger.log(Level.CONFIG, "Curator framework start operation invoked");
-
- try {
- logger.info(String.format("Waiting to connect to zookeeper, startupTimeout : %d", startupTimeOutMs));
- client.blockUntilConnected(startupTimeOutMs, TimeUnit.MILLISECONDS);
- } catch (InterruptedException ex) {
- logger.severe(String.format("Interrupted while waiting to connect zookeeper (connectString : %s) : %s", ex.getMessage(), connectString));
+ @Override
+ public String getProperty(String key) {
+ // Todo Implement using curator
+ return null;
}
- if (!client.getZookeeperClient().isConnected()) {
- throw new IllegalStateException("Could not connect to ZooKeeper : " + connectString);
+ @Override
+ public void loadProperties() {
+ // todo Implement the logic with Curator
}
- logger.info("CuratorFramework client started successfully");
- }
-
- @Override
- public String getProperty(String key) {
- // Todo Implement using curator
- return null;
- }
+ public File getPropertiesFile(String filePath) {
+ return null;
+ }
- @Override
- public void loadProperties() {
- // todo Implement the logic with Curator
- }
+ public File getConfigurationFile(String filePath) {
+ return null;
+ }
- public File getPropertiesFile(String filePath) {
- return null;
- }
+ public void publishConfiguration() {
+ for (String propertyFile : propertiesFiles) {
- public File getConfigurationFile(String filePath) {
- return null;
- }
+ }
+ }
}
http://git-wip-us.apache.org/repos/asf/oodt/blob/4b88f714/config/src/main/java/org/apache/oodt/config/distributed/DistributedConfigurationPublisher.java
----------------------------------------------------------------------
diff --git a/config/src/main/java/org/apache/oodt/config/distributed/DistributedConfigurationPublisher.java b/config/src/main/java/org/apache/oodt/config/distributed/DistributedConfigurationPublisher.java
new file mode 100644
index 0000000..38aea56
--- /dev/null
+++ b/config/src/main/java/org/apache/oodt/config/distributed/DistributedConfigurationPublisher.java
@@ -0,0 +1,200 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.oodt.config.distributed;
+
+import org.apache.commons.io.FileUtils;
+import org.apache.curator.framework.CuratorFramework;
+import org.apache.curator.framework.CuratorFrameworkFactory;
+import org.apache.curator.framework.api.ACLProvider;
+import org.apache.curator.retry.ExponentialBackoffRetry;
+import org.apache.oodt.config.Constants;
+import org.apache.oodt.config.utils.CuratorUtils;
+import org.apache.zookeeper.ZooDefs;
+import org.apache.zookeeper.data.ACL;
+import org.apache.zookeeper.data.Stat;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.URISyntaxException;
+import java.net.URL;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.TimeUnit;
+
+import static org.apache.oodt.config.Constants.Properties.ZK_CONNECT_STRING;
+import static org.apache.oodt.config.Constants.Properties.ZK_PROPERTIES_FILE;
+
+/**
+ * The class to publish configuration to Zookeeper
+ *
+ * @author Imesha Sudasingha
+ */
+public class DistributedConfigurationPublisher {
+
+ private static final Logger logger = LoggerFactory.getLogger(DistributedConfigurationPublisher.class);
+
+ private Map<String, String> propertiesFiles;
+ private String connectString;
+ private CuratorFramework client;
+ private ZPaths zPaths;
+
+ public DistributedConfigurationPublisher(String component, Map<String, String> propertiesFiles) {
+ this.propertiesFiles = propertiesFiles;
+ this.zPaths = new ZPaths(component);
+
+ if (System.getProperty(ZK_PROPERTIES_FILE) == null && System.getProperty(Constants.Properties.ZK_CONNECT_STRING) == null) {
+ throw new IllegalArgumentException("Zookeeper requires system properties " + ZK_PROPERTIES_FILE + " or " + ZK_CONNECT_STRING + " to be set");
+ }
+
+ if (System.getProperty(ZK_PROPERTIES_FILE) != null) {
+ try {
+ CuratorUtils.loadZookeeperProperties();
+ } catch (IOException e) {
+ logger.error("Error occurred when loading properties from properties file");
+ }
+ }
+
+ if (System.getProperty(Constants.Properties.ZK_CONNECT_STRING) == null) {
+ throw new IllegalArgumentException("Zookeeper requires a proper connect string to connect to zookeeper ensemble");
+ }
+
+ connectString = System.getProperty(Constants.Properties.ZK_CONNECT_STRING);
+ logger.info("Using zookeeper connect string : {}", connectString);
+
+ startZookeeper();
+ }
+
+ /**
+ * Creates a {@link CuratorFramework} instance and start it. This method will wait a maximum amount of
+ * {@link Constants.Properties#ZK_STARTUP_TIMEOUT} milli-seconds until the client connects to the zookeeper ensemble.
+ */
+ private void startZookeeper() {
+ int connectionTimeoutMs = Integer.parseInt(System.getProperty(Constants.Properties.ZK_CONNECTION_TIMEOUT, "15000"));
+ int sessionTimeoutMs = Integer.parseInt(System.getProperty(Constants.Properties.ZK_CONNECTION_TIMEOUT, "60000"));
+ int retryInitialWaitMs = Integer.parseInt(System.getProperty(Constants.Properties.ZK_CONNECTION_TIMEOUT, "1000"));
+ int maxRetryCount = Integer.parseInt(System.getProperty(Constants.Properties.ZK_CONNECTION_TIMEOUT, "3"));
+ int startupTimeOutMs = Integer.parseInt(System.getProperty(Constants.Properties.ZK_STARTUP_TIMEOUT, "30000"));
+
+ CuratorFrameworkFactory.Builder builder = CuratorFrameworkFactory.builder()
+ .connectString(connectString)
+ .retryPolicy(new ExponentialBackoffRetry(retryInitialWaitMs, maxRetryCount))
+ .connectionTimeoutMs(connectionTimeoutMs)
+ .sessionTimeoutMs(sessionTimeoutMs);
+
+ /*
+ * If authorization information is available, those will be added to the client. NOTE: These auth info are
+ * for access control, therefore no authentication will happen when the client is being started. These
+ * info will only be required whenever a client is accessing an already create ZNode. For another client of
+ * another node to make use of a ZNode created by this node, it should also provide the same auth info.
+ */
+ if (System.getProperty(Constants.Properties.ZK_USERNAME) != null && System.getProperty(Constants.Properties.ZK_PASSWORD) != null) {
+ String authenticationString = System.getProperty(Constants.Properties.ZK_USERNAME) + ":" + System.getProperty(Constants.Properties.ZK_PASSWORD);
+ builder.authorization("digest", authenticationString.getBytes())
+ .aclProvider(new ACLProvider() {
+ public List<ACL> getDefaultAcl() {
+ return ZooDefs.Ids.CREATOR_ALL_ACL;
+ }
+
+ public List<ACL> getAclForPath(String path) {
+ return ZooDefs.Ids.CREATOR_ALL_ACL;
+ }
+ });
+ }
+
+ client = builder.build();
+ logger.debug("CuratorFramework client built successfully with connectString: {}, sessionTimeout: {} and connectionTimeout: {}",
+ connectString, sessionTimeoutMs, connectionTimeoutMs);
+
+ client.start();
+ logger.info("Curator framework start operation invoked");
+
+ try {
+ logger.info("Waiting to connect to zookeeper, startupTimeout : {}", startupTimeOutMs);
+ client.blockUntilConnected(startupTimeOutMs, TimeUnit.MILLISECONDS);
+ } catch (InterruptedException ex) {
+ logger.error("Interrupted while waiting to connect zookeeper (connectString : {}) : {}", ex, connectString);
+ }
+
+ if (!client.getZookeeperClient().isConnected()) {
+ throw new IllegalStateException("Could not connect to ZooKeeper : " + connectString);
+ }
+
+ logger.info("CuratorFramework client started successfully");
+ }
+
+ public void publishConfiguration() throws Exception {
+ for (Map.Entry<String, String> entry : propertiesFiles.entrySet()) {
+ logger.info("Publishing configuration {} - {}", entry.getKey(), entry.getValue());
+ URL resource = Thread.currentThread().getContextClassLoader().getResource(entry.getKey());
+
+ String content;
+ try {
+ content = FileUtils.readFileToString(new File(resource.toURI()));
+ } catch (IOException | URISyntaxException e) {
+ logger.error("Unable to read file : {}", entry.getKey(), e);
+ continue;
+ }
+
+ String zNodePath = zPaths.getPropertiesZNodePath(entry.getValue());
+ if (client.checkExists().forPath(zNodePath) != null) {
+ byte[] bytes = client.getData().forPath(zNodePath);
+ String existingData = new String(bytes);
+ if (content.equals(existingData)) {
+ logger.info("{} already exists in zookeeper at {}", entry.getKey(), entry.getValue());
+ continue;
+ } else {
+ Stat stat = client.setData().forPath(zNodePath, content.getBytes());
+ if (stat != null) {
+ logger.info("Published {} to {}", entry.getKey(), entry.getValue());
+ }
+ }
+ } else {
+ client.create().creatingParentContainersIfNeeded().forPath(zNodePath, content.getBytes());
+ }
+ }
+ }
+
+ public static void main(String[] args) {
+ if (args.length < 2) {
+ logger.warn("Component name and at least one properties file needs to be given configuration publishing");
+ throw new IllegalArgumentException("Requires at least two arguments, component and one properties file");
+ }
+
+ logger.debug("Starting publishing configuration. Component : {}", args[0]);
+
+ String[] fileMapping = Arrays.copyOfRange(args, 1, args.length);
+ Map<String, String> propertiesFiles = new HashMap<>();
+ for (String entry : fileMapping) {
+ String[] strings = entry.split("=");
+ propertiesFiles.put(strings[0], strings[1]);
+ }
+
+ DistributedConfigurationPublisher distributedConfigurationPublisher = new DistributedConfigurationPublisher(args[0], propertiesFiles);
+ try {
+ distributedConfigurationPublisher.publishConfiguration();
+ } catch (Exception e) {
+ logger.error("Error occurred when publishing configuration to zookeeper", e);
+ }
+
+ logger.info("Published configuration successfully");
+ }
+}
http://git-wip-us.apache.org/repos/asf/oodt/blob/4b88f714/config/src/main/java/org/apache/oodt/config/distributed/ZPaths.java
----------------------------------------------------------------------
diff --git a/config/src/main/java/org/apache/oodt/config/distributed/ZPaths.java b/config/src/main/java/org/apache/oodt/config/distributed/ZPaths.java
new file mode 100644
index 0000000..0e1d10c
--- /dev/null
+++ b/config/src/main/java/org/apache/oodt/config/distributed/ZPaths.java
@@ -0,0 +1,67 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.oodt.config.distributed;
+
+import java.util.List;
+
+import static org.apache.oodt.config.Constants.ZPaths.*;
+
+/**
+ * Class responsible for handling all the Zookeeper ZNode paths related to configuration
+ *
+ * @author Imesha Sudasingha
+ */
+public class ZPaths {
+
+ /** ZNode for distinct components. /components/${component} */
+ public String componentZNodePath;
+ public String componentZNodeRoot;
+
+ /** ZNode path for properties files. /components/${component}/properties */
+ public String propertiesZNodePath;
+ public String propertiesZNodeRoot;
+
+ /**
+ * Creates the ZNode path structure accordingly to the <pre>componentName</pre> and <pre>propertiesFileNames</pre> given.
+ *
+ * @param componentName Name of the OODT component
+ */
+ public ZPaths(String componentName) {
+ if (componentName == null) {
+ throw new IllegalArgumentException("Component name cannot be null");
+ }
+
+ componentZNodePath = SEPARATOR + COMPONENTS_PATH_NAME + SEPARATOR + componentName;
+ componentZNodeRoot = componentZNodePath + SEPARATOR;
+
+ propertiesZNodePath = componentZNodeRoot + PROPERTIES_PATH_NAME;
+ propertiesZNodeRoot = propertiesZNodePath + SEPARATOR;
+ }
+
+ public String getComponentZNodePath() {
+ return componentZNodePath;
+ }
+
+ public String getPropertiesZNodePath() {
+ return propertiesZNodePath;
+ }
+
+ public String getPropertiesZNodePath(String subPath) {
+ return propertiesZNodeRoot + (subPath.startsWith(SEPARATOR) ? subPath.substring(1) : subPath);
+ }
+}
http://git-wip-us.apache.org/repos/asf/oodt/blob/4b88f714/config/src/main/java/org/apache/oodt/config/standalone/StandaloneConfigurationManager.java
----------------------------------------------------------------------
diff --git a/config/src/main/java/org/apache/oodt/config/standalone/StandaloneConfigurationManager.java b/config/src/main/java/org/apache/oodt/config/standalone/StandaloneConfigurationManager.java
index 0cf0c78..23cf0a2 100644
--- a/config/src/main/java/org/apache/oodt/config/standalone/StandaloneConfigurationManager.java
+++ b/config/src/main/java/org/apache/oodt/config/standalone/StandaloneConfigurationManager.java
@@ -18,13 +18,14 @@
package org.apache.oodt.config.standalone;
import org.apache.oodt.config.ConfigurationManager;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.List;
-import java.util.logging.Logger;
/**
* {@link ConfigurationManager} implementation to be used with standalone configuration management.
@@ -33,46 +34,35 @@ import java.util.logging.Logger;
*/
public class StandaloneConfigurationManager extends ConfigurationManager {
- /** Logger instance for logging */
- private static final Logger logger = Logger.getLogger(StandaloneConfigurationManager.class.getName());
+ /** Logger instance for logging */
+ private static final Logger logger = LoggerFactory.getLogger(StandaloneConfigurationManager.class);
- public StandaloneConfigurationManager(String component, List<String> propertiesFiles, List<String> otherFiles) {
- super(component, propertiesFiles, otherFiles);
- }
-
- /** {@inheritDoc} */
- @Override
- public String getProperty(String key) {
- return System.getProperty(key);
- }
+ public StandaloneConfigurationManager(String component, List<String> propertiesFiles) {
+ super(component, propertiesFiles);
+ }
- /** {@inheritDoc} */
- @Override
- public void loadProperties() throws IOException {
- for (String file : propertiesFiles) {
- System.getProperties().load(new FileInputStream(new File(file)));
+ /** {@inheritDoc} */
+ @Override
+ public String getProperty(String key) {
+ return System.getProperty(key);
}
- }
- /** {@inheritDoc} */
- @Override
- public File getPropertiesFile(String filePath) throws FileNotFoundException {
- File file = new File(filePath);
- if (!propertiesFiles.contains(filePath) || !file.exists()) {
- throw new FileNotFoundException("Couldn't find properties file located at: " + filePath);
+ /** {@inheritDoc} */
+ @Override
+ public void loadProperties() throws IOException {
+ for (String file : propertiesFiles) {
+ System.getProperties().load(new FileInputStream(new File(file)));
+ }
}
- return file;
- }
+ /** {@inheritDoc} */
+ @Override
+ public File getPropertiesFile(String filePath) throws FileNotFoundException {
+ File file = new File(filePath);
+ if (!propertiesFiles.contains(filePath) || !file.exists()) {
+ throw new FileNotFoundException("Couldn't find properties file located at: " + filePath);
+ }
- /** {@inheritDoc} */
- @Override
- public File getConfigurationFile(String filePath) throws FileNotFoundException {
- File file = new File(filePath);
- if (!otherFiles.contains(filePath) || !file.exists()) {
- throw new FileNotFoundException("Couldn't find properties file located at: " + filePath);
+ return file;
}
-
- return file;
- }
}
http://git-wip-us.apache.org/repos/asf/oodt/blob/4b88f714/config/src/main/java/org/apache/oodt/config/utils/CuratorUtils.java
----------------------------------------------------------------------
diff --git a/config/src/main/java/org/apache/oodt/config/utils/CuratorUtils.java b/config/src/main/java/org/apache/oodt/config/utils/CuratorUtils.java
new file mode 100644
index 0000000..d064080
--- /dev/null
+++ b/config/src/main/java/org/apache/oodt/config/utils/CuratorUtils.java
@@ -0,0 +1,80 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.oodt.config.utils;
+
+import org.apache.curator.framework.CuratorFramework;
+import org.apache.zookeeper.CreateMode;
+import org.apache.zookeeper.KeeperException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.FileInputStream;
+import java.io.IOException;
+
+import static org.apache.oodt.config.Constants.Properties.ZK_PROPERTIES_FILE;
+
+public class CuratorUtils {
+
+ private static final Logger logger = LoggerFactory.getLogger(CuratorUtils.class);
+
+ private CuratorUtils() {
+ }
+
+ /**
+ * Loads zookeeper related properties from ZK_PROPERTIES_FILE.
+ *
+ * @throws IOException if properties file could not be read
+ */
+ public static void loadZookeeperProperties() throws IOException {
+ System.getProperties().load(new FileInputStream(System.getProperty(ZK_PROPERTIES_FILE)));
+ }
+
+ /**
+ * Create a ZNode in the given path if not exists, with the given data
+ *
+ * @param curatorFramework {@link CuratorFramework} client
+ * @param zNodePath the path in which the ZNode to be created
+ */
+ public static void createZNodeIfNotExists(CuratorFramework curatorFramework, String zNodePath, CreateMode mode, byte[] content) throws Exception {
+ try {
+ String path = curatorFramework.create().creatingParentsIfNeeded().withMode(mode).forPath(zNodePath, content);
+ logger.debug("Created ZNode at path : {}", path);
+ } catch (Exception e) {
+ if (e instanceof KeeperException && KeeperException.Code.NODEEXISTS.equals(((KeeperException) e).code())) {
+ // This is a desired behaviour, trying to create an already existing znode.
+ logger.debug("Attempting to create an already existing ZNode at path {} : {}", zNodePath, e);
+ } else {
+ logger.error("Error when creating ZNode for path {} : {}", zNodePath, e.getMessage());
+ throw e;
+ }
+ }
+ }
+
+ /**
+ * Gets the <code>String</code> value of the data in the given znode path
+ *
+ * @param client {@link CuratorFramework} client
+ * @param path ZNode path to be checked
+ * @return ZNode's data as a string or null
+ * @throws Exception zookeeper errors and etc
+ */
+ public static String getIfExists(CuratorFramework client, String path) throws Exception {
+ return client.checkExists().forPath(path) != null ? new String(client.getData().forPath(path)) : null;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/oodt/blob/4b88f714/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationPublisherTest.java
----------------------------------------------------------------------
diff --git a/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationPublisherTest.java b/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationPublisherTest.java
new file mode 100644
index 0000000..665f785
--- /dev/null
+++ b/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationPublisherTest.java
@@ -0,0 +1,88 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.oodt.config.distributed;
+
+import org.apache.commons.io.FileUtils;
+import org.apache.curator.framework.CuratorFramework;
+import org.apache.curator.framework.CuratorFrameworkFactory;
+import org.apache.curator.retry.RetryNTimes;
+import org.apache.curator.test.TestingServer;
+import org.junit.AfterClass;
+import org.junit.Assert;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.URI;
+import java.util.Arrays;
+
+import static org.apache.oodt.config.Constants.Components.FILE_MANAGER;
+import static org.apache.oodt.config.Constants.Properties.ZK_CONNECT_STRING;
+
+public class DistributedConfigurationPublisherTest {
+
+ private static TestingServer zookeeper;
+ private static CuratorFramework client;
+
+ @BeforeClass
+ public static void setUp() throws Exception {
+ zookeeper = new TestingServer();
+ zookeeper.start();
+
+ client = CuratorFrameworkFactory.builder()
+ .connectString(zookeeper.getConnectString())
+ .retryPolicy(new RetryNTimes(3, 1000))
+ .build();
+ client.start();
+
+ System.setProperty(ZK_CONNECT_STRING, zookeeper.getConnectString());
+ }
+
+ @Test
+ public void publishConfiguration() throws Exception {
+ String args[] = new String[]{
+ FILE_MANAGER,
+ "filemgr.properties=/etc/filemgr.properties",
+ "mime-types.xml=/etc/mime-types.xml"
+ };
+ DistributedConfigurationPublisher.main(args);
+
+ String[] fileMappings = Arrays.copyOfRange(args, 1, args.length);
+ ZPaths zPaths = new ZPaths(FILE_MANAGER);
+ for (String mapping : fileMappings) {
+ String[] parts = mapping.split("=");
+ String zNodePath = zPaths.getPropertiesZNodePath(parts[1]);
+
+ Assert.assertNotNull(client.checkExists().forPath(zNodePath));
+
+ String storedContent = new String(client.getData().forPath(zNodePath));
+
+ URI file = Thread.currentThread().getContextClassLoader().getResource(parts[0]).toURI();
+ String fileContent = FileUtils.readFileToString(new File(file));
+
+ Assert.assertEquals(fileContent, storedContent);
+ }
+ }
+
+ @AfterClass
+ public static void tearDown() throws IOException {
+ client.close();
+ zookeeper.stop();
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/oodt/blob/4b88f714/config/src/test/resources/filemgr.properties
----------------------------------------------------------------------
diff --git a/config/src/test/resources/filemgr.properties b/config/src/test/resources/filemgr.properties
new file mode 100644
index 0000000..4d8d957
--- /dev/null
+++ b/config/src/test/resources/filemgr.properties
@@ -0,0 +1,114 @@
+#
+# 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.
+#
+
+# Configuration properties for the File Manager
+
+# repository factory
+filemgr.repository.factory=org.apache.oodt.cas.filemgr.repository.XMLRepositoryManagerFactory
+
+# Lucene catalog factory
+filemgr.catalog.factory=org.apache.oodt.cas.filemgr.catalog.LuceneCatalogFactory
+
+# data transfer factory
+filemgr.datatransfer.factory=org.apache.oodt.cas.filemgr.datatransfer.LocalDataTransferFactory
+
+# validation layer factory
+filemgr.validationLayer.factory=org.apache.oodt.cas.filemgr.validation.XMLValidationLayerFactory
+
+# xml rpc client configuration
+org.apache.oodt.cas.filemgr.system.xmlrpc.connectionTimeout.minutes=20
+org.apache.oodt.cas.filemgr.system.xmlrpc.requestTimeout.minutes=60
+#org.apache.oodt.cas.filemgr.system.xmlrpc.connection.retries=0
+#org.apache.oodt.cas.filemgr.system.xmlrpc.connection.retry.interval.seconds=3
+
+# mapped data source catalog configuration
+#org.apache.oodt.cas.filemgr.catalog.mappeddatasource.mapFile=/path/to/ops.catalog.typemap.properties
+
+# lucene catalog configuration
+org.apache.oodt.cas.filemgr.catalog.lucene.idxPath=[OODT_HOME]/data/catalog
+org.apache.oodt.cas.filemgr.catalog.lucene.pageSize=20
+org.apache.oodt.cas.filemgr.catalog.lucene.commitLockTimeout.seconds=60
+org.apache.oodt.cas.filemgr.catalog.lucene.writeLockTimeout.seconds=60
+org.apache.oodt.cas.filemgr.catalog.lucene.mergeFactor=20
+
+# XML repository manager configuration
+org.apache.oodt.cas.filemgr.repositorymgr.dirs=file:[FILEMGR_HOME]/policy/oodt
+
+# XML validation layer configuration
+org.apache.oodt.cas.filemgr.validation.dirs=file:[FILEMGR_HOME]/policy/oodt
+
+# remote data transfer configuration
+org.apache.oodt.cas.filemgr.datatransfer.remote.chunkSize=1024
+
+# location of Mime-Type repository
+org.apache.oodt.cas.filemgr.mime.type.repository=[FILEMGR_HOME]/etc/mime-types.xml
+
+
+############ data source configuration ##################################
+#
+# These 3 blocks of config properties can be used to setup a catalog,
+# repository manager, and validation layer based on a RDBMS such as
+# Oracle, MySQL, PostgreSQL, or any others that support a jdbc connection.
+# Just un-comment the following blocks of properties and configure as
+# needed.
+#
+#########################################################################
+
+# datasource catalog config
+#org.apache.oodt.cas.filemgr.catalog.datasource.jdbc.url=some_jdbc_url
+#org.apache.oodt.cas.filemgr.catalog.datasource.jdbc.user=user
+#org.apache.oodt.cas.filemgr.catalog.datasource.jdbc.pass=pass
+#org.apache.oodt.cas.filemgr.catalog.datasource.jdbc.driver=driver.class.name
+#org.apache.oodt.cas.filemgr.catalog.datasource.quoteFields=false
+#org.apache.oodt.cas.filemgr.catalog.datasource.pageSize=20
+#org.apache.oodt.cas.filemgr.catalog.datasource.cacheUpdateMinutes=5
+
+# data source repository manager configuration
+#org.apache.oodt.cas.filemgr.repositorymgr.datasource.jdbc.url=some_jdbc_url
+#org.apache.oodt.cas.filemgr.repositorymgr.datasource.jdbc.user=user
+#org.apache.oodt.cas.filemgr.repositorymgr.datasource.jdbc.pass=pass
+#org.apache.oodt.cas.filemgr.repositorymgr.datasource.jdbc.driver=driver.class.name
+
+# data source validation layer configuration
+#org.apache.oodt.cas.filemgr.validation.datasource.jdbc.url=some_jdbc_url
+#org.apache.oodt.cas.filemgr.validation.datasource.jdbc.user=user
+#org.apache.oodt.cas.filemgr.validation.datasource.jdbc.pass=pass
+#org.apache.oodt.cas.filemgr.validation.datasource.jdbc.driver=driver.class.name
+#org.apache.oodt.cas.filemgr.validation.datasource.quoteFields=false
+
+
+# tells the file manager system layer to include product instance metadata
+# NOTE: here are the expected field mappings
+#
+# product.getProductId() -> ProductId
+# product.getProductName() -> ProductName
+# product.getProductStructure() -> ProductStructure
+# product.getTransferStatus() -> ProductTransferStatus
+# product.getRootRef() -> ProductRootReference
+
+# for the references returned by product.getProductReferences() the following
+# metadata fields will be added (order will be maintained, such that data store
+# ref at index 0 will map to orig ref at index 0, etc.)
+#
+# ProductDataStoreReferences (list of all data store references:
+# note already translated into path, not URI)
+# ProductOrigReferences (list of all orig references:
+# note already translated into path, not URI)
+# ProductMimeType (list of all references' mime-types)
+# ProductFileSize (list of all references' file sizes)
+
+org.apache.oodt.cas.filemgr.metadata.expandProduct=false
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/oodt/blob/4b88f714/config/src/test/resources/log4j.xml
----------------------------------------------------------------------
diff --git a/config/src/test/resources/log4j.xml b/config/src/test/resources/log4j.xml
new file mode 100644
index 0000000..8f49451
--- /dev/null
+++ b/config/src/test/resources/log4j.xml
@@ -0,0 +1,34 @@
+<?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.
+ -->
+
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
+ <appender name="console" class="org.apache.log4j.ConsoleAppender">
+ <param name="Target" value="System.out"/>
+ <layout class="org.apache.log4j.PatternLayout">
+ <param name="ConversionPattern" value="%-5p %c{1} - %m%n"/>
+ </layout>
+ </appender>
+
+ <root>
+ <priority value="INFO"/>
+ <appender-ref ref="console"/>
+ </root>
+
+</log4j:configuration>
\ No newline at end of file
[23/35] oodt git commit: Update README.md
Posted by ma...@apache.org.
Update README.md
- fix formatting
Project: http://git-wip-us.apache.org/repos/asf/oodt/repo
Commit: http://git-wip-us.apache.org/repos/asf/oodt/commit/1b42caca
Tree: http://git-wip-us.apache.org/repos/asf/oodt/tree/1b42caca
Diff: http://git-wip-us.apache.org/repos/asf/oodt/diff/1b42caca
Branch: refs/heads/feature/zookeeper-config
Commit: 1b42cacacfc96e96b69f0c28d7eefcb89ae85856
Parents: c3957c3
Author: Chris Mattmann <ch...@gmail.com>
Authored: Mon Jul 10 14:24:55 2017 -0400
Committer: GitHub <no...@github.com>
Committed: Mon Jul 10 14:24:55 2017 -0400
----------------------------------------------------------------------
README.md | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/oodt/blob/1b42caca/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index de11028..3f199d0 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,4 @@
-=============================================================
- Welcome to Apache OODT <http://oodt.apache.org/>
-=============================================================
+# Welcome to Apache OODT <http://oodt.apache.org/>
OODT is a grid middleware framework used on a number of successful projects at
NASA's Jet Propulsion Laboratory/California Institute of Technology, and many
[03/35] oodt git commit: Implemented global configuration publishing
mechanism.
Posted by ma...@apache.org.
http://git-wip-us.apache.org/repos/asf/oodt/blob/4b88f714/core/pom.xml
----------------------------------------------------------------------
diff --git a/core/pom.xml b/core/pom.xml
index e55d46c..3b39db0 100644
--- a/core/pom.xml
+++ b/core/pom.xml
@@ -247,11 +247,20 @@ the License.
<artifactId>saxon-dom</artifactId>
<version>8.7</version>
</dependency>
+
<dependency>
<groupId>org.apache.curator</groupId>
<artifactId>curator-framework</artifactId>
<version>3.3.0</version>
</dependency>
+
+ <dependency>
+ <groupId>org.apache.curator</groupId>
+ <artifactId>curator-test</artifactId>
+ <version>3.3.0</version>
+ <scope>test</scope>
+ </dependency>
+
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-frontend-jaxrs</artifactId>
http://git-wip-us.apache.org/repos/asf/oodt/blob/4b88f714/filemgr/src/main/java/org/apache/oodt/cas/filemgr/system/XmlRpcFileManager.java
----------------------------------------------------------------------
diff --git a/filemgr/src/main/java/org/apache/oodt/cas/filemgr/system/XmlRpcFileManager.java b/filemgr/src/main/java/org/apache/oodt/cas/filemgr/system/XmlRpcFileManager.java
index 996ac16..d43369a 100644
--- a/filemgr/src/main/java/org/apache/oodt/cas/filemgr/system/XmlRpcFileManager.java
+++ b/filemgr/src/main/java/org/apache/oodt/cas/filemgr/system/XmlRpcFileManager.java
@@ -108,7 +108,7 @@ public class XmlRpcFileManager {
/* whether or not to expand a product instance into met */
private boolean expandProductMet;
- /** Configuration Manager instance which will handle the configiration aspect in distributed/standalone manner */
+ /** Configuration Manager instance which will handle the configuration aspect in distributed/standalone manner */
private ConfigurationManager configurationManager;
/**
@@ -132,9 +132,9 @@ public class XmlRpcFileManager {
List<String> propertiesFiles = new ArrayList<String>();
propertiesFiles.add(System.getProperty("org.apache.oodt.cas.filemgr.properties"));
- configurationManager = ConfigurationManagerFactory.getConfigurationManager(componentName, propertiesFiles,null);
+ configurationManager = ConfigurationManagerFactory.getConfigurationManager(componentName, propertiesFiles);
} else {
- configurationManager = ConfigurationManagerFactory.getConfigurationManager(componentName,null,null);
+ configurationManager = ConfigurationManagerFactory.getConfigurationManager(componentName,null);
}
this.loadConfiguration();
[30/35] oodt git commit: Merge branch 'feature/zookeeper-config' of
https://github.com/IMS94/oodt into feature/zookeeper-config
Posted by ma...@apache.org.
Merge branch 'feature/zookeeper-config' of https://github.com/IMS94/oodt into feature/zookeeper-config
Project: http://git-wip-us.apache.org/repos/asf/oodt/repo
Commit: http://git-wip-us.apache.org/repos/asf/oodt/commit/59d7f3c0
Tree: http://git-wip-us.apache.org/repos/asf/oodt/tree/59d7f3c0
Diff: http://git-wip-us.apache.org/repos/asf/oodt/diff/59d7f3c0
Branch: refs/heads/feature/zookeeper-config
Commit: 59d7f3c012dc1ff9ba9d3caf2ba04791e461a38e
Parents: 811b98d 2fbd08f
Author: Chris Mattmann <ma...@apache.org>
Authored: Fri Jul 14 09:23:13 2017 -0700
Committer: Chris Mattmann <ma...@apache.org>
Committed: Fri Jul 14 09:23:13 2017 -0700
----------------------------------------------------------------------
.../DistributedConfigurationManager.java | 15 ++----
.../config/distributed/utils/FilePathUtils.java | 53 ++++++++++++++++++++
config/src/main/resources/etc/log4j.xml | 2 +-
.../DistributedConfigurationManagerTest.java | 18 +++++--
4 files changed, 71 insertions(+), 17 deletions(-)
----------------------------------------------------------------------
[08/35] oodt git commit: Added zip packaging for distributed
configuration publisher
Posted by ma...@apache.org.
http://git-wip-us.apache.org/repos/asf/oodt/blob/27a28daa/core/pom.xml
----------------------------------------------------------------------
diff --git a/core/pom.xml b/core/pom.xml
index 3b39db0..f895a4b 100644
--- a/core/pom.xml
+++ b/core/pom.xml
@@ -262,6 +262,12 @@ the License.
</dependency>
<dependency>
+ <groupId>args4j</groupId>
+ <artifactId>args4j</artifactId>
+ <version>2.33</version>
+ </dependency>
+
+ <dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-frontend-jaxrs</artifactId>
<version>2.6.0</version>
[17/35] oodt git commit: Created test cases for distributed
configuration manager and publisher
Posted by ma...@apache.org.
Created test cases for distributed configuration manager and publisher
Project: http://git-wip-us.apache.org/repos/asf/oodt/repo
Commit: http://git-wip-us.apache.org/repos/asf/oodt/commit/a973c531
Tree: http://git-wip-us.apache.org/repos/asf/oodt/tree/a973c531
Diff: http://git-wip-us.apache.org/repos/asf/oodt/diff/a973c531
Branch: refs/heads/feature/zookeeper-config
Commit: a973c531fee5bf37ebf4448334470c75943af1ec
Parents: 27a28da
Author: Imesha Sudasingha <im...@gmail.com>
Authored: Mon Jul 3 15:55:22 2017 +0530
Committer: Imesha Sudasingha <im...@gmail.com>
Committed: Mon Jul 3 15:55:22 2017 +0530
----------------------------------------------------------------------
.../java/org/apache/oodt/config/Constants.java | 1 +
.../DistributedConfigurationManager.java | 2 +-
.../config/distributed/cli/CmdLineOptions.java | 4 +-
.../cli/DistributedConfigurationPublisher.java | 48 +-
.../config/distributed/utils/CuratorUtils.java | 42 +-
.../src/main/resources/etc/config-publisher.xml | 9 +-
config/src/main/resources/etc/log4j.xml | 6 +
.../main/resources/examples/filemgr.properties | 114 -
.../examples/filemgr/cmd-line-actions.xml | 123 +
.../examples/filemgr/cmd-line-options.xml | 1175 +++++
.../examples/filemgr/filemgr.properties | 114 +
.../resources/examples/filemgr/mime-types.xml | 4119 ++++++++++++++++++
.../examples/filemgr/oodt/elements.xml | 77 +
.../filemgr/oodt/product-type-element-map.xml | 33 +
.../examples/filemgr/oodt/product-types.xml | 53 +
.../src/main/resources/examples/mime-types.xml | 4119 ------------------
.../examples/resmgr/cmd-line-actions.xml | 92 +
.../examples/resmgr/cmd-line-options.xml | 601 +++
.../resources/examples/resmgr/jobs/exJob.xml | 30 +
.../examples/resmgr/jobs/exLongJob.xml | 30 +
.../examples/resmgr/logging.properties | 67 +
.../examples/resmgr/node-to-queue-mapping.xml | 26 +
.../main/resources/examples/resmgr/nodes.xml | 23 +
.../examples/resmgr/resource.properties | 61 +
.../config/distributed/AbstractTestCase.java | 49 +
.../DistributedConfigurationManagerTest.java | 122 +
.../DistributedConfigurationPublisherTest.java | 101 +-
.../src/test/resources/etc/config-publisher.xml | 19 +-
28 files changed, 6976 insertions(+), 4284 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/oodt/blob/a973c531/config/src/main/java/org/apache/oodt/config/Constants.java
----------------------------------------------------------------------
diff --git a/config/src/main/java/org/apache/oodt/config/Constants.java b/config/src/main/java/org/apache/oodt/config/Constants.java
index d6969fe..8c6f624 100644
--- a/config/src/main/java/org/apache/oodt/config/Constants.java
+++ b/config/src/main/java/org/apache/oodt/config/Constants.java
@@ -63,6 +63,7 @@ public class Constants {
public static class Components {
public static final String FILE_MANAGER = "filemgr";
+ public static final String RESOURCE_MANAGER = "resmgr";
}
public static class ZPaths {
http://git-wip-us.apache.org/repos/asf/oodt/blob/a973c531/config/src/main/java/org/apache/oodt/config/distributed/DistributedConfigurationManager.java
----------------------------------------------------------------------
diff --git a/config/src/main/java/org/apache/oodt/config/distributed/DistributedConfigurationManager.java b/config/src/main/java/org/apache/oodt/config/distributed/DistributedConfigurationManager.java
index 1a3f390..67589fe 100644
--- a/config/src/main/java/org/apache/oodt/config/distributed/DistributedConfigurationManager.java
+++ b/config/src/main/java/org/apache/oodt/config/distributed/DistributedConfigurationManager.java
@@ -85,7 +85,7 @@ public class DistributedConfigurationManager extends ConfigurationManager {
* {@link Properties#ZK_STARTUP_TIMEOUT} milli-seconds until the client connects to the zookeeper ensemble.
*/
private void startZookeeper() {
- client = CuratorUtils.getCuratorFrameworkClient(connectString, logger);
+ client = CuratorUtils.newCuratorFrameworkClient(connectString, logger);
client.start();
logger.info("Curator framework start operation invoked");
http://git-wip-us.apache.org/repos/asf/oodt/blob/a973c531/config/src/main/java/org/apache/oodt/config/distributed/cli/CmdLineOptions.java
----------------------------------------------------------------------
diff --git a/config/src/main/java/org/apache/oodt/config/distributed/cli/CmdLineOptions.java b/config/src/main/java/org/apache/oodt/config/distributed/cli/CmdLineOptions.java
index afa6350..b6972d5 100644
--- a/config/src/main/java/org/apache/oodt/config/distributed/cli/CmdLineOptions.java
+++ b/config/src/main/java/org/apache/oodt/config/distributed/cli/CmdLineOptions.java
@@ -31,10 +31,10 @@ public class CmdLineOptions {
@Option(name = "-publish", usage = "Publishes configuration specified in the spring config file to zookeeper. " +
"Any current similar config in zookeeper will be overwritten. If not specified, command will be assumed as a publish")
- private boolean publish = true;
+ private boolean publish = false;
@Option(name = "-verify", usage = "Verifies the content in the local files and the published ones. Results will be printed.")
- private boolean verify = true;
+ private boolean verify = false;
@Option(name = "-clear", usage = "Unpublish any configuration which has been published earlier using the same spring config file")
private boolean clear = false;
http://git-wip-us.apache.org/repos/asf/oodt/blob/a973c531/config/src/main/java/org/apache/oodt/config/distributed/cli/DistributedConfigurationPublisher.java
----------------------------------------------------------------------
diff --git a/config/src/main/java/org/apache/oodt/config/distributed/cli/DistributedConfigurationPublisher.java b/config/src/main/java/org/apache/oodt/config/distributed/cli/DistributedConfigurationPublisher.java
index 03cdfc7..8cdc6c6 100644
--- a/config/src/main/java/org/apache/oodt/config/distributed/cli/DistributedConfigurationPublisher.java
+++ b/config/src/main/java/org/apache/oodt/config/distributed/cli/DistributedConfigurationPublisher.java
@@ -87,7 +87,7 @@ public class DistributedConfigurationPublisher {
* {@link Constants.Properties#ZK_STARTUP_TIMEOUT} milli-seconds until the client connects to the zookeeper ensemble.
*/
private void startZookeeper() {
- client = CuratorUtils.getCuratorFrameworkClient(connectString, logger);
+ client = CuratorUtils.newCuratorFrameworkClient(connectString, logger);
client.start();
logger.info("Curator framework start operation invoked");
@@ -107,6 +107,17 @@ public class DistributedConfigurationPublisher {
logger.info("CuratorFramework client started successfully");
}
+ public void destroy() {
+ logger.debug("Destroying configuration publisher");
+ try {
+ client.close();
+ } catch (Exception e) {
+ logger.error("Error occurred when trying to close Curator client : {}", e);
+ }
+
+ logger.info("Configuration publisher destroyed");
+ }
+
/**
* Publishes the configuration files specified to zookeeper. If an exception is thrown while configuration being
* published, no further publishing attempts will be carried on. Error will be reported to user.
@@ -138,6 +149,19 @@ public class DistributedConfigurationPublisher {
}
}
+ /**
+ * Removes all the nodes from zookeeper where the configuration corresponding to component {@link #componentName} is
+ * stored
+ *
+ * @throws Exception zookeeper errors
+ */
+ public void clearConfiguration() throws Exception {
+ logger.debug("Clearing configuration from zookeeper");
+ CuratorUtils.deleteChildNodes(client, zNodePaths.getPropertiesZNodePath());
+ CuratorUtils.deleteChildNodes(client, zNodePaths.getConfigurationZNodePath());
+ logger.info("Configuration cleared!");
+ }
+
private void publishConfiguration(Map<String, String> fileMapping, boolean isProperties) throws Exception {
for (Map.Entry<String, String> entry : fileMapping.entrySet()) {
String filePath = entry.getKey();
@@ -150,7 +174,7 @@ public class DistributedConfigurationPublisher {
if (client.checkExists().forPath(zNodePath) != null) {
byte[] bytes = client.getData().forPath(zNodePath);
String existingData = new String(bytes);
- if (content.equals(existingData)) {
+ if (existingData.equals(content)) {
logger.warn("{} already exists in zookeeper at {}", filePath, relativeZNodePath);
} else {
Stat stat = client.setData().forPath(zNodePath, content.getBytes());
@@ -266,22 +290,28 @@ public class DistributedConfigurationPublisher {
System.out.println(String.format("Publishing configuration for : %s", publisher.getComponentName()));
publisher.publishConfiguration();
System.out.println(String.format("Published configuration for : %s", publisher.getComponentName()));
- System.out.printf("\n");
+ System.out.println();
}
if (cmdLineOptions.isVerify()) {
System.out.println(String.format("Verifying configuration for : %s", publisher.getComponentName()));
- publisher.verifyPublishedConfiguration();
- System.out.println(String.format("Verified configuration for : %s", publisher.getComponentName()));
- System.out.printf("\n");
+ if (publisher.verifyPublishedConfiguration()) {
+ System.out.println("OK... Configuration verified");
+ System.out.println(String.format("Verified configuration for : %s", publisher.getComponentName()));
+ } else {
+ System.err.println("ERROR... Published configuration doesn't match the local files. Please check above logs");
+ }
+ System.out.println();
}
if (cmdLineOptions.isClear()) {
System.out.println(String.format("Clearing configuration for : %s", publisher.getComponentName()));
- // TODO: 7/2/17 Implement configuration removal
+ publisher.clearConfiguration();
System.out.println(String.format("Cleared configuration for : %s", publisher.getComponentName()));
- System.out.printf("\n");
+ System.out.println();
}
+
+ publisher.destroy();
}
} catch (BeansException e) {
logger.error("Error occurred when obtaining configuration publisher beans", e);
@@ -291,7 +321,7 @@ public class DistributedConfigurationPublisher {
throw e;
}
- logger.info("Published configuration successfully");
+ logger.info("Exiting CLI ...");
}
public String getComponentName() {
http://git-wip-us.apache.org/repos/asf/oodt/blob/a973c531/config/src/main/java/org/apache/oodt/config/distributed/utils/CuratorUtils.java
----------------------------------------------------------------------
diff --git a/config/src/main/java/org/apache/oodt/config/distributed/utils/CuratorUtils.java b/config/src/main/java/org/apache/oodt/config/distributed/utils/CuratorUtils.java
index 1b10ef0..e591750 100644
--- a/config/src/main/java/org/apache/oodt/config/distributed/utils/CuratorUtils.java
+++ b/config/src/main/java/org/apache/oodt/config/distributed/utils/CuratorUtils.java
@@ -87,13 +87,24 @@ public class CuratorUtils {
}
/**
+ * Builds a {@link CuratorFramework} instance with given connect string. Will use the {@link CuratorUtils#logger} for
+ * logging.
+ *
+ * @param connectString zookeeper connect string
+ * @return CuratorFramework instance created
+ */
+ public static CuratorFramework newCuratorFrameworkClient(String connectString) {
+ return newCuratorFrameworkClient(connectString, logger);
+ }
+
+ /**
* Builds a {@link CuratorFramework} instance using the given connectString.
*
* @param connectString connection string to connect to zookeeper
* @param logger {@link Logger} instance of the calling class
* @return Newly created CuratorFramework instance.
*/
- public static CuratorFramework getCuratorFrameworkClient(String connectString, Logger logger) {
+ public static CuratorFramework newCuratorFrameworkClient(String connectString, Logger logger) {
int connectionTimeoutMs = Integer.parseInt(System.getProperty(Constants.Properties.ZK_CONNECTION_TIMEOUT, "15000"));
int sessionTimeoutMs = Integer.parseInt(System.getProperty(Constants.Properties.ZK_CONNECTION_TIMEOUT, "60000"));
int retryInitialWaitMs = Integer.parseInt(System.getProperty(Constants.Properties.ZK_CONNECTION_TIMEOUT, "1000"));
@@ -133,6 +144,14 @@ public class CuratorUtils {
return client;
}
+ /**
+ * Get the leaf nodes in a given sub tree starting from a given ZNode.
+ *
+ * @param client {@link CuratorFramework} instance
+ * @param parentZNodePath root ZNode of the sub tree
+ * @return List of leaf nodes
+ * @throws Exception zookeeper exceptions
+ */
public static List<String> getLeafZNodePaths(CuratorFramework client, String parentZNodePath) throws Exception {
List<String> leafZNodePaths = new ArrayList<>();
@@ -149,4 +168,25 @@ public class CuratorUtils {
return leafZNodePaths;
}
+
+ /**
+ * Delete all the child ZNodes under a given ZNode.
+ *
+ * @param client {@link CuratorFramework} instance
+ * @param parentZNodePath ZNode path of which all the children are to be deleted
+ * @throws Exception
+ */
+ public static void deleteChildNodes(CuratorFramework client, String parentZNodePath) throws Exception {
+ if (client.checkExists().forPath(parentZNodePath) != null) {
+ List<String> children = client.getChildren().forPath(parentZNodePath);
+ for (String child : children) {
+ String zNodePath = parentZNodePath + SEPARATOR + child;
+ logger.debug("Deleting child ZNode '{}' at {}", child, zNodePath);
+ client.delete().deletingChildrenIfNeeded().forPath(zNodePath);
+ }
+ logger.debug("Deleted children ZNodes of {}", parentZNodePath);
+ } else {
+ logger.warn("ZNode - {} doesn't exist. Nothing to delete");
+ }
+ }
}
http://git-wip-us.apache.org/repos/asf/oodt/blob/a973c531/config/src/main/resources/etc/config-publisher.xml
----------------------------------------------------------------------
diff --git a/config/src/main/resources/etc/config-publisher.xml b/config/src/main/resources/etc/config-publisher.xml
index cc1261e..015d1f2 100644
--- a/config/src/main/resources/etc/config-publisher.xml
+++ b/config/src/main/resources/etc/config-publisher.xml
@@ -23,12 +23,17 @@
<constructor-arg value="filemgr"/>
<property name="propertiesFiles">
<map key-type="java.lang.String" value-type="java.lang.String">
- <entry key="../examples/filemgr.properties" value="/etc/filemgr.properties"/>
+ <entry key="../examples/filemgr/filemgr.properties" value="/etc/filemgr.properties"/>
</map>
</property>
<property name="configFiles">
<map key-type="java.lang.String" value-type="java.lang.String">
- <entry key="../examples/mime-types.xml" value="/etc/mime-types.xml"/>
+ <entry key="../examples/filemgr/mime-types.xml" value="/etc/mime-types.xml"/>
+ <entry key="../examples/filemgr/cmd-line-actions.xml" value="/policy/cmd-line-actions.xml"/>
+ <entry key="../examples/filemgr/cmd-line-options.xml" value="/policy/cmd-line-options.xml"/>
+ <entry key="../examples/filemgr/oodt/elements.xml" value="/policy/oodt/elements.xml"/>
+ <entry key="../examples/filemgr/oodt/product-types.xml" value="/policy/oodt/product-types.xml"/>
+ <entry key="../examples/filemgr/oodt/product-type-element-map.xml" value="/policy/oodt/product-type-element-map.xml"/>
</map>
</property>
</bean>
http://git-wip-us.apache.org/repos/asf/oodt/blob/a973c531/config/src/main/resources/etc/log4j.xml
----------------------------------------------------------------------
diff --git a/config/src/main/resources/etc/log4j.xml b/config/src/main/resources/etc/log4j.xml
index 8f49451..0421de2 100644
--- a/config/src/main/resources/etc/log4j.xml
+++ b/config/src/main/resources/etc/log4j.xml
@@ -31,4 +31,10 @@
<appender-ref ref="console"/>
</root>
+ <logger name="org.apache.zookeeper">
+ <level value="ERROR"/>
+ </logger>
+ <logger name="org.apache.curator">
+ <level value="ERROR"/>
+ </logger>
</log4j:configuration>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/oodt/blob/a973c531/config/src/main/resources/examples/filemgr.properties
----------------------------------------------------------------------
diff --git a/config/src/main/resources/examples/filemgr.properties b/config/src/main/resources/examples/filemgr.properties
deleted file mode 100644
index 4d8d957..0000000
--- a/config/src/main/resources/examples/filemgr.properties
+++ /dev/null
@@ -1,114 +0,0 @@
-#
-# 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.
-#
-
-# Configuration properties for the File Manager
-
-# repository factory
-filemgr.repository.factory=org.apache.oodt.cas.filemgr.repository.XMLRepositoryManagerFactory
-
-# Lucene catalog factory
-filemgr.catalog.factory=org.apache.oodt.cas.filemgr.catalog.LuceneCatalogFactory
-
-# data transfer factory
-filemgr.datatransfer.factory=org.apache.oodt.cas.filemgr.datatransfer.LocalDataTransferFactory
-
-# validation layer factory
-filemgr.validationLayer.factory=org.apache.oodt.cas.filemgr.validation.XMLValidationLayerFactory
-
-# xml rpc client configuration
-org.apache.oodt.cas.filemgr.system.xmlrpc.connectionTimeout.minutes=20
-org.apache.oodt.cas.filemgr.system.xmlrpc.requestTimeout.minutes=60
-#org.apache.oodt.cas.filemgr.system.xmlrpc.connection.retries=0
-#org.apache.oodt.cas.filemgr.system.xmlrpc.connection.retry.interval.seconds=3
-
-# mapped data source catalog configuration
-#org.apache.oodt.cas.filemgr.catalog.mappeddatasource.mapFile=/path/to/ops.catalog.typemap.properties
-
-# lucene catalog configuration
-org.apache.oodt.cas.filemgr.catalog.lucene.idxPath=[OODT_HOME]/data/catalog
-org.apache.oodt.cas.filemgr.catalog.lucene.pageSize=20
-org.apache.oodt.cas.filemgr.catalog.lucene.commitLockTimeout.seconds=60
-org.apache.oodt.cas.filemgr.catalog.lucene.writeLockTimeout.seconds=60
-org.apache.oodt.cas.filemgr.catalog.lucene.mergeFactor=20
-
-# XML repository manager configuration
-org.apache.oodt.cas.filemgr.repositorymgr.dirs=file:[FILEMGR_HOME]/policy/oodt
-
-# XML validation layer configuration
-org.apache.oodt.cas.filemgr.validation.dirs=file:[FILEMGR_HOME]/policy/oodt
-
-# remote data transfer configuration
-org.apache.oodt.cas.filemgr.datatransfer.remote.chunkSize=1024
-
-# location of Mime-Type repository
-org.apache.oodt.cas.filemgr.mime.type.repository=[FILEMGR_HOME]/etc/mime-types.xml
-
-
-############ data source configuration ##################################
-#
-# These 3 blocks of config properties can be used to setup a catalog,
-# repository manager, and validation layer based on a RDBMS such as
-# Oracle, MySQL, PostgreSQL, or any others that support a jdbc connection.
-# Just un-comment the following blocks of properties and configure as
-# needed.
-#
-#########################################################################
-
-# datasource catalog config
-#org.apache.oodt.cas.filemgr.catalog.datasource.jdbc.url=some_jdbc_url
-#org.apache.oodt.cas.filemgr.catalog.datasource.jdbc.user=user
-#org.apache.oodt.cas.filemgr.catalog.datasource.jdbc.pass=pass
-#org.apache.oodt.cas.filemgr.catalog.datasource.jdbc.driver=driver.class.name
-#org.apache.oodt.cas.filemgr.catalog.datasource.quoteFields=false
-#org.apache.oodt.cas.filemgr.catalog.datasource.pageSize=20
-#org.apache.oodt.cas.filemgr.catalog.datasource.cacheUpdateMinutes=5
-
-# data source repository manager configuration
-#org.apache.oodt.cas.filemgr.repositorymgr.datasource.jdbc.url=some_jdbc_url
-#org.apache.oodt.cas.filemgr.repositorymgr.datasource.jdbc.user=user
-#org.apache.oodt.cas.filemgr.repositorymgr.datasource.jdbc.pass=pass
-#org.apache.oodt.cas.filemgr.repositorymgr.datasource.jdbc.driver=driver.class.name
-
-# data source validation layer configuration
-#org.apache.oodt.cas.filemgr.validation.datasource.jdbc.url=some_jdbc_url
-#org.apache.oodt.cas.filemgr.validation.datasource.jdbc.user=user
-#org.apache.oodt.cas.filemgr.validation.datasource.jdbc.pass=pass
-#org.apache.oodt.cas.filemgr.validation.datasource.jdbc.driver=driver.class.name
-#org.apache.oodt.cas.filemgr.validation.datasource.quoteFields=false
-
-
-# tells the file manager system layer to include product instance metadata
-# NOTE: here are the expected field mappings
-#
-# product.getProductId() -> ProductId
-# product.getProductName() -> ProductName
-# product.getProductStructure() -> ProductStructure
-# product.getTransferStatus() -> ProductTransferStatus
-# product.getRootRef() -> ProductRootReference
-
-# for the references returned by product.getProductReferences() the following
-# metadata fields will be added (order will be maintained, such that data store
-# ref at index 0 will map to orig ref at index 0, etc.)
-#
-# ProductDataStoreReferences (list of all data store references:
-# note already translated into path, not URI)
-# ProductOrigReferences (list of all orig references:
-# note already translated into path, not URI)
-# ProductMimeType (list of all references' mime-types)
-# ProductFileSize (list of all references' file sizes)
-
-org.apache.oodt.cas.filemgr.metadata.expandProduct=false
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/oodt/blob/a973c531/config/src/main/resources/examples/filemgr/cmd-line-actions.xml
----------------------------------------------------------------------
diff --git a/config/src/main/resources/examples/filemgr/cmd-line-actions.xml b/config/src/main/resources/examples/filemgr/cmd-line-actions.xml
new file mode 100755
index 0000000..cf66c9d
--- /dev/null
+++ b/config/src/main/resources/examples/filemgr/cmd-line-actions.xml
@@ -0,0 +1,123 @@
+<?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.
+
+ Author: bfoster (Brian Foster)
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
+
+ <bean id="addProductType" class="org.apache.oodt.cas.filemgr.cli.action.AddProductTypeCliAction">
+ <property name="description" value="Adds a ProductType to list of supported ProductTypes" />
+ </bean>
+ <bean id="deleteProductByName" class="org.apache.oodt.cas.filemgr.cli.action.DeleteProductByNameCliAction">
+ <property name="description" value="Delete Product by name" />
+ </bean>
+ <bean id="deleteProductById" class="org.apache.oodt.cas.filemgr.cli.action.DeleteProductByIdCliAction">
+ <property name="description" value="Delete Product by ID" />
+ </bean>
+ <bean id="dumpMetadata" class="org.apache.oodt.cas.filemgr.cli.action.DumpMetadataCliAction">
+ <property name="description" value="Dumps Product Metadata out to XML" />
+ </bean>
+ <bean id="getCurrentTransfer" class="org.apache.oodt.cas.filemgr.cli.action.GetCurrentTransferCliAction">
+ <property name="description" value="Gets the status of the current Product file transfer" />
+ </bean>
+ <bean id="getCurrentTransfers" class="org.apache.oodt.cas.filemgr.cli.action.GetCurrentTransfersCliAction">
+ <property name="description" value="Gets the status of the current Product file transfers" />
+ </bean>
+ <bean id="getFilePercentTransferred" class="org.apache.oodt.cas.filemgr.cli.action.GetFilePercentTransferredCliAction">
+ <property name="description" value="Gets the percent amount transferred of given file" />
+ </bean>
+ <bean id="getFirstPage" class="org.apache.oodt.cas.filemgr.cli.action.GetFirstPageCliAction">
+ <property name="description" value="Gets first page of Products of given ProductType" />
+ </bean>
+ <bean id="getLastPage" class="org.apache.oodt.cas.filemgr.cli.action.GetLastPageCliAction">
+ <property name="description" value="Gets last page of Products of given ProductType" />
+ </bean>
+ <bean id="getNextPage" class="org.apache.oodt.cas.filemgr.cli.action.GetNextPageCliAction">
+ <property name="description" value="Gets next page of Products of given ProductType" />
+ </bean>
+ <bean id="getNumProducts" class="org.apache.oodt.cas.filemgr.cli.action.GetNumProductsCliAction">
+ <property name="description" value="Gets number of Products ingested for a given ProductType" />
+ </bean>
+ <bean id="getPrevPage" class="org.apache.oodt.cas.filemgr.cli.action.GetPrevPageCliAction">
+ <property name="description" value="Gets prev page of Products of given ProductType" />
+ </bean>
+ <bean id="getProductByName" class="org.apache.oodt.cas.filemgr.cli.action.GetProductByNameCliAction">
+ <property name="description" value="Get Product info by name" />
+ </bean>
+ <bean id="getProductById" class="org.apache.oodt.cas.filemgr.cli.action.GetProductByIdCliAction">
+ <property name="description" value="Gets Product info by ID" />
+ </bean>
+ <bean id="getProductPercentTransferred" class="org.apache.oodt.cas.filemgr.cli.action.GetProductPercentTransferredCliAction">
+ <property name="description" value="Gets percent amount transferred of a Products data files" />
+ </bean>
+ <bean id="getProductTypeByName" class="org.apache.oodt.cas.filemgr.cli.action.GetProductTypeByNameCliAction">
+ <property name="description" value="Gets a ProductType by its name" />
+ </bean>
+ <bean id="hasProduct" class="org.apache.oodt.cas.filemgr.cli.action.HasProductCliAction">
+ <property name="description" value="Checks if Product with given name has been ingested" />
+ </bean>
+ <bean id="ingestProduct" class="org.apache.oodt.cas.filemgr.cli.action.IngestProductCliAction">
+ <property name="description" value="Ingests a Product" />
+ </bean>
+ <bean id="luceneQuery" class="org.apache.oodt.cas.filemgr.cli.action.LuceneQueryCliAction">
+ <property name="description" value="Queries by parsing an Lucene-like query into a FileManager Query" />
+ </bean>
+ <bean id="retrieveFilesById" class="org.apache.oodt.cas.filemgr.cli.action.RetrieveFilesCliAction">
+ <property name="description" value="Retrieve a Product's files by Product ID" />
+ </bean>
+ <bean id="retrieveFilesByName" class="org.apache.oodt.cas.filemgr.cli.action.RetrieveFilesCliAction">
+ <property name="description" value="Retrieve a Product's files by Product name" />
+ </bean>
+ <bean id="sqlQuery" class="org.apache.oodt.cas.filemgr.cli.action.SqlQueryCliAction">
+ <property name="description" value="Queries by parsing an SQL-like query into a FileManager Query" />
+ <property name="detailedDescription">
+ <value>
+ This supports sending queries to the FileManager in form of
+ SELECT [Elements] FROM [ProductTypes] WHERE [where-clause], where:
+ - [Elements]: is a comma separated list of Element names; may also be * which
+ represents all Elements
+ - [ProductTypes]: is a comma separated list of ProductType names; may also
+ be * which represents all ProductTypes
+ - [where-clause]: is an optional Element name filter supporting the following:
+ * AND and OR boolean operators
+ * () grouping of queries
+ * element-name == 'element-value'
+ * element-name < 'element-value'
+ * element-name > 'element-value'
+ * element-name <= 'element-value'
+ * element-name >= 'element-value'"
+
+ An additional post-query FilterAlgor can also be specified where you specify
+ which Metadata fields which should be used as each Product's StartDateTime,
+ EndDateTime, and Priority values
+ </value>
+ </property>
+ <property name="examples">
+ <value>
+ (Assume you have a ProductType, GenericFile, which supports the
+ Elements: Filename, NominalDate, Group, and DataVersion)
+ $ ./filemgr-client -u http://localhost:9000 -op -sql
+ -q "SELECT Filename FROM GenericFile WHERE (NominalDate == '2011-20-10' OR
+ NominalDate == '2011-20-11') AND Group == 'Test' AND DataVersion > '1.0'"
+ (Returns all Products in FileManager -- use with care)
+ $ ./filemgr-client -u http://localhost:9000 -op -sql -q "SELECT * FROM *"
+ </value>
+ </property>
+ </bean>
+</beans>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/oodt/blob/a973c531/config/src/main/resources/examples/filemgr/cmd-line-options.xml
----------------------------------------------------------------------
diff --git a/config/src/main/resources/examples/filemgr/cmd-line-options.xml b/config/src/main/resources/examples/filemgr/cmd-line-options.xml
new file mode 100755
index 0000000..227def2
--- /dev/null
+++ b/config/src/main/resources/examples/filemgr/cmd-line-options.xml
@@ -0,0 +1,1175 @@
+<?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.
+
+ Author: bfoster (Brian Foster)
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
+
+ <bean id="url" class="org.apache.oodt.cas.cli.option.AdvancedCmdLineOption">
+ <property name="shortOption" value="u" />
+ <property name="longOption" value="url" />
+ <property name="description" value="File Manager URL" />
+ <property name="hasArgs" value="true" />
+ <property name="argsDescription" value="url" />
+ <property name="required" value="true" />
+ <property name="handler">
+ <bean
+ class="org.apache.oodt.cas.cli.option.handler.SetJavaPropertiesHandler">
+ <property name="propertyNames">
+ <list>
+ <value>org.apache.oodt.cas.filemgr.url</value>
+ </list>
+ </property>
+ </bean>
+ </property>
+ </bean>
+
+ <bean id="operation" class="org.apache.oodt.cas.cli.option.GroupCmdLineOption">
+ <property name="shortOption" value="op" />
+ <property name="longOption" value="operation" />
+ <property name="description"
+ value="Declare that you wish to present an operation" />
+ <property name="hasArgs" value="false" />
+ <property name="required" value="true" />
+ <property name="subOptions">
+ <list>
+ <bean class="org.apache.oodt.cas.cli.option.GroupSubOption"
+ p:option-ref="addProductType" p:required="false" />
+ <bean class="org.apache.oodt.cas.cli.option.GroupSubOption"
+ p:option-ref="deleteProductById" p:required="false" />
+ <bean class="org.apache.oodt.cas.cli.option.GroupSubOption"
+ p:option-ref="deleteProductByName" p:required="false" />
+ <bean class="org.apache.oodt.cas.cli.option.GroupSubOption"
+ p:option-ref="ingestProduct" p:required="false" />
+ <bean class="org.apache.oodt.cas.cli.option.GroupSubOption"
+ p:option-ref="hasProduct" p:required="false" />
+ <bean class="org.apache.oodt.cas.cli.option.GroupSubOption"
+ p:option-ref="getProductTypeByName" p:required="false" />
+ <bean class="org.apache.oodt.cas.cli.option.GroupSubOption"
+ p:option-ref="getNumProducts" p:required="false" />
+ <bean class="org.apache.oodt.cas.cli.option.GroupSubOption"
+ p:option-ref="getFirstPage" p:required="false" />
+ <bean class="org.apache.oodt.cas.cli.option.GroupSubOption"
+ p:option-ref="getNextPage" p:required="false" />
+ <bean class="org.apache.oodt.cas.cli.option.GroupSubOption"
+ p:option-ref="getPrevPage" p:required="false" />
+ <bean class="org.apache.oodt.cas.cli.option.GroupSubOption"
+ p:option-ref="getLastPage" p:required="false" />
+ <bean class="org.apache.oodt.cas.cli.option.GroupSubOption"
+ p:option-ref="getCurrentTransfer" p:required="false" />
+ <bean class="org.apache.oodt.cas.cli.option.GroupSubOption"
+ p:option-ref="getCurrentTransfers" p:required="false" />
+ <bean class="org.apache.oodt.cas.cli.option.GroupSubOption"
+ p:option-ref="getProductById" p:required="false" />
+ <bean class="org.apache.oodt.cas.cli.option.GroupSubOption"
+ p:option-ref="getProductByName" p:required="false" />
+ <bean class="org.apache.oodt.cas.cli.option.GroupSubOption"
+ p:option-ref="getProductPctTransferred" p:required="false" />
+ <bean class="org.apache.oodt.cas.cli.option.GroupSubOption"
+ p:option-ref="getFilePctTransferred" p:required="false" />
+ <bean class="org.apache.oodt.cas.cli.option.GroupSubOption"
+ p:option-ref="sqlQuery" p:required="false" />
+ <bean class="org.apache.oodt.cas.cli.option.GroupSubOption"
+ p:option-ref="dumpMetadata" p:required="false" />
+ <bean class="org.apache.oodt.cas.cli.option.GroupSubOption"
+ p:option-ref="luceneQuery" p:required="false" />
+ <bean class="org.apache.oodt.cas.cli.option.GroupSubOption"
+ p:option-ref="retrieveFilesById" p:required="false" />
+ <bean class="org.apache.oodt.cas.cli.option.GroupSubOption"
+ p:option-ref="retrieveFilesByName" p:required="false" />
+ </list>
+ </property>
+ </bean>
+
+ <!-- AddProductType Options -->
+ <bean id="addProductType" class="org.apache.oodt.cas.cli.option.ActionCmdLineOption"
+ p:isSubOption="true">
+ <property name="shortOption" value="addPT" />
+ <property name="longOption" value="addProductType" />
+ <property name="description" value="Triggers addProductType Action" />
+ <property name="hasArgs" value="false" />
+ <property name="staticArgs">
+ <list>
+ <value>addProductType</value>
+ </list>
+ </property>
+ <property name="requirementRules">
+ <list>
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="addProductType" p:relation="REQUIRED" />
+ </list>
+ </property>
+ </bean>
+
+ <bean id="typeName" class="org.apache.oodt.cas.cli.option.AdvancedCmdLineOption">
+ <property name="shortOption" value="tn" />
+ <property name="longOption" value="typeName" />
+ <property name="description" value="ProductType name" />
+ <property name="hasArgs" value="true" />
+ <property name="argsDescription" value="product-type-name" />
+ <property name="requirementRules">
+ <list>
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="addProductType" p:relation="REQUIRED" />
+ </list>
+ </property>
+ <property name="handler">
+ <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToActionHandler">
+ <property name="applyToActions">
+ <list>
+ <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToAction"
+ p:actionName="addProductType" p:methodName="setProductTypeName" />
+ </list>
+ </property>
+ </bean>
+ </property>
+ </bean>
+
+ <bean id="typeDesc" class="org.apache.oodt.cas.cli.option.AdvancedCmdLineOption">
+ <property name="shortOption" value="td" />
+ <property name="longOption" value="typeDesc" />
+ <property name="description" value="ProductType description" />
+ <property name="hasArgs" value="true" />
+ <property name="argsDescription" value="description" />
+ <property name="requirementRules">
+ <list>
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="addProductType" p:relation="REQUIRED" />
+ </list>
+ </property>
+ <property name="handler">
+ <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToActionHandler">
+ <property name="applyToActions">
+ <list>
+ <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToAction"
+ p:actionName="addProductType" p:methodName="setProductTypeDescription" />
+ </list>
+ </property>
+ </bean>
+ </property>
+ </bean>
+
+ <bean id="repository" class="org.apache.oodt.cas.cli.option.AdvancedCmdLineOption">
+ <property name="shortOption" value="repo" />
+ <property name="longOption" value="repository" />
+ <property name="description" value="ProductType repository" />
+ <property name="hasArgs" value="true" />
+ <property name="argsDescription" value="file-path" />
+ <property name="requirementRules">
+ <list>
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="addProductType" p:relation="REQUIRED" />
+ </list>
+ </property>
+ <property name="handler">
+ <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToActionHandler">
+ <property name="applyToActions">
+ <list>
+ <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToAction"
+ p:actionName="addProductType" p:methodName="setFileRepositoryPath" />
+ </list>
+ </property>
+ </bean>
+ </property>
+ </bean>
+
+ <bean id="versionClass" class="org.apache.oodt.cas.cli.option.AdvancedCmdLineOption">
+ <property name="shortOption" value="vc" />
+ <property name="longOption" value="versionClass" />
+ <property name="description" value="ProductType versioner class" />
+ <property name="hasArgs" value="true" />
+ <property name="argsDescription" value="classpath" />
+ <property name="requirementRules">
+ <list>
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="addProductType" p:relation="REQUIRED" />
+ </list>
+ </property>
+ <property name="handler">
+ <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToActionHandler">
+ <property name="applyToActions">
+ <list>
+ <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToAction"
+ p:actionName="addProductType" p:methodName="setVersioner" />
+ </list>
+ </property>
+ </bean>
+ </property>
+ </bean>
+
+ <!-- IngestProduct Options -->
+ <bean id="ingestProduct" class="org.apache.oodt.cas.cli.option.ActionCmdLineOption"
+ p:isSubOption="true">
+ <property name="shortOption" value="ingest" />
+ <property name="longOption" value="ingestProduct" />
+ <property name="description" value="Triggers ingestProduct Action" />
+ <property name="hasArgs" value="false" />
+ <property name="staticArgs">
+ <list>
+ <value>ingestProduct</value>
+ </list>
+ </property>
+ <property name="requirementRules">
+ <list>
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="ingestProduct" p:relation="REQUIRED" />
+ </list>
+ </property>
+ </bean>
+
+ <bean id="productStructure" class="org.apache.oodt.cas.cli.option.AdvancedCmdLineOption">
+ <property name="shortOption" value="ps" />
+ <property name="longOption" value="productStructure" />
+ <property name="description" value="Hierarchical | Flat" />
+ <property name="hasArgs" value="true" />
+ <property name="argsDescription" value="structure-type" />
+ <property name="requirementRules">
+ <list>
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="ingestProduct" p:relation="REQUIRED" />
+ </list>
+ </property>
+ <property name="handler">
+ <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToActionHandler">
+ <property name="applyToActions">
+ <list>
+ <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToAction"
+ p:actionName="ingestProduct" p:methodName="setProductStructure" />
+ </list>
+ </property>
+ </bean>
+ </property>
+ </bean>
+
+ <bean id="metadataFile" class="org.apache.oodt.cas.cli.option.AdvancedCmdLineOption">
+ <property name="shortOption" value="mf" />
+ <property name="longOption" value="metadataFile" />
+ <property name="description" value="Metadata XML file path or URL" />
+ <property name="hasArgs" value="true" />
+ <property name="argsDescription" value="file-path-or-url" />
+ <property name="requirementRules">
+ <list>
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="ingestProduct" p:relation="REQUIRED" />
+ </list>
+ </property>
+ <property name="handler">
+ <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToActionHandler" />
+ </property>
+ </bean>
+
+ <bean id="clientTransfer" class="org.apache.oodt.cas.cli.option.GroupCmdLineOption">
+ <property name="shortOption" value="ct" />
+ <property name="longOption" value="clientTransfer" />
+ <property name="description" value="User client transferer" />
+ <property name="hasArgs" value="false" />
+ <property name="requirementRules">
+ <list>
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="ingestProduct" p:relation="OPTIONAL" />
+ </list>
+ </property>
+ <property name="subOptions">
+ <list>
+ <bean class="org.apache.oodt.cas.cli.option.GroupSubOption"
+ p:option-ref="dataTransfer" p:required="true" />
+ </list>
+ </property>
+ </bean>
+
+ <bean id="dataTransfer" class="org.apache.oodt.cas.cli.option.AdvancedCmdLineOption"
+ p:isSubOption="true">
+ <property name="shortOption" value="dt" />
+ <property name="longOption" value="dataTransfer" />
+ <property name="description" value="DataTransferer factory class" />
+ <property name="hasArgs" value="true" />
+ <property name="argsDescription" value="classpath" />
+ <property name="requirementRules">
+ <list>
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="ingestProduct" p:relation="REQUIRED" />
+ </list>
+ </property>
+ <property name="handler">
+ <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToActionHandler">
+ <property name="applyToActions">
+ <list>
+ <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToAction"
+ p:actionName="ingestProduct" p:methodName="setDataTransferer" />
+ </list>
+ </property>
+ </bean>
+ </property>
+ </bean>
+
+ <bean id="refs" class="org.apache.oodt.cas.cli.option.AdvancedCmdLineOption">
+ <property name="shortOption" value="rs" />
+ <property name="longOption" value="refs" />
+ <property name="description" value="Data file path or URL" />
+ <property name="type" value="java.util.List" />
+ <property name="hasArgs" value="true" />
+ <property name="argsDescription" value="file-path-or-url" />
+ <property name="requirementRules">
+ <list>
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="ingestProduct" p:relation="REQUIRED" />
+ </list>
+ </property>
+ <property name="handler">
+ <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToActionHandler">
+ <property name="applyToActions">
+ <list>
+ <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToAction"
+ p:actionName="ingestProduct" p:methodName="setReferences" />
+ </list>
+ </property>
+ </bean>
+ </property>
+ </bean>
+
+ <!-- HasProduct Options -->
+ <bean id="hasProduct" class="org.apache.oodt.cas.cli.option.ActionCmdLineOption"
+ p:isSubOption="true">
+ <property name="shortOption" value="product" />
+ <property name="longOption" value="hasProduct" />
+ <property name="description" value="Triggers hasProduct Action" />
+ <property name="hasArgs" value="false" />
+ <property name="staticArgs">
+ <list>
+ <value>hasProduct</value>
+ </list>
+ </property>
+ <property name="requirementRules">
+ <list>
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="hasProduct" p:relation="REQUIRED" />
+ </list>
+ </property>
+ </bean>
+
+ <!-- GetProductTypeByName Options -->
+ <bean id="getProductTypeByName" class="org.apache.oodt.cas.cli.option.ActionCmdLineOption"
+ p:isSubOption="true">
+ <property name="shortOption" value="ptbyn" />
+ <property name="longOption" value="getProductTypeByName" />
+ <property name="description" value="Triggers getProductTypeByName Action" />
+ <property name="hasArgs" value="false" />
+ <property name="staticArgs">
+ <list>
+ <value>getProductTypeByName</value>
+ </list>
+ </property>
+ <property name="requirementRules">
+ <list>
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="getProductTypeByName" p:relation="REQUIRED" />
+ </list>
+ </property>
+ </bean>
+
+ <!-- GetNumProducts Options -->
+ <bean id="getNumProducts" class="org.apache.oodt.cas.cli.option.ActionCmdLineOption"
+ p:isSubOption="true">
+ <property name="shortOption" value="num" />
+ <property name="longOption" value="getNumProducts" />
+ <property name="description" value="Triggers getNumProducts Action" />
+ <property name="hasArgs" value="false" />
+ <property name="staticArgs">
+ <list>
+ <value>getNumProducts</value>
+ </list>
+ </property>
+ <property name="requirementRules">
+ <list>
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="getNumProducts" p:relation="REQUIRED" />
+ </list>
+ </property>
+ </bean>
+
+ <!-- GetFirstPage Options -->
+ <bean id="getFirstPage" class="org.apache.oodt.cas.cli.option.ActionCmdLineOption"
+ p:isSubOption="true">
+ <property name="shortOption" value="page1" />
+ <property name="longOption" value="getFirstPage" />
+ <property name="description" value="Triggers getFirstPage Action" />
+ <property name="hasArgs" value="false" />
+ <property name="staticArgs">
+ <list>
+ <value>getFirstPage</value>
+ </list>
+ </property>
+ <property name="requirementRules">
+ <list>
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="getFirstPage" p:relation="REQUIRED" />
+ </list>
+ </property>
+ </bean>
+
+ <!-- GetNextPage Options -->
+ <bean id="getNextPage" class="org.apache.oodt.cas.cli.option.ActionCmdLineOption"
+ p:isSubOption="true">
+ <property name="shortOption" value="next" />
+ <property name="longOption" value="getNextPage" />
+ <property name="description" value="Triggers getNextPage Action" />
+ <property name="hasArgs" value="false" />
+ <property name="staticArgs">
+ <list>
+ <value>getNextPage</value>
+ </list>
+ </property>
+ <property name="requirementRules">
+ <list>
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="getNextPage" p:relation="REQUIRED" />
+ </list>
+ </property>
+ </bean>
+
+ <!-- GetPrevPage Options -->
+ <bean id="getPrevPage" class="org.apache.oodt.cas.cli.option.ActionCmdLineOption"
+ p:isSubOption="true">
+ <property name="shortOption" value="prev" />
+ <property name="longOption" value="getPrevPage" />
+ <property name="description" value="Triggers getPrevPage Action" />
+ <property name="hasArgs" value="false" />
+ <property name="staticArgs">
+ <list>
+ <value>getPrevPage</value>
+ </list>
+ </property>
+ <property name="requirementRules">
+ <list>
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="getPrevPage" p:relation="REQUIRED" />
+ </list>
+ </property>
+ </bean>
+
+ <!-- GetLastPage Options -->
+ <bean id="getLastPage" class="org.apache.oodt.cas.cli.option.ActionCmdLineOption"
+ p:isSubOption="true">
+ <property name="shortOption" value="last" />
+ <property name="longOption" value="getLastPage" />
+ <property name="description" value="Triggers getLastPage Action" />
+ <property name="hasArgs" value="false" />
+ <property name="staticArgs">
+ <list>
+ <value>getLastPage</value>
+ </list>
+ </property>
+ <property name="requirementRules">
+ <list>
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="getLastPage" p:relation="REQUIRED" />
+ </list>
+ </property>
+ </bean>
+
+ <!-- GetCurrentTransfer Options -->
+ <bean id="getCurrentTransfer" class="org.apache.oodt.cas.cli.option.ActionCmdLineOption"
+ p:isSubOption="true">
+ <property name="shortOption" value="curTran" />
+ <property name="longOption" value="getCurrentTransfer" />
+ <property name="description" value="Triggers getCurrentTransfer Action" />
+ <property name="hasArgs" value="false" />
+ <property name="staticArgs">
+ <list>
+ <value>getCurrentTransfer</value>
+ </list>
+ </property>
+ <property name="requirementRules">
+ <list>
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="getCurrentTransfer" p:relation="REQUIRED" />
+ </list>
+ </property>
+ </bean>
+
+ <!-- GetCurrentTransfers Options -->
+ <bean id="getCurrentTransfers" class="org.apache.oodt.cas.cli.option.ActionCmdLineOption"
+ p:isSubOption="true">
+ <property name="shortOption" value="curTrans" />
+ <property name="longOption" value="getCurrentTransfers" />
+ <property name="description" value="Triggers getCurrentTransfers Action" />
+ <property name="hasArgs" value="false" />
+ <property name="staticArgs">
+ <list>
+ <value>getCurrentTransfers</value>
+ </list>
+ </property>
+ <property name="requirementRules">
+ <list>
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="getCurrentTransfers" p:relation="REQUIRED" />
+ </list>
+ </property>
+ </bean>
+
+ <!-- GetProductPercentTransferred Options -->
+ <bean id="getProductPctTransferred" class="org.apache.oodt.cas.cli.option.ActionCmdLineOption"
+ p:isSubOption="true">
+ <property name="shortOption" value="pctTrans" />
+ <property name="longOption" value="getProductPctTransferred" />
+ <property name="description" value="Triggers getProductPercentTransferred Action" />
+ <property name="hasArgs" value="false" />
+ <property name="staticArgs">
+ <list>
+ <value>getProductPercentTransferred</value>
+ </list>
+ </property>
+ <property name="requirementRules">
+ <list>
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="getProductPercentTransferred" p:relation="REQUIRED" />
+ </list>
+ </property>
+ </bean>
+
+ <!-- GetFilePercentTransferred Options -->
+ <bean id="getFilePctTransferred" class="org.apache.oodt.cas.cli.option.ActionCmdLineOption"
+ p:isSubOption="true">
+ <property name="shortOption" value="filePctTrans" />
+ <property name="longOption" value="getFilePctTransferred" />
+ <property name="description" value="Triggers getFilePercentTransferred Action" />
+ <property name="hasArgs" value="false" />
+ <property name="staticArgs">
+ <list>
+ <value>getFilePercentTransferred</value>
+ </list>
+ </property>
+ <property name="requirementRules">
+ <list>
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="getFilePercentTransferred" p:relation="REQUIRED" />
+ </list>
+ </property>
+ </bean>
+
+ <bean id="origRef" class="org.apache.oodt.cas.cli.option.AdvancedCmdLineOption">
+ <property name="shortOption" value="or" />
+ <property name="longOption" value="origRef" />
+ <property name="description" value="Original reference" />
+ <property name="hasArgs" value="true" />
+ <property name="argsDescription" value="file-path-or-url" />
+ <property name="requirementRules">
+ <list>
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="getFilePercentTransferred" p:relation="REQUIRED" />
+ </list>
+ </property>
+ <property name="handler">
+ <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToActionHandler" />
+ </property>
+ </bean>
+
+ <!-- SqlQuery Options -->
+ <bean id="sqlQuery" class="org.apache.oodt.cas.cli.option.ActionCmdLineOption"
+ p:isSubOption="true">
+ <property name="shortOption" value="sql" />
+ <property name="longOption" value="sqlQuery" />
+ <property name="description" value="Triggers sqlQuery Action" />
+ <property name="hasArgs" value="false" />
+ <property name="staticArgs">
+ <list>
+ <value>sqlQuery</value>
+ </list>
+ </property>
+ <property name="requirementRules">
+ <list>
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="sqlQuery" p:relation="REQUIRED" />
+ </list>
+ </property>
+ </bean>
+
+
+
+ <!-- GetProductById Options -->
+ <bean id="getProductById" class="org.apache.oodt.cas.cli.option.ActionCmdLineOption"
+ p:isSubOption="true">
+ <property name="shortOption" value="pbyid" />
+ <property name="longOption" value="getProductById" />
+ <property name="description" value="Triggers getProductById Action" />
+ <property name="hasArgs" value="false" />
+ <property name="staticArgs">
+ <list>
+ <value>getProductById</value>
+ </list>
+ </property>
+ <property name="requirementRules">
+ <list>
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="getProductById" p:relation="REQUIRED" />
+ </list>
+ </property>
+ </bean>
+
+ <!-- GetProductByName Options -->
+ <bean id="getProductByName" class="org.apache.oodt.cas.cli.option.ActionCmdLineOption"
+ p:isSubOption="true">
+ <property name="shortOption" value="pbyn" />
+ <property name="longOption" value="getProductByName" />
+ <property name="description" value="Triggers getProductByName Action" />
+ <property name="hasArgs" value="false" />
+ <property name="staticArgs">
+ <list>
+ <value>getProductByName</value>
+ </list>
+ </property>
+ <property name="requirementRules">
+ <list>
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="getProductByName" p:relation="REQUIRED" />
+ </list>
+ </property>
+ </bean>
+
+ <!-- DeleteProductById Options -->
+ <bean id="deleteProductById" class="org.apache.oodt.cas.cli.option.ActionCmdLineOption"
+ p:isSubOption="true">
+ <property name="shortOption" value="dbyid" />
+ <property name="longOption" value="deleteProductById" />
+ <property name="description" value="Triggers deleteProductById Action" />
+ <property name="hasArgs" value="false" />
+ <property name="staticArgs">
+ <list>
+ <value>deleteProductById</value>
+ </list>
+ </property>
+ <property name="requirementRules">
+ <list>
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="deleteProductById" p:relation="REQUIRED" />
+ </list>
+ </property>
+ </bean>
+
+ <!-- DeleteProductByName Options -->
+ <bean id="deleteProductByName" class="org.apache.oodt.cas.cli.option.ActionCmdLineOption"
+ p:isSubOption="true">
+ <property name="shortOption" value="dbyn" />
+ <property name="longOption" value="deleteProductByName" />
+ <property name="description" value="Triggers deleteProductByName Action" />
+ <property name="hasArgs" value="false" />
+ <property name="staticArgs">
+ <list>
+ <value>deleteProductByName</value>
+ </list>
+ </property>
+ <property name="requirementRules">
+ <list>
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="deleteProductByName" p:relation="REQUIRED" />
+ </list>
+ </property>
+ </bean>
+
+ <!-- DumpMetadata Options -->
+ <bean id="dumpMetadata" class="org.apache.oodt.cas.cli.option.ActionCmdLineOption"
+ p:isSubOption="true">
+ <property name="shortOption" value="dmet" />
+ <property name="longOption" value="dumpMetadata" />
+ <property name="description" value="Triggers dumpMetadata Action" />
+ <property name="hasArgs" value="false" />
+ <property name="staticArgs">
+ <list>
+ <value>dumpMetadata</value>
+ </list>
+ </property>
+ <property name="requirementRules">
+ <list>
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="dumpMetadata" p:relation="REQUIRED" />
+ </list>
+ </property>
+ </bean>
+
+ <bean id="outputDir" class="org.apache.oodt.cas.cli.option.AdvancedCmdLineOption">
+ <property name="shortOption" value="out" />
+ <property name="longOption" value="outputDir" />
+ <property name="description" value="Output directory" />
+ <property name="type" value="java.io.File" />
+ <property name="hasArgs" value="true" />
+ <property name="argsDescription" value="file-dir" />
+ <property name="requirementRules">
+ <list>
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="dumpMetadata" p:relation="OPTIONAL" />
+ </list>
+ </property>
+ <property name="handler">
+ <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToActionHandler" />
+ </property>
+ </bean>
+
+ <!-- LuceneQuery Options -->
+ <bean id="luceneQuery" class="org.apache.oodt.cas.cli.option.ActionCmdLineOption"
+ p:isSubOption="true">
+ <property name="shortOption" value="lucene" />
+ <property name="longOption" value="luceneQuery" />
+ <property name="description" value="Triggers luceneQuery Action" />
+ <property name="hasArgs" value="false" />
+ <property name="staticArgs">
+ <list>
+ <value>luceneQuery</value>
+ </list>
+ </property>
+ <property name="requirementRules">
+ <list>
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="luceneQuery" p:relation="REQUIRED" />
+ </list>
+ </property>
+ </bean>
+
+ <bean id="reducedProductTypes" class="org.apache.oodt.cas.cli.option.AdvancedCmdLineOption">
+ <property name="shortOption" value="pts" />
+ <property name="longOption" value="reducedProductTypes" />
+ <property name="description" value="Limit query ProductTypes queried against" />
+ <property name="type" value="java.util.List" />
+ <property name="hasArgs" value="true" />
+ <property name="argsDescription" value="list-of-product-types" />
+ <property name="requirementRules">
+ <list>
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="luceneQuery" p:relation="OPTIONAL" />
+ </list>
+ </property>
+ <property name="handler">
+ <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToActionHandler" />
+ </property>
+ </bean>
+
+ <bean id="reducedMetadataKeys" class="org.apache.oodt.cas.cli.option.AdvancedCmdLineOption">
+ <property name="shortOption" value="metKeys" />
+ <property name="longOption" value="reducedMetadataKeys" />
+ <property name="description" value="Limit Elements returned by query" />
+ <property name="type" value="java.util.List" />
+ <property name="hasArgs" value="true" />
+ <property name="argsDescription" value="list-of-elements" />
+ <property name="requirementRules">
+ <list>
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="luceneQuery" p:relation="OPTIONAL" />
+ </list>
+ </property>
+ <property name="handler">
+ <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToActionHandler" />
+ </property>
+ </bean>
+
+ <!-- retrieveFiles Options -->
+ <bean id="retrieveFilesById" class="org.apache.oodt.cas.cli.option.ActionCmdLineOption"
+ p:isSubOption="true">
+ <property name="shortOption" value="rfbyid" />
+ <property name="longOption" value="retrieveFilesById" />
+ <property name="description" value="Triggers retrieveFilesById Action" />
+ <property name="hasArgs" value="false" />
+ <property name="staticArgs">
+ <list>
+ <value>retrieveFilesById</value>
+ </list>
+ </property>
+ <property name="requirementRules">
+ <list>
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="retrieveFilesById" p:relation="REQUIRED" />
+ </list>
+ </property>
+ </bean>
+
+ <bean id="retrieveFilesByName" class="org.apache.oodt.cas.cli.option.ActionCmdLineOption"
+ p:isSubOption="true">
+ <property name="shortOption" value="rfbyn" />
+ <property name="longOption" value="retrieveFilesByName" />
+ <property name="description" value="Triggers retrieveFilesByName Action" />
+ <property name="hasArgs" value="false" />
+ <property name="staticArgs">
+ <list>
+ <value>retrieveFilesByName</value>
+ </list>
+ </property>
+ <property name="requirementRules">
+ <list>
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="retrieveFilesByName" p:relation="REQUIRED" />
+ </list>
+ </property>
+ </bean>
+
+ <bean id="transferer" class="org.apache.oodt.cas.cli.option.AdvancedCmdLineOption">
+ <property name="shortOption" value="trans" />
+ <property name="longOption" value="transferer" />
+ <property name="description" value="Factory for creating DataTransfer which will perform the file transfer(s)" />
+ <property name="type" value="org.apache.oodt.cas.filemgr.datatransfer.DataTransferFactory" />
+ <property name="hasArgs" value="true" />
+ <property name="argsDescription" value="transfer factory class" />
+ <property name="requirementRules">
+ <list>
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="retrieveFilesById" p:relation="REQUIRED" />
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="retrieveFilesByName" p:relation="REQUIRED" />
+ </list>
+ </property>
+ <property name="handler">
+ <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToActionHandler">
+ <property name="applyToActions">
+ <list>
+ <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToAction"
+ p:actionName="retrieveFilesById" p:methodName="setDataTransferFactory" />
+ <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToAction"
+ p:actionName="retrieveFilesByName" p:methodName="setDataTransferFactory" />
+ </list>
+ </property>
+ </bean>
+ </property>
+ </bean>
+
+ <bean id="destination" class="org.apache.oodt.cas.cli.option.AdvancedCmdLineOption">
+ <property name="shortOption" value="dest" />
+ <property name="longOption" value="destination" />
+ <property name="description" value="Directory to transfer Product file to" />
+ <property name="type" value="java.io.File" />
+ <property name="hasArgs" value="true" />
+ <property name="argsDescription" value="directory" />
+ <property name="requirementRules">
+ <list>
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="retrieveFilesById" p:relation="REQUIRED" />
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="retrieveFilesByName" p:relation="REQUIRED" />
+ </list>
+ </property>
+ <property name="handler">
+ <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToActionHandler" />
+ </property>
+ </bean>
+
+ <!-- Options used for multiple Actions -->
+ <bean id="productId" class="org.apache.oodt.cas.cli.option.AdvancedCmdLineOption">
+ <property name="shortOption" value="pid" />
+ <property name="longOption" value="productId" />
+ <property name="description" value="Product ID" />
+ <property name="hasArgs" value="true" />
+ <property name="argsDescription" value="product-id" />
+ <property name="requirementRules">
+ <list>
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="getProductPercentTransferred" p:relation="REQUIRED" />
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="getProductById" p:relation="REQUIRED" />
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="deleteProductById" p:relation="REQUIRED" />
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="dumpMetadata" p:relation="REQUIRED" />
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="retrieveFilesById" p:relation="REQUIRED" />
+ </list>
+ </property>
+ <property name="handler">
+ <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToActionHandler" />
+ </property>
+ </bean>
+
+ <bean id="productName" class="org.apache.oodt.cas.cli.option.AdvancedCmdLineOption">
+ <property name="shortOption" value="pn" />
+ <property name="longOption" value="productName" />
+ <property name="description" value="Product name" />
+ <property name="hasArgs" value="true" />
+ <property name="argsDescription" value="product-name" />
+ <property name="requirementRules">
+ <list>
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="ingestProduct" p:relation="REQUIRED" />
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="hasProduct" p:relation="REQUIRED" />
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="getProductByName" p:relation="REQUIRED" />
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="deleteProductByName" p:relation="REQUIRED" />
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="retrieveFilesByName" p:relation="REQUIRED" />
+ </list>
+ </property>
+ <property name="handler">
+ <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToActionHandler" />
+ </property>
+ </bean>
+
+ <bean id="productTypeName" class="org.apache.oodt.cas.cli.option.AdvancedCmdLineOption">
+ <property name="shortOption" value="ptn" />
+ <property name="longOption" value="productTypeName" />
+ <property name="description" value="ProductType name" />
+ <property name="hasArgs" value="true" />
+ <property name="argsDescription" value="product-type-name" />
+ <property name="requirementRules">
+ <list>
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="ingestProduct" p:relation="REQUIRED" />
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="getProductTypeByName" p:relation="REQUIRED" />
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="getNumProducts" p:relation="REQUIRED" />
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="getFirstPage" p:relation="REQUIRED" />
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="getNextPage" p:relation="REQUIRED" />
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="getPrevPage" p:relation="REQUIRED" />
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="getLastPage" p:relation="REQUIRED" />
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="getProductPercentTransferred" p:relation="REQUIRED" />
+ </list>
+ </property>
+ <property name="handler">
+ <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToActionHandler" />
+ </property>
+ </bean>
+
+ <bean id="currentPageNum" class="org.apache.oodt.cas.cli.option.AdvancedCmdLineOption">
+ <property name="shortOption" value="curPage" />
+ <property name="longOption" value="currentPageNum" />
+ <property name="description" value="Current Page Number" />
+ <property name="type" value="int" />
+ <property name="hasArgs" value="true" />
+ <property name="argsDescription" value="page-number" />
+ <property name="requirementRules">
+ <list>
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="getNextPage" p:relation="REQUIRED" />
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="getPrevPage" p:relation="REQUIRED" />
+ </list>
+ </property>
+ <property name="handler">
+ <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToActionHandler" />
+ </property>
+ </bean>
+
+ <bean id="query" class="org.apache.oodt.cas.cli.option.AdvancedCmdLineOption">
+ <property name="shortOption" value="q" />
+ <property name="longOption" value="query" />
+ <property name="description" value="File Manager query" />
+ <property name="hasArgs" value="true" />
+ <property name="argsDescription" value="query" />
+ <property name="requirementRules">
+ <list>
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="sqlQuery" p:relation="REQUIRED" />
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="luceneQuery" p:relation="REQUIRED" />
+ </list>
+ </property>
+ <property name="handler">
+ <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToActionHandler" />
+ </property>
+ </bean>
+
+ <bean id="sortBy" class="org.apache.oodt.cas.cli.option.AdvancedCmdLineOption">
+ <property name="shortOption" value="sb" />
+ <property name="longOption" value="sortBy" />
+ <property name="description" value="Metadata field to sort query results by" />
+ <property name="hasArgs" value="true" />
+ <property name="argsDescription" value="metadata field" />
+ <property name="requirementRules">
+ <list>
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="sqlQuery" p:relation="OPTIONAL" />
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="luceneQuery" p:relation="OPTIONAL" />
+ </list>
+ </property>
+ <property name="handler">
+ <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToActionHandler" />
+ </property>
+ </bean>
+
+ <bean id="outputFormat" class="org.apache.oodt.cas.cli.option.AdvancedCmdLineOption">
+ <property name="shortOption" value="of" />
+ <property name="longOption" value="outputFormat" />
+ <property name="description" value="Output format string (i.e. Filename = $Filename)" />
+ <property name="hasArgs" value="true" />
+ <property name="argsDescription" value="output-format-string" />
+ <property name="requirementRules">
+ <list>
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="sqlQuery" p:relation="OPTIONAL" />
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="luceneQuery" p:relation="OPTIONAL" />
+ </list>
+ </property>
+ <property name="handler">
+ <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToActionHandler" />
+ </property>
+ </bean>
+
+ <bean id="delimiter" class="org.apache.oodt.cas.cli.option.AdvancedCmdLineOption">
+ <property name="shortOption" value="dlmtr" />
+ <property name="longOption" value="delimiter" />
+ <property name="description" value="String to use the separate query results" />
+ <property name="hasArgs" value="true" />
+ <property name="argsDescription" value="delimiter-string" />
+ <property name="requirementRules">
+ <list>
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="sqlQuery" p:relation="OPTIONAL" />
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="luceneQuery" p:relation="OPTIONAL" />
+ </list>
+ </property>
+ <property name="handler">
+ <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToActionHandler" />
+ </property>
+ </bean>
+
+ <bean id="filter" class="org.apache.oodt.cas.cli.option.GroupCmdLineOption">
+ <property name="shortOption" value="f" />
+ <property name="longOption" value="filter" />
+ <property name="description" value="Query filter" />
+ <property name="hasArgs" value="false" />
+ <property name="requirementRules">
+ <list>
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="sqlQuery" p:relation="OPTIONAL" />
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="luceneQuery" p:relation="OPTIONAL" />
+ </list>
+ </property>
+ <property name="subOptions">
+ <list>
+ <bean class="org.apache.oodt.cas.cli.option.GroupSubOption"
+ p:option-ref="algor" p:required="true" />
+ <bean class="org.apache.oodt.cas.cli.option.GroupSubOption"
+ p:option-ref="converter" p:required="false" />
+ <bean class="org.apache.oodt.cas.cli.option.GroupSubOption"
+ p:option-ref="startDateTimeMetKey" p:required="true" />
+ <bean class="org.apache.oodt.cas.cli.option.GroupSubOption"
+ p:option-ref="endDateTimeMetKey" p:required="true" />
+ <bean class="org.apache.oodt.cas.cli.option.GroupSubOption"
+ p:option-ref="priorityMetKey" p:required="true" />
+ </list>
+ </property>
+ </bean>
+
+ <bean id="algor" class="org.apache.oodt.cas.cli.option.AdvancedCmdLineOption"
+ p:isSubOption="true">
+ <property name="shortOption" value="algor" />
+ <property name="longOption" value="algor" />
+ <property name="description" value="FilterAlgor class" />
+ <property name="type" value="org.apache.oodt.cas.filemgr.structs.query.filter.FilterAlgor" />
+ <property name="hasArgs" value="true" />
+ <property name="argsDescription" value="classpath" />
+ <property name="requirementRules">
+ <list>
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="sqlQuery" p:relation="OPTIONAL" />
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="luceneQuery" p:relation="OPTIONAL" />
+ </list>
+ </property>
+ <property name="handler">
+ <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToActionHandler" />
+ </property>
+ </bean>
+
+ <bean id="converter" class="org.apache.oodt.cas.cli.option.AdvancedCmdLineOption"
+ p:isSubOption="true">
+ <property name="shortOption" value="conv" />
+ <property name="longOption" value="converter" />
+ <property name="description" value="VersionConverter class" />
+ <property name="type" value="org.apache.oodt.cas.filemgr.structs.query.conv.VersionConverter" />
+ <property name="hasArgs" value="true" />
+ <property name="argsDescription" value="classpath" />
+ <property name="requirementRules">
+ <list>
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="sqlQuery" p:relation="OPTIONAL" />
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="luceneQuery" p:relation="OPTIONAL" />
+ </list>
+ </property>
+ <property name="handler">
+ <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToActionHandler" />
+ </property>
+ </bean>
+
+ <bean id="startDateTimeMetKey" class="org.apache.oodt.cas.cli.option.AdvancedCmdLineOption"
+ p:isSubOption="true">
+ <property name="shortOption" value="sdtMetKey" />
+ <property name="longOption" value="startDateTimeMetKey" />
+ <property name="description" value="Start date time metadata key" />
+ <property name="hasArgs" value="true" />
+ <property name="argsDescription" value="metadata-key" />
+ <property name="requirementRules">
+ <list>
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="sqlQuery" p:relation="OPTIONAL" />
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="luceneQuery" p:relation="OPTIONAL" />
+ </list>
+ </property>
+ <property name="handler">
+ <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToActionHandler" />
+ </property>
+ </bean>
+
+ <bean id="endDateTimeMetKey" class="org.apache.oodt.cas.cli.option.AdvancedCmdLineOption"
+ p:isSubOption="true">
+ <property name="shortOption" value="edtMetKey" />
+ <property name="longOption" value="endDateTimeMetKey" />
+ <property name="description" value="End date time metadata key" />
+ <property name="hasArgs" value="true" />
+ <property name="argsDescription" value="metadata-key" />
+ <property name="requirementRules">
+ <list>
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="sqlQuery" p:relation="OPTIONAL" />
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="luceneQuery" p:relation="OPTIONAL" />
+ </list>
+ </property>
+ <property name="handler">
+ <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToActionHandler" />
+ </property>
+ </bean>
+
+ <bean id="priorityMetKey" class="org.apache.oodt.cas.cli.option.AdvancedCmdLineOption"
+ p:isSubOption="true">
+ <property name="shortOption" value="prMetKey" />
+ <property name="longOption" value="priorityMetKey" />
+ <property name="description" value="Priority metadata key" />
+ <property name="hasArgs" value="true" />
+ <property name="argsDescription" value="metadata-key" />
+ <property name="requirementRules">
+ <list>
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="sqlQuery" p:relation="OPTIONAL" />
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="luceneQuery" p:relation="OPTIONAL" />
+ </list>
+ </property>
+ <property name="handler">
+ <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToActionHandler" />
+ </property>
+ </bean>
+</beans>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/oodt/blob/a973c531/config/src/main/resources/examples/filemgr/filemgr.properties
----------------------------------------------------------------------
diff --git a/config/src/main/resources/examples/filemgr/filemgr.properties b/config/src/main/resources/examples/filemgr/filemgr.properties
new file mode 100644
index 0000000..4d8d957
--- /dev/null
+++ b/config/src/main/resources/examples/filemgr/filemgr.properties
@@ -0,0 +1,114 @@
+#
+# 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.
+#
+
+# Configuration properties for the File Manager
+
+# repository factory
+filemgr.repository.factory=org.apache.oodt.cas.filemgr.repository.XMLRepositoryManagerFactory
+
+# Lucene catalog factory
+filemgr.catalog.factory=org.apache.oodt.cas.filemgr.catalog.LuceneCatalogFactory
+
+# data transfer factory
+filemgr.datatransfer.factory=org.apache.oodt.cas.filemgr.datatransfer.LocalDataTransferFactory
+
+# validation layer factory
+filemgr.validationLayer.factory=org.apache.oodt.cas.filemgr.validation.XMLValidationLayerFactory
+
+# xml rpc client configuration
+org.apache.oodt.cas.filemgr.system.xmlrpc.connectionTimeout.minutes=20
+org.apache.oodt.cas.filemgr.system.xmlrpc.requestTimeout.minutes=60
+#org.apache.oodt.cas.filemgr.system.xmlrpc.connection.retries=0
+#org.apache.oodt.cas.filemgr.system.xmlrpc.connection.retry.interval.seconds=3
+
+# mapped data source catalog configuration
+#org.apache.oodt.cas.filemgr.catalog.mappeddatasource.mapFile=/path/to/ops.catalog.typemap.properties
+
+# lucene catalog configuration
+org.apache.oodt.cas.filemgr.catalog.lucene.idxPath=[OODT_HOME]/data/catalog
+org.apache.oodt.cas.filemgr.catalog.lucene.pageSize=20
+org.apache.oodt.cas.filemgr.catalog.lucene.commitLockTimeout.seconds=60
+org.apache.oodt.cas.filemgr.catalog.lucene.writeLockTimeout.seconds=60
+org.apache.oodt.cas.filemgr.catalog.lucene.mergeFactor=20
+
+# XML repository manager configuration
+org.apache.oodt.cas.filemgr.repositorymgr.dirs=file:[FILEMGR_HOME]/policy/oodt
+
+# XML validation layer configuration
+org.apache.oodt.cas.filemgr.validation.dirs=file:[FILEMGR_HOME]/policy/oodt
+
+# remote data transfer configuration
+org.apache.oodt.cas.filemgr.datatransfer.remote.chunkSize=1024
+
+# location of Mime-Type repository
+org.apache.oodt.cas.filemgr.mime.type.repository=[FILEMGR_HOME]/etc/mime-types.xml
+
+
+############ data source configuration ##################################
+#
+# These 3 blocks of config properties can be used to setup a catalog,
+# repository manager, and validation layer based on a RDBMS such as
+# Oracle, MySQL, PostgreSQL, or any others that support a jdbc connection.
+# Just un-comment the following blocks of properties and configure as
+# needed.
+#
+#########################################################################
+
+# datasource catalog config
+#org.apache.oodt.cas.filemgr.catalog.datasource.jdbc.url=some_jdbc_url
+#org.apache.oodt.cas.filemgr.catalog.datasource.jdbc.user=user
+#org.apache.oodt.cas.filemgr.catalog.datasource.jdbc.pass=pass
+#org.apache.oodt.cas.filemgr.catalog.datasource.jdbc.driver=driver.class.name
+#org.apache.oodt.cas.filemgr.catalog.datasource.quoteFields=false
+#org.apache.oodt.cas.filemgr.catalog.datasource.pageSize=20
+#org.apache.oodt.cas.filemgr.catalog.datasource.cacheUpdateMinutes=5
+
+# data source repository manager configuration
+#org.apache.oodt.cas.filemgr.repositorymgr.datasource.jdbc.url=some_jdbc_url
+#org.apache.oodt.cas.filemgr.repositorymgr.datasource.jdbc.user=user
+#org.apache.oodt.cas.filemgr.repositorymgr.datasource.jdbc.pass=pass
+#org.apache.oodt.cas.filemgr.repositorymgr.datasource.jdbc.driver=driver.class.name
+
+# data source validation layer configuration
+#org.apache.oodt.cas.filemgr.validation.datasource.jdbc.url=some_jdbc_url
+#org.apache.oodt.cas.filemgr.validation.datasource.jdbc.user=user
+#org.apache.oodt.cas.filemgr.validation.datasource.jdbc.pass=pass
+#org.apache.oodt.cas.filemgr.validation.datasource.jdbc.driver=driver.class.name
+#org.apache.oodt.cas.filemgr.validation.datasource.quoteFields=false
+
+
+# tells the file manager system layer to include product instance metadata
+# NOTE: here are the expected field mappings
+#
+# product.getProductId() -> ProductId
+# product.getProductName() -> ProductName
+# product.getProductStructure() -> ProductStructure
+# product.getTransferStatus() -> ProductTransferStatus
+# product.getRootRef() -> ProductRootReference
+
+# for the references returned by product.getProductReferences() the following
+# metadata fields will be added (order will be maintained, such that data store
+# ref at index 0 will map to orig ref at index 0, etc.)
+#
+# ProductDataStoreReferences (list of all data store references:
+# note already translated into path, not URI)
+# ProductOrigReferences (list of all orig references:
+# note already translated into path, not URI)
+# ProductMimeType (list of all references' mime-types)
+# ProductFileSize (list of all references' file sizes)
+
+org.apache.oodt.cas.filemgr.metadata.expandProduct=false
\ No newline at end of file
[16/35] oodt git commit: Created test cases for distributed
configuration manager and publisher
Posted by ma...@apache.org.
http://git-wip-us.apache.org/repos/asf/oodt/blob/a973c531/config/src/main/resources/examples/filemgr/mime-types.xml
----------------------------------------------------------------------
diff --git a/config/src/main/resources/examples/filemgr/mime-types.xml b/config/src/main/resources/examples/filemgr/mime-types.xml
new file mode 100755
index 0000000..6b678be
--- /dev/null
+++ b/config/src/main/resources/examples/filemgr/mime-types.xml
@@ -0,0 +1,4119 @@
+<?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"/>
+ <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>
+
+ <!-- http://www.iana.org/assignments/media-types/application/vnd.ms-excel -->
+ <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">
+ <alias type="application/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-corelpresentations">
+ <glob pattern="*.shw"/>
+ <sub-class-of type="application/x-tika-msoffice"/>
+ </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">
+ <acronym>OTF</acronym>
+ <_comment>OpenType Font</_comment>
+ <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">
+ <acronym>TTF</acronym>
+ <_comment>TrueType Font</_comment>
+ <glob pattern="*.ttf"/>
+ <glob pattern="*.ttc"/>
+ <magic priority="40">
+ <match value="0x00010000" type="string" offset="0"/>
+ </magic>
+ </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"/>
+ <glob pattern="*.he5"/>
+ </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="
<TRUNCATED>
[28/35] oodt git commit: Merge branch 'feature/zookeeper-config' of
https://github.com/IMS94/oodt into feature/zookeeper-config
Posted by ma...@apache.org.
Merge branch 'feature/zookeeper-config' of https://github.com/IMS94/oodt into feature/zookeeper-config
Project: http://git-wip-us.apache.org/repos/asf/oodt/repo
Commit: http://git-wip-us.apache.org/repos/asf/oodt/commit/811b98de
Tree: http://git-wip-us.apache.org/repos/asf/oodt/tree/811b98de
Diff: http://git-wip-us.apache.org/repos/asf/oodt/diff/811b98de
Branch: refs/heads/feature/zookeeper-config
Commit: 811b98de591e06ad1ccb55f66ab585dc40d12a3f
Parents: 82e089b 22a1e59
Author: Chris Mattmann <ma...@apache.org>
Authored: Thu Jul 13 21:58:22 2017 -0700
Committer: Chris Mattmann <ma...@apache.org>
Committed: Thu Jul 13 21:58:22 2017 -0700
----------------------------------------------------------------------
core/pom.xml | 4 ----
1 file changed, 4 deletions(-)
----------------------------------------------------------------------
[21/35] oodt git commit: Record change for OODT-847.
Posted by ma...@apache.org.
Record change for OODT-847.
Project: http://git-wip-us.apache.org/repos/asf/oodt/repo
Commit: http://git-wip-us.apache.org/repos/asf/oodt/commit/6daeb8f7
Tree: http://git-wip-us.apache.org/repos/asf/oodt/tree/6daeb8f7
Diff: http://git-wip-us.apache.org/repos/asf/oodt/diff/6daeb8f7
Branch: refs/heads/feature/zookeeper-config
Commit: 6daeb8f7d16603775db843c65ac33cc57cc20830
Parents: 1ae9242
Author: Chris Mattmann <ma...@apache.org>
Authored: Mon Jul 10 14:08:36 2017 -0400
Committer: Chris Mattmann <ma...@apache.org>
Committed: Mon Jul 10 14:08:36 2017 -0400
----------------------------------------------------------------------
CHANGES.txt | 2 ++
1 file changed, 2 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/oodt/blob/6daeb8f7/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index ed72a94..42de68c 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -3,6 +3,8 @@ Apache OODT Change Log
Release 1.1 - Current Development
+* OODT-847 New FilemgrMetExtractor to extract File System Attributes (Aditya Dhulipala, rverma via mattmann)
+
* OODT-948 Fix dockerfile (magicaltrout/R B Krishna)
* OODT-938 update netcdf (magicaltrout)
[29/35] oodt git commit: fix for presence of component home
environment variables in tests
Posted by ma...@apache.org.
fix for presence of component home environment variables in tests
Project: http://git-wip-us.apache.org/repos/asf/oodt/repo
Commit: http://git-wip-us.apache.org/repos/asf/oodt/commit/2fbd08f0
Tree: http://git-wip-us.apache.org/repos/asf/oodt/tree/2fbd08f0
Diff: http://git-wip-us.apache.org/repos/asf/oodt/diff/2fbd08f0
Branch: refs/heads/feature/zookeeper-config
Commit: 2fbd08f0d4aa9cced62f286ef7a1dd29536ace16
Parents: 22a1e59
Author: Imesha Sudasingha <im...@gmail.com>
Authored: Fri Jul 14 21:23:54 2017 +0530
Committer: Imesha Sudasingha <im...@gmail.com>
Committed: Fri Jul 14 21:23:54 2017 +0530
----------------------------------------------------------------------
.../DistributedConfigurationManager.java | 15 ++----
.../config/distributed/utils/FilePathUtils.java | 53 ++++++++++++++++++++
config/src/main/resources/etc/log4j.xml | 2 +-
.../DistributedConfigurationManagerTest.java | 18 +++++--
4 files changed, 71 insertions(+), 17 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/oodt/blob/2fbd08f0/config/src/main/java/org/apache/oodt/config/distributed/DistributedConfigurationManager.java
----------------------------------------------------------------------
diff --git a/config/src/main/java/org/apache/oodt/config/distributed/DistributedConfigurationManager.java b/config/src/main/java/org/apache/oodt/config/distributed/DistributedConfigurationManager.java
index 6572270..530416d 100644
--- a/config/src/main/java/org/apache/oodt/config/distributed/DistributedConfigurationManager.java
+++ b/config/src/main/java/org/apache/oodt/config/distributed/DistributedConfigurationManager.java
@@ -24,6 +24,7 @@ import org.apache.oodt.config.ConfigurationManager;
import org.apache.oodt.config.Constants;
import org.apache.oodt.config.Constants.Properties;
import org.apache.oodt.config.distributed.utils.CuratorUtils;
+import org.apache.oodt.config.distributed.utils.FilePathUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -141,7 +142,7 @@ public class DistributedConfigurationManager extends ConfigurationManager {
logger.info("Properties loaded from ZNode at : {}", propertiesFileZNodePath);
String localFilePath = zNodePaths.getLocalPropertiesFilePath(propertiesFileZNodePath);
- localFilePath = fixForComponentHome(localFilePath);
+ localFilePath = FilePathUtils.fixForComponentHome(component, localFilePath);
FileUtils.writeByteArrayToFile(new File(localFilePath), bytes);
logger.info("Properties file from ZNode at {} saved to {}", propertiesFileZNodePath, localFilePath);
}
@@ -167,22 +168,12 @@ public class DistributedConfigurationManager extends ConfigurationManager {
byte[] bytes = client.getData().forPath(configFileZNodePath);
String localFilePath = zNodePaths.getLocalConfigFilePath(configFileZNodePath);
- localFilePath = fixForComponentHome(localFilePath);
+ localFilePath = FilePathUtils.fixForComponentHome(component, localFilePath);
FileUtils.writeByteArrayToFile(new File(localFilePath), bytes);
logger.info("Config file from ZNode at {} saved to {}", configFileZNodePath, localFilePath);
}
}
- private String fixForComponentHome(String suffixPath) {
- String prefix = System.getenv().get(component.getHome());
- StringBuilder path = new StringBuilder();
- if (prefix != null) {
- path.append(prefix.endsWith(SEPARATOR) ? prefix : prefix + SEPARATOR);
- }
- path.append(suffixPath.startsWith(SEPARATOR) ? suffixPath.substring(1) : suffixPath);
- return path.toString();
- }
-
public Component getComponent() {
return component;
}
http://git-wip-us.apache.org/repos/asf/oodt/blob/2fbd08f0/config/src/main/java/org/apache/oodt/config/distributed/utils/FilePathUtils.java
----------------------------------------------------------------------
diff --git a/config/src/main/java/org/apache/oodt/config/distributed/utils/FilePathUtils.java b/config/src/main/java/org/apache/oodt/config/distributed/utils/FilePathUtils.java
new file mode 100644
index 0000000..12fcff5
--- /dev/null
+++ b/config/src/main/java/org/apache/oodt/config/distributed/utils/FilePathUtils.java
@@ -0,0 +1,53 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.oodt.config.distributed.utils;
+
+import org.apache.oodt.config.Component;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import static org.apache.oodt.config.Constants.SEPARATOR;
+
+public class FilePathUtils {
+
+ private static final Logger logger = LoggerFactory.getLogger(FilePathUtils.class);
+
+ private FilePathUtils() {
+ }
+
+ public static String fixForComponentHome(Component component, String suffixPath) {
+ String prefix = System.getenv().get(component.getHome());
+ StringBuilder path = new StringBuilder();
+ if (prefix != null) {
+ logger.debug("Found prefix {}:{} for suffixPath: {}", component.getHome(), prefix, suffixPath);
+ path.append(prefix.endsWith(SEPARATOR) ? prefix : prefix + SEPARATOR);
+ }
+ path.append(suffixPath.startsWith(SEPARATOR) ? suffixPath.substring(1) : suffixPath);
+ logger.debug("Fixed path for {} is {}", suffixPath, path.toString());
+ return path.toString();
+ }
+
+ public static String unfixForComponentHome(Component component, String path) {
+ String prefix = System.getenv().get(component.getHome());
+ if (prefix != null && path.startsWith(prefix)) {
+ return path.substring(prefix.length() + SEPARATOR.length());
+ }
+
+ return path;
+ }
+}
http://git-wip-us.apache.org/repos/asf/oodt/blob/2fbd08f0/config/src/main/resources/etc/log4j.xml
----------------------------------------------------------------------
diff --git a/config/src/main/resources/etc/log4j.xml b/config/src/main/resources/etc/log4j.xml
index 0421de2..1b3dbdf 100644
--- a/config/src/main/resources/etc/log4j.xml
+++ b/config/src/main/resources/etc/log4j.xml
@@ -27,7 +27,7 @@
</appender>
<root>
- <priority value="INFO"/>
+ <priority value="DEBUG"/>
<appender-ref ref="console"/>
</root>
http://git-wip-us.apache.org/repos/asf/oodt/blob/2fbd08f0/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationManagerTest.java
----------------------------------------------------------------------
diff --git a/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationManagerTest.java b/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationManagerTest.java
index 1d8c716..fde20f8 100644
--- a/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationManagerTest.java
+++ b/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationManagerTest.java
@@ -20,6 +20,7 @@ package org.apache.oodt.config.distributed;
import org.apache.commons.io.FileUtils;
import org.apache.oodt.config.ConfigurationManager;
import org.apache.oodt.config.distributed.cli.DistributedConfigurationPublisher;
+import org.apache.oodt.config.distributed.utils.FilePathUtils;
import org.junit.AfterClass;
import org.junit.Assert;
import org.junit.BeforeClass;
@@ -31,9 +32,11 @@ import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;
import java.util.ArrayList;
+import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Properties;
+import java.util.Set;
import static org.apache.oodt.config.Constants.CONFIG_PUBLISHER_XML;
import static org.apache.oodt.config.Constants.SEPARATOR;
@@ -85,7 +88,7 @@ public class DistributedConfigurationManagerTest extends AbstractDistributedConf
Assert.assertEquals(properties.getProperty(key), System.getProperty(key));
}
- String fileName = entry.getValue();
+ String fileName = FilePathUtils.fixForComponentHome(publisher.getComponent(), entry.getValue());
fileName = fileName.startsWith(SEPARATOR) ? fileName.substring(1) : fileName;
File downloadedFile = new File(fileName);
Assert.assertTrue(downloadedFile.exists());
@@ -93,7 +96,7 @@ public class DistributedConfigurationManagerTest extends AbstractDistributedConf
// Checking for configuration files
for (Map.Entry<String, String> entry : publisher.getConfigFiles().entrySet()) {
- String fileName = entry.getValue();
+ String fileName = FilePathUtils.fixForComponentHome(publisher.getComponent(), entry.getValue());
fileName = fileName.startsWith(SEPARATOR) ? fileName.substring(1) : fileName;
File file = new File(fileName);
Assert.assertTrue(file.exists());
@@ -106,10 +109,17 @@ public class DistributedConfigurationManagerTest extends AbstractDistributedConf
for (DistributedConfigurationPublisher publisher : publishers) {
publisher.destroy();
- for (Map.Entry<String, String> entry : publisher.getConfigFiles().entrySet()) {
+ // deleting all locally created conf file directories
+ Set<Map.Entry<String, String>> files = new HashSet<>(publisher.getConfigFiles().entrySet());
+ files.addAll(publisher.getPropertiesFiles().entrySet());
+
+ for (Map.Entry<String, String> entry : files) {
String fileName = entry.getValue();
fileName = fileName.startsWith(SEPARATOR) ? fileName.substring(1) : fileName;
- String confDir = fileName.split(SEPARATOR)[0];
+
+ String confDir = System.getenv(publisher.getComponent().getHome()) != null ?
+ System.getenv(publisher.getComponent().getHome()) + SEPARATOR + fileName.split(SEPARATOR)[0] : fileName.split(SEPARATOR)[0];
+
File dir = new File(confDir);
FileUtils.deleteDirectory(dir);
}
[04/35] oodt git commit: Implemented global configuration publishing
mechanism.
Posted by ma...@apache.org.
http://git-wip-us.apache.org/repos/asf/oodt/blob/4b88f714/config/src/test/resources/mime-types.xml
----------------------------------------------------------------------
diff --git a/config/src/test/resources/mime-types.xml b/config/src/test/resources/mime-types.xml
new file mode 100755
index 0000000..6b678be
--- /dev/null
+++ b/config/src/test/resources/mime-types.xml
@@ -0,0 +1,4119 @@
+<?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"/>
+ <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>
+
+ <!-- http://www.iana.org/assignments/media-types/application/vnd.ms-excel -->
+ <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">
+ <alias type="application/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-corelpresentations">
+ <glob pattern="*.shw"/>
+ <sub-class-of type="application/x-tika-msoffice"/>
+ </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">
+ <acronym>OTF</acronym>
+ <_comment>OpenType Font</_comment>
+ <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">
+ <acronym>TTF</acronym>
+ <_comment>TrueType Font</_comment>
+ <glob pattern="*.ttf"/>
+ <glob pattern="*.ttc"/>
+ <magic priority="40">
+ <match value="0x00010000" type="string" offset="0"/>
+ </magic>
+ </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"/>
+ <glob pattern="*.he5"/>
+ </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
<TRUNCATED>
[06/35] oodt git commit: Altered configuration publishing mechanism
to use spring configuration
Posted by ma...@apache.org.
Altered configuration publishing mechanism to use spring configuration
Project: http://git-wip-us.apache.org/repos/asf/oodt/repo
Commit: http://git-wip-us.apache.org/repos/asf/oodt/commit/fadf149c
Tree: http://git-wip-us.apache.org/repos/asf/oodt/tree/fadf149c
Diff: http://git-wip-us.apache.org/repos/asf/oodt/diff/fadf149c
Branch: refs/heads/feature/zookeeper-config
Commit: fadf149cb77dd943af9e81c0f127ce74f203c478
Parents: 4b88f71
Author: Imesha Sudasingha <im...@gmail.com>
Authored: Sat Jun 17 21:09:58 2017 +0530
Committer: Imesha Sudasingha <im...@gmail.com>
Committed: Sat Jun 17 21:09:58 2017 +0530
----------------------------------------------------------------------
config/pom.xml | 15 +++
.../oodt/config/ConfigurationManager.java | 19 +--
.../config/ConfigurationManagerFactory.java | 6 +-
.../java/org/apache/oodt/config/Constants.java | 3 +
.../DistributedConfigurationManager.java | 68 +---------
.../DistributedConfigurationPublisher.java | 135 ++++++++++---------
.../oodt/config/distributed/ZNodePaths.java | 80 +++++++++++
.../apache/oodt/config/distributed/ZPaths.java | 67 ---------
.../StandaloneConfigurationManager.java | 27 +---
.../apache/oodt/config/utils/CuratorUtils.java | 46 +++++++
.../DistributedConfigurationPublisherTest.java | 55 +++++---
.../resources/distributed-config-publisher.xml | 56 ++++++++
.../cas/filemgr/system/XmlRpcFileManager.java | 13 +-
13 files changed, 329 insertions(+), 261 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/oodt/blob/fadf149c/config/pom.xml
----------------------------------------------------------------------
diff --git a/config/pom.xml b/config/pom.xml
index 0ab4457..891f520 100644
--- a/config/pom.xml
+++ b/config/pom.xml
@@ -28,6 +28,21 @@
</dependency>
<dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-beans</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-context</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-core</artifactId>
+ </dependency>
+
+ <dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
http://git-wip-us.apache.org/repos/asf/oodt/blob/fadf149c/config/src/main/java/org/apache/oodt/config/ConfigurationManager.java
----------------------------------------------------------------------
diff --git a/config/src/main/java/org/apache/oodt/config/ConfigurationManager.java b/config/src/main/java/org/apache/oodt/config/ConfigurationManager.java
index e5dc82f..1911889 100644
--- a/config/src/main/java/org/apache/oodt/config/ConfigurationManager.java
+++ b/config/src/main/java/org/apache/oodt/config/ConfigurationManager.java
@@ -17,11 +17,7 @@
package org.apache.oodt.config;
-import java.io.File;
-import java.io.FileNotFoundException;
import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
/**
* The abstract class to define functionalities of the configuration managers.
@@ -31,23 +27,10 @@ import java.util.List;
public abstract class ConfigurationManager {
protected String component;
- protected List<String> propertiesFiles;
- public ConfigurationManager(String component, List<String> propertiesFiles) {
+ public ConfigurationManager(String component) {
this.component = component;
- this.propertiesFiles = propertiesFiles != null ? propertiesFiles : new ArrayList<String>();
}
- /**
- * Retrieves a given property from the underlying configuration storage. For example, If we want to get the
- * value of the property org.foo.bar, we have to call this method with <pre>org.foo.bar</pre> as the parameter.
- *
- * @param key Name of the property to be retrieved.
- * @return Value of the requested property | null
- */
- public abstract String getProperty(String key);
-
public abstract void loadProperties() throws IOException;
-
- public abstract File getPropertiesFile(String filePath) throws FileNotFoundException;
}
http://git-wip-us.apache.org/repos/asf/oodt/blob/fadf149c/config/src/main/java/org/apache/oodt/config/ConfigurationManagerFactory.java
----------------------------------------------------------------------
diff --git a/config/src/main/java/org/apache/oodt/config/ConfigurationManagerFactory.java b/config/src/main/java/org/apache/oodt/config/ConfigurationManagerFactory.java
index 0fd995d..4d01e35 100644
--- a/config/src/main/java/org/apache/oodt/config/ConfigurationManagerFactory.java
+++ b/config/src/main/java/org/apache/oodt/config/ConfigurationManagerFactory.java
@@ -43,11 +43,15 @@ public class ConfigurationManagerFactory {
* the distributed version of the configuration manager will be determined by the value of the property
* <pre>org.apache.oodt.config.zookeeper == true</pre>
*
+ * @param component Name of the OODT component, to which the created configuration manager instance will be providing
+ * configuration support
+ * @param propertiesFiles List of <pre>.properties</pre> files which are to be used in the case of standalone configuration
+ * management
* @return ConfigurationManager instance to used by the corresponding component.
*/
public static ConfigurationManager getConfigurationManager(String component, List<String> propertiesFiles) {
if (System.getProperty(ENABLE_DISTRIBUTED_CONFIGURATION) != null) {
- return new DistributedConfigurationManager(component, propertiesFiles);
+ return new DistributedConfigurationManager(component);
}
return new StandaloneConfigurationManager(component, propertiesFiles);
}
http://git-wip-us.apache.org/repos/asf/oodt/blob/fadf149c/config/src/main/java/org/apache/oodt/config/Constants.java
----------------------------------------------------------------------
diff --git a/config/src/main/java/org/apache/oodt/config/Constants.java b/config/src/main/java/org/apache/oodt/config/Constants.java
index 6f74f97..033101b 100644
--- a/config/src/main/java/org/apache/oodt/config/Constants.java
+++ b/config/src/main/java/org/apache/oodt/config/Constants.java
@@ -70,5 +70,8 @@ public class Constants {
/** Where properties files are stored inside each component */
public static final String PROPERTIES_PATH_NAME = "properties";
+
+ /** Where other configuration files will be stored */
+ public static final String CONFIGURATION_PATH_NAME = "configuration";
}
}
http://git-wip-us.apache.org/repos/asf/oodt/blob/fadf149c/config/src/main/java/org/apache/oodt/config/distributed/DistributedConfigurationManager.java
----------------------------------------------------------------------
diff --git a/config/src/main/java/org/apache/oodt/config/distributed/DistributedConfigurationManager.java b/config/src/main/java/org/apache/oodt/config/distributed/DistributedConfigurationManager.java
index f6502bb..9ab0e32 100644
--- a/config/src/main/java/org/apache/oodt/config/distributed/DistributedConfigurationManager.java
+++ b/config/src/main/java/org/apache/oodt/config/distributed/DistributedConfigurationManager.java
@@ -18,21 +18,14 @@
package org.apache.oodt.config.distributed;
import org.apache.curator.framework.CuratorFramework;
-import org.apache.curator.framework.CuratorFrameworkFactory;
-import org.apache.curator.framework.api.ACLProvider;
-import org.apache.curator.retry.ExponentialBackoffRetry;
import org.apache.oodt.config.ConfigurationManager;
import org.apache.oodt.config.Constants;
import org.apache.oodt.config.Constants.Properties;
import org.apache.oodt.config.utils.CuratorUtils;
-import org.apache.zookeeper.ZooDefs;
-import org.apache.zookeeper.data.ACL;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import java.io.File;
import java.io.IOException;
-import java.util.List;
import java.util.concurrent.TimeUnit;
import static org.apache.oodt.config.Constants.Properties.ZK_CONNECT_STRING;
@@ -52,8 +45,8 @@ public class DistributedConfigurationManager extends ConfigurationManager {
private String connectString;
private CuratorFramework client;
- public DistributedConfigurationManager(String component, List<String> propertiesFiles) {
- super(component, propertiesFiles);
+ public DistributedConfigurationManager(String component) {
+ super(component);
if (System.getProperty(ZK_PROPERTIES_FILE) == null && System.getProperty(Constants.Properties.ZK_CONNECT_STRING) == null) {
throw new IllegalArgumentException("Zookeeper requires system properties " + ZK_PROPERTIES_FILE + " or " + ZK_CONNECT_STRING + " to be set");
@@ -82,45 +75,12 @@ public class DistributedConfigurationManager extends ConfigurationManager {
* {@link Properties#ZK_STARTUP_TIMEOUT} milli-seconds until the client connects to the zookeeper ensemble.
*/
private void startZookeeper() {
- int connectionTimeoutMs = Integer.parseInt(System.getProperty(Properties.ZK_CONNECTION_TIMEOUT, "15"));
- int sessionTimeoutMs = Integer.parseInt(System.getProperty(Properties.ZK_CONNECTION_TIMEOUT, "60"));
- int retryInitialWaitMs = Integer.parseInt(System.getProperty(Properties.ZK_CONNECTION_TIMEOUT, "1000"));
- int maxRetryCount = Integer.parseInt(System.getProperty(Properties.ZK_CONNECTION_TIMEOUT, "3"));
- int startupTimeOutMs = Integer.parseInt(System.getProperty(Properties.ZK_STARTUP_TIMEOUT, "30000"));
-
- CuratorFrameworkFactory.Builder builder = CuratorFrameworkFactory.builder()
- .connectString(connectString)
- .retryPolicy(new ExponentialBackoffRetry(retryInitialWaitMs, maxRetryCount))
- .connectionTimeoutMs(connectionTimeoutMs)
- .sessionTimeoutMs(sessionTimeoutMs);
-
- /*
- * If authorization information is available, those will be added to the client. NOTE: These auth info are
- * for access control, therefore no authentication will happen when the client is being started. These
- * info will only be required whenever a client is accessing an already create ZNode. For another client of
- * another node to make use of a ZNode created by this node, it should also provide the same auth info.
- */
- if (System.getProperty(Properties.ZK_USERNAME) != null && System.getProperty(Properties.ZK_PASSWORD) != null) {
- String authenticationString = System.getProperty(Properties.ZK_USERNAME) + ":" + System.getProperty(Properties.ZK_PASSWORD);
- builder.authorization("digest", authenticationString.getBytes())
- .aclProvider(new ACLProvider() {
- public List<ACL> getDefaultAcl() {
- return ZooDefs.Ids.CREATOR_ALL_ACL;
- }
-
- public List<ACL> getAclForPath(String path) {
- return ZooDefs.Ids.CREATOR_ALL_ACL;
- }
- });
- }
-
- client = builder.build();
- logger.debug("CuratorFramework client built successfully with connectString: {}, sessionTimeout: {} and connectionTimeout: {}",
- connectString, sessionTimeoutMs, connectionTimeoutMs);
+ client = CuratorUtils.getCuratorFrameworkClient(connectString, logger);
client.start();
logger.info("Curator framework start operation invoked");
+ int startupTimeOutMs = Integer.parseInt(System.getProperty(Properties.ZK_STARTUP_TIMEOUT, "30000"));
try {
logger.info("Waiting to connect to zookeeper, startupTimeout : {}", startupTimeOutMs);
client.blockUntilConnected(startupTimeOutMs, TimeUnit.MILLISECONDS);
@@ -136,27 +96,7 @@ public class DistributedConfigurationManager extends ConfigurationManager {
}
@Override
- public String getProperty(String key) {
- // Todo Implement using curator
- return null;
- }
-
- @Override
public void loadProperties() {
// todo Implement the logic with Curator
}
-
- public File getPropertiesFile(String filePath) {
- return null;
- }
-
- public File getConfigurationFile(String filePath) {
- return null;
- }
-
- public void publishConfiguration() {
- for (String propertyFile : propertiesFiles) {
-
- }
- }
}
http://git-wip-us.apache.org/repos/asf/oodt/blob/fadf149c/config/src/main/java/org/apache/oodt/config/distributed/DistributedConfigurationPublisher.java
----------------------------------------------------------------------
diff --git a/config/src/main/java/org/apache/oodt/config/distributed/DistributedConfigurationPublisher.java b/config/src/main/java/org/apache/oodt/config/distributed/DistributedConfigurationPublisher.java
index 38aea56..8970641 100644
--- a/config/src/main/java/org/apache/oodt/config/distributed/DistributedConfigurationPublisher.java
+++ b/config/src/main/java/org/apache/oodt/config/distributed/DistributedConfigurationPublisher.java
@@ -19,24 +19,19 @@ package org.apache.oodt.config.distributed;
import org.apache.commons.io.FileUtils;
import org.apache.curator.framework.CuratorFramework;
-import org.apache.curator.framework.CuratorFrameworkFactory;
-import org.apache.curator.framework.api.ACLProvider;
-import org.apache.curator.retry.ExponentialBackoffRetry;
import org.apache.oodt.config.Constants;
import org.apache.oodt.config.utils.CuratorUtils;
-import org.apache.zookeeper.ZooDefs;
-import org.apache.zookeeper.data.ACL;
import org.apache.zookeeper.data.Stat;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import org.springframework.beans.BeansException;
+import org.springframework.context.ApplicationContext;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
import java.io.File;
import java.io.IOException;
import java.net.URISyntaxException;
import java.net.URL;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.List;
import java.util.Map;
import java.util.concurrent.TimeUnit;
@@ -44,7 +39,8 @@ import static org.apache.oodt.config.Constants.Properties.ZK_CONNECT_STRING;
import static org.apache.oodt.config.Constants.Properties.ZK_PROPERTIES_FILE;
/**
- * The class to publish configuration to Zookeeper
+ * The class to publish configuration to Zookeeper. When using distributed configuration with OODT, configuration per
+ * each component type needs to be stored in zookeeper beforehand. This class, provides the means to do that.
*
* @author Imesha Sudasingha
*/
@@ -53,13 +49,15 @@ public class DistributedConfigurationPublisher {
private static final Logger logger = LoggerFactory.getLogger(DistributedConfigurationPublisher.class);
private Map<String, String> propertiesFiles;
+ private Map<String, String> configFiles;
private String connectString;
private CuratorFramework client;
- private ZPaths zPaths;
+ private ZNodePaths zNodePaths;
+ private String componentName;
- public DistributedConfigurationPublisher(String component, Map<String, String> propertiesFiles) {
- this.propertiesFiles = propertiesFiles;
- this.zPaths = new ZPaths(component);
+ public DistributedConfigurationPublisher(String componentName) {
+ this.componentName = componentName;
+ this.zNodePaths = new ZNodePaths(componentName);
if (System.getProperty(ZK_PROPERTIES_FILE) == null && System.getProperty(Constants.Properties.ZK_CONNECT_STRING) == null) {
throw new IllegalArgumentException("Zookeeper requires system properties " + ZK_PROPERTIES_FILE + " or " + ZK_CONNECT_STRING + " to be set");
@@ -88,45 +86,12 @@ public class DistributedConfigurationPublisher {
* {@link Constants.Properties#ZK_STARTUP_TIMEOUT} milli-seconds until the client connects to the zookeeper ensemble.
*/
private void startZookeeper() {
- int connectionTimeoutMs = Integer.parseInt(System.getProperty(Constants.Properties.ZK_CONNECTION_TIMEOUT, "15000"));
- int sessionTimeoutMs = Integer.parseInt(System.getProperty(Constants.Properties.ZK_CONNECTION_TIMEOUT, "60000"));
- int retryInitialWaitMs = Integer.parseInt(System.getProperty(Constants.Properties.ZK_CONNECTION_TIMEOUT, "1000"));
- int maxRetryCount = Integer.parseInt(System.getProperty(Constants.Properties.ZK_CONNECTION_TIMEOUT, "3"));
- int startupTimeOutMs = Integer.parseInt(System.getProperty(Constants.Properties.ZK_STARTUP_TIMEOUT, "30000"));
-
- CuratorFrameworkFactory.Builder builder = CuratorFrameworkFactory.builder()
- .connectString(connectString)
- .retryPolicy(new ExponentialBackoffRetry(retryInitialWaitMs, maxRetryCount))
- .connectionTimeoutMs(connectionTimeoutMs)
- .sessionTimeoutMs(sessionTimeoutMs);
-
- /*
- * If authorization information is available, those will be added to the client. NOTE: These auth info are
- * for access control, therefore no authentication will happen when the client is being started. These
- * info will only be required whenever a client is accessing an already create ZNode. For another client of
- * another node to make use of a ZNode created by this node, it should also provide the same auth info.
- */
- if (System.getProperty(Constants.Properties.ZK_USERNAME) != null && System.getProperty(Constants.Properties.ZK_PASSWORD) != null) {
- String authenticationString = System.getProperty(Constants.Properties.ZK_USERNAME) + ":" + System.getProperty(Constants.Properties.ZK_PASSWORD);
- builder.authorization("digest", authenticationString.getBytes())
- .aclProvider(new ACLProvider() {
- public List<ACL> getDefaultAcl() {
- return ZooDefs.Ids.CREATOR_ALL_ACL;
- }
-
- public List<ACL> getAclForPath(String path) {
- return ZooDefs.Ids.CREATOR_ALL_ACL;
- }
- });
- }
-
- client = builder.build();
- logger.debug("CuratorFramework client built successfully with connectString: {}, sessionTimeout: {} and connectionTimeout: {}",
- connectString, sessionTimeoutMs, connectionTimeoutMs);
+ client = CuratorUtils.getCuratorFrameworkClient(connectString, logger);
client.start();
logger.info("Curator framework start operation invoked");
+ int startupTimeOutMs = Integer.parseInt(System.getProperty(Constants.Properties.ZK_STARTUP_TIMEOUT, "30000"));
try {
logger.info("Waiting to connect to zookeeper, startupTimeout : {}", startupTimeOutMs);
client.blockUntilConnected(startupTimeOutMs, TimeUnit.MILLISECONDS);
@@ -142,8 +107,18 @@ public class DistributedConfigurationPublisher {
}
public void publishConfiguration() throws Exception {
- for (Map.Entry<String, String> entry : propertiesFiles.entrySet()) {
- logger.info("Publishing configuration {} - {}", entry.getKey(), entry.getValue());
+ logger.debug("Publishing properties files : {}", propertiesFiles);
+ publishConfiguration(propertiesFiles, true);
+ logger.info("Properties files published successfully");
+
+ logger.debug("Publishing config files : {}", configFiles);
+ publishConfiguration(configFiles, false);
+ logger.info("Config files published successfully");
+ }
+
+ private void publishConfiguration(Map<String, String> fileMapping, boolean isProperties) throws Exception {
+ for (Map.Entry<String, String> entry : fileMapping.entrySet()) {
+ logger.debug("Publishing configuration {} - {}", entry.getKey(), entry.getValue());
URL resource = Thread.currentThread().getContextClassLoader().getResource(entry.getKey());
String content;
@@ -154,17 +129,17 @@ public class DistributedConfigurationPublisher {
continue;
}
- String zNodePath = zPaths.getPropertiesZNodePath(entry.getValue());
+ String zNodePath = isProperties ? zNodePaths.getPropertiesZNodePath(entry.getValue()) : zNodePaths.getConfigurationZNodePath(entry.getValue());
if (client.checkExists().forPath(zNodePath) != null) {
byte[] bytes = client.getData().forPath(zNodePath);
String existingData = new String(bytes);
if (content.equals(existingData)) {
- logger.info("{} already exists in zookeeper at {}", entry.getKey(), entry.getValue());
+ logger.warn("{} already exists in zookeeper at {}", entry.getKey(), entry.getValue());
continue;
} else {
Stat stat = client.setData().forPath(zNodePath, content.getBytes());
if (stat != null) {
- logger.info("Published {} to {}", entry.getKey(), entry.getValue());
+ logger.info("Published configuration file {} to {}", entry.getKey(), entry.getValue());
}
}
} else {
@@ -173,28 +148,56 @@ public class DistributedConfigurationPublisher {
}
}
- public static void main(String[] args) {
- if (args.length < 2) {
- logger.warn("Component name and at least one properties file needs to be given configuration publishing");
- throw new IllegalArgumentException("Requires at least two arguments, component and one properties file");
- }
+ public Map<String, String> getPropertiesFiles() {
+ return propertiesFiles;
+ }
- logger.debug("Starting publishing configuration. Component : {}", args[0]);
+ public void setPropertiesFiles(Map<String, String> propertiesFiles) {
+ this.propertiesFiles = propertiesFiles;
+ }
+
+ public Map<String, String> getConfigFiles() {
+ return configFiles;
+ }
+
+ public void setConfigFiles(Map<String, String> configFiles) {
+ this.configFiles = configFiles;
+ }
+
+ public ZNodePaths getZNodePaths() {
+ return zNodePaths;
+ }
- String[] fileMapping = Arrays.copyOfRange(args, 1, args.length);
- Map<String, String> propertiesFiles = new HashMap<>();
- for (String entry : fileMapping) {
- String[] strings = entry.split("=");
- propertiesFiles.put(strings[0], strings[1]);
+ public static void main(String[] args) {
+ if (args.length < 1) {
+ logger.error("Spring configuration file needs to be given as an argument");
+ return;
}
- DistributedConfigurationPublisher distributedConfigurationPublisher = new DistributedConfigurationPublisher(args[0], propertiesFiles);
+ logger.info("Starting publishing configuration. Spring conf : {}", args[0]);
+
try {
- distributedConfigurationPublisher.publishConfiguration();
+ ApplicationContext applicationContext = new ClassPathXmlApplicationContext(args[0]);
+ Map distributedConfigurationPublisher = applicationContext.getBeansOfType(DistributedConfigurationPublisher.class);
+ for (Object bean : distributedConfigurationPublisher.values()) {
+ DistributedConfigurationPublisher publisher = (DistributedConfigurationPublisher) bean;
+
+ logger.debug("Publishing configuration for : {}", publisher.getComponentName());
+ publisher.publishConfiguration();
+ logger.info("Published configuration for : {}", publisher.getComponentName());
+ }
+ } catch (BeansException e) {
+ logger.error("Error occurred when obtaining configuration publisher beans", e);
+ return;
} catch (Exception e) {
logger.error("Error occurred when publishing configuration to zookeeper", e);
+ return;
}
logger.info("Published configuration successfully");
}
+
+ public String getComponentName() {
+ return componentName;
+ }
}
http://git-wip-us.apache.org/repos/asf/oodt/blob/fadf149c/config/src/main/java/org/apache/oodt/config/distributed/ZNodePaths.java
----------------------------------------------------------------------
diff --git a/config/src/main/java/org/apache/oodt/config/distributed/ZNodePaths.java b/config/src/main/java/org/apache/oodt/config/distributed/ZNodePaths.java
new file mode 100644
index 0000000..f390838
--- /dev/null
+++ b/config/src/main/java/org/apache/oodt/config/distributed/ZNodePaths.java
@@ -0,0 +1,80 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.oodt.config.distributed;
+
+import static org.apache.oodt.config.Constants.ZPaths.*;
+
+/**
+ * Class responsible for handling all the Zookeeper ZNode paths related to configuration
+ *
+ * @author Imesha Sudasingha
+ */
+public class ZNodePaths {
+
+ /** ZNode for distinct components. /components/${component} */
+ private String componentZNodePath;
+ private String componentZNodeRoot;
+
+ /** ZNode path for properties files. /components/${component}/properties */
+ private String propertiesZNodePath;
+ private String propertiesZNodeRoot;
+
+ /** ZNode path for other configuration files. /components/${component}/configuration */
+ private String configurationZNodePath;
+ private String configurationZNodeRoot;
+
+ /**
+ * Creates the ZNode path structure accordingly to the <pre>componentName</pre> and <pre>propertiesFileNames</pre> given.
+ *
+ * @param componentName Name of the OODT component
+ */
+ public ZNodePaths(String componentName) {
+ if (componentName == null) {
+ throw new IllegalArgumentException("Component name cannot be null");
+ }
+
+ componentZNodePath = SEPARATOR + COMPONENTS_PATH_NAME + SEPARATOR + componentName;
+ componentZNodeRoot = componentZNodePath + SEPARATOR;
+
+ propertiesZNodePath = componentZNodeRoot + PROPERTIES_PATH_NAME;
+ propertiesZNodeRoot = propertiesZNodePath + SEPARATOR;
+
+ configurationZNodePath = componentZNodeRoot + CONFIGURATION_PATH_NAME;
+ configurationZNodeRoot = configurationZNodePath + SEPARATOR;
+ }
+
+ public String getComponentZNodePath() {
+ return componentZNodePath;
+ }
+
+ public String getPropertiesZNodePath() {
+ return propertiesZNodePath;
+ }
+
+ public String getConfigurationZNodePath() {
+ return configurationZNodePath;
+ }
+
+ public String getPropertiesZNodePath(String subPath) {
+ return propertiesZNodeRoot + (subPath.startsWith(SEPARATOR) ? subPath.substring(1) : subPath);
+ }
+
+ public String getConfigurationZNodePath(String subPath) {
+ return configurationZNodeRoot + (subPath.startsWith(SEPARATOR) ? subPath.substring(1) : subPath);
+ }
+}
http://git-wip-us.apache.org/repos/asf/oodt/blob/fadf149c/config/src/main/java/org/apache/oodt/config/distributed/ZPaths.java
----------------------------------------------------------------------
diff --git a/config/src/main/java/org/apache/oodt/config/distributed/ZPaths.java b/config/src/main/java/org/apache/oodt/config/distributed/ZPaths.java
deleted file mode 100644
index 0e1d10c..0000000
--- a/config/src/main/java/org/apache/oodt/config/distributed/ZPaths.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.oodt.config.distributed;
-
-import java.util.List;
-
-import static org.apache.oodt.config.Constants.ZPaths.*;
-
-/**
- * Class responsible for handling all the Zookeeper ZNode paths related to configuration
- *
- * @author Imesha Sudasingha
- */
-public class ZPaths {
-
- /** ZNode for distinct components. /components/${component} */
- public String componentZNodePath;
- public String componentZNodeRoot;
-
- /** ZNode path for properties files. /components/${component}/properties */
- public String propertiesZNodePath;
- public String propertiesZNodeRoot;
-
- /**
- * Creates the ZNode path structure accordingly to the <pre>componentName</pre> and <pre>propertiesFileNames</pre> given.
- *
- * @param componentName Name of the OODT component
- */
- public ZPaths(String componentName) {
- if (componentName == null) {
- throw new IllegalArgumentException("Component name cannot be null");
- }
-
- componentZNodePath = SEPARATOR + COMPONENTS_PATH_NAME + SEPARATOR + componentName;
- componentZNodeRoot = componentZNodePath + SEPARATOR;
-
- propertiesZNodePath = componentZNodeRoot + PROPERTIES_PATH_NAME;
- propertiesZNodeRoot = propertiesZNodePath + SEPARATOR;
- }
-
- public String getComponentZNodePath() {
- return componentZNodePath;
- }
-
- public String getPropertiesZNodePath() {
- return propertiesZNodePath;
- }
-
- public String getPropertiesZNodePath(String subPath) {
- return propertiesZNodeRoot + (subPath.startsWith(SEPARATOR) ? subPath.substring(1) : subPath);
- }
-}
http://git-wip-us.apache.org/repos/asf/oodt/blob/fadf149c/config/src/main/java/org/apache/oodt/config/standalone/StandaloneConfigurationManager.java
----------------------------------------------------------------------
diff --git a/config/src/main/java/org/apache/oodt/config/standalone/StandaloneConfigurationManager.java b/config/src/main/java/org/apache/oodt/config/standalone/StandaloneConfigurationManager.java
index 23cf0a2..6ecb1b7 100644
--- a/config/src/main/java/org/apache/oodt/config/standalone/StandaloneConfigurationManager.java
+++ b/config/src/main/java/org/apache/oodt/config/standalone/StandaloneConfigurationManager.java
@@ -23,8 +23,8 @@ import org.slf4j.LoggerFactory;
import java.io.File;
import java.io.FileInputStream;
-import java.io.FileNotFoundException;
import java.io.IOException;
+import java.util.ArrayList;
import java.util.List;
/**
@@ -34,35 +34,22 @@ import java.util.List;
*/
public class StandaloneConfigurationManager extends ConfigurationManager {
- /** Logger instance for logging */
private static final Logger logger = LoggerFactory.getLogger(StandaloneConfigurationManager.class);
- public StandaloneConfigurationManager(String component, List<String> propertiesFiles) {
- super(component, propertiesFiles);
- }
+ private List<String> propertiesFiles;
- /** {@inheritDoc} */
- @Override
- public String getProperty(String key) {
- return System.getProperty(key);
+ public StandaloneConfigurationManager(String component, List<String> propertiesFiles) {
+ super(component);
+ this.propertiesFiles = propertiesFiles != null ? propertiesFiles : new ArrayList<String>();
}
/** {@inheritDoc} */
@Override
public void loadProperties() throws IOException {
for (String file : propertiesFiles) {
+ logger.debug("Loading properties from file : {}", file);
System.getProperties().load(new FileInputStream(new File(file)));
+ logger.debug("Properties loaded from file : {}", file);
}
}
-
- /** {@inheritDoc} */
- @Override
- public File getPropertiesFile(String filePath) throws FileNotFoundException {
- File file = new File(filePath);
- if (!propertiesFiles.contains(filePath) || !file.exists()) {
- throw new FileNotFoundException("Couldn't find properties file located at: " + filePath);
- }
-
- return file;
- }
}
http://git-wip-us.apache.org/repos/asf/oodt/blob/fadf149c/config/src/main/java/org/apache/oodt/config/utils/CuratorUtils.java
----------------------------------------------------------------------
diff --git a/config/src/main/java/org/apache/oodt/config/utils/CuratorUtils.java b/config/src/main/java/org/apache/oodt/config/utils/CuratorUtils.java
index d064080..c73d48b 100644
--- a/config/src/main/java/org/apache/oodt/config/utils/CuratorUtils.java
+++ b/config/src/main/java/org/apache/oodt/config/utils/CuratorUtils.java
@@ -18,13 +18,20 @@
package org.apache.oodt.config.utils;
import org.apache.curator.framework.CuratorFramework;
+import org.apache.curator.framework.CuratorFrameworkFactory;
+import org.apache.curator.framework.api.ACLProvider;
+import org.apache.curator.retry.ExponentialBackoffRetry;
+import org.apache.oodt.config.Constants;
import org.apache.zookeeper.CreateMode;
import org.apache.zookeeper.KeeperException;
+import org.apache.zookeeper.ZooDefs;
+import org.apache.zookeeper.data.ACL;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.FileInputStream;
import java.io.IOException;
+import java.util.List;
import static org.apache.oodt.config.Constants.Properties.ZK_PROPERTIES_FILE;
@@ -77,4 +84,43 @@ public class CuratorUtils {
return client.checkExists().forPath(path) != null ? new String(client.getData().forPath(path)) : null;
}
+ public static CuratorFramework getCuratorFrameworkClient(String connectString, Logger logger) {
+ int connectionTimeoutMs = Integer.parseInt(System.getProperty(Constants.Properties.ZK_CONNECTION_TIMEOUT, "15000"));
+ int sessionTimeoutMs = Integer.parseInt(System.getProperty(Constants.Properties.ZK_CONNECTION_TIMEOUT, "60000"));
+ int retryInitialWaitMs = Integer.parseInt(System.getProperty(Constants.Properties.ZK_CONNECTION_TIMEOUT, "1000"));
+ int maxRetryCount = Integer.parseInt(System.getProperty(Constants.Properties.ZK_CONNECTION_TIMEOUT, "3"));
+
+ CuratorFrameworkFactory.Builder builder = CuratorFrameworkFactory.builder()
+ .connectString(connectString)
+ .retryPolicy(new ExponentialBackoffRetry(retryInitialWaitMs, maxRetryCount))
+ .connectionTimeoutMs(connectionTimeoutMs)
+ .sessionTimeoutMs(sessionTimeoutMs);
+
+ /*
+ * If authorization information is available, those will be added to the client. NOTE: These auth info are
+ * for access control, therefore no authentication will happen when the client is being started. These
+ * info will only be required whenever a client is accessing an already create ZNode. For another client of
+ * another node to make use of a ZNode created by this node, it should also provide the same auth info.
+ */
+ if (System.getProperty(Constants.Properties.ZK_USERNAME) != null && System.getProperty(Constants.Properties.ZK_PASSWORD) != null) {
+ String authenticationString = System.getProperty(Constants.Properties.ZK_USERNAME) + ":" + System.getProperty(Constants.Properties.ZK_PASSWORD);
+ builder.authorization("digest", authenticationString.getBytes())
+ .aclProvider(new ACLProvider() {
+ public List<ACL> getDefaultAcl() {
+ return ZooDefs.Ids.CREATOR_ALL_ACL;
+ }
+
+ public List<ACL> getAclForPath(String path) {
+ return ZooDefs.Ids.CREATOR_ALL_ACL;
+ }
+ });
+ }
+
+ CuratorFramework client = builder.build();
+ logger.debug("CuratorFramework client built successfully with connectString: {}, sessionTimeout: {} and connectionTimeout: {}",
+ connectString, sessionTimeoutMs, connectionTimeoutMs);
+
+ return client;
+ }
+
}
http://git-wip-us.apache.org/repos/asf/oodt/blob/fadf149c/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationPublisherTest.java
----------------------------------------------------------------------
diff --git a/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationPublisherTest.java b/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationPublisherTest.java
index 665f785..2a3c903 100644
--- a/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationPublisherTest.java
+++ b/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationPublisherTest.java
@@ -26,17 +26,20 @@ import org.junit.AfterClass;
import org.junit.Assert;
import org.junit.BeforeClass;
import org.junit.Test;
+import org.springframework.context.ApplicationContext;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
import java.io.File;
import java.io.IOException;
import java.net.URI;
-import java.util.Arrays;
+import java.util.Map;
-import static org.apache.oodt.config.Constants.Components.FILE_MANAGER;
import static org.apache.oodt.config.Constants.Properties.ZK_CONNECT_STRING;
public class DistributedConfigurationPublisherTest {
+ private static final String DISTRIBUTED_CONFIG_PUBLISHER_SPRING_CONFIG = "distributed-config-publisher.xml";
+
private static TestingServer zookeeper;
private static CuratorFramework client;
@@ -56,27 +59,43 @@ public class DistributedConfigurationPublisherTest {
@Test
public void publishConfiguration() throws Exception {
- String args[] = new String[]{
- FILE_MANAGER,
- "filemgr.properties=/etc/filemgr.properties",
- "mime-types.xml=/etc/mime-types.xml"
- };
- DistributedConfigurationPublisher.main(args);
+ DistributedConfigurationPublisher.main(new String[]{DISTRIBUTED_CONFIG_PUBLISHER_SPRING_CONFIG});
+
+ ApplicationContext applicationContext = new ClassPathXmlApplicationContext(DISTRIBUTED_CONFIG_PUBLISHER_SPRING_CONFIG);
+ Map distributedConfigurationPublisher = applicationContext.getBeansOfType(DistributedConfigurationPublisher.class);
+
+ for (Object bean : distributedConfigurationPublisher.values()) {
+ DistributedConfigurationPublisher publisher = (DistributedConfigurationPublisher) bean;
+ ZNodePaths zNodePaths = publisher.getZNodePaths();
+
+ // Checking for configuration files
+ for (Map.Entry<String, String> entry : publisher.getPropertiesFiles().entrySet()) {
+ String zNodePath = zNodePaths.getPropertiesZNodePath(entry.getValue());
+
+ Assert.assertNotNull(client.checkExists().forPath(zNodePath));
+
+ String storedContent = new String(client.getData().forPath(zNodePath));
+
+ URI file = Thread.currentThread().getContextClassLoader().getResource(entry.getKey()).toURI();
+ String fileContent = FileUtils.readFileToString(new File(file));
+
+ Assert.assertEquals(fileContent, storedContent);
+ }
+
+ // Checking for configuration files
+ for (Map.Entry<String, String> entry : publisher.getConfigFiles().entrySet()) {
+ String zNodePath = zNodePaths.getConfigurationZNodePath(entry.getValue());
- String[] fileMappings = Arrays.copyOfRange(args, 1, args.length);
- ZPaths zPaths = new ZPaths(FILE_MANAGER);
- for (String mapping : fileMappings) {
- String[] parts = mapping.split("=");
- String zNodePath = zPaths.getPropertiesZNodePath(parts[1]);
+ Assert.assertNotNull(client.checkExists().forPath(zNodePath));
- Assert.assertNotNull(client.checkExists().forPath(zNodePath));
+ String storedContent = new String(client.getData().forPath(zNodePath));
- String storedContent = new String(client.getData().forPath(zNodePath));
+ URI file = Thread.currentThread().getContextClassLoader().getResource(entry.getKey()).toURI();
+ String fileContent = FileUtils.readFileToString(new File(file));
- URI file = Thread.currentThread().getContextClassLoader().getResource(parts[0]).toURI();
- String fileContent = FileUtils.readFileToString(new File(file));
+ Assert.assertEquals(fileContent, storedContent);
+ }
- Assert.assertEquals(fileContent, storedContent);
}
}
http://git-wip-us.apache.org/repos/asf/oodt/blob/fadf149c/config/src/test/resources/distributed-config-publisher.xml
----------------------------------------------------------------------
diff --git a/config/src/test/resources/distributed-config-publisher.xml b/config/src/test/resources/distributed-config-publisher.xml
new file mode 100644
index 0000000..d938b6d
--- /dev/null
+++ b/config/src/test/resources/distributed-config-publisher.xml
@@ -0,0 +1,56 @@
+<!--
+ ~ 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.
+ -->
+
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
+
+ <bean id="filemgr-config-publisher" class="org.apache.oodt.config.distributed.DistributedConfigurationPublisher">
+
+ <constructor-arg value="filemgr"/>
+
+ <property name="propertiesFiles">
+ <map>
+ <entry key="filemgr.properties" value="/etc/filemgr.properties"/>
+ </map>
+ </property>
+
+ <property name="configFiles">
+ <map>
+ <entry key="mime-types.xml" value="/etc/mime-types.xml"/>
+ </map>
+ </property>
+ </bean>
+
+ <bean id="resmgr-config-publisher" class="org.apache.oodt.config.distributed.DistributedConfigurationPublisher">
+
+ <constructor-arg value="resmgr"/>
+
+ <property name="propertiesFiles">
+ <map>
+ <entry key="filemgr.properties" value="/etc/resmgr.properties"/>
+ </map>
+ </property>
+
+ <property name="configFiles">
+ <map>
+ <entry key="mime-types.xml" value="/etc/mime-types.xml"/>
+ </map>
+ </property>
+ </bean>
+
+</beans>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/oodt/blob/fadf149c/filemgr/src/main/java/org/apache/oodt/cas/filemgr/system/XmlRpcFileManager.java
----------------------------------------------------------------------
diff --git a/filemgr/src/main/java/org/apache/oodt/cas/filemgr/system/XmlRpcFileManager.java b/filemgr/src/main/java/org/apache/oodt/cas/filemgr/system/XmlRpcFileManager.java
index d43369a..9d7d740 100644
--- a/filemgr/src/main/java/org/apache/oodt/cas/filemgr/system/XmlRpcFileManager.java
+++ b/filemgr/src/main/java/org/apache/oodt/cas/filemgr/system/XmlRpcFileManager.java
@@ -125,18 +125,17 @@ public class XmlRpcFileManager {
webServer.addHandler("filemgr", this);
webServer.start();
+ List<String> propertiesFiles = new ArrayList<>();
+
// set up the configuration, if there is any
if (System.getProperty("org.apache.oodt.cas.filemgr.properties") != null) {
- String configFile = System.getProperty("org.apache.oodt.cas.filemgr.properties");
- LOG.log(Level.INFO, "Loading File Manager Configuration Properties from: [" + configFile + "]");
-
- List<String> propertiesFiles = new ArrayList<String>();
+ String propertiesFile = System.getProperty("org.apache.oodt.cas.filemgr.properties");
+ LOG.log(Level.INFO, "Using File Manager Configuration Properties file : [" + propertiesFile + "]");
propertiesFiles.add(System.getProperty("org.apache.oodt.cas.filemgr.properties"));
- configurationManager = ConfigurationManagerFactory.getConfigurationManager(componentName, propertiesFiles);
- } else {
- configurationManager = ConfigurationManagerFactory.getConfigurationManager(componentName,null);
}
+ configurationManager = ConfigurationManagerFactory.getConfigurationManager(componentName, propertiesFiles);
+
this.loadConfiguration();
LOG.log(Level.INFO, "File Manager started by " + System.getProperty("user.name", "unknown"));
}