19 package org.sleuthkit.autopsy.datamodel;
21 import java.util.ArrayList;
22 import java.util.LinkedHashMap;
23 import java.util.List;
25 import javax.swing.Action;
26 import org.openide.nodes.Sheet;
27 import org.openide.util.NbBundle;
53 String name = ld.getName();
56 if (name.equals(VirtualDirectory.NAME_UNALLOC)) {
57 this.setIconBaseWithExtension(
"org/sleuthkit/autopsy/images/folder-icon-deleted.png");
58 }
else if (ld.isDataSource()) {
59 this.setIconBaseWithExtension(
"org/sleuthkit/autopsy/images/fileset-icon-16.png");
60 }
else if (name.equals(VirtualDirectory.NAME_CARVED)) {
61 this.setIconBaseWithExtension(
"org/sleuthkit/autopsy/images/Folder-icon.png");
63 this.setIconBaseWithExtension(
"org/sleuthkit/autopsy/images/Folder-icon.png");
77 List<Action> actions =
new ArrayList<>();
79 NbBundle.getMessage(
this.getClass(),
"VirtualDirectoryNode.getActions.viewInNewWin.text"),
this));
84 return actions.toArray(
new Action[0]);
89 Sheet s = super.createSheet();
90 Sheet.Set ss = s.get(Sheet.PROPERTIES);
92 ss = Sheet.createPropertiesSet();
96 Map<String, Object> map =
new LinkedHashMap<>();
99 ss.put(
new NodeProperty<>(NbBundle.getMessage(
this.getClass(),
"VirtualDirectoryNode.createSheet.name.name"),
100 NbBundle.getMessage(
this.getClass(),
101 "VirtualDirectoryNode.createSheet.name.displayName"),
102 NbBundle.getMessage(
this.getClass(),
"VirtualDirectoryNode.createSheet.name.desc"),
105 final String NO_DESCR = NbBundle.getMessage(this.getClass(),
"VirtualDirectoryNode.createSheet.noDesc");
106 for (Map.Entry<String, Object> entry : map.entrySet()) {
107 ss.put(
new NodeProperty<>(entry.getKey(), entry.getKey(), NO_DESCR, entry.getValue()));
114 public <T> T accept(ContentNodeVisitor<T> v) {
115 return v.visit(
this);
119 public <T> T accept(DisplayableItemNodeVisitor<T> v) {
120 return v.visit(
this);
139 short allocFlag = TskData.TSK_FS_META_FLAG_ENUM.ALLOC.getValue();
140 short unallocFlag = TskData.TSK_FS_META_FLAG_ENUM.UNALLOC.getValue();
142 if ((metaFlag & allocFlag) == allocFlag) {
143 result = TskData.TSK_FS_META_FLAG_ENUM.ALLOC.toString();
145 if ((metaFlag & unallocFlag) == unallocFlag) {
146 result = TskData.TSK_FS_META_FLAG_ENUM.UNALLOC.toString();
static String metaFlagToString(short metaFlag)
Action[] getActions(boolean popup)
static void fillPropertyMap(Map< String, Object > map, AbstractFile content)
VirtualDirectoryNode(VirtualDirectory ld)
synchronized static Logger getLogger(String name)
static final String LOGICAL_FILE_SET_PREFIX
static String nameForLayoutFile(VirtualDirectory ld)