Class LanguageTranslation.Translation
- java.lang.Object
-
- rocks.xmpp.extensions.langtrans.model.LanguageTranslation.Translation
-
- Enclosing class:
- LanguageTranslation
public static final class LanguageTranslation.Translation extends Object
The translation element.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static LanguageTranslation.TranslationforDestinationLanguage(Locale destinationLanguage)Creates a translation element for a destination language.LocalegetDestinationLanguage()Gets the destination language.StringgetDictionary()Gets the dictionary.StringgetEngine()Gets the engine.LocalegetSourceLanguage()Gets the source language.StringgetTranslatedText()Gets the translated text.booleanisReviewed()Indicates whether the translation has been reviewed.LanguageTranslation.TranslationwithDictionary(String dictionary)Sets the dictionary.LanguageTranslation.TranslationwithEngine(String engine)Sets the engine.LanguageTranslation.TranslationwithReviewed(boolean reviewed)Indicates that the translation has been reviewed by a human.LanguageTranslation.TranslationwithSourceLanguage(Locale sourceLanguage)Sets the source language.LanguageTranslation.TranslationwithTranslatedText(String text)Sets the translated text.
-
-
-
Method Detail
-
forDestinationLanguage
public static LanguageTranslation.Translation forDestinationLanguage(Locale destinationLanguage)
Creates a translation element for a destination language.- Parameters:
destinationLanguage- The destination language.- Returns:
- The translation element.
-
withSourceLanguage
public LanguageTranslation.Translation withSourceLanguage(Locale sourceLanguage)
Sets the source language.- Parameters:
sourceLanguage- The source language.- Returns:
- A new translation.
-
withEngine
public LanguageTranslation.Translation withEngine(String engine)
Sets the engine.- Parameters:
engine- The engine.- Returns:
- A new translation.
-
withDictionary
public LanguageTranslation.Translation withDictionary(String dictionary)
Sets the dictionary.- Parameters:
dictionary- The dictionary.- Returns:
- A new translation.
-
withReviewed
public LanguageTranslation.Translation withReviewed(boolean reviewed)
Indicates that the translation has been reviewed by a human.- Parameters:
reviewed- If the translation has been reviewed.- Returns:
- A new translation.
-
withTranslatedText
public LanguageTranslation.Translation withTranslatedText(String text)
Sets the translated text.- Parameters:
text- The text.- Returns:
- A new translation.
-
getDestinationLanguage
public final Locale getDestinationLanguage()
Gets the destination language.- Returns:
- The destination language.
-
getSourceLanguage
public final Locale getSourceLanguage()
Gets the source language.- Returns:
- The source language.
-
getEngine
public final String getEngine()
Gets the engine.- Returns:
- The engine.
-
getTranslatedText
public final String getTranslatedText()
Gets the translated text.- Returns:
- The translated text.
-
getDictionary
public final String getDictionary()
Gets the dictionary.- Returns:
- The dictionary.
-
isReviewed
public final boolean isReviewed()
Indicates whether the translation has been reviewed.- Returns:
- If it has been reviewed.
-
-