Package org.codelibs.fess.dict.kuromoji
Class KuromojiFile
A dictionary file for Kuromoji.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected classAn updater for Kuromoji files.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
ConstructorsConstructorDescriptionKuromojiFile(String id, String path, Date timestamp) Constructs a new Kuromoji file. -
Method Summary
Modifier and TypeMethodDescriptionvoiddelete(KuromojiItem item) Deletes a dictionary item.org.dbflute.optional.OptionalEntity<KuromojiItem> get(long id) Retrieves a dictionary item by its ID.getPath()Gets the file path of this dictionary.Returns the simple name of the file.getType()Gets the type identifier for this dictionary file.voidinsert(KuromojiItem item) Inserts a new dictionary item.protected voidreload(KuromojiFile.KuromojiUpdater updater) Reloads the dictionary file.protected voidreload(KuromojiFile.KuromojiUpdater updater, InputStream in) Reloads the dictionary file.selectList(int offset, int size) Retrieves a paginated list of dictionary items.toString()voidupdate(InputStream in) Updates the dictionary file with the given input stream.voidupdate(KuromojiItem item) Updates an existing dictionary item.Methods inherited from class org.codelibs.fess.dict.DictionaryFile
getId, getTimestamp, manager, writeOut
-
Constructor Details
-
KuromojiFile
Constructs a new Kuromoji file.- Parameters:
id- The ID of the dictionary file.path- The path of the dictionary file.timestamp- The timestamp of the dictionary file.
-
-
Method Details
-
getType
Description copied from class:DictionaryFileGets the type identifier for this dictionary file.- Specified by:
getTypein classDictionaryFile<KuromojiItem>- Returns:
- the dictionary type
-
getPath
Description copied from class:DictionaryFileGets the file path of this dictionary.- Overrides:
getPathin classDictionaryFile<KuromojiItem>- Returns:
- the file path
-
get
Description copied from class:DictionaryFileRetrieves a dictionary item by its ID.- Specified by:
getin classDictionaryFile<KuromojiItem>- 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<KuromojiItem>- 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<KuromojiItem>- Parameters:
item- the item to insert
-
update
Description copied from class:DictionaryFileUpdates an existing dictionary item.- Specified by:
updatein classDictionaryFile<KuromojiItem>- Parameters:
item- the item to update
-
delete
Description copied from class:DictionaryFileDeletes a dictionary item.- Specified by:
deletein classDictionaryFile<KuromojiItem>- Parameters:
item- the item to delete
-
reload
Reloads the dictionary file.- Parameters:
updater- The updater.
-
reload
Reloads the dictionary file.- Parameters:
updater- The updater.in- The input stream.
-
getSimpleName
Returns the simple name of the file.- Returns:
- The simple name of the file.
-
update
Updates the dictionary file with the given input stream.- Parameters:
in- The input stream.- Throws:
IOException- If an I/O error occurs.
-
toString
-