Autopsy  4.5.0
Graphical digital forensics platform for The Sleuth Kit and other tools.
BaseTypes.java
Go to the documentation of this file.
1 /*
2  * Autopsy Forensic Browser
3  *
4  * Copyright 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.timeline.datamodel.eventtype;
20 
21 import java.util.Arrays;
22 import java.util.List;
23 import javafx.scene.image.Image;
24 import org.openide.util.NbBundle;
26 
30 public enum BaseTypes implements EventType {
31 
32  FILE_SYSTEM(NbBundle.getMessage(BaseTypes.class, "BaseTypes.fileSystem.name"), "blue-document.png") { // NON-NLS
33 
34  @Override
35  public List<? extends EventType> getSubTypes() {
36  return Arrays.asList(FileSystemTypes.values());
37  }
38 
39  @Override
40  public EventType getSubType(String string) {
41  return FileSystemTypes.valueOf(string);
42  }
43  },
44  WEB_ACTIVITY(NbBundle.getMessage(BaseTypes.class, "BaseTypes.webActivity.name"), "web-file.png") { // NON-NLS
45 
46  @Override
47  public List<? extends EventType> getSubTypes() {
48  return Arrays.asList(WebTypes.values());
49  }
50 
51  @Override
52  public EventType getSubType(String string) {
53  return WebTypes.valueOf(string);
54  }
55  },
56  MISC_TYPES(NbBundle.getMessage(BaseTypes.class, "BaseTypes.miscTypes.name"), "block.png") { // NON-NLS
57 
58  @Override
59  public List<? extends EventType> getSubTypes() {
60  return Arrays.asList(MiscTypes.values());
61  }
62 
63  @Override
64  public EventType getSubType(String string) {
65  return MiscTypes.valueOf(string);
66  }
67  };
68 
69  private final String displayName;
70 
71  private final String iconBase;
72 
73  private final Image image;
74 
75  @Override
76  public Image getFXImage() {
77  return image;
78  }
79 
80  @Override
81  public String getIconBase() {
82  return iconBase;
83  }
84 
85  @Override
88  }
89 
90  @Override
91  public String getDisplayName() {
92  return displayName;
93  }
94 
95  private BaseTypes(String displayName, String iconBase) {
96  this.displayName = displayName;
97  this.iconBase = iconBase;
98  this.image = new Image("org/sleuthkit/autopsy/timeline/images/" + iconBase, true); // NON-NLS
99  }
100 
101  @Override
103  return RootEventType.getInstance();
104  }
105 
106  @Override
107  public EventType getSubType(String string) {
108  return BaseTypes.valueOf(string);
109  }
110 }
BaseTypes(String displayName, String iconBase)
Definition: BaseTypes.java:95

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