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

Copyright © 2012-2018 Basis Technology. Generated on: Wed Sep 18 2019
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.