Package org.codelibs.fess.dict.stopwords
Class StopwordsCreator
java.lang.Object
org.codelibs.fess.dict.DictionaryCreator
org.codelibs.fess.dict.stopwords.StopwordsCreator
A dictionary creator for stopwords files.
This class is responsible for creating
StopwordsFile instances
from files that match the pattern "stopwords.*\\.txt".-
Field Summary
Fields inherited from class org.codelibs.fess.dict.DictionaryCreator
dictionaryManager, pattern -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected DictionaryFile<? extends DictionaryItem> newDictionaryFile(String id, String path, Date timestamp) Creates a newStopwordsFileinstance.voidregister()Registers this creator with the dictionary manager upon initialization.Methods inherited from class org.codelibs.fess.dict.DictionaryCreator
create, encodePath, isTarget, setDictionaryManager
-
Constructor Details
-
StopwordsCreator
public StopwordsCreator()Constructs a new creator for stopwords dictionaries. It sets the file pattern to match files starting with "stopwords" and ending with ".txt".
-
-
Method Details
-
register
@PostConstruct public void register()Registers this creator with the dictionary manager upon initialization. This method is annotated withPostConstructto be executed after dependency injection is complete. -
newDictionaryFile
protected DictionaryFile<? extends DictionaryItem> newDictionaryFile(String id, String path, Date timestamp) Creates a newStopwordsFileinstance.- Specified by:
newDictionaryFilein classDictionaryCreator- Parameters:
id- The unique identifier for the dictionary file.path- The file path of the dictionary.timestamp- The last modified timestamp of the file.- Returns:
- A new
StopwordsFileassociated with the dictionary manager.
-