de.folt.models.documentmodel.xliff
Class XliffTranslateThread
java.lang.Object
de.folt.models.documentmodel.xliff.XliffTranslateThread
- All Implemented Interfaces:
- java.lang.Runnable
public class XliffTranslateThread
- extends java.lang.Object
- implements java.lang.Runnable
Class implements a translate operation as a thread. It should be used to parallelize translation tasks.
- Author:
- klemens
|
Constructor Summary |
XliffTranslateThread(DataSource dataSource,
org.jdom.Element file,
java.util.List<org.jdom.Element> transunits,
int iLowerBound,
int iUpperBound,
XliffDocument thisXliff,
java.lang.String sourceLanguage,
java.lang.String targetLanguage,
int matchSimilarity,
java.util.Hashtable<java.lang.String,java.lang.Object> translationParameters)
XliffTranslateThread translates a trans-unit given the source language, target Language and match similarity |
|
Method Summary |
void |
run()
translates a trans-unit given the source language, target Language and match similarity. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
XliffTranslateThread
public XliffTranslateThread(DataSource dataSource,
org.jdom.Element file,
java.util.List<org.jdom.Element> transunits,
int iLowerBound,
int iUpperBound,
XliffDocument thisXliff,
java.lang.String sourceLanguage,
java.lang.String targetLanguage,
int matchSimilarity,
java.util.Hashtable<java.lang.String,java.lang.Object> translationParameters)
throws OpenTMSException
- XliffTranslateThread translates a trans-unit given the source language, target Language and match similarity
- Parameters:
dataSource - the datasource to be usedfile - the file element to translatetransunits - the transunits to translatethisXliff - the basic xliff documentiLowerBound - start the translation process from this elementiUpperBound - stop the translation process with this elementsourceLanguage - the source language to usetargetLanguage - the target language to usematchSimilarity - the similarity (fuzzy) match quality (0 - 100) to usetranslationParameters - the hash table contains parameters which control some parameters, e.g. should header/source/target properties be written to alt-trans
- Throws:
OpenTMSException
run
public void run()
- translates a trans-unit given the source language, target Language and match similarity. The parameters are set when the thread object is created. If the trans-unit contains the attribute
translate="no" the trans-unit no search is applied.
- Specified by:
run in interface java.lang.Runnable
- See Also:
Runnable.run()