Package com.iizix.translate
Class Translation
java.lang.Object
com.iizix.translate.Translation
Translation class holding the information processed by the translation engine.
- Author:
- Christopher Mindus
- Field SummaryFieldsModifier and TypeFieldDescription- final ThrowableException for failure, null otherwise.- final StringThe original language ID.- final StringThe original text as passed in to the translator.- final KStringThe KString as the source text.- final booleanSuccess flag: the members translatedText, translationLangID can be used (not null).- final StringThe translated text, null for failure.- final StringThe translation language ID.- final ITranslatorThe translator that provided the translation.
- Constructor SummaryConstructorsConstructorDescription- Translation- (ITranslator translator, KString sourceText, String originalText, String originalLangID, String translatedText, String translationLangID) Constructs the successful Translation.- Translation- (ITranslator translator, KString sourceText, String originalText, String originalLangID, String translationLangID, Throwable exception) Constructs the failed Translation, only from the engine itself.
- Method SummaryModifier and TypeMethodDescriptionGets the name of the translator.- toString()The string representation of this class.
- Field Details- originalTextThe original text as passed in to the translator.
- originalLangIDThe original language ID. If no language is set on translation request, this member will contain what the Translator detected as language. This member may be null when the translation failed.
- translatedTextThe translated text, null for failure.
- translationLangIDThe translation language ID.
- sourceTextThe KString as the source text.
- translatorThe translator that provided the translation.
- successpublic final boolean successSuccess flag: the members translatedText, translationLangID can be used (not null).
- exceptionException for failure, null otherwise.
 
- Constructor Details- Translationpublic Translation- (ITranslator translator, KString sourceText, String originalText, String originalLangID, String translatedText, String translationLangID) Constructs the successful Translation.- Parameters:
- translator- The translator.
- sourceText- The KString source text.
- originalText- The original text as passed in to the translator.
- originalLangID- The original language. If no language is set on translation request, this member will contain what the translation engine detected as language.
- translatedText- The translated text.
- translationLangID- The translation language.
 
- Translationpublic Translation- (ITranslator translator, KString sourceText, String originalText, String originalLangID, String translationLangID, Throwable exception) Constructs the failed Translation, only from the engine itself.- Parameters:
- translator- The translator.
- sourceText- The KString source text.
- originalText- The original text as passed in to the translator.
- originalLangID- The original language. If no language is set on translation request, this member will contain what the translation engine detected as language, null if this failed.
- translationLangID- The translation language.
- exception- The exception.
 
 
- Method Details