Package org.apache.lucene.analysis.util
Class AbstractAnalysisFactory
- java.lang.Object
-
- org.apache.lucene.analysis.util.AbstractAnalysisFactory
-
- Direct Known Subclasses:
CharFilterFactory
,TokenFilterFactory
,TokenizerFactory
public abstract class AbstractAnalysisFactory extends java.lang.Object
Abstract parent class for analysis factoriesTokenizerFactory
,TokenFilterFactory
andCharFilterFactory
.The typical lifecycle for a factory consumer is:
- Create factory via its constructor (or via XXXFactory.forName)
- (Optional) If the factory uses resources such as files,
ResourceLoaderAware.inform(ResourceLoader)
is called to initialize those resources. - Consumer calls create() to obtain instances.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
LUCENE_MATCH_VERSION_PARAM
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
get(java.util.Map<java.lang.String,java.lang.String> args, java.lang.String name)
java.lang.String
get(java.util.Map<java.lang.String,java.lang.String> args, java.lang.String name, java.lang.String defaultVal)
java.lang.String
get(java.util.Map<java.lang.String,java.lang.String> args, java.lang.String name, java.util.Collection<java.lang.String> allowedValues)
java.lang.String
get(java.util.Map<java.lang.String,java.lang.String> args, java.lang.String name, java.util.Collection<java.lang.String> allowedValues, java.lang.String defaultVal)
java.lang.String
get(java.util.Map<java.lang.String,java.lang.String> args, java.lang.String name, java.util.Collection<java.lang.String> allowedValues, java.lang.String defaultVal, boolean caseSensitive)
char
getChar(java.util.Map<java.lang.String,java.lang.String> args, java.lang.String name, char defaultValue)
java.lang.String
getClassArg()
Version
getLuceneMatchVersion()
java.util.Map<java.lang.String,java.lang.String>
getOriginalArgs()
java.util.Set<java.lang.String>
getSet(java.util.Map<java.lang.String,java.lang.String> args, java.lang.String name)
Returns whitespace- and/or comma-separated set of values, or null if none are foundboolean
isExplicitLuceneMatchVersion()
java.lang.String
require(java.util.Map<java.lang.String,java.lang.String> args, java.lang.String name)
java.lang.String
require(java.util.Map<java.lang.String,java.lang.String> args, java.lang.String name, java.util.Collection<java.lang.String> allowedValues)
java.lang.String
require(java.util.Map<java.lang.String,java.lang.String> args, java.lang.String name, java.util.Collection<java.lang.String> allowedValues, boolean caseSensitive)
char
requireChar(java.util.Map<java.lang.String,java.lang.String> args, java.lang.String name)
void
setExplicitLuceneMatchVersion(boolean isExplicitLuceneMatchVersion)
-
-
-
Field Detail
-
LUCENE_MATCH_VERSION_PARAM
public static final java.lang.String LUCENE_MATCH_VERSION_PARAM
- See Also:
- Constant Field Values
-
-
Method Detail
-
getOriginalArgs
public final java.util.Map<java.lang.String,java.lang.String> getOriginalArgs()
-
getLuceneMatchVersion
public final Version getLuceneMatchVersion()
-
require
public java.lang.String require(java.util.Map<java.lang.String,java.lang.String> args, java.lang.String name)
-
require
public java.lang.String require(java.util.Map<java.lang.String,java.lang.String> args, java.lang.String name, java.util.Collection<java.lang.String> allowedValues)
-
require
public java.lang.String require(java.util.Map<java.lang.String,java.lang.String> args, java.lang.String name, java.util.Collection<java.lang.String> allowedValues, boolean caseSensitive)
-
get
public java.lang.String get(java.util.Map<java.lang.String,java.lang.String> args, java.lang.String name)
-
get
public java.lang.String get(java.util.Map<java.lang.String,java.lang.String> args, java.lang.String name, java.lang.String defaultVal)
-
get
public java.lang.String get(java.util.Map<java.lang.String,java.lang.String> args, java.lang.String name, java.util.Collection<java.lang.String> allowedValues)
-
get
public java.lang.String get(java.util.Map<java.lang.String,java.lang.String> args, java.lang.String name, java.util.Collection<java.lang.String> allowedValues, java.lang.String defaultVal)
-
get
public java.lang.String get(java.util.Map<java.lang.String,java.lang.String> args, java.lang.String name, java.util.Collection<java.lang.String> allowedValues, java.lang.String defaultVal, boolean caseSensitive)
-
requireChar
public char requireChar(java.util.Map<java.lang.String,java.lang.String> args, java.lang.String name)
-
getChar
public char getChar(java.util.Map<java.lang.String,java.lang.String> args, java.lang.String name, char defaultValue)
-
getSet
public java.util.Set<java.lang.String> getSet(java.util.Map<java.lang.String,java.lang.String> args, java.lang.String name)
Returns whitespace- and/or comma-separated set of values, or null if none are found
-
getClassArg
public java.lang.String getClassArg()
- Returns:
- the string used to specify the concrete class name in a serialized representation: the class arg.
If the concrete class name was not specified via a class arg, returns
getClass().getName()
.
-
isExplicitLuceneMatchVersion
public boolean isExplicitLuceneMatchVersion()
-
setExplicitLuceneMatchVersion
public void setExplicitLuceneMatchVersion(boolean isExplicitLuceneMatchVersion)
-
-