|
Autopsy
4.21.0
Graphical digital forensics platform for The Sleuth Kit and other tools.
|
Inherits org.sleuthkit.autopsy.texttranslation.ui.TranslateTextTask.
Public Member Functions | |
| TranslateResult | doInBackground () throws InterruptedException |
| void | done () |
Protected Member Functions | |
| void | onErrorDisplay (String text, ComponentOrientation orientation, int font) |
| void | onProgressDisplay (String text, ComponentOrientation orientation, int font) |
| void | onTextDisplay (String text, ComponentOrientation orientation, int font) |
| String | retrieveText () throws IOException, InterruptedException, IllegalStateException |
| String | translate (String input) throws NoServiceProviderException, TranslationException |
Private Member Functions | |
| ExtractAndTranslateTextTask (AbstractFile file, boolean translateText) | |
| String | extractText (AbstractFile source, boolean ocrEnabled) throws IOException, InterruptedException, TextExtractor.InitReaderException |
| String | getFileText (AbstractFile file) throws IOException, InterruptedException, TextExtractor.InitReaderException |
| Reader | getTextExtractor (AbstractFile file, boolean ocrEnabled) throws IOException, TextExtractor.InitReaderException |
Private Attributes | |
| final AbstractFile | file |
Extracts text from a file and optionally translates it.
Definition at line 150 of file TranslatedTextViewer.java.
|
private |
Definition at line 154 of file TranslatedTextViewer.java.
References org::sleuthkit::datamodel::AbstractContent.getId(), and org::sleuthkit::datamodel::AbstractContent.getName().
|
inherited |
Definition at line 142 of file TranslateTextTask.java.
References org.sleuthkit.autopsy.texttranslation.ui.TranslateTextTask.TranslateResult.error(), org.sleuthkit.autopsy.texttranslation.ui.TranslateTextTask.retrieveText(), org.sleuthkit.autopsy.texttranslation.ui.TranslateTextTask.TranslateResult.success(), and org.sleuthkit.autopsy.texttranslation.ui.TranslateTextTask.translateRetrievedText().
|
inherited |
Definition at line 203 of file TranslateTextTask.java.
References org.sleuthkit.autopsy.texttranslation.ui.TranslateTextTask.TranslateResult.getErrorMessage(), org.sleuthkit.autopsy.texttranslation.ui.TranslateTextTask.TranslateResult.getResult(), org.sleuthkit.autopsy.coreutils.TextUtil.getTextDirection(), org.sleuthkit.autopsy.texttranslation.ui.TranslateTextTask.TranslateResult.isSuccessful(), org.sleuthkit.autopsy.texttranslation.ui.TranslateTextTask.onErrorDisplay(), and org.sleuthkit.autopsy.texttranslation.ui.TranslateTextTask.onTextDisplay().
|
private |
Fetches text from a file.
| source | the AbstractFile source to get a Reader for |
| ocrEnabled | true if OCR is enabled false otherwise |
| IOException | |
| InterruptedException | |
| org.sleuthkit.autopsy.textextractors.TextExtractor.InitReaderException |
Definition at line 228 of file TranslatedTextViewer.java.
|
private |
Extracts text from the given node
| file | Selected node in UI |
| IOException | |
| InterruptedException | |
| org.sleuthkit.autopsy.textextractors.TextExtractor.InitReaderException |
Definition at line 200 of file TranslatedTextViewer.java.
References org::sleuthkit::datamodel::AbstractFile.getMIMEType(), and org.sleuthkit.autopsy.core.UserPreferences.getUseOcrInTranslation().
|
private |
Fetches the appropriate reader for the given file mimetype and configures it to use OCR.
| file | File to be read |
| ocrEnabled | Determines if the extractor should be configured for OCR |
| IOException | |
| NoTextReaderFound |
Definition at line 273 of file TranslatedTextViewer.java.
References org.sleuthkit.autopsy.textextractors.TextExtractorFactory.getExtractor(), org.sleuthkit.autopsy.textextractors.TextExtractor.getReader(), org.sleuthkit.autopsy.textextractors.TextExtractorFactory.getStringsExtractor(), org.sleuthkit.autopsy.textextractors.configs.ImageConfig.setOCREnabled(), and org.sleuthkit.autopsy.textextractors.configs.ImageConfig.setOCRLanguages().
|
protectedinherited |
When an error result is received, this method is called. This method can be overridden depending on the scenario but defaults to just displaying using onTextDisplay.
| text | the text of the error |
| orientation | the orientation for the error |
| font | the font style of the error |
Definition at line 130 of file TranslateTextTask.java.
References org.sleuthkit.autopsy.texttranslation.ui.TranslateTextTask.onTextDisplay().
Referenced by org.sleuthkit.autopsy.texttranslation.ui.TranslateTextTask.done().
|
protectedinherited |
When a progress result is received, this method is called. This method can be overridden depending on the scenario, but defaults to just displaying using onTextDisplay.
| text | the text of the status update |
| orientation | the orientation for the status |
| font | the font style of the status |
Definition at line 118 of file TranslateTextTask.java.
References org.sleuthkit.autopsy.texttranslation.ui.TranslateTextTask.onTextDisplay().
Referenced by org.sleuthkit.autopsy.texttranslation.ui.TranslateTextTask.translateRetrievedText().
|
protected |
Definition at line 302 of file TranslatedTextViewer.java.
References org.sleuthkit.autopsy.texttranslation.ui.TranslationContentPanel.display().
|
protected |
Extracts text from the current node
| Exception |
Definition at line 170 of file TranslatedTextViewer.java.
References org::sleuthkit::datamodel::AbstractContent.getId(), and org::sleuthkit::datamodel::AbstractContent.getName().
|
protectedinherited |
This method passes the translation off to the translation service provider.
| input | text to be translated |
Definition at line 238 of file TranslateTextTask.java.
References org.sleuthkit.autopsy.texttranslation.TextTranslationService.getInstance(), and org.sleuthkit.autopsy.texttranslation.TextTranslationService.translate().
Referenced by org.sleuthkit.autopsy.texttranslation.ui.TranslateTextTask.translateRetrievedText().
|
private |
Definition at line 152 of file TranslatedTextViewer.java.
Copyright © 2012-2024 Sleuth Kit Labs. Generated on: Mon Mar 17 2025
This work is licensed under a
Creative Commons Attribution-Share Alike 3.0 United States License.