You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tika.apache.org by ta...@apache.org on 2018/06/07 20:40:17 UTC
[tika] branch master updated: clean up dev mess
This is an automated email from the ASF dual-hosted git repository.
tallison pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tika.git
The following commit(s) were added to refs/heads/master by this push:
new dcf496d clean up dev mess
dcf496d is described below
commit dcf496dcce5949bd49b06a5233af182978956b04
Author: tballison <ta...@mitre.org>
AuthorDate: Thu Jun 7 16:39:57 2018 -0400
clean up dev mess
---
.../tika/cli/TikaCLIBatchIntegrationTest.java | 38 ----------------------
1 file changed, 38 deletions(-)
diff --git a/tika-app/src/test/java/org/apache/tika/cli/TikaCLIBatchIntegrationTest.java b/tika-app/src/test/java/org/apache/tika/cli/TikaCLIBatchIntegrationTest.java
index 50663f1..0d22b36 100644
--- a/tika-app/src/test/java/org/apache/tika/cli/TikaCLIBatchIntegrationTest.java
+++ b/tika-app/src/test/java/org/apache/tika/cli/TikaCLIBatchIntegrationTest.java
@@ -208,42 +208,4 @@ public class TikaCLIBatchIntegrationTest {
Files.isRegularFile(path));
}
- @Test
- public void oneOff() throws Exception {
- Parser p = new AutoDetectParser();
- RecursiveParserWrapper w = new RecursiveParserWrapper(p);
- try (JsonStreamingSerializer writer = new JsonStreamingSerializer(new BufferedWriter(new OutputStreamWriter(
- Files.newOutputStream(Paths.get("C:/data/tika_tmp.json")), StandardCharsets.UTF_8)))) {
- ContentHandler contentHandler = new WriteoutRPWHandler(
- new BasicContentHandlerFactory(BasicContentHandlerFactory.HANDLER_TYPE.TEXT, -1),
- writer);
- try (InputStream is = getClass().getResourceAsStream("/test-data/test_recursive_embedded.docx")) {
- w.parse(is, contentHandler, new Metadata(), new ParseContext());
- }
- }
- }
-
- private class WriteoutRPWHandler extends AbstractRecursiveParserWrapperHandler {
- private final JsonStreamingSerializer jsonWriter;
-
- public WriteoutRPWHandler(ContentHandlerFactory contentHandlerFactory, JsonStreamingSerializer writer) {
- super(contentHandlerFactory);
- this.jsonWriter = writer;
- }
-
- @Override
- public void endEmbeddedDocument(ContentHandler contentHandler, Metadata metadata) throws SAXException {
- metadata.add(RecursiveParserWrapperHandler.TIKA_CONTENT, contentHandler.toString());
- try {
- jsonWriter.add(metadata);
- } catch (IOException e) {
- throw new SAXException(e);
- }
- }
-
- @Override
- public void endDocument(ContentHandler contentHandler, Metadata metadata) throws SAXException {
- endEmbeddedDocument(contentHandler, metadata);
- }
- }
}
--
To stop receiving notification emails like this one, please contact
tallison@apache.org.