19 package org.sleuthkit.autopsy.discovery.search;
23 import java.util.ArrayList;
24 import java.util.Collections;
25 import java.util.List;
26 import org.apache.commons.lang.StringUtils;
27 import org.openide.util.NbBundle;
49 private final List<AbstractFile>
instances =
new ArrayList<>();
63 abstractFile.getUniquePath();
64 }
catch (TskCoreException ignored) {
68 instances.add(abstractFile);
69 if (abstractFile.isDirNameFlagSet(TskData.TSK_FS_NAME_FLAG_ENUM.UNALLOC)) {
73 keywordListNames =
new ArrayList<>();
74 hashSetNames =
new ArrayList<>();
75 interestingSetNames =
new ArrayList<>();
76 objectDetectedNames =
new ArrayList<>();
87 if (deleted && !duplicate.isDirNameFlagSet(TskData.TSK_FS_NAME_FLAG_ENUM.UNALLOC)) {
96 duplicate.getUniquePath();
97 }
catch (TskCoreException ignored) {
100 instances.add(duplicate);
140 return Collections.unmodifiableList(instances);
158 if (!keywordListNames.contains(keywordListName)) {
159 keywordListNames.add(keywordListName);
163 Collections.sort(keywordListNames);
172 return Collections.unmodifiableList(keywordListNames);
181 if (!hashSetNames.contains(hashSetName)) {
182 hashSetNames.add(hashSetName);
186 Collections.sort(hashSetNames);
195 return Collections.unmodifiableList(hashSetNames);
204 if (!interestingSetNames.contains(interestingSetName)) {
205 interestingSetNames.add(interestingSetName);
209 Collections.sort(interestingSetNames);
218 return Collections.unmodifiableList(interestingSetNames);
227 if (!objectDetectedNames.contains(objectDetectedName)) {
228 objectDetectedNames.add(objectDetectedName);
232 Collections.sort(objectDetectedNames);
241 return Collections.unmodifiableList(objectDetectedNames);
250 return instances.get(0);
258 + String.join(
",", keywordListNames) +
", " +
getFirstInstance().getMIMEType();
263 if (StringUtils.isBlank(
this.getFirstInstance().getMd5Hash())
264 || HashUtility.isNoDataMd5(
this.getFirstInstance().getMd5Hash())) {
265 return super.hashCode();
276 || StringUtils.isBlank(
this.getFirstInstance().getMd5Hash())
277 || HashUtility.isNoDataMd5(
this.getFirstInstance().getMd5Hash())) {
278 return super.equals(obj);
287 "# {0} - significanceDisplayName",
288 "ResultFile_updateScoreAndDescription_description=Has an {0} analysis result score"
298 this.currentScore = score;
299 String significanceDisplay = score.getSignificance().getDisplayName();
300 this.scoreDescription = Bundle.ResultFile_updateScoreAndDescription_description(significanceDisplay);
312 if (type.getMediaTypes().contains(mimeType)) {
final List< AbstractFile > instances
String getScoreDescription()
void addDuplicate(AbstractFile duplicate)
SearchData.Frequency getFrequency()
ResultFile(AbstractFile abstractFile)
TskData.FileKnown getKnown()
List< String > getKeywordListNames()
List< String > getObjectDetectedNames()
List< String > getInterestingSetNames()
List< AbstractFile > getAllInstances()
void addHashSetName(String hashSetName)
List< String > getHashSetNames()
final List< String > interestingSetNames
AbstractFile getFirstInstance()
SleuthkitCase getSleuthkitCase()
static final Logger logger
void addKeywordListName(String keywordListName)
final List< String > objectDetectedNames
synchronized static Logger getLogger(String name)
static Type fromMIMEtype(String mimeType)
static Case getCurrentCaseThrows()
final List< String > keywordListNames
long getDataSourceObjectId()
void addInterestingSetName(String interestingSetName)
void updateScoreAndDescription(AbstractFile file)
boolean equals(Object obj)
final List< String > hashSetNames
void addObjectDetectedName(String objectDetectedName)