org.apache.solr.analysis
Class BaseTokenFilterFactory

java.lang.Object
  extended by org.apache.solr.analysis.BaseTokenFilterFactory
All Implemented Interfaces:
TokenFilterFactory
Direct Known Subclasses:
EnglishPorterFilterFactory, HyphenatedWordsFilterFactory, ISOLatin1AccentFilterFactory, LengthFilterFactory, LowerCaseFilterFactory, PatternReplaceFilterFactory, PhoneticFilterFactory, PorterStemFilterFactory, RemoveDuplicatesTokenFilterFactory, SnowballPorterFilterFactory, StandardFilterFactory, StopFilterFactory, SynonymFilterFactory, TrimFilterFactory, WordDelimiterFilterFactory

public abstract class BaseTokenFilterFactory
extends java.lang.Object
implements TokenFilterFactory

Simple abstract implementation that handles init arg processing.

Version:
$Id: BaseTokenFilterFactory.java 472574 2006-11-08 18:25:52Z yonik $
Author:
yonik

Field Summary
protected  java.util.Map<java.lang.String,java.lang.String> args
          The init args
 
Constructor Summary
BaseTokenFilterFactory()
           
 
Method Summary
 java.util.Map<java.lang.String,java.lang.String> getArgs()
          Accessor method for reporting the args used to initialize this factory.
protected  boolean getBoolean(java.lang.String name, boolean defaultVal)
           
protected  boolean getBoolean(java.lang.String name, boolean defaultVal, boolean useDefault)
           
protected  int getInt(java.lang.String name)
           
protected  int getInt(java.lang.String name, int defaultVal)
           
protected  int getInt(java.lang.String name, int defaultVal, boolean useDefault)
           
 void init(java.util.Map<java.lang.String,java.lang.String> args)
          init will be called just once, immediately after creation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.solr.analysis.TokenFilterFactory
create
 

Field Detail

args

protected java.util.Map<java.lang.String,java.lang.String> args
The init args

Constructor Detail

BaseTokenFilterFactory

public BaseTokenFilterFactory()
Method Detail

init

public void init(java.util.Map<java.lang.String,java.lang.String> args)
Description copied from interface: TokenFilterFactory
init will be called just once, immediately after creation.

The args are user-level initialization parameters that may be specified when declaring a the factory in the schema.xml

Specified by:
init in interface TokenFilterFactory

getArgs

public java.util.Map<java.lang.String,java.lang.String> getArgs()
Description copied from interface: TokenFilterFactory
Accessor method for reporting the args used to initialize this factory.

Implementations are strongly encouraged to return the contents of the Map passed to to the init method

Specified by:
getArgs in interface TokenFilterFactory

getInt

protected int getInt(java.lang.String name)

getInt

protected int getInt(java.lang.String name,
                     int defaultVal)

getInt

protected int getInt(java.lang.String name,
                     int defaultVal,
                     boolean useDefault)

getBoolean

protected boolean getBoolean(java.lang.String name,
                             boolean defaultVal)

getBoolean

protected boolean getBoolean(java.lang.String name,
                             boolean defaultVal,
                             boolean useDefault)


Copyright © 2006 - 2009 The Apache Software Foundation