Class AbstractTokenizingFilter
- java.lang.Object
-
- org.apache.lucene.util.AttributeSource
-
- org.apache.lucene.analysis.TokenStream
-
- org.apache.lucene.analysis.TokenFilter
-
- org.owasp.dependencycheck.data.lucene.AbstractTokenizingFilter
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,org.apache.lucene.util.Unwrappable<org.apache.lucene.analysis.TokenStream>
- Direct Known Subclasses:
AlphaNumericFilter,UrlTokenizingFilter
@NotThreadSafe public abstract class AbstractTokenizingFilter extends org.apache.lucene.analysis.TokenFilterAn abstract tokenizing filter that can be used as the base for a tokenizing filter.- Author:
- Jeremy Long
-
-
Constructor Summary
Constructors Constructor Description AbstractTokenizingFilter(org.apache.lucene.analysis.TokenStream stream)Constructs a new AbstractTokenizingFilter.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleanaddTerm()Adds a term, if one exists, from the tokens collection.protected org.apache.lucene.analysis.tokenattributes.CharTermAttributegetTermAtt()Gets the CharTermAttribute.protected java.util.ArrayDeque<java.lang.String>getTokens()Gets the list of tokens.voidreset()-
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, endAttributes, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, removeAllAttributes, restoreState, toString
-
-
-
-
Method Detail
-
getTermAtt
protected org.apache.lucene.analysis.tokenattributes.CharTermAttribute getTermAtt()
Gets the CharTermAttribute.- Returns:
- the CharTermAttribute
-
getTokens
protected java.util.ArrayDeque<java.lang.String> getTokens()
Gets the list of tokens.- Returns:
- the list of tokens
-
reset
public void reset() throws java.io.IOException- Overrides:
resetin classorg.apache.lucene.analysis.TokenFilter- Throws:
java.io.IOException
-
addTerm
protected boolean addTerm()
Adds a term, if one exists, from the tokens collection.- Returns:
- whether or not a new term was added
-
-