Package org.codelibs.fess.dict
Class DictionaryFile<T extends DictionaryItem>
java.lang.Object
org.codelibs.fess.dict.DictionaryFile<T>
- Type Parameters:
T- the type of dictionary items managed by this file
- Direct Known Subclasses:
CharMappingFile,KuromojiFile,ProtwordsFile,StemmerOverrideFile,StopwordsFile,SynonymFile
Abstract base class for dictionary files that manage dictionary items.
A dictionary file represents a collection of dictionary items with
CRUD operations and pagination support.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA paginated list implementation that wraps another list and provides pagination metadata and functionality. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected DictionaryManagerThe dictionary manager responsible for this file.protected StringThe unique identifier for this dictionary file.protected StringThe file path of this dictionary.protected DateThe timestamp when this dictionary file was created or last modified. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDictionaryFile(String id, String path, Date timestamp) Creates a new DictionaryFile with the specified parameters. -
Method Summary
Modifier and TypeMethodDescriptionabstract voidDeletes a dictionary item.abstract org.dbflute.optional.OptionalEntity<T> get(long id) Retrieves a dictionary item by its ID.getId()Returns the unique identifier of this dictionary file.getPath()Gets the file path of this dictionary.Returns the timestamp of this dictionary file.abstract StringgetType()Gets the type identifier for this dictionary file.abstract voidInserts a new dictionary item.manager(DictionaryManager dictionaryManager) Sets the dictionary manager for this file and returns this instance.abstract DictionaryFile.PagingList<T> selectList(int offset, int size) Retrieves a paginated list of dictionary items.abstract voidUpdates an existing dictionary item.voidwriteOut(org.lastaflute.web.servlet.request.stream.WrittenStreamOut out) Writes the content of this dictionary file to the provided output stream.
-
Field Details
-
dictionaryManager
The dictionary manager responsible for this file. -
id
The unique identifier for this dictionary file. -
path
The file path of this dictionary. -
timestamp
The timestamp when this dictionary file was created or last modified.
-
-
Constructor Details
-
DictionaryFile
Creates a new DictionaryFile with the specified parameters.- Parameters:
id- the unique identifier for this dictionary filepath- the file path of this dictionarytimestamp- the timestamp of the dictionary file
-
-
Method Details
-
getId
Returns the unique identifier of this dictionary file.- Returns:
- the dictionary file ID
-
getPath
Gets the file path of this dictionary.- Returns:
- the file path
-
getTimestamp
Returns the timestamp of this dictionary file.- Returns:
- the timestamp when this dictionary was created or last modified
-
manager
Sets the dictionary manager for this file and returns this instance.- Parameters:
dictionaryManager- the dictionary manager to set- Returns:
- this dictionary file instance for method chaining
-
writeOut
public void writeOut(org.lastaflute.web.servlet.request.stream.WrittenStreamOut out) throws IOException Writes the content of this dictionary file to the provided output stream.- Parameters:
out- the output stream to write to- Throws:
IOException- if an I/O error occurs during writing
-
getType
Gets the type identifier for this dictionary file.- Returns:
- the dictionary type
-
selectList
Retrieves a paginated list of dictionary items.- Parameters:
offset- the starting offset for paginationsize- the number of items to retrieve- Returns:
- a paginated list of dictionary items
-
get
Retrieves a dictionary item by its ID.- Parameters:
id- the item ID- Returns:
- an optional containing the item if found
-
insert
Inserts a new dictionary item.- Parameters:
item- the item to insert
-
update
Updates an existing dictionary item.- Parameters:
item- the item to update
-
delete
Deletes a dictionary item.- Parameters:
item- the item to delete
-