Go to the documentation of this file.
19package org.sleuthkit.autopsy.geolocation.datamodel;
21import java.util.ArrayList;
22import java.util.Collections;
25import org.openide.util.NbBundle.Messages;
26import org.sleuthkit.datamodel.BlackboardArtifact;
27import org.sleuthkit.datamodel.BlackboardAttribute;
28import org.sleuthkit.datamodel.blackboardutils.attributes.BlackboardJsonAttrUtil;
29import org.sleuthkit.datamodel.blackboardutils.attributes.BlackboardJsonAttrUtil.InvalidJsonException;
30import org.sleuthkit.datamodel.blackboardutils.attributes.GeoTrackPoints;
35public final class Track extends GeoPath {
97 private static String
getTrackName(Map<BlackboardAttribute.ATTRIBUTE_TYPE, BlackboardAttribute> attributeMap) {
98 BlackboardAttribute attribute = attributeMap.get(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_NAME);
100 return attribute !=
null ? attribute.getValueString() :
"";
112 "# {0} - track name",
113 "GEOTrack_point_label_header=Trackpoint for track: {0}"
116 for (GeoTrackPoints.TrackPoint point : points) {
117 addToPath(
new TrackWaypoint(
artifact, Bundle.GEOTrack_point_label_header(
getLabel()), point));
132 BlackboardAttribute attribute = attributeMap.get(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_GEO_TRACKPOINTS);
133 if (attribute ==
null) {
138 return BlackboardJsonAttrUtil.fromAttribute(attribute, GeoTrackPoints.class);
139 }
catch (InvalidJsonException ex) {
147 final class TrackWaypoint
extends Waypoint {
164 point.getTimeStamp(),
166 point.getLongitude(),
172 propertyList = createPropertyList(point);
183 return Collections.unmodifiableList(propertyList);
194 "Track_distanceTraveled_displayName=Distance traveled",
195 "Track_distanceFromHome_displayName=Distance from home point"
197 private List<Waypoint.Property> createPropertyList(GeoTrackPoints.TrackPoint point) {
198 List<Waypoint.Property> list =
new ArrayList<>();
200 Double value = point.getVelocity();
202 list.add(
new Property(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_GEO_VELOCITY.getDisplayName(), value.toString()));
205 value = point.getDistanceTraveled();
207 list.add(
new Property(Bundle.Track_distanceTraveled_displayName(), value.toString()));
210 value = point.getDistanceFromHomePoint();
212 list.add(
new Property(Bundle.Track_distanceFromHome_displayName(), value.toString()));
final BlackboardArtifact artifact
void buildPath(GeoTrackPoints points, BlackboardArtifact artifact)
final Long startTimestamp
GeoTrackPoints getPointsList(Map< BlackboardAttribute.ATTRIBUTE_TYPE, BlackboardAttribute > attributeMap)
Track(BlackboardArtifact artifact)
Track(BlackboardArtifact artifact, Map< BlackboardAttribute.ATTRIBUTE_TYPE, BlackboardAttribute > attributeMap)
static String getTrackName(Map< BlackboardAttribute.ATTRIBUTE_TYPE, BlackboardAttribute > attributeMap)
final BlackboardArtifact artifact
List< Waypoint.Property > getOtherProperties()
Copyright © 2012-2024 Sleuth Kit Labs. Generated on:
This work is licensed under a
Creative Commons Attribution-Share Alike 3.0 United States License.