Autopsy  4.8.0
Graphical digital forensics platform for The Sleuth Kit and other tools.
SingleInterCaseCommonAttributeSearcher.java
Go to the documentation of this file.
1 /*
2  *
3  * Autopsy Forensic Browser
4  *
5  * Copyright 2018 Basis Technology Corp.
6  * Contact: carrier <at> sleuthkit <dot> org
7  *
8  * Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  *
12  * http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  */
20 package org.sleuthkit.autopsy.commonfilesearch;
21 
22 import java.sql.SQLException;
23 import java.util.Map;
24 import org.openide.util.NbBundle;
29 import org.sleuthkit.datamodel.TskCoreException;
31 
36 public class SingleInterCaseCommonAttributeSearcher extends InterCaseCommonAttributeSearcher {
37 
38  private final int corrleationCaseId;
39  private String correlationCaseName;
40 
51  public SingleInterCaseCommonAttributeSearcher(int correlationCaseId, boolean filterByMediaMimeType,
52  boolean filterByDocMimeType, Type corAttrType, int percentageThreshold) throws EamDbException {
53  super(filterByMediaMimeType, filterByDocMimeType, corAttrType, percentageThreshold);
54 
55  this.corrleationCaseId = correlationCaseId;
56  this.correlationCaseName = "";
57  }
58 
70  @Override
71  public CommonAttributeSearchResults findMatches() throws TskCoreException, NoCurrentCaseException, SQLException, EamDbException {
72 
73  CorrelationCase cCase = this.getCorrelationCaseFromId(this.corrleationCaseId);
74  this.correlationCaseName = cCase.getDisplayName();
75  return this.findFiles(cCase);
76  }
77 
78  CommonAttributeSearchResults findFiles(CorrelationCase correlationCase) throws TskCoreException, NoCurrentCaseException, SQLException, EamDbException {
79  InterCaseSearchResultsProcessor eamDbAttrInst = new InterCaseSearchResultsProcessor(this.corAttrType);
80  Map<Integer, CommonAttributeValueList> interCaseCommonFiles = eamDbAttrInst.findSingleInterCaseCommonAttributeValues(Case.getCurrentCase(), correlationCase);
81 
82  return new CommonAttributeSearchResults(interCaseCommonFiles, this.frequencyPercentageThreshold, this.corAttrType);
83  }
84 
85  @NbBundle.Messages({
86  "# {0} - case name",
87  "# {1} - attr type",
88  "# {2} - threshold string",
89  "SingleInterCaseCommonAttributeSearcher.buildTabTitle.titleInterSingle=Common Properties (Central Repository Case: {0}, {1}{2})"})
90 
91  @Override
92  String getTabTitle() {
93  return Bundle.SingleInterCaseCommonAttributeSearcher_buildTabTitle_titleInterSingle(this.correlationCaseName, this.corAttrType.getDisplayName(), this.getPercentThresholdString());
94  }
95 }
SingleInterCaseCommonAttributeSearcher(int correlationCaseId, boolean filterByMediaMimeType, boolean filterByDocMimeType, Type corAttrType, int percentageThreshold)

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