Show / Hide Table of Contents

    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
    System.Object
    TokenStreamComponents
    Namespace: Lucene.Net.Analysis
    Assembly: Lucene.Net.dll
    Syntax
    public class TokenStreamComponents : object

    Constructors

    | Improve this Doc View Source

    TokenStreamComponents(Tokenizer)

    Creates a new TokenStreamComponents instance.

    Declaration
    public TokenStreamComponents(Tokenizer source)
    Parameters
    Type Name Description
    Tokenizer source

    the analyzer's tokenizer

    | Improve this Doc View Source

    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 Source

    m_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
    | Improve this Doc View Source

    m_source

    Original source of the tokens.

    Declaration
    protected readonly Tokenizer m_source
    Field Value
    Type Description
    Tokenizer

    Properties

    | Improve this Doc View Source

    Tokenizer

    Returns the component's Tokenizer

    Declaration
    public virtual Tokenizer Tokenizer { get; }
    Property Value
    Type Description
    Tokenizer

    Component's Tokenizer

    | Improve this Doc View Source

    TokenStream

    Returns the sink TokenStream

    Declaration
    public virtual TokenStream TokenStream { get; }
    Property Value
    Type Description
    TokenStream

    the sink TokenStream

    Methods

    | Improve this Doc View Source

    SetReader(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
    TextReader reader

    a reader to reset the source component

    • Improve this Doc
    • View Source
    Back to top Copyright © 2020 Licensed to the Apache Software Foundation (ASF)