Autopsy  4.4
Graphical digital forensics platform for The Sleuth Kit and other tools.
ResultsNode.java
Go to the documentation of this file.
1 /*
2  * Autopsy Forensic Browser
3  *
4  * Copyright 2011-2016 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  */
19 package org.sleuthkit.autopsy.datamodel;
20 
22 import java.util.Arrays;
23 import org.openide.nodes.Sheet;
24 import org.openide.util.NbBundle;
25 import org.openide.util.lookup.Lookups;
26 import org.sleuthkit.datamodel.SleuthkitCase;
27 
31 public class ResultsNode extends DisplayableItemNode {
32 
33  @NbBundle.Messages("ResultsNode.name.text=Results")
34  public static final String NAME = Bundle.ResultsNode_name_text();
35 
36 
37 
38  public ResultsNode(SleuthkitCase sleuthkitCase) {
39  super(new RootContentChildren(Arrays.asList(
40  new ExtractedContent(sleuthkitCase),
41  new KeywordHits(sleuthkitCase),
42  new HashsetHits(sleuthkitCase),
43  new EmailExtracted(sleuthkitCase),
44  new InterestingHits(sleuthkitCase),
45  new Accounts(sleuthkitCase)
46  )), Lookups.singleton(NAME));
47  setName(NAME);
48  setDisplayName(NAME);
49  this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/results.png"); //NON-NLS
50  }
51 
52  @Override
53  public boolean isLeafTypeNode() {
54  return false;
55  }
56 
57  @Override
58  public <T> T accept(DisplayableItemNodeVisitor<T> v) {
59  return v.visit(this);
60  }
61 
62  @Override
63  @NbBundle.Messages({
64  "ResultsNode.createSheet.name.name=Name",
65  "ResultsNode.createSheet.name.displayName=Name",
66  "ResultsNode.createSheet.name.desc=no description"})
67  protected Sheet createSheet() {
68  Sheet s = super.createSheet();
69  Sheet.Set ss = s.get(Sheet.PROPERTIES);
70  if (ss == null) {
71  ss = Sheet.createPropertiesSet();
72  s.put(ss);
73  }
74 
75  ss.put(new NodeProperty<>(Bundle.ResultsNode_createSheet_name_name(),
76  Bundle.ResultsNode_createSheet_name_displayName(),
77  Bundle.ResultsNode_createSheet_name_desc(),
78  NAME
79  ));
80  return s;
81  }
82 
83  @Override
84  public String getItemType() {
85  return getClass().getName();
86  }
87 }
ResultsNode(SleuthkitCase sleuthkitCase)

Copyright © 2012-2016 Basis Technology. Generated on: Tue Jun 13 2017
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.