Package org.codelibs.fess.app.service
Class SynonymService
java.lang.Object
org.codelibs.fess.app.service.SynonymService
Service for managing synonyms.
This class provides methods to interact with synonym dictionaries,
including retrieving, storing, and deleting synonyms.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected DictionaryManagerThe dictionary manager for accessing dictionary files.protected org.codelibs.fess.mylasta.direction.FessConfigThe Fess configuration for accessing system settings. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddelete(String dictId, SynonymItem synonymItem) Deletes a synonym item from the specified dictionary.org.dbflute.optional.OptionalEntity<SynonymFile> getSynonymFile(String dictId) Retrieves a synonym file for a given dictionary ID.org.dbflute.optional.OptionalEntity<SynonymItem> getSynonymItem(String dictId, long id) Retrieves a specific synonym item by its ID.getSynonymList(String dictId, SynonymPager synonymPager) Retrieves a list of synonyms for a given dictionary and pager.voidstore(String dictId, SynonymItem synonymItem) Stores a synonym item in the specified dictionary.
-
Field Details
-
dictionaryManager
The dictionary manager for accessing dictionary files. -
fessConfig
protected org.codelibs.fess.mylasta.direction.FessConfig fessConfigThe Fess configuration for accessing system settings.
-
-
Constructor Details
-
SynonymService
public SynonymService()Constructs a new synonym service.
-
-
Method Details
-
getSynonymList
Retrieves a list of synonyms for a given dictionary and pager.- Parameters:
dictId- The ID of the dictionary.synonymPager- The pager for controlling pagination.- Returns:
- A list of synonyms.
-
getSynonymFile
Retrieves a synonym file for a given dictionary ID.- Parameters:
dictId- The ID of the dictionary.- Returns:
- An optional entity containing the synonym file, or empty if not found.
-
getSynonymItem
Retrieves a specific synonym item by its ID.- Parameters:
dictId- The ID of the dictionary.id- The ID of the synonym item.- Returns:
- An optional entity containing the synonym item, or empty if not found.
-
store
Stores a synonym item in the specified dictionary.- Parameters:
dictId- The ID of the dictionary.synonymItem- The synonym item to store.
-
delete
Deletes a synonym item from the specified dictionary.- Parameters:
dictId- The ID of the dictionary.synonymItem- The synonym item to delete.
-