19 package org.sleuthkit.autopsy.geolocation.datamodel;
30 final class EXIFWaypoint
extends Waypoint {
39 EXIFWaypoint(BlackboardArtifact artifact)
throws GeoLocationDataException {
40 this(artifact, getAttributesFromArtifactAsMap(artifact), getImageFromArtifact(artifact));
52 private EXIFWaypoint(BlackboardArtifact artifact, Map<BlackboardAttribute.ATTRIBUTE_TYPE, BlackboardAttribute> attributeMap, AbstractFile image)
throws GeoLocationDataException {
54 image != null ? image.getName() :
"",
55 attributeMap.get(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DATETIME_CREATED) != null ? attributeMap.get(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DATETIME_CREATED).getValueLong() : null,
56 attributeMap.get(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_GEO_LATITUDE) != null ? attributeMap.get(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_GEO_LATITUDE).getValueDouble() : null,
57 attributeMap.get(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_GEO_LONGITUDE) != null ? attributeMap.get(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_GEO_LONGITUDE).getValueDouble() : null,
58 attributeMap.get(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_GEO_ALTITUDE) != null ? attributeMap.get(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_GEO_ALTITUDE).getValueDouble() : null,
59 image, attributeMap, null);
72 private static AbstractFile getImageFromArtifact(BlackboardArtifact artifact)
throws GeoLocationDataException {
73 AbstractFile abstractFile = null;
74 BlackboardArtifact.ARTIFACT_TYPE artifactType = BlackboardArtifact.ARTIFACT_TYPE.fromID(artifact.getArtifactTypeID());
75 if (artifactType == BlackboardArtifact.ARTIFACT_TYPE.TSK_METADATA_EXIF) {
77 abstractFile = artifact.getSleuthkitCase().getAbstractFileById(artifact.getObjectID());
78 }
catch (TskCoreException ex) {
79 throw new GeoLocationDataException(String.format(
"Unable to getAbstractFileByID for artifactID: %d", artifact.getArtifactID()), ex);