Autopsy  3.1
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.events.type;
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 Image image;
74 
75  public Image getFXImage() {
76  return image;
77  }
78 
79  @Override
80  public String getIconBase() {
81  return iconBase;
82  }
83 
84  @Override
87  }
88 
89  @Override
90  public String getDisplayName() {
91  return displayName;
92  }
93 
94  private BaseTypes(String displayName, String iconBase) {
95  this.displayName = displayName;
96  this.iconBase = iconBase;
97  this.image = new Image("org/sleuthkit/autopsy/timeline/images/" + iconBase, true); // NON-NLS
98  }
99 
100  @Override
102  return RootEventType.getInstance();
103  }
104 
105  @Override
106  public EventType getSubType(String string) {
107  return BaseTypes.valueOf(string);
108  }
109 }
BaseTypes(String displayName, String iconBase)
Definition: BaseTypes.java:94

Copyright © 2012-2015 Basis Technology. Generated on: Mon Oct 19 2015
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.