19 package org.sleuthkit.autopsy.geolocation.datamodel;
22 import org.openide.util.NbBundle.Messages;
29 final class TrackpointWaypoint
extends Waypoint {
35 TrackpointWaypoint(BlackboardArtifact artifact)
throws GeoLocationDataException {
36 this(artifact, getAttributesFromArtifactAsMap(artifact));
39 private TrackpointWaypoint(BlackboardArtifact artifact, Map<BlackboardAttribute.ATTRIBUTE_TYPE, BlackboardAttribute> attributeMap)
throws GeoLocationDataException {
41 getLabelFromArtifact(attributeMap),
42 attributeMap.get(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DATETIME) != null ? attributeMap.get(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DATETIME).getValueLong() : null,
43 attributeMap.get(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_GEO_LATITUDE) != null ? attributeMap.get(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_GEO_LATITUDE).getValueDouble() : null,
44 attributeMap.get(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_GEO_LONGITUDE) != null ? attributeMap.get(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_GEO_LONGITUDE).getValueDouble() : null,
45 attributeMap.get(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_GEO_ALTITUDE) != null ? attributeMap.get(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_GEO_ALTITUDE).getValueDouble() : null,
46 null, attributeMap, null);
60 "TrackpointWaypoint_DisplayLabel=GPS Trackpoint"
62 private static String getLabelFromArtifact(Map<BlackboardAttribute.ATTRIBUTE_TYPE, BlackboardAttribute> attributeMap)
throws GeoLocationDataException {
64 BlackboardAttribute attribute = attributeMap.get(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_NAME);
65 if (attribute != null) {
66 return attribute.getDisplayString();
69 attribute = attributeMap.get(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_PROG_NAME);
70 if (attribute != null) {
71 return attribute.getDisplayString();
74 attribute = attributeMap.get(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_FLAG);
75 if (attribute != null) {
76 return attribute.getDisplayString();
79 return Bundle.TrackpointWaypoint_DisplayLabel();