Added label to track point waypoint objects

This commit is contained in:
Kelly Kelly 2020-01-28 14:25:58 -05:00
parent 767397bcb4
commit 206b134fce
2 changed files with 10 additions and 3 deletions

View File

@ -1,3 +1,5 @@
# {0} - track name
GEOTrack_point_label_header=Trackpoint for track: {0}
LastKnownWaypoint_Label=Last Known Location LastKnownWaypoint_Label=Last Known Location
Route_End_Label=End Route_End_Label=End
Route_Label=As-the-crow-flies Route Route_Label=As-the-crow-flies Route

View File

@ -23,6 +23,7 @@ import java.util.ArrayList;
import java.util.Collections; import java.util.Collections;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import org.openide.util.NbBundle.Messages;
import org.sleuthkit.datamodel.BlackboardArtifact; import org.sleuthkit.datamodel.BlackboardArtifact;
import org.sleuthkit.datamodel.BlackboardAttribute; import org.sleuthkit.datamodel.BlackboardAttribute;
import org.sleuthkit.datamodel.blackboardutils.attributes.GeoTrackPoints; import org.sleuthkit.datamodel.blackboardutils.attributes.GeoTrackPoints;
@ -106,9 +107,13 @@ public final class Track extends GeoPath{
* *
* @throws GeoLocationDataException * @throws GeoLocationDataException
*/ */
@Messages({
"# {0} - track name",
"GEOTrack_point_label_header=Trackpoint for track: {0}"
})
private void buildPath(List<GeoTrackPoint> points) throws GeoLocationDataException { private void buildPath(List<GeoTrackPoint> points) throws GeoLocationDataException {
for (GeoTrackPoint point : points) { for (GeoTrackPoint point : points) {
addToPath(new TrackWaypoint(point)); addToPath(new TrackWaypoint(Bundle.GEOTrack_point_label_header(getLabel()), point));
} }
} }
@ -183,8 +188,8 @@ public final class Track extends GeoPath{
* *
* @throws GeoLocationDataException * @throws GeoLocationDataException
*/ */
TrackWaypoint(GeoTrackPoint point) throws GeoLocationDataException { TrackWaypoint(String pointLabel, GeoTrackPoint point) throws GeoLocationDataException {
super(null, "", super(null, pointLabel,
point.getTimeStamp(), point.getTimeStamp(),
point.getLatitude(), point.getLatitude(),
point.getLongitude(), point.getLongitude(),