Autopsy  4.15.0
Graphical digital forensics platform for The Sleuth Kit and other tools.
CentralRepoFileInstance.java
Go to the documentation of this file.
1 /*
2  * Central Repository
3  *
4  * Copyright 2015-2020 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 
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,
41  }
42 
44  int instanceID,
45  int globalSetID,
46  String MD5Hash,
47  TskData.FileKnown knownStatus,
49 
50  if(knownStatus == null){
51  throw new CentralRepoException("null known status");
52  }
53  this.instanceID = instanceID;
54  this.globalSetID = globalSetID;
56  this.knownStatus = knownStatus;
57  this.comment = comment;
58  }
59 
60  @Override
61  public boolean equals(Object otherInstance) {
62  if (this == otherInstance) {
63  return true;
64  } else if (!(otherInstance instanceof CentralRepoFileInstance)) {
65  return false;
66  } else {
67  return (this.hashCode() == otherInstance.hashCode());
68  }
69  }
70 
71  @Override
72  public int hashCode() {
73  int hash = 5;
74  hash = 59 * hash + this.globalSetID;
75  hash = 59 * hash + Objects.hashCode(this.MD5Hash);
76  hash = 59 * hash + this.knownStatus.hashCode();
77  return hash;
78  }
82  public int getInstanceID() {
83  return instanceID;
84  }
85 
89  public void setInstanceID(int instanceID) {
90  this.instanceID = instanceID;
91  }
92 
96  public int getGlobalSetID() {
97  return globalSetID;
98  }
99 
103  public void setGlobalSetID(int globalSetID) {
104  this.globalSetID = globalSetID;
105  }
106 
110  public String getMD5Hash() {
111  return MD5Hash;
112  }
113 
117  public void setMD5Hash(String MD5Hash) throws CorrelationAttributeNormalizationException {
119  }
120 
124  public TskData.FileKnown getKnownStatus() {
125  return knownStatus;
126  }
127 
131  public void setKnownStatus(TskData.FileKnown knownStatus) {
132  this.knownStatus = knownStatus;
133  }
134 
138  public String getComment() {
139  return null == comment ? "" : comment;
140  }
141 
145  public void setComment(String comment) {
146  this.comment = comment;
147  }
148 }
CentralRepoFileInstance(int globalSetID, String MD5Hash, TskData.FileKnown knownStatus, String comment)
static String normalize(CorrelationAttributeInstance.Type attributeType, String data)
CentralRepoFileInstance(int instanceID, int globalSetID, String MD5Hash, TskData.FileKnown knownStatus, String comment)

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