From 06256b225ba16c7b62c10c79d08c81aa5ffd2a3c Mon Sep 17 00:00:00 2001 From: adam-m Date: Tue, 22 Jan 2013 23:27:54 -0500 Subject: [PATCH 1/7] installer build: append version number --- build-windows.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build-windows.xml b/build-windows.xml index 9b053f04bd..6447a5741b 100644 --- a/build-windows.xml +++ b/build-windows.xml @@ -160,8 +160,9 @@ - + + From 270c30ed3a930d8bb42d6df872db6bc26b88980c Mon Sep 17 00:00:00 2001 From: adam-m Date: Wed, 23 Jan 2013 11:16:27 -0500 Subject: [PATCH 2/7] - merge bookmarks under tags node, but with a different icon - rename tag and bookmark actions to add "Source" to them - add Source File Path as a new node property for tags and bookmarks --- .../org/sleuthkit/autopsy/datamodel/Tags.java | 67 +++++++++++++------ .../autopsy/directorytree/TagFileAction.java | 10 +-- .../directorytree/TagResultAction.java | 10 +-- 3 files changed, 58 insertions(+), 29 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/Tags.java b/Core/src/org/sleuthkit/autopsy/datamodel/Tags.java index efca3a20bb..4e6b10c264 100644 --- a/Core/src/org/sleuthkit/autopsy/datamodel/Tags.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/Tags.java @@ -33,6 +33,7 @@ import org.openide.nodes.ChildFactory; import org.openide.nodes.Children; import org.openide.nodes.Node; import org.openide.nodes.Sheet; +import org.openide.util.Exceptions; import org.openide.util.Lookup; import org.openide.util.lookup.Lookups; import org.sleuthkit.autopsy.casemodule.Case; @@ -62,8 +63,10 @@ public class Tags implements AutopsyVisitableItem { private SleuthkitCase skCase; public static final String NAME = "Tags"; private static final String TAG_ICON_PATH = "org/sleuthkit/autopsy/images/tag-folder-blue-icon-16.png"; + //bookmarks are specializations of tags + public static final String BOOKMARK_TAG_NAME = "Bookmark"; + private static final String BOOKMARK_ICON_PATH = "org/sleuthkit/autopsy/images/star-bookmark-icon-16.png"; private Map>> tags; - private static final String EMPTY_COMMENT = ""; Tags(SleuthkitCase skCase) { @@ -105,9 +108,7 @@ public class Tags implements AutopsyVisitableItem { for (BlackboardAttribute attribute : artifact.getAttributes()) { if (attribute.getAttributeTypeID() == ATTRIBUTE_TYPE.TSK_TAG_NAME.getTypeID()) { String tagName = attribute.getValueString(); - if (tagName.equals(Bookmarks.BOOKMARK_TAG_NAME)) { - break; // Don't add bookmarks - } else if (artTags.containsKey(tagName)) { + if (artTags.containsKey(tagName)) { List artifacts = artTags.get(tagName); artifacts.add(artifact); } else { @@ -263,12 +264,16 @@ public class Tags implements AutopsyVisitableItem { public class TagNodeRoot extends DisplayableItemNode { TagNodeRoot(BlackboardArtifact.ARTIFACT_TYPE tagType, String tagName, List artifacts) { - super(Children.create(new Tags.TagsChildrenNode(tagType, artifacts), true), Lookups.singleton(tagName)); + super(Children.create(new Tags.TagsChildrenNode(tagType, tagName, artifacts), true), Lookups.singleton(tagName)); super.setName(tagName); super.setDisplayName(tagName + " (" + artifacts.size() + ")"); - this.setIconBaseWithExtension(TAG_ICON_PATH); + if (tagName.equals(BOOKMARK_TAG_NAME)) { + this.setIconBaseWithExtension(BOOKMARK_ICON_PATH); + } else { + this.setIconBaseWithExtension(TAG_ICON_PATH); + } } @Override @@ -312,10 +317,12 @@ public class Tags implements AutopsyVisitableItem { private List artifacts; private BlackboardArtifact.ARTIFACT_TYPE tagType; + private String tagName; - private TagsChildrenNode(BlackboardArtifact.ARTIFACT_TYPE tagType, List artifacts) { + private TagsChildrenNode(BlackboardArtifact.ARTIFACT_TYPE tagType, String tagName, List artifacts) { super(); this.tagType = tagType; + this.tagName = tagName; this.artifacts = artifacts; } @@ -330,13 +337,20 @@ public class Tags implements AutopsyVisitableItem { //create node with action BlackboardArtifactNode tagNode = null; + String iconPath; + if (tagName.equals(BOOKMARK_TAG_NAME)) { + iconPath = BOOKMARK_ICON_PATH; + } else { + iconPath = TAG_ICON_PATH; + } + //create actions here where Tag logic belongs //instead of DataResultFilterNode w/visitors, which is much less pluggable and cluttered if (tagType.equals(BlackboardArtifact.ARTIFACT_TYPE.TSK_TAG_ARTIFACT)) { //in case of result tag, add a action by sublcassing bb art node //this action will be merged with other actions set DataResultFIlterNode //otherwise in case of - tagNode = new BlackboardArtifactNode(artifact, TAG_ICON_PATH) { + tagNode = new BlackboardArtifactNode(artifact, iconPath) { @Override public Action[] getActions(boolean bln) { //Action [] actions = super.getActions(bln); //To change body of generated methods, choose Tools | Templates. @@ -357,13 +371,13 @@ public class Tags implements AutopsyVisitableItem { }; } else { //for file tag, don't subclass to add the additional actions - tagNode = new BlackboardArtifactNode(artifact, TAG_ICON_PATH); + tagNode = new BlackboardArtifactNode(artifact, iconPath); } + //add some additional node properties int artifactTypeID = artifact.getArtifactTypeID(); + final String NO_DESCR = "no description"; if (artifactTypeID == BlackboardArtifact.ARTIFACT_TYPE.TSK_TAG_ARTIFACT.getTypeID()) { - final String NO_DESCR = "no description"; - BlackboardArtifact sourceResult = Tags.getArtifactFromTag(artifact.getArtifactID()); String resultType = sourceResult.getDisplayName(); @@ -376,6 +390,21 @@ public class Tags implements AutopsyVisitableItem { tagNode.addNodeProperty(resultTypeProp); } + try { + //add source path property + final AbstractFile sourceFile = skCase.getAbstractFileById(artifact.getObjectID()); + final String sourcePath = sourceFile.getUniquePath(); + NodeProperty sourcePathProp = new NodeProperty("Source File Path", + "Source File Path", + NO_DESCR, + sourcePath); + + + tagNode.addNodeProperty(sourcePathProp); + } catch (TskCoreException ex) { + logger.log(Level.SEVERE, "Error getting a file from artifact to get source file path for a tag, ", ex); + } + return tagNode; } } @@ -396,10 +425,10 @@ public class Tags implements AutopsyVisitableItem { BlackboardAttribute attr1 = new BlackboardAttribute(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_TAG_NAME.getTypeID(), "", tagName); attrs.add(attr1); - - if (comment != null && ! comment.isEmpty()) { + + if (comment != null && !comment.isEmpty()) { BlackboardAttribute attr2 = new BlackboardAttribute(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_COMMENT.getTypeID(), - "", comment); + "", comment); attrs.add(attr2); } bookArt.addAttributes(attrs); @@ -427,17 +456,17 @@ public class Tags implements AutopsyVisitableItem { BlackboardAttribute attr1 = new BlackboardAttribute(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_TAG_NAME.getTypeID(), "", tagName); - - if (comment != null && ! comment.isEmpty()) { + + if (comment != null && !comment.isEmpty()) { BlackboardAttribute attr2 = new BlackboardAttribute(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_COMMENT.getTypeID(), - "", comment); + "", comment); attrs.add(attr2); } - + BlackboardAttribute attr3 = new BlackboardAttribute(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_TAGGED_ARTIFACT.getTypeID(), "", artifact.getArtifactID()); attrs.add(attr1); - + attrs.add(attr3); bookArt.addAttributes(attrs); } catch (TskCoreException ex) { diff --git a/Core/src/org/sleuthkit/autopsy/directorytree/TagFileAction.java b/Core/src/org/sleuthkit/autopsy/directorytree/TagFileAction.java index 3674c1ae58..16009cba73 100644 --- a/Core/src/org/sleuthkit/autopsy/directorytree/TagFileAction.java +++ b/Core/src/org/sleuthkit/autopsy/directorytree/TagFileAction.java @@ -71,13 +71,13 @@ public class TagFileAction extends AbstractAction implements Presenter.Popup { @Override public JMenuItem getPopupPresenter() { - JMenu result = new JMenu("Tag File"); + JMenu result = new JMenu("Tag Source File"); - JMenuItem contentItem = new JMenuItem("Bookmark File"); + JMenuItem contentItem = new JMenuItem("Bookmark Source File"); contentItem.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { - final TagDialog tagDialog = new TagDialog(TagDialog.Type.BOOKMARK, "Bookmark File", null, "Bookmark", false); + final TagDialog tagDialog = new TagDialog(TagDialog.Type.BOOKMARK, "Bookmark Source File", null, "Bookmark", false); tagDialog.setVisible(true); TagDialogResult inputResult = tagDialog.getResult(); if (inputResult.isAccept()) { @@ -96,7 +96,7 @@ public class TagFileAction extends AbstractAction implements Presenter.Popup { String newTagName = new CreateTagDialog(new JFrame(), true).display(); if (newTagName != null) { //get comment - final TagDialog tagDialog = new TagDialog(TagDialog.Type.TAG, "Tag File", null, newTagName, false); + final TagDialog tagDialog = new TagDialog(TagDialog.Type.TAG, "Tag Source File", null, newTagName, false); tagDialog.setVisible(true); TagDialogResult inputResult = tagDialog.getResult(); if (inputResult.isAccept()) { @@ -123,7 +123,7 @@ public class TagFileAction extends AbstractAction implements Presenter.Popup { tagItem.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { - final TagDialog tagDialog = new TagDialog(TagDialog.Type.TAG, "Tag File", tagNames, tagName, true); + final TagDialog tagDialog = new TagDialog(TagDialog.Type.TAG, "Tag Source File", tagNames, tagName, true); tagDialog.setVisible(true); TagDialogResult inputResult = tagDialog.getResult(); if (inputResult.isAccept()) { diff --git a/Core/src/org/sleuthkit/autopsy/directorytree/TagResultAction.java b/Core/src/org/sleuthkit/autopsy/directorytree/TagResultAction.java index 0fa04dbefe..23a22ef9a0 100644 --- a/Core/src/org/sleuthkit/autopsy/directorytree/TagResultAction.java +++ b/Core/src/org/sleuthkit/autopsy/directorytree/TagResultAction.java @@ -58,13 +58,13 @@ public class TagResultAction extends AbstractAction implements Presenter.Popup { @Override public JMenuItem getPopupPresenter() { - JMenu result = new JMenu("Tag Result"); + JMenu result = new JMenu("Tag Source Result"); - JMenuItem contentItem = new JMenuItem("Bookmark Result"); + JMenuItem contentItem = new JMenuItem("Bookmark Source Result"); contentItem.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { - final TagDialog tagDialog = new TagDialog(TagDialog.Type.BOOKMARK, "Bookmark Result", null, "Bookmark", false); + final TagDialog tagDialog = new TagDialog(TagDialog.Type.BOOKMARK, "Bookmark Source Result", null, "Bookmark", false); tagDialog.setVisible(true); TagDialog.TagDialogResult inputResult = tagDialog.getResult(); if (inputResult.isAccept()) { @@ -83,7 +83,7 @@ public class TagResultAction extends AbstractAction implements Presenter.Popup { String newTagName = new CreateTagDialog(new JFrame(), true).display(); if (newTagName != null) { //get comment and create tag - final TagDialog tagDialog = new TagDialog(TagDialog.Type.TAG, "Tag Result", null, newTagName, false); + final TagDialog tagDialog = new TagDialog(TagDialog.Type.TAG, "Tag Source Result", null, newTagName, false); tagDialog.setVisible(true); TagDialog.TagDialogResult inputResult = tagDialog.getResult(); if (inputResult.isAccept()) { @@ -111,7 +111,7 @@ public class TagResultAction extends AbstractAction implements Presenter.Popup { tagItem.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { - final TagDialog tagDialog = new TagDialog(TagDialog.Type.TAG, "Tag Result", tagNames, tagName, true); + final TagDialog tagDialog = new TagDialog(TagDialog.Type.TAG, "Tag Source Result", tagNames, tagName, true); tagDialog.setVisible(true); TagDialog.TagDialogResult inputResult = tagDialog.getResult(); if (inputResult.isAccept()) { From 2190e783c90cce58385bfe68f7842140e722b720 Mon Sep 17 00:00:00 2001 From: adam-m Date: Wed, 23 Jan 2013 11:28:45 -0500 Subject: [PATCH 3/7] - remove bookmarks from tree (using tags now) - remove Bookmarks class references from code - make Bookmarks class deprecated --- .../autopsy/datamodel/AbstractContentChildren.java | 4 ---- .../autopsy/datamodel/AutopsyItemVisitor.java | 5 ----- .../org/sleuthkit/autopsy/datamodel/Bookmarks.java | 9 ++++++--- .../datamodel/DisplayableItemNodeVisitor.java | 13 ------------- .../sleuthkit/autopsy/datamodel/ResultsNode.java | 1 - .../autopsy/datamodel/RootContentChildren.java | 6 ------ Core/src/org/sleuthkit/autopsy/datamodel/Tags.java | 6 +++--- .../autopsy/directorytree/TagFileAction.java | 4 ++-- .../autopsy/directorytree/TagResultAction.java | 4 ++-- 9 files changed, 13 insertions(+), 39 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/AbstractContentChildren.java b/Core/src/org/sleuthkit/autopsy/datamodel/AbstractContentChildren.java index c4983506d8..25f5fe50b1 100644 --- a/Core/src/org/sleuthkit/autopsy/datamodel/AbstractContentChildren.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/AbstractContentChildren.java @@ -137,10 +137,6 @@ abstract class AbstractContentChildren extends Keys { return ee.new EmailExtractedRootNode(); } - @Override - public AbstractNode visit(Bookmarks bks) { - return bks.new BookmarksRootNode(); - } @Override public AbstractNode visit(Tags t) { diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/AutopsyItemVisitor.java b/Core/src/org/sleuthkit/autopsy/datamodel/AutopsyItemVisitor.java index ff5e62c2b9..78afaafaea 100644 --- a/Core/src/org/sleuthkit/autopsy/datamodel/AutopsyItemVisitor.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/AutopsyItemVisitor.java @@ -33,7 +33,6 @@ public interface AutopsyItemVisitor { T visit(KeywordHits kh); T visit(HashsetHits hh); T visit(EmailExtracted ee); - T visit(Bookmarks bks); T visit(Tags t); T visit(Images i); T visit(Views v); @@ -88,10 +87,6 @@ public interface AutopsyItemVisitor { return defaultVisit(ee); } - @Override - public T visit(Bookmarks bks) { - return defaultVisit(bks); - } @Override public T visit(Tags t) { diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/Bookmarks.java b/Core/src/org/sleuthkit/autopsy/datamodel/Bookmarks.java index 04ce217238..e9d8036573 100644 --- a/Core/src/org/sleuthkit/autopsy/datamodel/Bookmarks.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/Bookmarks.java @@ -47,8 +47,11 @@ import org.sleuthkit.datamodel.TskCoreException; * Bookmarks are specialized tags - TSK_TAG_NAME starts with File Bookmark or * Result Bookmark * + * @deprecated cosolidated under Tags + * * TODO bookmark hierarchy support (TSK_TAG_NAME with slashes) */ +@Deprecated public class Bookmarks implements AutopsyVisitableItem { public static final String NAME = "Bookmarks"; @@ -69,7 +72,7 @@ public class Bookmarks implements AutopsyVisitableItem { @Override public T accept(AutopsyItemVisitor v) { - return v.visit(this); + return null; //v.visit(this); } /** @@ -111,7 +114,7 @@ public class Bookmarks implements AutopsyVisitableItem { @Override public T accept(DisplayableItemNodeVisitor v) { - return v.visit(this); + return null; // v.visit(this); } @Override @@ -197,7 +200,7 @@ public class Bookmarks implements AutopsyVisitableItem { @Override public T accept(DisplayableItemNodeVisitor v) { - return v.visit(this); + return null; //v.visit(this); } @Override diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/DisplayableItemNodeVisitor.java b/Core/src/org/sleuthkit/autopsy/datamodel/DisplayableItemNodeVisitor.java index 5be3eee3a2..8789a0bf59 100644 --- a/Core/src/org/sleuthkit/autopsy/datamodel/DisplayableItemNodeVisitor.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/DisplayableItemNodeVisitor.java @@ -18,8 +18,6 @@ */ package org.sleuthkit.autopsy.datamodel; -import org.sleuthkit.autopsy.datamodel.Bookmarks.BookmarksNodeRoot; -import org.sleuthkit.autopsy.datamodel.Bookmarks.BookmarksRootNode; import org.sleuthkit.autopsy.datamodel.EmailExtracted.EmailExtractedAccountNode; import org.sleuthkit.autopsy.datamodel.EmailExtracted.EmailExtractedFolderNode; import org.sleuthkit.autopsy.datamodel.EmailExtracted.EmailExtractedRootNode; @@ -56,8 +54,6 @@ public interface DisplayableItemNodeVisitor { T visit(EmailExtractedRootNode eern); T visit(EmailExtractedAccountNode eean); T visit(EmailExtractedFolderNode eefn); - T visit(BookmarksRootNode bksrn); - T visit(BookmarksNodeRoot bksrn); T visit(TagsRootNode bksrn); T visit(TagsNodeRoot bksrn); T visit(TagNodeRoot tnr); @@ -201,15 +197,6 @@ public interface DisplayableItemNodeVisitor { return defaultVisit(ldn); } - @Override - public T visit(BookmarksRootNode bksrn) { - return defaultVisit(bksrn); - } - - @Override - public T visit(BookmarksNodeRoot bksnr) { - return defaultVisit(bksnr); - } @Override public T visit(TagsRootNode bksrn) { diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/ResultsNode.java b/Core/src/org/sleuthkit/autopsy/datamodel/ResultsNode.java index 5af390a335..7ebe1d8674 100644 --- a/Core/src/org/sleuthkit/autopsy/datamodel/ResultsNode.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/ResultsNode.java @@ -36,7 +36,6 @@ public class ResultsNode extends DisplayableItemNode { new KeywordHits(sleuthkitCase), new HashsetHits(sleuthkitCase), new EmailExtracted(sleuthkitCase), - new Bookmarks(sleuthkitCase), //TODO move to the top of the tree new Tags(sleuthkitCase) //TODO move to the top of the tree )), Lookups.singleton(NAME)); setName(NAME); diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/RootContentChildren.java b/Core/src/org/sleuthkit/autopsy/datamodel/RootContentChildren.java index 90e4065df8..772e6fd522 100644 --- a/Core/src/org/sleuthkit/autopsy/datamodel/RootContentChildren.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/RootContentChildren.java @@ -70,16 +70,12 @@ public class RootContentChildren extends AbstractContentChildren { //TODO check case TSK_TAG_FILE: - if (o instanceof Bookmarks) - this.refreshKey(o); if (o instanceof Tags) this.refreshKey(o); break; //TODO check case TSK_TAG_ARTIFACT: - if (o instanceof Bookmarks) - this.refreshKey(o); if (o instanceof Tags) this.refreshKey(o); break; @@ -96,8 +92,6 @@ public class RootContentChildren extends AbstractContentChildren { this.refreshKey(o); else if (o instanceof EmailExtracted) this.refreshKey(o); - else if (o instanceof Bookmarks) - this.refreshKey(o); else if (o instanceof Tags) this.refreshKey(o); else if (o instanceof ExtractedContent) diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/Tags.java b/Core/src/org/sleuthkit/autopsy/datamodel/Tags.java index 4e6b10c264..a6361738a0 100644 --- a/Core/src/org/sleuthkit/autopsy/datamodel/Tags.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/Tags.java @@ -481,7 +481,7 @@ public class Tags implements AutopsyVisitableItem { * @param comment the bookmark comment */ public static void createBookmark(AbstractFile file, String comment) { - createTag(file, Bookmarks.BOOKMARK_TAG_NAME, comment); + createTag(file, Tags.BOOKMARK_TAG_NAME, comment); } /** @@ -491,7 +491,7 @@ public class Tags implements AutopsyVisitableItem { * @param comment the bookmark comment */ public static void createBookmark(BlackboardArtifact artifact, String comment) { - createTag(artifact, Bookmarks.BOOKMARK_TAG_NAME, comment); + createTag(artifact, Tags.BOOKMARK_TAG_NAME, comment); } /** @@ -503,7 +503,7 @@ public class Tags implements AutopsyVisitableItem { try { Case currentCase = Case.getCurrentCase(); SleuthkitCase skCase = currentCase.getSleuthkitCase(); - return skCase.getBlackboardArtifacts(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_TAG_NAME, Bookmarks.BOOKMARK_TAG_NAME); + return skCase.getBlackboardArtifacts(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_TAG_NAME, Tags.BOOKMARK_TAG_NAME); } catch (TskCoreException ex) { logger.log(Level.SEVERE, "Failed to get list of artifacts from the case."); } diff --git a/Core/src/org/sleuthkit/autopsy/directorytree/TagFileAction.java b/Core/src/org/sleuthkit/autopsy/directorytree/TagFileAction.java index 16009cba73..d1387d5dc4 100644 --- a/Core/src/org/sleuthkit/autopsy/directorytree/TagFileAction.java +++ b/Core/src/org/sleuthkit/autopsy/directorytree/TagFileAction.java @@ -30,7 +30,6 @@ import javax.swing.JMenuItem; import org.openide.nodes.Node; import org.openide.util.actions.Presenter; import org.sleuthkit.autopsy.coreutils.Logger; -import org.sleuthkit.autopsy.datamodel.Bookmarks; import org.sleuthkit.autopsy.datamodel.ContentUtils; import org.sleuthkit.autopsy.datamodel.Tags; import org.sleuthkit.autopsy.directorytree.TagDialog.TagDialogResult; @@ -116,7 +115,8 @@ public class TagFileAction extends AbstractAction implements Presenter.Popup { result.add(empty); } else { for (final String tagName : tagNames) { - if (tagName.equals(Bookmarks.BOOKMARK_TAG_NAME)) { + if (tagName.equals(Tags.BOOKMARK_TAG_NAME)) { + //skip showing bookmarks in tags menu, as they have a separate menu continue; } JMenuItem tagItem = new JMenuItem(tagName); diff --git a/Core/src/org/sleuthkit/autopsy/directorytree/TagResultAction.java b/Core/src/org/sleuthkit/autopsy/directorytree/TagResultAction.java index 23a22ef9a0..64f4d6d89a 100644 --- a/Core/src/org/sleuthkit/autopsy/directorytree/TagResultAction.java +++ b/Core/src/org/sleuthkit/autopsy/directorytree/TagResultAction.java @@ -29,7 +29,6 @@ import javax.swing.JMenuItem; import javax.swing.JOptionPane; import org.openide.util.actions.Presenter; import org.sleuthkit.autopsy.coreutils.Logger; -import org.sleuthkit.autopsy.datamodel.Bookmarks; import org.sleuthkit.autopsy.datamodel.Tags; import org.sleuthkit.datamodel.BlackboardArtifact; @@ -104,7 +103,8 @@ public class TagResultAction extends AbstractAction implements Presenter.Popup { result.add(empty); } else { for (final String tagName : tagNames) { - if (tagName.equals(Bookmarks.BOOKMARK_TAG_NAME)) { + if (tagName.equals(Tags.BOOKMARK_TAG_NAME)) { + //skip showing bookmarks in tags menu, as they have a separate menu continue; } JMenuItem tagItem = new JMenuItem(tagName); From 455e4f6f8912429933e4b3489aabe12c4b1ef85c Mon Sep 17 00:00:00 2001 From: adam-m Date: Wed, 23 Jan 2013 12:06:26 -0500 Subject: [PATCH 4/7] AUT-709 Review Extensions used by Tika: do not process archive extensions by Tika and string extractor. Currently done by extension, will be determined by mime type later --- .../AbstractFileStringExtract.java | 67 +++++++++---------- .../AbstractFileTikaTextExtract.java | 4 +- 2 files changed, 33 insertions(+), 38 deletions(-) diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/AbstractFileStringExtract.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/AbstractFileStringExtract.java index ffe552182c..f18fb1de74 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/AbstractFileStringExtract.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/AbstractFileStringExtract.java @@ -31,13 +31,9 @@ import org.sleuthkit.autopsy.coreutils.StringExtract.StringExtractUnicodeTable.S import org.sleuthkit.autopsy.keywordsearch.Ingester.IngesterException; import org.sleuthkit.datamodel.AbstractFile; - - - - /** - * Takes an AbstractFile, extract strings, converts into chunks (associated with the original - * source file) up to 1MB then and indexes chunks as text with Solr + * Takes an AbstractFile, extract strings, converts into chunks (associated with + * the original source file) up to 1MB then and indexes chunks as text with Solr */ class AbstractFileStringExtract implements AbstractFileExtract { @@ -52,19 +48,22 @@ class AbstractFileStringExtract implements AbstractFileExtract { //private static final int BOM_LEN = 3; private static final int BOM_LEN = 0; //disabled prepending of BOM private static final Charset INDEX_CHARSET = Server.DEFAULT_INDEXED_TEXT_CHARSET; - private static final SCRIPT DEFAULT_SCRIPT = SCRIPT.LATIN_2; private final List