You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tika.apache.org by ju...@apache.org on 2009/09/11 22:04:44 UTC
svn commit: r814007 -
/lucene/tika/trunk/tika-core/src/main/java/org/apache/tika/config/TikaConfig.java
Author: jukka
Date: Fri Sep 11 20:04:42 2009
New Revision: 814007
URL: http://svn.apache.org/viewvc?rev=814007&view=rev
Log:
TIKA-275: Parse context
The delegate parser no longer needs to be present when reading the configuration. Deprecate the related method signatures.
Modified:
lucene/tika/trunk/tika-core/src/main/java/org/apache/tika/config/TikaConfig.java
Modified: lucene/tika/trunk/tika-core/src/main/java/org/apache/tika/config/TikaConfig.java
URL: http://svn.apache.org/viewvc/lucene/tika/trunk/tika-core/src/main/java/org/apache/tika/config/TikaConfig.java?rev=814007&r1=814006&r2=814007&view=diff
==============================================================================
--- lucene/tika/trunk/tika-core/src/main/java/org/apache/tika/config/TikaConfig.java (original)
+++ lucene/tika/trunk/tika-core/src/main/java/org/apache/tika/config/TikaConfig.java Fri Sep 11 20:04:42 2009
@@ -67,29 +67,32 @@
public TikaConfig(InputStream stream)
throws TikaException, IOException, SAXException {
- this(stream, null);
+ this(getBuilder().parse(stream));
}
+ /**
+ * @deprecated This method will be removed in Apache Tika 1.0
+ * @see <a href="https://issues.apache.org/jira/browse/TIKA-275">TIKA-275</a>
+ */
public TikaConfig(InputStream stream, Parser delegate)
throws TikaException, IOException, SAXException {
- this(getBuilder().parse(stream), delegate);
+ this(stream);
}
public TikaConfig(Document document) throws TikaException, IOException {
- this(document, null);
+ this(document.getDocumentElement());
}
+ /**
+ * @deprecated This method will be removed in Apache Tika 1.0
+ * @see <a href="https://issues.apache.org/jira/browse/TIKA-275">TIKA-275</a>
+ */
public TikaConfig(Document document, Parser delegate)
throws TikaException, IOException {
- this(document.getDocumentElement(), delegate);
+ this(document);
}
public TikaConfig(Element element) throws TikaException, IOException {
- this(element, null);
- }
-
- public TikaConfig(Element element, Parser delegate)
- throws TikaException, IOException {
Element mtr = getChild(element, "mimeTypeRepository");
if (mtr != null) {
mimeTypes = MimeTypesFactory.create(mtr.getAttribute("resource"));
@@ -114,6 +117,15 @@
}
}
+ /**
+ * @deprecated This method will be removed in Apache Tika 1.0
+ * @see <a href="https://issues.apache.org/jira/browse/TIKA-275">TIKA-275</a>
+ */
+ public TikaConfig(Element element, Parser delegate)
+ throws TikaException, IOException {
+ this(element);
+ }
+
private String getText(Node node) {
if (node.getNodeType() == Node.TEXT_NODE) {
return node.getNodeValue();