Sleuth Kit Java Bindings (JNI)  4.11.0
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 
44  private final String displayName;
45 
46  private IngestModuleType(String displayName) {
47  this.displayName = displayName;
48  }
49 
50  public static IngestModuleType fromID(int typeId) {
51  for (IngestModuleType moduleType : IngestModuleType.values()) {
52  if (moduleType.ordinal() == typeId) {
53  return moduleType;
54  }
55  }
56  return null;
57  }
58 
62  public String getDisplayName() {
63  return displayName;
64  }
65 
66  }
67 
68  private final long ingestModuleId;
69  private final String displayName;
70  private final String uniqueName;
71  private final IngestModuleType type;
72  private final String version;
73 
82  IngestModuleInfo(long ingestModuleId, String displayName, String uniqueName, IngestModuleType type, String version) {
83  this.ingestModuleId = ingestModuleId;
84  this.displayName = displayName;
85  this.uniqueName = uniqueName;
86  this.type = type;
87  this.version = version;
88  }
89 
93  public long getIngestModuleId() {
94  return ingestModuleId;
95  }
96 
100  public String getDisplayName() {
101  return displayName;
102  }
103 
107  public String getUniqueName() {
108  return uniqueName;
109  }
110 
115  return type;
116  }
117 
121  public String getVersion() {
122  return version;
123  }
124 
125 }

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.