Class TranslationGroup

java.lang.Object
io.goobi.viewer.model.translations.admin.TranslationGroup

public final class TranslationGroup extends Object
Translation group configuration item.
  • Method Details Link icon

    • create Link icon

      public static TranslationGroup create(int id, TranslationGroup.TranslationGroupType type, String name, String description, int numItems)
      Factory method.
      Parameters:
      id - unique ID number
      type -
      name -
      description -
      numItems -
      Returns:
      Created TranslationGroup
    • hashCode Link icon

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals Link icon

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • findEntryByMessageKey Link icon

      public boolean findEntryByMessageKey(String key)
      Parameters:
      key - Message key to find
      Returns:
      true if message entry was found or added; false if no matching group item could be found
    • getId Link icon

      public int getId()
      Returns:
      the id
    • getType Link icon

      Returns:
      the type
    • getName Link icon

      public String getName()
      Returns:
      the name
    • getDescription Link icon

      public String getDescription()
      Returns:
      the description
    • getItems Link icon

      public List<TranslationGroupItem> getItems()
      Returns:
      the keys
    • getEntryCount Link icon

      public int getEntryCount()
      Returns:
      Number of unique message keys across all groups
    • getUntranslatedEntryCount Link icon

      public Integer getUntranslatedEntryCount()
      Returns:
      Number of entries with no translations at all
    • getPartiallyTranslatedEntryCount Link icon

      public Integer getPartiallyTranslatedEntryCount()
      Returns the number of entries which finished (non-zzz) translations for at least one but less than all languages.
      Returns:
      Number of partially translated entries
    • getFullyTranslatedEntryCount Link icon

      public Integer getFullyTranslatedEntryCount()
      Returns the number of entries which finished (non-zzz) translations for all languages.
      Returns:
      Number of fully translated entries
    • getUntranslatedEntryCountPercentage Link icon

      public double getUntranslatedEntryCountPercentage()
      Returns:
      Percentage represented by untranslated entries
    • getPartiallyTranslatedEntryCountPercentage Link icon

      public double getPartiallyTranslatedEntryCountPercentage()
      Returns:
      Percentage represented by partially translated entries
    • getFullyTranslatedEntryCountPercentage Link icon

      public double getFullyTranslatedEntryCountPercentage()
      Returns:
      Percentage represented by fully translated entries
    • isFullyTranslated Link icon

      public boolean isFullyTranslated()
      Returns:
      true if all entries are fully translated; false otherwise
    • isAllFilteredEntriesFullyTranslated Link icon

      public boolean isAllFilteredEntriesFullyTranslated()
      Returns:
      true if all entries in the filtered list are fully translated; false otherwise
    • isHasEntries Link icon

      public boolean isHasEntries()
      Returns:
      true if the allEntries list for this group is not empty; false otherwise
    • getFilteredEntries Link icon

      public List<MessageEntry> getFilteredEntries()
      Returns:
      List
    • getAllEntries Link icon

      public List<MessageEntry> getAllEntries()
      Returns:
      Unique message keys across all groups
    • getSelectedEntry Link icon

      public MessageEntry getSelectedEntry()
      Returns:
      the selectedEntry
    • setSelectedEntry Link icon

      public void setSelectedEntry(MessageEntry selectedEntry)
      Parameters:
      selectedEntry - the selectedEntry to set
    • resetSelectedEntry Link icon

      public void resetSelectedEntry()
      Sets selectedEntry to null without prior saving.
    • getSelectedEntryIndex Link icon

      public int getSelectedEntryIndex()
      Returns:
      the selectedMessageEntryIndex
    • setSelectedEntryIndex Link icon

      public void setSelectedEntryIndex(int selectedEntryIndex)
      Parameters:
      selectedEntryIndex - the selectedEntryIndex to set
    • getFilterString Link icon

      public String getFilterString()
      Returns:
      the filterString
    • setFilterString Link icon

      public void setFilterString(String filterString)
      Parameters:
      filterString - the filterString to set
    • isLoadError Link icon

      public boolean isLoadError()
      Returns:
      the loadError
    • setLoadError Link icon

      public void setLoadError(boolean loadError)
      Parameters:
      loadError - the loadError to set
    • isNewEntryMode Link icon

      public boolean isNewEntryMode()
      Returns:
      the newEntryMode
    • setNewEntryMode Link icon

      public void setNewEntryMode(boolean newEntryMode)
      Parameters:
      newEntryMode - the newEntryMode to set
    • prevEntry Link icon

      public void prevEntry()
      Sets the previous MessageEntry element in the list active.
    • nextEntry Link icon

      public void nextEntry()
      Sets the next MessageEntry element in the list active.
    • saveSelectedEntry Link icon

      public void saveSelectedEntry()
      Persists the edited values of selectedEntry to all language messages.properties files.
    • isHasFileAccess Link icon

      public static boolean isHasFileAccess()
      Check whether the application has write access to all local messages files as well as the containing folder if any languages have no local message file. The tested languages are taken from ViewerResourceBundle.getAllLocales()
      Returns:
      true if all required access rights to edit messages are present. false otherwise
    • resetStatusCount Link icon

      public void resetStatusCount()
      Resets the counts for fully translated and untranslated entries to update the translation process