Closeable
, AutoCloseable
ASCIIFoldingFilter
, CachingTokenFilter
, ClassicFilter
, CollationKeyFilter
, FilteringTokenFilter
, ISOLatin1AccentFilter
, KeywordMarkerFilter
, LimitTokenCountFilter
, LowerCaseFilter
, PorterStemFilter
, StandardFilter
, TeeSinkTokenFilter
public abstract class TokenFilter extends TokenStream
This is an abstract class; subclasses must override TokenStream.incrementToken()
.
TokenStream
AttributeSource.AttributeFactory, AttributeSource.State
Modifier and Type | Field | Description |
---|---|---|
protected TokenStream |
input |
The source of tokens for this filter.
|
Modifier | Constructor | Description |
---|---|---|
protected |
TokenFilter(TokenStream input) |
Construct a token stream filtering the given input.
|
Modifier and Type | Method | Description |
---|---|---|
void |
close() |
Close the input TokenStream.
|
void |
end() |
Performs end-of-stream operations, if any, and calls then
end() on the
input TokenStream. |
void |
reset() |
Reset the filter as well as the input TokenStream.
|
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
incrementToken
protected final TokenStream input
protected TokenFilter(TokenStream input)
public void end() throws IOException
end()
on the
input TokenStream.
NOTE: Be sure to call super.end()
first when overriding this method.end
in class TokenStream
IOException
public void close() throws IOException
close
in interface AutoCloseable
close
in interface Closeable
close
in class TokenStream
IOException
public void reset() throws IOException
reset
in class TokenStream
IOException
Copyright © 2000-2018 Apache Software Foundation. All Rights Reserved.