Package org.codelibs.fess.dict.synonym
Class SynonymCreator
java.lang.Object
org.codelibs.fess.dict.DictionaryCreator
org.codelibs.fess.dict.synonym.SynonymCreator
A dictionary creator for synonym files.
This class is responsible for creating
SynonymFile instances
from files that match the pattern "synonym.*\\.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 newSynonymFileinstance.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
-
SynonymCreator
public SynonymCreator()Constructs a new creator for synonym dictionaries. It sets the file pattern to match files starting with "synonym" 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 newSynonymFileinstance.- 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
SynonymFileassociated with the dictionary manager.
-