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 import java.time.Instant;
22 import java.time.ZoneOffset;
23 
24 /**
25  * This class definition mirrors the core Action object described in the UCO
26  * ontology.
27  */
28 class Action extends UcoObject {
29 
30     private String startTime;
31 
Action(String id)32     Action(String id) {
33         super(id, Action.class.getSimpleName());
34     }
35 
setStartTime(Long startTime)36     Action setStartTime(Long startTime) {
37         if (startTime != null) {
38             this.startTime = Instant.ofEpochSecond(startTime).atOffset(ZoneOffset.UTC).toString();
39         }
40 
41         return this;
42     }
43 }
44