From 5959ef0ed63e2a693c8a9fe51390fa09c2b7aba8 Mon Sep 17 00:00:00 2001 From: Ann Priestman Date: Tue, 8 Nov 2016 08:56:38 -0500 Subject: [PATCH] No longer store mime type in the gen info artifact --- .../modules/filetypeid/FileTypeDetector.java | 12 ---------- .../filetypeid/TikaFileTypeDetector.java | 24 ------------------- 2 files changed, 36 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/modules/filetypeid/FileTypeDetector.java b/Core/src/org/sleuthkit/autopsy/modules/filetypeid/FileTypeDetector.java index 3adc8cfb6a..b0f95c93fa 100644 --- a/Core/src/org/sleuthkit/autopsy/modules/filetypeid/FileTypeDetector.java +++ b/Core/src/org/sleuthkit/autopsy/modules/filetypeid/FileTypeDetector.java @@ -283,18 +283,6 @@ public class FileTypeDetector { * Add the MIME type to the files table in the case database. */ Case.getCurrentCase().getSleuthkitCase().setFileMIMEType(file, mimeType); - - /* - * Post to the blackboard, adding the file type attribute to the - * general info artifact. A property change is not fired for this - * posting because general info artifacts are different from other - * artifacts, e.g., they are not displayed in the results tree. - */ - - BlackboardArtifact getInfoArt = file.getGenInfoArtifact(); - @SuppressWarnings("deprecation") - BlackboardAttribute batt = new BlackboardAttribute(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_FILE_TYPE_SIG, FileTypeIdModuleFactory.getModuleName(), mimeType); - getInfoArt.addAttribute(batt); } return mimeType; diff --git a/Core/src/org/sleuthkit/autopsy/modules/filetypeid/TikaFileTypeDetector.java b/Core/src/org/sleuthkit/autopsy/modules/filetypeid/TikaFileTypeDetector.java index fd5b100e54..e8bd4ab29b 100644 --- a/Core/src/org/sleuthkit/autopsy/modules/filetypeid/TikaFileTypeDetector.java +++ b/Core/src/org/sleuthkit/autopsy/modules/filetypeid/TikaFileTypeDetector.java @@ -39,30 +39,6 @@ public class TikaFileTypeDetector { private final int BUFFER_SIZE = 64 * 1024; //how many bytes to pass in private final byte buffer[] = new byte[BUFFER_SIZE]; - /** - * Detect the mime type of the passed in file and save it to the blackboard - * - * @param abstractFile - * - * @return mime type or null - * - * @throws TskCoreException - * @deprecated Use FileTypeDetector.detectAndPostToBlackboard(AbstractFile - * file) instead. - */ - @Deprecated - public synchronized String detectAndSave(AbstractFile abstractFile) throws TskCoreException { - String mimeType = detect(abstractFile); - if (mimeType != null) { - // add artifact - BlackboardArtifact getInfoArt = abstractFile.getGenInfoArtifact(); - BlackboardAttribute batt = new BlackboardAttribute(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_FILE_TYPE_SIG.getTypeID(), FileTypeIdModuleFactory.getModuleName(), mimeType); - getInfoArt.addAttribute(batt); - - // we don't fire the event because we just updated TSK_GEN_INFO, which isn't displayed in the tree and is vague. - } - return mimeType; - } /** * Detect the mime type of the passed in file