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.Translation
forDestinationLanguage(Locale destinationLanguage)
Creates a translation element for a destination language.Locale
getDestinationLanguage()
Gets the destination language.String
getDictionary()
Gets the dictionary.String
getEngine()
Gets the engine.Locale
getSourceLanguage()
Gets the source language.String
getTranslatedText()
Gets the translated text.boolean
isReviewed()
Indicates whether the translation has been reviewed.LanguageTranslation.Translation
withDictionary(String dictionary)
Sets the dictionary.LanguageTranslation.Translation
withEngine(String engine)
Sets the engine.LanguageTranslation.Translation
withReviewed(boolean reviewed)
Indicates that the translation has been reviewed by a human.LanguageTranslation.Translation
withSourceLanguage(Locale sourceLanguage)
Sets the source language.LanguageTranslation.Translation
withTranslatedText(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.
-
-