19 package org.sleuthkit.autopsy.geolocation.datamodel;
22 import org.openide.util.NbBundle.Messages;
29 final class LastKnownWaypoint
extends Waypoint {
38 LastKnownWaypoint(BlackboardArtifact artifact)
throws GeoLocationDataException {
39 this(artifact, getAttributesFromArtifactAsMap(artifact));
51 private LastKnownWaypoint(BlackboardArtifact artifact, Map<BlackboardAttribute.ATTRIBUTE_TYPE, BlackboardAttribute> attributeMap)
throws GeoLocationDataException {
53 getLabelFromArtifact(attributeMap),
54 attributeMap.get(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DATETIME) != null ? attributeMap.get(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DATETIME).getValueLong() : null,
55 attributeMap.get(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_GEO_LATITUDE) != null ? attributeMap.get(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_GEO_LATITUDE).getValueDouble() : null,
56 attributeMap.get(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_GEO_LONGITUDE) != null ? attributeMap.get(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_GEO_LONGITUDE).getValueDouble() : null,
57 attributeMap.get(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_GEO_ALTITUDE) != null ? attributeMap.get(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_GEO_ALTITUDE).getValueDouble() : null,
58 null, attributeMap, null);
71 "LastKnownWaypoint_Label=Last Known Location",})
72 private static String getLabelFromArtifact(Map<BlackboardAttribute.ATTRIBUTE_TYPE, BlackboardAttribute> attributeMap)
throws GeoLocationDataException {
73 BlackboardAttribute attribute = attributeMap.get(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_NAME);
74 String label = attribute != null ? attribute.getDisplayString() : Bundle.LastKnownWaypoint_Label();
76 if (label == null || label.isEmpty()) {
77 label = Bundle.LastKnownWaypoint_Label();