Class LookaheadTokenFilter<T>
An abstract Lucene.Net.Analysis.TokenFilter to make it easier to build graph
token filters requiring some lookahead. This class handles
the details of buffering up tokens, recording them by
position, restoring them, providing access to them, etc.
Inheritance
System.Object
Lucene.Net.Util.AttributeSource
Lucene.Net.Analysis.TokenStream
Lucene.Net.Analysis.TokenFilter
LookaheadTokenFilter<T>
Implements
System.IDisposable
Inherited Members
Lucene.Net.Analysis.TokenFilter.m_input
Lucene.Net.Analysis.TokenFilter.End()
Lucene.Net.Analysis.TokenFilter.Dispose(System.Boolean)
Lucene.Net.Analysis.TokenStream.Dispose()
Lucene.Net.Util.AttributeSource.GetAttributeFactory()
Lucene.Net.Util.AttributeSource.GetAttributeClassesEnumerator()
Lucene.Net.Util.AttributeSource.GetAttributeImplsEnumerator()
Lucene.Net.Util.AttributeSource.AddAttributeImpl(Lucene.Net.Util.Attribute)
Lucene.Net.Util.AttributeSource.AddAttribute<T>()
Lucene.Net.Util.AttributeSource.HasAttributes
Lucene.Net.Util.AttributeSource.HasAttribute<T>()
Lucene.Net.Util.AttributeSource.GetAttribute<T>()
Lucene.Net.Util.AttributeSource.ClearAttributes()
Lucene.Net.Util.AttributeSource.CaptureState()
Lucene.Net.Util.AttributeSource.RestoreState(Lucene.Net.Util.AttributeSource.State)
Lucene.Net.Util.AttributeSource.GetHashCode()
Lucene.Net.Util.AttributeSource.Equals(System.Object)
Lucene.Net.Util.AttributeSource.ReflectAsString(System.Boolean)
Lucene.Net.Util.AttributeSource.ReflectWith(Lucene.Net.Util.IAttributeReflector)
Lucene.Net.Util.AttributeSource.CloneAttributes()
Lucene.Net.Util.AttributeSource.CopyTo(Lucene.Net.Util.AttributeSource)
Lucene.Net.Util.AttributeSource.ToString()
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Assembly: Lucene.Net.TestFramework.dll
Syntax
public abstract class LookaheadTokenFilter<T> : LookaheadTokenFilter, IDisposable where T : LookaheadTokenFilter.Position
Type Parameters
Constructors
|
Improve this Doc
View Source
LookaheadTokenFilter(TokenStream)
Declaration
protected LookaheadTokenFilter(TokenStream input)
Parameters
Type |
Name |
Description |
Lucene.Net.Analysis.TokenStream |
input |
|
Fields
|
Improve this Doc
View Source
DEBUG
Declaration
protected static readonly bool DEBUG
Field Value
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
m_end
Declaration
Field Value
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
Declaration
Field Value
Type |
Description |
System.Int32 |
|
|
Improve this Doc
View Source
m_offsetAtt
Declaration
protected readonly IOffsetAttribute m_offsetAtt
Field Value
Type |
Description |
Lucene.Net.Analysis.TokenAttributes.IOffsetAttribute |
|
|
Improve this Doc
View Source
m_outputPos
Declaration
protected int m_outputPos
Field Value
Type |
Description |
System.Int32 |
|
|
Improve this Doc
View Source
m_posIncAtt
Declaration
protected readonly IPositionIncrementAttribute m_posIncAtt
Field Value
Type |
Description |
Lucene.Net.Analysis.TokenAttributes.IPositionIncrementAttribute |
|
|
Improve this Doc
View Source
m_positions
Declaration
protected readonly RollingBuffer<T> m_positions
Field Value
Type |
Description |
Lucene.Net.Util.RollingBuffer<T> |
|
|
Improve this Doc
View Source
m_posLenAtt
Declaration
protected readonly IPositionLengthAttribute m_posLenAtt
Field Value
Type |
Description |
Lucene.Net.Analysis.TokenAttributes.IPositionLengthAttribute |
|
Methods
|
Improve this Doc
View Source
AfterPosition()
This is called when all input tokens leaving a given
position have been returned. Override this and
call insertToken and then set whichever token's
attributes you want, if you want to inject
a token starting from this position.
Declaration
protected virtual void AfterPosition()
|
Improve this Doc
View Source
InsertToken()
Call this only from within AfterPosition(), to insert a new
token. After calling this you should set any
necessary token you need.
Declaration
protected virtual void InsertToken()
|
Improve this Doc
View Source
NewPosition()
Declaration
protected abstract T NewPosition()
Returns
|
Improve this Doc
View Source
NextToken()
Call this when you are done looking ahead; it will set
the next token to return. Return the boolean back to
the caller.
Declaration
protected virtual bool NextToken()
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
PeekToken()
Returns true if there is a new token.
Declaration
protected virtual bool PeekToken()
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
Reset()
Declaration
public override void Reset()
Overrides
Lucene.Net.Analysis.TokenFilter.Reset()
Implements
System.IDisposable