Package org.apache.lucene.analysis
Class TokenFilter
- java.lang.Object
-
- org.apache.lucene.util.AttributeSource
-
- org.apache.lucene.analysis.TokenStream
-
- org.apache.lucene.analysis.TokenFilter
-
- All Implemented Interfaces:
Closeable,AutoCloseable
- Direct Known Subclasses:
ASCIIFoldingFilter,CachingTokenFilter,ClassicFilter,CollationKeyFilter,FilteringTokenFilter,ISOLatin1AccentFilter,KeywordMarkerFilter,LimitTokenCountFilter,LowerCaseFilter,PorterStemFilter,StandardFilter,TeeSinkTokenFilter
public abstract class TokenFilter extends TokenStream
A TokenFilter is a TokenStream whose input is another TokenStream.This is an abstract class; subclasses must override
TokenStream.incrementToken().- See Also:
TokenStream
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
-
-
Field Summary
Fields Modifier and Type Field Description protected TokenStreaminputThe source of tokens for this filter.
-
Constructor Summary
Constructors Modifier Constructor Description protectedTokenFilter(TokenStream input)Construct a token stream filtering the given input.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Close the input TokenStream.voidend()Performs end-of-stream operations, if any, and calls thenend()on the input TokenStream.voidreset()Reset the filter as well as the input TokenStream.-
Methods inherited from class org.apache.lucene.analysis.TokenStream
incrementToken
-
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
-
-
-
-
Field Detail
-
input
protected final TokenStream input
The source of tokens for this filter.
-
-
Constructor Detail
-
TokenFilter
protected TokenFilter(TokenStream input)
Construct a token stream filtering the given input.
-
-
Method Detail
-
end
public void end() throws IOExceptionPerforms end-of-stream operations, if any, and calls thenend()on the input TokenStream. NOTE: Be sure to callsuper.end()first when overriding this method.- Overrides:
endin classTokenStream- Throws:
IOException
-
close
public void close() throws IOExceptionClose the input TokenStream.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classTokenStream- Throws:
IOException
-
reset
public void reset() throws IOExceptionReset the filter as well as the input TokenStream.- Overrides:
resetin classTokenStream- Throws:
IOException
-
-