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.ByteBuffernext
-
Constructor Summary
Constructors Constructor Description AbstractAnalyzer()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract voidinit(java.util.Map<java.lang.String,java.lang.String> options, AbstractType<?> validator)protected abstract booleanisCompatibleWith(AbstractType<?> validator)Test whether the given validator is compatible with the underlying analyzer.booleanisTokenizing()java.nio.ByteBuffernext()static java.lang.Stringnormalize(java.lang.String original)voidremove()abstract voidreset(java.nio.ByteBuffer input)voidvalidate(java.util.Map<java.lang.String,java.lang.String> options, ColumnMetadata cm)
-
-
-
Method Detail
-
next
public java.nio.ByteBuffer next()
- Specified by:
nextin interfacejava.util.Iterator<java.nio.ByteBuffer>
-
remove
public void remove()
- Specified by:
removein 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)
-
-