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 2016/12/13 01:21:40 UTC

tika git commit: TIKA-2195: refactor MockParser to consolidate service loading and custom mime type into tica-core/src/text

Repository: tika
Updated Branches:
  refs/heads/master 0f78a314f -> 533572b6a


TIKA-2195: refactor MockParser to consolidate service loading and custom mime type into tica-core/src/text


Project: http://git-wip-us.apache.org/repos/asf/tika/repo
Commit: http://git-wip-us.apache.org/repos/asf/tika/commit/533572b6
Tree: http://git-wip-us.apache.org/repos/asf/tika/tree/533572b6
Diff: http://git-wip-us.apache.org/repos/asf/tika/diff/533572b6

Branch: refs/heads/master
Commit: 533572b6a7169b8202e591b5d31823dfd6f5c245
Parents: 0f78a31
Author: tballison <ta...@mitre.org>
Authored: Mon Dec 12 20:21:29 2016 -0500
Committer: tballison <ta...@mitre.org>
Committed: Mon Dec 12 20:21:29 2016 -0500

----------------------------------------------------------------------
 CHANGES.txt                                     |  3 +++
 .../services/org.apache.tika.parser.Parser      |  1 +
 .../org/apache/tika/mime/custom-mimetypes.xml   |  6 +++++
 .../services/org.apache.tika.parser.Parser      |  1 -
 .../org/apache/tika/mime/custom-mimetypes.xml   | 23 -------------------
 .../test/resources/mime/custom-mimetypes.xml    | 24 --------------------
 6 files changed, 10 insertions(+), 48 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tika/blob/533572b6/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 2dd9181..b63b95c 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,5 +1,8 @@
 Release 1.15 - ??
 
+  * Refactor MockParser to consolidate service loading
+    and mime types into tika-core/src/test (TIKA-2195).
+
   * Enabled extraction of embedded objects from headers, footers,
     footnotes, endnotes and comments in legacy .docx parser (TIKA-2192).
 

http://git-wip-us.apache.org/repos/asf/tika/blob/533572b6/tika-core/src/test/resources/META-INF/services/org.apache.tika.parser.Parser
----------------------------------------------------------------------
diff --git a/tika-core/src/test/resources/META-INF/services/org.apache.tika.parser.Parser b/tika-core/src/test/resources/META-INF/services/org.apache.tika.parser.Parser
new file mode 100644
index 0000000..69bfdeb
--- /dev/null
+++ b/tika-core/src/test/resources/META-INF/services/org.apache.tika.parser.Parser
@@ -0,0 +1 @@
+org.apache.tika.parser.mock.MockParser
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tika/blob/533572b6/tika-core/src/test/resources/org/apache/tika/mime/custom-mimetypes.xml
----------------------------------------------------------------------
diff --git a/tika-core/src/test/resources/org/apache/tika/mime/custom-mimetypes.xml b/tika-core/src/test/resources/org/apache/tika/mime/custom-mimetypes.xml
index 2408150..f2dbf7b 100644
--- a/tika-core/src/test/resources/org/apache/tika/mime/custom-mimetypes.xml
+++ b/tika-core/src/test/resources/org/apache/tika/mime/custom-mimetypes.xml
@@ -42,4 +42,10 @@
         <match value="Hello, World!" type="string" offset="0:13" />
      </magic>
   </mime-type>
+
+  <!-- add this to make testing with mock parser easier -->
+  <mime-type type="application/mock+xml">
+      <root-XML localName="mock"/>
+      <sub-class-of type="application/xml"/>
+  </mime-type>
 </mime-info>

http://git-wip-us.apache.org/repos/asf/tika/blob/533572b6/tika-parsers/src/test/resources/META-INF/services/org.apache.tika.parser.Parser
----------------------------------------------------------------------
diff --git a/tika-parsers/src/test/resources/META-INF/services/org.apache.tika.parser.Parser b/tika-parsers/src/test/resources/META-INF/services/org.apache.tika.parser.Parser
deleted file mode 100644
index 69bfdeb..0000000
--- a/tika-parsers/src/test/resources/META-INF/services/org.apache.tika.parser.Parser
+++ /dev/null
@@ -1 +0,0 @@
-org.apache.tika.parser.mock.MockParser
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tika/blob/533572b6/tika-parsers/src/test/resources/org/apache/tika/mime/custom-mimetypes.xml
----------------------------------------------------------------------
diff --git a/tika-parsers/src/test/resources/org/apache/tika/mime/custom-mimetypes.xml b/tika-parsers/src/test/resources/org/apache/tika/mime/custom-mimetypes.xml
deleted file mode 100644
index 45b6638..0000000
--- a/tika-parsers/src/test/resources/org/apache/tika/mime/custom-mimetypes.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 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.
--->
-<mime-info>
-    <mime-type type="application/mock+xml">
-        <root-XML localName="mock"/>
-        <sub-class-of type="application/xml"/>
-    </mime-type>
-</mime-info>

http://git-wip-us.apache.org/repos/asf/tika/blob/533572b6/tika-server/src/test/resources/mime/custom-mimetypes.xml
----------------------------------------------------------------------
diff --git a/tika-server/src/test/resources/mime/custom-mimetypes.xml b/tika-server/src/test/resources/mime/custom-mimetypes.xml
deleted file mode 100644
index 78cf392..0000000
--- a/tika-server/src/test/resources/mime/custom-mimetypes.xml
+++ /dev/null
@@ -1,24 +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.
--->
-
-<mime-info>
-    <mime-type type="application/evil">
-        <glob pattern="*.evil"/>
-        <sub-class-of type="text/plain"/>
-    </mime-type>
-</mime-info>
\ No newline at end of file