Autopsy  4.1
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  public ResultsNode(SleuthkitCase sleuthkitCase) {
37  super(new RootContentChildren(Arrays.asList(
38  new ExtractedContent(sleuthkitCase),
39  new KeywordHits(sleuthkitCase),
40  new HashsetHits(sleuthkitCase),
41  new EmailExtracted(sleuthkitCase),
42  new InterestingHits(sleuthkitCase),
43  new Accounts(sleuthkitCase)
44  )), Lookups.singleton(NAME));
45  setName(NAME);
46  setDisplayName(NAME);
47  this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/results.png"); //NON-NLS
48  }
49 
50  @Override
51  public boolean isLeafTypeNode() {
52  return false;
53  }
54 
55  @Override
56  public <T> T accept(DisplayableItemNodeVisitor<T> v) {
57  return v.visit(this);
58  }
59 
60  @Override
61  @NbBundle.Messages({
62  "ResultsNode.createSheet.name.name=Name",
63  "ResultsNode.createSheet.name.displayName=Name",
64  "ResultsNode.createSheet.name.desc=no description"})
65  protected Sheet createSheet() {
66  Sheet s = super.createSheet();
67  Sheet.Set ss = s.get(Sheet.PROPERTIES);
68  if (ss == null) {
69  ss = Sheet.createPropertiesSet();
70  s.put(ss);
71  }
72 
73  ss.put(new NodeProperty<>(Bundle.ResultsNode_createSheet_name_name(),
74  Bundle.ResultsNode_createSheet_name_displayName(),
75  Bundle.ResultsNode_createSheet_name_desc(),
76  NAME
77  ));
78  return s;
79  }
80 
81  /*
82  * TODO (AUT-1849): Correct or remove peristent column reordering code
83  *
84  * Added to support this feature.
85  */
86 // @Override
87 // public String getItemType() {
88 // return "Results"; //NON-NLS
89 // }
90 }
ResultsNode(SleuthkitCase sleuthkitCase)

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