C# Class Lucene.Net.Analysis.Util.AbstractAnalysisFactory

Abstract parent class for analysis factories TokenizerFactory, TokenFilterFactory and CharFilterFactory.

The typical lifecycle for a factory consumer is:

  1. Create factory via its constructor (or via XXXFactory.forName)
  2. (Optional) If the factory uses resources such as files, ResourceLoaderAware#inform(ResourceLoader) is called to initialize those resources.
  3. Consumer calls create() to obtain instances.

ファイルを表示 Open project: apache/lucenenet Class Usage Examples

Protected Properties

Property Type Description
luceneMatchVersion LuceneVersion

Public Methods

Method Description
Get ( string>.IDictionary args, string name, IEnumerable allowedValues ) : string
Get ( string>.IDictionary args, string name, IEnumerable allowedValues, string defaultVal ) : string
Get ( string>.IDictionary args, string name, IEnumerable allowedValues, string defaultVal, bool caseSensitive ) : string
Get ( string>.IDictionary args, string name, string defaultVal = null ) : string
GetChar ( string>.IDictionary args, string name, char defaultVal ) : char
GetSet ( string>.IDictionary args, string name ) : IEnumerable

Returns whitespace- and/or comma-separated set of values, or null if none are found

Require ( string>.IDictionary args, string name ) : string
Require ( string>.IDictionary args, string name, ICollection allowedValues ) : string
Require ( string>.IDictionary args, string name, ICollection allowedValues, bool caseSensitive ) : string
RequireChar ( string>.IDictionary args, string name ) : char

Protected Methods

Method Description
AbstractAnalysisFactory ( string>.IDictionary args ) : Lucene.Net.Analysis.Core

Initialize this factory via a set of key-value pairs.

AssureMatchVersion ( ) : void

this method can be called in the TokenizerFactory#create(java.io.Reader) or TokenFilterFactory#create(org.apache.lucene.analysis.TokenStream) methods, to inform user, that for this factory a #luceneMatchVersion is required

GetBoolean ( string>.IDictionary args, string name, bool defaultVal ) : bool
GetFloat ( string>.IDictionary args, string name, float defaultVal ) : float
GetInt ( string>.IDictionary args, string name, int defaultVal ) : int
GetLines ( IResourceLoader loader, string resource ) : IEnumerable

Returns the resource's lines (with content treated as UTF-8)

GetPattern ( string>.IDictionary args, string name ) : Regex

Compiles a pattern for the value of the specified argument key name

GetSnowballWordSet ( IResourceLoader loader, string wordFiles, bool ignoreCase ) : CharArraySet

same as #getWordSet(ResourceLoader, String, boolean), except the input is in snowball format.

GetWordSet ( IResourceLoader loader, string wordFiles, bool ignoreCase ) : CharArraySet

Returns as CharArraySet from wordFiles, which can be a comma-separated list of filenames

RequireBoolean ( string>.IDictionary args, string name ) : bool
RequireFloat ( string>.IDictionary args, string name ) : float
RequireInt ( string>.IDictionary args, string name ) : int
SplitFileNames ( string fileNames ) : IEnumerable

Splits file names separated by comma character. File names can contain comma characters escaped by backslash '\'

Method Details

AbstractAnalysisFactory() protected method

Initialize this factory via a set of key-value pairs.
protected AbstractAnalysisFactory ( string>.IDictionary args ) : Lucene.Net.Analysis.Core
args string>.IDictionary
return Lucene.Net.Analysis.Core

AssureMatchVersion() protected method

this method can be called in the TokenizerFactory#create(java.io.Reader) or TokenFilterFactory#create(org.apache.lucene.analysis.TokenStream) methods, to inform user, that for this factory a #luceneMatchVersion is required
protected AssureMatchVersion ( ) : void
return void

Get() public method

public Get ( string>.IDictionary args, string name, IEnumerable allowedValues ) : string
args string>.IDictionary
name string
allowedValues IEnumerable
return string

Get() public method

public Get ( string>.IDictionary args, string name, IEnumerable allowedValues, string defaultVal ) : string
args string>.IDictionary
name string
allowedValues IEnumerable
defaultVal string
return string

Get() public method

public Get ( string>.IDictionary args, string name, IEnumerable allowedValues, string defaultVal, bool caseSensitive ) : string
args string>.IDictionary
name string
allowedValues IEnumerable
defaultVal string
caseSensitive bool
return string

Get() public method

public Get ( string>.IDictionary args, string name, string defaultVal = null ) : string
args string>.IDictionary
name string
defaultVal string
return string

GetBoolean() protected method

protected GetBoolean ( string>.IDictionary args, string name, bool defaultVal ) : bool
args string>.IDictionary
name string
defaultVal bool
return bool

GetChar() public method

public GetChar ( string>.IDictionary args, string name, char defaultVal ) : char
args string>.IDictionary
name string
defaultVal char
return char

GetFloat() protected method

protected GetFloat ( string>.IDictionary args, string name, float defaultVal ) : float
args string>.IDictionary
name string
defaultVal float
return float

GetInt() protected method

protected GetInt ( string>.IDictionary args, string name, int defaultVal ) : int
args string>.IDictionary
name string
defaultVal int
return int

GetLines() protected method

Returns the resource's lines (with content treated as UTF-8)
protected GetLines ( IResourceLoader loader, string resource ) : IEnumerable
loader IResourceLoader
resource string
return IEnumerable

GetPattern() protected method

Compiles a pattern for the value of the specified argument key name
protected GetPattern ( string>.IDictionary args, string name ) : Regex
args string>.IDictionary
name string
return System.Text.RegularExpressions.Regex

GetSet() public method

Returns whitespace- and/or comma-separated set of values, or null if none are found
public GetSet ( string>.IDictionary args, string name ) : IEnumerable
args string>.IDictionary
name string
return IEnumerable

GetSnowballWordSet() protected method

same as #getWordSet(ResourceLoader, String, boolean), except the input is in snowball format.
protected GetSnowballWordSet ( IResourceLoader loader, string wordFiles, bool ignoreCase ) : CharArraySet
loader IResourceLoader
wordFiles string
ignoreCase bool
return CharArraySet

GetWordSet() protected method

Returns as CharArraySet from wordFiles, which can be a comma-separated list of filenames
protected GetWordSet ( IResourceLoader loader, string wordFiles, bool ignoreCase ) : CharArraySet
loader IResourceLoader
wordFiles string
ignoreCase bool
return CharArraySet

Require() public method

public Require ( string>.IDictionary args, string name ) : string
args string>.IDictionary
name string
return string

Require() public method

public Require ( string>.IDictionary args, string name, ICollection allowedValues ) : string
args string>.IDictionary
name string
allowedValues ICollection
return string

Require() public method

public Require ( string>.IDictionary args, string name, ICollection allowedValues, bool caseSensitive ) : string
args string>.IDictionary
name string
allowedValues ICollection
caseSensitive bool
return string

RequireBoolean() protected method

protected RequireBoolean ( string>.IDictionary args, string name ) : bool
args string>.IDictionary
name string
return bool

RequireChar() public method

public RequireChar ( string>.IDictionary args, string name ) : char
args string>.IDictionary
name string
return char

RequireFloat() protected method

protected RequireFloat ( string>.IDictionary args, string name ) : float
args string>.IDictionary
name string
return float

RequireInt() protected method

protected RequireInt ( string>.IDictionary args, string name ) : int
args string>.IDictionary
name string
return int

SplitFileNames() protected method

Splits file names separated by comma character. File names can contain comma characters escaped by backslash '\'
protected SplitFileNames ( string fileNames ) : IEnumerable
fileNames string the string containing file names
return IEnumerable

Property Details

luceneMatchVersion protected_oe property

the luceneVersion arg
protected LuceneVersion luceneMatchVersion
return LuceneVersion