Autopsy 4.22.1
Graphical digital forensics platform for The Sleuth Kit and other tools.
KeywordList.java
Go to the documentation of this file.
1/*
2 * Autopsy Forensic Browser
3 *
4 * Copyright 2011-2016 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 */
19package org.sleuthkit.autopsy.keywordsearch;
20
21import java.util.Date;
22import java.util.List;
23
30public class KeywordList {
31
32 private String name;
33 private Date created;
34 private Date modified;
35 private Boolean useForIngest;
36 private Boolean postIngestMessages;
37 private List<Keyword> keywords;
38 private Boolean isEditable;
39
59 KeywordList(String name, Date created, Date modified, Boolean useForIngest, Boolean postIngestMessages, List<Keyword> keywords, boolean isEditable) {
60 this.name = name;
61 this.created = created;
62 this.modified = modified;
63 this.useForIngest = useForIngest;
64 this.postIngestMessages = postIngestMessages;
65 this.keywords = keywords;
66 this.isEditable = isEditable;
67 }
68
86 KeywordList(String name, Date created, Date modified, Boolean useForIngest, Boolean ingestMessages, List<Keyword> keywords) {
87 this(name, created, modified, useForIngest, ingestMessages, keywords, false);
88 }
89
96 KeywordList(List<Keyword> keywords) {
97 this("", new Date(0), new Date(0), false, false, keywords, false);
98 }
99
105 String getName() {
106 return name;
107 }
108
114 Date getDateCreated() {
115 return created;
116 }
117
123 Date getDateModified() {
124 return modified;
125 }
126
132 Boolean getUseForIngest() {
133 return useForIngest;
134 }
135
141 void setUseForIngest(boolean useForIngest) {
142 this.useForIngest = useForIngest;
143 }
144
151 Boolean getIngestMessages() {
152 return postIngestMessages;
153 }
154
161 void setIngestMessages(boolean postIngestMessages) {
162 this.postIngestMessages = postIngestMessages;
163 }
164
170 public List<Keyword> getKeywords() {
171 return keywords;
172 }
173
181 boolean hasKeyword(Keyword keyword) {
182 return keywords.contains(keyword);
183 }
184
192 boolean hasSearchTerm(String searchTerm) {
193 for (Keyword word : keywords) {
194 if (word.getSearchTerm().equals(searchTerm)) {
195 return true;
196 }
197 }
198 return false;
199 }
200
208 Boolean isEditable() {
209 return isEditable;
210 }
211
212}

Copyright © 2012-2024 Sleuth Kit Labs. Generated on:
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.