19 package org.sleuthkit.autopsy.textextractors;
21 import java.util.Arrays;
22 import java.util.List;
23 import org.openide.util.Lookup;
58 if (content instanceof AbstractFile) {
60 if (extractor.isSupported()) {
64 }
else if (content instanceof BlackboardArtifact) {
65 TextExtractor artifactExtractor =
new ArtifactTextExtractor((BlackboardArtifact) content);
67 return artifactExtractor;
68 }
else if (content instanceof Report) {
69 TextExtractor reportExtractor =
new TikaTextExtractor(content);
71 return reportExtractor;
75 String.format(
"Could not find a suitable reader for "
76 +
"content with name [%s] and id=[%d].",
77 content.getName(), content.getId())
90 private static List<TextExtractor>
getFileExtractors(AbstractFile content, Lookup context) {
91 List<TextExtractor> fileExtractors = Arrays.asList(
93 new HtmlTextExtractor(content),
94 new SqliteTextExtractor(content),
95 new TikaTextExtractor(content));
97 fileExtractors.forEach((fileExtractor) -> {
98 fileExtractor.setExtractionSettings(context);
101 return fileExtractors;
137 StringsTextExtractor stringsInstance =
new StringsTextExtractor(content);
138 stringsInstance.setExtractionSettings(context);
139 return stringsInstance;