Autopsy 4.22.1
Graphical digital forensics platform for The Sleuth Kit and other tools.
ViewsNode.java
Go to the documentation of this file.
1/*
2 * Autopsy Forensic Browser
3 *
4 * Copyright 2011-2018 Basis Technology Corp.
5 * Contact: carrier <at> sleuthkit <dot> org
6 *
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
10 *
11 * http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 */
19package org.sleuthkit.autopsy.datamodel;
20
21import java.util.Arrays;
22import org.openide.nodes.Sheet;
23import org.openide.util.NbBundle;
24import org.openide.util.lookup.Lookups;
25import org.sleuthkit.datamodel.SleuthkitCase;
26
32public class ViewsNode extends DisplayableItemNode {
33
34 public static final String NAME = NbBundle.getMessage(ViewsNode.class, "ViewsNode.name.text");
35
36 public ViewsNode(SleuthkitCase sleuthkitCase) {
37 this(sleuthkitCase, 0);
38 }
39
40 public ViewsNode(SleuthkitCase sleuthkitCase, long dsObjId) {
41
42 super(
43 new RootContentChildren(Arrays.asList(
44 new FileTypes(dsObjId),
45 // June '15: Recent Files was removed because it was not useful w/out filtering
46 // add it back in if we can filter the results to a more managable size.
47 // new RecentFiles(sleuthkitCase),
48 new DeletedContent(sleuthkitCase, dsObjId),
49 new FileSize(sleuthkitCase, dsObjId))
50 ),
51 Lookups.singleton(NAME)
52 );
53 setName(NAME);
54 setDisplayName(NAME);
55 this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/views.png"); //NON-NLS
56 }
57
58
59 @Override
60 public boolean isLeafTypeNode() {
61 return false;
62 }
63
64 @Override
65 public <T> T accept(DisplayableItemNodeVisitor<T> visitor) {
66 return visitor.visit(this);
67 }
68
69 @Override
70 protected Sheet createSheet() {
71 Sheet sheet = super.createSheet();
72 Sheet.Set sheetSet = sheet.get(Sheet.PROPERTIES);
73 if (sheetSet == null) {
74 sheetSet = Sheet.createPropertiesSet();
75 sheet.put(sheetSet);
76 }
77
78 sheetSet.put(new NodeProperty<>(NbBundle.getMessage(this.getClass(), "ViewsNode.createSheet.name.name"),
79 NbBundle.getMessage(this.getClass(), "ViewsNode.createSheet.name.displayName"),
80 NbBundle.getMessage(this.getClass(), "ViewsNode.createSheet.name.desc"),
81 NAME));
82 return sheet;
83 }
84
85 @Override
86 public String getItemType() {
87 return getClass().getName();
88 }
89}
ViewsNode(SleuthkitCase sleuthkitCase, long dsObjId)
ViewsNode(SleuthkitCase sleuthkitCase)

Copyright © 2012-2024 Sleuth Kit Labs. Generated on:
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.