Autopsy  4.17.0
Graphical digital forensics platform for The Sleuth Kit and other tools.
Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes | List of all members
org.sleuthkit.autopsy.texttranslation.translators.GoogleTranslator Class Reference

Inherits org.sleuthkit.autopsy.texttranslation.TextTranslator.

Public Member Functions

 GoogleTranslator ()
 
int getMaxTextChars ()
 
String getName ()
 
JPanel getSettingsPanel ()
 
void saveSettings () throws TranslationConfigException
 
String translate (String string) throws TranslationException
 

Private Member Functions

void loadTranslator ()
 

Static Private Member Functions

static boolean googleIsReachable ()
 

Private Attributes

Translate googleTranslate
 
final GoogleTranslatorSettings settings = new GoogleTranslatorSettings()
 
final GoogleTranslatorSettingsPanel settingsPanel
 

Static Private Attributes

static final Logger logger = Logger.getLogger(GoogleTranslator.class.getName())
 
static final int MAX_PAYLOAD_SIZE = 5000
 

Detailed Description

TextTranslator which utilizes Google Cloud Translation to perform translation in Autopsy

Definition at line 48 of file GoogleTranslator.java.

Constructor & Destructor Documentation

org.sleuthkit.autopsy.texttranslation.translators.GoogleTranslator.GoogleTranslator ( )

Constructs a new GoogleTranslator

Definition at line 60 of file GoogleTranslator.java.

Member Function Documentation

int org.sleuthkit.autopsy.texttranslation.translators.GoogleTranslator.getMaxTextChars ( )

Gets the maximum number of characters allowed in a translation request.

Returns
The maximum character count.

Implements org.sleuthkit.autopsy.texttranslation.TextTranslator.

Definition at line 184 of file GoogleTranslator.java.

String org.sleuthkit.autopsy.texttranslation.translators.GoogleTranslator.getName ( )

Get the name of the TextTranslator implementation

Returns
the name of the TextTranslator

Implements org.sleuthkit.autopsy.texttranslation.TextTranslator.

Definition at line 132 of file GoogleTranslator.java.

JPanel org.sleuthkit.autopsy.texttranslation.translators.GoogleTranslator.getSettingsPanel ( )

Get the JPanel to display on the settings options panel when this TextTranslator is selected

Returns
the panel which displays the settings options

Implements org.sleuthkit.autopsy.texttranslation.TextTranslator.

Definition at line 137 of file GoogleTranslator.java.

static boolean org.sleuthkit.autopsy.texttranslation.translators.GoogleTranslator.googleIsReachable ( )
staticprivate

Check if google is able to be reached

Returns
true if it can be, false otherwise

Definition at line 71 of file GoogleTranslator.java.

void org.sleuthkit.autopsy.texttranslation.translators.GoogleTranslator.loadTranslator ( )
private

Load the Google Cloud Translation service given the currently saved settings

Definition at line 145 of file GoogleTranslator.java.

void org.sleuthkit.autopsy.texttranslation.translators.GoogleTranslator.saveSettings ( ) throws TranslationConfigException

Saves the current state of the settings in the settings panel.

Exceptions
TranslationConfigException

Implements org.sleuthkit.autopsy.texttranslation.TextTranslator.

Definition at line 176 of file GoogleTranslator.java.

String org.sleuthkit.autopsy.texttranslation.translators.GoogleTranslator.translate ( String  input) throws TranslationException

Translates a provided string

Parameters
inputthe String to translate
Returns
the translated String
Exceptions
TranslationException

Implements org.sleuthkit.autopsy.texttranslation.TextTranslator.

Definition at line 87 of file GoogleTranslator.java.

References org.sleuthkit.autopsy.coreutils.EscapeUtil.unEscapeHtml().

Member Data Documentation

Translate org.sleuthkit.autopsy.texttranslation.translators.GoogleTranslator.googleTranslate
private

Definition at line 55 of file GoogleTranslator.java.

final Logger org.sleuthkit.autopsy.texttranslation.translators.GoogleTranslator.logger = Logger.getLogger(GoogleTranslator.class.getName())
staticprivate

Definition at line 50 of file GoogleTranslator.java.

final int org.sleuthkit.autopsy.texttranslation.translators.GoogleTranslator.MAX_PAYLOAD_SIZE = 5000
staticprivate

Definition at line 52 of file GoogleTranslator.java.

final GoogleTranslatorSettings org.sleuthkit.autopsy.texttranslation.translators.GoogleTranslator.settings = new GoogleTranslatorSettings()
private

Definition at line 54 of file GoogleTranslator.java.

final GoogleTranslatorSettingsPanel org.sleuthkit.autopsy.texttranslation.translators.GoogleTranslator.settingsPanel
private

Definition at line 53 of file GoogleTranslator.java.


The documentation for this class was generated from the following file:

Copyright © 2012-2021 Basis Technology. Generated on: Tue Jan 19 2021
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.