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

Public Member Functions

synchronized int getMaxTextChars ()
 
synchronized boolean hasProvider ()
 
synchronized String translate (String input) throws NoServiceProviderException, TranslationException
 

Static Public Member Functions

static TextTranslationService getInstance ()
 

Private Member Functions

 TextTranslationService ()
 

Private Attributes

Optional< TextTranslatorselectedTranslator
 
final Collection<?extends TextTranslatortranslators
 

Static Private Attributes

static final TextTranslationService tts = new TextTranslationService()
 

Detailed Description

Performs a lookup for a TextTranslator service provider and if present, will use this provider to run translation on the input.

Definition at line 32 of file TextTranslationService.java.

Constructor & Destructor Documentation

org.sleuthkit.autopsy.texttranslation.TextTranslationService.TextTranslationService ( )
private

Definition at line 40 of file TextTranslationService.java.

Member Function Documentation

static TextTranslationService org.sleuthkit.autopsy.texttranslation.TextTranslationService.getInstance ( )
static
synchronized int org.sleuthkit.autopsy.texttranslation.TextTranslationService.getMaxTextChars ( )

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

Returns
The maximum character count.

Definition at line 131 of file TextTranslationService.java.

References org.sleuthkit.autopsy.texttranslation.TextTranslationService.selectedTranslator.

Referenced by org.sleuthkit.autopsy.texttranslation.ui.TranslatedTextViewer.setNode().

synchronized boolean org.sleuthkit.autopsy.texttranslation.TextTranslationService.hasProvider ( )
synchronized String org.sleuthkit.autopsy.texttranslation.TextTranslationService.translate ( String  input) throws NoServiceProviderException, TranslationException

Translates the input string using whichever TextTranslator Service Provider was found during lookup.

Parameters
inputInput string to be translated
Returns
Translation string
Exceptions
NoServiceProviderExceptionFailed to find a Translation service provider
TranslationExceptionSystem exception for classes to use when specific translation implementations fail

Definition at line 80 of file TextTranslationService.java.

References org.sleuthkit.autopsy.texttranslation.TextTranslationService.hasProvider(), and org.sleuthkit.autopsy.texttranslation.TextTranslationService.selectedTranslator.

Referenced by org.sleuthkit.autopsy.datasourcesummary.datamodel.UserActivitySummary.getTranslationOrNull(), org.sleuthkit.autopsy.contentviewers.TranslatablePanel.retrieveTranslation(), org.sleuthkit.autopsy.texttranslation.utils.FileNameTranslationUtil.translate(), and org.sleuthkit.autopsy.texttranslation.ui.TranslateTextTask.translate().

Member Data Documentation

Optional<TextTranslator> org.sleuthkit.autopsy.texttranslation.TextTranslationService.selectedTranslator
private
final Collection<? extends TextTranslator> org.sleuthkit.autopsy.texttranslation.TextTranslationService.translators
private

Definition at line 36 of file TextTranslationService.java.

final TextTranslationService org.sleuthkit.autopsy.texttranslation.TextTranslationService.tts = new TextTranslationService()
staticprivate

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

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