Package org.omegat.core.data
Class ProjectTMX
- java.lang.Object
-
- org.omegat.core.data.ProjectTMX
-
public class ProjectTMX extends java.lang.Object
Class for store data from project_save.tmx. Orphaned or non-orphaned translation calculated by RealProject.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
ProjectTMX.CheckOrphanedCallback
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
PROP_ORIGIN
-
Constructor Summary
Constructors Constructor Description ProjectTMX()
Constructor for TMX delta.ProjectTMX(Language sourceLanguage, Language targetLanguage, boolean isSentenceSegmentingEnabled, java.io.File file, ProjectTMX.CheckOrphanedCallback callback)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
exportTMX(ProjectProperties props, java.io.File outFile, boolean forceValidTMX, boolean levelTwo, boolean useOrphaned)
java.util.Collection<TMXEntry>
getAlternatives()
Returns the collection of TMX entries that have an alternative translationjava.util.Collection<TMXEntry>
getDefaults()
Returns the collection of TMX entries that have a default translationTMXEntry
getDefaultTranslation(java.lang.String source)
Get default translation or null if not exist.TMXEntry
getMultipleTranslation(EntryKey ek)
Get multiple translation or null if not exist.boolean
isEmpty()
Check TMX for empty.void
replaceContent(ProjectTMX tmx)
void
save(ProjectProperties props, java.lang.String translationFile, boolean translationUpdatedByUser)
It saves current translation into file.void
setTranslation(SourceTextEntry ste, TMXEntry te, boolean isDefault)
Set new translation.java.lang.String
toString()
-
-
-
Field Detail
-
PROP_ORIGIN
public static final java.lang.String PROP_ORIGIN
- See Also:
- Constant Field Values
-
-
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 classjava.lang.Object
-
-