Author: mattmann
Date: Thu Dec 30 19:54:09 2010
New Revision: 1053992
URL: http://svn.apache.org/viewvc?rev=1053992&view=rev
Log:
- fix for OODT-58 update file manager to use Tika for mime-type detection:
don't crap out if we can't find the MIME repo (use the Tika default one)
Modified:
oodt/trunk/filemgr/src/main/java/org/apache/oodt/cas/filemgr/structs/Reference.java
Modified:
oodt/trunk/filemgr/src/main/java/org/apache/oodt/cas/filemgr/structs/Reference.java
URL:
http://svn.apache.org/viewvc/oodt/trunk/filemgr/src/main/java/org/apache/oodt/cas/filemgr/structs/Reference.java?rev=1053992&r1=1053991&r2=1053992&view=diff
==============================================================================
---
oodt/trunk/filemgr/src/main/java/org/apache/oodt/cas/filemgr/structs/Reference.java
(original)
+++
oodt/trunk/filemgr/src/main/java/org/apache/oodt/cas/filemgr/structs/Reference.java
Thu Dec 30 19:54:09 2010
@@ -25,6 +25,7 @@ import java.net.URL;
//OODT imports
import org.apache.oodt.cas.metadata.util.PathUtils;
+import org.apache.tika.config.TikaConfig;
import org.apache.tika.mime.MimeType;
import org.apache.tika.mime.MimeTypeException;
import org.apache.tika.mime.MimeTypes;
@@ -66,7 +67,7 @@ public class Reference {
"mime-types.xml")))));
} catch (Exception e){
e.printStackTrace();
- throw new RuntimeException("Cannot instantiate MIME repository!
Message: "+e.getMessage());
+ mimeTypeRepository =
TikaConfig.getDefaultConfig().getMimeRepository();
}
}