Sleuth Kit Java Bindings (JNI)  4.11.0
Java bindings for using The Sleuth Kit
TimelineFilter.java
Go to the documentation of this file.
1 /*
2  * Sleuth Kit Data Model
3  *
4  * Copyright 2018-2019 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.datamodel;
20 
21 import com.google.common.annotations.VisibleForTesting;
22 import com.google.common.collect.Lists;
23 import com.google.common.net.MediaType;
24 import java.util.ArrayList;
25 import java.util.Arrays;
26 import static java.util.Arrays.asList;
27 import java.util.Collection;
28 import java.util.HashSet;
29 import java.util.List;
30 import java.util.Objects;
31 import java.util.Set;
32 import java.util.stream.Collectors;
33 import static java.util.stream.Collectors.joining;
34 import java.util.stream.Stream;
35 import static org.apache.commons.lang3.ObjectUtils.notEqual;
36 import org.apache.commons.lang3.StringUtils;
38 
44 public abstract class TimelineFilter {
45 
51  public abstract String getDisplayName();
52 
62  abstract String getSQLWhere(TimelineManager manager);
63 
69  public abstract TimelineFilter copyOf();
70 
71  @SuppressWarnings("unchecked")
72  static <S extends TimelineFilter, T extends CompoundFilter<S>> T copySubFilters(T from, T to) {
73  from.getSubFilters().forEach(subFilter -> to.addSubFilter((S) subFilter.copyOf()));
74  return to;
75  }
76 
83  public static class IntersectionFilter<SubFilterType extends TimelineFilter> extends CompoundFilter<SubFilterType> {
84 
91  @VisibleForTesting
92  public IntersectionFilter(List<SubFilterType> subFilters) {
93  super(subFilters);
94  }
95 
96  @Override
98  @SuppressWarnings("unchecked")
99  List<SubFilterType> subfilters = Lists.transform(getSubFilters(), f -> (SubFilterType) f.copyOf()); //make copies of all the subfilters.
100  return new IntersectionFilter<>(subfilters);
101  }
102 
103  @Override
104  public String getDisplayName() {
105  String subFilterDisplayNames = getSubFilters().stream()
107  .collect(joining(","));
108  return BundleProvider.getBundle().getString("IntersectionFilter.displayName.text") + "[" + subFilterDisplayNames + "]";
109  }
110 
111  @Override
112  String getSQLWhere(TimelineManager manager) {
113  String trueLiteral = manager.getSQLWhere(null);
114  String join = this.getSubFilters().stream()
115  .filter(Objects::nonNull)
116  .map(filter -> filter.getSQLWhere(manager))
117  .filter(sqlString -> notEqual(sqlString, trueLiteral))
118  .collect(Collectors.joining(" AND "));
119  return join.isEmpty() ? trueLiteral : "(" + join + ")";
120  }
121 
122  }
123 
130  public static final class EventTypeFilter extends UnionFilter<EventTypeFilter> {
131 
132  private final TimelineEventType rootEventType;
133 
147  private EventTypeFilter(TimelineEventType rootEventType, boolean recursive) {
148  super(new ArrayList<>());
149  this.rootEventType = rootEventType;
150  if (recursive) {
151  // add subfilters for each subtype
152  for (TimelineEventType subType : rootEventType.getChildren()) {
153  addSubFilter(new EventTypeFilter(subType));
154  }
155  }
156  }
157 
168  public EventTypeFilter(TimelineEventType rootEventType) {
169  this(rootEventType, true);
170  }
171 
179  return rootEventType;
180  }
181 
182  @Override
183  public String getDisplayName() {
184  return (TimelineEventType.ROOT_EVENT_TYPE.equals(rootEventType)) ? BundleProvider.getBundle().getString("TypeFilter.displayName.text") : rootEventType.getDisplayName();
185  }
186 
187  @Override
189  //make a nonrecursive copy of this filter, and then copy subfilters
190  // RC (10/1/19): Why?
191  return copySubFilters(this, new EventTypeFilter(rootEventType, false));
192  }
193 
194  @Override
195  public int hashCode() {
196  int hash = 7;
197  hash = 17 * hash + Objects.hashCode(this.rootEventType);
198  return hash;
199  }
200 
201  @Override
202  public boolean equals(Object obj) {
203  if (this == obj) {
204  return true;
205  }
206  if (obj == null) {
207  return false;
208  }
209  if (getClass() != obj.getClass()) {
210  return false;
211  }
212  final EventTypeFilter other = (EventTypeFilter) obj;
213  if (notEqual(this.rootEventType, other.getRootEventType())) {
214  return false;
215  }
216  return Objects.equals(this.getSubFilters(), other.getSubFilters());
217  }
218 
219  @Override
220  String getSQLWhere(TimelineManager manager) {
221  return "(tsk_events.event_type_id IN (" + getSubTypeIDs().collect(Collectors.joining(",")) + "))"; //NON-NLS
222  }
223 
224  private Stream<String> getSubTypeIDs() {
225  if (this.getSubFilters().isEmpty()) {
226  return Stream.of(String.valueOf(getRootEventType().getTypeID()));
227  } else {
228  return this.getSubFilters().stream().flatMap(EventTypeFilter::getSubTypeIDs);
229  }
230  }
231 
232  @Override
233  public String toString() {
234  return "EventTypeFilter{" + "rootEventType=" + rootEventType + ", subfilters=" + getSubFilters() + '}';
235  }
236 
237  }
238 
243  public static final class TagsFilter extends TimelineFilter {
244 
245  private boolean eventSourcesAreTagged;
246 
252  public TagsFilter() {
253  }
254 
264  public TagsFilter(boolean eventSourcesAreTagged) {
265  this.eventSourcesAreTagged = eventSourcesAreTagged;
266  }
267 
276  public synchronized void setEventSourcesAreTagged(boolean eventSourcesAreTagged) {
277  this.eventSourcesAreTagged = eventSourcesAreTagged;
278  }
279 
286  public synchronized boolean getEventSourceAreTagged() {
287  return eventSourcesAreTagged;
288  }
289 
290  @Override
291  public String getDisplayName() {
292  return BundleProvider.getBundle().getString("tagsFilter.displayName.text");
293  }
294 
295  @Override
296  public TagsFilter copyOf() {
297  return new TagsFilter(eventSourcesAreTagged);
298  }
299 
300  @Override
301  public boolean equals(Object obj) {
302  if (obj == null || !(obj instanceof TagsFilter)) {
303  return false;
304  }
305 
306  return ((TagsFilter) obj).getEventSourceAreTagged() == getEventSourceAreTagged();
307  }
308 
309  @Override
310  public int hashCode() {
311  int hash = 7;
312  hash = 67 * hash + Objects.hashCode(this.eventSourcesAreTagged);
313  return hash;
314  }
315 
316  @Override
317  String getSQLWhere(TimelineManager manager) {
318  String whereStr;
319  if (eventSourcesAreTagged) {
320  whereStr = "tagged = 1";
321  } else {
322  whereStr = "tagged = 0";
323  }
324 
325  return whereStr;
326  }
327 
328  }
329 
336  public static abstract class UnionFilter<SubFilterType extends TimelineFilter> extends TimelineFilter.CompoundFilter<SubFilterType> {
337 
338  UnionFilter(List<SubFilterType> subFilters) {
339  super(subFilters);
340  }
341 
342  UnionFilter() {
343  super(new ArrayList<SubFilterType>());
344  }
345 
346  @Override
347  public void addSubFilter(SubFilterType subfilter) {
348  super.addSubFilter(subfilter);
349  }
350 
351  @Override
352  String getSQLWhere(TimelineManager manager) {
353  String join = getSubFilters().stream()
354  .map(subFilter -> subFilter.getSQLWhere(manager))
355  .collect(Collectors.joining(" OR "));
356  return join.isEmpty() ? manager.getSQLWhere(null) : "(" + join + ")";
357  }
358 
359  }
360 
365  public static final class TextFilter extends TimelineFilter {
366 
367  private String descriptionSubstring;
368 
374  public TextFilter() {
375  this("");
376  }
377 
386  public TextFilter(String descriptionSubstring) {
387  super();
388  this.descriptionSubstring = descriptionSubstring.trim();
389  }
390 
397  public synchronized void setDescriptionSubstring(String descriptionSubstring) {
398  this.descriptionSubstring = descriptionSubstring.trim();
399  }
400 
401  @Override
402  public String getDisplayName() {
403  return BundleProvider.getBundle().getString("TextFilter.displayName.text");
404  }
405 
412  public synchronized String getDescriptionSubstring() {
413  return descriptionSubstring;
414  }
415 
416  @Override
417  public synchronized TextFilter copyOf() {
418  return new TextFilter(getDescriptionSubstring());
419  }
420 
421  @Override
422  public boolean equals(Object obj) {
423  if (obj == null) {
424  return false;
425  }
426  if (getClass() != obj.getClass()) {
427  return false;
428  }
429  final TextFilter other = (TextFilter) obj;
430  return Objects.equals(getDescriptionSubstring(), other.getDescriptionSubstring());
431  }
432 
433  @Override
434  public int hashCode() {
435  int hash = 5;
436  hash = 29 * hash + Objects.hashCode(this.descriptionSubstring);
437  return hash;
438  }
439 
440  @Override
441  String getSQLWhere(TimelineManager manager) {
442  if (StringUtils.isNotBlank(this.getDescriptionSubstring())) {
443  return "((med_description like '%" + escapeSingleQuotes(this.getDescriptionSubstring()) + "%')" //NON-NLS
444  + " or (full_description like '%" + escapeSingleQuotes(this.getDescriptionSubstring()) + "%')" //NON-NLS
445  + " or (short_description like '%" + escapeSingleQuotes(this.getDescriptionSubstring()) + "%'))"; //NON-NLS
446  } else {
447  return manager.getSQLWhere(null);
448  }
449  }
450 
451  @Override
452  public String toString() {
453  return "TextFilter{" + "textProperty=" + descriptionSubstring + '}';
454  }
455 
456  }
457 
462  public static final class RootFilter extends IntersectionFilter<TimelineFilter> {
463 
464  private final HideKnownFilter knownFilesFilter;
465  private final TagsFilter tagsFilter;
466  private final HashHitsFilter hashSetHitsFilter;
467  private final TextFilter descriptionSubstringFilter;
468  private final EventTypeFilter eventTypesFilter;
469  private final DataSourcesFilter dataSourcesFilter;
470  private final FileTypesFilter fileTypesFilter;
471  private final Set<TimelineFilter> additionalFilters = new HashSet<>();
472 
479  return dataSourcesFilter;
480  }
481 
488  return tagsFilter;
489  }
490 
497  return hashSetHitsFilter;
498  }
499 
506  return eventTypesFilter;
507  }
508 
515  return knownFilesFilter;
516  }
517 
524  return descriptionSubstringFilter;
525  }
526 
533  return fileTypesFilter;
534  }
535 
561  public RootFilter(
562  HideKnownFilter knownFilesFilter,
563  TagsFilter tagsFilter,
564  HashHitsFilter hashSetHitsFilter,
565  TextFilter descriptionSubstringFilter,
566  EventTypeFilter eventTypesFilter,
567  DataSourcesFilter dataSourcesFilter,
568  FileTypesFilter fileTypesFilter,
569  Collection<TimelineFilter> additionalFilters) {
570 
571  super(Arrays.asList(descriptionSubstringFilter, knownFilesFilter, tagsFilter, dataSourcesFilter, hashSetHitsFilter, fileTypesFilter, eventTypesFilter));
572  getSubFilters().removeIf(Objects::isNull);
573  this.knownFilesFilter = knownFilesFilter;
574  this.tagsFilter = tagsFilter;
575  this.hashSetHitsFilter = hashSetHitsFilter;
576  this.descriptionSubstringFilter = descriptionSubstringFilter;
577  this.eventTypesFilter = eventTypesFilter;
578  this.dataSourcesFilter = dataSourcesFilter;
579  this.fileTypesFilter = fileTypesFilter;
580  this.additionalFilters.addAll(asList(descriptionSubstringFilter, knownFilesFilter, tagsFilter, dataSourcesFilter, hashSetHitsFilter, fileTypesFilter, eventTypesFilter));
581  this.additionalFilters.removeIf(Objects::isNull);
582  additionalFilters.stream().
583  filter(Objects::nonNull).
584  filter(this::hasAdditionalFilter).
586  forEach(anonymousFilter -> getSubFilters().add(anonymousFilter));
587  }
588 
589  @Override
590  public RootFilter copyOf() {
591  Set<TimelineFilter> subFilters = getSubFilters().stream()
592  .filter(this::hasAdditionalFilter)
594  .collect(Collectors.toSet());
595  return new RootFilter(knownFilesFilter.copyOf(), tagsFilter.copyOf(),
596  hashSetHitsFilter.copyOf(), descriptionSubstringFilter.copyOf(), eventTypesFilter.copyOf(),
597  dataSourcesFilter.copyOf(), fileTypesFilter.copyOf(), subFilters);
598 
599  }
600 
601  private boolean hasAdditionalFilter(TimelineFilter subFilter) {
602  return !(additionalFilters.contains(subFilter));
603  }
604 
605  @Override
606  public String toString() {
607  return "RootFilter{" + "knownFilter=" + knownFilesFilter + ", tagsFilter=" + tagsFilter + ", hashFilter=" + hashSetHitsFilter + ", textFilter=" + descriptionSubstringFilter + ", typeFilter=" + eventTypesFilter + ", dataSourcesFilter=" + dataSourcesFilter + ", fileTypesFilter=" + fileTypesFilter + ", namedSubFilters=" + additionalFilters + '}';
608  }
609 
610  @Override
611  public int hashCode() {
612  int hash = 7;
613  hash = 17 * hash + Objects.hashCode(this.knownFilesFilter);
614  hash = 17 * hash + Objects.hashCode(this.tagsFilter);
615  hash = 17 * hash + Objects.hashCode(this.hashSetHitsFilter);
616  hash = 17 * hash + Objects.hashCode(this.descriptionSubstringFilter);
617  hash = 17 * hash + Objects.hashCode(this.eventTypesFilter);
618  hash = 17 * hash + Objects.hashCode(this.dataSourcesFilter);
619  hash = 17 * hash + Objects.hashCode(this.fileTypesFilter);
620  hash = 17 * hash + Objects.hashCode(this.additionalFilters);
621  return hash;
622  }
623 
624  @Override
625  public boolean equals(Object obj) {
626  if (this == obj) {
627  return true;
628  }
629  if (obj == null) {
630  return false;
631  }
632  if (getClass() != obj.getClass()) {
633  return false;
634  }
635  final RootFilter other = (RootFilter) obj;
636  if (notEqual(this.knownFilesFilter, other.getKnownFilter())) {
637  return false;
638  }
639  if (notEqual(this.tagsFilter, other.getTagsFilter())) {
640  return false;
641  }
642  if (notEqual(this.hashSetHitsFilter, other.getHashHitsFilter())) {
643  return false;
644  }
645  if (notEqual(this.descriptionSubstringFilter, other.getTextFilter())) {
646  return false;
647  }
648  if (notEqual(this.eventTypesFilter, other.getEventTypeFilter())) {
649  return false;
650  }
651  if (notEqual(this.dataSourcesFilter, other.getDataSourcesFilter())) {
652  return false;
653  }
654 
655  if (notEqual(this.fileTypesFilter, other.getFileTypesFilter())) {
656  return false;
657  }
658 
659  return Objects.equals(this.additionalFilters, new HashSet<>(other.getSubFilters()));
660  }
661 
662  }
663 
668  public static final class HideKnownFilter extends TimelineFilter {
669 
670  @Override
671  public String getDisplayName() {
672  return BundleProvider.getBundle().getString("hideKnownFilter.displayName.text");
673  }
674 
675  @Override
677  return new HideKnownFilter();
678  }
679 
680  @Override
681  public int hashCode() {
682  return 7;
683  }
684 
685  @Override
686  public boolean equals(Object obj) {
687  if (obj == null) {
688  return false;
689  }
690  return getClass() == obj.getClass();
691  }
692 
693  @Override
694  String getSQLWhere(TimelineManager manager) {
695  return "(known_state != " + TskData.FileKnown.KNOWN.getFileKnownValue() + ")"; // NON-NLS
696  }
697 
698  @Override
699  public String toString() {
700  return "HideKnownFilter{" + '}';
701  }
702 
703  }
704 
712  public static abstract class CompoundFilter<SubFilterType extends TimelineFilter> extends TimelineFilter {
713 
714  protected void addSubFilter(SubFilterType subfilter) {
715  if (getSubFilters().contains(subfilter) == false) {
716  getSubFilters().add(subfilter);
717  }
718  }
719 
720  private final List<SubFilterType> subFilters = new ArrayList<>();
721 
727  public final List<SubFilterType> getSubFilters() {
728  return subFilters;
729  }
730 
736  public boolean hasSubFilters() {
737  return getSubFilters().isEmpty() == false;
738  }
739 
746  protected CompoundFilter(List<SubFilterType> subFilters) {
747  super();
748  this.subFilters.addAll(subFilters);
749  }
750 
751  @Override
752  public abstract CompoundFilter<SubFilterType> copyOf();
753 
754  @Override
755  public int hashCode() {
756  int hash = 3;
757  hash = 23 * hash + Objects.hashCode(this.subFilters);
758  return hash;
759  }
760 
761  @Override
762  public boolean equals(Object obj) {
763  if (this == obj) {
764  return true;
765  }
766  if (obj == null) {
767  return false;
768  }
769  if (getClass() != obj.getClass()) {
770  return false;
771  }
772  final CompoundFilter<?> other = (CompoundFilter<?>) obj;
773  return Objects.equals(this.getSubFilters(), other.getSubFilters());
774  }
775 
776  @Override
777  public String toString() {
778  return this.getClass().getSimpleName() + "{" + "subFilters=" + subFilters + '}';
779  }
780 
781  }
782 
787  public static final class DataSourceFilter extends TimelineFilter {
788 
789  private final String dataSourceName;
790  private final long dataSourceID;
791 
797  public long getDataSourceID() {
798  return dataSourceID;
799  }
800 
806  public String getDataSourceName() {
807  return dataSourceName;
808  }
809 
817  public DataSourceFilter(String dataSourceName, long dataSourceID) {
818  super();
819  this.dataSourceName = dataSourceName;
820  this.dataSourceID = dataSourceID;
821  }
822 
823  @Override
824  public synchronized DataSourceFilter copyOf() {
826  }
827 
828  @Override
829  public String getDisplayName() {
830  return getDataSourceName() + " (ID: " + getDataSourceID() + ")";
831  }
832 
833  @Override
834  public int hashCode() {
835  int hash = 3;
836  hash = 47 * hash + Objects.hashCode(this.dataSourceName);
837  hash = 47 * hash + (int) (this.dataSourceID ^ (this.dataSourceID >>> 32));
838  return hash;
839  }
840 
841  @Override
842  public boolean equals(Object obj) {
843  if (this == obj) {
844  return true;
845  }
846  if (obj == null) {
847  return false;
848  }
849  if (getClass() != obj.getClass()) {
850  return false;
851  }
852  final DataSourceFilter other = (DataSourceFilter) obj;
853  if (this.dataSourceID != other.dataSourceID) {
854  return false;
855  }
856  return Objects.equals(this.dataSourceName, other.dataSourceName);
857  }
858 
859  @Override
860  String getSQLWhere(TimelineManager manager) {
861  return "(data_source_obj_id = '" + this.getDataSourceID() + "')"; //NON-NLS
862  }
863 
864  }
865 
872  public static final class HashHitsFilter extends TimelineFilter {
873 
874  private boolean eventSourcesHaveHashSetHits;
875 
881  public HashHitsFilter() {
882  }
883 
893  public HashHitsFilter(boolean eventSourcesHaveHashSetHits) {
894  this.eventSourcesHaveHashSetHits = eventSourcesHaveHashSetHits;
895  }
896 
903  public synchronized void setEventSourcesHaveHashSetHits(boolean eventSourcesHaveHashSetHits) {
904  this.eventSourcesHaveHashSetHits = eventSourcesHaveHashSetHits;
905  }
906 
913  public synchronized boolean getEventSourcesHaveHashSetHits() {
914  return eventSourcesHaveHashSetHits;
915  }
916 
917  @Override
918  public String getDisplayName() {
919  return BundleProvider.getBundle().getString("hashHitsFilter.displayName.text");
920  }
921 
922  @Override
924  return new HashHitsFilter(eventSourcesHaveHashSetHits);
925  }
926 
927  @Override
928  public boolean equals(Object obj) {
929  if (obj == null || !(obj instanceof HashHitsFilter)) {
930  return false;
931  }
932 
933  return ((HashHitsFilter) obj).getEventSourcesHaveHashSetHits() == getEventSourcesHaveHashSetHits();
934  }
935 
936  @Override
937  public int hashCode() {
938  int hash = 7;
939  hash = 67 * hash + Objects.hashCode(this.eventSourcesHaveHashSetHits);
940  return hash;
941  }
942 
943  @Override
944  String getSQLWhere(TimelineManager manager) {
945  String whereStr = "";
946  if (eventSourcesHaveHashSetHits) {
947  whereStr = "hash_hit = 1";
948  } else {
949  whereStr = "hash_hit = 0";
950  }
951 
952  return whereStr;
953  }
954 
955  }
956 
962  static public final class DataSourcesFilter extends UnionFilter<DataSourceFilter> {
963 
964  @Override
966  return copySubFilters(this, new DataSourcesFilter());
967  }
968 
969  @Override
970  public String getDisplayName() {
971  return BundleProvider.getBundle().getString("DataSourcesFilter.displayName.text");
972  }
973 
974  }
975 
981  static public final class FileTypesFilter extends UnionFilter<FileTypeFilter> {
982 
983  @Override
985  return copySubFilters(this, new FileTypesFilter());
986  }
987 
988  @Override
989  public String getDisplayName() {
990  return BundleProvider.getBundle().getString("FileTypesFilter.displayName.text");
991  }
992 
993  }
994 
999  static public class InverseFileTypeFilter extends FileTypeFilter {
1000 
1001  public InverseFileTypeFilter(String displayName, Collection<String> mediaTypes) {
1002  super(displayName, mediaTypes);
1003  }
1004 
1005  @Override
1007  return new InverseFileTypeFilter(getDisplayName(), super.mediaTypes);
1008  }
1009 
1010  @Override
1011  String getSQLWhere(TimelineManager manager) {
1012  return " NOT " + super.getSQLWhere(manager);
1013  }
1014  }
1015 
1020  public static class FileTypeFilter extends TimelineFilter {
1021 
1022  private final String displayName;
1023  private final String sqlWhere;
1024  Collection<String> mediaTypes = new HashSet<>();
1025 
1026  private FileTypeFilter(String displayName, String sql) {
1027  this.displayName = displayName;
1028  this.sqlWhere = sql;
1029  }
1030 
1040  public FileTypeFilter(String displayName, Collection<String> mediaTypes) {
1041  this(displayName,
1042  mediaTypes.stream()
1043  .map(MediaType::parse)
1044  .map(FileTypeFilter::mediaTypeToSQL)
1045  .collect(Collectors.joining(" OR ", "(", ")")));
1046  this.mediaTypes = mediaTypes;
1047  }
1048 
1049  private static String mediaTypeToSQL(MediaType mediaType) {
1050  return mediaType.hasWildcard()
1051  ? " (tsk_events.mime_type LIKE '" + escapeSingleQuotes(mediaType.type()) + "/_%' ) "
1052  : " (tsk_events.mime_type = '" + escapeSingleQuotes(mediaType.toString()) + "' ) ";
1053  }
1054 
1055  @Override
1056  public String getDisplayName() {
1057  return displayName;
1058  }
1059 
1060  @Override
1062  return new FileTypeFilter(displayName, sqlWhere);
1063  }
1064 
1065  @Override
1066  public int hashCode() {
1067  int hash = 7;
1068  hash = 17 * hash + Objects.hashCode(this.displayName);
1069  hash = 17 * hash + Objects.hashCode(this.sqlWhere);
1070  return hash;
1071  }
1072 
1073  @Override
1074  public boolean equals(Object obj) {
1075  if (this == obj) {
1076  return true;
1077  }
1078  if (obj == null) {
1079  return false;
1080  }
1081  if (getClass() != obj.getClass()) {
1082  return false;
1083  }
1084  final FileTypeFilter other = (FileTypeFilter) obj;
1085  if (notEqual(this.displayName, other.displayName)) {
1086  return false;
1087  }
1088  return Objects.equals(this.sqlWhere, other.sqlWhere);
1089  }
1090 
1091  @Override
1092  String getSQLWhere(TimelineManager manager) {
1093  return sqlWhere;
1094  }
1095 
1096  @Override
1097  public String toString() {
1098  return "FileTypeFilter{" + "displayName=" + displayName + ", sqlWhere=" + sqlWhere + '}';
1099  }
1100 
1101  }
1102 
1103 }
InverseFileTypeFilter(String displayName, Collection< String > mediaTypes)
synchronized void setEventSourcesAreTagged(boolean eventSourcesAreTagged)
HashHitsFilter(boolean eventSourcesHaveHashSetHits)
SortedSet<?extends TimelineEventType > getChildren()
FileTypeFilter(String displayName, Collection< String > mediaTypes)
static String escapeSingleQuotes(String text)
synchronized void setEventSourcesHaveHashSetHits(boolean eventSourcesHaveHashSetHits)
abstract CompoundFilter< SubFilterType > copyOf()
synchronized void setDescriptionSubstring(String descriptionSubstring)
abstract TimelineFilter copyOf()
RootFilter(HideKnownFilter knownFilesFilter, TagsFilter tagsFilter, HashHitsFilter hashSetHitsFilter, TextFilter descriptionSubstringFilter, EventTypeFilter eventTypesFilter, DataSourcesFilter dataSourcesFilter, FileTypesFilter fileTypesFilter, Collection< TimelineFilter > additionalFilters)
KNOWN
File marked as a known by hash db.
Definition: TskData.java:792
DataSourceFilter(String dataSourceName, long dataSourceID)

Copyright © 2011-2021 Brian Carrier. (carrier -at- sleuthkit -dot- org)
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.