Class NotLoadedProject

java.lang.Object
org.omegat.core.data.NotLoadedProject
All Implemented Interfaces:
IProject

public class NotLoadedProject extends Object implements IProject
Project implementation when project not really loaded.
  • Constructor Details

    • NotLoadedProject

      public NotLoadedProject()
  • Method Details

    • compileProject

      public void compileProject(String sourcePattern)
      Description copied from interface: IProject
      Create translated documents.
      Specified by:
      compileProject in interface IProject
    • isRemoteProject

      public boolean isRemoteProject()
      Description copied from interface: IProject
      Tells whether a project is a team project
      Specified by:
      isRemoteProject in interface IProject
      Returns:
      whether the project is a team project
    • compileProjectAndCommit

      public void compileProjectAndCommit(String sourcePattern, boolean doPostProcessing, boolean commitTargetFiles) throws Exception
      Description copied from interface: IProject
      Builds translated files corresponding to sourcePattern and creates fresh TM files.
      Specified by:
      compileProjectAndCommit in interface IProject
      Parameters:
      sourcePattern - The regexp of files to create
      doPostProcessing - Whether or not we should perform external post-processing.
      commitTargetFiles - Whether or not we should commit target files
      Throws:
      Exception - If any error occurs during the compilation process.
    • commitSourceFiles

      public void commitSourceFiles() throws Exception
      Description copied from interface: IProject
      Commit source files in a team project.
      Specified by:
      commitSourceFiles in interface IProject
      Throws:
      Exception - if any error occurs during the commit process
    • closeProject

      public void closeProject()
      Description copied from interface: IProject
      Close project.
      Specified by:
      closeProject in interface IProject
    • decreaseTranslated

      public void decreaseTranslated()
    • getAllEntries

      public List<SourceTextEntry> getAllEntries()
      Description copied from interface: IProject
      Get all source segments. It's unmodifiable list, so, there is no need synchronization to read it.
      Specified by:
      getAllEntries in interface IProject
    • getUniqueEntries

      public List<StringEntry> getUniqueEntries()
    • getTranslationInfo

      public TMXEntry getTranslationInfo(SourceTextEntry ste)
      Description copied from interface: IProject
      Get translation info for specified entry. It looks first for multiple, then for default. This method ALWAYS returns TMXEntry, because note can exist even for non-translated segment. Use TMXEntry.isTranslated() for check if translation text really exist. Translation can be checked for default/alternative by the TMXEntry.defaultTranslation.
      Specified by:
      getTranslationInfo in interface IProject
      Parameters:
      ste - source entry
      Returns:
      translation
    • getAllTranslations

      public IProject.AllTranslations getAllTranslations(SourceTextEntry ste)
      Description copied from interface: IProject
      Get default and alternative translations for optimistic locking.
      Specified by:
      getAllTranslations in interface IProject
    • iterateByDefaultTranslations

      public void iterateByDefaultTranslations(IProject.DefaultTranslationsIterator it)
      Description copied from interface: IProject
      Iterate by all default translations in project.
      Specified by:
      iterateByDefaultTranslations in interface IProject
    • iterateByMultipleTranslations

      public void iterateByMultipleTranslations(IProject.MultipleTranslationsIterator it)
      Description copied from interface: IProject
      Iterate by all multiple translations in project.
      Specified by:
      iterateByMultipleTranslations in interface IProject
    • setNote

      public void setNote(SourceTextEntry entry, TMXEntry oldTrans, String note)
      Description copied from interface: IProject
      Change note only for translation.
      Specified by:
      setNote in interface IProject
      Parameters:
      entry - entry
      oldTrans - old translation
      note - note text
    • isOrphaned

      public boolean isOrphaned(String source)
      Description copied from interface: IProject
      Check if orphaned.
      Specified by:
      isOrphaned in interface IProject
    • isOrphaned

      public boolean isOrphaned(EntryKey entry)
      Description copied from interface: IProject
      Check if orphaned.
      Specified by:
      isOrphaned in interface IProject
    • getTransMemories

      public Map<String,ExternalTMX> getTransMemories()
      Description copied from interface: IProject
      Get all translation memories from /tm/ folder.
      Specified by:
      getTransMemories in interface IProject
      Returns:
      translation memories
    • getOtherTargetLanguageTMs

      public Map<Language,ProjectTMX> getOtherTargetLanguageTMs()
      Description copied from interface: IProject
      Get all translation memories from /other_lang/ folder.
      Specified by:
      getOtherTargetLanguageTMs in interface IProject
      Returns:
      translation memories
    • getProjectFiles

      public List<IProject.FileInfo> getProjectFiles()
      Description copied from interface: IProject
      Get info about each source file in project. It's unmodifiable list, so, there is no need synchronization to read it.
      Specified by:
      getProjectFiles in interface IProject
    • getProjectProperties

      public ProjectProperties getProjectProperties()
      Description copied from interface: IProject
      Get project properties.
      Specified by:
      getProjectProperties in interface IProject
      Returns:
      project properties
    • getStatistics

      public StatisticsInfo getStatistics()
      Description copied from interface: IProject
      Get statistics info.
      Specified by:
      getStatistics in interface IProject
    • increaseTranslated

      public void increaseTranslated()
    • isProjectLoaded

      public boolean isProjectLoaded()
      Description copied from interface: IProject
      Get project loaded status.
      Specified by:
      isProjectLoaded in interface IProject
      Returns:
      true if project loaded
    • isProjectModified

      public boolean isProjectModified()
      Description copied from interface: IProject
      Is project modified ?
      Specified by:
      isProjectModified in interface IProject
    • saveProject

      public void saveProject(boolean doTeamSync)
      Description copied from interface: IProject
      Save project.
      Specified by:
      saveProject in interface IProject
    • saveProjectProperties

      public void saveProjectProperties() throws IOException
      Description copied from interface: IProject
      Save project properties only.
      Specified by:
      saveProjectProperties in interface IProject
      Throws:
      IOException
    • setTranslation

      public void setTranslation(SourceTextEntry entry, PrepareTMXEntry trans, boolean defaultTranslation, TMXEntry.ExternalLinked externalLinked)
      Description copied from interface: IProject
      Set translation for entry.

      Optimistic locking will not be checked.

      Specified by:
      setTranslation in interface IProject
      Parameters:
      entry - entry
      trans - translation. It can't be null
    • setTranslation

      public void setTranslation(SourceTextEntry entry, PrepareTMXEntry trans, boolean defaultTranslation, TMXEntry.ExternalLinked externalLinked, IProject.AllTranslations previousTranslations) throws IProject.OptimisticLockingFail
      Description copied from interface: IProject
      Set translation for entry with optimistic lock checking: if previous translation is not the same like in storage, OptimisticLockingFail exception will be generated. Use when user has typed a new translation.
      Specified by:
      setTranslation in interface IProject
      Parameters:
      entry - entry
      trans - translation. It can't be null
      Throws:
      IProject.OptimisticLockingFail
    • getSourceTokenizer

      public ITokenizer getSourceTokenizer()
      Description copied from interface: IProject
      Returns tokenizer for source language.
      Specified by:
      getSourceTokenizer in interface IProject
    • getTargetTokenizer

      public ITokenizer getTargetTokenizer()
      Description copied from interface: IProject
      Returns tokenizer for target language.
      Specified by:
      getTargetTokenizer in interface IProject
    • findNonUniqueSegments

      public void findNonUniqueSegments()
    • getSourceFilesOrder

      public List<String> getSourceFilesOrder()
      Description copied from interface: IProject
      Get ordered list of source file names.
      Specified by:
      getSourceFilesOrder in interface IProject
    • setSourceFilesOrder

      public void setSourceFilesOrder(List<String> filesList)
      Description copied from interface: IProject
      Set ordered list of source file names.
      Specified by:
      setSourceFilesOrder in interface IProject
    • getTargetPathForSourceFile

      public String getTargetPathForSourceFile(String sourceFile)
      Description copied from interface: IProject
      For a given source file, calculate the path of the target file that would be created by running Create Translated Documents (the file may not exist yet).

      The target path must be calculated because it can depend on project properties such as the target language, etc.

      Specified by:
      getTargetPathForSourceFile in interface IProject
      Parameters:
      sourceFile - The relative path (under the source directory) of the source file, e.g. Bundle.properties
      Returns:
      The relative path (under the target directory) of the corresponding target file, e.g. Bundle_fr_FR.properties
    • isTeamSyncPrepared

      public boolean isTeamSyncPrepared()
      Description copied from interface: IProject
      Check if team synchronization prepared.
      Specified by:
      isTeamSyncPrepared in interface IProject
    • teamSync

      public void teamSync()
      Description copied from interface: IProject
      Execute synchronization.
      Specified by:
      teamSync in interface IProject
    • teamSyncPrepare

      public void teamSyncPrepare() throws Exception
      Description copied from interface: IProject
      Prepare for team synchronization from save thread.
      Specified by:
      teamSyncPrepare in interface IProject
      Throws:
      Exception