Class SingletonTokenStream
- java.lang.Object
-
- org.apache.lucene.util.AttributeSource
-
- org.apache.lucene.analysis.TokenStream
-
- org.apache.jackrabbit.core.query.lucene.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.
-
-
Constructor Summary
Constructors Constructor Description SingletonTokenStream(String value, int type)
Creates a new SingleTokenStream with the given value and a propertytype
.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.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 propertytype
.- 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 classorg.apache.lucene.analysis.TokenStream
- Throws:
IOException
-
reset
public void reset() throws IOException
- Overrides:
reset
in classorg.apache.lucene.analysis.TokenStream
- Throws:
IOException
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classorg.apache.lucene.analysis.TokenStream
- Throws:
IOException
-
-