Interface ITranslationsFile

All Known Implementing Classes:
QnTranslationsFile, TranslationFileRows, UniqueDictTranslationsFile

public interface ITranslationsFile
The Interface ITranslationsFile. Resource file with translations.
  • Method Details

    • store

      void store(org.eclipse.core.runtime.IProgressMonitor monitor) throws IOException
      Store translations to the file.
      Parameters:
      monitor - the monitor
      Throws:
      IOException - Signals that an I/O exception has occurred.
    • getLanguageCode

      String getLanguageCode()
      Gets the language code of the file.
      Returns:
      the language code
    • setTranslation

      String setTranslation(FeatureKey featureKey, String value, String comment)
      Sets the translation.
      Parameters:
      featureKey - the feature key
      value - the value
      comment - the comment
      Returns:
      the previous value of the specified key in this hashtable, or null if it did not have one
    • getTranslation

      String getTranslation(FeatureKey featureKey)
      Gets the translation by the key.
      Parameters:
      featureKey - the feature key
      Returns:
      the translation
    • removeTranslation

      String removeTranslation(FeatureKey featureKey)
      Removes the translation.
      Parameters:
      featureKey - the feature key
      Returns:
      the previous value associated with key, or null if there was no mapping for key.
    • isEmpty

      boolean isEmpty()
      Returns true if no translations stored in this file.
      Returns:
      true if no translations stored in this file, false otherwise.
    • isDirty

      boolean isDirty()
      Checks if the file is dirty.
      Returns:
      the boolean
    • markDirty

      void markDirty()
      Mark the file as dirty.
    • load

      void load()
      Load from the resource file.
    • delete

      void delete()
      Delete storage file, associated with this object.
    • getTranslationKeys

      Collection<FeatureKey> getTranslationKeys(String value)
      Gets the translation keys with the same value.
      Parameters:
      value - the value
      Returns:
      the translation keys
    • getFile

      org.eclipse.core.resources.IFile getFile()
      Gets the file.
      Returns:
      the file
    • setFile

      void setFile(org.eclipse.core.resources.IFile file)
      Sets the resource file to store.
      Parameters:
      file - the new file
    • setComment

      void setComment(String generateComment)
      Sets the comment of the file.
      Parameters:
      generateComment - the new comment
    • getComment

      String getComment(FeatureKey featureKey)
      Gets the comment for the key.
      Parameters:
      featureKey - the feature key
      Returns:
      the comment