Class ProjectTMX


  • public class ProjectTMX
    extends java.lang.Object
    Class for store data from project_save.tmx. Orphaned or non-orphaned translation calculated by RealProject.
    • Constructor Detail

      • ProjectTMX

        public ProjectTMX​(Language sourceLanguage,
                          Language targetLanguage,
                          boolean isSentenceSegmentingEnabled,
                          java.io.File file,
                          ProjectTMX.CheckOrphanedCallback callback)
                   throws java.lang.Exception
        Throws:
        java.lang.Exception
      • ProjectTMX

        public ProjectTMX()
        Constructor for TMX delta.
    • Method Detail

      • isEmpty

        public boolean isEmpty()
        Check TMX for empty.
      • save

        public void save​(ProjectProperties props,
                         java.lang.String translationFile,
                         boolean translationUpdatedByUser)
                  throws java.lang.Exception
        It saves current translation into file.
        Throws:
        java.lang.Exception
      • exportTMX

        public void exportTMX​(ProjectProperties props,
                              java.io.File outFile,
                              boolean forceValidTMX,
                              boolean levelTwo,
                              boolean useOrphaned)
                       throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getDefaultTranslation

        public TMXEntry getDefaultTranslation​(java.lang.String source)
        Get default translation or null if not exist.
      • getMultipleTranslation

        public TMXEntry getMultipleTranslation​(EntryKey ek)
        Get multiple translation or null if not exist.
      • setTranslation

        public void setTranslation​(SourceTextEntry ste,
                                   TMXEntry te,
                                   boolean isDefault)
        Set new translation.
      • getDefaults

        public java.util.Collection<TMXEntry> getDefaults()
        Returns the collection of TMX entries that have a default translation
      • getAlternatives

        public java.util.Collection<TMXEntry> getAlternatives()
        Returns the collection of TMX entries that have an alternative translation
        Returns:
      • replaceContent

        public void replaceContent​(ProjectTMX tmx)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object