Class TokenStreamComponents
This class encapsulates the outer components of a token stream. It provides access to the source (Tokenizer) and the outer end (sink), an instance of TokenFilter which also serves as the TokenStream returned by GetTokenStream(String, TextReader).
Inheritance
Inherited Members
Namespace: Lucene.Net.Analysis
Assembly: Lucene.Net.dll
Syntax
public class TokenStreamComponents
Constructors
| Improve this Doc View SourceTokenStreamComponents(Tokenizer)
Creates a new TokenStreamComponents instance.
Declaration
public TokenStreamComponents(Tokenizer source)
Parameters
Type | Name | Description |
---|---|---|
Tokenizer | source | the analyzer's tokenizer |
TokenStreamComponents(Tokenizer, TokenStream)
Creates a new TokenStreamComponents instance.
Declaration
public TokenStreamComponents(Tokenizer source, TokenStream result)
Parameters
Type | Name | Description |
---|---|---|
Tokenizer | source | the analyzer's tokenizer |
TokenStream | result | the analyzer's resulting token stream |
Fields
| Improve this Doc View Sourcem_sink
Sink tokenstream, such as the outer tokenfilter decorating the chain. This can be the source if there are no filters.
Declaration
protected readonly TokenStream m_sink
Field Value
Type | Description |
---|---|
TokenStream |
m_source
Original source of the tokens.
Declaration
protected readonly Tokenizer m_source
Field Value
Type | Description |
---|---|
Tokenizer |
Properties
| Improve this Doc View SourceTokenizer
Returns the component's Tokenizer
Declaration
public virtual Tokenizer Tokenizer { get; }
Property Value
Type | Description |
---|---|
Tokenizer | Component's Tokenizer |
TokenStream
Returns the sink TokenStream
Declaration
public virtual TokenStream TokenStream { get; }
Property Value
Type | Description |
---|---|
TokenStream | the sink TokenStream |
Methods
| Improve this Doc View SourceSetReader(TextReader)
Resets the encapsulated components with the given reader. If the components cannot be reset, an Exception should be thrown.
Declaration
protected virtual void SetReader(TextReader reader)
Parameters
Type | Name | Description |
---|---|---|
System.IO.TextReader | reader | a reader to reset the source component |
Exceptions
Type | Condition |
---|---|
System.IO.IOException | if the component's reset method throws an System.IO.IOException |