Autopsy  4.19.3
Graphical digital forensics platform for The Sleuth Kit and other tools.
LocalFilesDataSourceNode.java
Go to the documentation of this file.
1 /*
2  * Autopsy Forensic Browser
3  *
4  * Copyright 2021 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 org.openide.nodes.Sheet;
22 import org.openide.util.NbBundle;
23 import org.sleuthkit.datamodel.LocalFilesDataSource;
24 
30 
31  private final LocalFilesDataSource localFileDataSource;
32 
33  public LocalFilesDataSourceNode(LocalFilesDataSource ld) {
34  super(ld);
35  localFileDataSource = ld;
36  this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/fileset-icon-16.png"); //NON-NLS
37  }
38 
39  @Override
40  @NbBundle.Messages({"LocalFilesDataSourceNode.createSheet.size.name=Size (Bytes)",
41  "LocalFilesDataSourceNode.createSheet.size.displayName=Size (Bytes)",
42  "LocalFilesDataSourceNode.createSheet.size.desc=Size of the data source in bytes.",
43  "LocalFilesDataSourceNode.createSheet.type.name=Type",
44  "LocalFilesDataSourceNode.createSheet.type.displayName=Type",
45  "LocalFilesDataSourceNode.createSheet.type.desc=Type of the image.",
46  "LocalFilesDataSourceNode.createSheet.type.text=Logical File Set",
47  "LocalFilesDataSourceNode.createSheet.timezone.name=Timezone",
48  "LocalFilesDataSourceNode.createSheet.timezone.displayName=Timezone",
49  "LocalFilesDataSourceNode.createSheet.timezone.desc=Timezone of the image",
50  "LocalFilesDataSourceNode.createSheet.deviceId.name=Device ID",
51  "LocalFilesDataSourceNode.createSheet.deviceId.displayName=Device ID",
52  "LocalFilesDataSourceNode.createSheet.deviceId.desc=Device ID of the image",
53  "LocalFilesDataSourceNode.createSheet.name.name=Name",
54  "LocalFilesDataSourceNode.createSheet.name.displayName=Name",
55  "LocalFilesDataSourceNode.createSheet.name.desc=no description",
56  "LocalFilesDataSourceNode.createSheet.noDesc=no description",})
57  protected Sheet createSheet() {
58  Sheet sheet = new Sheet();
59  Sheet.Set sheetSet = Sheet.createPropertiesSet();
60  sheet.put(sheetSet);
61 
62  sheetSet.put(new NodeProperty<>(Bundle.LocalFilesDataSourceNode_createSheet_name_name(),
63  Bundle.LocalFilesDataSourceNode_createSheet_name_displayName(),
64  Bundle.LocalFilesDataSourceNode_createSheet_name_desc(),
65  getName()));
66 
67  sheetSet.put(new NodeProperty<>(Bundle.LocalFilesDataSourceNode_createSheet_type_name(),
68  Bundle.LocalFilesDataSourceNode_createSheet_type_displayName(),
69  Bundle.LocalFilesDataSourceNode_createSheet_type_desc(),
70  Bundle.LocalFilesDataSourceNode_createSheet_type_text()));
71 
72  sheetSet.put(new NodeProperty<>(Bundle.LocalFilesDataSourceNode_createSheet_size_name(),
73  Bundle.LocalFilesDataSourceNode_createSheet_size_displayName(),
74  Bundle.LocalFilesDataSourceNode_createSheet_size_desc(),
75  this.content.getSize()));
76 
77  sheetSet.put(new NodeProperty<>(Bundle.LocalFilesDataSourceNode_createSheet_timezone_name(),
78  Bundle.LocalFilesDataSourceNode_createSheet_timezone_displayName(),
79  Bundle.LocalFilesDataSourceNode_createSheet_timezone_desc(),
80  ""));
81 
82  sheetSet.put(new NodeProperty<>(Bundle.LocalFilesDataSourceNode_createSheet_deviceId_name(),
83  Bundle.LocalFilesDataSourceNode_createSheet_deviceId_displayName(),
84  Bundle.LocalFilesDataSourceNode_createSheet_deviceId_desc(),
85  localFileDataSource.getDeviceId()));
86 
87  return sheet;
88  }
89 
90  @Override
91  public <T> T accept(ContentNodeVisitor<T> visitor) {
92  return visitor.visit(this);
93  }
94 
95  @Override
96  public <T> T accept(DisplayableItemNodeVisitor<T> visitor) {
97  return visitor.visit(this);
98  }
99 }

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