From 0d5ebc9f9810ffad9c9a35cb13b2aba53d644640 Mon Sep 17 00:00:00 2001 From: Dick Fickling Date: Tue, 22 May 2012 09:19:08 -0400 Subject: [PATCH] TSK-483: Show path in results tables Currently showing full path just for keyword hits and hash hits, because for most other artifacts the location of the original file isn't very useful. --- .../datamodel/BlackboardArtifactNode.java | 20 ++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/DataModel/src/org/sleuthkit/autopsy/datamodel/BlackboardArtifactNode.java b/DataModel/src/org/sleuthkit/autopsy/datamodel/BlackboardArtifactNode.java index 7c0818e035..bf7bde9950 100644 --- a/DataModel/src/org/sleuthkit/autopsy/datamodel/BlackboardArtifactNode.java +++ b/DataModel/src/org/sleuthkit/autopsy/datamodel/BlackboardArtifactNode.java @@ -80,18 +80,24 @@ public class BlackboardArtifactNode extends AbstractNode implements DisplayableI ss.put(new NodeProperty("File Name", "File Name", - "no description", + NO_DESCR, associated.accept(new NameVisitor()))); - ATTRIBUTE_TYPE[] attributeTypes = ATTRIBUTE_TYPE.values(); for(Map.Entry entry : map.entrySet()){ - if(attributeTypes.length > entry.getKey()){ - ss.put(new NodeProperty(attributeTypes[entry.getKey()-1].getDisplayName(), - attributeTypes[entry.getKey()-1].getDisplayName(), + ss.put(new NodeProperty(BlackboardAttribute.ATTRIBUTE_TYPE.fromID(entry.getKey()).getDisplayName(), + BlackboardAttribute.ATTRIBUTE_TYPE.fromID(entry.getKey()).getDisplayName(), NO_DESCR, entry.getValue())); - } } + + if(artifact.getArtifactTypeID() == BlackboardArtifact.ARTIFACT_TYPE.TSK_HASHSET_HIT.getTypeID() + || artifact.getArtifactTypeID() == BlackboardArtifact.ARTIFACT_TYPE.TSK_KEYWORD_HIT.getTypeID()) { + ss.put(new NodeProperty("File Path", + "File Path", + NO_DESCR, + DataConversion.getformattedPath(ContentUtils.getDisplayPath(associated), 0, 1))); + } + return s; } @@ -213,7 +219,7 @@ public class BlackboardArtifactNode extends AbstractNode implements DisplayableI } } - + private String getIcon(BlackboardArtifact.ARTIFACT_TYPE type) { switch(type) { case TSK_WEB_BOOKMARK: