Autopsy  4.7.0
Graphical digital forensics platform for The Sleuth Kit and other tools.
CommonFileChildNodeLoading.java
Go to the documentation of this file.
1 /*
2  *
3  * Autopsy Forensic Browser
4  *
5  * Copyright 2018 Basis Technology Corp.
6  * Contact: carrier <at> sleuthkit <dot> org
7  *
8  * Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  *
12  * http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  */
20 package org.sleuthkit.autopsy.datamodel;
21 
22 import java.util.LinkedHashMap;
23 import java.util.Map;
24 import org.openide.nodes.Children;
25 import org.openide.nodes.Sheet;
26 import org.openide.util.NbBundle;
27 
33 
34  public CommonFileChildNodeLoading(Children children) {
35  super(children);
36  }
37 
38  @Override
39  public <T> T accept(DisplayableItemNodeVisitor<T> visitor) {
40  return visitor.visit(this);
41  }
42 
43  @Override
44  public boolean isLeafTypeNode() {
45  return true;
46  }
47 
48  @Override
49  public String getItemType() {
50  return getClass().getName();
51  }
52 
53  @Override
54  protected Sheet createSheet() {
55  Sheet sheet = new Sheet();
56  Sheet.Set sheetSet = sheet.get(Sheet.PROPERTIES);
57  if (sheetSet == null) {
58  sheetSet = Sheet.createPropertiesSet();
59  sheet.put(sheetSet);
60  }
61 
62  Map<String, Object> map = new LinkedHashMap<>();
63  map.put(CommonFileChildLoadingPropertyType.File.toString(), "Loading...");
64 
65  final String NO_DESCR = Bundle.AbstractFsContentNode_noDesc_text();
67  final String propString = propType.toString();
68  sheetSet.put(new NodeProperty<>(propString, propString, NO_DESCR, map.get(propString)));
69  }
70 
71  return sheet;
72  }
73 
77  @NbBundle.Messages({
78  "CommonFileChildLoadingPropertyType.fileColLbl=File"
79  })
81 
82  File(Bundle.CommonFileChildLoadingPropertyType_fileColLbl());
83 
84  final private String displayString;
85 
86  private CommonFileChildLoadingPropertyType(String displayString) {
87  this.displayString = displayString;
88  }
89 
90  @Override
91  public String toString() {
92  return displayString;
93  }
94  }
95 }

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