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/08/30 16:39:30 UTC
[01/52] [abbrv] oodt git commit: Implemented global configuration
publishing mechanism.
Repository: oodt
Updated Branches:
refs/heads/master 7443a7c37 -> fc6311db2
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/52] [abbrv] 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/master
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());
}
[17/52] [abbrv] 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/master
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
[24/52] [abbrv] 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/master
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(-)
----------------------------------------------------------------------
[29/52] [abbrv] 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/master
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());
}
[37/52] [abbrv] 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/8b02792a
Tree: http://git-wip-us.apache.org/repos/asf/oodt/tree/8b02792a
Diff: http://git-wip-us.apache.org/repos/asf/oodt/diff/8b02792a
Branch: refs/heads/master
Commit: 8b02792ae0629f80b74fe63547429f042f5004d7
Parents: a1a96fb 1e1fc1a
Author: Chris Mattmann <ma...@apache.org>
Authored: Thu Jul 27 20:30:53 2017 -0700
Committer: Chris Mattmann <ma...@apache.org>
Committed: Thu Jul 27 20:30:53 2017 -0700
----------------------------------------------------------------------
core/pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/oodt/blob/8b02792a/core/pom.xml
----------------------------------------------------------------------
[32/52] [abbrv] oodt git commit: Merge https://github.com/apache/oodt
into feature/zookeeper-config
Posted by ma...@apache.org.
Merge 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/9543e347
Tree: http://git-wip-us.apache.org/repos/asf/oodt/tree/9543e347
Diff: http://git-wip-us.apache.org/repos/asf/oodt/diff/9543e347
Branch: refs/heads/master
Commit: 9543e347b6913ef01687cf4e3be27b7bb6add1f0
Parents: 3fb7660 9b7a5e4
Author: Chris Mattmann <ma...@apache.org>
Authored: Fri Jul 14 21:03:54 2017 -0700
Committer: Chris Mattmann <ma...@apache.org>
Committed: Fri Jul 14 21:03:54 2017 -0700
----------------------------------------------------------------------
CHANGES.txt | 2 +
.../src/main/resources/policy/mimetypes.xsd | 71 ++++++++++++++++++++
2 files changed, 73 insertions(+)
----------------------------------------------------------------------
[11/52] [abbrv] 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>
[20/52] [abbrv] 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/master
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(+)
----------------------------------------------------------------------
[40/52] [abbrv] oodt git commit: Added maven-resource-plugin for
example resource copying and CLI improvements
Posted by ma...@apache.org.
http://git-wip-us.apache.org/repos/asf/oodt/blob/d2f2d49d/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
deleted file mode 100755
index 6b678be..0000000
--- a/config/src/main/resources/examples/filemgr/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" offs
<TRUNCATED>
[21/52] [abbrv] 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/master
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"));
[22/52] [abbrv] 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/master
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>
[41/52] [abbrv] oodt git commit: Added maven-resource-plugin for
example resource copying and CLI improvements
Posted by ma...@apache.org.
Added maven-resource-plugin for example resource copying and CLI improvements
Project: http://git-wip-us.apache.org/repos/asf/oodt/repo
Commit: http://git-wip-us.apache.org/repos/asf/oodt/commit/d2f2d49d
Tree: http://git-wip-us.apache.org/repos/asf/oodt/tree/d2f2d49d
Diff: http://git-wip-us.apache.org/repos/asf/oodt/diff/d2f2d49d
Branch: refs/heads/master
Commit: d2f2d49d119abfaf07407422a9df1779df236027
Parents: 0133112
Author: Imesha Sudasingha <im...@gmail.com>
Authored: Thu Jul 27 22:03:48 2017 +0530
Committer: Imesha Sudasingha <im...@gmail.com>
Committed: Fri Jul 28 21:20:43 2017 +0530
----------------------------------------------------------------------
config/pom.xml | 57 +
config/src/main/assembly/assembly.xml | 31 +-
.../java/org/apache/oodt/config/Constants.java | 2 +-
.../DistributedConfigurationPublisher.java | 8 +-
.../oodt/config/distributed/cli/CLIAction.java | 14 +-
.../config/distributed/utils/CuratorUtils.java | 2 +-
config/src/main/resources/cmd-line-options.xml | 37 +-
config/src/main/resources/config-publisher.xml | 48 +-
.../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 | 2 +
.../DistributedConfigurationManagerTest.java | 3 +-
.../DistributedConfigurationPublisherTest.java | 4 +-
config/src/test/resources/config-publisher.xml | 74 +
.../src/test/resources/etc/config-publisher.xml | 61 -
28 files changed, 260 insertions(+), 6707 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/oodt/blob/d2f2d49d/config/pom.xml
----------------------------------------------------------------------
diff --git a/config/pom.xml b/config/pom.xml
index 438efc4..21d28d8 100644
--- a/config/pom.xml
+++ b/config/pom.xml
@@ -79,6 +79,63 @@
</execution>
</executions>
</plugin>
+ <plugin>
+ <artifactId>maven-resources-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>copy-filemgr-resources</id>
+ <phase>process-test-classes</phase>
+ <goals>
+ <goal>copy-resources</goal>
+ </goals>
+ <configuration>
+ <outputDirectory>${project.build.directory}/resources/examples/filemgr</outputDirectory>
+ <overwrite>true</overwrite>
+ <resources>
+ <resource>
+ <directory>../filemgr/src/main/resources/examples</directory>
+ <includes>
+ <include>**/*</include>
+ </includes>
+ </resource>
+ <resource>
+ <directory>../filemgr/src/main/resources</directory>
+ <includes>
+ <include>filemgr.properties</include>
+ <include>logging.properties</include>
+ </includes>
+ </resource>
+ </resources>
+ </configuration>
+ </execution>
+ <execution>
+ <id>copy-resource-manager-resources</id>
+ <phase>process-test-classes</phase>
+ <goals>
+ <goal>copy-resources</goal>
+ </goals>
+ <configuration>
+ <outputDirectory>${project.build.directory}/resources/examples/resmgr</outputDirectory>
+ <overwrite>true</overwrite>
+ <resources>
+ <resource>
+ <directory>../resource/src/main/resources/examples</directory>
+ <includes>
+ <include>**/*</include>
+ </includes>
+ </resource>
+ <resource>
+ <directory>../resource/src/main/resources</directory>
+ <includes>
+ <include>resource.properties</include>
+ <include>logging.properties</include>
+ </includes>
+ </resource>
+ </resources>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
</build>
</project>
http://git-wip-us.apache.org/repos/asf/oodt/blob/d2f2d49d/config/src/main/assembly/assembly.xml
----------------------------------------------------------------------
diff --git a/config/src/main/assembly/assembly.xml b/config/src/main/assembly/assembly.xml
index a6db0fc..a1bc3dd 100644
--- a/config/src/main/assembly/assembly.xml
+++ b/config/src/main/assembly/assembly.xml
@@ -55,9 +55,34 @@
</includes>
</fileSet>
<fileSet>
- <directory>${basedir}/src/main/resources/examples</directory>
- <outputDirectory>examples</outputDirectory>
- <includes/>
+ <directory>${basedir}/../filemgr/src/main/resources/examples</directory>
+ <outputDirectory>examples/filemgr</outputDirectory>
+ <includes>
+ <include>**/*</include>
+ </includes>
+ </fileSet>
+ <fileSet>
+ <directory>${basedir}/../filemgr/src/main/resources</directory>
+ <outputDirectory>examples/filemgr</outputDirectory>
+ <includes>
+ <include>filemgr.properties</include>
+ <include>logging.properties</include>
+ </includes>
+ </fileSet>
+ <fileSet>
+ <directory>${basedir}/../resource/src/main/resources/examples</directory>
+ <outputDirectory>examples/resmgr</outputDirectory>
+ <includes>
+ <include>**/*</include>
+ </includes>
+ </fileSet>
+ <fileSet>
+ <directory>${basedir}/../resource/src/main/resources</directory>
+ <outputDirectory>examples/resmgr</outputDirectory>
+ <includes>
+ <include>resource.properties</include>
+ <include>logging.properties</include>
+ </includes>
</fileSet>
</fileSets>
<dependencySets>
http://git-wip-us.apache.org/repos/asf/oodt/blob/d2f2d49d/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 0453eaa..53a1116 100644
--- a/config/src/main/java/org/apache/oodt/config/Constants.java
+++ b/config/src/main/java/org/apache/oodt/config/Constants.java
@@ -38,7 +38,7 @@ public class Constants {
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 final String DEFAULT_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 */
http://git-wip-us.apache.org/repos/asf/oodt/blob/d2f2d49d/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 81fe2af..a36aee2 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
@@ -161,7 +161,7 @@ public class DistributedConfigurationPublisher {
for (Map.Entry<String, String> entry : fileMapping.entrySet()) {
String filePath = entry.getKey();
String relativeZNodePath = entry.getValue();
- logger.info("Publishing configuration {} - {}", filePath, relativeZNodePath);
+ logger.info("Publishing configuration {} to {}", filePath, relativeZNodePath);
String content = getFileContent(filePath);
@@ -174,9 +174,9 @@ public class DistributedConfigurationPublisher {
} else {
Stat stat = client.setData().forPath(zNodePath, content.getBytes());
if (stat != null) {
- logger.info("Published configuration file {} to {}", filePath, relativeZNodePath);
+ logger.info("Replaced old published configuration at {} with content of file : {}", relativeZNodePath, filePath);
} else {
- logger.warn("Unable to publish configuration file {} to {}", filePath, relativeZNodePath);
+ logger.warn("Unable to replace published configuration at {} with file: {}", relativeZNodePath, filePath);
}
}
} else {
@@ -185,7 +185,7 @@ public class DistributedConfigurationPublisher {
* 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);
+ logger.info("Published configuration file {} to {}", filePath, relativeZNodePath);
}
}
}
http://git-wip-us.apache.org/repos/asf/oodt/blob/d2f2d49d/config/src/main/java/org/apache/oodt/config/distributed/cli/CLIAction.java
----------------------------------------------------------------------
diff --git a/config/src/main/java/org/apache/oodt/config/distributed/cli/CLIAction.java b/config/src/main/java/org/apache/oodt/config/distributed/cli/CLIAction.java
index 32fd640..1ab1b30 100644
--- a/config/src/main/java/org/apache/oodt/config/distributed/cli/CLIAction.java
+++ b/config/src/main/java/org/apache/oodt/config/distributed/cli/CLIAction.java
@@ -19,7 +19,6 @@ package org.apache.oodt.config.distributed.cli;
import org.apache.oodt.cas.cli.action.CmdLineAction;
import org.apache.oodt.cas.cli.exception.CmdLineActionException;
-import org.apache.oodt.config.Constants;
import org.apache.oodt.config.distributed.DistributedConfigurationPublisher;
import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
@@ -27,6 +26,7 @@ import org.springframework.context.support.ClassPathXmlApplicationContext;
import java.util.Map;
+import static org.apache.oodt.config.Constants.DEFAULT_CONFIG_PUBLISHER_XML;
import static org.apache.oodt.config.Constants.Properties.ZK_CONNECT_STRING;
/**
@@ -41,6 +41,8 @@ public class CLIAction extends CmdLineAction {
}
private String connectString;
+ private String configFile = DEFAULT_CONFIG_PUBLISHER_XML;
+
private Action action;
public CLIAction(Action action) {
@@ -50,7 +52,7 @@ public class CLIAction extends CmdLineAction {
@Override
public void execute(ActionMessagePrinter printer) throws CmdLineActionException {
try {
- ApplicationContext applicationContext = new ClassPathXmlApplicationContext(Constants.CONFIG_PUBLISHER_XML);
+ ApplicationContext applicationContext = new ClassPathXmlApplicationContext(configFile);
Map distributedConfigurationPublisher = applicationContext.getBeansOfType(DistributedConfigurationPublisher.class);
for (Object bean : distributedConfigurationPublisher.values()) {
@@ -113,4 +115,12 @@ public class CLIAction extends CmdLineAction {
System.setProperty(ZK_CONNECT_STRING, connectString);
this.connectString = connectString;
}
+
+ public String getConfigFile() {
+ return configFile;
+ }
+
+ public void setConfigFile(String configFile) {
+ this.configFile = configFile;
+ }
}
http://git-wip-us.apache.org/repos/asf/oodt/blob/d2f2d49d/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 6f2ff27..c559f55 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
@@ -187,7 +187,7 @@ public class CuratorUtils {
}
logger.debug("Deleted children ZNodes of {}", parentZNodePath);
} else {
- logger.warn("ZNode - {} doesn't exist. Nothing to delete");
+ logger.warn("ZNode - {} doesn't exist. Nothing to delete", parentZNodePath);
}
}
}
http://git-wip-us.apache.org/repos/asf/oodt/blob/d2f2d49d/config/src/main/resources/cmd-line-options.xml
----------------------------------------------------------------------
diff --git a/config/src/main/resources/cmd-line-options.xml b/config/src/main/resources/cmd-line-options.xml
index 9aff21e..698ad32 100644
--- a/config/src/main/resources/cmd-line-options.xml
+++ b/config/src/main/resources/cmd-line-options.xml
@@ -29,7 +29,11 @@
<property name="requirementRules">
<list>
<bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
- p:actionName="publishConfiguration" p:relation="REQUIRED"/>
+ p:actionName="publish" p:relation="REQUIRED"/>
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="clear" p:relation="REQUIRED"/>
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="verify" p:relation="REQUIRED"/>
</list>
</property>
<property name="handler">
@@ -47,4 +51,35 @@
</bean>
</property>
</bean>
+
+ <bean id="publisherXML" class="org.apache.oodt.cas.cli.option.AdvancedCmdLineOption">
+ <property name="shortOption" value="c"/>
+ <property name="longOption" value="config"/>
+ <property name="description" value="Configuration publisher spring configuration XML"/>
+ <property name="hasArgs" value="true"/>
+ <property name="requirementRules">
+ <list>
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="publish" p:relation="OPTIONAL"/>
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="clear" p:relation="OPTIONAL"/>
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="verify" 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="publish" p:methodName="setConfigFile"/>
+ <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToAction"
+ p:actionName="verify" p:methodName="setConfigFile"/>
+ <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToAction"
+ p:actionName="clear" p:methodName="setConfigFile"/>
+ </list>
+ </property>
+ </bean>
+ </property>
+ </bean>
</beans>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/oodt/blob/d2f2d49d/config/src/main/resources/config-publisher.xml
----------------------------------------------------------------------
diff --git a/config/src/main/resources/config-publisher.xml b/config/src/main/resources/config-publisher.xml
index 88ba33b..d5b387a 100644
--- a/config/src/main/resources/config-publisher.xml
+++ b/config/src/main/resources/config-publisher.xml
@@ -19,22 +19,56 @@
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 -->
+ <!-- File Manager example configuration publisher -->
<bean id="filemgr-config-publisher" class="org.apache.oodt.config.distributed.DistributedConfigurationPublisher">
<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"/>
+ <entry key="examples/filemgr/logging.properties" value="/etc/logging.properties"/>
</map>
</property>
<property name="configFiles">
<map key-type="java.lang.String" value-type="java.lang.String">
- <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"/>
+ <!-- Examples - Core-->
+ <entry key="examples/filemgr/core/elements.xml" value="/policy/core/elements.xml"/>
+ <entry key="examples/filemgr/core/product-types.xml" value="/policy/core/product-types.xml"/>
+ <entry key="examples/filemgr/core/product-type-element-map.xml" value="/policy/core/product-type-element-map.xml"/>
+
+ <!-- Examples - Geo-->
+ <entry key="examples/filemgr/geo/elements.xml" value="/policy/geo/elements.xml"/>
+ <entry key="examples/filemgr/geo/product-types.xml" value="/policy/geo/product-types.xml"/>
+ <entry key="examples/filemgr/geo/product-type-element-map.xml" value="/policy/geo/product-type-element-map.xml"/>
+
+ <!-- Examples - Trace-->
+ <entry key="examples/filemgr/trace/elements.xml" value="/policy/trace/elements.xml"/>
+ <entry key="examples/filemgr/trace/product-types.xml" value="/policy/trace/product-types.xml"/>
+ <entry key="examples/filemgr/trace/product-type-element-map.xml" value="/policy/trace/product-type-element-map.xml"/>
+ </map>
+ </property>
+ </bean>
+
+ <!-- Resource Manager example configuration publisher -->
+ <bean id="resmgr-config-publisher" class="org.apache.oodt.config.distributed.DistributedConfigurationPublisher">
+ <constructor-arg value="RESOURCE_MANAGER"/>
+ <property name="propertiesFiles">
+ <map key-type="java.lang.String" value-type="java.lang.String">
+ <entry key="examples/resmgr/resource.properties" value="/etc/resource.properties"/>
+ <entry key="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="examples/resmgr/node-to-queue-mapping.xml" value="/policy/node-to-queue-mapping.xml"/>
+ <entry key="examples/resmgr/nodes.xml" value="/policy/nodes.xml"/>
+ <entry key="examples/resmgr/queue-to-backend-mapping.xml" value="/policy/queue-to-backend-mapping.xml"/>
+
+ <entry key="examples/resmgr/jobs/exJob.xml" value="/policy/jobs/exJob.xml"/>
+ <entry key="examples/resmgr/jobs/exLongJob.xml" value="/policy/jobs/exLongJob.xml"/>
+ <entry key="examples/resmgr/jobs/exPalindrome.xml" value="/policy/jobs/exPalindrome.xml"/>
+ <entry key="examples/resmgr/jobs/exSparkJob.xml" value="/policy/jobs/exSparkJob.xml"/>
+ <entry key="examples/resmgr/jobs/exSparkPalindrome.xml" value="/policy/jobs/exSparkPalindrome.xml"/>
+ <entry key="examples/resmgr/jobs/exStreamingPalindrome.xml" value="/policy/jobs/exStreamingPalindrome.xml"/>
</map>
</property>
</bean>
http://git-wip-us.apache.org/repos/asf/oodt/blob/d2f2d49d/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
deleted file mode 100755
index cf66c9d..0000000
--- a/config/src/main/resources/examples/filemgr/cmd-line-actions.xml
+++ /dev/null
@@ -1,123 +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.
-
- 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/d2f2d49d/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
deleted file mode 100755
index 227def2..0000000
--- a/config/src/main/resources/examples/filemgr/cmd-line-options.xml
+++ /dev/null
@@ -1,1175 +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.
-
- 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/d2f2d49d/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
deleted file mode 100644
index 4d8d957..0000000
--- a/config/src/main/resources/examples/filemgr/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
[09/52] [abbrv] 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>
[16/52] [abbrv] 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/master
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"));
[26/52] [abbrv] 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/master
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(-)
----------------------------------------------------------------------
[31/52] [abbrv] 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/master
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">
[43/52] [abbrv] oodt git commit: Added a File Manager test with
distributed configuration management
Posted by ma...@apache.org.
Added a File Manager test with distributed configuration management
Project: http://git-wip-us.apache.org/repos/asf/oodt/repo
Commit: http://git-wip-us.apache.org/repos/asf/oodt/commit/e32f2bb0
Tree: http://git-wip-us.apache.org/repos/asf/oodt/tree/e32f2bb0
Diff: http://git-wip-us.apache.org/repos/asf/oodt/diff/e32f2bb0
Branch: refs/heads/master
Commit: e32f2bb0cec2c5908ce81bd55cf602d1655ad6fc
Parents: d2f2d49
Author: Imesha Sudasingha <im...@gmail.com>
Authored: Sat Jul 29 20:51:35 2017 +0530
Committer: Imesha Sudasingha <im...@gmail.com>
Committed: Sat Jul 29 20:51:35 2017 +0530
----------------------------------------------------------------------
config/pom.xml | 3 +-
.../AbstractDistributedConfigurationTest.java | 51 +++++
.../AbstractDistributedConfigurationTest.java | 53 -----
.../DistributedConfigurationManagerTest.java | 23 ++-
.../DistributedConfigurationPublisherTest.java | 17 ++
core/pom.xml | 7 +-
filemgr/pom.xml | 4 +-
.../TestDistributedXmlRpcFileManager.java | 200 +++++++++++++++++++
.../distributed/config/cmd-line-actions.xml | 38 ++++
.../distributed/config/cmd-line-options.xml | 85 ++++++++
.../distributed/config/config-publisher.xml | 42 ++++
.../distributed/config/filemgr.properties | 157 +++++++++++++++
filemgr/src/test/resources/filemgr.properties | 155 --------------
13 files changed, 614 insertions(+), 221 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/oodt/blob/e32f2bb0/config/pom.xml
----------------------------------------------------------------------
diff --git a/config/pom.xml b/config/pom.xml
index 21d28d8..3380848 100644
--- a/config/pom.xml
+++ b/config/pom.xml
@@ -35,7 +35,6 @@
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
- <scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
@@ -138,4 +137,4 @@
</plugin>
</plugins>
</build>
-</project>
+</project>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/oodt/blob/e32f2bb0/config/src/main/java/org/apache/oodt/config/test/AbstractDistributedConfigurationTest.java
----------------------------------------------------------------------
diff --git a/config/src/main/java/org/apache/oodt/config/test/AbstractDistributedConfigurationTest.java b/config/src/main/java/org/apache/oodt/config/test/AbstractDistributedConfigurationTest.java
new file mode 100644
index 0000000..f8d421e
--- /dev/null
+++ b/config/src/main/java/org/apache/oodt/config/test/AbstractDistributedConfigurationTest.java
@@ -0,0 +1,51 @@
+/*
+ * 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.test;
+
+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 {
+ System.clearProperty(ZK_CONNECT_STRING);
+
+ client.close();
+ zookeeper.stop();
+ }
+}
http://git-wip-us.apache.org/repos/asf/oodt/blob/e32f2bb0/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
deleted file mode 100644
index 27174ba..0000000
--- a/config/src/test/java/org/apache/oodt/config/distributed/AbstractDistributedConfigurationTest.java
+++ /dev/null
@@ -1,53 +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 AbstractDistributedConfigurationTest {
-
- protected static final String CONFIG_PUBLISHER_XML = "config-publisher.xml";
-
- 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());
- System.setProperty("org.apache.oodt.cas.cli.action.spring.config", "src/main/resources/cmd-line-actions.xml");
- System.setProperty("org.apache.oodt.cas.cli.option.spring.config", "src/main/resources/cmd-line-options.xml");
-
- 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/e32f2bb0/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 d96767b..064d1c6 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
@@ -21,9 +21,10 @@ import org.apache.commons.io.FileUtils;
import org.apache.oodt.config.ConfigurationManager;
import org.apache.oodt.config.distributed.cli.ConfigPublisher;
import org.apache.oodt.config.distributed.utils.FilePathUtils;
-import org.junit.AfterClass;
+import org.apache.oodt.config.test.AbstractDistributedConfigurationTest;
+import org.junit.After;
import org.junit.Assert;
-import org.junit.BeforeClass;
+import org.junit.Before;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
@@ -49,11 +50,14 @@ import static org.junit.Assert.fail;
*/
public class DistributedConfigurationManagerTest extends AbstractDistributedConfigurationTest {
- protected static List<DistributedConfigurationPublisher> publishers;
+ private static final String CONFIG_PUBLISHER_XML = "config-publisher.xml";
- @BeforeClass
- public static void setUp() throws Exception {
- AbstractDistributedConfigurationTest.setUp();
+ private List<DistributedConfigurationPublisher> publishers;
+
+ @Before
+ public void setUpTest() throws Exception {
+ System.setProperty("org.apache.oodt.cas.cli.action.spring.config", "src/main/resources/cmd-line-actions.xml");
+ System.setProperty("org.apache.oodt.cas.cli.option.spring.config", "src/main/resources/cmd-line-options.xml");
ConfigPublisher.main(new String[]{
"-connectString", zookeeper.getConnectString(),
@@ -113,8 +117,8 @@ public class DistributedConfigurationManagerTest extends AbstractDistributedConf
}
}
- @AfterClass
- public static void tearDown() throws Exception {
+ @After
+ public void tearDownTest() throws Exception {
for (DistributedConfigurationPublisher publisher : publishers) {
publisher.destroy();
@@ -144,6 +148,7 @@ public class DistributedConfigurationManagerTest extends AbstractDistributedConf
"-a", "clear"
});
- AbstractDistributedConfigurationTest.tearDown();
+ System.clearProperty("org.apache.oodt.cas.cli.action.spring.config");
+ System.clearProperty("org.apache.oodt.cas.cli.option.spring.config");
}
}
http://git-wip-us.apache.org/repos/asf/oodt/blob/e32f2bb0/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 24a43e3..b77683c 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
@@ -19,7 +19,10 @@ package org.apache.oodt.config.distributed;
import org.apache.commons.io.FileUtils;
import org.apache.oodt.config.distributed.cli.ConfigPublisher;
+import org.apache.oodt.config.test.AbstractDistributedConfigurationTest;
+import org.junit.After;
import org.junit.Assert;
+import org.junit.Before;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
@@ -36,6 +39,20 @@ import java.util.Map;
*/
public class DistributedConfigurationPublisherTest extends AbstractDistributedConfigurationTest {
+ private static final String CONFIG_PUBLISHER_XML = "config-publisher.xml";
+
+ @Before
+ public void setUpTest() {
+ System.setProperty("org.apache.oodt.cas.cli.action.spring.config", "src/main/resources/cmd-line-actions.xml");
+ System.setProperty("org.apache.oodt.cas.cli.option.spring.config", "src/main/resources/cmd-line-options.xml");
+ }
+
+ @After
+ public void tearDownTest() {
+ System.clearProperty("org.apache.oodt.cas.cli.action.spring.config");
+ System.clearProperty("org.apache.oodt.cas.cli.option.spring.config");
+ }
+
@Test
public void publishConfigurationTest() throws Exception {
// Publishing configuration through CLI and verifying whether they were stored correctly
http://git-wip-us.apache.org/repos/asf/oodt/blob/e32f2bb0/core/pom.xml
----------------------------------------------------------------------
diff --git a/core/pom.xml b/core/pom.xml
index 118d171..b9f07e1 100644
--- a/core/pom.xml
+++ b/core/pom.xml
@@ -251,7 +251,6 @@ the License.
<groupId>org.apache.curator</groupId>
<artifactId>curator-test</artifactId>
<version>3.3.0</version>
- <scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
@@ -413,6 +412,12 @@ the License.
<groupId>org.apache.solr</groupId>
<artifactId>solr-solrj</artifactId>
<version>6.2.1</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.apache.zookeeper</groupId>
+ <artifactId>zookeeper</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
<groupId>org.apache.tika</groupId>
http://git-wip-us.apache.org/repos/asf/oodt/blob/e32f2bb0/filemgr/pom.xml
----------------------------------------------------------------------
diff --git a/filemgr/pom.xml b/filemgr/pom.xml
index 7e39f46..84d6198 100644
--- a/filemgr/pom.xml
+++ b/filemgr/pom.xml
@@ -116,7 +116,6 @@
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-queryparser</artifactId>
</dependency>
-
<dependency>
<groupId>org.apache.oodt</groupId>
<artifactId>cas-cli</artifactId>
@@ -236,6 +235,9 @@
<value>src/test/resources/test.logging.properties</value>
</property>
</systemProperties>
+ <environmentVariables>
+ <OODT_FILEMGR_HOME>${project.basedir}</OODT_FILEMGR_HOME>
+ </environmentVariables>
<forkedProcessTimeoutInSeconds>0</forkedProcessTimeoutInSeconds>
<redirectTestOutputToFile>true</redirectTestOutputToFile>
<includes>
http://git-wip-us.apache.org/repos/asf/oodt/blob/e32f2bb0/filemgr/src/test/java/org/apache/oodt/cas/filemgr/config/distributed/TestDistributedXmlRpcFileManager.java
----------------------------------------------------------------------
diff --git a/filemgr/src/test/java/org/apache/oodt/cas/filemgr/config/distributed/TestDistributedXmlRpcFileManager.java b/filemgr/src/test/java/org/apache/oodt/cas/filemgr/config/distributed/TestDistributedXmlRpcFileManager.java
new file mode 100644
index 0000000..afbac03
--- /dev/null
+++ b/filemgr/src/test/java/org/apache/oodt/cas/filemgr/config/distributed/TestDistributedXmlRpcFileManager.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.cas.filemgr.config.distributed;
+
+import org.apache.oodt.cas.filemgr.ingest.StdIngester;
+import org.apache.oodt.cas.filemgr.metadata.CoreMetKeys;
+import org.apache.oodt.cas.filemgr.metadata.ProductMetKeys;
+import org.apache.oodt.cas.filemgr.structs.Product;
+import org.apache.oodt.cas.filemgr.structs.exceptions.CatalogException;
+import org.apache.oodt.cas.filemgr.system.XmlRpcFileManager;
+import org.apache.oodt.cas.filemgr.system.XmlRpcFileManagerClient;
+import org.apache.oodt.cas.metadata.Metadata;
+import org.apache.oodt.cas.metadata.SerializableMetadata;
+import org.apache.oodt.config.distributed.cli.ConfigPublisher;
+import org.apache.oodt.config.test.AbstractDistributedConfigurationTest;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.net.URL;
+import java.util.Collections;
+
+import static org.apache.oodt.config.Constants.Properties.ENABLE_DISTRIBUTED_CONFIGURATION;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+public class TestDistributedXmlRpcFileManager extends AbstractDistributedConfigurationTest {
+
+ private static final int FM_PORT = 9001;
+ private static final String CONF_PUBLISHER_XML = "distributed/config/config-publisher.xml";
+ private static final String TRANSFER_SERVICE_FACTORY_CLASS = "org.apache.oodt.cas.filemgr.datatransfer.LocalDataTransferFactory";
+
+ private XmlRpcFileManager fileManager;
+
+ @Before
+ public void setUpTest() throws Exception {
+ System.setProperty("org.apache.oodt.cas.cli.action.spring.config", "src/test/resources/distributed/config/cmd-line-actions.xml");
+ System.setProperty("org.apache.oodt.cas.cli.option.spring.config", "src/test/resources/distributed/config/cmd-line-options.xml");
+ System.setProperty(ENABLE_DISTRIBUTED_CONFIGURATION, "true");
+
+ ConfigPublisher.main(new String[]{
+ "-connectString", zookeeper.getConnectString(),
+ "-config", CONF_PUBLISHER_XML,
+ "-a", "publish"
+ });
+
+ try {
+ fileManager = new XmlRpcFileManager(FM_PORT);
+ } catch (Exception e) {
+ fail(e.getMessage());
+ }
+
+ ingestFile();
+ }
+
+ @Test
+ public void testDistributedConfigurationWithFileManager() {
+ XmlRpcFileManagerClient fmc = null;
+ try {
+ fmc = new XmlRpcFileManagerClient(new URL("http://localhost:" + FM_PORT));
+ } catch (Exception e) {
+ fail(e.getMessage());
+ }
+
+ Metadata met = null;
+ try {
+ met = fmc.getMetadata(fmc.getProductByName("test.txt"));
+ } catch (CatalogException e) {
+ fail(e.getMessage());
+ }
+
+ assertNotNull(met);
+ assertTrue(met.containsKey(ProductMetKeys.PRODUCT_ID));
+ assertNotNull(met.getMetadata(ProductMetKeys.PRODUCT_ID));
+ assertTrue(met.containsKey(ProductMetKeys.PRODUCT_NAME));
+ assertNotNull(met.getMetadata(ProductMetKeys.PRODUCT_NAME));
+ assertTrue(met.containsKey(ProductMetKeys.PRODUCT_STRUCTURE));
+ assertEquals("Flat", met.getMetadata(ProductMetKeys.PRODUCT_STRUCTURE));
+ assertTrue(met.containsKey(ProductMetKeys.PRODUCT_TRANSFER_STATUS));
+ assertEquals(Product.STATUS_RECEIVED, met.getMetadata(ProductMetKeys.PRODUCT_TRANSFER_STATUS));
+
+ assertTrue(met.containsKey(ProductMetKeys.PRODUCT_ORIG_REFS));
+ assertTrue(met.containsKey(ProductMetKeys.PRODUCT_DATASTORE_REFS));
+ assertTrue(met.containsKey(ProductMetKeys.PRODUCT_FILE_SIZES));
+ assertTrue(met.containsKey(ProductMetKeys.PRODUCT_MIME_TYPES));
+
+ assertEquals(1, met.getAllMetadata(ProductMetKeys.PRODUCT_ORIG_REFS).size());
+ assertEquals(1, met.getAllMetadata(ProductMetKeys.PRODUCT_DATASTORE_REFS).size());
+ assertEquals(1, met.getAllMetadata(ProductMetKeys.PRODUCT_FILE_SIZES).size());
+ assertEquals(1, met.getAllMetadata(ProductMetKeys.PRODUCT_MIME_TYPES).size());
+
+ URL refUrl = this.getClass().getResource("/ingest/test.txt");
+
+ String origPath = null;
+ try {
+ origPath = new File(refUrl.getFile()).getCanonicalPath();
+ } catch (IOException e) {
+ fail(e.getMessage());
+ }
+ assertEquals(origPath, met.getMetadata(ProductMetKeys.PRODUCT_ORIG_REFS));
+ assertEquals("/tmp/test.txt/test.txt", met.getMetadata(ProductMetKeys.PRODUCT_DATASTORE_REFS));
+
+ assertNotNull(met.getMetadata(ProductMetKeys.PRODUCT_FILE_SIZES));
+ assertEquals("text/plain", met.getMetadata(ProductMetKeys.PRODUCT_MIME_TYPES));
+
+ try {
+ met = fmc.getReducedMetadata(fmc.getProductByName("test.txt"), Collections.EMPTY_LIST);
+ } catch (CatalogException e) {
+ fail(e.getMessage());
+ }
+
+ assertNotNull(met);
+ assertTrue(met.containsKey(ProductMetKeys.PRODUCT_ID));
+ assertNotNull(met.getMetadata(ProductMetKeys.PRODUCT_ID));
+ assertTrue(met.containsKey(ProductMetKeys.PRODUCT_NAME));
+ assertNotNull(met.getMetadata(ProductMetKeys.PRODUCT_NAME));
+ assertTrue(met.containsKey(ProductMetKeys.PRODUCT_STRUCTURE));
+ assertEquals("Flat", met.getMetadata(ProductMetKeys.PRODUCT_STRUCTURE));
+ assertTrue(met.containsKey(ProductMetKeys.PRODUCT_TRANSFER_STATUS));
+ assertEquals(Product.STATUS_RECEIVED, met.getMetadata(ProductMetKeys.PRODUCT_TRANSFER_STATUS));
+
+ assertTrue(met.containsKey(ProductMetKeys.PRODUCT_ORIG_REFS));
+ assertTrue(met.containsKey(ProductMetKeys.PRODUCT_DATASTORE_REFS));
+ assertTrue(met.containsKey(ProductMetKeys.PRODUCT_FILE_SIZES));
+ assertTrue(met.containsKey(ProductMetKeys.PRODUCT_MIME_TYPES));
+
+ assertEquals(1, met.getAllMetadata(ProductMetKeys.PRODUCT_ORIG_REFS).size());
+ assertEquals(1, met.getAllMetadata(ProductMetKeys.PRODUCT_DATASTORE_REFS).size());
+ assertEquals(1, met.getAllMetadata(ProductMetKeys.PRODUCT_FILE_SIZES).size());
+ assertEquals(1, met.getAllMetadata(ProductMetKeys.PRODUCT_MIME_TYPES).size());
+
+ origPath = null;
+ try {
+ origPath = new File(refUrl.getFile()).getCanonicalPath();
+ } catch (IOException e) {
+ fail(e.getMessage());
+ }
+ assertEquals(origPath, met.getMetadata(ProductMetKeys.PRODUCT_ORIG_REFS));
+ assertEquals("/tmp/test.txt/test.txt", met.getMetadata(ProductMetKeys.PRODUCT_DATASTORE_REFS));
+
+ assertNotNull(met.getMetadata(ProductMetKeys.PRODUCT_FILE_SIZES));
+ assertEquals("text/plain", met.getMetadata(ProductMetKeys.PRODUCT_MIME_TYPES));
+ }
+
+ private void ingestFile() {
+ StdIngester ingester = new StdIngester(TRANSFER_SERVICE_FACTORY_CLASS);
+
+ try {
+ URL ingestUrl = this.getClass().getResource("/ingest");
+ URL refUrl = this.getClass().getResource("/ingest/test.txt");
+ URL metUrl = this.getClass().getResource("/ingest/test.txt.met");
+ Metadata prodMet = new SerializableMetadata(new FileInputStream(new File(metUrl.getFile())));
+
+ // now add the right file location
+ prodMet.addMetadata(CoreMetKeys.FILE_LOCATION, new File(ingestUrl.getFile()).getCanonicalPath());
+ prodMet.addMetadata(CoreMetKeys.FILENAME, "test.txt");
+ prodMet.addMetadata(CoreMetKeys.PRODUCT_TYPE, "GenericFile");
+ ingester.ingest(new URL("http://localhost:" + FM_PORT), new File(refUrl.getFile()), prodMet);
+ } catch (Exception e) {
+ fail(e.getMessage());
+ }
+ }
+
+ @After
+ public void tearDownTest() throws Exception {
+ if (fileManager != null) {
+ fileManager.shutdown();
+ }
+
+ ConfigPublisher.main(new String[]{
+ "-connectString", zookeeper.getConnectString(),
+ "-config", CONF_PUBLISHER_XML,
+ "-a", "clear"
+ });
+
+ System.clearProperty("org.apache.oodt.cas.cli.action.spring.config");
+ System.clearProperty("org.apache.oodt.cas.cli.option.spring.config");
+ System.clearProperty(ENABLE_DISTRIBUTED_CONFIGURATION);
+ }
+}
http://git-wip-us.apache.org/repos/asf/oodt/blob/e32f2bb0/filemgr/src/test/resources/distributed/config/cmd-line-actions.xml
----------------------------------------------------------------------
diff --git a/filemgr/src/test/resources/distributed/config/cmd-line-actions.xml b/filemgr/src/test/resources/distributed/config/cmd-line-actions.xml
new file mode 100644
index 0000000..08f5415
--- /dev/null
+++ b/filemgr/src/test/resources/distributed/config/cmd-line-actions.xml
@@ -0,0 +1,38 @@
+<?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.
+ -->
+
+<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="publish" class="org.apache.oodt.config.distributed.cli.CLIAction">
+ <constructor-arg value="PUBLISH"/>
+ <property name="description" value="Publishes configuration to zookeeper"/>
+ </bean>
+
+ <bean id="verify" class="org.apache.oodt.config.distributed.cli.CLIAction">
+ <constructor-arg value="VERIFY"/>
+ <property name="description" value="Verifies configuration published to zookeeper"/>
+ </bean>
+
+ <bean id="clear" class="org.apache.oodt.config.distributed.cli.CLIAction">
+ <constructor-arg value="CLEAR"/>
+ <property name="description" value="Clears all published configuration from zookeeper"/>
+ </bean>
+</beans>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/oodt/blob/e32f2bb0/filemgr/src/test/resources/distributed/config/cmd-line-options.xml
----------------------------------------------------------------------
diff --git a/filemgr/src/test/resources/distributed/config/cmd-line-options.xml b/filemgr/src/test/resources/distributed/config/cmd-line-options.xml
new file mode 100644
index 0000000..698ad32
--- /dev/null
+++ b/filemgr/src/test/resources/distributed/config/cmd-line-options.xml
@@ -0,0 +1,85 @@
+<?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.
+ -->
+
+<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="connectStringOption" class="org.apache.oodt.cas.cli.option.AdvancedCmdLineOption">
+ <property name="shortOption" value="cs"/>
+ <property name="longOption" value="connectString"/>
+ <property name="description" value="Connect String to Zookeeper (ip1:port1,ip2:port2,..)"/>
+ <property name="hasArgs" value="true"/>
+ <property name="requirementRules">
+ <list>
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="publish" p:relation="REQUIRED"/>
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="clear" p:relation="REQUIRED"/>
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="verify" 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="publish" p:methodName="setConnectString"/>
+ <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToAction"
+ p:actionName="verify" p:methodName="setConnectString"/>
+ <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToAction"
+ p:actionName="clear" p:methodName="setConnectString"/>
+ </list>
+ </property>
+ </bean>
+ </property>
+ </bean>
+
+ <bean id="publisherXML" class="org.apache.oodt.cas.cli.option.AdvancedCmdLineOption">
+ <property name="shortOption" value="c"/>
+ <property name="longOption" value="config"/>
+ <property name="description" value="Configuration publisher spring configuration XML"/>
+ <property name="hasArgs" value="true"/>
+ <property name="requirementRules">
+ <list>
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="publish" p:relation="OPTIONAL"/>
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="clear" p:relation="OPTIONAL"/>
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="verify" 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="publish" p:methodName="setConfigFile"/>
+ <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToAction"
+ p:actionName="verify" p:methodName="setConfigFile"/>
+ <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToAction"
+ p:actionName="clear" p:methodName="setConfigFile"/>
+ </list>
+ </property>
+ </bean>
+ </property>
+ </bean>
+</beans>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/oodt/blob/e32f2bb0/filemgr/src/test/resources/distributed/config/config-publisher.xml
----------------------------------------------------------------------
diff --git a/filemgr/src/test/resources/distributed/config/config-publisher.xml b/filemgr/src/test/resources/distributed/config/config-publisher.xml
new file mode 100644
index 0000000..19e9f8c
--- /dev/null
+++ b/filemgr/src/test/resources/distributed/config/config-publisher.xml
@@ -0,0 +1,42 @@
+<!--
+ ~ 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="FILE_MANAGER"/>
+ <property name="propertiesFiles">
+ <map key-type="java.lang.String" value-type="java.lang.String">
+ <entry key="src/test/resources/distributed/config/filemgr.properties" value="target/filemgr/etc/filemgr.properties"/>
+ <entry key="src/test/resources/test.logging.properties" value="target/filemgr/etc/logging.properties"/>
+ </map>
+ </property>
+ <property name="configFiles">
+ <map key-type="java.lang.String" value-type="java.lang.String">
+ <!-- Examples - Core-->
+ <entry key="src/test/resources/ingest/fmpolicy/elements.xml" value="target/filemgr/policy/oodt/elements.xml"/>
+ <entry key="src/test/resources/ingest/fmpolicy/product-types.xml" value="target/filemgr/policy/oodt/product-types.xml"/>
+ <entry key="src/test/resources/ingest/fmpolicy/product-type-element-map.xml" value="target/filemgr/policy/oodt/product-type-element-map.xml"/>
+
+ <!-- Mime types XML -->
+ <entry key="src/test/resources/mime-types.xml" value="target/filemgr/policy/mime-types.xml"/>
+ </map>
+ </property>
+ </bean>
+</beans>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/oodt/blob/e32f2bb0/filemgr/src/test/resources/distributed/config/filemgr.properties
----------------------------------------------------------------------
diff --git a/filemgr/src/test/resources/distributed/config/filemgr.properties b/filemgr/src/test/resources/distributed/config/filemgr.properties
new file mode 100644
index 0000000..50d09a7
--- /dev/null
+++ b/filemgr/src/test/resources/distributed/config/filemgr.properties
@@ -0,0 +1,157 @@
+#
+# 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.
+#
+
+# Test Configuration properties for the File Manager
+
+# repository factory
+filemgr.repository.factory=org.apache.oodt.cas.filemgr.repository.XMLRepositoryManagerFactory
+
+# 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
+
+# data source catalog configuration
+org.apache.oodt.cas.filemgr.catalog.datasource.jdbc.url=jdbc:hsqldb:hsql://localhost/test
+org.apache.oodt.cas.filemgr.catalog.datasource.jdbc.user=sa
+org.apache.oodt.cas.filemgr.catalog.datasource.jdbc.pass=
+org.apache.oodt.cas.filemgr.catalog.datasource.jdbc.driver=org.hsqldb.jdbc.JDBCDriver
+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
+org.apache.oodt.cas.filemgr.catalog.datasource.orderedValues=false
+# set the following property to 'true' to allow dynamic metadata fields,
+# effectively bypassing the validation layer.
+# by default the property is false
+#org.apache.oodt.cas.filemgr.catalog.datasource.lenientFields=true
+# set the following property to true to enable the column "product_id"
+# in table "products" to be of type string
+#org.apache.oodt.cas.filemgr.catalog.datasource.productId.string=false
+
+
+# mapped data source catalog configuration
+org.apache.oodt.cas.filemgr.catalog.mappeddatasource.mapFile=/path/to/ops.catalog.typemap.properties
+
+# science data catalog configuration
+org.apache.oodt.cas.filemgr.catalog.science.jdbc.url=jdbc:hsqldb:hsql://localhost/test
+org.apache.oodt.cas.filemgr.catalog.science.jdbc.user=sa
+org.apache.oodt.cas.filemgr.catalog.science.jdbc.pass=
+org.apache.oodt.cas.filemgr.catalog.science.jdbc.driver=org.hsqldb.jdbc.JDBCDriver
+
+# lucene catalog configuration
+org.apache.oodt.cas.filemgr.catalog.lucene.idxPath=file:target/tmp
+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
+
+# solr catalog configuration
+org.apache.oodt.cas.filemgr.catalog.solr.url=http://localhost:8983/solr
+#org.apache.oodt.cas.filemgr.catalog.solr.url=http://localhost:8080/solr
+org.apache.oodt.cas.filemgr.catalog.solr.productSerializer=org.apache.oodt.cas.filemgr.catalog.solr.DefaultProductSerializer
+org.apache.oodt.cas.filemgr.catalog.solr.productIdGenerator=org.apache.oodt.cas.filemgr.catalog.solr.UUIDProductIdGenerator
+#org.apache.oodt.cas.filemgr.catalog.solr.productIdGenerator=org.apache.oodt.cas.filemgr.catalog.solr.NameProductIdGenerator
+
+
+# data source repository manager configuration
+org.apache.oodt.cas.filemgr.repositorymgr.datasource.jdbc.url=jdbc:hsqldb:hsql://localhost/test
+org.apache.oodt.cas.filemgr.repositorymgr.datasource.jdbc.user=sa
+org.apache.oodt.cas.filemgr.repositorymgr.datasource.jdbc.pass=
+org.apache.oodt.cas.filemgr.repositorymgr.datasource.jdbc.driver=org.hsqldb.jdbc.JDBCDriver
+
+# science data repository manager configuration
+org.apache.oodt.cas.filemgr.repositorymgr.science.jdbc.url=jdbc:hsqldb:hsql://localhost/test
+org.apache.oodt.cas.filemgr.repositorymgr.science.jdbc.user=sa
+org.apache.oodt.cas.filemgr.repositorymgr.science.jdbc.pass=
+org.apache.oodt.cas.filemgr.repositorymgr.science.jdbc.driver=org.hsqldb.jdbc.JDBCDriver
+
+# XML repository manager configuration
+org.apache.oodt.cas.filemgr.repositorymgr.dirs=file:[OODT_FILEMGR_HOME]/target/filemgr/policy/oodt
+
+# XML validation layer configuration
+org.apache.oodt.cas.filemgr.validation.dirs=file:[OODT_FILEMGR_HOME]/target/filemgr/policy/oodt
+
+# set the following property to 'true' to allow dynamic metadata fields,
+# effectively bypassing the validation layer.
+# by default the property is false
+#org.apache.oodt.cas.filemgr.catalog.lucene.lenientFields=true
+
+# data source validation layer configuration
+org.apache.oodt.cas.filemgr.validation.datasource.jdbc.url=jdbc:hsqldb:hsql://localhost/test
+org.apache.oodt.cas.filemgr.validation.datasource.jdbc.user=sa
+org.apache.oodt.cas.filemgr.validation.datasource.jdbc.pass=
+org.apache.oodt.cas.filemgr.validation.datasource.jdbc.driver=org.hsqldb.jdbc.JDBCDriver
+org.apache.oodt.cas.filemgr.validation.datasource.quoteFields=false
+
+# science data validation layer configuration
+org.apache.oodt.cas.filemgr.validation.science.jdbc.url=jdbc:hsqldb:hsql://localhost/test
+org.apache.oodt.cas.filemgr.validation.science.jdbc.user=sa
+org.apache.oodt.cas.filemgr.validation.science.jdbc.pass=
+org.apache.oodt.cas.filemgr.validation.science.jdbc.driver=org.hsqldb.jdbc.JDBCDriver
+
+# remote data transfer configuration
+org.apache.oodt.cas.filemgr.datatransfer.remote.chunkSize=1024
+
+# Amazon S3 data transfer configuration.
+# Region can be any of the values found here:
+# http://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/regions/Regions.html
+org.apache.oodt.cas.filemgr.datatransfer.s3.bucket.name=some_bucket_name
+org.apache.oodt.cas.filemgr.datatransfer.s3.region=EU_WEST_1
+org.apache.oodt.cas.filemgr.datatransfer.s3.access.key=s3_access_key
+org.apache.oodt.cas.filemgr.datatransfer.s3.secret.key=s3_secret_key
+
+# location of Mime-Type repository
+org.apache.oodt.cas.filemgr.mime.type.repository=[OODT_FILEMGR_HOME]/target/filemgr/policy/mime-types.xml
+
+# 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=true
+
+# ConfigurableMetadataBasedVersioning configuration
+#org.apache.oodt.cas.filemgr.versioning.configuration.all_product_types=[Year]/[Month]/[Filename]
+#org.apache.oodt.cas.filemgr.versioning.configuration.<product_type>=[Year]/[Month]/[Filename]
+
+# Enable to use only server-side versioning.
+#org.apache.oodt.cas.filemgr.serverside.versioning=true
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/oodt/blob/e32f2bb0/filemgr/src/test/resources/filemgr.properties
----------------------------------------------------------------------
diff --git a/filemgr/src/test/resources/filemgr.properties b/filemgr/src/test/resources/filemgr.properties
index d79896a..4c9b885 100644
--- a/filemgr/src/test/resources/filemgr.properties
+++ b/filemgr/src/test/resources/filemgr.properties
@@ -152,159 +152,4 @@ org.apache.oodt.cas.filemgr.metadata.expandProduct=false
#org.apache.oodt.cas.filemgr.versioning.configuration.<product_type>=[Year]/[Month]/[Filename]
# Enable to use only server-side versioning.
-#org.apache.oodt.cas.filemgr.serverside.versioning=true
-# 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.
-
-# Test Configuration properties for the File Manager
-
-# repository factory
-filemgr.repository.factory=org.apache.oodt.cas.filemgr.repository.XMLRepositoryManagerFactory
-
-# 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
-
-# data source catalog configuration
-org.apache.oodt.cas.filemgr.catalog.datasource.jdbc.url=jdbc:hsqldb:hsql://localhost/test
-org.apache.oodt.cas.filemgr.catalog.datasource.jdbc.user=sa
-org.apache.oodt.cas.filemgr.catalog.datasource.jdbc.pass=
-org.apache.oodt.cas.filemgr.catalog.datasource.jdbc.driver=org.hsqldb.jdbc.JDBCDriver
-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
-org.apache.oodt.cas.filemgr.catalog.datasource.orderedValues=false
-# set the following property to 'true' to allow dynamic metadata fields,
-# effectively bypassing the validation layer.
-# by default the property is false
-#org.apache.oodt.cas.filemgr.catalog.datasource.lenientFields=true
-# set the following property to true to enable the column "product_id"
-# in table "products" to be of type string
-#org.apache.oodt.cas.filemgr.catalog.datasource.productId.string=false
-
-
-# mapped data source catalog configuration
-org.apache.oodt.cas.filemgr.catalog.mappeddatasource.mapFile=/path/to/ops.catalog.typemap.properties
-
-# science data catalog configuration
-org.apache.oodt.cas.filemgr.catalog.science.jdbc.url=jdbc:hsqldb:hsql://localhost/test
-org.apache.oodt.cas.filemgr.catalog.science.jdbc.user=sa
-org.apache.oodt.cas.filemgr.catalog.science.jdbc.pass=
-org.apache.oodt.cas.filemgr.catalog.science.jdbc.driver=org.hsqldb.jdbc.JDBCDriver
-
-# lucene catalog configuration
-org.apache.oodt.cas.filemgr.catalog.lucene.idxPath=file:/testdata/
-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
-
-# solr catalog configuration
-org.apache.oodt.cas.filemgr.catalog.solr.url=http://localhost:8983/solr
-#org.apache.oodt.cas.filemgr.catalog.solr.url=http://localhost:8080/solr
-org.apache.oodt.cas.filemgr.catalog.solr.productSerializer=org.apache.oodt.cas.filemgr.catalog.solr.DefaultProductSerializer
-org.apache.oodt.cas.filemgr.catalog.solr.productIdGenerator=org.apache.oodt.cas.filemgr.catalog.solr.UUIDProductIdGenerator
-#org.apache.oodt.cas.filemgr.catalog.solr.productIdGenerator=org.apache.oodt.cas.filemgr.catalog.solr.NameProductIdGenerator
-
-
-# data source repository manager configuration
-org.apache.oodt.cas.filemgr.repositorymgr.datasource.jdbc.url=jdbc:hsqldb:hsql://localhost/test
-org.apache.oodt.cas.filemgr.repositorymgr.datasource.jdbc.user=sa
-org.apache.oodt.cas.filemgr.repositorymgr.datasource.jdbc.pass=
-org.apache.oodt.cas.filemgr.repositorymgr.datasource.jdbc.driver=org.hsqldb.jdbc.JDBCDriver
-
-# science data repository manager configuration
-org.apache.oodt.cas.filemgr.repositorymgr.science.jdbc.url=jdbc:hsqldb:hsql://localhost/test
-org.apache.oodt.cas.filemgr.repositorymgr.science.jdbc.user=sa
-org.apache.oodt.cas.filemgr.repositorymgr.science.jdbc.pass=
-org.apache.oodt.cas.filemgr.repositorymgr.science.jdbc.driver=org.hsqldb.jdbc.JDBCDriver
-
-# XML repository manager configuration
-org.apache.oodt.cas.filemgr.repositorymgr.dirs=file:///dir1,file:///dir2
-
-# XML validation layer configuration
-org.apache.oodt.cas.filemgr.validation.dirs=file:///dir1,file:///dir2
-
-# set the following property to 'true' to allow dynamic metadata fields,
-# effectively bypassing the validation layer.
-# by default the property is false
-#org.apache.oodt.cas.filemgr.catalog.lucene.lenientFields=true
-
-# data source validation layer configuration
-org.apache.oodt.cas.filemgr.validation.datasource.jdbc.url=jdbc:hsqldb:hsql://localhost/test
-org.apache.oodt.cas.filemgr.validation.datasource.jdbc.user=sa
-org.apache.oodt.cas.filemgr.validation.datasource.jdbc.pass=
-org.apache.oodt.cas.filemgr.validation.datasource.jdbc.driver=org.hsqldb.jdbc.JDBCDriver
-org.apache.oodt.cas.filemgr.validation.datasource.quoteFields=false
-
-# science data validation layer configuration
-org.apache.oodt.cas.filemgr.validation.science.jdbc.url=jdbc:hsqldb:hsql://localhost/test
-org.apache.oodt.cas.filemgr.validation.science.jdbc.user=sa
-org.apache.oodt.cas.filemgr.validation.science.jdbc.pass=
-org.apache.oodt.cas.filemgr.validation.science.jdbc.driver=org.hsqldb.jdbc.JDBCDriver
-
-# remote data transfer configuration
-org.apache.oodt.cas.filemgr.datatransfer.remote.chunkSize=1024
-
-# Amazon S3 data transfer configuration.
-# Region can be any of the values found here:
-# http://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/regions/Regions.html
-org.apache.oodt.cas.filemgr.datatransfer.s3.bucket.name=some_bucket_name
-org.apache.oodt.cas.filemgr.datatransfer.s3.region=EU_WEST_1
-org.apache.oodt.cas.filemgr.datatransfer.s3.access.key=s3_access_key
-org.apache.oodt.cas.filemgr.datatransfer.s3.secret.key=s3_secret_key
-
-# location of Mime-Type repository
-org.apache.oodt.cas.filemgr.mime.type.repository=file:/src/mime-types.xml
-
-# 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
-
-# ConfigurableMetadataBasedVersioning configuration
-#org.apache.oodt.cas.filemgr.versioning.configuration.all_product_types=[Year]/[Month]/[Filename]
-#org.apache.oodt.cas.filemgr.versioning.configuration.<product_type>=[Year]/[Month]/[Filename]
-
-# Enable to use only server-side versioning.
#org.apache.oodt.cas.filemgr.serverside.versioning=true
\ No newline at end of file
[13/52] [abbrv] 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>
[52/52] [abbrv] oodt git commit: Introduced distributed configuration
management to workflow and resource managers + tests
Posted by ma...@apache.org.
Introduced distributed configuration management to workflow and resource managers + tests
Project: http://git-wip-us.apache.org/repos/asf/oodt/repo
Commit: http://git-wip-us.apache.org/repos/asf/oodt/commit/fc6311db
Tree: http://git-wip-us.apache.org/repos/asf/oodt/tree/fc6311db
Diff: http://git-wip-us.apache.org/repos/asf/oodt/diff/fc6311db
Branch: refs/heads/master
Commit: fc6311db2ed4e5ccc6129cb88c71bb5428037b98
Parents: 3df0e43
Author: Imesha Sudasingha <im...@gmail.com>
Authored: Wed Aug 16 01:17:42 2017 +0530
Committer: Imesha Sudasingha <im...@gmail.com>
Committed: Wed Aug 16 01:17:42 2017 +0530
----------------------------------------------------------------------
config/pom.xml | 2 +-
.../java/org/apache/oodt/config/Component.java | 3 +-
.../config/ConfigurationManagerFactory.java | 11 +-
.../TestDistributedXmlRpcFileManager.java | 230 -------------------
.../TestDistributedXmlRpcFileManager.java | 230 +++++++++++++++++++
.../distributed/config/cmd-line-actions.xml | 38 ---
.../distributed/config/cmd-line-options.xml | 85 -------
resource/pom.xml | 8 +
.../resource/system/XmlRpcResourceManager.java | 48 ++--
.../system/TestXmlRpcResourceManager.java | 19 +-
.../TestDistributedXmlRpcResourceManager.java | 83 +++++++
.../config/distributed/config-publisher.xml | 40 ++++
.../config/distributed/resource.properties | 75 ++++++
workflow/pom.xml | 8 +
.../workflow/system/XmlRpcWorkflowManager.java | 34 ++-
.../TestDistributedXmlRpcWorkflowManager.java | 136 +++++++++++
.../config/distributed/config-publisher.xml | 56 +++++
.../config/distributed/workflow.properties | 87 +++++++
18 files changed, 792 insertions(+), 401 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/oodt/blob/fc6311db/config/pom.xml
----------------------------------------------------------------------
diff --git a/config/pom.xml b/config/pom.xml
index 3380848..3f26499 100644
--- a/config/pom.xml
+++ b/config/pom.xml
@@ -5,7 +5,7 @@
<parent>
<artifactId>oodt-core</artifactId>
<groupId>org.apache.oodt</groupId>
- <version>1.2-SNAPSHOT</version>
+ <version>1.3-SNAPSHOT</version>
<relativePath>../core/pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
http://git-wip-us.apache.org/repos/asf/oodt/blob/fc6311db/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..2c755c1 100644
--- a/config/src/main/java/org/apache/oodt/config/Component.java
+++ b/config/src/main/java/org/apache/oodt/config/Component.java
@@ -25,7 +25,8 @@ package org.apache.oodt.config;
*/
public enum Component {
FILE_MANAGER("filemgr", "FILEMGR_HOME"),
- RESOURCE_MANAGER("resmgr", "RESMGR_HOME");
+ RESOURCE_MANAGER("resmgr", "RESMGR_HOME"),
+ WORKFLOW_MANAGER("wmgr", "WORKFLOW_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/fc6311db/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 f3a5dc5..67591a0 100644
--- a/config/src/main/java/org/apache/oodt/config/ConfigurationManagerFactory.java
+++ b/config/src/main/java/org/apache/oodt/config/ConfigurationManagerFactory.java
@@ -54,12 +54,13 @@ public class ConfigurationManagerFactory {
* @return ConfigurationManager instance to used by the corresponding component.
*/
public static ConfigurationManager getConfigurationManager(Component component, List<String> propertiesFiles) {
- boolean isDistributed = Boolean.getBoolean(ENABLE_DISTRIBUTED_CONFIGURATION);
- if (!isDistributed) {
+ String enableDistributed = System.getProperty(ENABLE_DISTRIBUTED_CONFIGURATION);
+ boolean isDistributed;
+ if (enableDistributed == null) {
String env = System.getenv(Env.ENABLE_DISTRIBUTED_CONFIGURATION);
- if (env != null) {
- isDistributed = Boolean.parseBoolean(env);
- }
+ isDistributed = Boolean.parseBoolean(env);
+ } else {
+ isDistributed = Boolean.parseBoolean(enableDistributed);
}
if (isDistributed) {
http://git-wip-us.apache.org/repos/asf/oodt/blob/fc6311db/filemgr/src/test/java/org/apache/oodt/cas/filemgr/config/distributed/TestDistributedXmlRpcFileManager.java
----------------------------------------------------------------------
diff --git a/filemgr/src/test/java/org/apache/oodt/cas/filemgr/config/distributed/TestDistributedXmlRpcFileManager.java b/filemgr/src/test/java/org/apache/oodt/cas/filemgr/config/distributed/TestDistributedXmlRpcFileManager.java
deleted file mode 100644
index 19a8e56..0000000
--- a/filemgr/src/test/java/org/apache/oodt/cas/filemgr/config/distributed/TestDistributedXmlRpcFileManager.java
+++ /dev/null
@@ -1,230 +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.cas.filemgr.config.distributed;
-
-import org.apache.oodt.cas.filemgr.ingest.StdIngester;
-import org.apache.oodt.cas.filemgr.metadata.CoreMetKeys;
-import org.apache.oodt.cas.filemgr.metadata.ProductMetKeys;
-import org.apache.oodt.cas.filemgr.structs.Product;
-import org.apache.oodt.cas.filemgr.structs.exceptions.CatalogException;
-import org.apache.oodt.cas.filemgr.system.XmlRpcFileManager;
-import org.apache.oodt.cas.filemgr.system.XmlRpcFileManagerClient;
-import org.apache.oodt.cas.metadata.Metadata;
-import org.apache.oodt.cas.metadata.SerializableMetadata;
-import org.apache.oodt.cas.metadata.util.PathUtils;
-import org.apache.oodt.config.distributed.cli.ConfigPublisher;
-import org.apache.oodt.config.test.AbstractDistributedConfigurationTest;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.net.URL;
-import java.util.Collections;
-
-import static org.apache.oodt.config.Constants.Properties.ENABLE_DISTRIBUTED_CONFIGURATION;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-
-/**
- * Tests the {@link XmlRpcFileManager} with distributed configuration management enabled. This test will first publish
- * the required configuration to zookeeper through {@link ConfigPublisher} and will start the {@link XmlRpcFileManager}
- * which will first download and store published files locally. Then the correct functionality of {@link
- * XmlRpcFileManager} is tested by using those downloaded configuration files for configuration.
- * <p>
- * This class is adapted from {@link org.apache.oodt.cas.filemgr.system.TestXmlRpcFileManager} class
- *
- * @author Imesha Sudasingha
- */
-public class TestDistributedXmlRpcFileManager extends AbstractDistributedConfigurationTest {
-
- private static final int FM_PORT = 9001;
- private static final String CONF_PUBLISHER_XML = "distributed/config/config-publisher.xml";
- private static final String TRANSFER_SERVICE_FACTORY_CLASS = "org.apache.oodt.cas.filemgr.datatransfer.LocalDataTransferFactory";
-
- private XmlRpcFileManager fileManager;
-
- @Before
- public void setUpTest() throws Exception {
- System.setProperty("org.apache.oodt.cas.cli.action.spring.config", "src/test/resources/distributed/config/cmd-line-actions.xml");
- System.setProperty("org.apache.oodt.cas.cli.option.spring.config", "src/test/resources/distributed/config/cmd-line-options.xml");
- System.setProperty(ENABLE_DISTRIBUTED_CONFIGURATION, "true");
-
- ConfigPublisher.main(new String[]{
- "-connectString", zookeeper.getConnectString(),
- "-config", CONF_PUBLISHER_XML,
- "-a", "publish"
- });
-
- try {
- fileManager = new XmlRpcFileManager(FM_PORT);
- } catch (Exception e) {
- fail(e.getMessage());
- }
-
- ingestFile();
- }
-
- @Test
- public void testDistributedConfigurationWithFileManager() {
- XmlRpcFileManagerClient fmc = null;
- try {
- fmc = new XmlRpcFileManagerClient(new URL("http://localhost:" + FM_PORT));
- } catch (Exception e) {
- fail(e.getMessage());
- }
-
- Metadata met = null;
- try {
- met = fmc.getMetadata(fmc.getProductByName("test.txt"));
- } catch (CatalogException e) {
- fail(e.getMessage());
- }
-
- assertNotNull(met);
- assertTrue(met.containsKey(ProductMetKeys.PRODUCT_ID));
- assertNotNull(met.getMetadata(ProductMetKeys.PRODUCT_ID));
- assertTrue(met.containsKey(ProductMetKeys.PRODUCT_NAME));
- assertNotNull(met.getMetadata(ProductMetKeys.PRODUCT_NAME));
- assertTrue(met.containsKey(ProductMetKeys.PRODUCT_STRUCTURE));
- assertEquals("Flat", met.getMetadata(ProductMetKeys.PRODUCT_STRUCTURE));
- assertTrue(met.containsKey(ProductMetKeys.PRODUCT_TRANSFER_STATUS));
- assertEquals(Product.STATUS_RECEIVED, met.getMetadata(ProductMetKeys.PRODUCT_TRANSFER_STATUS));
-
- assertTrue(met.containsKey(ProductMetKeys.PRODUCT_ORIG_REFS));
- assertTrue(met.containsKey(ProductMetKeys.PRODUCT_DATASTORE_REFS));
- assertTrue(met.containsKey(ProductMetKeys.PRODUCT_FILE_SIZES));
- assertTrue(met.containsKey(ProductMetKeys.PRODUCT_MIME_TYPES));
-
- assertEquals(1, met.getAllMetadata(ProductMetKeys.PRODUCT_ORIG_REFS).size());
- assertEquals(1, met.getAllMetadata(ProductMetKeys.PRODUCT_DATASTORE_REFS).size());
- assertEquals(1, met.getAllMetadata(ProductMetKeys.PRODUCT_FILE_SIZES).size());
- assertEquals(1, met.getAllMetadata(ProductMetKeys.PRODUCT_MIME_TYPES).size());
-
- URL refUrl = this.getClass().getResource("/ingest/test.txt");
-
- String origPath = null;
- try {
- origPath = new File(refUrl.getFile()).getCanonicalPath();
- } catch (IOException e) {
- fail(e.getMessage());
- }
- assertEquals(origPath, met.getMetadata(ProductMetKeys.PRODUCT_ORIG_REFS));
- assertEquals("/tmp/test.txt/test.txt", met.getMetadata(ProductMetKeys.PRODUCT_DATASTORE_REFS));
-
- assertNotNull(met.getMetadata(ProductMetKeys.PRODUCT_FILE_SIZES));
- assertEquals("text/plain", met.getMetadata(ProductMetKeys.PRODUCT_MIME_TYPES));
-
- try {
- met = fmc.getReducedMetadata(fmc.getProductByName("test.txt"), Collections.EMPTY_LIST);
- } catch (CatalogException e) {
- fail(e.getMessage());
- }
-
- assertNotNull(met);
- assertTrue(met.containsKey(ProductMetKeys.PRODUCT_ID));
- assertNotNull(met.getMetadata(ProductMetKeys.PRODUCT_ID));
- assertTrue(met.containsKey(ProductMetKeys.PRODUCT_NAME));
- assertNotNull(met.getMetadata(ProductMetKeys.PRODUCT_NAME));
- assertTrue(met.containsKey(ProductMetKeys.PRODUCT_STRUCTURE));
- assertEquals("Flat", met.getMetadata(ProductMetKeys.PRODUCT_STRUCTURE));
- assertTrue(met.containsKey(ProductMetKeys.PRODUCT_TRANSFER_STATUS));
- assertEquals(Product.STATUS_RECEIVED, met.getMetadata(ProductMetKeys.PRODUCT_TRANSFER_STATUS));
-
- assertTrue(met.containsKey(ProductMetKeys.PRODUCT_ORIG_REFS));
- assertTrue(met.containsKey(ProductMetKeys.PRODUCT_DATASTORE_REFS));
- assertTrue(met.containsKey(ProductMetKeys.PRODUCT_FILE_SIZES));
- assertTrue(met.containsKey(ProductMetKeys.PRODUCT_MIME_TYPES));
-
- assertEquals(1, met.getAllMetadata(ProductMetKeys.PRODUCT_ORIG_REFS).size());
- assertEquals(1, met.getAllMetadata(ProductMetKeys.PRODUCT_DATASTORE_REFS).size());
- assertEquals(1, met.getAllMetadata(ProductMetKeys.PRODUCT_FILE_SIZES).size());
- assertEquals(1, met.getAllMetadata(ProductMetKeys.PRODUCT_MIME_TYPES).size());
-
- origPath = null;
- try {
- origPath = new File(refUrl.getFile()).getCanonicalPath();
- } catch (IOException e) {
- fail(e.getMessage());
- }
- assertEquals(origPath, met.getMetadata(ProductMetKeys.PRODUCT_ORIG_REFS));
- assertEquals("/tmp/test.txt/test.txt", met.getMetadata(ProductMetKeys.PRODUCT_DATASTORE_REFS));
-
- assertNotNull(met.getMetadata(ProductMetKeys.PRODUCT_FILE_SIZES));
- assertEquals("text/plain", met.getMetadata(ProductMetKeys.PRODUCT_MIME_TYPES));
- }
-
- private void ingestFile() {
- StdIngester ingester = new StdIngester(TRANSFER_SERVICE_FACTORY_CLASS);
-
- try {
- URL ingestUrl = this.getClass().getResource("/ingest");
- URL refUrl = this.getClass().getResource("/ingest/test.txt");
- URL metUrl = this.getClass().getResource("/ingest/test.txt.met");
- Metadata prodMet = new SerializableMetadata(new FileInputStream(new File(metUrl.getFile())));
-
- // now add the right file location
- prodMet.addMetadata(CoreMetKeys.FILE_LOCATION, new File(ingestUrl.getFile()).getCanonicalPath());
- prodMet.addMetadata(CoreMetKeys.FILENAME, "test.txt");
- prodMet.addMetadata(CoreMetKeys.PRODUCT_TYPE, "GenericFile");
- ingester.ingest(new URL("http://localhost:" + FM_PORT), new File(refUrl.getFile()), prodMet);
- } catch (Exception e) {
- fail(e.getMessage());
- }
- }
-
- @After
- public void tearDownTest() throws Exception {
- if (fileManager != null) {
- fileManager.shutdown();
- }
-
- ConfigPublisher.main(new String[]{
- "-connectString", zookeeper.getConnectString(),
- "-config", CONF_PUBLISHER_XML,
- "-a", "clear"
- });
-
- String luceneIdx = System.getProperty("org.apache.oodt.cas.filemgr.catalog.lucene.idxPath");
- if (luceneIdx != null) {
- luceneIdx = PathUtils.replaceEnvVariables(luceneIdx);
- deleteAllFiles(luceneIdx);
- }
-
- System.clearProperty("org.apache.oodt.cas.cli.action.spring.config");
- System.clearProperty("org.apache.oodt.cas.cli.option.spring.config");
- System.clearProperty(ENABLE_DISTRIBUTED_CONFIGURATION);
- }
-
- private void deleteAllFiles(String startDir) {
- File startDirFile = new File(startDir);
- File[] delFiles = startDirFile.listFiles();
-
- if (delFiles != null && delFiles.length > 0) {
- for (File delFile : delFiles) {
- delFile.delete();
- }
- }
-
- startDirFile.delete();
- }
-}
http://git-wip-us.apache.org/repos/asf/oodt/blob/fc6311db/filemgr/src/test/java/org/apache/oodt/cas/filemgr/system/distributed/TestDistributedXmlRpcFileManager.java
----------------------------------------------------------------------
diff --git a/filemgr/src/test/java/org/apache/oodt/cas/filemgr/system/distributed/TestDistributedXmlRpcFileManager.java b/filemgr/src/test/java/org/apache/oodt/cas/filemgr/system/distributed/TestDistributedXmlRpcFileManager.java
new file mode 100644
index 0000000..938a89b
--- /dev/null
+++ b/filemgr/src/test/java/org/apache/oodt/cas/filemgr/system/distributed/TestDistributedXmlRpcFileManager.java
@@ -0,0 +1,230 @@
+/*
+ * 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.system.distributed;
+
+import org.apache.oodt.cas.filemgr.ingest.StdIngester;
+import org.apache.oodt.cas.filemgr.metadata.CoreMetKeys;
+import org.apache.oodt.cas.filemgr.metadata.ProductMetKeys;
+import org.apache.oodt.cas.filemgr.structs.Product;
+import org.apache.oodt.cas.filemgr.structs.exceptions.CatalogException;
+import org.apache.oodt.cas.filemgr.system.XmlRpcFileManager;
+import org.apache.oodt.cas.filemgr.system.XmlRpcFileManagerClient;
+import org.apache.oodt.cas.metadata.Metadata;
+import org.apache.oodt.cas.metadata.SerializableMetadata;
+import org.apache.oodt.cas.metadata.util.PathUtils;
+import org.apache.oodt.config.distributed.cli.ConfigPublisher;
+import org.apache.oodt.config.test.AbstractDistributedConfigurationTest;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.net.URL;
+import java.util.Collections;
+
+import static org.apache.oodt.config.Constants.Properties.ENABLE_DISTRIBUTED_CONFIGURATION;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+/**
+ * Tests the {@link XmlRpcFileManager} with distributed configuration management enabled. This test will first publish
+ * the required configuration to zookeeper through {@link ConfigPublisher} and will start the {@link XmlRpcFileManager}
+ * which will first download and store published files locally. Then the correct functionality of {@link
+ * XmlRpcFileManager} is tested by using those downloaded configuration files for configuration.
+ * <p>
+ * This class is adapted from {@link org.apache.oodt.cas.filemgr.system.TestXmlRpcFileManager} class
+ *
+ * @author Imesha Sudasingha
+ */
+public class TestDistributedXmlRpcFileManager extends AbstractDistributedConfigurationTest {
+
+ private static final int FM_PORT = 9001;
+ private static final String CONF_PUBLISHER_XML = "distributed/config/config-publisher.xml";
+ private static final String TRANSFER_SERVICE_FACTORY_CLASS = "org.apache.oodt.cas.filemgr.datatransfer.LocalDataTransferFactory";
+
+ private XmlRpcFileManager fileManager;
+
+ @Before
+ public void setUpTest() throws Exception {
+ System.setProperty("org.apache.oodt.cas.cli.action.spring.config", "../config/src/main/resources/cmd-line-actions.xml");
+ System.setProperty("org.apache.oodt.cas.cli.option.spring.config", "../config/src/main/resources/cmd-line-options.xml");
+ System.setProperty(ENABLE_DISTRIBUTED_CONFIGURATION, "true");
+
+ ConfigPublisher.main(new String[]{
+ "-connectString", zookeeper.getConnectString(),
+ "-config", CONF_PUBLISHER_XML,
+ "-a", "publish"
+ });
+
+ try {
+ fileManager = new XmlRpcFileManager(FM_PORT);
+ } catch (Exception e) {
+ fail(e.getMessage());
+ }
+
+ ingestFile();
+ }
+
+ @Test
+ public void testDistributedConfigurationWithFileManager() {
+ XmlRpcFileManagerClient fmc = null;
+ try {
+ fmc = new XmlRpcFileManagerClient(new URL("http://localhost:" + FM_PORT));
+ } catch (Exception e) {
+ fail(e.getMessage());
+ }
+
+ Metadata met = null;
+ try {
+ met = fmc.getMetadata(fmc.getProductByName("test.txt"));
+ } catch (CatalogException e) {
+ fail(e.getMessage());
+ }
+
+ assertNotNull(met);
+ assertTrue(met.containsKey(ProductMetKeys.PRODUCT_ID));
+ assertNotNull(met.getMetadata(ProductMetKeys.PRODUCT_ID));
+ assertTrue(met.containsKey(ProductMetKeys.PRODUCT_NAME));
+ assertNotNull(met.getMetadata(ProductMetKeys.PRODUCT_NAME));
+ assertTrue(met.containsKey(ProductMetKeys.PRODUCT_STRUCTURE));
+ assertEquals("Flat", met.getMetadata(ProductMetKeys.PRODUCT_STRUCTURE));
+ assertTrue(met.containsKey(ProductMetKeys.PRODUCT_TRANSFER_STATUS));
+ assertEquals(Product.STATUS_RECEIVED, met.getMetadata(ProductMetKeys.PRODUCT_TRANSFER_STATUS));
+
+ assertTrue(met.containsKey(ProductMetKeys.PRODUCT_ORIG_REFS));
+ assertTrue(met.containsKey(ProductMetKeys.PRODUCT_DATASTORE_REFS));
+ assertTrue(met.containsKey(ProductMetKeys.PRODUCT_FILE_SIZES));
+ assertTrue(met.containsKey(ProductMetKeys.PRODUCT_MIME_TYPES));
+
+ assertEquals(1, met.getAllMetadata(ProductMetKeys.PRODUCT_ORIG_REFS).size());
+ assertEquals(1, met.getAllMetadata(ProductMetKeys.PRODUCT_DATASTORE_REFS).size());
+ assertEquals(1, met.getAllMetadata(ProductMetKeys.PRODUCT_FILE_SIZES).size());
+ assertEquals(1, met.getAllMetadata(ProductMetKeys.PRODUCT_MIME_TYPES).size());
+
+ URL refUrl = this.getClass().getResource("/ingest/test.txt");
+
+ String origPath = null;
+ try {
+ origPath = new File(refUrl.getFile()).getCanonicalPath();
+ } catch (IOException e) {
+ fail(e.getMessage());
+ }
+ assertEquals(origPath, met.getMetadata(ProductMetKeys.PRODUCT_ORIG_REFS));
+ assertEquals("/tmp/test.txt/test.txt", met.getMetadata(ProductMetKeys.PRODUCT_DATASTORE_REFS));
+
+ assertNotNull(met.getMetadata(ProductMetKeys.PRODUCT_FILE_SIZES));
+ assertEquals("text/plain", met.getMetadata(ProductMetKeys.PRODUCT_MIME_TYPES));
+
+ try {
+ met = fmc.getReducedMetadata(fmc.getProductByName("test.txt"), Collections.EMPTY_LIST);
+ } catch (CatalogException e) {
+ fail(e.getMessage());
+ }
+
+ assertNotNull(met);
+ assertTrue(met.containsKey(ProductMetKeys.PRODUCT_ID));
+ assertNotNull(met.getMetadata(ProductMetKeys.PRODUCT_ID));
+ assertTrue(met.containsKey(ProductMetKeys.PRODUCT_NAME));
+ assertNotNull(met.getMetadata(ProductMetKeys.PRODUCT_NAME));
+ assertTrue(met.containsKey(ProductMetKeys.PRODUCT_STRUCTURE));
+ assertEquals("Flat", met.getMetadata(ProductMetKeys.PRODUCT_STRUCTURE));
+ assertTrue(met.containsKey(ProductMetKeys.PRODUCT_TRANSFER_STATUS));
+ assertEquals(Product.STATUS_RECEIVED, met.getMetadata(ProductMetKeys.PRODUCT_TRANSFER_STATUS));
+
+ assertTrue(met.containsKey(ProductMetKeys.PRODUCT_ORIG_REFS));
+ assertTrue(met.containsKey(ProductMetKeys.PRODUCT_DATASTORE_REFS));
+ assertTrue(met.containsKey(ProductMetKeys.PRODUCT_FILE_SIZES));
+ assertTrue(met.containsKey(ProductMetKeys.PRODUCT_MIME_TYPES));
+
+ assertEquals(1, met.getAllMetadata(ProductMetKeys.PRODUCT_ORIG_REFS).size());
+ assertEquals(1, met.getAllMetadata(ProductMetKeys.PRODUCT_DATASTORE_REFS).size());
+ assertEquals(1, met.getAllMetadata(ProductMetKeys.PRODUCT_FILE_SIZES).size());
+ assertEquals(1, met.getAllMetadata(ProductMetKeys.PRODUCT_MIME_TYPES).size());
+
+ origPath = null;
+ try {
+ origPath = new File(refUrl.getFile()).getCanonicalPath();
+ } catch (IOException e) {
+ fail(e.getMessage());
+ }
+ assertEquals(origPath, met.getMetadata(ProductMetKeys.PRODUCT_ORIG_REFS));
+ assertEquals("/tmp/test.txt/test.txt", met.getMetadata(ProductMetKeys.PRODUCT_DATASTORE_REFS));
+
+ assertNotNull(met.getMetadata(ProductMetKeys.PRODUCT_FILE_SIZES));
+ assertEquals("text/plain", met.getMetadata(ProductMetKeys.PRODUCT_MIME_TYPES));
+ }
+
+ private void ingestFile() {
+ StdIngester ingester = new StdIngester(TRANSFER_SERVICE_FACTORY_CLASS);
+
+ try {
+ URL ingestUrl = this.getClass().getResource("/ingest");
+ URL refUrl = this.getClass().getResource("/ingest/test.txt");
+ URL metUrl = this.getClass().getResource("/ingest/test.txt.met");
+ Metadata prodMet = new SerializableMetadata(new FileInputStream(new File(metUrl.getFile())));
+
+ // now add the right file location
+ prodMet.addMetadata(CoreMetKeys.FILE_LOCATION, new File(ingestUrl.getFile()).getCanonicalPath());
+ prodMet.addMetadata(CoreMetKeys.FILENAME, "test.txt");
+ prodMet.addMetadata(CoreMetKeys.PRODUCT_TYPE, "GenericFile");
+ ingester.ingest(new URL("http://localhost:" + FM_PORT), new File(refUrl.getFile()), prodMet);
+ } catch (Exception e) {
+ fail(e.getMessage());
+ }
+ }
+
+ @After
+ public void tearDownTest() throws Exception {
+ if (fileManager != null) {
+ fileManager.shutdown();
+ }
+
+ ConfigPublisher.main(new String[]{
+ "-connectString", zookeeper.getConnectString(),
+ "-config", CONF_PUBLISHER_XML,
+ "-a", "clear"
+ });
+
+ String luceneIdx = System.getProperty("org.apache.oodt.cas.filemgr.catalog.lucene.idxPath");
+ if (luceneIdx != null) {
+ luceneIdx = PathUtils.replaceEnvVariables(luceneIdx);
+ deleteAllFiles(luceneIdx);
+ }
+
+ System.clearProperty("org.apache.oodt.cas.cli.action.spring.config");
+ System.clearProperty("org.apache.oodt.cas.cli.option.spring.config");
+ System.clearProperty(ENABLE_DISTRIBUTED_CONFIGURATION);
+ }
+
+ private void deleteAllFiles(String startDir) {
+ File startDirFile = new File(startDir);
+ File[] delFiles = startDirFile.listFiles();
+
+ if (delFiles != null && delFiles.length > 0) {
+ for (File delFile : delFiles) {
+ delFile.delete();
+ }
+ }
+
+ startDirFile.delete();
+ }
+}
http://git-wip-us.apache.org/repos/asf/oodt/blob/fc6311db/filemgr/src/test/resources/distributed/config/cmd-line-actions.xml
----------------------------------------------------------------------
diff --git a/filemgr/src/test/resources/distributed/config/cmd-line-actions.xml b/filemgr/src/test/resources/distributed/config/cmd-line-actions.xml
deleted file mode 100644
index 08f5415..0000000
--- a/filemgr/src/test/resources/distributed/config/cmd-line-actions.xml
+++ /dev/null
@@ -1,38 +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.
- -->
-
-<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="publish" class="org.apache.oodt.config.distributed.cli.CLIAction">
- <constructor-arg value="PUBLISH"/>
- <property name="description" value="Publishes configuration to zookeeper"/>
- </bean>
-
- <bean id="verify" class="org.apache.oodt.config.distributed.cli.CLIAction">
- <constructor-arg value="VERIFY"/>
- <property name="description" value="Verifies configuration published to zookeeper"/>
- </bean>
-
- <bean id="clear" class="org.apache.oodt.config.distributed.cli.CLIAction">
- <constructor-arg value="CLEAR"/>
- <property name="description" value="Clears all published configuration from zookeeper"/>
- </bean>
-</beans>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/oodt/blob/fc6311db/filemgr/src/test/resources/distributed/config/cmd-line-options.xml
----------------------------------------------------------------------
diff --git a/filemgr/src/test/resources/distributed/config/cmd-line-options.xml b/filemgr/src/test/resources/distributed/config/cmd-line-options.xml
deleted file mode 100644
index 698ad32..0000000
--- a/filemgr/src/test/resources/distributed/config/cmd-line-options.xml
+++ /dev/null
@@ -1,85 +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.
- -->
-
-<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="connectStringOption" class="org.apache.oodt.cas.cli.option.AdvancedCmdLineOption">
- <property name="shortOption" value="cs"/>
- <property name="longOption" value="connectString"/>
- <property name="description" value="Connect String to Zookeeper (ip1:port1,ip2:port2,..)"/>
- <property name="hasArgs" value="true"/>
- <property name="requirementRules">
- <list>
- <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
- p:actionName="publish" p:relation="REQUIRED"/>
- <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
- p:actionName="clear" p:relation="REQUIRED"/>
- <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
- p:actionName="verify" 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="publish" p:methodName="setConnectString"/>
- <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToAction"
- p:actionName="verify" p:methodName="setConnectString"/>
- <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToAction"
- p:actionName="clear" p:methodName="setConnectString"/>
- </list>
- </property>
- </bean>
- </property>
- </bean>
-
- <bean id="publisherXML" class="org.apache.oodt.cas.cli.option.AdvancedCmdLineOption">
- <property name="shortOption" value="c"/>
- <property name="longOption" value="config"/>
- <property name="description" value="Configuration publisher spring configuration XML"/>
- <property name="hasArgs" value="true"/>
- <property name="requirementRules">
- <list>
- <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
- p:actionName="publish" p:relation="OPTIONAL"/>
- <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
- p:actionName="clear" p:relation="OPTIONAL"/>
- <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
- p:actionName="verify" 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="publish" p:methodName="setConfigFile"/>
- <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToAction"
- p:actionName="verify" p:methodName="setConfigFile"/>
- <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToAction"
- p:actionName="clear" p:methodName="setConfigFile"/>
- </list>
- </property>
- </bean>
- </property>
- </bean>
-</beans>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/oodt/blob/fc6311db/resource/pom.xml
----------------------------------------------------------------------
diff --git a/resource/pom.xml b/resource/pom.xml
index d9d23df..a1197b7 100644
--- a/resource/pom.xml
+++ b/resource/pom.xml
@@ -110,6 +110,10 @@ the License.
<artifactId>cas-metadata</artifactId>
</dependency>
<dependency>
+ <groupId>org.apache.oodt</groupId>
+ <artifactId>oodt-conf</artifactId>
+ </dependency>
+ <dependency>
<groupId>org.safehaus.jug</groupId>
<artifactId>jug</artifactId>
<classifier>asl</classifier>
@@ -138,6 +142,10 @@ the License.
<value>${basedir}/src/test/resources/test.logging.properties</value>
</property>
</systemProperties>
+ <environmentVariables>
+ <RESMGR_HOME>${project.basedir}</RESMGR_HOME>
+ <OODT_PROJECT>primary</OODT_PROJECT>
+ </environmentVariables>
<forkedProcessTimeoutInSeconds>0</forkedProcessTimeoutInSeconds>
<redirectTestOutputToFile>true</redirectTestOutputToFile>
<includes>
http://git-wip-us.apache.org/repos/asf/oodt/blob/fc6311db/resource/src/main/java/org/apache/oodt/cas/resource/system/XmlRpcResourceManager.java
----------------------------------------------------------------------
diff --git a/resource/src/main/java/org/apache/oodt/cas/resource/system/XmlRpcResourceManager.java b/resource/src/main/java/org/apache/oodt/cas/resource/system/XmlRpcResourceManager.java
index 87f6bea..3536607 100644
--- a/resource/src/main/java/org/apache/oodt/cas/resource/system/XmlRpcResourceManager.java
+++ b/resource/src/main/java/org/apache/oodt/cas/resource/system/XmlRpcResourceManager.java
@@ -32,13 +32,15 @@ import org.apache.oodt.cas.resource.structs.exceptions.SchedulerException;
import org.apache.oodt.cas.resource.util.GenericResourceManagerObjectFactory;
import org.apache.oodt.cas.resource.util.ResourceNodeComparator;
import org.apache.oodt.cas.resource.util.XmlRpcStructFactory;
+import org.apache.oodt.config.Component;
+import org.apache.oodt.config.ConfigurationManager;
+import org.apache.oodt.config.ConfigurationManagerFactory;
import org.apache.xmlrpc.WebServer;
-import java.io.File;
-import java.io.FileInputStream;
import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;
+import java.util.ArrayList;
import java.util.Collections;
import java.util.Date;
import java.util.Hashtable;
@@ -69,16 +71,22 @@ public class XmlRpcResourceManager {
/* our scheduler */
private Scheduler scheduler = null;
+ /** Configuration Manager instance of this instance */
+ private ConfigurationManager configurationManager;
+
public XmlRpcResourceManager(int port) throws IOException {
- // load properties from workflow manager properties file, if specified
+ List<String> propertiesFiles = new ArrayList<>();
+ // set up the configuration, if there is any
if (System.getProperty("org.apache.oodt.cas.resource.properties") != null) {
- String configFile = System
- .getProperty("org.apache.oodt.cas.resource.properties");
- LOG.log(Level.INFO,
- "Loading Resource Manager Configuration Properties from: ["
- + configFile + "]");
- System.getProperties().load(
- new FileInputStream(new File(configFile)));
+ propertiesFiles.add(System.getProperty("org.apache.oodt.cas.resource.properties"));
+ }
+
+ configurationManager = ConfigurationManagerFactory.getConfigurationManager(Component.RESOURCE_MANAGER, propertiesFiles);
+ try {
+ configurationManager.loadConfiguration();
+ } catch (Exception e) {
+ LOG.log(Level.SEVERE, "Unable to load configuration", e);
+ throw new IOException("Unable to load configuration", e);
}
String schedulerClassStr = System.getProperty(
@@ -323,15 +331,17 @@ public class XmlRpcResourceManager {
public List<String> getQueuesWithNode(String nodeId) {
return new Vector<String>(this.scheduler.getQueueManager().getQueues(nodeId));
}
-
- public boolean shutdown(){
- if (this.webServer != null) {
- this.webServer.shutdown();
- this.webServer = null;
- return true;
- } else {
- return false;
- }
+
+ public boolean shutdown() {
+ configurationManager.clearConfiguration();
+
+ if (this.webServer != null) {
+ this.webServer.shutdown();
+ this.webServer = null;
+ return true;
+ } else {
+ return false;
+ }
}
public String getNodeLoad(String nodeId) throws MonitorException{
http://git-wip-us.apache.org/repos/asf/oodt/blob/fc6311db/resource/src/test/java/org/apache/oodt/cas/resource/system/TestXmlRpcResourceManager.java
----------------------------------------------------------------------
diff --git a/resource/src/test/java/org/apache/oodt/cas/resource/system/TestXmlRpcResourceManager.java b/resource/src/test/java/org/apache/oodt/cas/resource/system/TestXmlRpcResourceManager.java
index 342194e..f0358b6 100644
--- a/resource/src/test/java/org/apache/oodt/cas/resource/system/TestXmlRpcResourceManager.java
+++ b/resource/src/test/java/org/apache/oodt/cas/resource/system/TestXmlRpcResourceManager.java
@@ -77,7 +77,6 @@ public class TestXmlRpcResourceManager extends TestCase {
fail(e.getMessage());
}
assertEquals(8, setCapacity);
-
}
/*
@@ -116,7 +115,7 @@ public class TestXmlRpcResourceManager extends TestCase {
}
- private void generateTestConfiguration() throws IOException {
+ private void generateTestConfiguration() throws IOException {
Properties config = new Properties();
String propertiesFile = "." + File.separator + "src" + File.separator +
@@ -131,13 +130,13 @@ public class TestXmlRpcResourceManager extends TestCase {
fail(e.getMessage());
}
for (File policyFile : new File("./src/test/resources/policy")
- .listFiles(new FileFilter() {
+ .listFiles(new FileFilter() {
- @Override
- public boolean accept(File pathname) {
- return pathname.isFile() && pathname.getName().endsWith(".xml");
- }
- })) {
+ @Override
+ public boolean accept(File pathname) {
+ return pathname.isFile() && pathname.getName().endsWith(".xml");
+ }
+ })) {
try {
FileUtils.copyFileToDirectory(policyFile, tmpPolicyDir);
} catch (Exception e) {
@@ -146,9 +145,9 @@ public class TestXmlRpcResourceManager extends TestCase {
}
config.setProperty("org.apache.oodt.cas.resource.nodes.dirs", tmpPolicyDir
- .toURI().toString());
+ .toURI().toString());
config.setProperty("org.apache.oodt.cas.resource.nodetoqueues.dirs",
- tmpPolicyDir.toURI().toString());
+ tmpPolicyDir.toURI().toString());
System.getProperties().putAll(config);
this.tmpPolicyDir = tmpPolicyDir;
http://git-wip-us.apache.org/repos/asf/oodt/blob/fc6311db/resource/src/test/java/org/apache/oodt/cas/resource/system/distributed/TestDistributedXmlRpcResourceManager.java
----------------------------------------------------------------------
diff --git a/resource/src/test/java/org/apache/oodt/cas/resource/system/distributed/TestDistributedXmlRpcResourceManager.java b/resource/src/test/java/org/apache/oodt/cas/resource/system/distributed/TestDistributedXmlRpcResourceManager.java
new file mode 100644
index 0000000..0649b44
--- /dev/null
+++ b/resource/src/test/java/org/apache/oodt/cas/resource/system/distributed/TestDistributedXmlRpcResourceManager.java
@@ -0,0 +1,83 @@
+/*
+ * 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.resource.system.distributed;
+
+import org.apache.oodt.cas.resource.system.TestXmlRpcResourceManager;
+import org.apache.oodt.cas.resource.system.XmlRpcResourceManager;
+import org.apache.oodt.config.distributed.cli.ConfigPublisher;
+import org.apache.oodt.config.test.AbstractDistributedConfigurationTest;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+import static org.apache.oodt.config.Constants.Properties.ENABLE_DISTRIBUTED_CONFIGURATION;
+import static org.junit.Assert.fail;
+
+/**
+ * Test the operation of Resource Manager under distributed configuration management enabled
+ *
+ * @author Imesha Sudasingha
+ */
+public class TestDistributedXmlRpcResourceManager extends AbstractDistributedConfigurationTest {
+
+ private static final int RM_PORT = 50001;
+ private static final String CONF_PUBLISHER_XML = "config/distributed/config-publisher.xml";
+
+ private XmlRpcResourceManager resourceManager;
+
+ @Before
+ public void setUpTest() throws Exception {
+ System.setProperty("org.apache.oodt.cas.cli.action.spring.config", "../config/src/main/resources/cmd-line-actions.xml");
+ System.setProperty("org.apache.oodt.cas.cli.option.spring.config", "../config/src/main/resources/cmd-line-options.xml");
+ System.setProperty(ENABLE_DISTRIBUTED_CONFIGURATION, "true");
+
+ ConfigPublisher.main(new String[]{
+ "-connectString", zookeeper.getConnectString(),
+ "-config", CONF_PUBLISHER_XML,
+ "-a", "publish"
+ });
+
+ try {
+ resourceManager = new XmlRpcResourceManager(RM_PORT);
+ } catch (Exception e) {
+ fail(e.getMessage());
+ }
+ }
+
+ @Test
+ public void testDynSetNodeCapacity() {
+ new TestXmlRpcResourceManager().testDynSetNodeCapacity();
+ }
+
+ @After
+ public void tearDownTest() throws Exception {
+ if (resourceManager != null) {
+ resourceManager.shutdown();
+ }
+
+ ConfigPublisher.main(new String[]{
+ "-connectString", zookeeper.getConnectString(),
+ "-config", CONF_PUBLISHER_XML,
+ "-a", "clear"
+ });
+
+ System.clearProperty("org.apache.oodt.cas.cli.action.spring.config");
+ System.clearProperty("org.apache.oodt.cas.cli.option.spring.config");
+ System.clearProperty(ENABLE_DISTRIBUTED_CONFIGURATION);
+ }
+}
http://git-wip-us.apache.org/repos/asf/oodt/blob/fc6311db/resource/src/test/resources/config/distributed/config-publisher.xml
----------------------------------------------------------------------
diff --git a/resource/src/test/resources/config/distributed/config-publisher.xml b/resource/src/test/resources/config/distributed/config-publisher.xml
new file mode 100644
index 0000000..ab7a0ce
--- /dev/null
+++ b/resource/src/test/resources/config/distributed/config-publisher.xml
@@ -0,0 +1,40 @@
+<!--
+ ~ 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="resmgr-config-publisher" class="org.apache.oodt.config.distributed.DistributedConfigurationPublisher">
+ <constructor-arg value="RESOURCE_MANAGER"/>
+
+ <constructor-arg value="primary"/>
+
+ <property name="propertiesFiles">
+ <map key-type="java.lang.String" value-type="java.lang.String">
+ <entry key="src/test/resources/config/distributed/resource.properties" value="target/resmgr/etc/resource.properties"/>
+ <entry key="src/test/resources/test.logging.properties" value="target/resmgr/etc/logging.properties"/>
+ </map>
+ </property>
+ <property name="configFiles">
+ <map key-type="java.lang.String" value-type="java.lang.String">
+ <entry key="src/test/resources/policy/nodes.xml" value="target/resmgr/policy/nodes.xml"/>
+ <entry key="src/test/resources/policy/node-to-queue-mapping.xml" value="target/resmgr/policy/node-to-queue-mapping.xml"/>
+ </map>
+ </property>
+ </bean>
+</beans>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/oodt/blob/fc6311db/resource/src/test/resources/config/distributed/resource.properties
----------------------------------------------------------------------
diff --git a/resource/src/test/resources/config/distributed/resource.properties b/resource/src/test/resources/config/distributed/resource.properties
new file mode 100644
index 0000000..e51fc73
--- /dev/null
+++ b/resource/src/test/resources/config/distributed/resource.properties
@@ -0,0 +1,75 @@
+#
+# 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.
+#
+
+# 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
+
+# resource nodes monitor factory
+org.apache.oodt.cas.resource.monitor.factory = org.apache.oodt.cas.resource.monitor.ganglia.GangliaResourceMonitorFactory
+
+# ganglia resource monitor's load calculator factory
+org.apache.oodt.cas.resource.monitor.loadcalc.factory = org.apache.oodt.cas.resource.monitor.ganglia.loadcalc.WeightedAverageLoadCalcFactory
+
+# 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=[RESMGR_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]/target/resmgr/policy
+
+# XML Queue Repository config properties
+org.apache.oodt.cas.resource.nodetoqueues.dirs=file://[RESMGR_HOME]/target/resmgr/policy
+
+# Load calculation weights
+org.apache.oodt.cas.resource.monitor.loadcalc.weight.loadone=1
+org.apache.oodt.cas.resource.monitor.loadcalc.weight.loadfive=5
+org.apache.oodt.cas.resource.monitor.loadcalc.weight.loadfifteen=5
+org.apache.oodt.cas.resource.monitor.loadcalc.weight.memfree=2
+org.apache.oodt.cas.resource.monitor.loadcalc.weight.swapfree=1
+
+#ganglia meta daemon (gmetad) host details
+org.apache.oodt.cas.resource.monitor.ganglia.gemtad.host.address=localhost
+org.apache.oodt.cas.resource.monitor.ganglia.gemtad.host.port=8659
+
http://git-wip-us.apache.org/repos/asf/oodt/blob/fc6311db/workflow/pom.xml
----------------------------------------------------------------------
diff --git a/workflow/pom.xml b/workflow/pom.xml
index 50e6743..a6e0c44 100644
--- a/workflow/pom.xml
+++ b/workflow/pom.xml
@@ -138,6 +138,10 @@ the License.
<artifactId>oodt-commons</artifactId>
</dependency>
<dependency>
+ <groupId>org.apache.oodt</groupId>
+ <artifactId>oodt-conf</artifactId>
+ </dependency>
+ <dependency>
<groupId>org.safehaus.jug</groupId>
<artifactId>jug</artifactId>
<classifier>asl</classifier>
@@ -161,6 +165,10 @@ the License.
<value>${basedir}/src/test/resources/test.logging.properties</value>
</property>
</systemProperties>
+ <environmentVariables>
+ <WORKFLOW_HOME>${project.basedir}</WORKFLOW_HOME>
+ <OODT_PROJECT>primary</OODT_PROJECT>
+ </environmentVariables>
<forkedProcessTimeoutInSeconds>0</forkedProcessTimeoutInSeconds>
<redirectTestOutputToFile>true</redirectTestOutputToFile>
<includes>
http://git-wip-us.apache.org/repos/asf/oodt/blob/fc6311db/workflow/src/main/java/org/apache/oodt/cas/workflow/system/XmlRpcWorkflowManager.java
----------------------------------------------------------------------
diff --git a/workflow/src/main/java/org/apache/oodt/cas/workflow/system/XmlRpcWorkflowManager.java b/workflow/src/main/java/org/apache/oodt/cas/workflow/system/XmlRpcWorkflowManager.java
index 37b22d3..b0b4591 100644
--- a/workflow/src/main/java/org/apache/oodt/cas/workflow/system/XmlRpcWorkflowManager.java
+++ b/workflow/src/main/java/org/apache/oodt/cas/workflow/system/XmlRpcWorkflowManager.java
@@ -30,6 +30,9 @@ import org.apache.oodt.cas.workflow.structs.exceptions.EngineException;
import org.apache.oodt.cas.workflow.structs.exceptions.InstanceRepositoryException;
import org.apache.oodt.cas.workflow.structs.exceptions.RepositoryException;
import org.apache.oodt.cas.workflow.util.XmlRpcStructFactory;
+import org.apache.oodt.config.Component;
+import org.apache.oodt.config.ConfigurationManager;
+import org.apache.oodt.config.ConfigurationManagerFactory;
import org.apache.xmlrpc.WebServer;
import com.google.common.base.Preconditions;
@@ -41,6 +44,7 @@ import java.net.InetAddress;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.UnknownHostException;
+import java.util.ArrayList;
import java.util.Hashtable;
import java.util.List;
import java.util.Map;
@@ -73,6 +77,8 @@ public class XmlRpcWorkflowManager {
private final WorkflowEngine engine;
private WorkflowRepository repo;
+ private ConfigurationManager configurationManager;
+
public XmlRpcWorkflowManager() {
this(DEFAULT_WEB_SERVER_PORT);
}
@@ -80,6 +86,20 @@ public class XmlRpcWorkflowManager {
public XmlRpcWorkflowManager(int port) {
Preconditions.checkArgument(port > 0, "Must specify a port greater than 0");
+ List<String> propertiesFiles = new ArrayList<>();
+ String configFile = System.getProperty(PROPERTIES_FILE_PROPERTY);
+ if (configFile != null) {
+ propertiesFiles.add(configFile);
+ }
+
+ configurationManager= ConfigurationManagerFactory.getConfigurationManager(Component.WORKFLOW_MANAGER,propertiesFiles);
+ try {
+ configurationManager.loadConfiguration();
+ } catch (Exception e) {
+ LOG.log(Level.SEVERE, "Unable to load configuration", e);
+ throw new IllegalStateException("Unable to load configuration", e);
+ }
+
engine = getWorkflowEngineFromProperty();
engine.setWorkflowManagerUrl(safeGetUrlFromString("http://"
+ getHostname() + ":" + port));
@@ -95,6 +115,8 @@ public class XmlRpcWorkflowManager {
}
public boolean shutdown() {
+ configurationManager.clearConfiguration();
+
if (webServer != null) {
webServer.shutdown();
webServer = null;
@@ -645,7 +667,6 @@ public class XmlRpcWorkflowManager {
System.exit(1);
}
- loadProperties();
new XmlRpcWorkflowManager(portNum);
for (; ; ) {
@@ -656,17 +677,6 @@ public class XmlRpcWorkflowManager {
}
}
- public static void loadProperties() throws IOException {
- String configFile = System.getProperty(PROPERTIES_FILE_PROPERTY);
- if (configFile != null) {
- LOG.log(Level.INFO,
- "Loading Workflow Manager Configuration Properties from: ["
- + configFile + "]");
- System.getProperties().load(new FileInputStream(new File(
- configFile)));
- }
- }
-
private static WorkflowEngine getWorkflowEngineFromProperty() {
return getWorkflowEngineFromClassName(System.getProperty(
WORKFLOW_ENGINE_FACTORY_PROPERTY,
http://git-wip-us.apache.org/repos/asf/oodt/blob/fc6311db/workflow/src/test/java/org/apache/oodt/cas/workflow/system/distributed/TestDistributedXmlRpcWorkflowManager.java
----------------------------------------------------------------------
diff --git a/workflow/src/test/java/org/apache/oodt/cas/workflow/system/distributed/TestDistributedXmlRpcWorkflowManager.java b/workflow/src/test/java/org/apache/oodt/cas/workflow/system/distributed/TestDistributedXmlRpcWorkflowManager.java
new file mode 100644
index 0000000..781a7eb
--- /dev/null
+++ b/workflow/src/test/java/org/apache/oodt/cas/workflow/system/distributed/TestDistributedXmlRpcWorkflowManager.java
@@ -0,0 +1,136 @@
+/*
+ * 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.workflow.system.distributed;
+
+import org.apache.oodt.cas.metadata.Metadata;
+import org.apache.oodt.cas.metadata.util.PathUtils;
+import org.apache.oodt.cas.workflow.system.XmlRpcWorkflowManager;
+import org.apache.oodt.cas.workflow.system.XmlRpcWorkflowManagerClient;
+import org.apache.oodt.config.distributed.cli.ConfigPublisher;
+import org.apache.oodt.config.test.AbstractDistributedConfigurationTest;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+import java.io.File;
+import java.net.URL;
+import java.util.List;
+
+import static org.apache.oodt.config.Constants.Properties.ENABLE_DISTRIBUTED_CONFIGURATION;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.fail;
+
+public class TestDistributedXmlRpcWorkflowManager extends AbstractDistributedConfigurationTest {
+
+ private static final int WM_PORT = 50002;
+ private static final String CONF_PUBLISHER_XML = "config/distributed/config-publisher.xml";
+
+ private XmlRpcWorkflowManager workflowManager;
+
+ @Before
+ public void setUpTest() throws Exception {
+ System.setProperty("org.apache.oodt.cas.cli.action.spring.config", "../config/src/main/resources/cmd-line-actions.xml");
+ System.setProperty("org.apache.oodt.cas.cli.option.spring.config", "../config/src/main/resources/cmd-line-options.xml");
+ System.setProperty(ENABLE_DISTRIBUTED_CONFIGURATION, "true");
+
+ ConfigPublisher.main(new String[]{
+ "-connectString", zookeeper.getConnectString(),
+ "-config", CONF_PUBLISHER_XML,
+ "-a", "publish"
+ });
+
+ try {
+ workflowManager = new XmlRpcWorkflowManager(WM_PORT);
+ } catch (Exception e) {
+ fail(e.getMessage());
+ }
+
+ startWorkflow();
+ }
+
+ private void startWorkflow() {
+ XmlRpcWorkflowManagerClient client = null;
+ try {
+ client = new XmlRpcWorkflowManagerClient(new URL("http://localhost:" + WM_PORT));
+ } catch (Exception e) {
+ fail(e.getMessage());
+ }
+
+ try {
+ client.sendEvent("long", new Metadata());
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ }
+
+ }
+
+ @Test
+ public void testGetWorkflowInstances() {
+ List workflowInsts = null;
+ int numInsts = -1;
+ while (numInsts != 2) {
+ try {
+ workflowInsts = workflowManager.getWorkflowInstances();
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+
+ assertNotNull(workflowInsts);
+ numInsts = workflowInsts.size();
+ }
+
+ assertEquals(2, workflowInsts.size());
+ }
+
+ private void deleteAllFiles(String startDir) {
+ File startDirFile = new File(startDir);
+ File[] delFiles = startDirFile.listFiles();
+
+ if (delFiles != null && delFiles.length > 0) {
+ for (File delFile : delFiles) {
+ delFile.delete();
+ }
+ }
+
+ startDirFile.delete();
+ }
+
+ @After
+ public void tearDownTest() throws Exception {
+ if (workflowManager != null) {
+ workflowManager.shutdown();
+ }
+
+ ConfigPublisher.main(new String[]{
+ "-connectString", zookeeper.getConnectString(),
+ "-config", CONF_PUBLISHER_XML,
+ "-a", "clear"
+ });
+
+ System.clearProperty("org.apache.oodt.cas.cli.action.spring.config");
+ System.clearProperty("org.apache.oodt.cas.cli.option.spring.config");
+ System.clearProperty(ENABLE_DISTRIBUTED_CONFIGURATION);
+
+ String luceneIdx = System.getProperty("org.apache.oodt.cas.workflow.instanceRep.lucene.idxPath");
+ if (luceneIdx != null) {
+ luceneIdx = PathUtils.replaceEnvVariables(luceneIdx);
+ deleteAllFiles(luceneIdx);
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/oodt/blob/fc6311db/workflow/src/test/resources/config/distributed/config-publisher.xml
----------------------------------------------------------------------
diff --git a/workflow/src/test/resources/config/distributed/config-publisher.xml b/workflow/src/test/resources/config/distributed/config-publisher.xml
new file mode 100644
index 0000000..f9b8115
--- /dev/null
+++ b/workflow/src/test/resources/config/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="workflowmgr-config-publisher" class="org.apache.oodt.config.distributed.DistributedConfigurationPublisher">
+ <constructor-arg value="WORKFLOW_MANAGER"/>
+ <constructor-arg value="primary"/>
+
+ <property name="propertiesFiles">
+ <map key-type="java.lang.String" value-type="java.lang.String">
+ <entry key="src/test/resources/config/distributed/workflow.properties" value="target/workflow/etc/resource.properties"/>
+ <entry key="src/test/resources/test.logging.properties" value="target/workflow/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/workflow-lifecycle.xml" value="target/workflow/policy/workflow-lifecycle.xml"/>
+ <entry key="src/main/resources/examples/workflow-instance-met.xml" value="target/workflow/policy/workflow-instance-met.xml"/>
+ <entry key="src/main/resources/examples/timeout.workflow.xml" value="target/workflow/policy/timeout.workflow.xml"/>
+ <entry key="src/main/resources/examples/testWorkflow.workflow.xml" value="target/workflow/policy/testWorkflow.workflow.xml"/>
+ <entry key="src/main/resources/examples/testStatusUpdate.workflow.xml" value="target/workflow/policy/testStatusUpdate.workflow.xml"/>
+ <entry key="src/main/resources/examples/testMetError.workflow.xml" value="target/workflow/policy/testMetError.workflow.xml"/>
+ <entry key="src/main/resources/examples/testMetadataUpdate.workflow.xml" value="target/workflow/policy/testMetadataUpdate.workflow.xml"/>
+ <entry key="src/main/resources/examples/tasks.xml" value="target/workflow/policy/tasks.xml"/>
+ <entry key="src/main/resources/examples/optional.workflow.xml" value="target/workflow/policy/optional.workflow.xml"/>
+ <entry key="src/main/resources/examples/mailWorkflow.workflow.xml" value="target/workflow/policy/mailWorkflow.workflow.xml"/>
+ <entry key="src/main/resources/examples/longWorkflow.workflow.xml" value="target/workflow/policy/longWorkflow.workflow.xml"/>
+ <entry key="src/main/resources/examples/externalScript.workflow.xml" value="target/workflow/policy/externalScript.workflow.xml"/>
+ <entry key="src/main/resources/examples/events.xml" value="target/workflow/policy/events.xml"/>
+ <entry key="src/main/resources/examples/conditions.xml" value="target/workflow/policy/conditions.xml"/>
+ <entry key="src/main/resources/examples/condition.workflow.xml" value="target/workflow/policy/condition.workflow.xml"/>
+
+ <entry key="src/main/resources/examples/wengine/GranuleMaps.xml" value="target/workflow/policy/wengine/condition.workflow.xml"/>
+ <entry key="src/main/resources/examples/wengine/hello-goodbye.xml" value="target/workflow/policy/wengine/hello-goodbye.xml"/>
+ <entry key="src/main/resources/examples/wengine/wengine-lifecycle.xml" value="target/workflow/policy/wengine/wengine-lifecycle.xml"/>
+ </map>
+ </property>
+ </bean>
+</beans>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/oodt/blob/fc6311db/workflow/src/test/resources/config/distributed/workflow.properties
----------------------------------------------------------------------
diff --git a/workflow/src/test/resources/config/distributed/workflow.properties b/workflow/src/test/resources/config/distributed/workflow.properties
new file mode 100644
index 0000000..ced0b21
--- /dev/null
+++ b/workflow/src/test/resources/config/distributed/workflow.properties
@@ -0,0 +1,87 @@
+#
+# 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.
+#
+
+# workflow repository factory
+workflow.repo.factory = org.apache.oodt.cas.workflow.repository.XMLWorkflowRepositoryFactory
+
+# workflow engine factory
+workflow.engine.factory = org.apache.oodt.cas.workflow.engine.ThreadPoolWorkflowEngineFactory
+
+# workflow instance repository factory
+workflow.engine.instanceRep.factory = org.apache.oodt.cas.workflow.instrepo.LuceneWorkflowInstanceRepositoryFactory
+
+# engine runner factory
+workflow.wengine.runner.factory=org.apache.oodt.cas.workflow.engine.runner.AsynchronousLocalEngineRunnerFactory
+
+# thread pool workflow engine properties
+org.apache.oodt.cas.workflow.engine.queueSize=
+org.apache.oodt.cas.workflow.engine.maxPoolSize=
+org.apache.oodt.cas.workflow.engine.minPoolSize=6
+org.apache.oodt.cas.workflow.engine.threadKeepAlive.minutes=5
+org.apache.oodt.cas.workflow.engine.unlimitedQueue=true
+org.apache.oodt.cas.workflow.engine.preConditionWaitTime=10
+
+# set this if you want the workflow manager to submit jobs through the resource mgr
+org.apache.oodt.cas.workflow.engine.resourcemgr.url=
+
+# if you use the resource mgr submission, you can specify how many seconds the
+# workflow manager should wait inbetween checking to see if a job is complete
+org.apache.oodt.cas.workflow.engine.resourcemgr.pollingWaitTime=10
+
+# wengine properties
+# define workflow prioritizer class to use for sorting workflow tasks
+org.apache.oodt.cas.workflow.wengine.prioritizer=org.apache.oodt.cas.workflow.structs.FILOPrioritySorter
+# the default amount of time (in seconds) that the task querier waits before dispositioning processors
+org.apache.oodt.cas.workflow.wengine.taskquerier.waitSeconds=2
+
+# the maximum number of threads to be used by the asynchronous engine runner
+org.apache.oodt.cas.workflow.wengine.asynchronous.runner.num.threads=25
+
+# workflow instance repository general properties
+# default page size to page through WorkflowInstances with
+org.apache.oodt.cas.workflow.instanceRep.pageSize=20
+
+# lucene workflow instance repository properties
+org.apache.oodt.cas.workflow.instanceRep.lucene.idxPath=[WORKFLOW_HOME]/target/tmp
+
+# data source workflow instance repository properties
+org.apache.oodt.cas.workflow.instanceRep.datasource.jdbc.url=jdbc:url
+org.apache.oodt.cas.workflow.instanceRep.datasource.jdbc.user=user
+org.apache.oodt.cas.workflow.instanceRep.datasource.jdbc.pass=pass
+org.apache.oodt.cas.workflow.instanceRep.datasource.jdbc.driver=your.jdbc.Driver
+org.apache.oodt.cas.workflow.instanceRep.datasource.quoteFields=false
+
+# XML workflow repository properties
+org.apache.oodt.cas.workflow.repo.dirs=file://[WORKFLOW_HOME]/target/workflow/policy
+# uncomment the following line and set the value to true to recursively parse repository directories
+#org.apache.oodt.cas.workflow.repo.dirs.recursive=false
+
+# wengine-style packaged workflow repo properties
+org.apache.oodt.cas.workflow.wengine.packagedRepo.dir.path = /path/to/wengine/workflow/files
+
+# data source workflow repository properties
+org.apache.oodt.cas.workflow.repo.datasource.jdbc.url=jdbc:url
+org.apache.oodt.cas.workflow.repo.datasource.jdbc.user=user
+org.apache.oodt.cas.workflow.repo.datasource.jdbc.pass=pass
+org.apache.oodt.cas.workflow.repo.datasource.jdbc.driver=your.jdbc.Driver
+
+# Spring command line option and action store properties
+#org.apache.oodt.cas.cli.action.spring.config=src/main/resources/cmd-line-actions.xml
+#org.apache.oodt.cas.cli.option.spring.config=src/main/resources/cmd-line-options.xml
+
+# workflow lifecycle Manager
+org.apache.oodt.cas.workflow.lifecycle.filePath=[WORKFLOW_HOME]/target/workflow/policy/workflow-lifecycle.xml
[36/52] [abbrv] 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/a1a96fb3
Tree: http://git-wip-us.apache.org/repos/asf/oodt/tree/a1a96fb3
Diff: http://git-wip-us.apache.org/repos/asf/oodt/diff/a1a96fb3
Branch: refs/heads/master
Commit: a1a96fb39243b473b6b111b40dac9b29e6a17cd8
Parents: e59e77c 7d9a85d
Author: Chris Mattmann <ma...@apache.org>
Authored: Thu Jul 27 10:06:17 2017 -0700
Committer: Chris Mattmann <ma...@apache.org>
Committed: Thu Jul 27 10:06:17 2017 -0700
----------------------------------------------------------------------
CHANGES.txt | 2 +
KEYS | 39 +++
agility/setup.py | 2 +-
core/pom.xml | 10 +-
.../oodt/cas/filemgr/catalog/LuceneCatalog.java | 10 +-
.../oodt/cas/filemgr/structs/ProductPage.java | 2 +
.../oodt/cas/filemgr/tools/CASAnalyzer.java | 29 +-
.../oodt/cas/filemgr/tools/CatalogSearch.java | 1 -
.../oodt/cas/filemgr/tools/DeleteProduct.java | 301 ++++++++++---------
.../oodt/cas/filemgr/tools/MetadataDumper.java | 1 -
.../oodt/cas/filemgr/tools/QueryTool.java | 120 ++++----
.../oodt/cas/filemgr/tools/SolrIndexer.java | 1 +
.../cas/filemgr/catalog/TestLuceneCatalog.java | 10 +-
.../apache/oodt/pcs/util/FileManagerUtils.java | 37 +++
.../oodt/pcs/services/HealthResource.java | 18 +-
.../cas/product/data/DataDeliveryServlet.java | 16 +-
.../oodt/cas/product/rss/RSSProductServlet.java | 5 +
.../DataSourceWorkflowInstanceRepository.java | 54 ++++
.../LuceneWorkflowInstanceRepository.java | 53 +++-
.../MemoryWorkflowInstanceRepository.java | 6 +
.../instrepo/WorkflowInstanceRepository.java | 8 +
.../workflow/system/XmlRpcWorkflowManager.java | 8 +
.../system/XmlRpcWorkflowManagerClient.java | 6 +
.../TestAsynchronousLocalEngineRunner.java | 34 +--
.../TestLuceneWorkflowInstanceRepository.java | 19 ++
25 files changed, 537 insertions(+), 255 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/oodt/blob/a1a96fb3/core/pom.xml
----------------------------------------------------------------------
[08/52] [abbrv] 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
[42/52] [abbrv] oodt git commit: Added missing conf-publisher binary
and minor improvements
Posted by ma...@apache.org.
Added missing conf-publisher binary and minor improvements
Project: http://git-wip-us.apache.org/repos/asf/oodt/repo
Commit: http://git-wip-us.apache.org/repos/asf/oodt/commit/39b6c888
Tree: http://git-wip-us.apache.org/repos/asf/oodt/tree/39b6c888
Diff: http://git-wip-us.apache.org/repos/asf/oodt/diff/39b6c888
Branch: refs/heads/master
Commit: 39b6c888512b74feaa9d5494c7bd7268f4b42f6e
Parents: 8b02792
Author: Imesha Sudasingha <im...@gmail.com>
Authored: Wed Jul 26 21:51:41 2017 +0530
Committer: Imesha Sudasingha <im...@gmail.com>
Committed: Fri Jul 28 21:20:43 2017 +0530
----------------------------------------------------------------------
config/pom.xml | 36 +-
config/src/main/assembly/assembly.xml | 4 +-
.../DistributedConfigurationManager.java | 1 -
.../DistributedConfigurationPublisher.java | 257 ++++++++++++++
.../config/distributed/cli/ConfigPublisher.java | 105 ++++++
.../cli/DistributedConfigurationPublisher.java | 331 -------------------
.../config/distributed/utils/FilePathUtils.java | 6 +-
.../src/main/resources/etc/config-publisher.xml | 16 +-
config/src/main/resources/etc/log4j.xml | 5 +-
config/src/main/scripts/conf-publisher | 36 ++
.../DistributedConfigurationManagerTest.java | 25 +-
.../DistributedConfigurationPublisherTest.java | 6 +-
.../src/test/resources/etc/config-publisher.xml | 4 +-
13 files changed, 454 insertions(+), 378 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/oodt/blob/39b6c888/config/pom.xml
----------------------------------------------------------------------
diff --git a/config/pom.xml b/config/pom.xml
index 741caac..6719c48 100644
--- a/config/pom.xml
+++ b/config/pom.xml
@@ -5,7 +5,7 @@
<parent>
<artifactId>oodt-core</artifactId>
<groupId>org.apache.oodt</groupId>
- <version>1.1-SNAPSHOT</version>
+ <version>1.2-SNAPSHOT</version>
<relativePath>../core/pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -17,29 +17,25 @@
<dependencies>
<dependency>
- <groupId>org.apache.curator</groupId>
- <artifactId>curator-framework</artifactId>
-
+ <groupId>args4j</groupId>
+ <artifactId>args4j</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>
+ <groupId>org.apache.curator</groupId>
+ <artifactId>curator-framework</artifactId>
</dependency>
<dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-core</artifactId>
+ <groupId>org.apache.curator</groupId>
+ <artifactId>curator-test</artifactId>
</dependency>
<dependency>
- <groupId>args4j</groupId>
- <artifactId>args4j</artifactId>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
@@ -50,12 +46,16 @@
<artifactId>slf4j-log4j12</artifactId>
</dependency>
<dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-beans</artifactId>
</dependency>
<dependency>
- <groupId>org.apache.curator</groupId>
- <artifactId>curator-test</artifactId>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-context</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-core</artifactId>
</dependency>
</dependencies>
http://git-wip-us.apache.org/repos/asf/oodt/blob/39b6c888/config/src/main/assembly/assembly.xml
----------------------------------------------------------------------
diff --git a/config/src/main/assembly/assembly.xml b/config/src/main/assembly/assembly.xml
index 2743cab..bb6f31e 100644
--- a/config/src/main/assembly/assembly.xml
+++ b/config/src/main/assembly/assembly.xml
@@ -33,8 +33,8 @@
</includes>
</fileSet>
<fileSet>
- <directory>${basedir}/src/main/bin</directory>
- <outputDirectory>bin</outputDirectory>
+ <directory>${basedir}/src/main/scripts</directory>
+ <outputDirectory>.</outputDirectory>
<includes/>
<fileMode>755</fileMode>
</fileSet>
http://git-wip-us.apache.org/repos/asf/oodt/blob/39b6c888/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 da96913..122a78e 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
@@ -37,7 +37,6 @@ 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
http://git-wip-us.apache.org/repos/asf/oodt/blob/39b6c888/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..81fe2af
--- /dev/null
+++ b/config/src/main/java/org/apache/oodt/config/distributed/DistributedConfigurationPublisher.java
@@ -0,0 +1,257 @@
+/*
+ * 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.Component;
+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 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 Component component;
+
+ public DistributedConfigurationPublisher(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");
+ }
+
+ 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.newCuratorFrameworkClient(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 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.
+ *
+ * @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;
+ }
+ }
+
+ /**
+ * Removes all the nodes from zookeeper where the configuration corresponding to component {@link #component} 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();
+ 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 (existingData.equals(content)) {
+ 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 Component getComponent() {
+ return component;
+ }
+}
http://git-wip-us.apache.org/repos/asf/oodt/blob/39b6c888/config/src/main/java/org/apache/oodt/config/distributed/cli/ConfigPublisher.java
----------------------------------------------------------------------
diff --git a/config/src/main/java/org/apache/oodt/config/distributed/cli/ConfigPublisher.java b/config/src/main/java/org/apache/oodt/config/distributed/cli/ConfigPublisher.java
new file mode 100644
index 0000000..7a78a8c
--- /dev/null
+++ b/config/src/main/java/org/apache/oodt/config/distributed/cli/ConfigPublisher.java
@@ -0,0 +1,105 @@
+/*
+ * 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.oodt.config.Constants;
+import org.apache.oodt.config.distributed.DistributedConfigurationPublisher;
+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.util.Map;
+
+import static org.apache.oodt.config.Constants.Properties.ZK_CONNECT_STRING;
+
+public class ConfigPublisher {
+
+ private static final Logger logger = LoggerFactory.getLogger(ConfigPublisher.class);
+
+ 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.getComponent()));
+
+ if (cmdLineOptions.isPublish()) {
+ System.out.println(String.format("Publishing configuration for : %s", publisher.getComponent()));
+ publisher.publishConfiguration();
+ 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.getComponent()));
+ if (publisher.verifyPublishedConfiguration()) {
+ System.out.println("OK... Configuration verified");
+ 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");
+ }
+ System.out.println();
+ }
+
+ if (cmdLineOptions.isClear()) {
+ System.out.println(String.format("Clearing configuration for : %s", publisher.getComponent()));
+ publisher.clearConfiguration();
+ System.out.println(String.format("Cleared configuration for : %s", publisher.getComponent()));
+ System.out.println();
+ }
+
+ publisher.destroy();
+ }
+ } 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("Exiting CLI ...");
+ }
+}
http://git-wip-us.apache.org/repos/asf/oodt/blob/39b6c888/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
deleted file mode 100644
index 25a45ba..0000000
--- a/config/src/main/java/org/apache/oodt/config/distributed/cli/DistributedConfigurationPublisher.java
+++ /dev/null
@@ -1,331 +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.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;
-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 Component component;
-
- public DistributedConfigurationPublisher(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");
- }
-
- 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.newCuratorFrameworkClient(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 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.
- *
- * @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;
- }
- }
-
- /**
- * Removes all the nodes from zookeeper where the configuration corresponding to component {@link #component} 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();
- 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 (existingData.equals(content)) {
- 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.getComponent()));
-
- if (cmdLineOptions.isPublish()) {
- System.out.println(String.format("Publishing configuration for : %s", publisher.getComponent()));
- publisher.publishConfiguration();
- 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.getComponent()));
- if (publisher.verifyPublishedConfiguration()) {
- System.out.println("OK... Configuration verified");
- 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");
- }
- System.out.println();
- }
-
- if (cmdLineOptions.isClear()) {
- System.out.println(String.format("Clearing configuration for : %s", publisher.getComponent()));
- publisher.clearConfiguration();
- System.out.println(String.format("Cleared configuration for : %s", publisher.getComponent()));
- System.out.println();
- }
-
- publisher.destroy();
- }
- } 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("Exiting CLI ...");
- }
-
- public Component getComponent() {
- return component;
- }
-}
http://git-wip-us.apache.org/repos/asf/oodt/blob/39b6c888/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 5b242c2..cfb5ff9 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
@@ -32,7 +32,11 @@ public class FilePathUtils {
}
public static String fixForComponentHome(Component component, String suffixPath) {
- String prefix = System.getenv().get(component.getHome());
+ String prefix = System.getProperty(component.getHome());
+ if (prefix == null) {
+ prefix = System.getenv().get(component.getHome());
+ }
+
StringBuilder path = new StringBuilder();
if (prefix != null && !prefix.trim().isEmpty()) {
prefix = prefix.trim();
http://git-wip-us.apache.org/repos/asf/oodt/blob/39b6c888/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 443a7a5..88ba33b 100644
--- a/config/src/main/resources/etc/config-publisher.xml
+++ b/config/src/main/resources/etc/config-publisher.xml
@@ -20,21 +20,21 @@
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">
+ <bean id="filemgr-config-publisher" class="org.apache.oodt.config.distributed.DistributedConfigurationPublisher">
<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"/>
+ <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/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"/>
+ <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/39b6c888/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 17d6e8e..8cc1919 100644
--- a/config/src/main/resources/etc/log4j.xml
+++ b/config/src/main/resources/etc/log4j.xml
@@ -37,7 +37,7 @@
</appender>
<root>
- <priority value="DEBUG"/>
+ <priority value="INFO"/>
<appender-ref ref="console"/>
<appender-ref ref="file"/>
</root>
@@ -45,6 +45,9 @@
<logger name="org.apache.zookeeper">
<level value="ERROR"/>
</logger>
+ <logger name="org.springframework">
+ <level value="ERROR"/>
+ </logger>
<logger name="org.apache.curator">
<level value="ERROR"/>
</logger>
http://git-wip-us.apache.org/repos/asf/oodt/blob/39b6c888/config/src/main/scripts/conf-publisher
----------------------------------------------------------------------
diff --git a/config/src/main/scripts/conf-publisher b/config/src/main/scripts/conf-publisher
new file mode 100644
index 0000000..618af4b
--- /dev/null
+++ b/config/src/main/scripts/conf-publisher
@@ -0,0 +1,36 @@
+#!/bin/sh
+#/*
+# * 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.
+# */
+
+[ -f /etc/sysconfig/java ] && . /etc/sysconfig/java
+
+CONF_HOME=.
+
+for file in `find ${CONF_HOME}/lib/*.jar`; do
+ LIB_DEPS="${file}:${LIB_DEPS}"
+done
+
+LIB_DEPS="${CONF_HOME}/etc/log4j.xml:${LIB_DEPS}"
+
+echo -n "Starting Configuration Publisher"
+$JAVA_HOME/bin/java \
+ -cp ${LIB_DEPS} \
+ -Dlog4j.configuration=etc/log4j.xml \
+ org.apache.oodt.config.distributed.cli.ConfigPublisher "$@"
+echo "OK"
+sleep 1
+exit 0
http://git-wip-us.apache.org/repos/asf/oodt/blob/39b6c888/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 08ecdc1..9052ac3 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
@@ -19,14 +19,12 @@ 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.cli.ConfigPublisher;
import org.apache.oodt.config.distributed.utils.FilePathUtils;
import org.junit.AfterClass;
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;
@@ -42,6 +40,7 @@ import java.util.Set;
import static org.apache.oodt.config.Constants.CONFIG_PUBLISHER_XML;
import static org.apache.oodt.config.Constants.SEPARATOR;
+import static org.junit.Assert.fail;
/**
* Testing the {@link DistributedConfigurationManager} whether it is downloading and storing the configuration correctly
@@ -57,7 +56,7 @@ public class DistributedConfigurationManagerTest extends AbstractDistributedConf
public static void setUp() throws Exception {
AbstractDistributedConfigurationTest.setUp();
- DistributedConfigurationPublisher.main(new String[]{
+ ConfigPublisher.main(new String[]{
"-connectString", zookeeper.getConnectString(),
"-publish"
});
@@ -68,6 +67,8 @@ public class DistributedConfigurationManagerTest extends AbstractDistributedConf
publishers = new ArrayList<>(distributedConfigurationPublishers.values().size());
for (Object bean : distributedConfigurationPublishers.values()) {
DistributedConfigurationPublisher publisher = (DistributedConfigurationPublisher) bean;
+
+ System.setProperty(publisher.getComponent().getHome(), ".");
publishers.add(publisher);
}
}
@@ -84,11 +85,10 @@ public class DistributedConfigurationManagerTest extends AbstractDistributedConf
Properties properties = new Properties();
try (InputStream in = new FileInputStream(originalFile)) {
properties.load(in);
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail(e.getMessage());
}
- catch (Exception e){
- e.printStackTrace();
- fail(e.getMessage());
- }
for (String key : properties.stringPropertyNames()) {
Assert.assertEquals(properties.getProperty(key), System.getProperty(key));
@@ -98,7 +98,7 @@ public class DistributedConfigurationManagerTest extends AbstractDistributedConf
fileName = fileName.startsWith(SEPARATOR) ? fileName.substring(SEPARATOR.length()) : fileName;
fileName = FilePathUtils.fixForComponentHome(publisher.getComponent(), fileName);
File downloadedFile = new File(fileName);
- Assert.assertNotNull(downloadedFile);
+ Assert.assertNotNull(downloadedFile);
Assert.assertTrue(downloadedFile.exists());
}
@@ -126,7 +126,10 @@ public class DistributedConfigurationManagerTest extends AbstractDistributedConf
String fileName = entry.getValue();
fileName = fileName.startsWith(SEPARATOR) ? fileName.substring(1) : fileName;
- String prefixPath = System.getenv(publisher.getComponent().getHome());
+ String prefixPath = System.getProperty(publisher.getComponent().getHome());
+ if (prefixPath == null) {
+ prefixPath = System.getenv(publisher.getComponent().getHome());
+ }
String confDir = prefixPath != null && !prefixPath.trim().isEmpty() ?
prefixPath.trim() + SEPARATOR + fileName.split(SEPARATOR)[0] : fileName.split(SEPARATOR)[0];
@@ -135,7 +138,7 @@ public class DistributedConfigurationManagerTest extends AbstractDistributedConf
}
}
- DistributedConfigurationPublisher.main(new String[]{
+ ConfigPublisher.main(new String[]{
"-connectString", zookeeper.getConnectString(),
"-clear"
});
http://git-wip-us.apache.org/repos/asf/oodt/blob/39b6c888/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 4f1552b..2c130db 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
@@ -18,7 +18,7 @@
package org.apache.oodt.config.distributed;
import org.apache.commons.io.FileUtils;
-import org.apache.oodt.config.distributed.cli.DistributedConfigurationPublisher;
+import org.apache.oodt.config.distributed.cli.ConfigPublisher;
import org.junit.Assert;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
@@ -41,7 +41,7 @@ public class DistributedConfigurationPublisherTest extends AbstractDistributedCo
@Test
public void publishConfigurationTest() throws Exception {
// Publishing configuration through CLI and verifying whether they were stored correctly
- DistributedConfigurationPublisher.main(new String[]{
+ ConfigPublisher.main(new String[]{
"-connectString", zookeeper.getConnectString(),
"-publish",
"-verify"
@@ -82,7 +82,7 @@ public class DistributedConfigurationPublisherTest extends AbstractDistributedCo
}
// Clearing configuration through CLI and checking whether the configuration has actually been gone
- DistributedConfigurationPublisher.main(new String[]{
+ ConfigPublisher.main(new String[]{
"-connectString", zookeeper.getConnectString(),
"-clear"
});
http://git-wip-us.apache.org/repos/asf/oodt/blob/39b6c888/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 89e16f3..ecae033 100644
--- a/config/src/test/resources/etc/config-publisher.xml
+++ b/config/src/test/resources/etc/config-publisher.xml
@@ -19,7 +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">
- <bean id="filemgr-config-publisher" class="org.apache.oodt.config.distributed.cli.DistributedConfigurationPublisher">
+ <bean id="filemgr-config-publisher" class="org.apache.oodt.config.distributed.DistributedConfigurationPublisher">
<constructor-arg value="FILE_MANAGER"/>
<property name="propertiesFiles">
<map key-type="java.lang.String" value-type="java.lang.String">
@@ -38,7 +38,7 @@
</property>
</bean>
- <bean id="resmgr-config-publisher" class="org.apache.oodt.config.distributed.cli.DistributedConfigurationPublisher">
+ <bean id="resmgr-config-publisher" class="org.apache.oodt.config.distributed.DistributedConfigurationPublisher">
<constructor-arg value="RESOURCE_MANAGER"/>
<property name="propertiesFiles">
<map key-type="java.lang.String" value-type="java.lang.String">
[15/52] [abbrv] 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/master
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
[48/52] [abbrv] oodt git commit: Improvements to filemgr and
config-publisher bash scripts
Posted by ma...@apache.org.
Improvements to filemgr and config-publisher bash scripts
Project: http://git-wip-us.apache.org/repos/asf/oodt/repo
Commit: http://git-wip-us.apache.org/repos/asf/oodt/commit/9ee8af48
Tree: http://git-wip-us.apache.org/repos/asf/oodt/tree/9ee8af48
Diff: http://git-wip-us.apache.org/repos/asf/oodt/diff/9ee8af48
Branch: refs/heads/master
Commit: 9ee8af48ba45904a44d4e32b3030e8ad7d0bee21
Parents: 57a9235
Author: Imesha Sudasingha <im...@gmail.com>
Authored: Thu Aug 10 18:32:27 2017 +0530
Committer: Imesha Sudasingha <im...@gmail.com>
Committed: Thu Aug 10 18:32:27 2017 +0530
----------------------------------------------------------------------
.../java/org/apache/oodt/config/Component.java | 4 +--
.../config/ConfigurationManagerFactory.java | 37 ++++++++++++++++----
.../java/org/apache/oodt/config/Constants.java | 3 ++
config/src/main/resources/log4j.xml | 1 -
core/pom.xml | 11 +++---
filemgr/pom.xml | 6 +++-
filemgr/src/main/bin/filemgr | 6 ++--
.../TestDistributedXmlRpcFileManager.java | 1 +
.../distributed/config/filemgr.properties | 8 ++---
9 files changed, 54 insertions(+), 23 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/oodt/blob/9ee8af48/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 e2ea223..2c7123e 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", "OODT_FILEMGR_HOME"),
- RESOURCE_MANAGER("resmgr", "OODT_RESMGR_HOME");
+ 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;
http://git-wip-us.apache.org/repos/asf/oodt/blob/9ee8af48/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 9eecfaa..f3a5dc5 100644
--- a/config/src/main/java/org/apache/oodt/config/ConfigurationManagerFactory.java
+++ b/config/src/main/java/org/apache/oodt/config/ConfigurationManagerFactory.java
@@ -17,6 +17,7 @@
package org.apache.oodt.config;
+import org.apache.oodt.config.Constants.Env;
import org.apache.oodt.config.distributed.DistributedConfigurationManager;
import org.apache.oodt.config.standalone.StandaloneConfigurationManager;
import org.slf4j.Logger;
@@ -24,7 +25,9 @@ import org.slf4j.LoggerFactory;
import java.util.List;
+import static org.apache.oodt.config.Constants.Env.CONNECT_STRING;
import static org.apache.oodt.config.Constants.Properties.ENABLE_DISTRIBUTED_CONFIGURATION;
+import static org.apache.oodt.config.Constants.Properties.ZK_CONNECT_STRING;
/**
* Factory class to be used to get the {@link ConfigurationManager} instances accordingly.
@@ -40,18 +43,38 @@ public class 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
+ * 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>
*
- * @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
+ * @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(Component component, List<String> propertiesFiles) {
- if (Boolean.getBoolean(ENABLE_DISTRIBUTED_CONFIGURATION)) {
+ boolean isDistributed = Boolean.getBoolean(ENABLE_DISTRIBUTED_CONFIGURATION);
+ if (!isDistributed) {
+ String env = System.getenv(Env.ENABLE_DISTRIBUTED_CONFIGURATION);
+ if (env != null) {
+ isDistributed = Boolean.parseBoolean(env);
+ }
+ }
+
+ if (isDistributed) {
+ String connectString = System.getProperty(ZK_CONNECT_STRING);
+ if (connectString == null) {
+ connectString = System.getenv(CONNECT_STRING);
+ }
+
+ if (connectString == null) {
+ throw new IllegalArgumentException(
+ String.format("%s environment variable need to be set for distributed configuration management", CONNECT_STRING));
+ }
+
+ System.setProperty(ZK_CONNECT_STRING, connectString);
+
logger.info("Using distributed configuration management for {}", component);
return new DistributedConfigurationManager(component);
}
http://git-wip-us.apache.org/repos/asf/oodt/blob/9ee8af48/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 611f81e..9cd217f 100644
--- a/config/src/main/java/org/apache/oodt/config/Constants.java
+++ b/config/src/main/java/org/apache/oodt/config/Constants.java
@@ -43,6 +43,9 @@ public class Constants {
public static class Env {
/** Environment variable name to specify OODT project name */
public static final String OODT_PROJECT = "OODT_PROJECT";
+ /** The environment variable to be set, if to enable distributed configuration management */
+ public static final String ENABLE_DISTRIBUTED_CONFIGURATION = "OODT_DISTRIBUTED_CONF";
+ public static final String CONNECT_STRING = "ZK_CONNECT_STRING";
}
public static class Properties {
http://git-wip-us.apache.org/repos/asf/oodt/blob/9ee8af48/config/src/main/resources/log4j.xml
----------------------------------------------------------------------
diff --git a/config/src/main/resources/log4j.xml b/config/src/main/resources/log4j.xml
index 8cc1919..0cd8348 100644
--- a/config/src/main/resources/log4j.xml
+++ b/config/src/main/resources/log4j.xml
@@ -39,7 +39,6 @@
<root>
<priority value="INFO"/>
<appender-ref ref="console"/>
- <appender-ref ref="file"/>
</root>
<logger name="org.apache.zookeeper">
http://git-wip-us.apache.org/repos/asf/oodt/blob/9ee8af48/core/pom.xml
----------------------------------------------------------------------
diff --git a/core/pom.xml b/core/pom.xml
index b9f07e1..5e99f9e 100644
--- a/core/pom.xml
+++ b/core/pom.xml
@@ -253,6 +253,11 @@ the License.
<version>3.3.0</version>
</dependency>
<dependency>
+ <groupId>org.apache.zookeeper</groupId>
+ <artifactId>zookeeper</artifactId>
+ <version>3.5.1-alpha</version>
+ </dependency>
+ <dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-frontend-jaxrs</artifactId>
<version>2.6.0</version>
@@ -412,12 +417,6 @@ the License.
<groupId>org.apache.solr</groupId>
<artifactId>solr-solrj</artifactId>
<version>6.2.1</version>
- <exclusions>
- <exclusion>
- <groupId>org.apache.zookeeper</groupId>
- <artifactId>zookeeper</artifactId>
- </exclusion>
- </exclusions>
</dependency>
<dependency>
<groupId>org.apache.tika</groupId>
http://git-wip-us.apache.org/repos/asf/oodt/blob/9ee8af48/filemgr/pom.xml
----------------------------------------------------------------------
diff --git a/filemgr/pom.xml b/filemgr/pom.xml
index 4fadcb8..2086dc1 100644
--- a/filemgr/pom.xml
+++ b/filemgr/pom.xml
@@ -163,6 +163,10 @@
<groupId>org.apache.solr</groupId>
<artifactId>solr-lucene-core</artifactId>
</exclusion>
+ <exclusion>
+ <groupId>org.apache.zookeeper</groupId>
+ <artifactId>zookeeper</artifactId>
+ </exclusion>
</exclusions>
</dependency>
<dependency>
@@ -236,7 +240,7 @@
</property>
</systemProperties>
<environmentVariables>
- <OODT_FILEMGR_HOME>${project.basedir}</OODT_FILEMGR_HOME>
+ <FILEMGR_HOME>${project.basedir}</FILEMGR_HOME>
<OODT_PROJECT>primary</OODT_PROJECT>
</environmentVariables>
<forkedProcessTimeoutInSeconds>0</forkedProcessTimeoutInSeconds>
http://git-wip-us.apache.org/repos/asf/oodt/blob/9ee8af48/filemgr/src/main/bin/filemgr
----------------------------------------------------------------------
diff --git a/filemgr/src/main/bin/filemgr b/filemgr/src/main/bin/filemgr
index 1a4af47..02f5b90 100644
--- a/filemgr/src/main/bin/filemgr
+++ b/filemgr/src/main/bin/filemgr
@@ -34,7 +34,7 @@ else
fi
export JAVA_HOME
-FILEMGR_HOME=..
+FILEMGR_HOME=`cd ..; pwd`
export FILEMGR_HOME
RUN_HOME=${FILEMGR_HOME}/../run
export RUN_HOME
@@ -52,6 +52,8 @@ for file in `find ../lib/*.jar`; do
LIB_DEPS="${file}:${LIB_DEPS}"
done
+LIB_DEPS="${FILEMGR_HOME}/etc/log4j.xml:${LIB_DEPS}"
+
if [ ! -z $OODT_DISTRIBUTED_CONF ]
then
if [ ! -z $ZK_CONNECT_STRING ]
@@ -73,7 +75,7 @@ case "$1" in
$JAVA_HOME/bin/java \
-cp ${LIB_DEPS} \
${DISTRIBUTED_CONF_PROPERTIES} \
- -Dlog4j.configuration=./${FILEMGR_HOME}/etc/log4j.xml \
+ -Dlog4j.configuration=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 \
http://git-wip-us.apache.org/repos/asf/oodt/blob/9ee8af48/filemgr/src/test/java/org/apache/oodt/cas/filemgr/config/distributed/TestDistributedXmlRpcFileManager.java
----------------------------------------------------------------------
diff --git a/filemgr/src/test/java/org/apache/oodt/cas/filemgr/config/distributed/TestDistributedXmlRpcFileManager.java b/filemgr/src/test/java/org/apache/oodt/cas/filemgr/config/distributed/TestDistributedXmlRpcFileManager.java
index afbac03..3dd158b 100644
--- a/filemgr/src/test/java/org/apache/oodt/cas/filemgr/config/distributed/TestDistributedXmlRpcFileManager.java
+++ b/filemgr/src/test/java/org/apache/oodt/cas/filemgr/config/distributed/TestDistributedXmlRpcFileManager.java
@@ -44,6 +44,7 @@ import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
+// TODO: 8/10/17 Cleanup Dirs once done
public class TestDistributedXmlRpcFileManager extends AbstractDistributedConfigurationTest {
private static final int FM_PORT = 9001;
http://git-wip-us.apache.org/repos/asf/oodt/blob/9ee8af48/filemgr/src/test/resources/distributed/config/filemgr.properties
----------------------------------------------------------------------
diff --git a/filemgr/src/test/resources/distributed/config/filemgr.properties b/filemgr/src/test/resources/distributed/config/filemgr.properties
index 50d09a7..2ca5096 100644
--- a/filemgr/src/test/resources/distributed/config/filemgr.properties
+++ b/filemgr/src/test/resources/distributed/config/filemgr.properties
@@ -63,7 +63,7 @@ org.apache.oodt.cas.filemgr.catalog.science.jdbc.pass=
org.apache.oodt.cas.filemgr.catalog.science.jdbc.driver=org.hsqldb.jdbc.JDBCDriver
# lucene catalog configuration
-org.apache.oodt.cas.filemgr.catalog.lucene.idxPath=file:target/tmp
+org.apache.oodt.cas.filemgr.catalog.lucene.idxPath=target/tmp
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
@@ -90,10 +90,10 @@ org.apache.oodt.cas.filemgr.repositorymgr.science.jdbc.pass=
org.apache.oodt.cas.filemgr.repositorymgr.science.jdbc.driver=org.hsqldb.jdbc.JDBCDriver
# XML repository manager configuration
-org.apache.oodt.cas.filemgr.repositorymgr.dirs=file:[OODT_FILEMGR_HOME]/target/filemgr/policy/oodt
+org.apache.oodt.cas.filemgr.repositorymgr.dirs=file:[FILEMGR_HOME]/target/filemgr/policy/oodt
# XML validation layer configuration
-org.apache.oodt.cas.filemgr.validation.dirs=file:[OODT_FILEMGR_HOME]/target/filemgr/policy/oodt
+org.apache.oodt.cas.filemgr.validation.dirs=file:[FILEMGR_HOME]/target/filemgr/policy/oodt
# set the following property to 'true' to allow dynamic metadata fields,
# effectively bypassing the validation layer.
@@ -125,7 +125,7 @@ org.apache.oodt.cas.filemgr.datatransfer.s3.access.key=s3_access_key
org.apache.oodt.cas.filemgr.datatransfer.s3.secret.key=s3_secret_key
# location of Mime-Type repository
-org.apache.oodt.cas.filemgr.mime.type.repository=[OODT_FILEMGR_HOME]/target/filemgr/policy/mime-types.xml
+org.apache.oodt.cas.filemgr.mime.type.repository=[FILEMGR_HOME]/target/filemgr/policy/mime-types.xml
# tells the file manager system layer to include product instance metadata
# NOTE: here are the expected field mappings
[44/52] [abbrv] oodt git commit: Clear configuration files option for
configuration manager
Posted by ma...@apache.org.
Clear configuration files option for configuration manager
Project: http://git-wip-us.apache.org/repos/asf/oodt/repo
Commit: http://git-wip-us.apache.org/repos/asf/oodt/commit/72722e03
Tree: http://git-wip-us.apache.org/repos/asf/oodt/tree/72722e03
Diff: http://git-wip-us.apache.org/repos/asf/oodt/diff/72722e03
Branch: refs/heads/master
Commit: 72722e0339c522bfdeac3e13278e8682e9cf13df
Parents: e32f2bb
Author: Imesha Sudasingha <im...@gmail.com>
Authored: Sun Aug 6 12:59:21 2017 +0530
Committer: Imesha Sudasingha <im...@gmail.com>
Committed: Sun Aug 6 12:59:21 2017 +0530
----------------------------------------------------------------------
.../oodt/config/ConfigurationManager.java | 18 +++++
.../DistributedConfigurationManager.java | 72 ++++++++++++++++----
.../StandaloneConfigurationManager.java | 12 ++++
.../DistributedConfigurationManagerTest.java | 29 ++------
4 files changed, 97 insertions(+), 34 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/oodt/blob/72722e03/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 56fea0d..2554604 100644
--- a/config/src/main/java/org/apache/oodt/config/ConfigurationManager.java
+++ b/config/src/main/java/org/apache/oodt/config/ConfigurationManager.java
@@ -17,6 +17,8 @@
package org.apache.oodt.config;
+import java.util.List;
+
/**
* The abstract class to define functions of the configuration managers.
*
@@ -32,7 +34,23 @@ public abstract class ConfigurationManager {
public abstract void loadConfiguration() throws Exception;
+ /**
+ * Clears loaded configuration. Invocation of this method will remove the downloaded configuration files to be
+ * deleted in the distributed configuration management scenario. Any child class that is extending this class should
+ * implement this operation on their own.
+ */
+ public abstract void clearConfiguration();
+
public Component getComponent() {
return component;
}
+
+ /**
+ * Returns a list of file paths which are the locations of the files stored locally corresponding to configuration.
+ * In distributed configuration management scenario, this stands for the files downloaded and stored in local file
+ * system.
+ *
+ * @return list of locally stored files
+ */
+ public abstract List<String> getSavedFiles();
}
http://git-wip-us.apache.org/repos/asf/oodt/blob/72722e03/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 122a78e..6b6ef21 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
@@ -32,6 +32,7 @@ import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
+import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.TimeUnit;
@@ -55,6 +56,8 @@ public class DistributedConfigurationManager extends ConfigurationManager {
private Component component;
private ZNodePaths zNodePaths;
+ private List<String> savedFiles = new ArrayList<>();
+
public DistributedConfigurationManager(Component component) {
super(component);
this.component = component;
@@ -78,20 +81,17 @@ public class DistributedConfigurationManager extends ConfigurationManager {
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 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
+ * Properties#ZK_STARTUP_TIMEOUT} milli-seconds until the client connects to the zookeeper ensemble.
*/
private void startZookeeper() {
client = CuratorUtils.newCuratorFrameworkClient(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);
@@ -141,10 +141,7 @@ public class DistributedConfigurationManager extends ConfigurationManager {
logger.info("Properties loaded from ZNode at : {}", propertiesFileZNodePath);
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);
+ saveFile(localFilePath, bytes);
}
}
@@ -168,16 +165,67 @@ public class DistributedConfigurationManager extends ConfigurationManager {
byte[] bytes = client.getData().forPath(configFileZNodePath);
String localFilePath = zNodePaths.getLocalConfigFilePath(configFileZNodePath);
- localFilePath = FilePathUtils.fixForComponentHome(component, localFilePath);
- FileUtils.writeByteArrayToFile(new File(localFilePath), bytes);
- logger.info("Config file from ZNode at {} saved to {}", configFileZNodePath, localFilePath);
+ saveFile(localFilePath, bytes);
+ }
+ }
+
+ private void saveFile(String path, byte[] data) throws IOException {
+ String localFilePath = FilePathUtils.fixForComponentHome(component, path);
+ File localFile = new File(localFilePath);
+ if (localFile.exists()) {
+ logger.warn("Deleting already existing file at {} before writing new content", localFilePath);
+ localFile.delete();
+ }
+
+ logger.debug("Storing configuration in file: {}", localFilePath);
+ FileUtils.writeByteArrayToFile(localFile, data);
+ logger.info("File from ZNode at {} saved to {}", path, localFilePath);
+ savedFiles.add(localFilePath);
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public void clearConfiguration() {
+ for (String path : savedFiles) {
+ logger.debug("Removing saved file {}", path);
+ File file = new File(path);
+ if (file.delete()) {
+ logger.debug("Deleted saved file {}", path);
+
+ int lastIndex = path.lastIndexOf(Constants.SEPARATOR);
+ String parentPath = path.substring(0, lastIndex == -1 ? 0 : lastIndex);
+ while (!parentPath.isEmpty()) {
+ // Deleting parent if empty
+ File parent = new File(parentPath);
+ File[] files = parent.listFiles();
+ if (files == null || files.length != 0) {
+ break;
+ }
+
+ if (!parent.delete()) {
+ break;
+ }
+ logger.debug("Deleted directory {} since it is empty", parentPath);
+ lastIndex = parentPath.lastIndexOf(Constants.SEPARATOR);
+ parentPath = path.substring(0, lastIndex == -1 ? 0 : lastIndex);
+ }
+ } else {
+ logger.warn("Unable to delete saved file {}", path);
+ }
}
+ savedFiles.clear();
}
public Component getComponent() {
return component;
}
+ /** {@inheritDoc} */
+ @Override
+ public List<String> getSavedFiles() {
+ return new ArrayList<>(savedFiles);
+ }
+
public ZNodePaths getzNodePaths() {
return zNodePaths;
}
http://git-wip-us.apache.org/repos/asf/oodt/blob/72722e03/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 cc3fe1a..94269bb 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
@@ -52,4 +52,16 @@ public class StandaloneConfigurationManager extends ConfigurationManager {
logger.debug("Properties loaded from file : {}", file);
}
}
+
+ /** {@inheritDoc} */
+ @Override
+ public void clearConfiguration() {
+
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public List<String> getSavedFiles() {
+ return new ArrayList<>();
+ }
}
http://git-wip-us.apache.org/repos/asf/oodt/blob/72722e03/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 064d1c6..a4315a5 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
@@ -17,7 +17,6 @@
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.ConfigPublisher;
import org.apache.oodt.config.distributed.utils.FilePathUtils;
@@ -33,11 +32,9 @@ 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.SEPARATOR;
import static org.junit.Assert.fail;
@@ -114,6 +111,13 @@ public class DistributedConfigurationManagerTest extends AbstractDistributedConf
File file = new File(fileName);
Assert.assertTrue(file.exists());
}
+
+ List<String> localFiles = configurationManager.getSavedFiles();
+ configurationManager.clearConfiguration();
+ for (String localFile : localFiles) {
+ File file = new File(localFile);
+ Assert.assertFalse(file.exists());
+ }
}
}
@@ -121,25 +125,6 @@ public class DistributedConfigurationManagerTest extends AbstractDistributedConf
public void tearDownTest() throws Exception {
for (DistributedConfigurationPublisher publisher : publishers) {
publisher.destroy();
-
- // 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 prefixPath = System.getProperty(publisher.getComponent().getHome());
- if (prefixPath == null) {
- 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);
- }
}
ConfigPublisher.main(new String[]{
[50/52] [abbrv] oodt git commit: Added cleaning up directories
created when testing file manager
Posted by ma...@apache.org.
Added cleaning up directories created when testing file manager
Project: http://git-wip-us.apache.org/repos/asf/oodt/repo
Commit: http://git-wip-us.apache.org/repos/asf/oodt/commit/57e54465
Tree: http://git-wip-us.apache.org/repos/asf/oodt/tree/57e54465
Diff: http://git-wip-us.apache.org/repos/asf/oodt/diff/57e54465
Branch: refs/heads/master
Commit: 57e544658f0716395c78b3c0cdaa3875b1c2cdff
Parents: c437106
Author: Imesha Sudasingha <im...@gmail.com>
Authored: Sat Aug 12 12:21:29 2017 +0530
Committer: Imesha Sudasingha <im...@gmail.com>
Committed: Sat Aug 12 12:21:29 2017 +0530
----------------------------------------------------------------------
.../TestDistributedXmlRpcFileManager.java | 31 +++++++++++++++++++-
.../distributed/config/filemgr.properties | 2 +-
2 files changed, 31 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/oodt/blob/57e54465/filemgr/src/test/java/org/apache/oodt/cas/filemgr/config/distributed/TestDistributedXmlRpcFileManager.java
----------------------------------------------------------------------
diff --git a/filemgr/src/test/java/org/apache/oodt/cas/filemgr/config/distributed/TestDistributedXmlRpcFileManager.java b/filemgr/src/test/java/org/apache/oodt/cas/filemgr/config/distributed/TestDistributedXmlRpcFileManager.java
index 3dd158b..19a8e56 100644
--- a/filemgr/src/test/java/org/apache/oodt/cas/filemgr/config/distributed/TestDistributedXmlRpcFileManager.java
+++ b/filemgr/src/test/java/org/apache/oodt/cas/filemgr/config/distributed/TestDistributedXmlRpcFileManager.java
@@ -26,6 +26,7 @@ import org.apache.oodt.cas.filemgr.system.XmlRpcFileManager;
import org.apache.oodt.cas.filemgr.system.XmlRpcFileManagerClient;
import org.apache.oodt.cas.metadata.Metadata;
import org.apache.oodt.cas.metadata.SerializableMetadata;
+import org.apache.oodt.cas.metadata.util.PathUtils;
import org.apache.oodt.config.distributed.cli.ConfigPublisher;
import org.apache.oodt.config.test.AbstractDistributedConfigurationTest;
import org.junit.After;
@@ -44,7 +45,16 @@ import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
-// TODO: 8/10/17 Cleanup Dirs once done
+/**
+ * Tests the {@link XmlRpcFileManager} with distributed configuration management enabled. This test will first publish
+ * the required configuration to zookeeper through {@link ConfigPublisher} and will start the {@link XmlRpcFileManager}
+ * which will first download and store published files locally. Then the correct functionality of {@link
+ * XmlRpcFileManager} is tested by using those downloaded configuration files for configuration.
+ * <p>
+ * This class is adapted from {@link org.apache.oodt.cas.filemgr.system.TestXmlRpcFileManager} class
+ *
+ * @author Imesha Sudasingha
+ */
public class TestDistributedXmlRpcFileManager extends AbstractDistributedConfigurationTest {
private static final int FM_PORT = 9001;
@@ -194,8 +204,27 @@ public class TestDistributedXmlRpcFileManager extends AbstractDistributedConfigu
"-a", "clear"
});
+ String luceneIdx = System.getProperty("org.apache.oodt.cas.filemgr.catalog.lucene.idxPath");
+ if (luceneIdx != null) {
+ luceneIdx = PathUtils.replaceEnvVariables(luceneIdx);
+ deleteAllFiles(luceneIdx);
+ }
+
System.clearProperty("org.apache.oodt.cas.cli.action.spring.config");
System.clearProperty("org.apache.oodt.cas.cli.option.spring.config");
System.clearProperty(ENABLE_DISTRIBUTED_CONFIGURATION);
}
+
+ private void deleteAllFiles(String startDir) {
+ File startDirFile = new File(startDir);
+ File[] delFiles = startDirFile.listFiles();
+
+ if (delFiles != null && delFiles.length > 0) {
+ for (File delFile : delFiles) {
+ delFile.delete();
+ }
+ }
+
+ startDirFile.delete();
+ }
}
http://git-wip-us.apache.org/repos/asf/oodt/blob/57e54465/filemgr/src/test/resources/distributed/config/filemgr.properties
----------------------------------------------------------------------
diff --git a/filemgr/src/test/resources/distributed/config/filemgr.properties b/filemgr/src/test/resources/distributed/config/filemgr.properties
index 2ca5096..9317129 100644
--- a/filemgr/src/test/resources/distributed/config/filemgr.properties
+++ b/filemgr/src/test/resources/distributed/config/filemgr.properties
@@ -63,7 +63,7 @@ org.apache.oodt.cas.filemgr.catalog.science.jdbc.pass=
org.apache.oodt.cas.filemgr.catalog.science.jdbc.driver=org.hsqldb.jdbc.JDBCDriver
# lucene catalog configuration
-org.apache.oodt.cas.filemgr.catalog.lucene.idxPath=target/tmp
+org.apache.oodt.cas.filemgr.catalog.lucene.idxPath=[FILEMGR_HOME]/target/tmp
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
[51/52] [abbrv] 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/3df0e43d
Tree: http://git-wip-us.apache.org/repos/asf/oodt/tree/3df0e43d
Diff: http://git-wip-us.apache.org/repos/asf/oodt/diff/3df0e43d
Branch: refs/heads/master
Commit: 3df0e43de5f8c78348cff5da766e75f62343a380
Parents: 57e5446 7443a7c
Author: Imesha Sudasingha <im...@gmail.com>
Authored: Tue Aug 15 22:31:30 2017 +0530
Committer: Imesha Sudasingha <im...@gmail.com>
Committed: Tue Aug 15 22:31:30 2017 +0530
----------------------------------------------------------------------
CHANGES.txt | 4 +++-
cli/pom.xml | 2 +-
commons/pom.xml | 2 +-
core/pom.xml | 2 +-
crawler/pom.xml | 2 +-
curator/services/pom.xml | 2 +-
curator/sso/pom.xml | 2 +-
curator/webapp/pom.xml | 2 +-
filemgr/pom.xml | 2 +-
metadata/pom.xml | 2 +-
mvn/archetypes/opsui/pom.xml | 2 +-
mvn/archetypes/pom.xml | 2 +-
mvn/archetypes/radix/pom.xml | 2 +-
mvn/plugins/cas-install/pom.xml | 2 +-
pcs/core/pom.xml | 2 +-
pcs/input/pom.xml | 2 +-
pcs/opsui/pom.xml | 2 +-
pcs/services/pom.xml | 2 +-
pge/pom.xml | 2 +-
pom.xml | 2 +-
resource/pom.xml | 2 +-
webapp/components/pom.xml | 2 +-
webapp/fmbrowser/pom.xml | 4 ++--
webapp/fmprod/pom.xml | 2 +-
webapp/wmonitor/pom.xml | 4 ++--
webapp/wmservices/pom.xml | 2 +-
workflow/pom.xml | 2 +-
27 files changed, 31 insertions(+), 29 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/oodt/blob/3df0e43d/core/pom.xml
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/oodt/blob/3df0e43d/filemgr/pom.xml
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/oodt/blob/3df0e43d/pom.xml
----------------------------------------------------------------------
[07/52] [abbrv] 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>
[18/52] [abbrv] oodt git commit: minor change
Posted by ma...@apache.org.
minor change
Project: http://git-wip-us.apache.org/repos/asf/oodt/repo
Commit: http://git-wip-us.apache.org/repos/asf/oodt/commit/ec5b2013
Tree: http://git-wip-us.apache.org/repos/asf/oodt/tree/ec5b2013
Diff: http://git-wip-us.apache.org/repos/asf/oodt/diff/ec5b2013
Branch: refs/heads/master
Commit: ec5b20133c623d269ef39f12da74ade07eec4d69
Parents: 1ae9242
Author: Tom Barber <to...@analytical-labs.com>
Authored: Mon Jul 10 15:15:35 2017 +0100
Committer: Tom Barber <to...@analytical-labs.com>
Committed: Mon Jul 10 15:15:35 2017 +0100
----------------------------------------------------------------------
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/oodt/blob/ec5b2013/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index de11028..46e7fd5 100644
--- a/README.md
+++ b/README.md
@@ -148,6 +148,6 @@ 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.
[35/52] [abbrv] oodt git commit: Merge https://github.com/apache/oodt
into feature/zookeeper-config
Posted by ma...@apache.org.
Merge 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/e59e77c1
Tree: http://git-wip-us.apache.org/repos/asf/oodt/tree/e59e77c1
Diff: http://git-wip-us.apache.org/repos/asf/oodt/diff/e59e77c1
Branch: refs/heads/master
Commit: e59e77c1ae3e7fe27cf5d5ec232da219807f2f21
Parents: 8315382 7616e00
Author: Chris Mattmann <ma...@apache.org>
Authored: Wed Jul 19 21:49:29 2017 -0700
Committer: Chris Mattmann <ma...@apache.org>
Committed: Wed Jul 19 21:49:29 2017 -0700
----------------------------------------------------------------------
CHANGES.txt | 16 +++++++-
agility/setup.py | 2 +-
cli/pom.xml | 2 +-
commons/pom.xml | 2 +-
core/pom.xml | 2 +-
crawler/pom.xml | 2 +-
curator/services/pom.xml | 2 +-
curator/sso/pom.xml | 2 +-
curator/webapp/pom.xml | 2 +-
filemgr/pom.xml | 2 +-
metadata/pom.xml | 2 +-
mvn/archetypes/opsui/pom.xml | 2 +-
mvn/archetypes/pom.xml | 2 +-
mvn/archetypes/radix/pom.xml | 2 +-
.../radix/src/main/resources/bin/radix | 2 +-
mvn/plugins/cas-install/pom.xml | 2 +-
pcs/core/pom.xml | 2 +-
pcs/input/pom.xml | 2 +-
pcs/opsui/pom.xml | 2 +-
pcs/services/pom.xml | 2 +-
pge/pom.xml | 2 +-
.../cas/pge/staging/FileManagerFileStager.java | 1 +
.../pge/staging/TestFileManagerFileStager.java | 41 ++++++++++++++++++++
pom.xml | 2 +-
resource/pom.xml | 2 +-
webapp/components/pom.xml | 2 +-
webapp/fmbrowser/pom.xml | 4 +-
webapp/fmprod/pom.xml | 2 +-
webapp/wmonitor/pom.xml | 4 +-
webapp/wmservices/pom.xml | 6 +--
workflow/pom.xml | 2 +-
31 files changed, 88 insertions(+), 34 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/oodt/blob/e59e77c1/core/pom.xml
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/oodt/blob/e59e77c1/filemgr/pom.xml
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/oodt/blob/e59e77c1/pom.xml
----------------------------------------------------------------------
[27/52] [abbrv] 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/master
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());
}
[39/52] [abbrv] oodt git commit: Added maven-resource-plugin for
example resource copying and CLI improvements
Posted by ma...@apache.org.
http://git-wip-us.apache.org/repos/asf/oodt/blob/d2f2d49d/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
deleted file mode 100755
index d56c44b..0000000
--- a/config/src/main/resources/examples/filemgr/oodt/elements.xml
+++ /dev/null
@@ -1,77 +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.
--->
-<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/d2f2d49d/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
deleted file mode 100755
index 418c0d9..0000000
--- a/config/src/main/resources/examples/filemgr/oodt/product-type-element-map.xml
+++ /dev/null
@@ -1,33 +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.
--->
-<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/d2f2d49d/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
deleted file mode 100755
index 2d40847..0000000
--- a/config/src/main/resources/examples/filemgr/oodt/product-types.xml
+++ /dev/null
@@ -1,53 +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.
--->
-<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>
http://git-wip-us.apache.org/repos/asf/oodt/blob/d2f2d49d/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
deleted file mode 100755
index 04919e9..0000000
--- a/config/src/main/resources/examples/resmgr/cmd-line-actions.xml
+++ /dev/null
@@ -1,92 +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.
-
- 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/d2f2d49d/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
deleted file mode 100755
index a7a1fde..0000000
--- a/config/src/main/resources/examples/resmgr/cmd-line-options.xml
+++ /dev/null
@@ -1,601 +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.
-
- 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/d2f2d49d/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
deleted file mode 100755
index bbe0def..0000000
--- a/config/src/main/resources/examples/resmgr/jobs/exJob.xml
+++ /dev/null
@@ -1,30 +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.
--->
-<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/d2f2d49d/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
deleted file mode 100755
index 3cbeb29..0000000
--- a/config/src/main/resources/examples/resmgr/jobs/exLongJob.xml
+++ /dev/null
@@ -1,30 +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.
--->
-<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/d2f2d49d/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
deleted file mode 100755
index 8785c8b..0000000
--- a/config/src/main/resources/examples/resmgr/logging.properties
+++ /dev/null
@@ -1,67 +0,0 @@
-# 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/d2f2d49d/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
deleted file mode 100755
index 73b0eba..0000000
--- a/config/src/main/resources/examples/resmgr/node-to-queue-mapping.xml
+++ /dev/null
@@ -1,26 +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.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/d2f2d49d/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
deleted file mode 100755
index d3d415d..0000000
--- a/config/src/main/resources/examples/resmgr/nodes.xml
+++ /dev/null
@@ -1,23 +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.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/d2f2d49d/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
deleted file mode 100755
index 5520c7b..0000000
--- a/config/src/main/resources/examples/resmgr/resource.properties
+++ /dev/null
@@ -1,61 +0,0 @@
-# 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/d2f2d49d/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
index 4694dfa..27174ba 100644
--- a/config/src/test/java/org/apache/oodt/config/distributed/AbstractDistributedConfigurationTest.java
+++ b/config/src/test/java/org/apache/oodt/config/distributed/AbstractDistributedConfigurationTest.java
@@ -27,6 +27,8 @@ import static org.apache.oodt.config.Constants.Properties.ZK_CONNECT_STRING;
public abstract class AbstractDistributedConfigurationTest {
+ protected static final String CONFIG_PUBLISHER_XML = "config-publisher.xml";
+
protected static TestingServer zookeeper;
protected static CuratorFramework client;
http://git-wip-us.apache.org/repos/asf/oodt/blob/d2f2d49d/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 71ce713..d96767b 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
@@ -38,7 +38,6 @@ 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;
import static org.junit.Assert.fail;
@@ -58,6 +57,7 @@ public class DistributedConfigurationManagerTest extends AbstractDistributedConf
ConfigPublisher.main(new String[]{
"-connectString", zookeeper.getConnectString(),
+ "-config", CONFIG_PUBLISHER_XML,
"-a", "publish"
});
@@ -140,6 +140,7 @@ public class DistributedConfigurationManagerTest extends AbstractDistributedConf
ConfigPublisher.main(new String[]{
"-connectString", zookeeper.getConnectString(),
+ "-config", CONFIG_PUBLISHER_XML,
"-a", "clear"
});
http://git-wip-us.apache.org/repos/asf/oodt/blob/d2f2d49d/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 5a529ed..24a43e3 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
@@ -29,8 +29,6 @@ import java.util.ArrayList;
import java.util.List;
import java.util.Map;
-import static org.apache.oodt.config.Constants.CONFIG_PUBLISHER_XML;
-
/**
* Testing the functionality of {@link DistributedConfigurationPublisher} and its CLI
*
@@ -43,6 +41,7 @@ public class DistributedConfigurationPublisherTest extends AbstractDistributedCo
// Publishing configuration through CLI and verifying whether they were stored correctly
ConfigPublisher.main(new String[]{
"-connectString", zookeeper.getConnectString(),
+ "-config", CONFIG_PUBLISHER_XML,
"-a", "publish"
});
@@ -83,6 +82,7 @@ public class DistributedConfigurationPublisherTest extends AbstractDistributedCo
// Clearing configuration through CLI and checking whether the configuration has actually been gone
ConfigPublisher.main(new String[]{
"-connectString", zookeeper.getConnectString(),
+ "-config", CONFIG_PUBLISHER_XML,
"-a", "clear"
});
http://git-wip-us.apache.org/repos/asf/oodt/blob/d2f2d49d/config/src/test/resources/config-publisher.xml
----------------------------------------------------------------------
diff --git a/config/src/test/resources/config-publisher.xml b/config/src/test/resources/config-publisher.xml
new file mode 100644
index 0000000..5720dab
--- /dev/null
+++ b/config/src/test/resources/config-publisher.xml
@@ -0,0 +1,74 @@
+<!--
+ ~ 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="FILE_MANAGER"/>
+ <property name="propertiesFiles">
+ <map key-type="java.lang.String" value-type="java.lang.String">
+ <entry key="target/resources/examples/filemgr/filemgr.properties" value="/etc/filemgr.properties"/>
+ <entry key="target/resources/examples/filemgr/logging.properties" value="/etc/logging.properties"/>
+ </map>
+ </property>
+ <property name="configFiles">
+ <map key-type="java.lang.String" value-type="java.lang.String">
+ <!-- Examples - Core-->
+ <entry key="target/resources/examples/filemgr/core/elements.xml" value="/policy/core/elements.xml"/>
+ <entry key="target/resources/examples/filemgr/core/product-types.xml" value="/policy/core/product-types.xml"/>
+ <entry key="target/resources/examples/filemgr/core/product-type-element-map.xml" value="/policy/core/product-type-element-map.xml"/>
+
+ <!-- Examples - Geo-->
+ <entry key="target/resources/examples/filemgr/geo/elements.xml" value="/policy/geo/elements.xml"/>
+ <entry key="target/resources/examples/filemgr/geo/product-types.xml" value="/policy/geo/product-types.xml"/>
+ <entry key="target/resources/examples/filemgr/geo/product-type-element-map.xml" value="/policy/geo/product-type-element-map.xml"/>
+
+ <!-- Examples - Trace-->
+ <entry key="target/resources/examples/filemgr/trace/elements.xml" value="/policy/trace/elements.xml"/>
+ <entry key="target/resources/examples/filemgr/trace/product-types.xml" value="/policy/trace/product-types.xml"/>
+ <entry key="target/resources/examples/filemgr/trace/product-type-element-map.xml" value="/policy/trace/product-type-element-map.xml"/>
+ </map>
+ </property>
+ </bean>
+
+ <bean id="resmgr-config-publisher" class="org.apache.oodt.config.distributed.DistributedConfigurationPublisher">
+ <constructor-arg value="RESOURCE_MANAGER"/>
+ <property name="propertiesFiles">
+ <map key-type="java.lang.String" value-type="java.lang.String">
+ <entry key="target/resources/examples/resmgr/resource.properties" value="/etc/resource.properties"/>
+ <entry key="target/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="target/resources/examples/resmgr/node-to-queue-mapping.xml" value="/policy/node-to-queue-mapping.xml"/>
+ <entry key="target/resources/examples/resmgr/nodes.xml" value="/policy/nodes.xml"/>
+ <entry key="target/resources/examples/resmgr/queue-to-backend-mapping.xml" value="/policy/queue-to-backend-mapping.xml"/>
+
+ <entry key="target/resources/examples/resmgr/jobs/exJob.xml" value="/policy/jobs/exJob.xml"/>
+ <entry key="target/resources/examples/resmgr/jobs/exLongJob.xml" value="/policy/jobs/exLongJob.xml"/>
+ <entry key="target/resources/examples/resmgr/jobs/exPalindrome.xml" value="/policy/jobs/exPalindrome.xml"/>
+ <entry key="target/resources/examples/resmgr/jobs/exSparkJob.xml" value="/policy/jobs/exSparkJob.xml"/>
+ <entry key="target/resources/examples/resmgr/jobs/exSparkPalindrome.xml" value="/policy/jobs/exSparkPalindrome.xml"/>
+ <entry key="target/resources/examples/resmgr/jobs/exStreamingPalindrome.xml" value="/policy/jobs/exStreamingPalindrome.xml"/>
+ </map>
+ </property>
+ </bean>
+
+</beans>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/oodt/blob/d2f2d49d/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
deleted file mode 100644
index ecae033..0000000
--- a/config/src/test/resources/etc/config-publisher.xml
+++ /dev/null
@@ -1,61 +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="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"/>
- </map>
- </property>
- <property name="configFiles">
- <map key-type="java.lang.String" value-type="java.lang.String">
- <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>
-
- <bean id="resmgr-config-publisher" class="org.apache.oodt.config.distributed.DistributedConfigurationPublisher">
- <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"/>
- <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/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>
-
-</beans>
\ No newline at end of file
[45/52] [abbrv] oodt git commit: Introducing the concept of 'project'
to distributed configuration management
Posted by ma...@apache.org.
Introducing the concept of 'project' to distributed configuration management
Project: http://git-wip-us.apache.org/repos/asf/oodt/repo
Commit: http://git-wip-us.apache.org/repos/asf/oodt/commit/1d70bd55
Tree: http://git-wip-us.apache.org/repos/asf/oodt/tree/1d70bd55
Diff: http://git-wip-us.apache.org/repos/asf/oodt/diff/1d70bd55
Branch: refs/heads/master
Commit: 1d70bd559467a6acde75056b8d76084cb21c22ce
Parents: 72722e0
Author: Imesha Sudasingha <im...@gmail.com>
Authored: Sun Aug 6 14:52:32 2017 +0530
Committer: Imesha Sudasingha <im...@gmail.com>
Committed: Sun Aug 6 14:52:32 2017 +0530
----------------------------------------------------------------------
.../oodt/config/ConfigurationManager.java | 10 +++
.../java/org/apache/oodt/config/Constants.java | 16 ++++-
.../DistributedConfigurationManager.java | 14 ++--
.../DistributedConfigurationPublisher.java | 28 ++++++--
.../oodt/config/distributed/ZNodePaths.java | 20 ++++--
.../config/distributed/utils/ConfigUtils.java | 75 ++++++++++++++++++++
.../config/distributed/utils/FilePathUtils.java | 59 ---------------
config/src/main/resources/config-publisher.xml | 4 ++
.../DistributedConfigurationManagerTest.java | 15 ++--
config/src/test/resources/config-publisher.xml | 2 +
filemgr/pom.xml | 1 +
.../cas/filemgr/system/XmlRpcFileManager.java | 1 +
.../distributed/config/config-publisher.xml | 3 +
13 files changed, 162 insertions(+), 86 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/oodt/blob/1d70bd55/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 2554604..53aacef 100644
--- a/config/src/main/java/org/apache/oodt/config/ConfigurationManager.java
+++ b/config/src/main/java/org/apache/oodt/config/ConfigurationManager.java
@@ -27,9 +27,15 @@ import java.util.List;
public abstract class ConfigurationManager {
protected Component component;
+ protected String project;
public ConfigurationManager(Component component) {
+ this(component, Constants.DEFAULT_PROJECT);
+ }
+
+ public ConfigurationManager(Component component, String project) {
this.component = component;
+ this.project = project;
}
public abstract void loadConfiguration() throws Exception;
@@ -53,4 +59,8 @@ public abstract class ConfigurationManager {
* @return list of locally stored files
*/
public abstract List<String> getSavedFiles();
+
+ public String getProject() {
+ return project;
+ }
}
http://git-wip-us.apache.org/repos/asf/oodt/blob/1d70bd55/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 53a1116..611f81e 100644
--- a/config/src/main/java/org/apache/oodt/config/Constants.java
+++ b/config/src/main/java/org/apache/oodt/config/Constants.java
@@ -35,12 +35,23 @@ public class Constants {
public static final String STANDALONE_NODE_NAME = "local";
/** Default environment name to be used */
- public static final String DEFAULT_ENVIRONMENT = "default";
+ public static final String DEFAULT_PROJECT = "default";
/** The XML file name in which the configuration to be published to zookeeper is defined */
public static final String DEFAULT_CONFIG_PUBLISHER_XML = "etc" + SEPARATOR + "config-publisher.xml";
+ public static class Env {
+ /** Environment variable name to specify OODT project name */
+ public static final String OODT_PROJECT = "OODT_PROJECT";
+ }
+
public static class Properties {
+ /**
+ * Name of the OODT project. This property allows us to run same type OODT components to be run with different
+ * configuration using the same zookeeper ensemble.
+ */
+ public static final String OODT_PROJECT = "org.apache.oodt.config.project";
+
/** 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";
@@ -68,6 +79,9 @@ public class Constants {
/** Namespace to be used when creating ZNodes in Zookeeper */
public static final String NAMESPACE = "oodt";
+ /** Where configuration for separate projects are stored */
+ public static final String PROJECTS_PATH_NAME = "projects";
+
/** Where OODT components related configuration are stored */
public static final String COMPONENTS_PATH_NAME = "components";
http://git-wip-us.apache.org/repos/asf/oodt/blob/1d70bd55/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 6b6ef21..ae8912a 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
@@ -23,8 +23,8 @@ 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;
+import org.apache.oodt.config.distributed.utils.ConfigUtils;
import org.apache.oodt.config.distributed.utils.CuratorUtils;
-import org.apache.oodt.config.distributed.utils.FilePathUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -38,10 +38,11 @@ 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.distributed.utils.ConfigUtils.getOODTProjectName;
/**
* Distributed configuration manager implementation. This class make use of a {@link CuratorFramework} instance to
- * connect to zookeeper
+ * connect to zookeeper.
*
* @author Imesha Sudasingha.
*/
@@ -52,16 +53,13 @@ public class DistributedConfigurationManager extends ConfigurationManager {
/** 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 Component component;
private ZNodePaths zNodePaths;
private List<String> savedFiles = new ArrayList<>();
public DistributedConfigurationManager(Component component) {
- super(component);
- this.component = component;
- this.zNodePaths = new ZNodePaths(this.component.getName());
+ super(component, getOODTProjectName());
+ this.zNodePaths = new ZNodePaths(this.project, 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");
@@ -170,7 +168,7 @@ public class DistributedConfigurationManager extends ConfigurationManager {
}
private void saveFile(String path, byte[] data) throws IOException {
- String localFilePath = FilePathUtils.fixForComponentHome(component, path);
+ String localFilePath = ConfigUtils.fixForComponentHome(component, path);
File localFile = new File(localFilePath);
if (localFile.exists()) {
logger.warn("Deleting already existing file at {} before writing new content", localFilePath);
http://git-wip-us.apache.org/repos/asf/oodt/blob/1d70bd55/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 a36aee2..6229e96 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
@@ -31,6 +31,7 @@ import java.io.IOException;
import java.util.Map;
import java.util.concurrent.TimeUnit;
+import static org.apache.oodt.config.Constants.DEFAULT_PROJECT;
import static org.apache.oodt.config.Constants.Properties.ZK_CONNECT_STRING;
import static org.apache.oodt.config.Constants.Properties.ZK_PROPERTIES_FILE;
@@ -49,11 +50,18 @@ public class DistributedConfigurationPublisher {
private String connectString;
private CuratorFramework client;
private ZNodePaths zNodePaths;
+
private Component component;
+ private String project;
public DistributedConfigurationPublisher(Component component) {
+ this(component, DEFAULT_PROJECT);
+ }
+
+ public DistributedConfigurationPublisher(Component component, String project) {
this.component = component;
- this.zNodePaths = new ZNodePaths(this.component.getName());
+ this.project = project;
+ this.zNodePaths = new ZNodePaths(this.project, 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");
@@ -161,7 +169,7 @@ public class DistributedConfigurationPublisher {
for (Map.Entry<String, String> entry : fileMapping.entrySet()) {
String filePath = entry.getKey();
String relativeZNodePath = entry.getValue();
- logger.info("Publishing configuration {} to {}", filePath, relativeZNodePath);
+ logger.debug("Publishing configuration {} to {}", filePath, relativeZNodePath);
String content = getFileContent(filePath);
@@ -174,9 +182,9 @@ public class DistributedConfigurationPublisher {
} else {
Stat stat = client.setData().forPath(zNodePath, content.getBytes());
if (stat != null) {
- logger.info("Replaced old published configuration at {} with content of file : {}", relativeZNodePath, filePath);
+ logger.info("Replaced old published configuration at {} with content of file : {}", zNodePath, filePath);
} else {
- logger.warn("Unable to replace published configuration at {} with file: {}", relativeZNodePath, filePath);
+ logger.warn("Unable to replace published configuration at {} with file: {}", zNodePath, filePath);
}
}
} else {
@@ -185,7 +193,7 @@ public class DistributedConfigurationPublisher {
* when no child node is present under them.
*/
client.create().creatingParentContainersIfNeeded().forPath(zNodePath, content.getBytes());
- logger.info("Published configuration file {} to {}", filePath, relativeZNodePath);
+ logger.info("Published configuration file {} to {}", filePath, zNodePath);
}
}
}
@@ -195,7 +203,7 @@ public class DistributedConfigurationPublisher {
for (Map.Entry<String, String> entry : fileMapping.entrySet()) {
String filePath = entry.getKey();
String relativeZNodePath = entry.getValue();
- logger.info("Checking published configuration for {} - {}", filePath, relativeZNodePath);
+ logger.debug("Checking published configuration for {} - {}", filePath, relativeZNodePath);
String originalContent = getFileContent(filePath);
@@ -216,6 +224,10 @@ public class DistributedConfigurationPublisher {
logger.info("{} - {} configuration checked and OK", filePath, relativeZNodePath);
}
+ if (!noError) {
+ logger.warn("There are errors in configuration publishing");
+ }
+
return noError;
}
@@ -254,4 +266,8 @@ public class DistributedConfigurationPublisher {
public Component getComponent() {
return component;
}
+
+ public String getProject() {
+ return project;
+ }
}
http://git-wip-us.apache.org/repos/asf/oodt/blob/1d70bd55/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 01792ba..cf3ca00 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,8 +17,10 @@
package org.apache.oodt.config.distributed;
+import static org.apache.oodt.config.Constants.DEFAULT_PROJECT;
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.PROJECTS_PATH_NAME;
import static org.apache.oodt.config.Constants.ZPaths.PROPERTIES_PATH_NAME;
import static org.apache.oodt.config.Constants.ZPaths.SEPARATOR;
@@ -29,15 +31,15 @@ import static org.apache.oodt.config.Constants.ZPaths.SEPARATOR;
*/
public class ZNodePaths {
- /** ZNode for distinct components. /components/${component} */
+ /** ZNode for distinct components. /projects/${project}/components/${component} */
private String componentZNodePath;
private String componentZNodeRoot;
- /** ZNode path for properties files. /components/${component}/properties */
+ /** ZNode path for properties files. /projects/${project}/components/${component}/properties */
private String propertiesZNodePath;
private String propertiesZNodeRoot;
- /** ZNode path for other configuration files. /components/${component}/configuration */
+ /** ZNode path for other configuration files. /projects/${project}/components/${component}/configuration */
private String configurationZNodePath;
private String configurationZNodeRoot;
@@ -47,12 +49,20 @@ public class ZNodePaths {
*
* @param componentName Name of the OODT component
*/
- public ZNodePaths(String componentName) {
+ public ZNodePaths(String project, String componentName) {
+ if (project == null) {
+ project = DEFAULT_PROJECT;
+ }
+
if (componentName == null) {
throw new IllegalArgumentException("Component name cannot be null");
}
- componentZNodePath = SEPARATOR + COMPONENTS_PATH_NAME + SEPARATOR + componentName;
+ /* ZNode for distinct projects. /projects/${project} */
+ String projectZNodePath = SEPARATOR + PROJECTS_PATH_NAME + SEPARATOR + project;
+ String projectZNodeRoot = projectZNodePath + SEPARATOR;
+
+ componentZNodePath = projectZNodeRoot + COMPONENTS_PATH_NAME + SEPARATOR + componentName;
componentZNodeRoot = componentZNodePath + SEPARATOR;
propertiesZNodePath = componentZNodeRoot + PROPERTIES_PATH_NAME;
http://git-wip-us.apache.org/repos/asf/oodt/blob/1d70bd55/config/src/main/java/org/apache/oodt/config/distributed/utils/ConfigUtils.java
----------------------------------------------------------------------
diff --git a/config/src/main/java/org/apache/oodt/config/distributed/utils/ConfigUtils.java b/config/src/main/java/org/apache/oodt/config/distributed/utils/ConfigUtils.java
new file mode 100644
index 0000000..6e4d677
--- /dev/null
+++ b/config/src/main/java/org/apache/oodt/config/distributed/utils/ConfigUtils.java
@@ -0,0 +1,75 @@
+/*
+ * 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.apache.oodt.config.Constants;
+import org.apache.oodt.config.Constants.Env;
+import org.apache.oodt.config.Constants.ZPaths;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import static org.apache.oodt.config.Constants.Properties.OODT_PROJECT;
+import static org.apache.oodt.config.Constants.SEPARATOR;
+
+public class ConfigUtils {
+
+ private static final Logger logger = LoggerFactory.getLogger(ConfigUtils.class);
+
+ private ConfigUtils() {
+ }
+
+ /**
+ * Fix a given path to start from given {@link Component}'s home directory. Home directory will be fetched either
+ * through a system property or through an environment variable.
+ *
+ * @param component OODT {@link Component}
+ * @param suffixPath path to be fixed
+ * @return fixed path
+ */
+ public static String fixForComponentHome(Component component, String suffixPath) {
+ String prefix = System.getProperty(component.getHome());
+ if (prefix == null) {
+ prefix = System.getenv().get(component.getHome());
+ }
+
+ StringBuilder path = new StringBuilder();
+ 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(ZPaths.SEPARATOR) ? suffixPath.substring(ZPaths.SEPARATOR.length()) : suffixPath);
+ logger.debug("Fixed path for {} is {}", suffixPath, path.toString());
+ return path.toString();
+ }
+
+ /**
+ * Get the name of the project name (optional) if specified. Else return a default value
+ *
+ * @return OODT project name
+ */
+ public static String getOODTProjectName() {
+ String project = System.getProperty(OODT_PROJECT);
+ if (project == null) {
+ project = System.getenv(Env.OODT_PROJECT);
+ }
+
+ return project == null ? Constants.DEFAULT_PROJECT : project;
+ }
+}
http://git-wip-us.apache.org/repos/asf/oodt/blob/1d70bd55/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
deleted file mode 100644
index cfb5ff9..0000000
--- a/config/src/main/java/org/apache/oodt/config/distributed/utils/FilePathUtils.java
+++ /dev/null
@@ -1,59 +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.utils;
-
-import org.apache.oodt.config.Component;
-import org.apache.oodt.config.Constants.ZPaths;
-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.getProperty(component.getHome());
- if (prefix == null) {
- prefix = System.getenv().get(component.getHome());
- }
-
- StringBuilder path = new StringBuilder();
- 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(ZPaths.SEPARATOR) ? suffixPath.substring(ZPaths.SEPARATOR.length()) : 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/1d70bd55/config/src/main/resources/config-publisher.xml
----------------------------------------------------------------------
diff --git a/config/src/main/resources/config-publisher.xml b/config/src/main/resources/config-publisher.xml
index d5b387a..ab6ee12 100644
--- a/config/src/main/resources/config-publisher.xml
+++ b/config/src/main/resources/config-publisher.xml
@@ -22,6 +22,10 @@
<!-- File Manager example configuration publisher -->
<bean id="filemgr-config-publisher" class="org.apache.oodt.config.distributed.DistributedConfigurationPublisher">
<constructor-arg value="FILE_MANAGER"/>
+
+ <!-- An optional project name, if you want to run several instances of the same component with different configuration -->
+ <!--<constructor-arg value="project-x"/>-->
+
<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/1d70bd55/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 a4315a5..0bf2dde 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
@@ -19,7 +19,7 @@ package org.apache.oodt.config.distributed;
import org.apache.oodt.config.ConfigurationManager;
import org.apache.oodt.config.distributed.cli.ConfigPublisher;
-import org.apache.oodt.config.distributed.utils.FilePathUtils;
+import org.apache.oodt.config.distributed.utils.ConfigUtils;
import org.apache.oodt.config.test.AbstractDistributedConfigurationTest;
import org.junit.After;
import org.junit.Assert;
@@ -36,7 +36,7 @@ import java.util.List;
import java.util.Map;
import java.util.Properties;
-import static org.apache.oodt.config.Constants.SEPARATOR;
+import static org.apache.oodt.config.Constants.Properties.OODT_PROJECT;
import static org.junit.Assert.fail;
/**
@@ -77,6 +77,8 @@ public class DistributedConfigurationManagerTest extends AbstractDistributedConf
@Test
public void loadConfigurationTest() throws Exception {
for (DistributedConfigurationPublisher publisher : publishers) {
+ System.setProperty(OODT_PROJECT, publisher.getProject());
+
ConfigurationManager configurationManager = new DistributedConfigurationManager(publisher.getComponent());
configurationManager.loadConfiguration();
@@ -87,7 +89,6 @@ public class DistributedConfigurationManagerTest extends AbstractDistributedConf
try (InputStream in = new FileInputStream(originalFile)) {
properties.load(in);
} catch (Exception e) {
- e.printStackTrace();
fail(e.getMessage());
}
@@ -96,8 +97,7 @@ public class DistributedConfigurationManagerTest extends AbstractDistributedConf
}
String fileName = entry.getValue();
- fileName = fileName.startsWith(SEPARATOR) ? fileName.substring(SEPARATOR.length()) : fileName;
- fileName = FilePathUtils.fixForComponentHome(publisher.getComponent(), fileName);
+ fileName = ConfigUtils.fixForComponentHome(publisher.getComponent(), fileName);
File downloadedFile = new File(fileName);
Assert.assertNotNull(downloadedFile);
Assert.assertTrue(downloadedFile.exists());
@@ -106,8 +106,7 @@ public class DistributedConfigurationManagerTest extends AbstractDistributedConf
// Checking for configuration files
for (Map.Entry<String, String> entry : publisher.getConfigFiles().entrySet()) {
String fileName = entry.getValue();
- fileName = fileName.startsWith(SEPARATOR) ? fileName.substring(SEPARATOR.length()) : fileName;
- fileName = FilePathUtils.fixForComponentHome(publisher.getComponent(), fileName);
+ fileName = ConfigUtils.fixForComponentHome(publisher.getComponent(), fileName);
File file = new File(fileName);
Assert.assertTrue(file.exists());
}
@@ -118,6 +117,8 @@ public class DistributedConfigurationManagerTest extends AbstractDistributedConf
File file = new File(localFile);
Assert.assertFalse(file.exists());
}
+
+ System.clearProperty(OODT_PROJECT);
}
}
http://git-wip-us.apache.org/repos/asf/oodt/blob/1d70bd55/config/src/test/resources/config-publisher.xml
----------------------------------------------------------------------
diff --git a/config/src/test/resources/config-publisher.xml b/config/src/test/resources/config-publisher.xml
index 5720dab..bff93c2 100644
--- a/config/src/test/resources/config-publisher.xml
+++ b/config/src/test/resources/config-publisher.xml
@@ -21,6 +21,7 @@
<bean id="filemgr-config-publisher" class="org.apache.oodt.config.distributed.DistributedConfigurationPublisher">
<constructor-arg value="FILE_MANAGER"/>
+ <constructor-arg value="project1"/>
<property name="propertiesFiles">
<map key-type="java.lang.String" value-type="java.lang.String">
<entry key="target/resources/examples/filemgr/filemgr.properties" value="/etc/filemgr.properties"/>
@@ -49,6 +50,7 @@
<bean id="resmgr-config-publisher" class="org.apache.oodt.config.distributed.DistributedConfigurationPublisher">
<constructor-arg value="RESOURCE_MANAGER"/>
+ <constructor-arg value="project2"/>
<property name="propertiesFiles">
<map key-type="java.lang.String" value-type="java.lang.String">
<entry key="target/resources/examples/resmgr/resource.properties" value="/etc/resource.properties"/>
http://git-wip-us.apache.org/repos/asf/oodt/blob/1d70bd55/filemgr/pom.xml
----------------------------------------------------------------------
diff --git a/filemgr/pom.xml b/filemgr/pom.xml
index 84d6198..4fadcb8 100644
--- a/filemgr/pom.xml
+++ b/filemgr/pom.xml
@@ -237,6 +237,7 @@
</systemProperties>
<environmentVariables>
<OODT_FILEMGR_HOME>${project.basedir}</OODT_FILEMGR_HOME>
+ <OODT_PROJECT>primary</OODT_PROJECT>
</environmentVariables>
<forkedProcessTimeoutInSeconds>0</forkedProcessTimeoutInSeconds>
<redirectTestOutputToFile>true</redirectTestOutputToFile>
http://git-wip-us.apache.org/repos/asf/oodt/blob/1d70bd55/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 aa7075c..8e70479 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
@@ -1224,6 +1224,7 @@ public class XmlRpcFileManager {
}
public boolean shutdown() {
+ configurationManager.clearConfiguration();
if (this.webServer != null) {
this.webServer.shutdown();
this.webServer = null;
http://git-wip-us.apache.org/repos/asf/oodt/blob/1d70bd55/filemgr/src/test/resources/distributed/config/config-publisher.xml
----------------------------------------------------------------------
diff --git a/filemgr/src/test/resources/distributed/config/config-publisher.xml b/filemgr/src/test/resources/distributed/config/config-publisher.xml
index 19e9f8c..f6a97c1 100644
--- a/filemgr/src/test/resources/distributed/config/config-publisher.xml
+++ b/filemgr/src/test/resources/distributed/config/config-publisher.xml
@@ -21,6 +21,9 @@
<bean id="filemgr-config-publisher" class="org.apache.oodt.config.distributed.DistributedConfigurationPublisher">
<constructor-arg value="FILE_MANAGER"/>
+
+ <constructor-arg value="primary"/>
+
<property name="propertiesFiles">
<map key-type="java.lang.String" value-type="java.lang.String">
<entry key="src/test/resources/distributed/config/filemgr.properties" value="target/filemgr/etc/filemgr.properties"/>
[34/52] [abbrv] 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/8315382a
Tree: http://git-wip-us.apache.org/repos/asf/oodt/tree/8315382a
Diff: http://git-wip-us.apache.org/repos/asf/oodt/diff/8315382a
Branch: refs/heads/master
Commit: 8315382a5c0508c1914ff501db1cb106d454e00c
Parents: dfa8588
Author: Chris Mattmann <ch...@gmail.com>
Authored: Mon Jul 10 14:24:55 2017 -0400
Committer: Chris Mattmann <ma...@apache.org>
Committed: Mon Jul 17 16:25:05 2017 -0700
----------------------------------------------------------------------
README.md | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/oodt/blob/8315382a/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index 46e7fd5..635bdff 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
[49/52] [abbrv] oodt git commit: Merge branch
'feature/zookeeper-config' of https://github.com/apache/oodt into
feature/zookeeper-config
Posted by ma...@apache.org.
Merge branch 'feature/zookeeper-config' 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/c437106f
Tree: http://git-wip-us.apache.org/repos/asf/oodt/tree/c437106f
Diff: http://git-wip-us.apache.org/repos/asf/oodt/diff/c437106f
Branch: refs/heads/master
Commit: c437106fb9292547f8d87ada4601aab6b9d97ee9
Parents: 9ee8af4 905bb87
Author: Imesha Sudasingha <im...@gmail.com>
Authored: Thu Aug 10 18:33:18 2017 +0530
Committer: Imesha Sudasingha <im...@gmail.com>
Committed: Thu Aug 10 18:33:18 2017 +0530
----------------------------------------------------------------------
----------------------------------------------------------------------
[19/52] [abbrv] 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/master
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.
[12/52] [abbrv] 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>
[02/52] [abbrv] 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>
[10/52] [abbrv] 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/master
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
[23/52] [abbrv] 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/master
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>
[14/52] [abbrv] 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>
[25/52] [abbrv] 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/master
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);
}
[28/52] [abbrv] 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/master
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);
[33/52] [abbrv] oodt git commit: Merge HEAD branch from OODT master;
keep config branch up to date.
Posted by ma...@apache.org.
Merge HEAD branch from OODT master; keep config branch up to date.
Project: http://git-wip-us.apache.org/repos/asf/oodt/repo
Commit: http://git-wip-us.apache.org/repos/asf/oodt/commit/dfa85888
Tree: http://git-wip-us.apache.org/repos/asf/oodt/tree/dfa85888
Diff: http://git-wip-us.apache.org/repos/asf/oodt/diff/dfa85888
Branch: refs/heads/master
Commit: dfa8588838730414ca436554539a52f467e428a4
Parents: 9543e34 208dde7
Author: Chris Mattmann <ma...@apache.org>
Authored: Mon Jul 17 16:04:48 2017 -0700
Committer: Chris Mattmann <ma...@apache.org>
Committed: Mon Jul 17 16:04:48 2017 -0700
----------------------------------------------------------------------
CHANGES.txt | 20 +
agility/oodt/conf/fm.conf | 43 +
agility/oodt/conf/setclasspath.sh | 17 +
agility/oodt/filemgr.py | 554 ++++
agility/oodt/metadata.py | 29 +
agility/oodt/workflow.py | 134 +
app/fmbrowser/pom.xml | 81 -
app/fmbrowser/src/main/bin/filemgr-browser | 37 -
.../browser/controller/TableListener.java | 172 -
.../browser/controller/WindowListener.java | 166 -
.../oodt/cas/filemgr/browser/model/CasDB.java | 187 --
.../cas/filemgr/browser/model/QueryBuilder.java | 102 -
.../oodt/cas/filemgr/browser/model/Results.java | 68 -
.../browser/system/XmlRpcFilemgrBrowser.java | 35 -
.../cas/filemgr/browser/view/GuiParams.java | 28 -
.../cas/filemgr/browser/view/MainWindow.java | 70 -
.../cas/filemgr/browser/view/menus/MenuBar.java | 98 -
.../browser/view/menus/RightClickMenu.java | 51 -
.../filemgr/browser/view/panels/BottomPane.java | 64 -
.../cas/filemgr/browser/view/panels/Cell.java | 73 -
.../filemgr/browser/view/panels/HeaderCell.java | 49 -
.../filemgr/browser/view/panels/HeaderRow.java | 99 -
.../browser/view/panels/HeaderSpacer.java | 48 -
.../filemgr/browser/view/panels/MiddlePane.java | 52 -
.../filemgr/browser/view/panels/QueryField.java | 97 -
.../filemgr/browser/view/panels/QueryPane.java | 69 -
.../cas/filemgr/browser/view/panels/Row.java | 83 -
.../filemgr/browser/view/panels/TablePane.java | 150 -
.../browser/view/prompts/ConnectPrompt.java | 105 -
.../view/prompts/QueryBuilderPrompt.java | 444 ---
.../browser/view/prompts/SortPrompt.java | 153 -
app/weditor/.gitignore | 1 -
app/weditor/pom.xml | 110 -
app/weditor/src/main/assembly/assembly.xml | 72 -
app/weditor/src/main/bin/weditor | 22 -
.../oodt/cas/workflow/gui/WorkflowGUI.java | 325 --
.../oodt/cas/workflow/gui/menu/EditMenu.java | 48 -
.../oodt/cas/workflow/gui/menu/FileMenu.java | 82 -
.../oodt/cas/workflow/gui/model/ModelGraph.java | 307 --
.../oodt/cas/workflow/gui/model/ModelNode.java | 375 ---
.../model/repo/XmlWorkflowModelRepository.java | 614 ----
.../repo/XmlWorkflowModelRepositoryFactory.java | 49 -
.../gui/perspective/MultiStatePerspective.java | 103 -
.../workflow/gui/perspective/Perspective.java | 87 -
.../gui/perspective/build/BuildPerspective.java | 436 ---
.../gui/perspective/view/MultiStateView.java | 46 -
.../cas/workflow/gui/perspective/view/View.java | 97 -
.../gui/perspective/view/ViewChange.java | 97 -
.../gui/perspective/view/ViewListener.java | 32 -
.../gui/perspective/view/ViewState.java | 271 --
.../perspective/view/impl/DefaultPropView.java | 862 -----
.../perspective/view/impl/DefaultTreeView.java | 496 ---
.../perspective/view/impl/GlobalConfigView.java | 270 --
.../gui/perspective/view/impl/GraphView.java | 1140 -------
.../perspective/view/impl/IdentifiableEdge.java | 92 -
.../view/impl/JungJGraphModelAdapter.java | 246 --
.../perspective/view/impl/TreeProjectView.java | 155 -
.../oodt/cas/workflow/gui/toolbox/Tool.java | 125 -
.../oodt/cas/workflow/gui/toolbox/ToolBox.java | 76 -
.../oodt/cas/workflow/gui/util/GuiUtils.java | 377 ---
.../oodt/cas/workflow/gui/util/IconLoader.java | 83 -
.../apache/oodt/cas/workflow/gui/util/Line.java | 79 -
.../gui/util/exceptions/WorkflowException.java | 27 -
app/weditor/src/main/resources/REMOVE.log | 18 -
.../src/main/resources/examples/GranuleMaps.xml | 238 --
.../main/resources/examples/mspi-workflow.xml | 124 -
.../resources/examples/shared-properties.xml | 85 -
.../src/main/resources/examples/test.xml | 78 -
.../src/main/resources/icons/cursor-zoom.png | Bin 2967 -> 0 bytes
.../src/main/resources/icons/delete-sel.jpg | Bin 2686 -> 0 bytes
app/weditor/src/main/resources/icons/delete.jpg | Bin 2219 -> 0 bytes
.../src/main/resources/icons/edit-sel.jpg | Bin 2276 -> 0 bytes
app/weditor/src/main/resources/icons/edit.jpg | Bin 2375 -> 0 bytes
.../src/main/resources/icons/move-sel.jpg | Bin 1924 -> 0 bytes
app/weditor/src/main/resources/icons/move.jpg | Bin 2021 -> 0 bytes
.../src/main/resources/icons/zoom-in-sel.jpg | Bin 2438 -> 0 bytes
.../src/main/resources/icons/zoom-in.jpg | Bin 2192 -> 0 bytes
.../src/main/resources/icons/zoom-out-sel.jpg | Bin 2356 -> 0 bytes
.../src/main/resources/icons/zoom-out.jpg | Bin 2137 -> 0 bytes
.../src/main/resources/logging.properties | 40 -
balance/etc/skel/.htaccess | 45 -
balance/etc/skel/README.txt | 90 -
balance/etc/skel/config.ini | 82 -
balance/etc/skel/hooks.php | 98 -
balance/etc/skel/index.php | 48 -
.../skel/scripts/widgets/BreadcrumbsWidget.php | 101 -
balance/etc/skel/static/css/balance/balance.css | 119 -
balance/etc/skel/static/css/site.css | 19 -
balance/etc/skel/views/common/footer.php | 38 -
balance/etc/skel/views/common/header.php | 56 -
balance/etc/skel/views/errors/403.php | 30 -
balance/etc/skel/views/errors/404.php | 29 -
balance/etc/skel/views/index.php | 35 -
balance/lib/pear/Boot/bootstrap.php | 59 -
balance/lib/pear/Core/Application.class.php | 427 ---
.../pear/Core/ApplicationDataResponse.class.php | 81 -
.../lib/pear/Core/ApplicationRequest.class.php | 171 -
.../lib/pear/Core/ApplicationResponse.class.php | 311 --
.../IApplicationAuthenticationProvider.php | 162 -
.../IApplicationAuthorizationProvider.php | 62 -
.../Interfaces/IApplicationDataProvider.php | 125 -
.../Interfaces/IApplicationErrorProvider.php | 39 -
.../lib/pear/Interfaces/IApplicationWidget.php | 67 -
.../LDAPAuthenticationProvider.class.php | 170 -
.../LDAPAuthorizationProvider.class.php | 109 -
.../Providers/Data/MDB2DataProvider.class.php | 137 -
.../Providers/Data/MySqlDataProvider.class.php | 128 -
.../Providers/Data/PDODataProvider.class.php | 142 -
.../Error/DefaultErrorProvider.class.php | 38 -
balance/lib/pear/README | 34 -
balance/lib/pear/package.xml | 136 -
.../cas-browser/classes/CasBrowser.class.php | 455 ---
.../modules/cas-browser/classes/Utils.class.php | 388 ---
balance/modules/cas-browser/config.ini | 121 -
.../modules/cas-browser/element-ordering.ini | 64 -
.../modules/cas-browser/element-visibility.ini | 49 -
balance/modules/cas-browser/hooks.php | 74 -
.../cas-browser/scripts/allTypeScript.php | 64 -
.../scripts/crossTypeQueryScript.php | 246 --
.../modules/cas-browser/scripts/pageScript.php | 102 -
.../cas-browser/scripts/productTypeFilter.php | 70 -
.../modules/cas-browser/scripts/queryScript.php | 155 -
.../scripts/widgets/BasicSearchWidget.php | 42 -
.../scripts/widgets/CrossTypeSearchWidget.php | 125 -
.../scripts/widgets/CustomSearchWidget.php | 178 --
.../scripts/widgets/FilterWidget.php | 136 -
.../scripts/widgets/MetadataDisplayWidget.php | 90 -
.../scripts/widgets/ProductDownloadWidget.php | 96 -
.../scripts/widgets/ProductPageWidget.php | 133 -
.../scripts/widgets/ProductTypeListWidget.php | 92 -
.../cas-browser/static/css/cas-browser.css | 289 --
.../cas-browser/static/css/dataTables.css | 469 ---
.../static/img/dataTables/Sorting icons.psd | Bin 27490 -> 0 bytes
.../static/img/dataTables/back_disabled.png | Bin 1361 -> 0 bytes
.../static/img/dataTables/back_enabled.png | Bin 1379 -> 0 bytes
.../img/dataTables/back_enabled_hover.png | Bin 1375 -> 0 bytes
.../static/img/dataTables/favicon.ico | Bin 894 -> 0 bytes
.../static/img/dataTables/forward_disabled.png | Bin 1363 -> 0 bytes
.../static/img/dataTables/forward_enabled.png | Bin 1380 -> 0 bytes
.../img/dataTables/forward_enabled_hover.png | Bin 1379 -> 0 bytes
.../static/img/dataTables/sort_asc.png | Bin 1118 -> 0 bytes
.../static/img/dataTables/sort_asc_disabled.png | Bin 1050 -> 0 bytes
.../static/img/dataTables/sort_both.png | Bin 1136 -> 0 bytes
.../static/img/dataTables/sort_desc.png | Bin 1127 -> 0 bytes
.../img/dataTables/sort_desc_disabled.png | Bin 1045 -> 0 bytes
.../cas-browser/static/img/download-icon.gif | Bin 556 -> 0 bytes
.../modules/cas-browser/static/img/loading.gif | Bin 7247 -> 0 bytes
.../cas-browser/static/img/zip-icon-smaller.gif | Bin 1877 -> 0 bytes
.../modules/cas-browser/static/img/zip-icon.gif | Bin 3476 -> 0 bytes
.../static/js/crosstypesearchwidget.js | 106 -
.../cas-browser/static/js/customsearchwidget.js | 78 -
.../cas-browser/static/js/filterwidget.js | 98 -
.../cas-browser/static/js/jcorner.jquery.js | 247 --
.../cas-browser/static/js/jquery-1.4.2-min.js | 154 -
.../static/js/jquery.dataTables.min.js | 388 ---
.../cas-browser/static/js/querywidget.js | 314 --
balance/modules/cas-browser/views/dataset.php | 100 -
balance/modules/cas-browser/views/index.php | 87 -
balance/modules/cas-browser/views/product.php | 84 -
balance/modules/cas-browser/views/products.php | 156 -
balance/modules/cas-browser/views/search.php | 89 -
.../modules/cas-browser/views/typesearch.php | 121 -
balance/modules/profile/README.txt | 88 -
.../LDAPAuthenticationProvider.class.php | 263 --
.../classes/LDAPAuthorizationProvider.class.php | 113 -
.../NullAuthenticationProvider.class.php | 96 -
.../classes/NullAuthorizationProvider.class.php | 45 -
balance/modules/profile/config.ini | 180 --
balance/modules/profile/hooks.php | 91 -
balance/modules/profile/scripts/access.php | 107 -
balance/modules/profile/scripts/changePwd.php | 69 -
balance/modules/profile/scripts/login.php | 46 -
balance/modules/profile/scripts/logout.php | 36 -
balance/modules/profile/scripts/manage.php | 59 -
.../scripts/widgets/UserStatusWidget.php | 91 -
balance/modules/profile/static/css/profile.css | 150 -
.../profile/static/js/additional-methods.js | 259 --
.../profile/static/js/jquery.validate.min.js | 16 -
.../profile/static/js/jquery.validate.pack.js | 15 -
balance/modules/profile/views/changePwd.php | 76 -
balance/modules/profile/views/createUser.php | 184 --
balance/modules/profile/views/groups.php | 82 -
balance/modules/profile/views/index.php | 81 -
balance/modules/profile/views/login.php | 71 -
balance/modules/profile/views/manage.php | 87 -
.../profile/views/passwordChangeConfirmed.php | 44 -
balance/modules/puny/README.txt | 115 -
balance/modules/puny/classes/Puny.class.php | 166 -
.../puny/classes/Puny_Container.class.php | 85 -
.../puny/classes/Puny_Resource.class.php | 163 -
.../puny/classes/data/Puny_DataStore.class.php | 69 -
.../data/Puny_LocalFileDataStore.class.php | 79 -
.../classes/data/Puny_MongoDataStore.class.php | 75 -
.../classes/data/Puny_PdoDataStore.class.php | 111 -
.../parsers/Puny_MarkdownParser.class.php | 36 -
.../puny/classes/parsers/Puny_Parser.class.php | 40 -
balance/modules/puny/config.ini | 75 -
balance/modules/puny/hooks.php | 17 -
balance/modules/puny/libs/markdown.php | 2949 ------------------
balance/modules/puny/schemas/schema.pdo.mysql | 26 -
balance/modules/puny/scripts/login.php | 52 -
balance/modules/puny/scripts/logout.php | 32 -
balance/modules/puny/scripts/store.php | 40 -
balance/modules/puny/static/css/defaults.css | 39 -
balance/modules/puny/static/css/dialog.css | 157 -
balance/modules/puny/static/css/editor.css | 567 ----
balance/modules/puny/static/css/github.css | 677 ----
balance/modules/puny/static/css/puny.css | 32 -
balance/modules/puny/static/img/icon-sprite.png | Bin 9542 -> 0 bytes
balance/modules/puny/static/js/editable.js | 1090 -------
.../puny/static/js/editor/gollum.editor.js | 1090 -------
.../puny/static/js/editor/langs/markdown.js | 228 --
balance/modules/puny/static/js/gollum.dialog.js | 279 --
balance/modules/puny/static/js/gollum.js | 178 --
.../puny/static/js/gollum.placeholder.js | 71 -
.../modules/puny/static/js/jquery-1.7.2.min.js | 4 -
balance/modules/puny/static/js/puny.js | 56 -
balance/modules/puny/views/edit.php | 141 -
balance/modules/puny/views/error.php | 31 -
balance/modules/puny/views/login.php | 61 -
balance/modules/puny/views/logout.php | 32 -
balance/modules/puny/views/preview.php | 36 -
catalog/.gitignore | 1 -
catalog/pom.xml | 236 --
catalog/src/main/assembly/assembly.xml | 77 -
catalog/src/main/bin/catserv-client | 33 -
catalog/src/main/bin/catserv-server | 33 -
.../cli/action/CatalogServiceCliAction.java | 77 -
.../action/GetSupportedCatalogIdsCliAction.java | 40 -
.../action/LoadCatalogRepositoryCliAction.java | 80 -
.../cli/action/LoadCatalogsCliAction.java | 70 -
.../catalog/cli/action/PagedQueryCliAction.java | 116 -
.../cas/catalog/cli/action/QueryCliAction.java | 95 -
.../cli/action/ReducedPagedQueryCliAction.java | 134 -
.../cli/action/ReducedQueryCliAction.java | 110 -
.../catalog/cli/action/ShutdownCliAction.java | 38 -
.../exception/CatalogDictionaryException.java | 41 -
.../cas/catalog/exception/CatalogException.java | 40 -
.../exception/CatalogIndexException.java | 40 -
.../exception/CatalogRepositoryException.java | 40 -
.../exception/CatalogServiceException.java | 40 -
.../exception/IngestServiceException.java | 40 -
.../exception/QueryServiceException.java | 40 -
.../catalog/mapping/DataSourceIngestMapper.java | 259 --
.../mapping/DataSourceIngestMapperFactory.java | 91 -
.../catalog/mapping/InMemoryIngestMapper.java | 41 -
.../mapping/InMemoryIngestMapperFactory.java | 52 -
.../oodt/cas/catalog/mapping/IngestMapper.java | 157 -
.../catalog/mapping/IngestMapperFactory.java | 31 -
.../cas/catalog/mapping/LuceneIngestMapper.java | 114 -
.../mapping/LuceneIngestMapperFactory.java | 35 -
.../mapping/MemoryBasedIngestMapper.java | 281 --
.../mapping/MemoryBasedIngestMapperFactory.java | 34 -
.../catalog/metadata/TransactionalMetadata.java | 73 -
.../oodt/cas/catalog/page/CatalogReceipt.java | 83 -
.../oodt/cas/catalog/page/IndexPager.java | 77 -
.../oodt/cas/catalog/page/IngestReceipt.java | 56 -
.../org/apache/oodt/cas/catalog/page/Page.java | 77 -
.../apache/oodt/cas/catalog/page/PageInfo.java | 49 -
.../cas/catalog/page/ProcessedPageInfo.java | 47 -
.../oodt/cas/catalog/page/QueryPager.java | 73 -
.../cas/catalog/page/TransactionReceipt.java | 91 -
.../query/ComparisonQueryExpression.java | 84 -
.../catalog/query/CustomQueryExpression.java | 73 -
.../query/CustomWrapperQueryExpression.java | 58 -
.../catalog/query/FreeTextQueryExpression.java | 103 -
.../cas/catalog/query/NotQueryExpression.java | 54 -
.../oodt/cas/catalog/query/QueryExpression.java | 53 -
.../cas/catalog/query/QueryLogicalGroup.java | 117 -
.../cas/catalog/query/StdQueryExpression.java | 50 -
.../cas/catalog/query/TermQueryExpression.java | 44 -
.../catalog/query/WrapperQueryExpression.java | 57 -
.../catalog/query/filter/FilterAlgorithm.java | 35 -
.../cas/catalog/query/filter/QueryFilter.java | 60 -
.../query/filter/time/MetadataTimeEvent.java | 41 -
.../time/MetadataTimeEventFilterAlgorithm.java | 57 -
.../time/MetadataTimeEventQueryFilter.java | 112 -
.../conv/AsciiSortableVersionConverter.java | 39 -
.../filter/time/conv/VersionConverter.java | 32 -
.../query/parser/JJTQueryParserState.java | 123 -
.../oodt/cas/catalog/query/parser/Node.java | 36 -
.../catalog/query/parser/ParseException.java | 190 --
.../cas/catalog/query/parser/QueryParser.java | 1000 ------
.../cas/catalog/query/parser/QueryParser.jj | 497 ---
.../cas/catalog/query/parser/QueryParser.jjt | 214 --
.../query/parser/QueryParserConstants.java | 65 -
.../query/parser/QueryParserTokenManager.java | 806 -----
.../query/parser/QueryParserTreeConstants.java | 29 -
.../catalog/query/parser/SimpleCharStream.java | 480 ---
.../cas/catalog/query/parser/SimpleNode.java | 79 -
.../oodt/cas/catalog/query/parser/Token.java | 131 -
.../cas/catalog/query/parser/TokenMgrError.java | 146 -
.../catalog/repository/CatalogRepository.java | 77 -
.../repository/CatalogRepositoryFactory.java | 34 -
.../MemoryBasedCatalogRepository.java | 120 -
.../MemoryBasedCatalogRepositoryFactory.java | 38 -
.../repository/SerializedCatalogRepository.java | 212 --
.../SerializedCatalogRepositoryFactory.java | 54 -
.../repository/SpringCatalogRepository.java | 87 -
.../SpringCatalogRepositoryFactory.java | 43 -
.../server/CatalogServiceCommandLineClient.java | 46 -
.../server/CatalogServiceServerLauncher.java | 51 -
.../AbstractCommunicationChannelClient.java | 42 -
.../AbstractCommunicationChannelServer.java | 404 ---
.../channel/CommunicationChannelClient.java | 127 -
.../CommunicationChannelClientFactory.java | 35 -
.../channel/CommunicationChannelServer.java | 154 -
.../CommunicationChannelServerFactory.java | 40 -
.../rmi/RmiCommunicationChannelClient.java | 271 --
.../RmiCommunicationChannelClientInterface.java | 109 -
.../rmi/RmiCommunicationChannelClientMBean.java | 27 -
.../rmi/RmiCommunicationChannelServer.java | 275 --
.../XmlRpcCommunicationChannelClient.java | 639 ----
...XmlRpcCommunicationChannelClientFactory.java | 93 -
.../XmlRpcCommunicationChannelServer.java | 261 --
...XmlRpcCommunicationChannelServerFactory.java | 77 -
.../action/CatalogServiceServerCliAction.java | 82 -
.../cli/action/LaunchXmlRpcServerCliAction.java | 68 -
.../oodt/cas/catalog/struct/Dictionary.java | 65 -
.../cas/catalog/struct/DictionaryFactory.java | 29 -
.../apache/oodt/cas/catalog/struct/Index.java | 65 -
.../oodt/cas/catalog/struct/IndexFactory.java | 29 -
.../oodt/cas/catalog/struct/IngestService.java | 74 -
.../oodt/cas/catalog/struct/QueryService.java | 80 -
.../oodt/cas/catalog/struct/TransactionId.java | 72 -
.../catalog/struct/TransactionIdFactory.java | 31 -
.../dictionary/WorkflowManagerDictionary.java | 71 -
.../WorkflowManagerDictionaryFactory.java | 34 -
.../struct/impl/index/DataSourceIndex.java | 549 ----
.../impl/index/DataSourceIndexFactory.java | 67 -
.../struct/impl/index/InMemoryIndex.java | 45 -
.../struct/impl/index/InMemoryIndexFactory.java | 47 -
.../index/WorkflowManagerDataSourceIndex.java | 323 --
.../WorkflowManagerDataSourceIndexFactory.java | 59 -
.../transaction/LongTransactionIdFactory.java | 52 -
.../transaction/StringTransactionIdFactory.java | 51 -
.../transaction/UuidTransactionIdFactory.java | 55 -
.../apache/oodt/cas/catalog/system/Catalog.java | 399 ---
.../oodt/cas/catalog/system/CatalogFactory.java | 80 -
.../oodt/cas/catalog/system/CatalogService.java | 130 -
.../catalog/system/CatalogServiceFactory.java | 31 -
.../system/impl/CatalogServiceClient.java | 407 ---
.../impl/CatalogServiceClientFactory.java | 66 -
.../system/impl/CatalogServiceLocal.java | 1336 --------
.../system/impl/CatalogServiceLocalFactory.java | 122 -
.../apache/oodt/cas/catalog/term/Bucket.java | 47 -
.../org/apache/oodt/cas/catalog/term/Term.java | 163 -
.../oodt/cas/catalog/term/TermBucket.java | 103 -
.../util/CasPropertyPlaceholderConfigurer.java | 62 -
.../cas/catalog/util/PluginClassLoader.java | 100 -
.../apache/oodt/cas/catalog/util/PluginURL.java | 47 -
.../oodt/cas/catalog/util/QueryUtils.java | 91 -
.../oodt/cas/catalog/util/Serializer.java | 99 -
.../oodt/cas/catalog/util/SpringUtils.java | 54 -
catalog/src/main/resources/REMOVE.log | 19 -
catalog/src/main/resources/logging.properties | 56 -
.../oracle/create-transaction-id-map-table.sql | 29 -
.../oracle/create-transaction-index-table.sql | 31 -
.../src/main/resources/policy/catserv-beans.xml | 71 -
.../policy/catserv-client-action-beans.xml | 51 -
.../policy/catserv-client-cmd-line-beans.xml | 302 --
.../resources/policy/catserv-client-config.xml | 29 -
.../resources/policy/catserv-properties.xml | 43 -
.../policy/catserv-server-cmd-line-beans.xml | 51 -
.../resources/policy/catserv-server-config.xml | 28 -
.../main/resources/policy/cmd-line-actions.xml | 51 -
.../main/resources/policy/cmd-line-options.xml | 317 --
.../policy/cmd-line-server-actions.xml | 30 -
.../policy/cmd-line-server-options.xml | 207 --
.../resources/policy/in-memory-index-cat.sql | 32 -
.../policy/in-memory-ingest-mapper.sql | 26 -
.../resources/policy/workflow-catalog-beans.xml | 56 -
.../system/impl/TestCatalogServiceLocal.java | 204 --
catalog/src/test/resources/test-index-cat.sql | 32 -
catalog/src/test/resources/test-mapper-cat.sql | 26 -
.../org/apache/oodt/commons/util/XMLTest.java | 4 +-
core/pom.xml | 12 +-
curator/services/pom.xml | 2 +-
.../cas/curation/service/IngestionResource.java | 300 +-
curator/sso/pom.xml | 75 +
.../sso/AbstractWebBasedSingleSignOn.java | 90 +
.../org/apache/oodt/security/sso/DummyImpl.java | 102 +
.../apache/oodt/security/sso/OpenSSOImpl.java | 191 ++
.../apache/oodt/security/sso/SingleSignOn.java | 85 +
.../oodt/security/sso/SingleSignOnFactory.java | 68 +
.../security/sso/opensso/IdentityDetails.java | 136 +
.../oodt/security/sso/opensso/SSOMetKeys.java | 81 +
.../oodt/security/sso/opensso/SSOProxy.java | 308 ++
.../sso/opensso/SingleSignOnException.java | 11 +
.../oodt/security/sso/opensso/UserDetails.java | 97 +
curator/webapp/pom.xml | 2 +-
.../org/apache/oodt/cas/curation/HomePage.html | 2 +-
.../apache/oodt/cas/curation/HomePage_edrn.html | 2 +-
docker/Dockerfile | 22 -
filemgr/src/main/python/fm.conf | 43 -
filemgr/src/main/python/fm.py | 554 ----
filemgr/src/main/python/setclasspath.sh | 17 -
grid/pom.xml | 138 -
.../grid/AuthenticationRequiredException.java | 30 -
.../java/org/apache/oodt/grid/ConfigBean.java | 177 --
.../org/apache/oodt/grid/ConfigServlet.java | 309 --
.../org/apache/oodt/grid/Configuration.java | 463 ---
.../java/org/apache/oodt/grid/GridServlet.java | 126 -
.../java/org/apache/oodt/grid/LoginServlet.java | 65 -
.../apache/oodt/grid/ProductQueryServlet.java | 226 --
.../org/apache/oodt/grid/ProductServer.java | 65 -
.../apache/oodt/grid/ProfileQueryServlet.java | 141 -
.../org/apache/oodt/grid/ProfileServer.java | 71 -
.../java/org/apache/oodt/grid/QueryServlet.java | 274 --
.../oodt/grid/RestfulProductQueryServlet.java | 88 -
.../main/java/org/apache/oodt/grid/Server.java | 166 -
.../main/java/org/apache/oodt/grid/Utility.java | 82 -
grid/src/main/webapp/META-INF/context.xml | 23 -
grid/src/main/webapp/WEB-INF/jetty-web.xml | 21 -
grid/src/main/webapp/WEB-INF/web.xml | 86 -
grid/src/main/webapp/config.jsp | 205 --
grid/src/main/webapp/error.jsp | 60 -
grid/src/main/webapp/images/webapp-large.png | Bin 3529 -> 0 bytes
grid/src/main/webapp/images/webapp-small.png | Bin 1222 -> 0 bytes
grid/src/main/webapp/index.html | 32 -
grid/src/main/webapp/style.css | 161 -
grid/src/site/resources/images/web-grid.jpg | Bin 45879 -> 0 bytes
grid/src/site/resources/images/web-grid.psd | Bin 741413 -> 0 bytes
grid/src/site/resources/slides.pdf | Bin 631046 -> 0 bytes
grid/src/site/site.xml | 30 -
grid/src/site/xdoc/index.xml | 73 -
.../org/apache/oodt/grid/ConfigurationTest.java | 180 --
opendapps/pom.xml | 99 -
.../org/apache/oodt/opendapps/DapNames.java | 37 -
.../apache/oodt/opendapps/DatasetCrawler.java | 126 -
.../apache/oodt/opendapps/DatasetExtractor.java | 188 --
.../OpendapProfileElementExtractor.java | 174 --
.../oodt/opendapps/OpendapProfileHandler.java | 186 --
.../org/apache/oodt/opendapps/Profiler.java | 155 -
.../oodt/opendapps/config/ConstantSpec.java | 86 -
.../apache/oodt/opendapps/config/DapRoot.java | 88 -
.../oodt/opendapps/config/DatasetMetElem.java | 68 -
.../oodt/opendapps/config/OpendapConfig.java | 128 -
.../opendapps/config/OpendapConfigMetKeys.java | 87 -
.../opendapps/config/OpendapConfigReader.java | 133 -
.../opendapps/config/OpendapProfileMetKeys.java | 36 -
.../config/ProcessingInstructions.java | 102 -
.../oodt/opendapps/config/RewriteSpec.java | 86 -
.../extractors/DasMetadataExtractor.java | 186 --
.../opendapps/extractors/MetadataExtractor.java | 43 -
.../extractors/NcmlMetadataExtractor.java | 55 -
.../extractors/ThreddsMetadataExtractor.java | 315 --
.../opendapps/util/OpendapURLEvaluator.java | 48 -
.../oodt/opendapps/util/ProfileChecker.java | 186 --
.../oodt/opendapps/util/ProfileSerializer.java | 109 -
.../oodt/opendapps/util/ProfileUtils.java | 421 ---
opendapps/src/main/resources/logging.properties | 35 -
opendapps/src/main/resources/opendap.config.xml | 192 --
.../oodt/cas/pge/TestPGETaskInstance.java | 3 +-
pom.xml | 20 +-
product/.gitignore | 1 -
product/pom.xml | 138 -
product/src/main/conf/displayableTypes.xml | 50 -
product/src/main/conf/ofsn-ps.xml | 201 --
.../oodt/product/LargeProductQueryHandler.java | 57 -
.../org/apache/oodt/product/QueryHandler.java | 38 -
.../handlers/ofsn/AbstractCrawlLister.java | 116 -
.../ofsn/DirListNonRecursiveHandler.java | 60 -
.../handlers/ofsn/DirListRecursiveHandler.java | 63 -
.../ofsn/FileListNonRecursiveHandler.java | 56 -
.../handlers/ofsn/FileListRecursiveHandler.java | 55 -
.../product/handlers/ofsn/MD5GetHandler.java | 143 -
.../product/handlers/ofsn/OFSNFileHandler.java | 255 --
.../ofsn/OFSNFileHandlerConfiguration.java | 131 -
.../OFSNFileHandlerConfigurationReader.java | 93 -
.../product/handlers/ofsn/OFSNGetHandler.java | 73 -
.../handlers/ofsn/OFSNHandlerConfig.java | 121 -
.../product/handlers/ofsn/OFSNListHandler.java | 61 -
.../handlers/ofsn/RawSizeListHandler.java | 60 -
.../handlers/ofsn/SingleFileListHandler.java | 64 -
.../handlers/ofsn/SingleZipFileListHandler.java | 83 -
.../handlers/ofsn/StdOFSNGetHandler.java | 112 -
.../product/handlers/ofsn/URLGetHandler.java | 252 --
.../handlers/ofsn/metadata/OFSNMetKeys.java | 41 -
.../ofsn/metadata/OFSNXMLConfigMetKeys.java | 55 -
.../handlers/ofsn/metadata/OFSNXMLMetKeys.java | 43 -
.../handlers/ofsn/metadata/OODTMetKeys.java | 31 -
.../handlers/ofsn/metadata/XMLQueryMetKeys.java | 32 -
.../handlers/ofsn/util/OFSNObjectFactory.java | 112 -
.../product/handlers/ofsn/util/OFSNUtils.java | 197 --
.../xmlquery/ChunkedProductInputStream.java | 215 --
.../org/apache/oodt/xmlquery/LargeResult.java | 166 -
.../src/site/resources/images/delegation.png | Bin 59132 -> 0 bytes
.../src/site/resources/images/delegation.psd | Bin 277484 -> 0 bytes
.../src/site/resources/images/grid-product.jpg | Bin 55049 -> 0 bytes
product/src/site/site.xml | 32 -
product/src/site/xdoc/servlet/index.xml | 243 --
product/src/site/xdoc/tutorials/index.xml | 36 -
product/src/site/xdoc/tutorials/lh/index.xml | 718 -----
product/src/site/xdoc/tutorials/ps/index.xml | 481 ---
product/src/site/xdoc/tutorials/qh/index.xml | 704 -----
.../handlers/ofsn/util/OFSNUtilsTest.java | 59 -
.../xmlquery/ChunkedProductInputStreamTest.java | 170 -
.../apache/oodt/xmlquery/LargeResultTest.java | 54 -
profile/pom.xml | 156 -
profile/src/main/dtd/prof.dtd | 86 -
.../org/apache/oodt/profile/DefaultFactory.java | 56 -
.../oodt/profile/EnumeratedProfileElement.java | 106 -
.../org/apache/oodt/profile/ObjectFactory.java | 109 -
.../java/org/apache/oodt/profile/Profile.java | 401 ---
.../apache/oodt/profile/ProfileAttributes.java | 344 --
.../org/apache/oodt/profile/ProfileElement.java | 586 ----
.../apache/oodt/profile/ProfileException.java | 57 -
.../oodt/profile/ProfileSAXException.java | 37 -
.../oodt/profile/ProfileSQLException.java | 34 -
.../oodt/profile/RangedProfileElement.java | 115 -
.../apache/oodt/profile/ResourceAttributes.java | 602 ----
.../oodt/profile/UnspecifiedProfileElement.java | 89 -
.../java/org/apache/oodt/profile/Utility.java | 254 --
.../profile/activity/ConnectedToServer.java | 26 -
.../activity/ProfileClientConstructed.java | 26 -
.../oodt/profile/activity/QueriedHandlers.java | 26 -
.../oodt/profile/activity/ReceivedQuery.java | 26 -
.../apache/oodt/profile/gui/LeafListener.java | 288 --
.../oodt/profile/gui/ProfileBuilderGUI.form | 435 ---
.../oodt/profile/gui/ProfileBuilderGUI.java | 962 ------
.../apache/oodt/profile/gui/profileTree.java | 41 -
.../gui/pstructs/ProfileAttributesPrinter.java | 75 -
.../gui/pstructs/ProfileElementPrinter.java | 64 -
.../profile/gui/pstructs/ProfilePrinter.java | 77 -
.../gui/pstructs/ResourceAttributesPrinter.java | 118 -
.../handlers/DatabaseProfileManager.java | 277 --
.../oodt/profile/handlers/ProfileHandler.java | 64 -
.../oodt/profile/handlers/ProfileManager.java | 149 -
.../profile/handlers/cas/CASProfileHandler.java | 289 --
.../profile/handlers/cas/util/ProfileUtils.java | 107 -
.../handlers/lightweight/AndExpression.java | 67 -
.../lightweight/ConstantExpression.java | 65 -
.../handlers/lightweight/FalseResult.java | 50 -
.../handlers/lightweight/Intersection.java | 60 -
.../lightweight/LightweightProfileServer.java | 306 --
.../handlers/lightweight/MatchingResult.java | 61 -
.../handlers/lightweight/NotExpression.java | 59 -
.../lightweight/OperatorExpression.java | 140 -
.../handlers/lightweight/OrExpression.java | 67 -
.../profile/handlers/lightweight/Result.java | 35 -
.../SearchableEnumeratedProfileElement.java | 50 -
.../lightweight/SearchableObjectFactory.java | 62 -
.../handlers/lightweight/SearchableProfile.java | 44 -
.../lightweight/SearchableProfileElement.java | 36 -
.../SearchableRangedProfileElement.java | 66 -
.../SearchableResourceAttributes.java | 142 -
.../SearchableUnspecifiedProfileElement.java | 39 -
.../profile/handlers/lightweight/Union.java | 58 -
.../handlers/lightweight/WhereExpression.java | 55 -
.../profile/handlers/lightweight/package.html | 32 -
profile/src/site/resources/examples/src.jar | Bin 7973 -> 0 bytes
profile/src/site/resources/images/class.png | Bin 120990 -> 0 bytes
profile/src/site/resources/images/class.psd | Bin 499375 -> 0 bytes
.../src/site/resources/images/delegation.png | Bin 48258 -> 0 bytes
.../src/site/resources/images/delegation.psd | Bin 254613 -> 0 bytes
.../src/site/resources/images/grid-profile.jpg | Bin 54712 -> 0 bytes
profile/src/site/resources/images/stack.png | Bin 44350 -> 0 bytes
profile/src/site/resources/images/stack.psd | Bin 256409 -> 0 bytes
profile/src/site/resources/images/tree.png | Bin 27643 -> 0 bytes
profile/src/site/resources/images/tree.psd | Bin 129734 -> 0 bytes
profile/src/site/site.xml | 37 -
profile/src/site/xdoc/adv/index.xml | 1072 -------
profile/src/site/xdoc/handler/index.xml | 595 ----
profile/src/site/xdoc/info/index.xml | 848 -----
profile/src/site/xdoc/querying/index.xml | 203 --
profile/src/site/xdoc/rep/index.xml | 334 --
.../profile/EnumeratedProfileElementTest.java | 130 -
.../oodt/profile/ProfileAttributesTest.java | 167 -
.../oodt/profile/ProfileElementTestCase.java | 187 --
.../org/apache/oodt/profile/ProfileTest.java | 130 -
.../oodt/profile/RangedProfileElementTest.java | 82 -
.../oodt/profile/ResourceAttributesTest.java | 178 --
.../LightweightProfileServerTest.java | 158 -
.../handlers/lightweight/lightweightTest.xml | 119 -
.../resources/org/apache/oodt/profile/test.xml | 71 -
profile/src/test/resources/test.xml | 71 -
protocol/api/.gitignore | 1 -
protocol/api/pom.xml | 147 -
protocol/api/src/main/assembly/assembly.xml | 94 -
protocol/api/src/main/bin/protocol | 29 -
.../org/apache/oodt/cas/protocol/Protocol.java | 60 -
.../oodt/cas/protocol/ProtocolFactory.java | 31 -
.../apache/oodt/cas/protocol/ProtocolFile.java | 142 -
.../oodt/cas/protocol/auth/Authentication.java | 30 -
.../cas/protocol/auth/BasicAuthentication.java | 46 -
.../cas/protocol/auth/NoAuthentication.java | 34 -
.../cli/action/BasicVerifyCliAction.java | 83 -
.../action/CrossProtocolTransferCliAction.java | 123 -
.../action/DeleteEmptyDirectoriesCliAction.java | 70 -
.../protocol/cli/action/DownloadCliAction.java | 81 -
.../action/GetSupportedFactoriesCliAction.java | 43 -
.../protocol/cli/action/ProtocolCliAction.java | 84 -
.../cas/protocol/config/ProtocolConfig.java | 39 -
.../protocol/config/SpringProtocolConfig.java | 77 -
.../protocol/exceptions/ProtocolException.java | 34 -
.../protocol/system/ProtocolCommandLine.java | 31 -
.../cas/protocol/system/ProtocolManager.java | 116 -
.../cas/protocol/util/ProtocolFileFilter.java | 32 -
.../protocol/verify/BasicProtocolVerifier.java | 84 -
.../verify/BasicProtocolVerifierFactory.java | 47 -
.../cas/protocol/verify/ProtocolVerifier.java | 35 -
.../verify/ProtocolVerifierFactory.java | 28 -
.../main/resources/policy/cmd-line-actions.xml | 42 -
.../main/resources/policy/cmd-line-options.xml | 166 -
.../main/resources/policy/protocol-config.xml | 31 -
.../apache/oodt/cas/protocol/MockProtocol.java | 130 -
.../oodt/cas/protocol/MockProtocolFactory.java | 51 -
.../oodt/cas/protocol/TestProtocolFile.java | 53 -
.../protocol/auth/TestBasicAuthentication.java | 49 -
.../cas/protocol/auth/TestNoAuthentication.java | 35 -
.../cli/action/MockProtocolCliAction.java | 33 -
.../cli/action/TestBasicVerifyCliAction.java | 53 -
.../cli/action/TestDownloadCliAction.java | 76 -
.../cli/action/TestProtocolCliAction.java | 41 -
.../config/MockSpringProtocolConfig.java | 44 -
.../protocol/system/TestProtocolManager.java | 95 -
.../src/test/resources/test-protocol-config.xml | 53 -
protocol/ftp/.gitignore | 1 -
protocol/ftp/pom.xml | 122 -
.../cas/protocol/ftp/CogJGlobusFtpProtocol.java | 226 --
.../ftp/CogJGlobusFtpProtocolFactory.java | 39 -
.../cas/protocol/ftp/CommonsNetFtpProtocol.java | 246 --
.../ftp/CommonsNetFtpProtocolFactory.java | 38 -
.../resources/policy/ftp-protocol-config.xml | 32 -
.../protocol/ftp/TestCogJGlobusFtpProtocol.java | 137 -
.../ftp/src/test/resources/users.properties | 26 -
protocol/http/.gitignore | 1 -
protocol/http/pom.xml | 105 -
.../apache/oodt/cas/protocol/http/HttpFile.java | 51 -
.../oodt/cas/protocol/http/HttpProtocol.java | 242 --
.../cas/protocol/http/HttpProtocolFactory.java | 37 -
.../oodt/cas/protocol/http/util/HttpUtils.java | 130 -
.../resources/policy/http-protocol-config.xml | 31 -
.../oodt/cas/protocol/http/TestHttpFile.java | 53 -
.../cas/protocol/http/TestHttpProtocol.java | 103 -
.../cas/protocol/http/util/TestHttpUtils.java | 173 -
protocol/imaps/.gitignore | 1 -
protocol/imaps/pom.xml | 114 -
.../oodt/cas/protocol/imaps/ImapsProtocol.java | 385 ---
.../protocol/imaps/ImapsProtocolFactory.java | 43 -
.../resources/policy/imaps-protocol-config.xml | 31 -
.../cas/protocol/imaps/TestImapsProtocol.java | 112 -
protocol/sftp/.gitignore | 1 -
protocol/sftp/pom.xml | 140 -
.../cas/protocol/sftp/JschSftpProtocol.java | 211 --
.../protocol/sftp/JschSftpProtocolFactory.java | 48 -
.../sftp/auth/HostKeyAuthentication.java | 49 -
.../resources/policy/sftp-protocol-config.xml | 23 -
.../sftp/DummyAuthenticationProvider.java | 71 -
.../cas/protocol/sftp/TestJschSftpProtocol.java | 298 --
.../sftp/UnsupportedShellProcessProvider.java | 114 -
.../sftp/auth/TestHostKeyAuthentication.java | 36 -
.../sftp/src/test/resources/authorization.xml | 24 -
protocol/sftp/src/test/resources/platform.xml | 35 -
protocol/sftp/src/test/resources/sample-dsa.key | 12 -
protocol/sftp/src/test/resources/sample-dsa.pub | 1 -
protocol/sftp/src/test/resources/server.xml | 28 -
.../src/test/resources/sshTestDir/sshTestFile | 18 -
pushpull/pom.xml | 181 --
pushpull/src/main/assembly/assembly.xml | 85 -
pushpull/src/main/bin/pushpull | 32 -
pushpull/src/main/bin/url-downloader | 21 -
.../apache/oodt/cas/pushpull/config/Config.java | 405 ---
.../oodt/cas/pushpull/config/ConfigMetKeys.java | 71 -
.../pushpull/config/ConfigParserMetKeys.java | 113 -
.../oodt/cas/pushpull/config/DaemonInfo.java | 131 -
.../oodt/cas/pushpull/config/DataFilesInfo.java | 47 -
.../oodt/cas/pushpull/config/DownloadInfo.java | 86 -
.../oodt/cas/pushpull/config/ParserInfo.java | 104 -
.../oodt/cas/pushpull/config/PropFilesInfo.java | 164 -
.../oodt/cas/pushpull/config/ProtocolInfo.java | 168 -
.../oodt/cas/pushpull/config/RemoteSpecs.java | 364 ---
.../oodt/cas/pushpull/config/SiteInfo.java | 120 -
.../apache/oodt/cas/pushpull/daemon/Daemon.java | 576 ----
.../cas/pushpull/daemon/DaemonController.java | 208 --
.../cas/pushpull/daemon/DaemonLauncher.java | 194 --
.../pushpull/daemon/DaemonLauncherMBean.java | 38 -
.../cas/pushpull/daemon/DaemonListener.java | 40 -
.../oodt/cas/pushpull/daemon/DaemonMBean.java | 95 -
.../oodt/cas/pushpull/daemon/DaemonManager.java | 123 -
.../cas/pushpull/daemon/DaemonRmiInterface.java | 97 -
.../exceptions/AlreadyInDatabaseException.java | 41 -
.../pushpull/exceptions/ConfigException.java | 45 -
.../exceptions/CrawlDaemonException.java | 41 -
.../pushpull/exceptions/CrawlerException.java | 45 -
.../exceptions/FileRestrictionsException.java | 41 -
.../exceptions/MetExtractorException.java | 41 -
.../pushpull/exceptions/MethodException.java | 41 -
.../pushpull/exceptions/ParserException.java | 45 -
.../exceptions/ProtocolDeletionError.java | 41 -
.../pushpull/exceptions/ProtocolException.java | 42 -
.../exceptions/ProtocolFileException.java | 42 -
.../exceptions/PushPullFrameworkException.java | 57 -
.../exceptions/RemoteConnectionException.java | 45 -
.../exceptions/RetrievalMethodException.java | 45 -
.../exceptions/ThreadEvaluatorException.java | 41 -
.../ToManyFailedDownloadsException.java | 41 -
.../exceptions/UndefinedTypeException.java | 41 -
.../pushpull/expressions/GlobalVariables.java | 40 -
.../oodt/cas/pushpull/expressions/Method.java | 301 --
.../oodt/cas/pushpull/expressions/Operator.java | 45 -
.../cas/pushpull/expressions/Punctuation.java | 45 -
.../cas/pushpull/expressions/ValidInput.java | 36 -
.../oodt/cas/pushpull/expressions/Variable.java | 126 -
.../filerestrictions/FileRestrictions.java | 518 ---
.../cas/pushpull/filerestrictions/Parser.java | 43 -
.../pushpull/filerestrictions/VirtualFile.java | 315 --
.../filerestrictions/VirtualFileStructure.java | 66 -
.../parsers/ClassNoaaEmailParser.java | 123 -
.../parsers/DirStructXmlParser.java | 346 --
.../parsers/FileListParser.java | 59 -
.../parsers/GenericEmailParser.java | 168 -
.../renamingconventions/RenamingConvention.java | 168 -
.../objectfactory/PushPullObjectFactory.java | 76 -
.../cas/pushpull/protocol/ProtocolHandler.java | 603 ----
.../cas/pushpull/protocol/ProtocolPath.java | 142 -
.../oodt/cas/pushpull/protocol/RemoteSite.java | 133 -
.../cas/pushpull/protocol/RemoteSiteFile.java | 87 -
.../pushpull/retrievalmethod/ListRetriever.java | 111 -
.../pushpull/retrievalmethod/RemoteCrawler.java | 174 --
.../retrievalmethod/RetrievalMethod.java | 45 -
.../DataFileToPropFileLinker.java | 183 --
.../retrievalsystem/DownloadListener.java | 41 -
.../DownloadThreadEvaluator.java | 164 -
.../retrievalsystem/DownloadingFileInfo.java | 66 -
.../retrievalsystem/FileRetrievalSystem.java | 966 ------
.../pushpull/retrievalsystem/RemoteFile.java | 97 -
.../retrievalsystem/RemoteFileMetKeys.java | 57 -
.../retrievalsystem/RetrievalSetup.java | 267 --
.../retrievalsystem/TimeAndThreadCount.java | 48 -
.../pushpull/url/handlers/imaps/Handler.java | 41 -
.../url/handlers/imaps/ImapsURLConnection.java | 46 -
.../cas/pushpull/url/handlers/sftp/Handler.java | 41 -
.../url/handlers/sftp/SftpURLConnection.java | 44 -
.../cas/pushpull/util/ExpressionValidator.java | 131 -
pushpull/src/main/resources/REMOVE.log | 18 -
pushpull/src/main/resources/default.properties | 21 -
.../Push-Pull-User-Manual_2008-02-12.doc | Bin 431616 -> 0 bytes
.../ClassNoaaEmailParserFiles/IasiEmail | 129 -
.../DirStructXmlParserFiles/AIRABRAD.xml | 26 -
.../DirStructXmlParserFiles/AIRS3ST8.xml | 23 -
.../DirStructXmlParserFiles/AIRS3STD.xml | 23 -
.../DirStructXmlParserFiles/CLASS_Email.xml | 22 -
.../CLASS_Text_Email.xml | 26 -
.../DirStructXmlParserFiles/CloudSAT.xml | 20 -
.../examples/DirStructXmlParserFiles/GFS.xml | 30 -
.../examples/DirStructXmlParserFiles/IASI.xml | 22 -
.../examples/DirStructXmlParserFiles/IASI_2.xml | 22 -
.../DirStructXmlParserFiles/IBIBLIO.xml | 25 -
.../examples/DirStructXmlParserFiles/MODIS.xml | 23 -
.../DirStructXmlParserFiles/RTG_SST.xml | 24 -
.../ExternalSourcesFiles/ExternalSources.xml | 75 -
.../FileListParserFiles/DownloadList.txt | 7 -
.../examples/ProcmailForwarding/[dot]forward | 1 -
.../ProcmailForwarding/[dot]procmail/general.rc | 25 -
.../examples/ProcmailForwarding/[dot]procmailrc | 7 -
.../examples/RemoteSpecsFiles/RemoteSpecs.xml | 181 --
pushpull/src/main/resources/jssecacerts | Bin 113900 -> 0 bytes
pushpull/src/main/resources/logging.properties | 43 -
.../policy/ParserToRetrievalMethodMap.xml | 30 -
.../resources/policy/ProtocolFactoryInfo.xml | 45 -
.../src/main/resources/policy/mimetypes.xml | 60 -
.../src/main/resources/policy/mimetypes.xsd | 71 -
.../resources/push_pull_framework.properties | 106 -
.../src/site/resources/images/cas-pushpull.jpg | Bin 72076 -> 0 bytes
.../src/site/resources/images/cas-pushpull.psd | Bin 1013848 -> 0 bytes
.../resources/images/pp_extension_points.png | Bin 50656 -> 0 bytes
.../site/resources/images/pp_object_model.png | Bin 15808 -> 0 bytes
pushpull/src/site/site.xml | 32 -
.../src/site/xdoc/development/developer.xml | 286 --
pushpull/src/site/xdoc/development/maven.xml | 176 --
pushpull/src/site/xdoc/user/advanced.xml | 50 -
pushpull/src/site/xdoc/user/basic.xml | 50 -
pushpull/src/site/xdoc/user/index.xml | 49 -
.../parsers/GenericEmailParserTest.java | 75 -
pushpull/src/test/resources/TestEmail.txt | 16 -
.../resource/jobqueue/FifoMappedJobQueue.java | 510 +++
.../jobqueue/FifoMappedJobQueueFactory.java | 75 +
.../cas/resource/jobqueue/MappedJobQueue.java | 132 +
.../apache/oodt/cas/resource/structs/Job.java | 12 +
.../oodt/cas/resource/structs/JobInput.java | 8 +
.../cas/resource/structs/NameValueJobInput.java | 17 +
.../jobqueue/TestFifoMappedJobQueue.java | 101 +
sso/pom.xml | 75 -
.../sso/AbstractWebBasedSingleSignOn.java | 90 -
.../org/apache/oodt/security/sso/DummyImpl.java | 102 -
.../apache/oodt/security/sso/OpenSSOImpl.java | 190 --
.../apache/oodt/security/sso/SingleSignOn.java | 85 -
.../oodt/security/sso/SingleSignOnFactory.java | 68 -
.../security/sso/opensso/IdentityDetails.java | 136 -
.../oodt/security/sso/opensso/SSOMetKeys.java | 81 -
.../oodt/security/sso/opensso/SSOProxy.java | 308 --
.../sso/opensso/SingleSignOnException.java | 11 -
.../oodt/security/sso/opensso/UserDetails.java | 97 -
sso/src/main/php/pear/Config.php | 65 -
sso/src/main/php/pear/SingleSignOn.php | 202 --
sso/src/main/php/pear/package.xml | 94 -
tools/pdi_plugin/build-res/subfloor-pkg.xml | 367 ---
tools/pdi_plugin/build-res/subfloor.xml | 2026 ------------
tools/pdi_plugin/build.properties | 13 -
tools/pdi_plugin/build.xml | 68 -
tools/pdi_plugin/build/build.properties | 3 -
tools/pdi_plugin/build/build.xml | 83 -
tools/pdi_plugin/ivy.xml | 37 -
tools/pdi_plugin/ivysettings.xml | 32 -
tools/pdi_plugin/package-ivy.xml | 15 -
tools/pdi_plugin/plugins | Bin 592575 -> 0 bytes
.../oodt/filemgrcheck/FilemgrCheckStep.java | 199 --
.../oodt/filemgrcheck/FilemgrCheckStepData.java | 55 -
.../filemgrcheck/FilemgrCheckStepDialog.java | 307 --
.../oodt/filemgrcheck/FilemgrCheckStepMeta.java | 345 --
.../apache/oodt/filemgrcheck/OODTConfig.java | 98 -
.../apache/oodt/filemgrcheck/OODTProcesses.java | 36 -
.../filemgrcheck/PushPullObjectFactory.java | 74 -
.../messages/messages_en_US.properties | 6 -
.../oodt/filemgrcheck/resources/check/oodt.jpg | Bin 25487 -> 0 bytes
.../oodt/filemgrcheck/resources/check/oodt.png | 0
.../oodt/filemgrdelete/FilemgrDeleteStep.java | 195 --
.../filemgrdelete/FilemgrDeleteStepData.java | 56 -
.../filemgrdelete/FilemgrDeleteStepDialog.java | 309 --
.../filemgrdelete/FilemgrDeleteStepMeta.java | 349 ---
.../apache/oodt/filemgrdelete/OODTConfig.java | 57 -
.../oodt/filemgrdelete/OODTProcesses.java | 57 -
.../filemgrdelete/PushPullObjectFactory.java | 74 -
.../messages/messages_en_US.properties | 11 -
.../apache/oodt/filemgrget/FilemgrGetStep.java | 244 --
.../oodt/filemgrget/FilemgrGetStepData.java | 50 -
.../oodt/filemgrget/FilemgrGetStepDialog.java | 438 ---
.../oodt/filemgrget/FilemgrGetStepMeta.java | 410 ---
.../org/apache/oodt/filemgrget/OODTConfig.java | 60 -
.../apache/oodt/filemgrget/OODTProcesses.java | 130 -
.../src/org/apache/oodt/filemgrget/Process.java | 37 -
.../src/org/apache/oodt/filemgrget/Search.java | 37 -
.../messages/messages_en_US.properties | 9 -
.../oodt/filemgrget/resources/get/oodt.jpg | Bin 25487 -> 0 bytes
.../oodt/filemgrget/resources/get/oodt.png | 0
.../oodt/filemgringest/FilemgrIngestStep.java | 216 --
.../filemgringest/FilemgrIngestStepData.java | 56 -
.../filemgringest/FilemgrIngestStepDialog.java | 388 ---
.../filemgringest/FilemgrIngestStepMeta.java | 358 ---
.../apache/oodt/filemgringest/OODTConfig.java | 98 -
.../oodt/filemgringest/OODTProcesses.java | 86 -
.../filemgringest/PushPullObjectFactory.java | 75 -
.../messages/messages_en_US.properties | 9 -
.../oodt/filemgringest/resources/oodt.jpg | Bin 25487 -> 0 bytes
.../oodt/filemgringest/resources/oodt.png | 0
vagrant/radix/README.txt | 51 -
vagrant/radix/Vagrantfile | 129 -
vagrant/radix/vagrant/conf/terminal/bashrc | 110 -
vagrant/radix/vagrant/env.sh | 28 -
vagrant/radix/vagrant/provision.sh | 70 -
.../curation/workbench/Workbench.js | 4 +
webapp/fmprod/pom.xml | 23 +-
webapp/fmprod/src/conf/mime.properties | 407 +++
webapp/fmprod/src/dtd/query.dtd | 100 +
.../fmprod/src/main/conf/displayableTypes.xml | 50 +
webapp/fmprod/src/main/conf/mime.properties | 407 +++
webapp/fmprod/src/main/conf/ofsn-ps.xml | 201 ++
webapp/fmprod/src/main/dtd/query.dtd | 100 +
.../oodt/product/HttpRedirectException.java | 40 +
.../oodt/product/LargeProductQueryHandler.java | 57 +
.../apache/oodt/product/ProductException.java | 62 +
.../org/apache/oodt/product/QueryHandler.java | 38 +
.../java/org/apache/oodt/product/Retriever.java | 46 +
.../handlers/ofsn/AbstractCrawlLister.java | 116 +
.../ofsn/DirListNonRecursiveHandler.java | 60 +
.../handlers/ofsn/DirListRecursiveHandler.java | 63 +
.../ofsn/FileListNonRecursiveHandler.java | 56 +
.../handlers/ofsn/FileListRecursiveHandler.java | 55 +
.../product/handlers/ofsn/MD5GetHandler.java | 143 +
.../product/handlers/ofsn/OFSNFileHandler.java | 265 ++
.../ofsn/OFSNFileHandlerConfiguration.java | 131 +
.../OFSNFileHandlerConfigurationReader.java | 93 +
.../product/handlers/ofsn/OFSNGetHandler.java | 73 +
.../handlers/ofsn/OFSNHandlerConfig.java | 121 +
.../product/handlers/ofsn/OFSNListHandler.java | 61 +
.../handlers/ofsn/RawSizeListHandler.java | 60 +
.../handlers/ofsn/SingleFileListHandler.java | 64 +
.../handlers/ofsn/SingleZipFileListHandler.java | 83 +
.../handlers/ofsn/StdOFSNGetHandler.java | 112 +
.../product/handlers/ofsn/URLGetHandler.java | 252 ++
.../handlers/ofsn/metadata/OFSNMetKeys.java | 41 +
.../ofsn/metadata/OFSNXMLConfigMetKeys.java | 55 +
.../handlers/ofsn/metadata/OFSNXMLMetKeys.java | 43 +
.../handlers/ofsn/metadata/OODTMetKeys.java | 31 +
.../handlers/ofsn/metadata/XMLQueryMetKeys.java | 32 +
.../handlers/ofsn/util/OFSNObjectFactory.java | 112 +
.../product/handlers/ofsn/util/OFSNUtils.java | 197 ++
.../apache/oodt/xmlquery/ByteArrayCodec.java | 63 +
.../xmlquery/ChunkedProductInputStream.java | 215 ++
.../java/org/apache/oodt/xmlquery/Codec.java | 85 +
.../org/apache/oodt/xmlquery/CodecFactory.java | 60 +
.../oodt/xmlquery/CompressedObjectCodec.java | 110 +
.../oodt/xmlquery/CompressedStringCodec.java | 91 +
.../java/org/apache/oodt/xmlquery/Header.java | 211 ++
.../org/apache/oodt/xmlquery/LargeResult.java | 166 +
.../org/apache/oodt/xmlquery/ObjectCodec.java | 106 +
.../org/apache/oodt/xmlquery/QueryElement.java | 148 +
.../apache/oodt/xmlquery/QueryException.java | 37 +
.../org/apache/oodt/xmlquery/QueryHeader.java | 304 ++
.../org/apache/oodt/xmlquery/QueryResult.java | 151 +
.../java/org/apache/oodt/xmlquery/Result.java | 447 +++
.../java/org/apache/oodt/xmlquery/Results.java | 60 +
.../org/apache/oodt/xmlquery/Statistic.java | 155 +
.../org/apache/oodt/xmlquery/StringCodec.java | 51 +
.../oodt/xmlquery/UnsupportedMimeTypeCodec.java | 44 +
.../java/org/apache/oodt/xmlquery/XMLQuery.java | 981 ++++++
.../xmlquery/activity/QueryConstructed.java | 23 +
.../oodt/xmlquery/activity/ResultsReceived.java | 23 +
.../java/org/apache/oodt/xmlquery/package.html | 26 +
.../src/site/resources/images/delegation.png | Bin 0 -> 59132 bytes
.../src/site/resources/images/delegation.psd | Bin 0 -> 277484 bytes
.../src/site/resources/images/edm-query.jpg | Bin 0 -> 57650 bytes
.../src/site/resources/images/grid-product.jpg | Bin 0 -> 55049 bytes
.../src/site/resources/images/large-stack.png | Bin 0 -> 41424 bytes
.../src/site/resources/images/large-stack.psd | Bin 0 -> 282874 bytes
.../src/site/resources/images/results.png | Bin 0 -> 53580 bytes
.../src/site/resources/images/results.psd | Bin 0 -> 275480 bytes
.../src/site/resources/images/small-stack.png | Bin 0 -> 12368 bytes
.../src/site/resources/images/small-stack.psd | Bin 0 -> 89725 bytes
.../src/site/resources/images/xmlquery.png | Bin 0 -> 85734 bytes
.../src/site/resources/images/xmlquery.psd | Bin 0 -> 352069 bytes
webapp/fmprod/src/site/site.xml | 33 +
webapp/fmprod/src/site/xdoc/disquery/index.xml | 106 +
webapp/fmprod/src/site/xdoc/servlet/index.xml | 640 ++++
webapp/fmprod/src/site/xdoc/tutorial/index.xml | 659 ++++
webapp/fmprod/src/site/xdoc/tutorials/index.xml | 36 +
.../fmprod/src/site/xdoc/tutorials/lh/index.xml | 718 +++++
.../fmprod/src/site/xdoc/tutorials/ps/index.xml | 481 +++
.../fmprod/src/site/xdoc/tutorials/qh/index.xml | 704 +++++
.../apache/oodt/xmlquery/CodecFactoryTest.java | 61 +
.../org/apache/oodt/xmlquery/CodecTest.java | 77 +
.../xmlquery/CompressedObjectCodecTest.java | 42 +
.../xmlquery/CompressedStringCodecTest.java | 37 +
.../oodt/xmlquery/EmptyByteArrayCodecTest.java | 51 +
.../org/apache/oodt/xmlquery/HeaderTest.java | 142 +
.../apache/oodt/xmlquery/ObjectCodecTest.java | 42 +
.../apache/oodt/xmlquery/QueryElementTest.java | 93 +
.../org/apache/oodt/xmlquery/ResultTest.java | 166 +
.../apache/oodt/xmlquery/StringCodecTest.java | 37 +
.../org/apache/oodt/xmlquery/XMLQueryTest.java | 225 ++
.../handlers/ofsn/util/OFSNUtilsTest.java | 59 +
.../xmlquery/ChunkedProductInputStreamTest.java | 170 +
.../apache/oodt/xmlquery/LargeResultTest.java | 54 +
webapp/wmservices/pom.xml | 92 +
.../cas/wmservices/client/WmServicesClient.java | 132 +
.../repository/PackagedWorkflowManager.java | 275 ++
.../AbstractWorkflowServiceResource.java | 88 +
.../wmservices/resources/WorkflowResource.java | 108 +
.../wmservices/servlets/WmServicesServlet.java | 114 +
.../src/main/webapp/META-INF/context.xml | 21 +
.../wmservices/src/main/webapp/WEB-INF/web.xml | 48 +
.../workflow/policy/EnvSavingConfiguration.java | 62 +
.../policy/EnvVarSavingConfigReader.java | 53 +
.../policy/PolicyAwareWorkflowTask.java | 117 +
.../cas/workflow/policy/TaskPolicyMetKeys.java | 52 +
.../cas/workflow/policy/TaskPolicyReader.java | 212 ++
.../cas/workflow/policy/TaskPolicyWriter.java | 222 ++
.../cas/workflow/policy/TaskRequestFactory.java | 130 +
.../policy/TaskRequestProcessorMetKeys.java | 38 +
.../RollbackableWorkflowTaskInstance.java | 75 +
.../oodt/cas/workflow/structs/TaskJobInput.java | 37 +
.../main/python/xmlrpc-wrapper/oodt_metadata.py | 29 -
.../xmlrpc-wrapper/oodt_workflow_xmlrpc.py | 134 -
.../system/TestXmlRpcWorkflowManagerClient.java | 72 +-
xmlps/.gitignore | 1 -
xmlps/pom.xml | 146 -
xmlps/src/main/conf/example-ps.xml | 71 -
xmlps/src/main/conf/example.db.properties | 21 -
.../oodt/xmlps/exceptions/XmlpsException.java | 27 -
.../oodt/xmlps/mapping/DatabaseTable.java | 118 -
.../oodt/xmlps/mapping/DatabaseTableGroup.java | 82 -
.../apache/oodt/xmlps/mapping/FieldScope.java | 35 -
.../apache/oodt/xmlps/mapping/FieldType.java | 35 -
.../org/apache/oodt/xmlps/mapping/Mapping.java | 163 -
.../apache/oodt/xmlps/mapping/MappingField.java | 251 --
.../oodt/xmlps/mapping/MappingReader.java | 206 --
.../xmlps/mapping/MappingReaderMetKeys.java | 65 -
.../oodt/xmlps/mapping/funcs/MappingFunc.java | 64 -
.../oodt/xmlps/mapping/funcs/ReplaceFunc.java | 77 -
.../apache/oodt/xmlps/product/DBMSExecutor.java | 68 -
.../oodt/xmlps/product/XMLPSProductHandler.java | 390 ---
.../apache/oodt/xmlps/profile/DBMSExecutor.java | 169 -
.../oodt/xmlps/profile/XMLPSProfileHandler.java | 200 --
.../oodt/xmlps/queryparser/AndExpression.java | 30 -
.../xmlps/queryparser/ContainsExpression.java | 30 -
.../xmlps/queryparser/EqualsExpression.java | 30 -
.../oodt/xmlps/queryparser/Expression.java | 34 -
.../GreaterThanEqualsExpression.java | 31 -
.../queryparser/GreaterThanExpression.java | 31 -
.../xmlps/queryparser/HandlerQueryParser.java | 132 -
.../queryparser/LessThanEqualsExpression.java | 33 -
.../xmlps/queryparser/LessThanExpression.java | 33 -
.../apache/oodt/xmlps/queryparser/Literal.java | 39 -
.../oodt/xmlps/queryparser/LogOpExpression.java | 79 -
.../oodt/xmlps/queryparser/OrExpression.java | 30 -
.../oodt/xmlps/queryparser/ParseConstants.java | 65 -
.../oodt/xmlps/queryparser/RelOpExpression.java | 75 -
.../oodt/xmlps/queryparser/WildcardLiteral.java | 48 -
.../apache/oodt/xmlps/structs/CDEResult.java | 181 --
.../xmlps/structs/CDEResultInputStream.java | 121 -
.../org/apache/oodt/xmlps/structs/CDERow.java | 70 -
.../org/apache/oodt/xmlps/structs/CDEValue.java | 74 -
.../xmlps/util/GenericCDEObjectFactory.java | 70 -
.../apache/oodt/xmlps/util/XMLQueryHelper.java | 38 -
.../apache/oodt/xmlps/util/XMLQueryKeys.java | 30 -
.../oodt/xmlps/mapping/TestMappingReader.java | 165 -
.../xmlps/product/TestXMLPSProductHandler.java | 182 --
.../xmlps/profile/TestXMLPSProfileHandler.java | 71 -
.../queryparser/TestHandlerQueryParser.java | 111 -
.../oodt/xmlps/structs/TestCDEResult.java | 122 -
.../xmlps/structs/TestCDEResultInputStream.java | 137 -
xmlps/src/test/resources/loging.properties | 34 -
xmlps/src/test/resources/test-ps.xml | 120 -
.../test/resources/test-required-tables-ps.xml | 71 -
.../test/resources/test-same-col-name-ps.xml | 63 -
xmlquery/.gitignore | 1 -
xmlquery/pom.xml | 128 -
xmlquery/src/main/conf/mime.properties | 407 ---
xmlquery/src/main/dtd/query.dtd | 100 -
.../oodt/product/HttpRedirectException.java | 40 -
.../apache/oodt/product/ProductException.java | 62 -
.../java/org/apache/oodt/product/Retriever.java | 46 -
.../apache/oodt/xmlquery/ByteArrayCodec.java | 63 -
.../java/org/apache/oodt/xmlquery/Codec.java | 85 -
.../org/apache/oodt/xmlquery/CodecFactory.java | 60 -
.../oodt/xmlquery/CompressedObjectCodec.java | 110 -
.../oodt/xmlquery/CompressedStringCodec.java | 91 -
.../java/org/apache/oodt/xmlquery/Header.java | 211 --
.../org/apache/oodt/xmlquery/ObjectCodec.java | 106 -
.../org/apache/oodt/xmlquery/QueryElement.java | 148 -
.../apache/oodt/xmlquery/QueryException.java | 37 -
.../org/apache/oodt/xmlquery/QueryHeader.java | 304 --
.../org/apache/oodt/xmlquery/QueryResult.java | 151 -
.../java/org/apache/oodt/xmlquery/Result.java | 447 ---
.../java/org/apache/oodt/xmlquery/Results.java | 60 -
.../org/apache/oodt/xmlquery/Statistic.java | 155 -
.../org/apache/oodt/xmlquery/StringCodec.java | 51 -
.../oodt/xmlquery/UnsupportedMimeTypeCodec.java | 44 -
.../java/org/apache/oodt/xmlquery/XMLQuery.java | 981 ------
.../xmlquery/activity/QueryConstructed.java | 23 -
.../oodt/xmlquery/activity/ResultsReceived.java | 23 -
.../java/org/apache/oodt/xmlquery/package.html | 26 -
.../src/site/resources/images/edm-query.jpg | Bin 57650 -> 0 bytes
.../src/site/resources/images/large-stack.png | Bin 41424 -> 0 bytes
.../src/site/resources/images/large-stack.psd | Bin 282874 -> 0 bytes
xmlquery/src/site/resources/images/results.png | Bin 53580 -> 0 bytes
xmlquery/src/site/resources/images/results.psd | Bin 275480 -> 0 bytes
.../src/site/resources/images/small-stack.png | Bin 12368 -> 0 bytes
.../src/site/resources/images/small-stack.psd | Bin 89725 -> 0 bytes
xmlquery/src/site/resources/images/xmlquery.png | Bin 85734 -> 0 bytes
xmlquery/src/site/resources/images/xmlquery.psd | Bin 352069 -> 0 bytes
xmlquery/src/site/site.xml | 33 -
xmlquery/src/site/xdoc/disquery/index.xml | 106 -
xmlquery/src/site/xdoc/servlet/index.xml | 640 ----
xmlquery/src/site/xdoc/tutorial/index.xml | 659 ----
.../apache/oodt/xmlquery/CodecFactoryTest.java | 61 -
.../org/apache/oodt/xmlquery/CodecTest.java | 77 -
.../xmlquery/CompressedObjectCodecTest.java | 42 -
.../xmlquery/CompressedStringCodecTest.java | 37 -
.../oodt/xmlquery/EmptyByteArrayCodecTest.java | 51 -
.../org/apache/oodt/xmlquery/HeaderTest.java | 142 -
.../apache/oodt/xmlquery/ObjectCodecTest.java | 42 -
.../apache/oodt/xmlquery/QueryElementTest.java | 93 -
.../org/apache/oodt/xmlquery/ResultTest.java | 166 -
.../apache/oodt/xmlquery/StringCodecTest.java | 37 -
.../org/apache/oodt/xmlquery/XMLQueryTest.java | 225 --
1068 files changed, 17151 insertions(+), 112400 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/oodt/blob/dfa85888/core/pom.xml
----------------------------------------------------------------------
diff --cc core/pom.xml
index dd8725c,76fe4a7..778a4a8
--- a/core/pom.xml
+++ b/core/pom.xml
@@@ -376,22 -355,7 +371,22 @@@ 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>
+ <dependency>
+ <groupId>org.apache.oodt</groupId>
+ <artifactId>oodt-profile</artifactId>
+ <version>${project.parent.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.oodt</groupId>
- <artifactId>oodt-sso</artifactId>
+ <artifactId>curator-sso</artifactId>
<version>${project.parent.version}</version>
</dependency>
<dependency>
http://git-wip-us.apache.org/repos/asf/oodt/blob/dfa85888/pom.xml
----------------------------------------------------------------------
diff --cc pom.xml
index 9a5bbbd,f6aa28b..0409b44
--- a/pom.xml
+++ b/pom.xml
@@@ -33,18 -33,9 +33,10 @@@ 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>
- <module>protocol/ftp</module>
- <module>protocol/http</module>
- <module>protocol/imaps</module>
- <module>protocol/sftp</module>
- <module>xmlquery</module>
- <module>sso</module>
<module>filemgr</module>
- <module>catalog</module>
<module>workflow</module>
<module>crawler</module>
<module>resource</module>
[04/52] [abbrv] 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/master
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"));
}
[06/52] [abbrv] 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>
[38/52] [abbrv] oodt git commit: Altered config publisher CLI to use
cas-cli
Posted by ma...@apache.org.
Altered config publisher CLI to use cas-cli
Project: http://git-wip-us.apache.org/repos/asf/oodt/repo
Commit: http://git-wip-us.apache.org/repos/asf/oodt/commit/01331125
Tree: http://git-wip-us.apache.org/repos/asf/oodt/tree/01331125
Diff: http://git-wip-us.apache.org/repos/asf/oodt/diff/01331125
Branch: refs/heads/master
Commit: 01331125b24dafa374af6f5a6789c060651474fd
Parents: 39b6c88
Author: Imesha Sudasingha <im...@gmail.com>
Authored: Wed Jul 26 23:50:52 2017 +0530
Committer: Imesha Sudasingha <im...@gmail.com>
Committed: Fri Jul 28 21:20:43 2017 +0530
----------------------------------------------------------------------
config/pom.xml | 4 +-
config/src/main/assembly/assembly.xml | 18 ++-
.../oodt/config/distributed/cli/CLIAction.java | 116 +++++++++++++++++++
.../config/distributed/cli/CmdLineOptions.java | 58 ----------
.../config/distributed/cli/ConfigPublisher.java | 84 ++------------
config/src/main/resources/cmd-line-actions.xml | 38 ++++++
config/src/main/resources/cmd-line-options.xml | 50 ++++++++
config/src/main/resources/config-publisher.xml | 42 +++++++
.../src/main/resources/etc/config-publisher.xml | 42 -------
config/src/main/resources/etc/log4j.xml | 54 ---------
config/src/main/resources/log4j.xml | 54 +++++++++
config/src/main/scripts/conf-publisher | 4 +
.../AbstractDistributedConfigurationTest.java | 2 +
.../DistributedConfigurationManagerTest.java | 4 +-
.../DistributedConfigurationPublisherTest.java | 5 +-
core/pom.xml | 5 -
16 files changed, 337 insertions(+), 243 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/oodt/blob/01331125/config/pom.xml
----------------------------------------------------------------------
diff --git a/config/pom.xml b/config/pom.xml
index 6719c48..438efc4 100644
--- a/config/pom.xml
+++ b/config/pom.xml
@@ -17,8 +17,8 @@
<dependencies>
<dependency>
- <groupId>args4j</groupId>
- <artifactId>args4j</artifactId>
+ <groupId>org.apache.oodt</groupId>
+ <artifactId>cas-cli</artifactId>
</dependency>
<dependency>
<groupId>commons-io</groupId>
http://git-wip-us.apache.org/repos/asf/oodt/blob/01331125/config/src/main/assembly/assembly.xml
----------------------------------------------------------------------
diff --git a/config/src/main/assembly/assembly.xml b/config/src/main/assembly/assembly.xml
index bb6f31e..a6db0fc 100644
--- a/config/src/main/assembly/assembly.xml
+++ b/config/src/main/assembly/assembly.xml
@@ -40,7 +40,23 @@
</fileSet>
<fileSet>
<directory>${basedir}/src/main/resources</directory>
- <outputDirectory>.</outputDirectory>
+ <outputDirectory>etc</outputDirectory>
+ <includes>
+ <include>config-publisher.xml</include>
+ <include>log4j.xml</include>
+ </includes>
+ </fileSet>
+ <fileSet>
+ <directory>${basedir}/src/main/resources</directory>
+ <outputDirectory>policy</outputDirectory>
+ <includes>
+ <include>cmd-line-actions.xml</include>
+ <include>cmd-line-options.xml</include>
+ </includes>
+ </fileSet>
+ <fileSet>
+ <directory>${basedir}/src/main/resources/examples</directory>
+ <outputDirectory>examples</outputDirectory>
<includes/>
</fileSet>
</fileSets>
http://git-wip-us.apache.org/repos/asf/oodt/blob/01331125/config/src/main/java/org/apache/oodt/config/distributed/cli/CLIAction.java
----------------------------------------------------------------------
diff --git a/config/src/main/java/org/apache/oodt/config/distributed/cli/CLIAction.java b/config/src/main/java/org/apache/oodt/config/distributed/cli/CLIAction.java
new file mode 100644
index 0000000..32fd640
--- /dev/null
+++ b/config/src/main/java/org/apache/oodt/config/distributed/cli/CLIAction.java
@@ -0,0 +1,116 @@
+/*
+ * 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.oodt.cas.cli.action.CmdLineAction;
+import org.apache.oodt.cas.cli.exception.CmdLineActionException;
+import org.apache.oodt.config.Constants;
+import org.apache.oodt.config.distributed.DistributedConfigurationPublisher;
+import org.springframework.beans.BeansException;
+import org.springframework.context.ApplicationContext;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+
+import java.util.Map;
+
+import static org.apache.oodt.config.Constants.Properties.ZK_CONNECT_STRING;
+
+/**
+ * {@link CmdLineAction} specifying the verify, publish and clear tasks of distributed configuration management.
+ *
+ * @author Imesha Sudasingha
+ */
+public class CLIAction extends CmdLineAction {
+
+ public enum Action {
+ PUBLISH, VERIFY, CLEAR
+ }
+
+ private String connectString;
+ private Action action;
+
+ public CLIAction(Action action) {
+ this.action = action;
+ }
+
+ @Override
+ public void execute(ActionMessagePrinter printer) throws CmdLineActionException {
+ try {
+ ApplicationContext applicationContext = new ClassPathXmlApplicationContext(Constants.CONFIG_PUBLISHER_XML);
+ Map distributedConfigurationPublisher = applicationContext.getBeansOfType(DistributedConfigurationPublisher.class);
+
+ for (Object bean : distributedConfigurationPublisher.values()) {
+ DistributedConfigurationPublisher publisher = (DistributedConfigurationPublisher) bean;
+ switch (action) {
+ case PUBLISH:
+ publish(publisher);
+ break;
+ case VERIFY:
+ verify(publisher);
+ break;
+ case CLEAR:
+ clear(publisher);
+ break;
+ }
+ publisher.destroy();
+ }
+ } catch (BeansException e) {
+ System.out.println(String.format("Error occurred when obtaining configuration publisher beans: '%s'", e.getMessage()));
+ } catch (Exception e) {
+ System.out.println(String.format("Error occurred when publishing configuration to zookeeper: '%s'", e.getMessage()));
+ }
+
+ System.out.println("Exiting CLI ...");
+ }
+
+ private void publish(DistributedConfigurationPublisher publisher) throws Exception {
+ System.out.println();
+ System.out.println(String.format("Publishing configuration for : %s", publisher.getComponent()));
+ publisher.publishConfiguration();
+ System.out.println(String.format("Published configuration for : %s", publisher.getComponent()));
+ System.out.println();
+ }
+
+ private void verify(DistributedConfigurationPublisher publisher) throws Exception {
+ System.out.println();
+ 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.getComponent()));
+ } else {
+ System.err.println("ERROR... Published configuration doesn't match the local files. Please check above logs");
+ }
+ System.out.println();
+ }
+
+ private void clear(DistributedConfigurationPublisher publisher) throws Exception {
+ System.out.println();
+ System.out.println(String.format("Clearing configuration for : %s", publisher.getComponent()));
+ publisher.clearConfiguration();
+ System.out.println(String.format("Cleared configuration for : %s", publisher.getComponent()));
+ System.out.println();
+ }
+
+ public String getConnectString() {
+ return connectString;
+ }
+
+ public void setConnectString(String connectString) {
+ System.setProperty(ZK_CONNECT_STRING, connectString);
+ this.connectString = connectString;
+ }
+}
http://git-wip-us.apache.org/repos/asf/oodt/blob/01331125/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
deleted file mode 100644
index a262387..0000000
--- a/config/src/main/java/org/apache/oodt/config/distributed/cli/CmdLineOptions.java
+++ /dev/null
@@ -1,58 +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.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 = false;
-
- @Option(name = "-verify", usage = "Verifies the content in the local files and the published ones. Results will be printed.")
- 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;
-
- 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/01331125/config/src/main/java/org/apache/oodt/config/distributed/cli/ConfigPublisher.java
----------------------------------------------------------------------
diff --git a/config/src/main/java/org/apache/oodt/config/distributed/cli/ConfigPublisher.java b/config/src/main/java/org/apache/oodt/config/distributed/cli/ConfigPublisher.java
index 7a78a8c..f4c45a7 100644
--- a/config/src/main/java/org/apache/oodt/config/distributed/cli/ConfigPublisher.java
+++ b/config/src/main/java/org/apache/oodt/config/distributed/cli/ConfigPublisher.java
@@ -17,89 +17,21 @@
package org.apache.oodt.config.distributed.cli;
-import org.apache.oodt.config.Constants;
-import org.apache.oodt.config.distributed.DistributedConfigurationPublisher;
-import org.kohsuke.args4j.CmdLineException;
-import org.kohsuke.args4j.CmdLineParser;
+import org.apache.oodt.cas.cli.CmdLineUtility;
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.util.Map;
-
-import static org.apache.oodt.config.Constants.Properties.ZK_CONNECT_STRING;
+/**
+ * Class with main method which gets invoked by the CLI.
+ *
+ * @author Imesha Sudasingha
+ */
public class ConfigPublisher {
private static final Logger logger = LoggerFactory.getLogger(ConfigPublisher.class);
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.getComponent()));
-
- if (cmdLineOptions.isPublish()) {
- System.out.println(String.format("Publishing configuration for : %s", publisher.getComponent()));
- publisher.publishConfiguration();
- 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.getComponent()));
- if (publisher.verifyPublishedConfiguration()) {
- System.out.println("OK... Configuration verified");
- 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");
- }
- System.out.println();
- }
-
- if (cmdLineOptions.isClear()) {
- System.out.println(String.format("Clearing configuration for : %s", publisher.getComponent()));
- publisher.clearConfiguration();
- System.out.println(String.format("Cleared configuration for : %s", publisher.getComponent()));
- System.out.println();
- }
-
- publisher.destroy();
- }
- } 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("Exiting CLI ...");
+ CmdLineUtility cmdLineUtility = new CmdLineUtility();
+ cmdLineUtility.run(args);
}
}
http://git-wip-us.apache.org/repos/asf/oodt/blob/01331125/config/src/main/resources/cmd-line-actions.xml
----------------------------------------------------------------------
diff --git a/config/src/main/resources/cmd-line-actions.xml b/config/src/main/resources/cmd-line-actions.xml
new file mode 100644
index 0000000..08f5415
--- /dev/null
+++ b/config/src/main/resources/cmd-line-actions.xml
@@ -0,0 +1,38 @@
+<?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.
+ -->
+
+<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="publish" class="org.apache.oodt.config.distributed.cli.CLIAction">
+ <constructor-arg value="PUBLISH"/>
+ <property name="description" value="Publishes configuration to zookeeper"/>
+ </bean>
+
+ <bean id="verify" class="org.apache.oodt.config.distributed.cli.CLIAction">
+ <constructor-arg value="VERIFY"/>
+ <property name="description" value="Verifies configuration published to zookeeper"/>
+ </bean>
+
+ <bean id="clear" class="org.apache.oodt.config.distributed.cli.CLIAction">
+ <constructor-arg value="CLEAR"/>
+ <property name="description" value="Clears all published configuration from zookeeper"/>
+ </bean>
+</beans>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/oodt/blob/01331125/config/src/main/resources/cmd-line-options.xml
----------------------------------------------------------------------
diff --git a/config/src/main/resources/cmd-line-options.xml b/config/src/main/resources/cmd-line-options.xml
new file mode 100644
index 0000000..9aff21e
--- /dev/null
+++ b/config/src/main/resources/cmd-line-options.xml
@@ -0,0 +1,50 @@
+<?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.
+ -->
+
+<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="connectStringOption" class="org.apache.oodt.cas.cli.option.AdvancedCmdLineOption">
+ <property name="shortOption" value="cs"/>
+ <property name="longOption" value="connectString"/>
+ <property name="description" value="Connect String to Zookeeper (ip1:port1,ip2:port2,..)"/>
+ <property name="hasArgs" value="true"/>
+ <property name="requirementRules">
+ <list>
+ <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+ p:actionName="publishConfiguration" 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="publish" p:methodName="setConnectString"/>
+ <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToAction"
+ p:actionName="verify" p:methodName="setConnectString"/>
+ <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToAction"
+ p:actionName="clear" p:methodName="setConnectString"/>
+ </list>
+ </property>
+ </bean>
+ </property>
+ </bean>
+</beans>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/oodt/blob/01331125/config/src/main/resources/config-publisher.xml
----------------------------------------------------------------------
diff --git a/config/src/main/resources/config-publisher.xml b/config/src/main/resources/config-publisher.xml
new file mode 100644
index 0000000..88ba33b
--- /dev/null
+++ b/config/src/main/resources/config-publisher.xml
@@ -0,0 +1,42 @@
+<!--
+ ~ 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">
+
+ <!-- Configuration publisher for File Manager OODT Component -->
+ <bean id="filemgr-config-publisher" class="org.apache.oodt.config.distributed.DistributedConfigurationPublisher">
+ <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"/>
+ </map>
+ </property>
+ <property name="configFiles">
+ <map key-type="java.lang.String" value-type="java.lang.String">
+ <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>
+
+</beans>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/oodt/blob/01331125/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
deleted file mode 100644
index 88ba33b..0000000
--- a/config/src/main/resources/etc/config-publisher.xml
+++ /dev/null
@@ -1,42 +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">
-
- <!-- Configuration publisher for File Manager OODT Component -->
- <bean id="filemgr-config-publisher" class="org.apache.oodt.config.distributed.DistributedConfigurationPublisher">
- <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"/>
- </map>
- </property>
- <property name="configFiles">
- <map key-type="java.lang.String" value-type="java.lang.String">
- <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>
-
-</beans>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/oodt/blob/01331125/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
deleted file mode 100644
index 8cc1919..0000000
--- a/config/src/main/resources/etc/log4j.xml
+++ /dev/null
@@ -1,54 +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>
-
- <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="INFO"/>
- <appender-ref ref="console"/>
- <appender-ref ref="file"/>
- </root>
-
- <logger name="org.apache.zookeeper">
- <level value="ERROR"/>
- </logger>
- <logger name="org.springframework">
- <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/01331125/config/src/main/resources/log4j.xml
----------------------------------------------------------------------
diff --git a/config/src/main/resources/log4j.xml b/config/src/main/resources/log4j.xml
new file mode 100644
index 0000000..8cc1919
--- /dev/null
+++ b/config/src/main/resources/log4j.xml
@@ -0,0 +1,54 @@
+<?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>
+
+ <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="INFO"/>
+ <appender-ref ref="console"/>
+ <appender-ref ref="file"/>
+ </root>
+
+ <logger name="org.apache.zookeeper">
+ <level value="ERROR"/>
+ </logger>
+ <logger name="org.springframework">
+ <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/01331125/config/src/main/scripts/conf-publisher
----------------------------------------------------------------------
diff --git a/config/src/main/scripts/conf-publisher b/config/src/main/scripts/conf-publisher
index 618af4b..47c32f2 100644
--- a/config/src/main/scripts/conf-publisher
+++ b/config/src/main/scripts/conf-publisher
@@ -30,6 +30,10 @@ echo -n "Starting Configuration Publisher"
$JAVA_HOME/bin/java \
-cp ${LIB_DEPS} \
-Dlog4j.configuration=etc/log4j.xml \
+ -Djava.ext.dirs=. \
+ -Djava.util.logging.config.file=${CONF_HOME}/etc/logging.properties \
+ -Dorg.apache.oodt.cas.cli.action.spring.config=${CONF_HOME}/policy/cmd-line-actions.xml \
+ -Dorg.apache.oodt.cas.cli.option.spring.config=${CONF_HOME}/policy/cmd-line-options.xml \
org.apache.oodt.config.distributed.cli.ConfigPublisher "$@"
echo "OK"
sleep 1
http://git-wip-us.apache.org/repos/asf/oodt/blob/01331125/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
index e14d43a..4694dfa 100644
--- a/config/src/test/java/org/apache/oodt/config/distributed/AbstractDistributedConfigurationTest.java
+++ b/config/src/test/java/org/apache/oodt/config/distributed/AbstractDistributedConfigurationTest.java
@@ -36,6 +36,8 @@ public abstract class AbstractDistributedConfigurationTest {
zookeeper.start();
System.setProperty(ZK_CONNECT_STRING, zookeeper.getConnectString());
+ System.setProperty("org.apache.oodt.cas.cli.action.spring.config", "src/main/resources/cmd-line-actions.xml");
+ System.setProperty("org.apache.oodt.cas.cli.option.spring.config", "src/main/resources/cmd-line-options.xml");
client = CuratorUtils.newCuratorFrameworkClient(zookeeper.getConnectString());
client.start();
http://git-wip-us.apache.org/repos/asf/oodt/blob/01331125/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 9052ac3..71ce713 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
@@ -58,7 +58,7 @@ public class DistributedConfigurationManagerTest extends AbstractDistributedConf
ConfigPublisher.main(new String[]{
"-connectString", zookeeper.getConnectString(),
- "-publish"
+ "-a", "publish"
});
ApplicationContext applicationContext = new ClassPathXmlApplicationContext(CONFIG_PUBLISHER_XML);
@@ -140,7 +140,7 @@ public class DistributedConfigurationManagerTest extends AbstractDistributedConf
ConfigPublisher.main(new String[]{
"-connectString", zookeeper.getConnectString(),
- "-clear"
+ "-a", "clear"
});
AbstractDistributedConfigurationTest.tearDown();
http://git-wip-us.apache.org/repos/asf/oodt/blob/01331125/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 2c130db..5a529ed 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
@@ -43,8 +43,7 @@ public class DistributedConfigurationPublisherTest extends AbstractDistributedCo
// Publishing configuration through CLI and verifying whether they were stored correctly
ConfigPublisher.main(new String[]{
"-connectString", zookeeper.getConnectString(),
- "-publish",
- "-verify"
+ "-a", "publish"
});
ApplicationContext applicationContext = new ClassPathXmlApplicationContext(CONFIG_PUBLISHER_XML);
@@ -84,7 +83,7 @@ public class DistributedConfigurationPublisherTest extends AbstractDistributedCo
// Clearing configuration through CLI and checking whether the configuration has actually been gone
ConfigPublisher.main(new String[]{
"-connectString", zookeeper.getConnectString(),
- "-clear"
+ "-a", "clear"
});
for (DistributedConfigurationPublisher publisher : publishers) {
http://git-wip-us.apache.org/repos/asf/oodt/blob/01331125/core/pom.xml
----------------------------------------------------------------------
diff --git a/core/pom.xml b/core/pom.xml
index f6382f4..118d171 100644
--- a/core/pom.xml
+++ b/core/pom.xml
@@ -254,11 +254,6 @@ the License.
<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>
<version>2.6.0</version>
[47/52] [abbrv] 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/905bb87c
Tree: http://git-wip-us.apache.org/repos/asf/oodt/tree/905bb87c
Diff: http://git-wip-us.apache.org/repos/asf/oodt/diff/905bb87c
Branch: refs/heads/master
Commit: 905bb87c7df008d3784e5733f269a302680810e0
Parents: 1d70bd5 a721243
Author: Chris Mattmann <ma...@apache.org>
Authored: Wed Aug 9 22:32:41 2017 -0700
Committer: Chris Mattmann <ma...@apache.org>
Committed: Wed Aug 9 22:32:41 2017 -0700
----------------------------------------------------------------------
.../oodt/cas/filemgr/catalog/LuceneCatalog.java | 120 ++++++++++---------
.../oodt/cas/filemgr/structs/Element.java | 10 ++
.../oodt/cas/filemgr/structs/ProductType.java | 14 +++
.../cas/filemgr/system/XmlRpcFileManager.java | 2 +-
.../apache/oodt/pcs/util/FileManagerUtils.java | 98 ++++++++++-----
.../webcomponents/filemgr/FileManagerConn.java | 42 +++++--
6 files changed, 191 insertions(+), 95 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/oodt/blob/905bb87c/filemgr/src/main/java/org/apache/oodt/cas/filemgr/system/XmlRpcFileManager.java
----------------------------------------------------------------------
[03/52] [abbrv] 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/master
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
[46/52] [abbrv] 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/57a9235e
Tree: http://git-wip-us.apache.org/repos/asf/oodt/tree/57a9235e
Diff: http://git-wip-us.apache.org/repos/asf/oodt/diff/57a9235e
Branch: refs/heads/master
Commit: 57a9235e71a9d869291e80ba9bd16eeddd4a8e10
Parents: 1d70bd5 a721243
Author: Imesha Sudasingha <im...@gmail.com>
Authored: Sun Aug 6 15:04:36 2017 +0530
Committer: Imesha Sudasingha <im...@gmail.com>
Committed: Sun Aug 6 15:04:36 2017 +0530
----------------------------------------------------------------------
.../oodt/cas/filemgr/catalog/LuceneCatalog.java | 120 ++++++++++---------
.../oodt/cas/filemgr/structs/Element.java | 10 ++
.../oodt/cas/filemgr/structs/ProductType.java | 14 +++
.../cas/filemgr/system/XmlRpcFileManager.java | 2 +-
.../apache/oodt/pcs/util/FileManagerUtils.java | 98 ++++++++++-----
.../webcomponents/filemgr/FileManagerConn.java | 42 +++++--
6 files changed, 191 insertions(+), 95 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/oodt/blob/57a9235e/filemgr/src/main/java/org/apache/oodt/cas/filemgr/system/XmlRpcFileManager.java
----------------------------------------------------------------------
[05/52] [abbrv] 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/master
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;