Autopsy  4.0
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-2014 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 
21 import java.util.Arrays;
22 import org.openide.nodes.Sheet;
23 import org.openide.util.NbBundle;
24 import org.openide.util.lookup.Lookups;
25 import org.sleuthkit.datamodel.SleuthkitCase;
26 
30 public class ResultsNode extends DisplayableItemNode {
31 
32  public static final String NAME = NbBundle.getMessage(ResultsNode.class, "ResultsNode.name.text");
33 
34  public ResultsNode(SleuthkitCase sleuthkitCase) {
35  super(new RootContentChildren(Arrays.asList(new ExtractedContent(sleuthkitCase),
36  new KeywordHits(sleuthkitCase),
37  new HashsetHits(sleuthkitCase),
38  new EmailExtracted(sleuthkitCase),
39  new InterestingHits(sleuthkitCase)
40  )), Lookups.singleton(NAME));
41  setName(NAME);
42  setDisplayName(NAME);
43  this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/results.png"); //NON-NLS
44  }
45 
46  @Override
47  public boolean isLeafTypeNode() {
48  return false;
49  }
50 
51  @Override
52  public <T> T accept(DisplayableItemNodeVisitor<T> v) {
53  return v.visit(this);
54  }
55 
56  @Override
57  protected Sheet createSheet() {
58  Sheet s = super.createSheet();
59  Sheet.Set ss = s.get(Sheet.PROPERTIES);
60  if (ss == null) {
61  ss = Sheet.createPropertiesSet();
62  s.put(ss);
63  }
64 
65  ss.put(new NodeProperty<>(NbBundle.getMessage(this.getClass(), "ResultsNode.createSheet.name.name"),
66  NbBundle.getMessage(this.getClass(), "ResultsNode.createSheet.name.displayName"),
67  NbBundle.getMessage(this.getClass(), "ResultsNode.createSheet.name.desc"),
68  NAME));
69  return s;
70  }
71 
72  /*
73  * TODO (AUT-1849): Correct or remove peristent column reordering code
74  *
75  * Added to support this feature.
76  */
77 // @Override
78 // public String getItemType() {
79 // return "Results"; //NON-NLS
80 // }
81 }
ResultsNode(SleuthkitCase sleuthkitCase)

Copyright © 2012-2015 Basis Technology. Generated on: Wed Apr 6 2016
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.