1 /*
2  * Sleuth Kit CASE JSON LD Support
3  *
4  * Copyright 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.caseuco;
20 
21 /**
22  * This class definition mirrors the Hash type described in the UCO ontology.
23  */
24 class Hash extends UcoObject {
25 
26     private HashMethod hashMethod;
27 
28     private final String hashValue;
29 
Hash(String hashValue)30     Hash(String hashValue) {
31         this(null, hashValue);
32     }
33 
Hash(String id, String hashValue)34     Hash(String id, String hashValue) {
35         super(id, "Hash");
36         this.hashValue = hashValue;
37     }
38 
setHashMethod(HashMethod method)39     Hash setHashMethod(HashMethod method) {
40         this.hashMethod = method;
41         return this;
42     }
43 
44     /**
45      * Describes the type of hash method that is represented by this Hash
46      * instance.
47      */
48     enum HashMethod {
49         MD5;
50     }
51 }
52