From 6e20d45c8f77604c9d36eafffe76590e21a819d9 Mon Sep 17 00:00:00 2001 From: Brian Sweeney Date: Mon, 23 Apr 2018 15:04:50 -0600 Subject: [PATCH] better comments --- .../AllDataSourcesCommonFilesAlgorithm.java | 2 ++ .../commonfilesearch/CommonFilesMetaDataBuilder.java | 7 +++++++ .../autopsy/commonfilesearch/SingleDataSource.java | 4 +++- 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/Core/src/org/sleuthkit/autopsy/commonfilesearch/AllDataSourcesCommonFilesAlgorithm.java b/Core/src/org/sleuthkit/autopsy/commonfilesearch/AllDataSourcesCommonFilesAlgorithm.java index 9075e03b30..4bc9e6f89a 100644 --- a/Core/src/org/sleuthkit/autopsy/commonfilesearch/AllDataSourcesCommonFilesAlgorithm.java +++ b/Core/src/org/sleuthkit/autopsy/commonfilesearch/AllDataSourcesCommonFilesAlgorithm.java @@ -33,6 +33,8 @@ final class AllDataSourcesCommonFilesAlgorithm extends CommonFilesMetaDataBuilde * sources. * * @param dataSourceIdMap a map of obj_id to datasource name + * @param filterByMediaMimeType match only on files whose mime types can be broadly categorized as media types + * @param filterByDocMimeType match only on files whose mime types can be broadly categorized as document types */ AllDataSourcesCommonFilesAlgorithm(Map dataSourceIdMap, boolean filterByMediaMimeType, boolean filterByDocMimeType) { super(dataSourceIdMap, filterByMediaMimeType, filterByDocMimeType); diff --git a/Core/src/org/sleuthkit/autopsy/commonfilesearch/CommonFilesMetaDataBuilder.java b/Core/src/org/sleuthkit/autopsy/commonfilesearch/CommonFilesMetaDataBuilder.java index 7e7e47cdc5..e4426bf4e5 100644 --- a/Core/src/org/sleuthkit/autopsy/commonfilesearch/CommonFilesMetaDataBuilder.java +++ b/Core/src/org/sleuthkit/autopsy/commonfilesearch/CommonFilesMetaDataBuilder.java @@ -117,6 +117,13 @@ abstract class CommonFilesMetaDataBuilder { "application/vnd.oasis.opendocument.text"//NON-NLS ).collect(Collectors.toSet()); + /** + * Subclass this to implement different algorithms for getting common files. + * + * @param dataSourceIdMap a map of obj_id to datasource name + * @param filterByMediaMimeType match only on files whose mime types can be broadly categorized as media types + * @param filterByDocMimeType match only on files whose mime types can be broadly categorized as document types + */ CommonFilesMetaDataBuilder(Map dataSourceIdMap, boolean filterByMediaMimeType, boolean filterByDocMimeType) { dataSourceIdToNameMap = dataSourceIdMap; filterByMedia = filterByMediaMimeType; diff --git a/Core/src/org/sleuthkit/autopsy/commonfilesearch/SingleDataSource.java b/Core/src/org/sleuthkit/autopsy/commonfilesearch/SingleDataSource.java index 8fe8d2ecfb..6d1a0b6ca6 100644 --- a/Core/src/org/sleuthkit/autopsy/commonfilesearch/SingleDataSource.java +++ b/Core/src/org/sleuthkit/autopsy/commonfilesearch/SingleDataSource.java @@ -36,7 +36,9 @@ final class SingleDataSource extends CommonFilesMetaDataBuilder { * * @param dataSourceId data source id for which common files must appear at * least once - * @param dataSourceIdMap map of obj_id to data source name + * @param dataSourceIdMap a map of obj_id to datasource name + * @param filterByMediaMimeType match only on files whose mime types can be broadly categorized as media types + * @param filterByDocMimeType match only on files whose mime types can be broadly categorized as document types */ SingleDataSource(Long dataSourceId, Map dataSourceIdMap, boolean filterByMediaMimeType, boolean filterByDocMimeType) { super(dataSourceIdMap, filterByMediaMimeType, filterByDocMimeType);