diff --git a/Core/src/org/sleuthkit/autopsy/timeline/datamodel/EventCluster.java b/Core/src/org/sleuthkit/autopsy/timeline/datamodel/EventCluster.java index 9c5986c46b..ace1dd68ff 100644 --- a/Core/src/org/sleuthkit/autopsy/timeline/datamodel/EventCluster.java +++ b/Core/src/org/sleuthkit/autopsy/timeline/datamodel/EventCluster.java @@ -127,13 +127,26 @@ public class EventCluster implements MultiEvent { this(spanningInterval, type, eventIDs, hashHits, tagged, description, lod, null); } + /** + * get the EventStripe (if any) that contains this cluster + * + * @return an Optional containg the parent stripe of this cluster, or is + * empty if the cluster has no parent set. + */ @Override public Optional getParent() { return Optional.ofNullable(parent); } + /** + * get the EventStripe (if any) that contains this cluster + * + * @return an Optional containg the parent stripe of this cluster, or is + * empty if the cluster has no parent set. + */ @Override public Optional getParentStripe() { + //since this clusters parent must be an event stripe just delegate to getParent(); return getParent(); } diff --git a/Core/src/org/sleuthkit/autopsy/timeline/datamodel/SingleEvent.java b/Core/src/org/sleuthkit/autopsy/timeline/datamodel/SingleEvent.java index 14517d768b..d336a66441 100644 --- a/Core/src/org/sleuthkit/autopsy/timeline/datamodel/SingleEvent.java +++ b/Core/src/org/sleuthkit/autopsy/timeline/datamodel/SingleEvent.java @@ -51,6 +51,11 @@ public class SingleEvent implements TimeLineEvent { private final boolean hashHit; private final boolean tagged; + /** + * Single events may or may not have their parent set, since that is a + * transient property of the current (details ) view. The parent may be any + * kind of MultiEvent. + */ private MultiEvent parent = null; public SingleEvent(long eventID, long dataSourceID, long objID, @Nullable Long artifactID, long time, EventType type, String fullDescription, String medDescription, String shortDescription, TskData.FileKnown known, boolean hashHit, boolean tagged) { @@ -195,6 +200,14 @@ public class SingleEvent implements TimeLineEvent { return DescriptionLoD.FULL; } + /** + * get the EventStripe (if any) that contains this event, skipping over any + * intervening event cluster + * + * @return an Optional containing the parent stripe of this cluster. is + * empty if the cluster has no parent set or the parent has no + * parent stripe. + */ @Override public Optional getParentStripe() { if (parent == null) { diff --git a/Core/src/org/sleuthkit/autopsy/timeline/datamodel/TimeLineEvent.java b/Core/src/org/sleuthkit/autopsy/timeline/datamodel/TimeLineEvent.java index 4e92ff33c8..bd26026631 100644 --- a/Core/src/org/sleuthkit/autopsy/timeline/datamodel/TimeLineEvent.java +++ b/Core/src/org/sleuthkit/autopsy/timeline/datamodel/TimeLineEvent.java @@ -33,6 +33,12 @@ public interface TimeLineEvent { public DescriptionLoD getDescriptionLoD(); + /** + * get the EventStripe (if any) that contains this event + * + * @return an Optional containing the parent stripe of this event, or is + * empty if the event has no parent stripe. + */ public Optional getParentStripe(); Set getEventIDs();