Class AbstractAnalyzer
- java.lang.Object
-
- org.apache.cassandra.index.sasi.analyzer.AbstractAnalyzer
-
- All Implemented Interfaces:
java.util.Iterator<java.nio.ByteBuffer>
- Direct Known Subclasses:
DelimiterAnalyzer
,NonTokenizingAnalyzer
,NoOpAnalyzer
,StandardAnalyzer
public abstract class AbstractAnalyzer extends java.lang.Object implements java.util.Iterator<java.nio.ByteBuffer>
-
-
Field Summary
Fields Modifier and Type Field Description protected java.nio.ByteBuffer
next
-
Constructor Summary
Constructors Constructor Description AbstractAnalyzer()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract void
init(java.util.Map<java.lang.String,java.lang.String> options, AbstractType<?> validator)
protected abstract boolean
isCompatibleWith(AbstractType<?> validator)
Test whether the given validator is compatible with the underlying analyzer.boolean
isTokenizing()
java.nio.ByteBuffer
next()
static java.lang.String
normalize(java.lang.String original)
void
remove()
abstract void
reset(java.nio.ByteBuffer input)
void
validate(java.util.Map<java.lang.String,java.lang.String> options, ColumnMetadata cm)
-
-
-
Method Detail
-
next
public java.nio.ByteBuffer next()
- Specified by:
next
in interfacejava.util.Iterator<java.nio.ByteBuffer>
-
remove
public void remove()
- Specified by:
remove
in interfacejava.util.Iterator<java.nio.ByteBuffer>
-
validate
public void validate(java.util.Map<java.lang.String,java.lang.String> options, ColumnMetadata cm) throws ConfigurationException
- Throws:
ConfigurationException
-
init
public abstract void init(java.util.Map<java.lang.String,java.lang.String> options, AbstractType<?> validator)
-
reset
public abstract void reset(java.nio.ByteBuffer input)
-
isCompatibleWith
protected abstract boolean isCompatibleWith(AbstractType<?> validator)
Test whether the given validator is compatible with the underlying analyzer.- Parameters:
validator
- the validator to test the compatibility with- Returns:
- true if the give validator is compatible, false otherwise
-
isTokenizing
public boolean isTokenizing()
- Returns:
- true if current analyzer provides text tokenization, false otherwise.
-
normalize
public static java.lang.String normalize(java.lang.String original)
-
-