new metadata for every parse :(
@@ -318,29 +318,18 @@ public class BundleIT {
Parser parser = tika.getParser();
ParseContext context = new ParseContext();
context.set(Parser.class, parser);
- Metadata metadata = new Metadata();
Set<String> needToFix = new HashSet<>();
needToFix.add("testAccess2_encrypted.accdb");
-
- Set<String> unknownProblem = new HashSet<>();
- //these all trigger org.apache.tika.metadata.PropertyTypeException
- //which for some reason we can't catch (?!)
- //We don't see problems with these files in tika-parsers?!
-/* unknownProblem.add("testPPT_embedded_two_slides.pptx");
- unknownProblem.add("testWORD_multi_authors.docx");
- unknownProblem.add("testEXCEL_embeded.xlsx");
- unknownProblem.add("testVORBIS.ogg");
- unknownProblem.add("testWORD_2006ml.docx");
- unknownProblem.add("testRTFEmbeddedLink.rtf");*/
System.out.println(getTestDir());
for (File f : getTestDir().listFiles()) {
if (f.isDirectory()) {
continue;
}
- if (needToFix.contains(f.getName()) || unknownProblem.contains(f.getName())) {
+ if (needToFix.contains(f.getName())) {
continue;
}
System.out.println("about to parse "+f);
+ Metadata metadata = new Metadata();
try (InputStream is = TikaInputStream.get(f)) {
parser.parse(is, handler, metadata, context);
} catch (EncryptedDocumentException e) {
