You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nutch.apache.org by je...@apache.org on 2006/06/06 00:02:36 UTC
svn commit: r411935 -
/lucene/nutch/trunk/src/java/org/apache/nutch/analysis/NutchAnalyzer.java
Author: jerome
Date: Mon Jun 5 15:02:35 2006
New Revision: 411935
URL: http://svn.apache.org/viewvc?rev=411935&view=rev
Log:
NucthAnalyzer is now Configurable (Teruhiko Kurosaka)
Modified:
lucene/nutch/trunk/src/java/org/apache/nutch/analysis/NutchAnalyzer.java
Modified: lucene/nutch/trunk/src/java/org/apache/nutch/analysis/NutchAnalyzer.java
URL: http://svn.apache.org/viewvc/lucene/nutch/trunk/src/java/org/apache/nutch/analysis/NutchAnalyzer.java?rev=411935&r1=411934&r2=411935&view=diff
==============================================================================
--- lucene/nutch/trunk/src/java/org/apache/nutch/analysis/NutchAnalyzer.java (original)
+++ lucene/nutch/trunk/src/java/org/apache/nutch/analysis/NutchAnalyzer.java Mon Jun 5 15:02:35 2006
@@ -22,6 +22,10 @@
import org.apache.lucene.analysis.Analyzer;
import org.apache.lucene.analysis.TokenStream;
+// Hadoop imports
+import org.apache.hadoop.conf.Configurable;
+import org.apache.hadoop.conf.Configuration;
+
// Nutch imports
import org.apache.nutch.plugin.Pluggable;
@@ -34,16 +38,37 @@
* @author Jérôme Charron
*/
public abstract class NutchAnalyzer extends Analyzer
- implements Pluggable {
+ implements Configurable, Pluggable {
/** The name of the extension point. */
final static String X_POINT_ID = NutchAnalyzer.class.getName();
+ /** The current Configuration */
+ protected Configuration conf = null;
+
/**
* Creates a TokenStream which tokenizes all the text in the provided Reader.
*/
public abstract TokenStream tokenStream(String fieldName, Reader reader);
-
+
+ /* ----------------------------- *
+ * <implementation:Configurable> *
+ * ----------------------------- */
+
+ // Inherited Javadoc
+ public void setConf(Configuration conf) {
+ this.conf = conf;
+ }
+
+ // Inherited Javadoc
+ public Configuration getConf() {
+ return this.conf;
+ }
+
+ /* ------------------------------ *
+ * </implementation:Configurable> *
+ * ------------------------------ */
+
}