Lucene++ - a full-featured, c++ search engine
API Documentation

- Main Page
- Related Pages
- Namespaces
- Data Structures
- Files

- Data Structures
- Class Hierarchy
- Data Fields

All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
Lucene::TokenFilter Class Reference

A TokenFilter is a TokenStream whose input is another TokenStream. More...

`#include <TokenFilter.h>`

Inheritance diagram for Lucene::TokenFilter:

## Public Member Functions

virtual | ~TokenFilter ()
virtual String | getClassName ()
boost::shared_ptr< TokenFilter > | shared_from_this ()
virtual void | end ()
| Performs end-of-stream operations, if any, and calls then end() on the input TokenStream. NOTE: Be sure to call TokenFilter::end() first when overriding this method. More...
virtual void | close ()
| Close the input TokenStream. More...
virtual void | reset ()
| Reset the filter as well as the input TokenStream. More...
Public Member Functions inherited from Lucene::TokenStream
virtual | ~TokenStream ()
boost::shared_ptr< TokenStream > | shared_from_this ()
virtual bool | incrementToken ()=0
| Consumers (ie., IndexWriter) use this method to advance the stream to the next token. Implementing classes must implement this method and update the appropriate Attributes with the attributes of the next token. More...
Public Member Functions inherited from Lucene::AttributeSource
| AttributeSource ()
| An AttributeSource using the default attribute factory DefaultAttributeFactory. More...
| AttributeSource (AttributeSourcePtr input)
| An AttributeSource that uses the same attributes as the supplied one. More...
| AttributeSource (AttributeFactoryPtr factory)
| An AttributeSource using the supplied AttributeFactory for creating new Attribute instances. More...
virtual | ~AttributeSource ()
boost::shared_ptr < AttributeSource > | shared_from_this ()
AttributeFactoryPtr | getAttributeFactory ()
| returns the used AttributeFactory. More...
template<class ATTR >
boost::shared_ptr< ATTR > | addAttribute ()
| This method first checks if an instance of that class is already in this AttributeSource and returns it. Otherwise a new instance is created, added to this AttributeSource and returned. More...
void | addAttribute (const String &className, AttributePtr attrImpl)
| Adds a custom Attribute instance. More...
bool | hasAttributes ()
| Returns true if this AttributeSource has any attributes. More...
template<class ATTR >
bool | hasAttribute ()
| Returns true, if this AttributeSource contains the passed-in Attribute. More...
template<class ATTR >
boost::shared_ptr< ATTR > | getAttribute ()
| Returns the instance of the passed in Attribute contained in this AttributeSource. More...
void | clearAttributes ()
| Resets all Attributes in this AttributeSource by calling AttributeImpl#clear() on each Attribute implementation. More...
AttributeSourceStatePtr | captureState ()
| Captures the state of all Attributes. The return value can be passed to restoreState to restore the state of this or another AttributeSource. More...
void | restoreState (AttributeSourceStatePtr state)

Restores this state by copying the values of all attribute implementations that this state contains into the attributes implementations of the targetStream. The targetStream must contain a corresponding instance for each argument contained in this state (eg. it is not possible to restore the state of an AttributeSource containing a TermAttribute into a AttributeSource using a Token instance as implementation). More...

virtual int32_t | hashCode ()
| Return hash code for this object. More...
virtual bool | equals (LuceneObjectPtr other)
| Return whether two objects are equal. More...
virtual String | toString ()
| Returns a string representation of the object. More...
AttributeSourcePtr | cloneAttributes ()
| Performs a clone of all AttributeImpl instances returned in a new AttributeSource instance. This method can be used to eg. create another TokenStream with exactly the same attributes (using AttributeSource(AttributeSource)) More...
Collection< AttributePtr > | getAttributes ()
| Return a vector of attributes based on currentState. More...
Public Member Functions inherited from Lucene::LuceneObject
virtual | ~LuceneObject ()
virtual void | initialize ()
| Called directly after instantiation to create objects that depend on this object being fully constructed. More...
virtual LuceneObjectPtr | clone (LuceneObjectPtr other=LuceneObjectPtr())
| Return clone of this object. More...
virtual int32_t | compareTo (LuceneObjectPtr other)
| Compare two objects. More...
Public Member Functions inherited from Lucene::LuceneSync
virtual | ~LuceneSync ()
virtual SynchronizePtr | getSync ()
| Return this object synchronize lock. More...
virtual LuceneSignalPtr | getSignal ()
| Return this object signal. More...
virtual void | lock (int32_t timeout=0)
| Lock this object using an optional timeout. More...
virtual void | unlock ()
| Unlock this object. More...
virtual bool | holdsLock ()
| Returns true if this object is currently locked by current thread. More...
virtual void | wait (int32_t timeout=0)
| Wait for signal using an optional timeout. More...
virtual void | notifyAll ()
| Notify all threads waiting for signal. More...

## Static Public Member Functions

static String | _getClassName ()
Static Public Member Functions inherited from Lucene::TokenStream
static String | _getClassName ()
Static Public Member Functions inherited from Lucene::AttributeSource
static String | _getClassName ()

## Protected Member Functions

| TokenFilter (TokenStreamPtr input)
| Construct a token stream filtering the given input. More...
Protected Member Functions inherited from Lucene::TokenStream
| TokenStream ()
| A TokenStream using the default attribute factory. More...
| TokenStream (AttributeSourcePtr input)
| A TokenStream that uses the same attributes as the supplied one. More...
| TokenStream (AttributeFactoryPtr factory)
| A TokenStream using the supplied AttributeFactory for creating new Attribute instances. More...
Protected Member Functions inherited from Lucene::AttributeSource
AttributePtr | getAttribute (const String &className)
| The caller must pass in a className value. This method checks if an instance of that class is already in this AttributeSource and returns it. More...
bool | hasAttribute (const String &className)
| Returns true, if this AttributeSource contains the passed-in Attribute. More...
void | computeCurrentState ()
Protected Member Functions inherited from Lucene::LuceneObject
| LuceneObject ()

## Protected Attributes

TokenStreamPtr | input
| The source of tokens for this filter. More...

## Detailed Description

A TokenFilter is a TokenStream whose input is another TokenStream.

This is an abstract class; subclasses must override incrementToken().

See Also
  TokenStream

## Constructor & Destructor Documentation

Lucene::TokenFilter::TokenFilter | ( | TokenStreamPtr | input) |  |

protected

Construct a token stream filtering the given input.

virtual Lucene::TokenFilter::~TokenFilter | ( | ) |  |

virtual

## Member Function Documentation

static String Lucene::TokenFilter::_getClassName | ( | ) |  |

inline static

virtual void Lucene::TokenFilter::close | ( | ) |  |

virtual

Close the input TokenStream.

Reimplemented from Lucene::TokenStream.

virtual void Lucene::TokenFilter::end | ( | ) |  |

virtual

Performs end-of-stream operations, if any, and calls then end() on the input TokenStream. NOTE: Be sure to call TokenFilter::end() first when overriding this method.

Reimplemented from Lucene::TokenStream.

Reimplemented in Lucene::TeeSinkTokenFilter, and Lucene::CachingTokenFilter.

virtual String Lucene::TokenFilter::getClassName | ( | ) |  |

inline virtual

Reimplemented from Lucene::TokenStream.

Reimplemented in Lucene::TeeSinkTokenFilter, Lucene::ASCIIFoldingFilter, Lucene::PorterStemFilter, Lucene::StopFilter, Lucene::ISOLatin1AccentFilter, Lucene::CachingTokenFilter, Lucene::LengthFilter, Lucene::StandardFilter, and Lucene::LowerCaseFilter.

virtual void Lucene::TokenFilter::reset | ( | ) |  |

virtual

Reset the filter as well as the input TokenStream.

Reimplemented from Lucene::TokenStream.

Reimplemented in Lucene::CachingTokenFilter.

boost::shared_ptr< TokenFilter > Lucene::TokenFilter::shared_from_this | ( | ) |  |

inline

## Field Documentation

TokenStreamPtr Lucene::TokenFilter::input

protected

The source of tokens for this filter.

The documentation for this class was generated from the following file:

- TokenFilter.h

clucene.sourceforge.net