Package org.codelibs.fess.dict.protwords
Class ProtwordsFile
Dictionary file for protected words.
This class manages the reading, writing, and updating of protected words dictionary files.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected classUpdater class for processing protwords items during dictionary updates.Nested classes/interfaces inherited from class org.codelibs.fess.dict.DictionaryFile
DictionaryFile.PagingList<E> -
Field Summary
Fields inherited from class org.codelibs.fess.dict.DictionaryFile
dictionaryManager, id, path, timestamp -
Constructor Summary
ConstructorsConstructorDescriptionProtwordsFile(String id, String path, Date timestamp) Constructor for ProtwordsFile. -
Method Summary
Modifier and TypeMethodDescriptionvoiddelete(ProtwordsItem item) Deletes a dictionary item.org.dbflute.optional.OptionalEntity<ProtwordsItem> get(long id) Retrieves a dictionary item by its ID.getPath()Gets the file path of this dictionary.Gets the simple name of this dictionary file.getType()Gets the type identifier for this dictionary file.voidinsert(ProtwordsItem item) Inserts a new dictionary item.protected voidreload(ProtwordsFile.ProtwordsUpdater updater) Reloads the dictionary file with the specified updater.protected voidreload(ProtwordsFile.ProtwordsUpdater updater, InputStream in) Reloads the dictionary file with the specified updater and input stream.selectList(int offset, int size) Retrieves a paginated list of dictionary items.toString()voidupdate(InputStream in) Updates the dictionary file with content from the input stream.voidupdate(ProtwordsItem item) Updates an existing dictionary item.Methods inherited from class org.codelibs.fess.dict.DictionaryFile
getId, getTimestamp, manager, writeOut
-
Constructor Details
-
ProtwordsFile
Constructor for ProtwordsFile.- Parameters:
id- the file identifierpath- the file pathtimestamp- the file timestamp
-
-
Method Details
-
getType
Description copied from class:DictionaryFileGets the type identifier for this dictionary file.- Specified by:
getTypein classDictionaryFile<ProtwordsItem>- Returns:
- the dictionary type
-
getPath
Description copied from class:DictionaryFileGets the file path of this dictionary.- Overrides:
getPathin classDictionaryFile<ProtwordsItem>- Returns:
- the file path
-
get
Description copied from class:DictionaryFileRetrieves a dictionary item by its ID.- Specified by:
getin classDictionaryFile<ProtwordsItem>- Parameters:
id- the item ID- Returns:
- an optional containing the item if found
-
selectList
Description copied from class:DictionaryFileRetrieves a paginated list of dictionary items.- Specified by:
selectListin classDictionaryFile<ProtwordsItem>- Parameters:
offset- the starting offset for paginationsize- the number of items to retrieve- Returns:
- a paginated list of dictionary items
-
insert
Description copied from class:DictionaryFileInserts a new dictionary item.- Specified by:
insertin classDictionaryFile<ProtwordsItem>- Parameters:
item- the item to insert
-
update
Description copied from class:DictionaryFileUpdates an existing dictionary item.- Specified by:
updatein classDictionaryFile<ProtwordsItem>- Parameters:
item- the item to update
-
delete
Description copied from class:DictionaryFileDeletes a dictionary item.- Specified by:
deletein classDictionaryFile<ProtwordsItem>- Parameters:
item- the item to delete
-
reload
Reloads the dictionary file with the specified updater.- Parameters:
updater- the updater to use for processing items
-
reload
Reloads the dictionary file with the specified updater and input stream.- Parameters:
updater- the updater to use for processing itemsin- the input stream containing the file content
-
getSimpleName
Gets the simple name of this dictionary file.- Returns:
- the simple name of the file
-
update
Updates the dictionary file with content from the input stream.- Parameters:
in- the input stream containing the new content- Throws:
IOException- if an I/O error occurs
-
toString
-