Class StopwordsService

java.lang.Object
org.codelibs.fess.app.service.StopwordsService

public class StopwordsService extends Object
Service for managing stopwords. This class provides methods to interact with stopwords dictionaries, including retrieving, storing, and deleting stopwords.
  • Field Details

    • dictionaryManager

      protected DictionaryManager dictionaryManager
      The dictionary manager for accessing dictionary files.
    • fessConfig

      protected org.codelibs.fess.mylasta.direction.FessConfig fessConfig
      The Fess configuration for accessing system settings.
  • Constructor Details

    • StopwordsService

      public StopwordsService()
      Constructs a new stopwords service.
  • Method Details

    • getStopwordsList

      public List<StopwordsItem> getStopwordsList(String dictId, StopwordsPager stopwordsPager)
      Retrieves a list of stopwords for a given dictionary and pager.
      Parameters:
      dictId - The ID of the dictionary.
      stopwordsPager - The pager for controlling pagination.
      Returns:
      A list of stopwords.
    • getStopwordsFile

      public org.dbflute.optional.OptionalEntity<StopwordsFile> getStopwordsFile(String dictId)
      Retrieves a stopwords file for a given dictionary ID.
      Parameters:
      dictId - The ID of the dictionary.
      Returns:
      An optional entity containing the stopwords file, or empty if not found.
    • getStopwordsItem

      public org.dbflute.optional.OptionalEntity<StopwordsItem> getStopwordsItem(String dictId, long id)
      Retrieves a specific stopword item by its ID.
      Parameters:
      dictId - The ID of the dictionary.
      id - The ID of the stopword item.
      Returns:
      An optional entity containing the stopword item, or empty if not found.
    • store

      public void store(String dictId, StopwordsItem stopwordsItem)
      Stores a stopword item in the specified dictionary.
      Parameters:
      dictId - The ID of the dictionary.
      stopwordsItem - The stopword item to store.
    • delete

      public void delete(String dictId, StopwordsItem stopwordsItem)
      Deletes a stopword item from the specified dictionary.
      Parameters:
      dictId - The ID of the dictionary.
      stopwordsItem - The stopword item to delete.