Autopsy  4.6.0
Graphical digital forensics platform for The Sleuth Kit and other tools.
AllDataSourcesCommonFilesAlgorithm.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.util.Map;
23 
27 final class AllDataSourcesCommonFilesAlgorithm extends CommonFilesMetadataBuilder {
28 
29  private static final String WHERE_CLAUSE = "%s md5 in (select md5 from tsk_files where (known != 1 OR known IS NULL)%s GROUP BY md5 HAVING COUNT(*) > 1) order by md5"; //NON-NLS
30 
39  AllDataSourcesCommonFilesAlgorithm(Map<Long, String> dataSourceIdMap, boolean filterByMediaMimeType, boolean filterByDocMimeType) {
40  super(dataSourceIdMap, filterByMediaMimeType, filterByDocMimeType);
41 
42  }
43 
44  @Override
45  protected String buildSqlSelectStatement() {
46  Object[] args = new String[]{SELECT_PREFIX, determineMimeTypeFilter()};
47  return String.format(WHERE_CLAUSE, args);
48  }
49 
50  @Override
51  protected String buildTabTitle() {
52  final String buildCategorySelectionString = this.buildCategorySelectionString();
53  final String titleTemplate = Bundle.CommonFilesMetadataBuilder_buildTabTitle_titleAll();
54  return String.format(titleTemplate, new Object[]{buildCategorySelectionString});
55  }
56 }

Copyright © 2012-2016 Basis Technology. Generated on: Mon May 7 2018
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.