public class DictionaryEngine extends Object
Constructor and Description |
---|
DictionaryEngine(Dictionary dictionary,
boolean keepCase) |
Modifier and Type | Method and Description |
---|---|
void |
addCacheEntry(String text)
Adds an entry to the dictionary lookup cache.
|
void |
addCollectionFilter(CollectionFilter collectionFilter)
Adds a Collection filter to the engine.
|
void |
addPostLookupFilter(PostLookupFilter postLookupFilter)
Adds a Post-lookup filter to the engine.
|
void |
addPreLookupFilter(PreLookupFilter preLookupFilter)
Adds a Pre-lookup filter to the engine.
|
boolean |
binaryLookup(String text)
Determines whether the input text is contained by the Dictionary.
|
Collection<MetaDataHit> |
metaLookup(String text)
Gets a collection of MetaDataHits from the Dictionary based on the input
text.
|
public DictionaryEngine(Dictionary dictionary, boolean keepCase)
dictionary
- Dictionary to use for lookup operations.keepCase
- Determines whether to keep character Upper or Lower casing.
False indicates that casing will be ignored by lower casing
all lookups.public void addPreLookupFilter(PreLookupFilter preLookupFilter)
preLookupFilter
- PreLookupFilter to add.public void addPostLookupFilter(PostLookupFilter postLookupFilter)
postLookupFilter
- PostLookupFilter to add.public void addCollectionFilter(CollectionFilter collectionFilter)
collectionFilter
- CollectionFilter to add.public void addCacheEntry(String text) throws DictionaryException, FilterException
text
- to add to the caches as a hit or missDictionaryException
FilterException
public Collection<MetaDataHit> metaLookup(String text) throws DictionaryException, FilterException
text
- text to check for in the filtersDictionaryException
FilterException
public boolean binaryLookup(String text) throws DictionaryException, FilterException
text
- The input text.DictionaryException
FilterException
Copyright © 2012-2017 The Apache Software Foundation. All Rights Reserved.