Sleuth Kit Java Bindings (JNI)  4.12.1
Java bindings for using The Sleuth Kit
IngestModuleInfo.java
Go to the documentation of this file.
1 /*
2  * Sleuth Kit Data Model
3  *
4  * Copyright 2014-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.datamodel;
20 
21 import java.util.ResourceBundle;
22 
27 public final class IngestModuleInfo {
28 
29  private static final ResourceBundle bundle = ResourceBundle.getBundle("org.sleuthkit.datamodel.Bundle");
30 
34  public static enum IngestModuleType {
35  /*
36  * IMPORTANT: DO NOT CHANGE ORDER, THE ORDINAL VALUES OF THE ENUM ARE
37  * STORED IN THE CASE DATABASE
38  */
39  DATA_SOURCE_LEVEL(bundle.getString("IngestModuleInfo.IngestModuleType.DataSourceLevel.displayName")),
40  FILE_LEVEL(bundle.getString("IngestModuleInfo.IngestModuleType.FileLevel.displayName")),
41  DATA_ARTIFACT(bundle.getString("IngestModuleInfo.IngestModuleType.DataArtifact.displayName")),
42  MULTIPLE("IngestModuleInfo.IngestModuleType.Multiple.displayName"),
43  ANALYSIS_RESULT(bundle.getString("IngestModuleInfo.IngestModuleType.AnalysisResult.displayName"));
44 
45  private final String displayName;
46 
47  private IngestModuleType(String displayName) {
48  this.displayName = displayName;
49  }
50 
51  public static IngestModuleType fromID(int typeId) {
52  for (IngestModuleType moduleType : IngestModuleType.values()) {
53  if (moduleType.ordinal() == typeId) {
54  return moduleType;
55  }
56  }
57  return null;
58  }
59 
63  public String getDisplayName() {
64  return displayName;
65  }
66 
67  }
68 
69  private final long ingestModuleId;
70  private final String displayName;
71  private final String uniqueName;
72  private final IngestModuleType type;
73  private final String version;
74 
83  IngestModuleInfo(long ingestModuleId, String displayName, String uniqueName, IngestModuleType type, String version) {
84  this.ingestModuleId = ingestModuleId;
85  this.displayName = displayName;
86  this.uniqueName = uniqueName;
87  this.type = type;
88  this.version = version;
89  }
90 
94  public long getIngestModuleId() {
95  return ingestModuleId;
96  }
97 
101  public String getDisplayName() {
102  return displayName;
103  }
104 
108  public String getUniqueName() {
109  return uniqueName;
110  }
111 
116  return type;
117  }
118 
122  public String getVersion() {
123  return version;
124  }
125 
126 }

Copyright © 2011-2021 Brian Carrier. (carrier -at- sleuthkit -dot- org)
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.