Class SingletonTokenStream

  • All Implemented Interfaces:
    Closeable, AutoCloseable

    public final class SingletonTokenStream
    extends org.apache.lucene.analysis.TokenStream
    SingletonTokenStream implements a token stream that wraps a single value with a given property type. The property type is stored as a payload on the single returned token.
    • Nested Class Summary

      • Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource

        org.apache.lucene.util.AttributeSource.AttributeFactory, org.apache.lucene.util.AttributeSource.State
    • Constructor Summary

      Constructors 
      Constructor Description
      SingletonTokenStream​(String value, int type)
      Creates a new SingleTokenStream with the given value and a property type.
      SingletonTokenStream​(String value, org.apache.lucene.index.Payload payload)
      Creates a new SingleTokenStream with the given value and payload.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()
      boolean incrementToken()  
      void reset()
      • Methods inherited from class org.apache.lucene.analysis.TokenStream

        end
      • 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
    • Constructor Detail

      • SingletonTokenStream

        public SingletonTokenStream​(String value,
                                    org.apache.lucene.index.Payload payload)
        Creates a new SingleTokenStream with the given value and payload.
        Parameters:
        value - the string value that will be returned with the token.
        payload - the payload that will be attached to this token
      • SingletonTokenStream

        public SingletonTokenStream​(String value,
                                    int type)
        Creates a new SingleTokenStream with the given value and a property type.
        Parameters:
        value - the string value that will be returned with the token.
        type - the JCR property type.
    • Method Detail

      • incrementToken

        public boolean incrementToken()
                               throws IOException
        Specified by:
        incrementToken in class org.apache.lucene.analysis.TokenStream
        Throws:
        IOException
      • reset

        public void reset()
                   throws IOException
        Overrides:
        reset in class org.apache.lucene.analysis.TokenStream
        Throws:
        IOException