Autopsy  4.4.1
Graphical digital forensics platform for The Sleuth Kit and other tools.
EamGlobalFileInstance.java
Go to the documentation of this file.
1 /*
2  * Central Repository
3  *
4  * Copyright 2015-2017 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.centralrepository.datamodel;
20 
21 import java.util.Objects;
22 import org.sleuthkit.datamodel.TskData;
23 
27 public class EamGlobalFileInstance {
28 
29  private int instanceID;
30  private int globalSetID;
31  private String MD5Hash;
32  private TskData.FileKnown knownStatus;
33  private String comment;
34 
36  int globalSetID,
37  String MD5Hash,
38  TskData.FileKnown knownStatus,
39  String comment) {
41  }
42 
44  int instanceID,
45  int globalSetID,
46  String MD5Hash,
47  TskData.FileKnown knownStatus,
48  String comment) {
49  this.instanceID = instanceID;
50  this.globalSetID = globalSetID;
51  // Normalize hashes by lower casing
52  this.MD5Hash = MD5Hash.toLowerCase();
53  this.knownStatus = knownStatus;
54  this.comment = comment;
55  }
56 
57  @Override
58  public boolean equals(Object otherInstance) {
59  if (this == otherInstance) {
60  return true;
61  } else if (!(otherInstance instanceof EamGlobalFileInstance)) {
62  return false;
63  } else {
64  return (this.hashCode() == otherInstance.hashCode());
65  }
66  }
67 
68  @Override
69  public int hashCode() {
70  int hash = 5;
71  hash = 59 * hash + this.globalSetID;
72  hash = 59 * hash + Objects.hashCode(this.MD5Hash);
73  hash = 59 * hash + this.knownStatus.hashCode();
74  return hash;
75  }
79  public int getInstanceID() {
80  return instanceID;
81  }
82 
86  public void setInstanceID(int instanceID) {
87  this.instanceID = instanceID;
88  }
89 
93  public int getGlobalSetID() {
94  return globalSetID;
95  }
96 
100  public void setGlobalSetID(int globalSetID) {
101  this.globalSetID = globalSetID;
102  }
103 
107  public String getMD5Hash() {
108  return MD5Hash;
109  }
110 
114  public void setMD5Hash(String MD5Hash) {
115  // Normalize hashes by lower casing
116  this.MD5Hash = MD5Hash.toLowerCase();
117  }
118 
122  public TskData.FileKnown getKnownStatus() {
123  return knownStatus;
124  }
125 
129  public void setKnownStatus(TskData.FileKnown knownStatus) {
130  this.knownStatus = knownStatus;
131  }
132 
136  public String getComment() {
137  return null == comment ? "" : comment;
138  }
139 
143  public void setComment(String comment) {
144  this.comment = comment;
145  }
146 }
EamGlobalFileInstance(int instanceID, int globalSetID, String MD5Hash, TskData.FileKnown knownStatus, String comment)
EamGlobalFileInstance(int globalSetID, String MD5Hash, TskData.FileKnown knownStatus, String comment)

Copyright © 2012-2016 Basis Technology. Generated on: Fri Sep 29 2017
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.