19 package org.sleuthkit.autopsy.timeline.ui.detailview.datamodel;
21 import com.google.common.collect.ImmutableMap;
22 import com.google.common.collect.ImmutableSortedSet;
23 import java.util.Collections;
24 import java.util.Comparator;
25 import java.util.Optional;
27 import java.util.SortedSet;
28 import org.joda.time.Interval;
63 private final TimelineEventType
type;
69 private final ImmutableMap<TimelineLevelOfDetail, String>
descriptions;
103 public SingleDetailsViewEvent(
long eventID,
long dataSourceObjId,
long fileObjId, Long artifactID,
long time, TimelineEventType type, String fullDescription, String medDescription, String shortDescription,
boolean hashHit,
boolean tagged) {
107 this.artifactID = Long.valueOf(0).equals(artifactID) ? null :
artifactID;
110 descriptions = ImmutableMap.<TimelineLevelOfDetail, String>of(TimelineLevelOfDetail.HIGH, fullDescription,
111 TimelineLevelOfDetail.MEDIUM, medDescription,
112 TimelineLevelOfDetail.LOW, shortDescription);
118 this(singleEvent.getEventID(),
119 singleEvent.getDataSourceObjID(),
120 singleEvent.getContentObjID(),
121 singleEvent.getArtifactID().orElse(null),
122 singleEvent.getTime(),
123 singleEvent.getEventType(),
124 singleEvent.getDescription(TimelineLevelOfDetail.HIGH),
125 singleEvent.getDescription(TimelineLevelOfDetail.MEDIUM),
126 singleEvent.getDescription(TimelineLevelOfDetail.LOW),
127 singleEvent.eventSourceHasHashHits(),
128 singleEvent.eventSourceIsTagged());
141 SingleDetailsViewEvent singleEvent =
new SingleDetailsViewEvent(eventID, dataSourceObjId, fileObjId, artifactID, time, type, descriptions.get(TimelineLevelOfDetail.HIGH), descriptions.get(TimelineLevelOfDetail.MEDIUM), descriptions.get(TimelineLevelOfDetail.LOW),
hashHit,
tagged);
142 singleEvent.
parent = newParent;
174 return Optional.ofNullable(artifactID);
245 return descriptions.get(lod);
259 return Collections.singleton(eventID);
264 return isHashHit() ? Collections.singleton(eventID) : Collections.emptySet();
269 return isTagged() ? Collections.singleton(eventID) : Collections.emptySet();
285 hash = 13 * hash + (int) (this.eventID ^ (this.eventID >>> 32));
294 if (getClass() != obj.getClass()) {
298 return this.eventID == other.
eventID;
314 return TimelineLevelOfDetail.HIGH;
327 if (parent == null) {
328 return Optional.empty();
330 return Optional.of((EventStripe) parent);
332 return parent.getParentStripe();
Set< Long > getEventIDsWithHashHits()
String getDescription(TimelineLevelOfDetail lod)
boolean equals(Object obj)
Optional< EventStripe > getParentStripe()
TimelineEventType getEventType()
SingleDetailsViewEvent withParent(MultiEvent<?> newParent)
final long dataSourceObjId
SingleDetailsViewEvent(TimelineEvent singleEvent)
Set< Long > getEventIDsWithTags()
String getShortDescription()
TimelineLevelOfDetail getDescriptionLevel()
long getDataSourceObjID()
final ImmutableMap< TimelineLevelOfDetail, String > descriptions
Optional< Long > getArtifactID()
String getMedDescription()
Set< Long > getEventIDs()
final TimelineEventType type
SingleDetailsViewEvent(long eventID, long dataSourceObjId, long fileObjId, Long artifactID, long time, TimelineEventType type, String fullDescription, String medDescription, String shortDescription, boolean hashHit, boolean tagged)
String getFullDescription()
SortedSet< EventCluster > getClusters()